{"_id":"@dkapexhiu/flag-orchestrator","_rev":"4-6798bb8e68f0d8dd00678b1059301b91","name":"@dkapexhiu/flag-orchestrator","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@dkapexhiu/flag-orchestrator","version":"0.1.0","keywords":["feature-flags","typescript","cli","node"],"author":{"name":"Your Name"},"license":"MIT","_id":"@dkapexhiu/flag-orchestrator@0.1.0","maintainers":[{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"}],"dist":{"shasum":"523b62840914f96b5cf3cd43c915f0cb16081c0e","tarball":"https://registry.npmjs.org/@dkapexhiu/flag-orchestrator/-/flag-orchestrator-0.1.0.tgz","fileCount":8,"integrity":"sha512-nN3ARubayQaVTMgf5M9mA9hBPDCyECvAPoZC0bOZ14yq6FjlbGj8YMKQSryHb3ig+O7+5vTE0pfNyucOJf8eUw==","signatures":[{"sig":"MEYCIQC8C1Lz42RXo0rse79tsH9wawMAyCYr64KPtt8KoAZ2tgIhAIgBp9ekJ/T88s98SNmGBIUX0OHPrpcxnpY81CY6M8iA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60711175},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"tsup --watch","docs":"typedoc","lint":"eslint . --ext ts","test":"vitest","build":"tsup","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"},"_npmVersion":"11.3.0","description":"Runtime feature flag orchestrator with code scanning and typed manifests for Node.js apps","directories":{},"_nodeVersion":"24.1.0","dependencies":{"commander":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^1.6.1","del-cli":"^7.0.0","typedoc":"^0.28.17","ts-morph":"^21.0.0","typescript":"^5.9.3","@types/node":"^20.19.33"},"peerDependencies":{"typescript":">=5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/flag-orchestrator_0.1.0_1771321192667_0.26686846633849814","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dkapexhiu/flag-orchestrator","version":"0.1.1","keywords":["feature-flags","typescript","cli","node"],"author":{"name":"Your Name"},"license":"MIT","_id":"@dkapexhiu/flag-orchestrator@0.1.1","maintainers":[{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"}],"bin":{"flag-orchestrator":"dist/cli.js"},"dist":{"shasum":"35fa2770e0509d64696191936db403a6fb15eba1","tarball":"https://registry.npmjs.org/@dkapexhiu/flag-orchestrator/-/flag-orchestrator-0.1.1.tgz","fileCount":16,"integrity":"sha512-zM7JR0jXYhAL4VGuVw4ymRhsYL7K5qCYJQcsBZQ9cZDJuFWXb8TF2KX7AkGy9HH6PbUGDnimQOwZh46jOPCeCw==","signatures":[{"sig":"MEUCIFB+GbkclSql/GO90Dy0mlkP87IiCI5ZbUzUdrqejHLZAiEA7dk8r621mu8zkT8eoU1MGgLAbTa64dLigXuu9EO60Vg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91067574},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"tsup --watch","docs":"typedoc","lint":"eslint . --ext ts","test":"vitest","build":"tsup","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"},"_npmVersion":"11.3.0","description":"Runtime feature flag orchestrator with code scanning and typed manifests for Node.js apps","directories":{},"_nodeVersion":"24.1.0","dependencies":{"commander":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^1.6.1","del-cli":"^7.0.0","typedoc":"^0.28.17","ts-morph":"^21.0.0","typescript":"^5.9.3","@types/node":"^20.19.33"},"peerDependencies":{"typescript":">=5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/flag-orchestrator_0.1.1_1771331932408_0.1379090879360787","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dkapexhiu/flag-orchestrator","version":"0.1.2","keywords":["feature-flags","typescript","cli","node"],"author":{"name":"Your Name"},"license":"MIT","_id":"@dkapexhiu/flag-orchestrator@0.1.2","maintainers":[{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"}],"bin":{"flag-orchestrator":"dist/cli.js"},"dist":{"shasum":"c5ffa68b460a3f63e0a8708438e71d7e7df325d2","tarball":"https://registry.npmjs.org/@dkapexhiu/flag-orchestrator/-/flag-orchestrator-0.1.2.tgz","fileCount":16,"integrity":"sha512-EkBKOhq2uEUq/RR3EwmF0lkG2R5awzR41sISbWmVxlC4qjeVdZ4iiAG2t+gnl8xxVftMnp1ShaMn6qDGFXNoJA==","signatures":[{"sig":"MEUCIDagmz45rv7PqUxR2cbZoTXqSDaCMDQrA6n9m/Z6rOc9AiEAjBBcn3PsXN9A0lHDXTrnXi8cyAAdEZEzVgEphKMfPqs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91067592},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"tsup --watch","docs":"typedoc","lint":"eslint . --ext ts","test":"vitest","build":"tsup","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"},"_npmVersion":"11.3.0","description":"Runtime feature flag orchestrator with code scanning and typed manifests for Node.js apps","directories":{},"_nodeVersion":"24.1.0","dependencies":{"commander":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^1.6.1","del-cli":"^7.0.0","typedoc":"^0.28.17","ts-morph":"^21.0.0","typescript":"^5.9.3","@types/node":"^20.19.33"},"peerDependencies":{"typescript":">=5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/flag-orchestrator_0.1.2_1771332293945_0.9883323641040751","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@dkapexhiu/flag-orchestrator","version":"0.1.3","description":"Runtime feature flag orchestrator with code scanning and typed manifests for Node.js apps","main":"dist/index.js","types":"dist/index.d.ts","bin":{"flag-orchestrator":"dist/cli.js"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest","lint":"eslint . --ext ts","docs":"typedoc","prepublishOnly":"npm test && npm run build"},"keywords":["feature-flags","typescript","cli","node"],"author":{"name":"Your Name"},"license":"MIT","devDependencies":{"@types/node":"^20.19.33","del-cli":"^7.0.0","ts-morph":"^21.0.0","tsup":"^8.5.1","typedoc":"^0.28.17","typescript":"^5.9.3","vitest":"^1.6.1"},"dependencies":{"commander":"^12.0.0"},"peerDependencies":{"typescript":">=5.0.0"},"publishConfig":{"access":"public"},"_id":"@dkapexhiu/flag-orchestrator@0.1.3","_nodeVersion":"24.1.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-vCJLKhSYpGKmfNtUhKZvDBeTrmAcFH9lPIqNxBbIOdIYpc0KHJdrEbyFQ7Fk7sXN39FLx7N7HkuhlkKFYsM7NA==","shasum":"138704ba425d9861e16c4a555c0607c009ac7992","tarball":"https://registry.npmjs.org/@dkapexhiu/flag-orchestrator/-/flag-orchestrator-0.1.3.tgz","fileCount":16,"unpackedSize":91067574,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHXyREKydOY34+uH8clCtlAfbCTqWWzzzCuguiMN6ZiDAiEA2XV4JLUE0LZPD/MelF5UV9yMWqv0kTmVOKcCg1yGCxg="}]},"_npmUser":{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"},"directories":{},"maintainers":[{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/flag-orchestrator_0.1.3_1771332652386_0.6493290957648588"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-17T09:39:52.596Z","modified":"2026-02-17T12:50:53.002Z","0.1.0":"2026-02-17T09:39:53.235Z","0.1.1":"2026-02-17T12:38:52.931Z","0.1.2":"2026-02-17T12:44:54.506Z","0.1.3":"2026-02-17T12:50:52.885Z"},"author":{"name":"Your Name"},"license":"MIT","keywords":["feature-flags","typescript","cli","node"],"description":"Runtime feature flag orchestrator with code scanning and typed manifests for Node.js apps","maintainers":[{"name":"dkapexhiu","email":"daniel.kapexhiu@gmail.com"}],"readme":"# @dkapexhiu/flag-orchestrator\r\n\r\nRuntime feature flag orchestrator with code scanning and typed manifests for Node.js apps.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm i @dkapexhiu/flag-orchestrator\r\n```\r\n\r\n## CLI Commands\r\n\r\n### scan - Scan codebase for feature flags\r\n\r\nScans your TypeScript codebase for feature flag usages and outputs a manifest.\r\n\r\n```bash\r\n# Scan default 'src' directory\r\nnpx flag-orchestrator scan\r\n\r\n# Scan multiple directories\r\nnpx flag-orchestrator scan src lib utils\r\n\r\n# Scan specific directory\r\nnpx flag-orchestrator scan ./src/features\r\n```\r\n\r\n**Output:** JSON manifest with all detected flags, their types, and locations:\r\n\r\n```json\r\n{\r\n  \"newCheckoutFlow\": {\r\n    \"type\": \"boolean\",\r\n    \"locations\": [\r\n      \"src/routes.ts:3\"\r\n    ]\r\n  },\r\n  \"pricingExperiment\": {\r\n    \"type\": \"boolean\",\r\n    \"locations\": [\r\n      \"src/routes.ts:4\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n**Detected Patterns:**\r\n- `useFlag(\"flagName\")`\r\n- `flag(\"flagName\")`\r\n\r\n### generate - Generate TypeScript types from manifest\r\n\r\nGenerates TypeScript type definitions from a flag manifest.\r\n\r\n```bash\r\nnpx flag-orchestrator generate\r\n```\r\n\r\n**Output:** Creates `flags.generated.ts` with typed flag definitions.\r\n\r\n## Usage\r\n\r\n### Runtime Flag Client\r\n\r\n```ts\r\nimport { createFlagClient, type FlagsManifest, type Provider } from '@dkapexhiu/flag-orchestrator';\r\n\r\n// Define your flag manifest\r\nconst manifest: FlagsManifest = {\r\n  newFeature: {\r\n    type: 'boolean',\r\n    default: false,\r\n    locations: ['src/home.ts:10']\r\n  },\r\n  premiumTier: {\r\n    type: 'string',\r\n    default: 'basic',\r\n    locations: ['src/pricing.ts:15']\r\n  }\r\n};\r\n\r\n// Create a flag client with providers\r\nconst flagClient = createFlagClient({\r\n  manifest,\r\n  providers: [\r\n    envProvider(),  // Check environment variables\r\n    // Add more providers as needed\r\n  ]\r\n});\r\n\r\n// Use flags in your code\r\nconst isPremium = await flagClient.get('premiumTier');\r\n```\r\n\r\n#### Built-in Providers\r\n\r\n**envProvider()** - Reads flags from environment variables with `FLAG_` prefix\r\n\r\n```ts\r\nimport { envProvider } from '@dkapexhiu/flag-orchestrator';\r\n\r\n// Environment: FLAG_MY_FLAG=true\r\nconst provider = envProvider();\r\nconst value = await provider.get('MY_FLAG');  // true\r\n```\r\n\r\n### Scanning Code\r\n\r\n```ts\r\nimport { scanFlags } from '@dkapexhiu/flag-orchestrator';\r\n\r\n// Scan source directories\r\nconst manifest = scanFlags(['src', 'lib']);\r\nconsole.log(manifest);\r\n```\r\n\r\n### Generating Types\r\n\r\n```ts\r\nimport { generateTypes, type FlagsManifest } from '@dkapexhiu/flag-orchestrator';\r\n\r\nconst manifest: FlagsManifest = {\r\n  // ... your flags\r\n};\r\n\r\ngenerateTypes(manifest, './flags.generated.ts');\r\n```\r\n\r\n## API Documentation\r\n\r\nFor complete API documentation, see [docs/index.html](./docs/index.html) or generate it with:\r\n\r\n```bash\r\nnpm run docs\r\n```\r\n\r\n## NPM Scripts\r\n\r\n| Script | Description |\r\n|--------|-------------|\r\n| `npm run build` | Build production distribution files |\r\n| `npm run dev` | Watch mode build (for development) |\r\n| `npm test` | Run test suite |\r\n| `npm run lint` | Run ESLint checks |\r\n| `npm run docs` | Generate TypeDoc API documentation |\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}