@dereekb/dbx-cli 13.11.2 → 13.11.3
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.
- package/firebase-api-manifest/package.json +1 -1
- package/index.cjs.js +16 -0
- package/index.esm.js +16 -0
- package/manifest-extract/package.json +1 -1
- package/package.json +4 -4
- package/src/lib/api/call-model.command.factory.d.ts +1 -0
- package/src/lib/auth/auth.command.factory.d.ts +1 -0
- package/src/lib/auth/oidc.flow.d.ts +1 -0
- package/src/lib/config/paths.d.ts +1 -0
- package/src/lib/config/token.cache.d.ts +1 -0
- package/src/lib/context/cli.context.d.ts +1 -0
- package/src/lib/doctor/doctor.command.factory.d.ts +1 -0
- package/src/lib/env/env.command.factory.d.ts +1 -0
- package/src/lib/manifest/build-manifest-commands.d.ts +1 -0
- package/src/lib/middleware/auth.middleware.d.ts +1 -0
- package/src/lib/middleware/output.middleware.d.ts +1 -0
- package/src/lib/output/output.command.factory.d.ts +1 -0
- package/src/lib/runner/run.d.ts +1 -0
- package/src/lib/util/context.slot.d.ts +1 -0
- package/src/lib/util/output.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -274,6 +274,7 @@ var _errorMapper;
|
|
|
274
274
|
* @param extension - File extension to append (`json` for full responses, `ndjson` for streaming dumps).
|
|
275
275
|
* @param suffix - Optional suffix appended to the filename before the extension.
|
|
276
276
|
* @returns The absolute file path, or `undefined` when `dumpDir` is not configured.
|
|
277
|
+
* @__NO_SIDE_EFFECTS__
|
|
277
278
|
*/ function buildDumpFilePath(extension, suffix) {
|
|
278
279
|
var dumpDir = _outputOptions.dumpDir, commandPath = _outputOptions.commandPath;
|
|
279
280
|
if (!dumpDir) {
|
|
@@ -410,6 +411,7 @@ function pickFromObject(obj, fields) {
|
|
|
410
411
|
*
|
|
411
412
|
* @param error - The thrown value to convert.
|
|
412
413
|
* @returns The structured {@link CliErrorOutput}.
|
|
414
|
+
* @__NO_SIDE_EFFECTS__
|
|
413
415
|
*/ function buildErrorOutput(error) {
|
|
414
416
|
if (_errorMapper) {
|
|
415
417
|
var mapped = _errorMapper(error);
|
|
@@ -671,6 +673,7 @@ function trimSlash$1(url) {
|
|
|
671
673
|
* @param input - Optional slot configuration.
|
|
672
674
|
* @param input.notInitializedMessage - Custom error message thrown by `require()` when the slot is unset.
|
|
673
675
|
* @returns A new {@link ContextSlot} for type `T`.
|
|
676
|
+
* @__NO_SIDE_EFFECTS__
|
|
674
677
|
*/ function createContextSlot(input) {
|
|
675
678
|
var _ref;
|
|
676
679
|
var _value;
|
|
@@ -715,6 +718,7 @@ var getCliContext = _cliContextSlot.get;
|
|
|
715
718
|
* @param input.env - The resolved {@link CliEnvConfig} for the active env.
|
|
716
719
|
* @param input.accessToken - The Bearer access token to include on outgoing API calls.
|
|
717
720
|
* @returns The constructed {@link CliContext}.
|
|
721
|
+
* @__NO_SIDE_EFFECTS__
|
|
718
722
|
*/ function createCliContext(input) {
|
|
719
723
|
return {
|
|
720
724
|
cliName: input.cliName,
|
|
@@ -914,6 +918,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
914
918
|
*
|
|
915
919
|
* @param spec - The command spec describing the yargs command surface plus how to map argv into the typed call params and the result.
|
|
916
920
|
* @returns A yargs `CommandModule` whose handler runs the spec against the active CLI context.
|
|
921
|
+
* @__NO_SIDE_EFFECTS__
|
|
917
922
|
*/ function createCallModelCommand(spec) {
|
|
918
923
|
return {
|
|
919
924
|
command: spec.command,
|
|
@@ -1788,6 +1793,7 @@ function nonEmpty(value) {
|
|
|
1788
1793
|
* @param config.cliName - The CLI's binary name; the default config dir is `~/.<cliName>`.
|
|
1789
1794
|
* @param config.configDirOverride - Optional override that replaces the default config directory verbatim (used by tests).
|
|
1790
1795
|
* @returns The {@link CliPaths} pointing at `configDir`, the config file, and the token cache file.
|
|
1796
|
+
* @__NO_SIDE_EFFECTS__
|
|
1791
1797
|
*/ function buildCliPaths(config) {
|
|
1792
1798
|
var _config_configDirOverride;
|
|
1793
1799
|
var configDir = (_config_configDirOverride = config.configDirOverride) !== null && _config_configDirOverride !== void 0 ? _config_configDirOverride : node_path.join(node_os.homedir(), ".".concat(config.cliName));
|
|
@@ -1807,6 +1813,7 @@ function nonEmpty(value) {
|
|
|
1807
1813
|
* @param input - The cache store inputs.
|
|
1808
1814
|
* @param input.tokenCachePath - Absolute path to the JSON file backing the cache.
|
|
1809
1815
|
* @returns A {@link CliTokenCacheStore} keyed by env name.
|
|
1816
|
+
* @__NO_SIDE_EFFECTS__
|
|
1810
1817
|
*/ function createCliTokenCacheStore(input) {
|
|
1811
1818
|
return nestjs.createMemoizedJsonFileAsyncKeyedValueCache({
|
|
1812
1819
|
filePath: input.tokenCachePath
|
|
@@ -2534,6 +2541,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
2534
2541
|
* @param input.state - The opaque OAuth state token used for CSRF protection.
|
|
2535
2542
|
* @param input.codeChallenge - The PKCE code challenge derived from the verifier.
|
|
2536
2543
|
* @returns The full authorization URL with all OAuth params merged in.
|
|
2544
|
+
* @__NO_SIDE_EFFECTS__
|
|
2537
2545
|
*/ function buildAuthorizationUrl(input) {
|
|
2538
2546
|
var _input_scopes;
|
|
2539
2547
|
var authParams = {
|
|
@@ -3066,6 +3074,7 @@ function maskEnv$1(env) {
|
|
|
3066
3074
|
* @param input.envVarName - Override for the env-name env var. Defaults to `<CLINAME>_ENV` (e.g. `DEMO_CLI_ENV`).
|
|
3067
3075
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
3068
3076
|
* @returns A yargs `CommandModule` exposing the full `auth` subcommand surface.
|
|
3077
|
+
* @__NO_SIDE_EFFECTS__
|
|
3069
3078
|
*/ function createAuthCommand(input) {
|
|
3070
3079
|
var _input_envVarName;
|
|
3071
3080
|
var cliName = input.cliName;
|
|
@@ -4413,6 +4422,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
4413
4422
|
* @param input.checks - Additional checks to append after the default check list.
|
|
4414
4423
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
4415
4424
|
* @returns A yargs `CommandModule` exposing the `doctor` command.
|
|
4425
|
+
* @__NO_SIDE_EFFECTS__
|
|
4416
4426
|
*/ function createDoctorCommand(input) {
|
|
4417
4427
|
var _input_checks;
|
|
4418
4428
|
var cliName = input.cliName;
|
|
@@ -4851,6 +4861,7 @@ function resolveEnvWithDefault(input) {
|
|
|
4851
4861
|
* @param input.cliName - The CLI's binary name.
|
|
4852
4862
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
4853
4863
|
* @returns A yargs `CommandModule` exposing the full `env` subcommand surface.
|
|
4864
|
+
* @__NO_SIDE_EFFECTS__
|
|
4854
4865
|
*/ function createEnvCommand(input) {
|
|
4855
4866
|
var paths = buildCliPaths({
|
|
4856
4867
|
cliName: input.cliName
|
|
@@ -5466,6 +5477,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
5466
5477
|
* @param input.skipCommands - Top-level command names that bypass authentication entirely.
|
|
5467
5478
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
5468
5479
|
* @returns A yargs middleware function suitable for `.middleware([..., true])`.
|
|
5480
|
+
* @__NO_SIDE_EFFECTS__
|
|
5469
5481
|
*/ function createAuthMiddleware(input) {
|
|
5470
5482
|
var paths = buildCliPaths({
|
|
5471
5483
|
cliName: input.cliName
|
|
@@ -5784,6 +5796,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5784
5796
|
* @param input.loadOutputConfig - Optional override for how the output config is read.
|
|
5785
5797
|
* @param input.saveCommandOutputConfig - Optional override for how a per-command output config is persisted.
|
|
5786
5798
|
* @returns A yargs middleware function suitable for `.middleware([..., true])`.
|
|
5799
|
+
* @__NO_SIDE_EFFECTS__
|
|
5787
5800
|
*/ function createOutputMiddleware(input) {
|
|
5788
5801
|
var _input_loadOutputConfig, _input_saveCommandOutputConfig;
|
|
5789
5802
|
var paths = buildCliPaths({
|
|
@@ -6343,6 +6356,7 @@ function resolveCallbacks(input) {
|
|
|
6343
6356
|
* @param input.mergeOutputConfig - Optional override for persisting partial output-config updates.
|
|
6344
6357
|
* @param input.clearOutputConfig - Optional override for clearing the persisted output config entirely.
|
|
6345
6358
|
* @returns A yargs `CommandModule` exposing the full `output` subcommand surface.
|
|
6359
|
+
* @__NO_SIDE_EFFECTS__
|
|
6346
6360
|
*/ function createOutputCommand(input) {
|
|
6347
6361
|
var callbacks = resolveCallbacks(input);
|
|
6348
6362
|
var setCommand = {
|
|
@@ -6704,6 +6718,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
6704
6718
|
* @param input.argv - Argv to parse. Defaults to `hideBin(process.argv)`.
|
|
6705
6719
|
* @param input.disableCallPassthrough - When `true`, omits the built-in `call` passthrough.
|
|
6706
6720
|
* @returns The configured yargs `Argv` ready to be `.parse()`-d.
|
|
6721
|
+
* @__NO_SIDE_EFFECTS__
|
|
6707
6722
|
*/ function createCli(input) {
|
|
6708
6723
|
var _input_configCommands, _input_apiCommands, _input_argv;
|
|
6709
6724
|
var cliName = input.cliName;
|
|
@@ -7133,6 +7148,7 @@ var DATA_HELP_FLAG = '--data-help';
|
|
|
7133
7148
|
* @param options - Optional overrides; see {@link BuildManifestCommandsOptions}.
|
|
7134
7149
|
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`. Empty
|
|
7135
7150
|
* when the manifest has no callable entries.
|
|
7151
|
+
* @__NO_SIDE_EFFECTS__
|
|
7136
7152
|
*/ function buildManifestCommands(manifest, options) {
|
|
7137
7153
|
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
|
7138
7154
|
var callable = manifest.filter(function(e) {
|
package/index.esm.js
CHANGED
|
@@ -272,6 +272,7 @@ var _errorMapper;
|
|
|
272
272
|
* @param extension - File extension to append (`json` for full responses, `ndjson` for streaming dumps).
|
|
273
273
|
* @param suffix - Optional suffix appended to the filename before the extension.
|
|
274
274
|
* @returns The absolute file path, or `undefined` when `dumpDir` is not configured.
|
|
275
|
+
* @__NO_SIDE_EFFECTS__
|
|
275
276
|
*/ function buildDumpFilePath(extension, suffix) {
|
|
276
277
|
var dumpDir = _outputOptions.dumpDir, commandPath = _outputOptions.commandPath;
|
|
277
278
|
if (!dumpDir) {
|
|
@@ -408,6 +409,7 @@ function pickFromObject(obj, fields) {
|
|
|
408
409
|
*
|
|
409
410
|
* @param error - The thrown value to convert.
|
|
410
411
|
* @returns The structured {@link CliErrorOutput}.
|
|
412
|
+
* @__NO_SIDE_EFFECTS__
|
|
411
413
|
*/ function buildErrorOutput(error) {
|
|
412
414
|
if (_errorMapper) {
|
|
413
415
|
var mapped = _errorMapper(error);
|
|
@@ -669,6 +671,7 @@ function trimSlash$1(url) {
|
|
|
669
671
|
* @param input - Optional slot configuration.
|
|
670
672
|
* @param input.notInitializedMessage - Custom error message thrown by `require()` when the slot is unset.
|
|
671
673
|
* @returns A new {@link ContextSlot} for type `T`.
|
|
674
|
+
* @__NO_SIDE_EFFECTS__
|
|
672
675
|
*/ function createContextSlot(input) {
|
|
673
676
|
var _ref;
|
|
674
677
|
var _value;
|
|
@@ -713,6 +716,7 @@ var getCliContext = _cliContextSlot.get;
|
|
|
713
716
|
* @param input.env - The resolved {@link CliEnvConfig} for the active env.
|
|
714
717
|
* @param input.accessToken - The Bearer access token to include on outgoing API calls.
|
|
715
718
|
* @returns The constructed {@link CliContext}.
|
|
719
|
+
* @__NO_SIDE_EFFECTS__
|
|
716
720
|
*/ function createCliContext(input) {
|
|
717
721
|
return {
|
|
718
722
|
cliName: input.cliName,
|
|
@@ -912,6 +916,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
912
916
|
*
|
|
913
917
|
* @param spec - The command spec describing the yargs command surface plus how to map argv into the typed call params and the result.
|
|
914
918
|
* @returns A yargs `CommandModule` whose handler runs the spec against the active CLI context.
|
|
919
|
+
* @__NO_SIDE_EFFECTS__
|
|
915
920
|
*/ function createCallModelCommand(spec) {
|
|
916
921
|
return {
|
|
917
922
|
command: spec.command,
|
|
@@ -1786,6 +1791,7 @@ function nonEmpty(value) {
|
|
|
1786
1791
|
* @param config.cliName - The CLI's binary name; the default config dir is `~/.<cliName>`.
|
|
1787
1792
|
* @param config.configDirOverride - Optional override that replaces the default config directory verbatim (used by tests).
|
|
1788
1793
|
* @returns The {@link CliPaths} pointing at `configDir`, the config file, and the token cache file.
|
|
1794
|
+
* @__NO_SIDE_EFFECTS__
|
|
1789
1795
|
*/ function buildCliPaths(config) {
|
|
1790
1796
|
var _config_configDirOverride;
|
|
1791
1797
|
var configDir = (_config_configDirOverride = config.configDirOverride) !== null && _config_configDirOverride !== void 0 ? _config_configDirOverride : join(homedir(), ".".concat(config.cliName));
|
|
@@ -1805,6 +1811,7 @@ function nonEmpty(value) {
|
|
|
1805
1811
|
* @param input - The cache store inputs.
|
|
1806
1812
|
* @param input.tokenCachePath - Absolute path to the JSON file backing the cache.
|
|
1807
1813
|
* @returns A {@link CliTokenCacheStore} keyed by env name.
|
|
1814
|
+
* @__NO_SIDE_EFFECTS__
|
|
1808
1815
|
*/ function createCliTokenCacheStore(input) {
|
|
1809
1816
|
return createMemoizedJsonFileAsyncKeyedValueCache({
|
|
1810
1817
|
filePath: input.tokenCachePath
|
|
@@ -2532,6 +2539,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
2532
2539
|
* @param input.state - The opaque OAuth state token used for CSRF protection.
|
|
2533
2540
|
* @param input.codeChallenge - The PKCE code challenge derived from the verifier.
|
|
2534
2541
|
* @returns The full authorization URL with all OAuth params merged in.
|
|
2542
|
+
* @__NO_SIDE_EFFECTS__
|
|
2535
2543
|
*/ function buildAuthorizationUrl(input) {
|
|
2536
2544
|
var _input_scopes;
|
|
2537
2545
|
var authParams = {
|
|
@@ -3064,6 +3072,7 @@ function maskEnv$1(env) {
|
|
|
3064
3072
|
* @param input.envVarName - Override for the env-name env var. Defaults to `<CLINAME>_ENV` (e.g. `DEMO_CLI_ENV`).
|
|
3065
3073
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
3066
3074
|
* @returns A yargs `CommandModule` exposing the full `auth` subcommand surface.
|
|
3075
|
+
* @__NO_SIDE_EFFECTS__
|
|
3067
3076
|
*/ function createAuthCommand(input) {
|
|
3068
3077
|
var _input_envVarName;
|
|
3069
3078
|
var cliName = input.cliName;
|
|
@@ -4411,6 +4420,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
4411
4420
|
* @param input.checks - Additional checks to append after the default check list.
|
|
4412
4421
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
4413
4422
|
* @returns A yargs `CommandModule` exposing the `doctor` command.
|
|
4423
|
+
* @__NO_SIDE_EFFECTS__
|
|
4414
4424
|
*/ function createDoctorCommand(input) {
|
|
4415
4425
|
var _input_checks;
|
|
4416
4426
|
var cliName = input.cliName;
|
|
@@ -4849,6 +4859,7 @@ function resolveEnvWithDefault(input) {
|
|
|
4849
4859
|
* @param input.cliName - The CLI's binary name.
|
|
4850
4860
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
4851
4861
|
* @returns A yargs `CommandModule` exposing the full `env` subcommand surface.
|
|
4862
|
+
* @__NO_SIDE_EFFECTS__
|
|
4852
4863
|
*/ function createEnvCommand(input) {
|
|
4853
4864
|
var paths = buildCliPaths({
|
|
4854
4865
|
cliName: input.cliName
|
|
@@ -5464,6 +5475,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
5464
5475
|
* @param input.skipCommands - Top-level command names that bypass authentication entirely.
|
|
5465
5476
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
5466
5477
|
* @returns A yargs middleware function suitable for `.middleware([..., true])`.
|
|
5478
|
+
* @__NO_SIDE_EFFECTS__
|
|
5467
5479
|
*/ function createAuthMiddleware(input) {
|
|
5468
5480
|
var paths = buildCliPaths({
|
|
5469
5481
|
cliName: input.cliName
|
|
@@ -5782,6 +5794,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5782
5794
|
* @param input.loadOutputConfig - Optional override for how the output config is read.
|
|
5783
5795
|
* @param input.saveCommandOutputConfig - Optional override for how a per-command output config is persisted.
|
|
5784
5796
|
* @returns A yargs middleware function suitable for `.middleware([..., true])`.
|
|
5797
|
+
* @__NO_SIDE_EFFECTS__
|
|
5785
5798
|
*/ function createOutputMiddleware(input) {
|
|
5786
5799
|
var _input_loadOutputConfig, _input_saveCommandOutputConfig;
|
|
5787
5800
|
var paths = buildCliPaths({
|
|
@@ -6341,6 +6354,7 @@ function resolveCallbacks(input) {
|
|
|
6341
6354
|
* @param input.mergeOutputConfig - Optional override for persisting partial output-config updates.
|
|
6342
6355
|
* @param input.clearOutputConfig - Optional override for clearing the persisted output config entirely.
|
|
6343
6356
|
* @returns A yargs `CommandModule` exposing the full `output` subcommand surface.
|
|
6357
|
+
* @__NO_SIDE_EFFECTS__
|
|
6344
6358
|
*/ function createOutputCommand(input) {
|
|
6345
6359
|
var callbacks = resolveCallbacks(input);
|
|
6346
6360
|
var setCommand = {
|
|
@@ -6702,6 +6716,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
6702
6716
|
* @param input.argv - Argv to parse. Defaults to `hideBin(process.argv)`.
|
|
6703
6717
|
* @param input.disableCallPassthrough - When `true`, omits the built-in `call` passthrough.
|
|
6704
6718
|
* @returns The configured yargs `Argv` ready to be `.parse()`-d.
|
|
6719
|
+
* @__NO_SIDE_EFFECTS__
|
|
6705
6720
|
*/ function createCli(input) {
|
|
6706
6721
|
var _input_configCommands, _input_apiCommands, _input_argv;
|
|
6707
6722
|
var cliName = input.cliName;
|
|
@@ -7131,6 +7146,7 @@ var DATA_HELP_FLAG = '--data-help';
|
|
|
7131
7146
|
* @param options - Optional overrides; see {@link BuildManifestCommandsOptions}.
|
|
7132
7147
|
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`. Empty
|
|
7133
7148
|
* when the manifest has no callable entries.
|
|
7149
|
+
* @__NO_SIDE_EFFECTS__
|
|
7134
7150
|
*/ function buildManifestCommands(manifest, options) {
|
|
7135
7151
|
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
|
7136
7152
|
var callable = manifest.filter(function(e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-cli",
|
|
3
|
-
"version": "13.11.
|
|
3
|
+
"version": "13.11.3",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"bin": {
|
|
6
6
|
"dbx-cli-generate-firebase-api-manifest": "firebase-api-manifest/main.js"
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@dereekb/firebase": "13.11.
|
|
28
|
-
"@dereekb/nestjs": "13.11.
|
|
29
|
-
"@dereekb/util": "13.11.
|
|
27
|
+
"@dereekb/firebase": "13.11.3",
|
|
28
|
+
"@dereekb/nestjs": "13.11.3",
|
|
29
|
+
"@dereekb/util": "13.11.3",
|
|
30
30
|
"arktype": "^2.2.0",
|
|
31
31
|
"yargs": "^18.0.0"
|
|
32
32
|
},
|
|
@@ -38,5 +38,6 @@ export interface CallModelCommandSpec<TParams = unknown, TResult = unknown> {
|
|
|
38
38
|
*
|
|
39
39
|
* @param spec - The command spec describing the yargs command surface plus how to map argv into the typed call params and the result.
|
|
40
40
|
* @returns A yargs `CommandModule` whose handler runs the spec against the active CLI context.
|
|
41
|
+
* @__NO_SIDE_EFFECTS__
|
|
41
42
|
*/
|
|
42
43
|
export declare function createCallModelCommand<TParams = unknown, TResult = unknown>(spec: CallModelCommandSpec<TParams, TResult>): CommandModule;
|
|
@@ -25,5 +25,6 @@ export interface CreateAuthCommandInput {
|
|
|
25
25
|
* @param input.envVarName - Override for the env-name env var. Defaults to `<CLINAME>_ENV` (e.g. `DEMO_CLI_ENV`).
|
|
26
26
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
27
27
|
* @returns A yargs `CommandModule` exposing the full `auth` subcommand surface.
|
|
28
|
+
* @__NO_SIDE_EFFECTS__
|
|
28
29
|
*/
|
|
29
30
|
export declare function createAuthCommand(input: CreateAuthCommandInput): CommandModule;
|
|
@@ -40,6 +40,7 @@ export interface BuildAuthorizationUrlInput {
|
|
|
40
40
|
* @param input.state - The opaque OAuth state token used for CSRF protection.
|
|
41
41
|
* @param input.codeChallenge - The PKCE code challenge derived from the verifier.
|
|
42
42
|
* @returns The full authorization URL with all OAuth params merged in.
|
|
43
|
+
* @__NO_SIDE_EFFECTS__
|
|
43
44
|
*/
|
|
44
45
|
export declare function buildAuthorizationUrl(input: BuildAuthorizationUrlInput): string;
|
|
45
46
|
export interface PkceMaterial {
|
|
@@ -29,5 +29,6 @@ export interface CliPathsConfig {
|
|
|
29
29
|
* @param config.cliName - The CLI's binary name; the default config dir is `~/.<cliName>`.
|
|
30
30
|
* @param config.configDirOverride - Optional override that replaces the default config directory verbatim (used by tests).
|
|
31
31
|
* @returns The {@link CliPaths} pointing at `configDir`, the config file, and the token cache file.
|
|
32
|
+
* @__NO_SIDE_EFFECTS__
|
|
32
33
|
*/
|
|
33
34
|
export declare function buildCliPaths(config: CliPathsConfig): CliPaths;
|
|
@@ -36,6 +36,7 @@ export interface CreateCliTokenCacheStoreInput {
|
|
|
36
36
|
* @param input - The cache store inputs.
|
|
37
37
|
* @param input.tokenCachePath - Absolute path to the JSON file backing the cache.
|
|
38
38
|
* @returns A {@link CliTokenCacheStore} keyed by env name.
|
|
39
|
+
* @__NO_SIDE_EFFECTS__
|
|
39
40
|
*/
|
|
40
41
|
export declare function createCliTokenCacheStore(input: CreateCliTokenCacheStoreInput): CliTokenCacheStore;
|
|
41
42
|
/**
|
|
@@ -37,5 +37,6 @@ export interface CreateCliContextInput {
|
|
|
37
37
|
* @param input.env - The resolved {@link CliEnvConfig} for the active env.
|
|
38
38
|
* @param input.accessToken - The Bearer access token to include on outgoing API calls.
|
|
39
39
|
* @returns The constructed {@link CliContext}.
|
|
40
|
+
* @__NO_SIDE_EFFECTS__
|
|
40
41
|
*/
|
|
41
42
|
export declare function createCliContext(input: CreateCliContextInput): CliContext;
|
|
@@ -44,5 +44,6 @@ export interface CreateDoctorCommandInput {
|
|
|
44
44
|
* @param input.checks - Additional checks to append after the default check list.
|
|
45
45
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
46
46
|
* @returns A yargs `CommandModule` exposing the `doctor` command.
|
|
47
|
+
* @__NO_SIDE_EFFECTS__
|
|
47
48
|
*/
|
|
48
49
|
export declare function createDoctorCommand(input: CreateDoctorCommandInput): CommandModule;
|
|
@@ -18,5 +18,6 @@ export interface CreateEnvCommandInput {
|
|
|
18
18
|
* @param input.cliName - The CLI's binary name.
|
|
19
19
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
20
20
|
* @returns A yargs `CommandModule` exposing the full `env` subcommand surface.
|
|
21
|
+
* @__NO_SIDE_EFFECTS__
|
|
21
22
|
*/
|
|
22
23
|
export declare function createEnvCommand(input: CreateEnvCommandInput): CommandModule;
|
|
@@ -103,6 +103,7 @@ export declare const DEFAULT_MANIFEST_MODEL_COMMAND_NAME = "model";
|
|
|
103
103
|
* @param options - Optional overrides; see {@link BuildManifestCommandsOptions}.
|
|
104
104
|
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`. Empty
|
|
105
105
|
* when the manifest has no callable entries.
|
|
106
|
+
* @__NO_SIDE_EFFECTS__
|
|
106
107
|
*/
|
|
107
108
|
export declare function buildManifestCommands(manifest: CliApiManifest, options?: BuildManifestCommandsOptions): CommandModule[];
|
|
108
109
|
/**
|
|
@@ -25,5 +25,6 @@ export interface CreateAuthMiddlewareInput {
|
|
|
25
25
|
* @param input.skipCommands - Top-level command names that bypass authentication entirely.
|
|
26
26
|
* @param input.defaultEnvs - Built-in env presets merged underneath the user's stored env when names match.
|
|
27
27
|
* @returns A yargs middleware function suitable for `.middleware([..., true])`.
|
|
28
|
+
* @__NO_SIDE_EFFECTS__
|
|
28
29
|
*/
|
|
29
30
|
export declare function createAuthMiddleware(input: CreateAuthMiddlewareInput): MiddlewareFunction;
|
|
@@ -50,5 +50,6 @@ export interface CreateOutputMiddlewareInput {
|
|
|
50
50
|
* @param input.loadOutputConfig - Optional override for how the output config is read.
|
|
51
51
|
* @param input.saveCommandOutputConfig - Optional override for how a per-command output config is persisted.
|
|
52
52
|
* @returns A yargs middleware function suitable for `.middleware([..., true])`.
|
|
53
|
+
* @__NO_SIDE_EFFECTS__
|
|
53
54
|
*/
|
|
54
55
|
export declare function createOutputMiddleware(input: CreateOutputMiddlewareInput): MiddlewareFunction;
|
|
@@ -51,5 +51,6 @@ export interface CreateOutputCommandInput {
|
|
|
51
51
|
* @param input.mergeOutputConfig - Optional override for persisting partial output-config updates.
|
|
52
52
|
* @param input.clearOutputConfig - Optional override for clearing the persisted output config entirely.
|
|
53
53
|
* @returns A yargs `CommandModule` exposing the full `output` subcommand surface.
|
|
54
|
+
* @__NO_SIDE_EFFECTS__
|
|
54
55
|
*/
|
|
55
56
|
export declare function createOutputCommand(input: CreateOutputCommandInput): CommandModule;
|
package/src/lib/runner/run.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface CreateCliInput {
|
|
|
62
62
|
* @param input.argv - Argv to parse. Defaults to `hideBin(process.argv)`.
|
|
63
63
|
* @param input.disableCallPassthrough - When `true`, omits the built-in `call` passthrough.
|
|
64
64
|
* @returns The configured yargs `Argv` ready to be `.parse()`-d.
|
|
65
|
+
* @__NO_SIDE_EFFECTS__
|
|
65
66
|
*/
|
|
66
67
|
export declare function createCli(input: CreateCliInput): Argv;
|
|
67
68
|
/**
|
|
@@ -46,5 +46,6 @@ export interface CreateContextSlotInput {
|
|
|
46
46
|
* @param input - Optional slot configuration.
|
|
47
47
|
* @param input.notInitializedMessage - Custom error message thrown by `require()` when the slot is unset.
|
|
48
48
|
* @returns A new {@link ContextSlot} for type `T`.
|
|
49
|
+
* @__NO_SIDE_EFFECTS__
|
|
49
50
|
*/
|
|
50
51
|
export declare function createContextSlot<T>(input?: CreateContextSlotInput): ContextSlot<T>;
|
package/src/lib/util/output.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export declare function dumpTimestamp(): string;
|
|
|
95
95
|
* @param extension - File extension to append (`json` for full responses, `ndjson` for streaming dumps).
|
|
96
96
|
* @param suffix - Optional suffix appended to the filename before the extension.
|
|
97
97
|
* @returns The absolute file path, or `undefined` when `dumpDir` is not configured.
|
|
98
|
+
* @__NO_SIDE_EFFECTS__
|
|
98
99
|
*/
|
|
99
100
|
export declare function buildDumpFilePath(extension: 'json' | 'ndjson', suffix?: string): Maybe<string>;
|
|
100
101
|
/**
|
|
@@ -148,5 +149,6 @@ export declare class CliError extends Error {
|
|
|
148
149
|
*
|
|
149
150
|
* @param error - The thrown value to convert.
|
|
150
151
|
* @returns The structured {@link CliErrorOutput}.
|
|
152
|
+
* @__NO_SIDE_EFFECTS__
|
|
151
153
|
*/
|
|
152
154
|
export declare function buildErrorOutput(error: unknown): CliErrorOutput;
|