@nuucognition/secrets-cli 0.0.0-stage → 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { basename, dirname, join } from 'node:path';
4
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const entrypoint = join(__dirname, '..', 'dist', 'index.js');
8
+
9
+ // The name that started this process (`secrets` or the alias `secret`).
10
+ // process.argv[1] keeps the symlink name that `ndv` links.
11
+ process.env.SECRETS_CLI_INVOKED_AS = basename(process.argv[1] ?? 'secrets');
12
+
13
+ // Production-profile launcher of a checkout (`ndv use secrets prod`): the same
14
+ // stamp check as the dev launcher; skipped in an installed package where
15
+ // cli-core is absent.
16
+ const { warnIfBuildStale } = await import('@nuucognition/cli-core/launch').catch(() => ({ warnIfBuildStale() {} }));
17
+ warnIfBuildStale({ cli: 'secrets', distEntry: entrypoint, rebuildHint: 'Run: ndv build secrets prod' });
18
+
19
+ await import(pathToFileURL(entrypoint).href);