@dereekb/dbx-cli 13.11.0 → 13.11.2
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/main.js +711 -0
- package/firebase-api-manifest/package.json +10 -0
- package/index.cjs.js +242 -54
- package/index.esm.js +240 -55
- package/manifest-extract/LICENSE +21 -0
- package/manifest-extract/index.cjs.default.js +1 -0
- package/manifest-extract/index.cjs.js +459 -0
- package/manifest-extract/index.cjs.mjs +2 -0
- package/manifest-extract/index.d.ts +1 -0
- package/manifest-extract/index.esm.js +457 -0
- package/manifest-extract/package.json +20 -0
- package/manifest-extract/src/index.d.ts +2 -0
- package/manifest-extract/src/lib/extract-crud.d.ts +36 -0
- package/manifest-extract/src/lib/types.d.ts +86 -0
- package/package.json +22 -10
- package/src/lib/config/env.d.ts +1 -1
- package/src/lib/manifest/build-manifest-commands.d.ts +58 -3
- package/src/lib/manifest/types.d.ts +20 -0
- package/src/lib/runner/run.d.ts +3 -0
- package/firebase-api-manifest/src/generate-api-manifest/bind-validators.d.ts +0 -44
- package/firebase-api-manifest/src/generate-api-manifest/emit.d.ts +0 -29
- package/firebase-api-manifest/src/generate-api-manifest/extract-crud.d.ts +0 -25
- package/firebase-api-manifest/src/generate-api-manifest/find-api-files.d.ts +0 -16
- package/firebase-api-manifest/src/generate-api-manifest/main.d.ts +0 -46
- package/firebase-api-manifest/src/generate-api-manifest/parse-functions.d.ts +0 -18
- package/firebase-api-manifest/src/generate-api-manifest/resolve-package.d.ts +0 -59
- package/firebase-api-manifest/src/generate-api-manifest/types.d.ts +0 -44
package/index.esm.js
CHANGED
|
@@ -1658,7 +1658,7 @@ function mergeOutputCommandsConfig(existing, updates) {
|
|
|
1658
1658
|
* The `model.*` write scopes filtered out by {@link filterReadOnlyModelScopes}.
|
|
1659
1659
|
*
|
|
1660
1660
|
* Mirrors the write half of the dbx-components callModel CRUD scope set
|
|
1661
|
-
* (`CALL_MODEL_OIDC_SCOPES` in `@dereekb/firebase
|
|
1661
|
+
* (`CALL_MODEL_OIDC_SCOPES` in `@dereekb/firebase`) — duplicated here so the
|
|
1662
1662
|
* CLI doesn't take a server-side dependency just to know the names.
|
|
1663
1663
|
*/ var MODEL_WRITE_OIDC_SCOPES = [
|
|
1664
1664
|
'model.create',
|
|
@@ -7091,6 +7091,15 @@ var SKIPPED_VERBS = new Set([
|
|
|
7091
7091
|
'standalone'
|
|
7092
7092
|
]);
|
|
7093
7093
|
var ALL_HELP_FLAG = '--all-help';
|
|
7094
|
+
var HELP_MODE_FLAG = '--help-mode';
|
|
7095
|
+
/**
|
|
7096
|
+
* Default help mode when no override is supplied.
|
|
7097
|
+
*/ var DEFAULT_MANIFEST_HELP_MODE = 'both';
|
|
7098
|
+
var MANIFEST_HELP_MODES = new Set([
|
|
7099
|
+
'action',
|
|
7100
|
+
'params',
|
|
7101
|
+
'both'
|
|
7102
|
+
]);
|
|
7094
7103
|
/**
|
|
7095
7104
|
* Default schema format when no override is supplied.
|
|
7096
7105
|
*/ var DEFAULT_MANIFEST_HELP_DATA_FORMAT = 'jsonschema';
|
|
@@ -7100,20 +7109,30 @@ var MANIFEST_HELP_DATA_FORMATS = new Set([
|
|
|
7100
7109
|
'both'
|
|
7101
7110
|
]);
|
|
7102
7111
|
var DATA_HELP_FLAG = '--data-help';
|
|
7112
|
+
/**
|
|
7113
|
+
* Default name of the parent command that groups all per-model manifest commands.
|
|
7114
|
+
* Surfaces as `<cli> model <model> <action>` so the top-level `--help` stays focused
|
|
7115
|
+
* on first-class commands instead of dumping every model.
|
|
7116
|
+
*/ var DEFAULT_MANIFEST_MODEL_COMMAND_NAME = 'model';
|
|
7103
7117
|
/**
|
|
7104
7118
|
* Builds yargs `CommandModule[]` from a generated {@link CliApiManifest}.
|
|
7105
7119
|
*
|
|
7106
|
-
*
|
|
7107
|
-
*
|
|
7120
|
+
* Returns a single parent command (default name `model`) whose subcommands are the per-model
|
|
7121
|
+
* dispatch commands. Each per-model subcommand has one child action per entry
|
|
7122
|
+
* (named `<verb>` or `<verb>-<specifier>`). Each leaf accepts `--data <json>`, validates the
|
|
7108
7123
|
* payload against the entry's bound arktype validator (when present), and dispatches via the
|
|
7109
7124
|
* authenticated CLI context's `callModel` helper. Standalone entries are skipped because they
|
|
7110
7125
|
* are not dispatched through the `/model/call` endpoint.
|
|
7111
7126
|
*
|
|
7127
|
+
* Wrapping under `model` keeps the top-level `--help` short — users invoke
|
|
7128
|
+
* `<cli> model --help` to see the full list of available models.
|
|
7129
|
+
*
|
|
7112
7130
|
* @param manifest - The generated manifest array.
|
|
7113
7131
|
* @param options - Optional overrides; see {@link BuildManifestCommandsOptions}.
|
|
7114
|
-
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`.
|
|
7132
|
+
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`. Empty
|
|
7133
|
+
* when the manifest has no callable entries.
|
|
7115
7134
|
*/ function buildManifestCommands(manifest, options) {
|
|
7116
|
-
var _ref, _ref1, _ref2, _ref3;
|
|
7135
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
|
7117
7136
|
var callable = manifest.filter(function(e) {
|
|
7118
7137
|
return !SKIPPED_VERBS.has(e.verb);
|
|
7119
7138
|
});
|
|
@@ -7145,38 +7164,57 @@ var DATA_HELP_FLAG = '--data-help';
|
|
|
7145
7164
|
}
|
|
7146
7165
|
}
|
|
7147
7166
|
}
|
|
7167
|
+
if (byModel.size === 0) {
|
|
7168
|
+
return [];
|
|
7169
|
+
}
|
|
7148
7170
|
var argv = (_ref = options === null || options === void 0 ? void 0 : options.argv) !== null && _ref !== void 0 ? _ref : process.argv;
|
|
7149
7171
|
var dataHelpFormat = (_ref1 = options === null || options === void 0 ? void 0 : options.dataHelpFormat) !== null && _ref1 !== void 0 ? _ref1 : detectDataHelpFormat(argv);
|
|
7150
|
-
var
|
|
7151
|
-
var
|
|
7152
|
-
var
|
|
7153
|
-
var
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7172
|
+
var helpMode = (_ref2 = options === null || options === void 0 ? void 0 : options.helpMode) !== null && _ref2 !== void 0 ? _ref2 : detectHelpMode(argv);
|
|
7173
|
+
var focusHelp = ((_ref3 = options === null || options === void 0 ? void 0 : options.focusHelpOnDataHelp) !== null && _ref3 !== void 0 ? _ref3 : true) && hasDataHelpFlag(argv) && !hasAllHelpFlag(argv);
|
|
7174
|
+
var hideOnFocus = focusHelp ? (_ref4 = options === null || options === void 0 ? void 0 : options.hiddenWhenFocused) !== null && _ref4 !== void 0 ? _ref4 : STANDARD_GLOBAL_OPTION_NAMES : [];
|
|
7175
|
+
var modelCommandName = (_ref5 = options === null || options === void 0 ? void 0 : options.modelCommandName) !== null && _ref5 !== void 0 ? _ref5 : DEFAULT_MANIFEST_MODEL_COMMAND_NAME;
|
|
7176
|
+
var sortedModels = _to_consumable_array(byModel.entries()).sort(function(param, param1) {
|
|
7177
|
+
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
7178
|
+
return a.localeCompare(b);
|
|
7179
|
+
});
|
|
7180
|
+
var context = {
|
|
7181
|
+
dataHelpFormat: dataHelpFormat,
|
|
7182
|
+
helpMode: helpMode,
|
|
7183
|
+
hideOnFocus: hideOnFocus
|
|
7184
|
+
};
|
|
7185
|
+
return [
|
|
7186
|
+
{
|
|
7187
|
+
command: "".concat(modelCommandName, " <model>"),
|
|
7188
|
+
describe: "Call typed model APIs (".concat(byModel.size, " model").concat(byModel.size === 1 ? '' : 's', "). Use `").concat(modelCommandName, " --help` to list them."),
|
|
7189
|
+
builder: function builder(yargs) {
|
|
7190
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7191
|
+
try {
|
|
7192
|
+
for(var _iterator = sortedModels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7193
|
+
var _step_value = _sliced_to_array(_step.value, 2), model = _step_value[0], entries = _step_value[1];
|
|
7194
|
+
yargs.command(buildModelCommand(model, entries, context));
|
|
7195
|
+
}
|
|
7196
|
+
} catch (err) {
|
|
7197
|
+
_didIteratorError = true;
|
|
7198
|
+
_iteratorError = err;
|
|
7199
|
+
} finally{
|
|
7200
|
+
try {
|
|
7201
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7202
|
+
_iterator.return();
|
|
7203
|
+
}
|
|
7204
|
+
} finally{
|
|
7205
|
+
if (_didIteratorError) {
|
|
7206
|
+
throw _iteratorError;
|
|
7207
|
+
}
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
hideGlobalOptions(yargs, hideOnFocus);
|
|
7211
|
+
return yargs.demandCommand(1, 'Please specify a model.');
|
|
7212
|
+
},
|
|
7213
|
+
handler: function handler() {
|
|
7214
|
+
return undefined;
|
|
7176
7215
|
}
|
|
7177
7216
|
}
|
|
7178
|
-
|
|
7179
|
-
return commands;
|
|
7217
|
+
];
|
|
7180
7218
|
}
|
|
7181
7219
|
/**
|
|
7182
7220
|
* Returns true if `--data-help` (with or without a value) appears anywhere in
|
|
@@ -7234,6 +7272,38 @@ var DATA_HELP_FLAG = '--data-help';
|
|
|
7234
7272
|
function parseDataHelpFormat(value) {
|
|
7235
7273
|
return MANIFEST_HELP_DATA_FORMATS.has(value) ? value : undefined;
|
|
7236
7274
|
}
|
|
7275
|
+
/**
|
|
7276
|
+
* Inspects an argv array for `--help-mode=<mode>` or `--help-mode <mode>` and
|
|
7277
|
+
* returns the requested {@link ManifestHelpMode}. Unrecognized values fall
|
|
7278
|
+
* back to {@link DEFAULT_MANIFEST_HELP_MODE}.
|
|
7279
|
+
*
|
|
7280
|
+
* Implemented as a raw argv scan (rather than going through yargs) because the
|
|
7281
|
+
* value is needed when each command's builder runs — which is before yargs
|
|
7282
|
+
* parses argv.
|
|
7283
|
+
*
|
|
7284
|
+
* @param argv - argv to inspect (defaults to `process.argv`).
|
|
7285
|
+
* @returns The detected mode, or {@link DEFAULT_MANIFEST_HELP_MODE}.
|
|
7286
|
+
*/ function detectHelpMode() {
|
|
7287
|
+
var argv = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : process.argv;
|
|
7288
|
+
var result = DEFAULT_MANIFEST_HELP_MODE;
|
|
7289
|
+
for(var i = 0; i < argv.length; i++){
|
|
7290
|
+
var arg = argv[i];
|
|
7291
|
+
if (arg.startsWith("".concat(HELP_MODE_FLAG, "="))) {
|
|
7292
|
+
var _parseHelpMode;
|
|
7293
|
+
result = (_parseHelpMode = parseHelpMode(arg.slice(HELP_MODE_FLAG.length + 1))) !== null && _parseHelpMode !== void 0 ? _parseHelpMode : result;
|
|
7294
|
+
break;
|
|
7295
|
+
}
|
|
7296
|
+
if (arg === HELP_MODE_FLAG && i + 1 < argv.length) {
|
|
7297
|
+
var _parseHelpMode1;
|
|
7298
|
+
result = (_parseHelpMode1 = parseHelpMode(argv[i + 1])) !== null && _parseHelpMode1 !== void 0 ? _parseHelpMode1 : result;
|
|
7299
|
+
break;
|
|
7300
|
+
}
|
|
7301
|
+
}
|
|
7302
|
+
return result;
|
|
7303
|
+
}
|
|
7304
|
+
function parseHelpMode(value) {
|
|
7305
|
+
return MANIFEST_HELP_MODES.has(value) ? value : undefined;
|
|
7306
|
+
}
|
|
7237
7307
|
function buildModelCommand(model, entries, context) {
|
|
7238
7308
|
return {
|
|
7239
7309
|
command: "".concat(model, " <action>"),
|
|
@@ -7268,14 +7338,15 @@ function buildModelCommand(model, entries, context) {
|
|
|
7268
7338
|
};
|
|
7269
7339
|
}
|
|
7270
7340
|
function buildEntryCommand(entry, context) {
|
|
7271
|
-
var
|
|
7341
|
+
var _oneLineDescription;
|
|
7272
7342
|
var action = entry.specifier && entry.specifier !== '_' ? "".concat(entry.verb, "-").concat(entry.specifier) : entry.verb;
|
|
7273
7343
|
var specPart = entry.specifier && entry.specifier !== '_' ? ' ' + entry.specifier : '';
|
|
7274
|
-
var
|
|
7275
|
-
var
|
|
7344
|
+
var fallbackDescribe = "".concat(entry.verb).concat(specPart, " on ").concat(entry.model);
|
|
7345
|
+
var describeOneLine = (_oneLineDescription = oneLineDescription(entry.description)) !== null && _oneLineDescription !== void 0 ? _oneLineDescription : fallbackDescribe;
|
|
7346
|
+
var epilogue = buildEntryEpilogue(entry, context);
|
|
7276
7347
|
return {
|
|
7277
7348
|
command: action,
|
|
7278
|
-
describe:
|
|
7349
|
+
describe: describeOneLine,
|
|
7279
7350
|
builder: function builder(yargs) {
|
|
7280
7351
|
var y = yargs.option('data', {
|
|
7281
7352
|
type: 'string',
|
|
@@ -7324,6 +7395,12 @@ function buildEntryCommand(entry, context) {
|
|
|
7324
7395
|
}
|
|
7325
7396
|
};
|
|
7326
7397
|
}
|
|
7398
|
+
function oneLineDescription(description) {
|
|
7399
|
+
var _description_split_;
|
|
7400
|
+
if (!description) return undefined;
|
|
7401
|
+
var firstLine = (_description_split_ = description.split('\n', 1)[0]) === null || _description_split_ === void 0 ? void 0 : _description_split_.trim();
|
|
7402
|
+
return firstLine && firstLine.length > 0 ? firstLine : undefined;
|
|
7403
|
+
}
|
|
7327
7404
|
function hideGlobalOptions(yargs, names) {
|
|
7328
7405
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7329
7406
|
try {
|
|
@@ -7347,37 +7424,145 @@ function hideGlobalOptions(yargs, names) {
|
|
|
7347
7424
|
}
|
|
7348
7425
|
}
|
|
7349
7426
|
/**
|
|
7350
|
-
* Builds the help epilogue for a manifest-driven command. Surfaces the
|
|
7351
|
-
*
|
|
7352
|
-
*
|
|
7353
|
-
* the source `.api.ts`
|
|
7354
|
-
*
|
|
7355
|
-
* `--
|
|
7427
|
+
* Builds the help epilogue for a manifest-driven command. Surfaces the action
|
|
7428
|
+
* description JSDoc, the params interface description and per-field
|
|
7429
|
+
* descriptions, the params arktype validator (as JSON Schema and/or arktype
|
|
7430
|
+
* expression — see {@link ManifestHelpDataFormat}), and the source `.api.ts`
|
|
7431
|
+
* path for traceability. Designed to give both humans and LLM agents enough
|
|
7432
|
+
* information from `--help` alone to understand a command and construct a
|
|
7433
|
+
* valid `--data` payload.
|
|
7356
7434
|
*
|
|
7357
7435
|
* @param entry - Manifest entry whose metadata becomes the help epilogue.
|
|
7358
|
-
* @param
|
|
7436
|
+
* @param context - Builder context controlling schema format and which sections
|
|
7437
|
+
* to render (see {@link ManifestHelpMode}).
|
|
7359
7438
|
* @returns Multi-section epilogue string, or `undefined` when the entry has no
|
|
7360
7439
|
* metadata worth surfacing.
|
|
7361
|
-
*/ function buildEntryEpilogue(entry,
|
|
7362
|
-
var
|
|
7440
|
+
*/ function buildEntryEpilogue(entry, context) {
|
|
7441
|
+
var dataHelpFormat = context.dataHelpFormat, helpMode = context.helpMode;
|
|
7442
|
+
var showAction = helpMode === 'action' || helpMode === 'both';
|
|
7443
|
+
var showParams = helpMode === 'params' || helpMode === 'both';
|
|
7363
7444
|
var sections = [];
|
|
7364
|
-
if (
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
if (
|
|
7370
|
-
|
|
7445
|
+
if (showAction) {
|
|
7446
|
+
var actionSection = buildActionSection(entry);
|
|
7447
|
+
if (actionSection) sections.push(actionSection);
|
|
7448
|
+
}
|
|
7449
|
+
var schemaSections = [];
|
|
7450
|
+
if (showParams) {
|
|
7451
|
+
var _sections;
|
|
7452
|
+
var paramsSection = buildParamsSection(entry);
|
|
7453
|
+
if (paramsSection) sections.push(paramsSection);
|
|
7454
|
+
schemaSections = renderParamsSchemaSections(entry, dataHelpFormat);
|
|
7455
|
+
(_sections = sections).push.apply(_sections, _to_consumable_array(schemaSections));
|
|
7456
|
+
var resultSection = buildResultSection(entry);
|
|
7457
|
+
if (resultSection) {
|
|
7458
|
+
sections.push(resultSection);
|
|
7459
|
+
} else if (entry.resultTypeName) {
|
|
7460
|
+
sections.push("Result: ".concat(entry.resultTypeName));
|
|
7461
|
+
}
|
|
7371
7462
|
}
|
|
7372
7463
|
if (entry.sourceFile) {
|
|
7373
7464
|
sections.push("Source: ".concat(entry.sourceFile));
|
|
7374
7465
|
}
|
|
7375
|
-
if (schemaSections.length > 0 && dataHelpFormat !== 'both') {
|
|
7466
|
+
if (showParams && schemaSections.length > 0 && dataHelpFormat !== 'both') {
|
|
7376
7467
|
var other = dataHelpFormat === 'jsonschema' ? 'arktype' : 'jsonschema';
|
|
7377
7468
|
sections.push("(Pass --data-help=".concat(other, " or --data-help=both to switch the schema format above.)"));
|
|
7378
7469
|
}
|
|
7470
|
+
if (helpMode === 'both' && (entry.description || entry.paramsTypeDescription || entry.paramsFields && entry.paramsFields.length > 0)) {
|
|
7471
|
+
sections.push("(Pass --help-mode=action or --help-mode=params to focus this help on a single section.)");
|
|
7472
|
+
}
|
|
7379
7473
|
return sections.length > 0 ? sections.join('\n\n') : undefined;
|
|
7380
7474
|
}
|
|
7475
|
+
function buildActionSection(entry) {
|
|
7476
|
+
if (!entry.description) return undefined;
|
|
7477
|
+
return "About:\n".concat(indentLines(entry.description, ' '));
|
|
7478
|
+
}
|
|
7479
|
+
function buildParamsSection(entry) {
|
|
7480
|
+
if (!entry.paramsTypeName && !entry.paramsTypeDescription && !(entry.paramsFields && entry.paramsFields.length > 0)) {
|
|
7481
|
+
return undefined;
|
|
7482
|
+
}
|
|
7483
|
+
var lines = [];
|
|
7484
|
+
if (entry.paramsTypeName) {
|
|
7485
|
+
lines.push("Params: ".concat(entry.paramsTypeName));
|
|
7486
|
+
}
|
|
7487
|
+
if (entry.paramsTypeDescription) {
|
|
7488
|
+
lines.push(indentLines(entry.paramsTypeDescription, ' '));
|
|
7489
|
+
}
|
|
7490
|
+
if (entry.paramsFields && entry.paramsFields.length > 0) {
|
|
7491
|
+
lines.push('');
|
|
7492
|
+
lines.push('Fields:');
|
|
7493
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7494
|
+
try {
|
|
7495
|
+
for(var _iterator = entry.paramsFields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7496
|
+
var field = _step.value;
|
|
7497
|
+
var header = " - ".concat(field.name, ": ").concat(field.typeText);
|
|
7498
|
+
lines.push(header);
|
|
7499
|
+
if (field.description) {
|
|
7500
|
+
lines.push(indentLines(field.description, ' '));
|
|
7501
|
+
}
|
|
7502
|
+
}
|
|
7503
|
+
} catch (err) {
|
|
7504
|
+
_didIteratorError = true;
|
|
7505
|
+
_iteratorError = err;
|
|
7506
|
+
} finally{
|
|
7507
|
+
try {
|
|
7508
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7509
|
+
_iterator.return();
|
|
7510
|
+
}
|
|
7511
|
+
} finally{
|
|
7512
|
+
if (_didIteratorError) {
|
|
7513
|
+
throw _iteratorError;
|
|
7514
|
+
}
|
|
7515
|
+
}
|
|
7516
|
+
}
|
|
7517
|
+
}
|
|
7518
|
+
return lines.join('\n');
|
|
7519
|
+
}
|
|
7520
|
+
function buildResultSection(entry) {
|
|
7521
|
+
if (!entry.resultTypeDescription && !(entry.resultFields && entry.resultFields.length > 0)) {
|
|
7522
|
+
return undefined;
|
|
7523
|
+
}
|
|
7524
|
+
var lines = [];
|
|
7525
|
+
if (entry.resultTypeName) {
|
|
7526
|
+
lines.push("Result: ".concat(entry.resultTypeName));
|
|
7527
|
+
}
|
|
7528
|
+
if (entry.resultTypeDescription) {
|
|
7529
|
+
lines.push(indentLines(entry.resultTypeDescription, ' '));
|
|
7530
|
+
}
|
|
7531
|
+
if (entry.resultFields && entry.resultFields.length > 0) {
|
|
7532
|
+
lines.push('');
|
|
7533
|
+
lines.push('Fields:');
|
|
7534
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7535
|
+
try {
|
|
7536
|
+
for(var _iterator = entry.resultFields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7537
|
+
var field = _step.value;
|
|
7538
|
+
var header = " - ".concat(field.name, ": ").concat(field.typeText);
|
|
7539
|
+
lines.push(header);
|
|
7540
|
+
if (field.description) {
|
|
7541
|
+
lines.push(indentLines(field.description, ' '));
|
|
7542
|
+
}
|
|
7543
|
+
}
|
|
7544
|
+
} catch (err) {
|
|
7545
|
+
_didIteratorError = true;
|
|
7546
|
+
_iteratorError = err;
|
|
7547
|
+
} finally{
|
|
7548
|
+
try {
|
|
7549
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7550
|
+
_iterator.return();
|
|
7551
|
+
}
|
|
7552
|
+
} finally{
|
|
7553
|
+
if (_didIteratorError) {
|
|
7554
|
+
throw _iteratorError;
|
|
7555
|
+
}
|
|
7556
|
+
}
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7559
|
+
return lines.join('\n');
|
|
7560
|
+
}
|
|
7561
|
+
function indentLines(text, indent) {
|
|
7562
|
+
return text.split('\n').map(function(line) {
|
|
7563
|
+
return "".concat(indent).concat(line);
|
|
7564
|
+
}).join('\n');
|
|
7565
|
+
}
|
|
7381
7566
|
function renderParamsSchemaSections(entry, dataHelpFormat) {
|
|
7382
7567
|
var sections = [];
|
|
7383
7568
|
if (!entry.paramsValidator) {
|
|
@@ -8081,4 +8266,4 @@ function printPaginatedOutput(input) {
|
|
|
8081
8266
|
})();
|
|
8082
8267
|
}
|
|
8083
8268
|
|
|
8084
|
-
export { CALL_MODEL_API_PATH, CliError, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_SECRET_PATTERNS, DEFAULT_MANIFEST_HELP_DATA_FORMAT, DUMP_MERGE_MODES, DUMP_OUTPUT_MODES, MODEL_WRITE_OIDC_SCOPES, MULTIPLE_PAGES_OUTPUT_MODES, PROMPT_CANCELLED_ERROR_CODE, STANDARD_GLOBAL_OPTION_NAMES, applyEnvVarOverrides, buildAuthorizationUrl, buildCliPaths, buildDumpFilePath, buildErrorOutput, buildManifestCommands, callModelOverHttp, callPassthroughCommand, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createAuthCommand, createAuthMiddleware, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createDoctorCommand, createEnvCommand, createOutputCommand, createOutputMiddleware, defaultDoctorChecks, detectDataHelpFormat, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, fetchUserInfo, filterReadOnlyModelScopes, findCliEnvDefault, generateOAuthState, generatePkceMaterial, getCliContext, getOutputOptions, isCliEnvConfigComplete, isTokenExpired, loadCliConfig, maskSecret, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, openStreamingDump, outputError, outputResult, parsePastedRedirect, pickFields, promptLine, refreshAccessToken, requireCliContext, resolveActiveEnvName, resolveOutputConfig, revokeToken, runCli, runPaginatedList, sanitizeString, saveCliConfig, setCliContext, withCallModelArgs, withEnv, withMultiplePages, withOutput, wrapCommandHandler };
|
|
8269
|
+
export { CALL_MODEL_API_PATH, CliError, DEFAULT_CLI_OIDC_SCOPES, DEFAULT_CLI_SECRET_PATTERNS, DEFAULT_MANIFEST_HELP_DATA_FORMAT, DEFAULT_MANIFEST_HELP_MODE, DEFAULT_MANIFEST_MODEL_COMMAND_NAME, DUMP_MERGE_MODES, DUMP_OUTPUT_MODES, MODEL_WRITE_OIDC_SCOPES, MULTIPLE_PAGES_OUTPUT_MODES, PROMPT_CANCELLED_ERROR_CODE, STANDARD_GLOBAL_OPTION_NAMES, applyEnvVarOverrides, buildAuthorizationUrl, buildCliPaths, buildDumpFilePath, buildErrorOutput, buildManifestCommands, callModelOverHttp, callPassthroughCommand, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createAuthCommand, createAuthMiddleware, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createDoctorCommand, createEnvCommand, createOutputCommand, createOutputMiddleware, defaultDoctorChecks, detectDataHelpFormat, detectHelpMode, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, fetchUserInfo, filterReadOnlyModelScopes, findCliEnvDefault, generateOAuthState, generatePkceMaterial, getCliContext, getOutputOptions, isCliEnvConfigComplete, isTokenExpired, loadCliConfig, maskSecret, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, openStreamingDump, outputError, outputResult, parsePastedRedirect, pickFields, promptLine, refreshAccessToken, requireCliContext, resolveActiveEnvName, resolveOutputConfig, revokeToken, runCli, runPaginatedList, sanitizeString, saveCliConfig, setCliContext, withCallModelArgs, withEnv, withMultiplePages, withOutput, wrapCommandHandler };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hapier Creative LLC.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./index.cjs.js').default;
|