{"id":26802548,"url":"https://github.com/myprototypewhat/npx-scope-finder","last_synced_at":"2026-02-18T14:03:02.711Z","repository":{"id":282533400,"uuid":"948917373","full_name":"MyPrototypeWhat/npx-scope-finder","owner":"MyPrototypeWhat","description":"A specialized tool for finding executable (npx-compatible) packages within a specific npm scope. This tool helps you discover all packages in a scope that can be run using npx.","archived":false,"fork":false,"pushed_at":"2025-03-18T10:13:41.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T00:53:48.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MyPrototypeWhat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-15T08:54:50.000Z","updated_at":"2025-03-18T10:13:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b1cff4d-3a6f-4a34-b707-00ef8dd2ceeb","html_url":"https://github.com/MyPrototypeWhat/npx-scope-finder","commit_stats":null,"previous_names":["myprototypewhat/npx-scope-finder"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MyPrototypeWhat/npx-scope-finder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyPrototypeWhat%2Fnpx-scope-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyPrototypeWhat%2Fnpx-scope-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyPrototypeWhat%2Fnpx-scope-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyPrototypeWhat%2Fnpx-scope-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MyPrototypeWhat","download_url":"https://codeload.github.com/MyPrototypeWhat/npx-scope-finder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyPrototypeWhat%2Fnpx-scope-finder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29581536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-29T21:18:34.523Z","updated_at":"2026-02-18T14:03:02.699Z","avatar_url":"https://github.com/MyPrototypeWhat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npx-scope-finder\n\nA specialized tool for finding executable (npx-compatible) packages within a specific npm scope. This tool helps you discover all packages in a scope that can be run using `npx`.\n\n✨ **Cross-Platform Support**: Works in both Node.js and browser environments!\n\n## Features\n\n- 🌐 **Universal Compatibility**: Works in both Node.js and browser environments\n- 🔄 **Robust Error Handling**: Built-in retry mechanism for network issues\n- 🎯 **Scope-Focused**: Easily find all executable packages within your organization's scope\n- 📦 **Zero Dependencies**: Uses native fetch API, no external dependencies\n- ⚡ **High Performance**: Uses concurrent requests for faster results\n- 🛡️ **Fault Tolerant**: Uses `Promise.allSettled` to handle partial failures gracefully\n- 🔍 **Complete Data**: Includes full package metadata in the `original` property\n- 💪 **Type Safety**: Full TypeScript support with detailed type definitions\n- 🔻 **Optimized Size**: Code is minified for smaller package size\n\n## Changelog\n\nA detailed changelog is available in the [CHANGELOG.md](./CHANGELOG.md) file.\n\n### 1.3.0 (2024-03-18)\n\n- 🔧 Improved project structure with separate type definitions\n- 🗑️ Removed code comments for smaller bundle size\n- 🔻 Added code minification for optimized package size\n- ⬆️ Updated TypeScript target to ES2020\n- 🧩 Exported all TypeScript interfaces and types for better developer experience\n- 📝 Enhanced type definitions based on official npm Registry API documentation\n- 🔄 Added links to official npm documentation for better TypeScript integration\n- 🧹 Removed unused type definitions to reduce bundle size and improve code clarity\n\n### 1.2.0 (2024-03-15)\n\n- ⚡ Added concurrent requests for improved performance\n- 🛡️ Implemented `Promise.allSettled` for fault-tolerant package fetching\n- 🔍 Added original package data in the `original` property\n- 🗑️ Removed format utilities for a more streamlined API\n\n### 1.1.0 (2024-03-15)\n\n- ✨ Added browser support\n- 🔄 Replaced npm-registry-fetch with native fetch API\n- ⚡️ Improved retry mechanism with better error handling\n- 🧪 Added comprehensive retry tests\n- 📦 Reduced package size by removing external dependencies\n\n## Installation\n\n```bash\nnpm install npx-scope-finder\n# or\npnpm add npx-scope-finder\n# or\nyarn add npx-scope-finder\n```\n\n## Usage\n\n```typescript\nimport { npxFinder } from 'npx-scope-finder';\n\n// Basic usage - get raw package data\nconst packages = await npxFinder('@your-scope', {\n  timeout: 10000,    // Request timeout in milliseconds (default: 10000)\n  retries: 3,        // Number of retries for failed requests (default: 3)\n  retryDelay: 1000   // Delay between retries in milliseconds (default: 1000)\n});\nconsole.log(`Found ${packages.length} executable packages`);\n\n// Access package data\npackages.forEach(pkg =\u003e {\n  console.log(`Package: ${pkg.name}@${pkg.version}`);\n  console.log(`Description: ${pkg.description || 'No description'}`);\n  console.log('Executable commands:', Object.keys(pkg.bin || {}));\n  \n  // Access full original npm registry data\n  console.log('Full package data:', pkg.original);\n  \n  // Access other metadata\n  if (pkg.links?.repository) {\n    console.log(`Repository: ${pkg.links.repository}`);\n  }\n  \n  if (pkg.dependencies) {\n    console.log('Dependencies:', Object.keys(pkg.dependencies).length);\n  }\n});\n\n// Custom formatting example\npackages.forEach(pkg =\u003e {\n  const customFormat = `\n    📦 ${pkg.name}@${pkg.version}\n    ${pkg.description || 'No description'}\n    Commands: ${Object.keys(pkg.bin || {}).join(', ')}\n    Run with: npx ${pkg.name}\n  `;\n  console.log(customFormat);\n});\n```\n\n## API\n\n### `npxFinder(scope: string, options?: NpxFinderOptions): Promise\u003cNPMPackage[]\u003e`\n\nThe main function for finding executable packages in a scope.\n\n#### Parameters\n\n- `scope`: The npm scope to search in (e.g., '@your-scope')\n- `options`: Optional configuration\n  - `timeout`: Request timeout in milliseconds (default: 10000)\n  - `retries`: Number of retries for failed requests (default: 3)\n  - `retryDelay`: Delay between retries in milliseconds (default: 1000)\n\n#### Returns\n\nArray of `NPMPackage` objects with the following structure:\n\n```typescript\ninterface NPMPackage {\n  name: string;               // Package name\n  description?: string;       // Package description\n  version: string;           // Latest version\n  bin?: Record\u003cstring, string\u003e; // Executable commands\n  dependencies?: Record\u003cstring, string\u003e; // Dependencies\n  scripts?: Record\u003cstring, string\u003e; // npm scripts\n  keywords?: string[];       // Package keywords\n  links?: {                  // Related links\n    npm?: string;           // npm package page\n    repository?: string;    // Code repository\n    homepage?: string;      // Homepage\n  };\n  original?: PackageInfo;    // Complete original package data from npm registry\n}\n```\n\n\u003e **Type Definitions**: The `NPMPackage` interface and all other type definitions are derived from the [official npm Registry API documentation](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md).\n\n### Exported Types\n\nThe library exports all types for maximum flexibility:\n\n```typescript\nimport { \n  NPMPackage,           // Main package result type\n  NpxFinderOptions,     // Options for the npxFinder function\n  SearchResponse,       // Raw response from npm registry search\n  PackageInfo          // Detailed package information from npm registry\n} from 'npx-scope-finder';\n```\n\nThis allows developers to easily extend the library or implement custom type-safe handling of the returned data.\n\n\u003e **Note**: The type definitions in this library are based on the official npm Registry API documentation:\n\u003e - [Package Metadata Documentation](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md)\n\u003e - [Registry API Documentation](https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md)\n\n## Example Output\n\nExample package object:\n\n```javascript\n{\n  name: '@your-scope/cli-tool',\n  version: '1.0.0',\n  description: 'A command line tool',\n  bin: {\n    'your-tool': './bin/cli.js'\n  },\n  dependencies: {\n    'commander': '^9.0.0',\n    'chalk': '^5.0.0'\n  },\n  keywords: ['cli', 'tool', 'automation'],\n  links: {\n    npm: 'https://www.npmjs.com/package/@your-scope/cli-tool',\n    repository: 'https://github.com/your-org/cli-tool',\n    homepage: 'https://your-org.github.io/cli-tool'\n  },\n  original: {\n    // Complete package data from npm registry\n    // ...\n  }\n}\n```\n\n## Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/MyPrototypeWhat/npx-scope-finder.git\ncd npx-scope-finder\n\n# Install dependencies\npnpm install\n\n# Build the project\npnpm build\n```\n\n### Testing\n\n```bash\n# Run all tests\npnpm test\n\n# Run specific test suites\npnpm test:functional  # Run functional tests\npnpm test:retry      # Run retry mechanisms tests\n```\n\n### Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'feat: add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyprototypewhat%2Fnpx-scope-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyprototypewhat%2Fnpx-scope-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyprototypewhat%2Fnpx-scope-finder/lists"}