@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.cjs.js
CHANGED
|
@@ -1660,7 +1660,7 @@ function mergeOutputCommandsConfig(existing, updates) {
|
|
|
1660
1660
|
* The `model.*` write scopes filtered out by {@link filterReadOnlyModelScopes}.
|
|
1661
1661
|
*
|
|
1662
1662
|
* Mirrors the write half of the dbx-components callModel CRUD scope set
|
|
1663
|
-
* (`CALL_MODEL_OIDC_SCOPES` in `@dereekb/firebase
|
|
1663
|
+
* (`CALL_MODEL_OIDC_SCOPES` in `@dereekb/firebase`) — duplicated here so the
|
|
1664
1664
|
* CLI doesn't take a server-side dependency just to know the names.
|
|
1665
1665
|
*/ var MODEL_WRITE_OIDC_SCOPES = [
|
|
1666
1666
|
'model.create',
|
|
@@ -7093,6 +7093,15 @@ var SKIPPED_VERBS = new Set([
|
|
|
7093
7093
|
'standalone'
|
|
7094
7094
|
]);
|
|
7095
7095
|
var ALL_HELP_FLAG = '--all-help';
|
|
7096
|
+
var HELP_MODE_FLAG = '--help-mode';
|
|
7097
|
+
/**
|
|
7098
|
+
* Default help mode when no override is supplied.
|
|
7099
|
+
*/ var DEFAULT_MANIFEST_HELP_MODE = 'both';
|
|
7100
|
+
var MANIFEST_HELP_MODES = new Set([
|
|
7101
|
+
'action',
|
|
7102
|
+
'params',
|
|
7103
|
+
'both'
|
|
7104
|
+
]);
|
|
7096
7105
|
/**
|
|
7097
7106
|
* Default schema format when no override is supplied.
|
|
7098
7107
|
*/ var DEFAULT_MANIFEST_HELP_DATA_FORMAT = 'jsonschema';
|
|
@@ -7102,20 +7111,30 @@ var MANIFEST_HELP_DATA_FORMATS = new Set([
|
|
|
7102
7111
|
'both'
|
|
7103
7112
|
]);
|
|
7104
7113
|
var DATA_HELP_FLAG = '--data-help';
|
|
7114
|
+
/**
|
|
7115
|
+
* Default name of the parent command that groups all per-model manifest commands.
|
|
7116
|
+
* Surfaces as `<cli> model <model> <action>` so the top-level `--help` stays focused
|
|
7117
|
+
* on first-class commands instead of dumping every model.
|
|
7118
|
+
*/ var DEFAULT_MANIFEST_MODEL_COMMAND_NAME = 'model';
|
|
7105
7119
|
/**
|
|
7106
7120
|
* Builds yargs `CommandModule[]` from a generated {@link CliApiManifest}.
|
|
7107
7121
|
*
|
|
7108
|
-
*
|
|
7109
|
-
*
|
|
7122
|
+
* Returns a single parent command (default name `model`) whose subcommands are the per-model
|
|
7123
|
+
* dispatch commands. Each per-model subcommand has one child action per entry
|
|
7124
|
+
* (named `<verb>` or `<verb>-<specifier>`). Each leaf accepts `--data <json>`, validates the
|
|
7110
7125
|
* payload against the entry's bound arktype validator (when present), and dispatches via the
|
|
7111
7126
|
* authenticated CLI context's `callModel` helper. Standalone entries are skipped because they
|
|
7112
7127
|
* are not dispatched through the `/model/call` endpoint.
|
|
7113
7128
|
*
|
|
7129
|
+
* Wrapping under `model` keeps the top-level `--help` short — users invoke
|
|
7130
|
+
* `<cli> model --help` to see the full list of available models.
|
|
7131
|
+
*
|
|
7114
7132
|
* @param manifest - The generated manifest array.
|
|
7115
7133
|
* @param options - Optional overrides; see {@link BuildManifestCommandsOptions}.
|
|
7116
|
-
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`.
|
|
7134
|
+
* @returns The yargs `CommandModule[]` ready to be passed to `runCli({ apiCommands })`. Empty
|
|
7135
|
+
* when the manifest has no callable entries.
|
|
7117
7136
|
*/ function buildManifestCommands(manifest, options) {
|
|
7118
|
-
var _ref, _ref1, _ref2, _ref3;
|
|
7137
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
|
7119
7138
|
var callable = manifest.filter(function(e) {
|
|
7120
7139
|
return !SKIPPED_VERBS.has(e.verb);
|
|
7121
7140
|
});
|
|
@@ -7147,38 +7166,57 @@ var DATA_HELP_FLAG = '--data-help';
|
|
|
7147
7166
|
}
|
|
7148
7167
|
}
|
|
7149
7168
|
}
|
|
7169
|
+
if (byModel.size === 0) {
|
|
7170
|
+
return [];
|
|
7171
|
+
}
|
|
7150
7172
|
var argv = (_ref = options === null || options === void 0 ? void 0 : options.argv) !== null && _ref !== void 0 ? _ref : process.argv;
|
|
7151
7173
|
var dataHelpFormat = (_ref1 = options === null || options === void 0 ? void 0 : options.dataHelpFormat) !== null && _ref1 !== void 0 ? _ref1 : detectDataHelpFormat(argv);
|
|
7152
|
-
var
|
|
7153
|
-
var
|
|
7154
|
-
var
|
|
7155
|
-
var
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7174
|
+
var helpMode = (_ref2 = options === null || options === void 0 ? void 0 : options.helpMode) !== null && _ref2 !== void 0 ? _ref2 : detectHelpMode(argv);
|
|
7175
|
+
var focusHelp = ((_ref3 = options === null || options === void 0 ? void 0 : options.focusHelpOnDataHelp) !== null && _ref3 !== void 0 ? _ref3 : true) && hasDataHelpFlag(argv) && !hasAllHelpFlag(argv);
|
|
7176
|
+
var hideOnFocus = focusHelp ? (_ref4 = options === null || options === void 0 ? void 0 : options.hiddenWhenFocused) !== null && _ref4 !== void 0 ? _ref4 : STANDARD_GLOBAL_OPTION_NAMES : [];
|
|
7177
|
+
var modelCommandName = (_ref5 = options === null || options === void 0 ? void 0 : options.modelCommandName) !== null && _ref5 !== void 0 ? _ref5 : DEFAULT_MANIFEST_MODEL_COMMAND_NAME;
|
|
7178
|
+
var sortedModels = _to_consumable_array(byModel.entries()).sort(function(param, param1) {
|
|
7179
|
+
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
7180
|
+
return a.localeCompare(b);
|
|
7181
|
+
});
|
|
7182
|
+
var context = {
|
|
7183
|
+
dataHelpFormat: dataHelpFormat,
|
|
7184
|
+
helpMode: helpMode,
|
|
7185
|
+
hideOnFocus: hideOnFocus
|
|
7186
|
+
};
|
|
7187
|
+
return [
|
|
7188
|
+
{
|
|
7189
|
+
command: "".concat(modelCommandName, " <model>"),
|
|
7190
|
+
describe: "Call typed model APIs (".concat(byModel.size, " model").concat(byModel.size === 1 ? '' : 's', "). Use `").concat(modelCommandName, " --help` to list them."),
|
|
7191
|
+
builder: function builder(yargs) {
|
|
7192
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7193
|
+
try {
|
|
7194
|
+
for(var _iterator = sortedModels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7195
|
+
var _step_value = _sliced_to_array(_step.value, 2), model = _step_value[0], entries = _step_value[1];
|
|
7196
|
+
yargs.command(buildModelCommand(model, entries, context));
|
|
7197
|
+
}
|
|
7198
|
+
} catch (err) {
|
|
7199
|
+
_didIteratorError = true;
|
|
7200
|
+
_iteratorError = err;
|
|
7201
|
+
} finally{
|
|
7202
|
+
try {
|
|
7203
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7204
|
+
_iterator.return();
|
|
7205
|
+
}
|
|
7206
|
+
} finally{
|
|
7207
|
+
if (_didIteratorError) {
|
|
7208
|
+
throw _iteratorError;
|
|
7209
|
+
}
|
|
7210
|
+
}
|
|
7211
|
+
}
|
|
7212
|
+
hideGlobalOptions(yargs, hideOnFocus);
|
|
7213
|
+
return yargs.demandCommand(1, 'Please specify a model.');
|
|
7214
|
+
},
|
|
7215
|
+
handler: function handler() {
|
|
7216
|
+
return undefined;
|
|
7178
7217
|
}
|
|
7179
7218
|
}
|
|
7180
|
-
|
|
7181
|
-
return commands;
|
|
7219
|
+
];
|
|
7182
7220
|
}
|
|
7183
7221
|
/**
|
|
7184
7222
|
* Returns true if `--data-help` (with or without a value) appears anywhere in
|
|
@@ -7236,6 +7274,38 @@ var DATA_HELP_FLAG = '--data-help';
|
|
|
7236
7274
|
function parseDataHelpFormat(value) {
|
|
7237
7275
|
return MANIFEST_HELP_DATA_FORMATS.has(value) ? value : undefined;
|
|
7238
7276
|
}
|
|
7277
|
+
/**
|
|
7278
|
+
* Inspects an argv array for `--help-mode=<mode>` or `--help-mode <mode>` and
|
|
7279
|
+
* returns the requested {@link ManifestHelpMode}. Unrecognized values fall
|
|
7280
|
+
* back to {@link DEFAULT_MANIFEST_HELP_MODE}.
|
|
7281
|
+
*
|
|
7282
|
+
* Implemented as a raw argv scan (rather than going through yargs) because the
|
|
7283
|
+
* value is needed when each command's builder runs — which is before yargs
|
|
7284
|
+
* parses argv.
|
|
7285
|
+
*
|
|
7286
|
+
* @param argv - argv to inspect (defaults to `process.argv`).
|
|
7287
|
+
* @returns The detected mode, or {@link DEFAULT_MANIFEST_HELP_MODE}.
|
|
7288
|
+
*/ function detectHelpMode() {
|
|
7289
|
+
var argv = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : process.argv;
|
|
7290
|
+
var result = DEFAULT_MANIFEST_HELP_MODE;
|
|
7291
|
+
for(var i = 0; i < argv.length; i++){
|
|
7292
|
+
var arg = argv[i];
|
|
7293
|
+
if (arg.startsWith("".concat(HELP_MODE_FLAG, "="))) {
|
|
7294
|
+
var _parseHelpMode;
|
|
7295
|
+
result = (_parseHelpMode = parseHelpMode(arg.slice(HELP_MODE_FLAG.length + 1))) !== null && _parseHelpMode !== void 0 ? _parseHelpMode : result;
|
|
7296
|
+
break;
|
|
7297
|
+
}
|
|
7298
|
+
if (arg === HELP_MODE_FLAG && i + 1 < argv.length) {
|
|
7299
|
+
var _parseHelpMode1;
|
|
7300
|
+
result = (_parseHelpMode1 = parseHelpMode(argv[i + 1])) !== null && _parseHelpMode1 !== void 0 ? _parseHelpMode1 : result;
|
|
7301
|
+
break;
|
|
7302
|
+
}
|
|
7303
|
+
}
|
|
7304
|
+
return result;
|
|
7305
|
+
}
|
|
7306
|
+
function parseHelpMode(value) {
|
|
7307
|
+
return MANIFEST_HELP_MODES.has(value) ? value : undefined;
|
|
7308
|
+
}
|
|
7239
7309
|
function buildModelCommand(model, entries, context) {
|
|
7240
7310
|
return {
|
|
7241
7311
|
command: "".concat(model, " <action>"),
|
|
@@ -7270,14 +7340,15 @@ function buildModelCommand(model, entries, context) {
|
|
|
7270
7340
|
};
|
|
7271
7341
|
}
|
|
7272
7342
|
function buildEntryCommand(entry, context) {
|
|
7273
|
-
var
|
|
7343
|
+
var _oneLineDescription;
|
|
7274
7344
|
var action = entry.specifier && entry.specifier !== '_' ? "".concat(entry.verb, "-").concat(entry.specifier) : entry.verb;
|
|
7275
7345
|
var specPart = entry.specifier && entry.specifier !== '_' ? ' ' + entry.specifier : '';
|
|
7276
|
-
var
|
|
7277
|
-
var
|
|
7346
|
+
var fallbackDescribe = "".concat(entry.verb).concat(specPart, " on ").concat(entry.model);
|
|
7347
|
+
var describeOneLine = (_oneLineDescription = oneLineDescription(entry.description)) !== null && _oneLineDescription !== void 0 ? _oneLineDescription : fallbackDescribe;
|
|
7348
|
+
var epilogue = buildEntryEpilogue(entry, context);
|
|
7278
7349
|
return {
|
|
7279
7350
|
command: action,
|
|
7280
|
-
describe:
|
|
7351
|
+
describe: describeOneLine,
|
|
7281
7352
|
builder: function builder(yargs) {
|
|
7282
7353
|
var y = yargs.option('data', {
|
|
7283
7354
|
type: 'string',
|
|
@@ -7326,6 +7397,12 @@ function buildEntryCommand(entry, context) {
|
|
|
7326
7397
|
}
|
|
7327
7398
|
};
|
|
7328
7399
|
}
|
|
7400
|
+
function oneLineDescription(description) {
|
|
7401
|
+
var _description_split_;
|
|
7402
|
+
if (!description) return undefined;
|
|
7403
|
+
var firstLine = (_description_split_ = description.split('\n', 1)[0]) === null || _description_split_ === void 0 ? void 0 : _description_split_.trim();
|
|
7404
|
+
return firstLine && firstLine.length > 0 ? firstLine : undefined;
|
|
7405
|
+
}
|
|
7329
7406
|
function hideGlobalOptions(yargs, names) {
|
|
7330
7407
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7331
7408
|
try {
|
|
@@ -7349,37 +7426,145 @@ function hideGlobalOptions(yargs, names) {
|
|
|
7349
7426
|
}
|
|
7350
7427
|
}
|
|
7351
7428
|
/**
|
|
7352
|
-
* Builds the help epilogue for a manifest-driven command. Surfaces the
|
|
7353
|
-
*
|
|
7354
|
-
*
|
|
7355
|
-
* the source `.api.ts`
|
|
7356
|
-
*
|
|
7357
|
-
* `--
|
|
7429
|
+
* Builds the help epilogue for a manifest-driven command. Surfaces the action
|
|
7430
|
+
* description JSDoc, the params interface description and per-field
|
|
7431
|
+
* descriptions, the params arktype validator (as JSON Schema and/or arktype
|
|
7432
|
+
* expression — see {@link ManifestHelpDataFormat}), and the source `.api.ts`
|
|
7433
|
+
* path for traceability. Designed to give both humans and LLM agents enough
|
|
7434
|
+
* information from `--help` alone to understand a command and construct a
|
|
7435
|
+
* valid `--data` payload.
|
|
7358
7436
|
*
|
|
7359
7437
|
* @param entry - Manifest entry whose metadata becomes the help epilogue.
|
|
7360
|
-
* @param
|
|
7438
|
+
* @param context - Builder context controlling schema format and which sections
|
|
7439
|
+
* to render (see {@link ManifestHelpMode}).
|
|
7361
7440
|
* @returns Multi-section epilogue string, or `undefined` when the entry has no
|
|
7362
7441
|
* metadata worth surfacing.
|
|
7363
|
-
*/ function buildEntryEpilogue(entry,
|
|
7364
|
-
var
|
|
7442
|
+
*/ function buildEntryEpilogue(entry, context) {
|
|
7443
|
+
var dataHelpFormat = context.dataHelpFormat, helpMode = context.helpMode;
|
|
7444
|
+
var showAction = helpMode === 'action' || helpMode === 'both';
|
|
7445
|
+
var showParams = helpMode === 'params' || helpMode === 'both';
|
|
7365
7446
|
var sections = [];
|
|
7366
|
-
if (
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
if (
|
|
7372
|
-
|
|
7447
|
+
if (showAction) {
|
|
7448
|
+
var actionSection = buildActionSection(entry);
|
|
7449
|
+
if (actionSection) sections.push(actionSection);
|
|
7450
|
+
}
|
|
7451
|
+
var schemaSections = [];
|
|
7452
|
+
if (showParams) {
|
|
7453
|
+
var _sections;
|
|
7454
|
+
var paramsSection = buildParamsSection(entry);
|
|
7455
|
+
if (paramsSection) sections.push(paramsSection);
|
|
7456
|
+
schemaSections = renderParamsSchemaSections(entry, dataHelpFormat);
|
|
7457
|
+
(_sections = sections).push.apply(_sections, _to_consumable_array(schemaSections));
|
|
7458
|
+
var resultSection = buildResultSection(entry);
|
|
7459
|
+
if (resultSection) {
|
|
7460
|
+
sections.push(resultSection);
|
|
7461
|
+
} else if (entry.resultTypeName) {
|
|
7462
|
+
sections.push("Result: ".concat(entry.resultTypeName));
|
|
7463
|
+
}
|
|
7373
7464
|
}
|
|
7374
7465
|
if (entry.sourceFile) {
|
|
7375
7466
|
sections.push("Source: ".concat(entry.sourceFile));
|
|
7376
7467
|
}
|
|
7377
|
-
if (schemaSections.length > 0 && dataHelpFormat !== 'both') {
|
|
7468
|
+
if (showParams && schemaSections.length > 0 && dataHelpFormat !== 'both') {
|
|
7378
7469
|
var other = dataHelpFormat === 'jsonschema' ? 'arktype' : 'jsonschema';
|
|
7379
7470
|
sections.push("(Pass --data-help=".concat(other, " or --data-help=both to switch the schema format above.)"));
|
|
7380
7471
|
}
|
|
7472
|
+
if (helpMode === 'both' && (entry.description || entry.paramsTypeDescription || entry.paramsFields && entry.paramsFields.length > 0)) {
|
|
7473
|
+
sections.push("(Pass --help-mode=action or --help-mode=params to focus this help on a single section.)");
|
|
7474
|
+
}
|
|
7381
7475
|
return sections.length > 0 ? sections.join('\n\n') : undefined;
|
|
7382
7476
|
}
|
|
7477
|
+
function buildActionSection(entry) {
|
|
7478
|
+
if (!entry.description) return undefined;
|
|
7479
|
+
return "About:\n".concat(indentLines(entry.description, ' '));
|
|
7480
|
+
}
|
|
7481
|
+
function buildParamsSection(entry) {
|
|
7482
|
+
if (!entry.paramsTypeName && !entry.paramsTypeDescription && !(entry.paramsFields && entry.paramsFields.length > 0)) {
|
|
7483
|
+
return undefined;
|
|
7484
|
+
}
|
|
7485
|
+
var lines = [];
|
|
7486
|
+
if (entry.paramsTypeName) {
|
|
7487
|
+
lines.push("Params: ".concat(entry.paramsTypeName));
|
|
7488
|
+
}
|
|
7489
|
+
if (entry.paramsTypeDescription) {
|
|
7490
|
+
lines.push(indentLines(entry.paramsTypeDescription, ' '));
|
|
7491
|
+
}
|
|
7492
|
+
if (entry.paramsFields && entry.paramsFields.length > 0) {
|
|
7493
|
+
lines.push('');
|
|
7494
|
+
lines.push('Fields:');
|
|
7495
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7496
|
+
try {
|
|
7497
|
+
for(var _iterator = entry.paramsFields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7498
|
+
var field = _step.value;
|
|
7499
|
+
var header = " - ".concat(field.name, ": ").concat(field.typeText);
|
|
7500
|
+
lines.push(header);
|
|
7501
|
+
if (field.description) {
|
|
7502
|
+
lines.push(indentLines(field.description, ' '));
|
|
7503
|
+
}
|
|
7504
|
+
}
|
|
7505
|
+
} catch (err) {
|
|
7506
|
+
_didIteratorError = true;
|
|
7507
|
+
_iteratorError = err;
|
|
7508
|
+
} finally{
|
|
7509
|
+
try {
|
|
7510
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7511
|
+
_iterator.return();
|
|
7512
|
+
}
|
|
7513
|
+
} finally{
|
|
7514
|
+
if (_didIteratorError) {
|
|
7515
|
+
throw _iteratorError;
|
|
7516
|
+
}
|
|
7517
|
+
}
|
|
7518
|
+
}
|
|
7519
|
+
}
|
|
7520
|
+
return lines.join('\n');
|
|
7521
|
+
}
|
|
7522
|
+
function buildResultSection(entry) {
|
|
7523
|
+
if (!entry.resultTypeDescription && !(entry.resultFields && entry.resultFields.length > 0)) {
|
|
7524
|
+
return undefined;
|
|
7525
|
+
}
|
|
7526
|
+
var lines = [];
|
|
7527
|
+
if (entry.resultTypeName) {
|
|
7528
|
+
lines.push("Result: ".concat(entry.resultTypeName));
|
|
7529
|
+
}
|
|
7530
|
+
if (entry.resultTypeDescription) {
|
|
7531
|
+
lines.push(indentLines(entry.resultTypeDescription, ' '));
|
|
7532
|
+
}
|
|
7533
|
+
if (entry.resultFields && entry.resultFields.length > 0) {
|
|
7534
|
+
lines.push('');
|
|
7535
|
+
lines.push('Fields:');
|
|
7536
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7537
|
+
try {
|
|
7538
|
+
for(var _iterator = entry.resultFields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7539
|
+
var field = _step.value;
|
|
7540
|
+
var header = " - ".concat(field.name, ": ").concat(field.typeText);
|
|
7541
|
+
lines.push(header);
|
|
7542
|
+
if (field.description) {
|
|
7543
|
+
lines.push(indentLines(field.description, ' '));
|
|
7544
|
+
}
|
|
7545
|
+
}
|
|
7546
|
+
} catch (err) {
|
|
7547
|
+
_didIteratorError = true;
|
|
7548
|
+
_iteratorError = err;
|
|
7549
|
+
} finally{
|
|
7550
|
+
try {
|
|
7551
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7552
|
+
_iterator.return();
|
|
7553
|
+
}
|
|
7554
|
+
} finally{
|
|
7555
|
+
if (_didIteratorError) {
|
|
7556
|
+
throw _iteratorError;
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7559
|
+
}
|
|
7560
|
+
}
|
|
7561
|
+
return lines.join('\n');
|
|
7562
|
+
}
|
|
7563
|
+
function indentLines(text, indent) {
|
|
7564
|
+
return text.split('\n').map(function(line) {
|
|
7565
|
+
return "".concat(indent).concat(line);
|
|
7566
|
+
}).join('\n');
|
|
7567
|
+
}
|
|
7383
7568
|
function renderParamsSchemaSections(entry, dataHelpFormat) {
|
|
7384
7569
|
var sections = [];
|
|
7385
7570
|
if (!entry.paramsValidator) {
|
|
@@ -8092,6 +8277,8 @@ exports.CliError = CliError;
|
|
|
8092
8277
|
exports.DEFAULT_CLI_OIDC_SCOPES = DEFAULT_CLI_OIDC_SCOPES;
|
|
8093
8278
|
exports.DEFAULT_CLI_SECRET_PATTERNS = DEFAULT_CLI_SECRET_PATTERNS;
|
|
8094
8279
|
exports.DEFAULT_MANIFEST_HELP_DATA_FORMAT = DEFAULT_MANIFEST_HELP_DATA_FORMAT;
|
|
8280
|
+
exports.DEFAULT_MANIFEST_HELP_MODE = DEFAULT_MANIFEST_HELP_MODE;
|
|
8281
|
+
exports.DEFAULT_MANIFEST_MODEL_COMMAND_NAME = DEFAULT_MANIFEST_MODEL_COMMAND_NAME;
|
|
8095
8282
|
exports.DUMP_MERGE_MODES = DUMP_MERGE_MODES;
|
|
8096
8283
|
exports.DUMP_OUTPUT_MODES = DUMP_OUTPUT_MODES;
|
|
8097
8284
|
exports.MODEL_WRITE_OIDC_SCOPES = MODEL_WRITE_OIDC_SCOPES;
|
|
@@ -8122,6 +8309,7 @@ exports.createOutputCommand = createOutputCommand;
|
|
|
8122
8309
|
exports.createOutputMiddleware = createOutputMiddleware;
|
|
8123
8310
|
exports.defaultDoctorChecks = defaultDoctorChecks;
|
|
8124
8311
|
exports.detectDataHelpFormat = detectDataHelpFormat;
|
|
8312
|
+
exports.detectHelpMode = detectHelpMode;
|
|
8125
8313
|
exports.discoverOidcMetadata = discoverOidcMetadata;
|
|
8126
8314
|
exports.dumpTimestamp = dumpTimestamp;
|
|
8127
8315
|
exports.exchangeAuthorizationCode = exchangeAuthorizationCode;
|