@dereekb/dbx-cli 13.11.4 → 13.11.5

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/index.esm.js CHANGED
@@ -9,13 +9,13 @@ import { createInterface } from 'node:readline';
9
9
  import yargs from 'yargs';
10
10
  import { hideBin } from 'yargs/helpers';
11
11
 
12
- function _array_like_to_array$5(arr, len) {
12
+ function _array_like_to_array$7(arr, len) {
13
13
  if (len == null || len > arr.length) len = arr.length;
14
14
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
15
15
  return arr2;
16
16
  }
17
- function _array_without_holes$3(arr) {
18
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
17
+ function _array_without_holes$4(arr) {
18
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
19
19
  }
20
20
  function _assert_this_initialized(self) {
21
21
  if (self === void 0) {
@@ -81,7 +81,7 @@ function _inherits(subClass, superClass) {
81
81
  });
82
82
  if (superClass) _set_prototype_of(subClass, superClass);
83
83
  }
84
- function _instanceof$5(left, right) {
84
+ function _instanceof$6(left, right) {
85
85
  "@swc/helpers - instanceof";
86
86
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
87
87
  return !!right[Symbol.hasInstance](left);
@@ -92,10 +92,10 @@ function _instanceof$5(left, right) {
92
92
  function _is_native_function(fn) {
93
93
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
94
94
  }
95
- function _iterable_to_array$3(iter) {
95
+ function _iterable_to_array$4(iter) {
96
96
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
97
97
  }
98
- function _non_iterable_spread$3() {
98
+ function _non_iterable_spread$4() {
99
99
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
100
100
  }
101
101
  function _object_spread$c(target) {
@@ -114,7 +114,7 @@ function _object_spread$c(target) {
114
114
  return target;
115
115
  }
116
116
  function _possible_constructor_return(self, call) {
117
- if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
117
+ if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
118
118
  return call;
119
119
  }
120
120
  return _assert_this_initialized(self);
@@ -126,20 +126,20 @@ function _set_prototype_of(o, p) {
126
126
  };
127
127
  return _set_prototype_of(o, p);
128
128
  }
129
- function _to_consumable_array$3(arr) {
130
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
129
+ function _to_consumable_array$4(arr) {
130
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$4();
131
131
  }
132
- function _type_of$2(obj) {
132
+ function _type_of$3(obj) {
133
133
  "@swc/helpers - typeof";
134
134
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
135
135
  }
136
- function _unsupported_iterable_to_array$5(o, minLen) {
136
+ function _unsupported_iterable_to_array$7(o, minLen) {
137
137
  if (!o) return;
138
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
138
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
139
139
  var n = Object.prototype.toString.call(o).slice(8, -1);
140
140
  if (n === "Object" && o.constructor) n = o.constructor.name;
141
141
  if (n === "Map" || n === "Set") return Array.from(n);
142
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
142
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
143
143
  }
144
144
  function _wrap_native_super(Class) {
145
145
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -188,7 +188,7 @@ function _is_native_reflect_construct() {
188
188
  /id_token[=:]\s*\S+/gi
189
189
  ];
190
190
  var _outputOptions = {};
191
- var _secretPatterns = _to_consumable_array$3(DEFAULT_CLI_SECRET_PATTERNS);
191
+ var _secretPatterns = _to_consumable_array$4(DEFAULT_CLI_SECRET_PATTERNS);
192
192
  var _errorMapper;
193
193
  /**
194
194
  * Configures output options from parsed CLI arguments.
@@ -317,13 +317,13 @@ function dumpResponse(data, meta) {
317
317
  return pickFromObject(item, fields);
318
318
  });
319
319
  }
320
- if (data != null && (typeof data === "undefined" ? "undefined" : _type_of$2(data)) === 'object') {
320
+ if (data != null && (typeof data === "undefined" ? "undefined" : _type_of$3(data)) === 'object') {
321
321
  return pickFromObject(data, fields);
322
322
  }
323
323
  return data;
324
324
  }
325
325
  function pickFromObject(obj, fields) {
326
- if (obj == null || (typeof obj === "undefined" ? "undefined" : _type_of$2(obj)) !== 'object') {
326
+ if (obj == null || (typeof obj === "undefined" ? "undefined" : _type_of$3(obj)) !== 'object') {
327
327
  return obj;
328
328
  }
329
329
  var result = {};
@@ -418,7 +418,7 @@ function pickFromObject(obj, fields) {
418
418
  return mapped;
419
419
  }
420
420
  }
421
- if (_instanceof$5(error, CliError)) {
421
+ if (_instanceof$6(error, CliError)) {
422
422
  return _object_spread$c({
423
423
  ok: false,
424
424
  error: sanitizeString(error.message),
@@ -427,7 +427,7 @@ function pickFromObject(obj, fields) {
427
427
  suggestion: error.suggestion
428
428
  } : {});
429
429
  }
430
- if (_instanceof$5(error, Error)) {
430
+ if (_instanceof$6(error, Error)) {
431
431
  return {
432
432
  ok: false,
433
433
  error: sanitizeString(error.message),
@@ -470,7 +470,7 @@ function _async_to_generator$f(fn) {
470
470
  });
471
471
  };
472
472
  }
473
- function _type_of$1(obj) {
473
+ function _type_of$2(obj) {
474
474
  "@swc/helpers - typeof";
475
475
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
476
476
  }
@@ -624,7 +624,7 @@ var CALL_MODEL_API_PATH = "/model/call";
624
624
  }
625
625
  }
626
626
  if (!res.ok) {
627
- bodyMessage = (typeof body === "undefined" ? "undefined" : _type_of$1(body)) === 'object' && body && 'message' in body ? body.message : undefined;
627
+ bodyMessage = (typeof body === "undefined" ? "undefined" : _type_of$2(body)) === 'object' && body && 'message' in body ? body.message : undefined;
628
628
  messageString = typeof bodyMessage === 'string' ? bodyMessage : undefined;
629
629
  message = messageString !== null && messageString !== void 0 ? messageString : text || "".concat(res.status, " ").concat(res.statusText);
630
630
  throw new CliError({
@@ -1131,7 +1131,7 @@ function _define_property$a(obj, key, value) {
1131
1131
  }
1132
1132
  return obj;
1133
1133
  }
1134
- function _instanceof$4(left, right) {
1134
+ function _instanceof$5(left, right) {
1135
1135
  "@swc/helpers - instanceof";
1136
1136
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
1137
1137
  return !!right[Symbol.hasInstance](left);
@@ -1302,7 +1302,7 @@ function _ts_generator$d(thisArg, body) {
1302
1302
  data = JSON.parse(argv.data);
1303
1303
  } catch (e) {
1304
1304
  throw new CliError({
1305
- message: "--data must be valid JSON: ".concat(_instanceof$4(e, Error) ? e.message : String(e)),
1305
+ message: "--data must be valid JSON: ".concat(_instanceof$5(e, Error) ? e.message : String(e)),
1306
1306
  code: 'INVALID_DATA_JSON'
1307
1307
  });
1308
1308
  }
@@ -1344,6 +1344,201 @@ function _ts_generator$d(thisArg, body) {
1344
1344
  }
1345
1345
  };
1346
1346
 
1347
+ function _array_like_to_array$6(arr, len) {
1348
+ if (len == null || len > arr.length) len = arr.length;
1349
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1350
+ return arr2;
1351
+ }
1352
+ function _array_with_holes$3(arr) {
1353
+ if (Array.isArray(arr)) return arr;
1354
+ }
1355
+ function _instanceof$4(left, right) {
1356
+ "@swc/helpers - instanceof";
1357
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
1358
+ return !!right[Symbol.hasInstance](left);
1359
+ } else {
1360
+ return left instanceof right;
1361
+ }
1362
+ }
1363
+ function _iterable_to_array_limit$3(arr, i) {
1364
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1365
+ if (_i == null) return;
1366
+ var _arr = [];
1367
+ var _n = true;
1368
+ var _d = false;
1369
+ var _s, _e;
1370
+ try {
1371
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1372
+ _arr.push(_s.value);
1373
+ if (i && _arr.length === i) break;
1374
+ }
1375
+ } catch (err) {
1376
+ _d = true;
1377
+ _e = err;
1378
+ } finally{
1379
+ try {
1380
+ if (!_n && _i["return"] != null) _i["return"]();
1381
+ } finally{
1382
+ if (_d) throw _e;
1383
+ }
1384
+ }
1385
+ return _arr;
1386
+ }
1387
+ function _non_iterable_rest$3() {
1388
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1389
+ }
1390
+ function _sliced_to_array$3(arr, i) {
1391
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$3();
1392
+ }
1393
+ function _type_of$1(obj) {
1394
+ "@swc/helpers - typeof";
1395
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1396
+ }
1397
+ function _unsupported_iterable_to_array$6(o, minLen) {
1398
+ if (!o) return;
1399
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
1400
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1401
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1402
+ if (n === "Map" || n === "Set") return Array.from(n);
1403
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
1404
+ }
1405
+ /**
1406
+ * Resolves the manifest entry for `modelType`. Lookup tries
1407
+ * `modelType` first, then falls back to `identityConst` and `collectionPrefix`
1408
+ * so callers can pass any of the three forms a user might type at the CLI.
1409
+ *
1410
+ * @param modelType - identifier to look up.
1411
+ * @param manifest - generated model manifest.
1412
+ * @returns the matching entry, or `undefined` when none exists.
1413
+ * @__NO_SIDE_EFFECTS__
1414
+ */ function findCliModelManifestEntry(modelType, manifest) {
1415
+ var result;
1416
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1417
+ try {
1418
+ for(var _iterator = manifest[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1419
+ var entry = _step.value;
1420
+ if (entry.modelType === modelType || entry.identityConst === modelType || entry.collectionPrefix === modelType) {
1421
+ result = entry;
1422
+ break;
1423
+ }
1424
+ }
1425
+ } catch (err) {
1426
+ _didIteratorError = true;
1427
+ _iteratorError = err;
1428
+ } finally{
1429
+ try {
1430
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1431
+ _iterator.return();
1432
+ }
1433
+ } finally{
1434
+ if (_didIteratorError) {
1435
+ throw _iteratorError;
1436
+ }
1437
+ }
1438
+ }
1439
+ return result;
1440
+ }
1441
+ /**
1442
+ * Rewrites the persisted (short) keys in `data` to the long-name form
1443
+ * declared in the model's manifest entry. Recurses into nested object-array
1444
+ * and sub-object fields when the manifest captured a nested field map.
1445
+ *
1446
+ * Returns the input untouched when `modelType` is not in the manifest, when
1447
+ * the model has no fields, or when the input is not a plain object/array.
1448
+ * Unknown keys, primitives, `Date`, `null`, and `undefined` pass through
1449
+ * unchanged.
1450
+ *
1451
+ * @param modelType - the model identifier (`modelType`, `identityConst`,
1452
+ * or `collectionPrefix`) used to look up the rewrite map.
1453
+ * @param data - the value to rewrite (typically a `read`/`query` response
1454
+ * payload).
1455
+ * @param manifest - generated model manifest.
1456
+ * @returns the rewritten value, or `data` unchanged when no rewrite applies.
1457
+ * @__NO_SIDE_EFFECTS__
1458
+ */ function expandModelKeys(modelType, data, manifest) {
1459
+ var entry = findCliModelManifestEntry(modelType, manifest);
1460
+ if (!entry) return data;
1461
+ return rewriteWithFields(data, entry.fields);
1462
+ }
1463
+ function rewriteWithFields(value, fields) {
1464
+ if (Array.isArray(value)) {
1465
+ return value.map(function(item) {
1466
+ return rewriteWithFields(item, fields);
1467
+ });
1468
+ }
1469
+ if (!isPlainObject(value)) return value;
1470
+ var fieldByName = new Map();
1471
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1472
+ try {
1473
+ for(var _iterator = fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1474
+ var field = _step.value;
1475
+ fieldByName.set(field.name, field);
1476
+ }
1477
+ } catch (err) {
1478
+ _didIteratorError = true;
1479
+ _iteratorError = err;
1480
+ } finally{
1481
+ try {
1482
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1483
+ _iterator.return();
1484
+ }
1485
+ } finally{
1486
+ if (_didIteratorError) {
1487
+ throw _iteratorError;
1488
+ }
1489
+ }
1490
+ }
1491
+ var out = {};
1492
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
1493
+ try {
1494
+ for(var _iterator1 = Object.entries(value)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
1495
+ var _step_value = _sliced_to_array$3(_step1.value, 2), key = _step_value[0], raw = _step_value[1];
1496
+ var field1 = fieldByName.get(key);
1497
+ if (!field1) {
1498
+ out[key] = raw;
1499
+ continue;
1500
+ }
1501
+ var longKey = field1.longName.length > 0 ? field1.longName : key;
1502
+ out[longKey] = rewriteFieldValue(raw, field1);
1503
+ }
1504
+ } catch (err) {
1505
+ _didIteratorError1 = true;
1506
+ _iteratorError1 = err;
1507
+ } finally{
1508
+ try {
1509
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
1510
+ _iterator1.return();
1511
+ }
1512
+ } finally{
1513
+ if (_didIteratorError1) {
1514
+ throw _iteratorError1;
1515
+ }
1516
+ }
1517
+ }
1518
+ return out;
1519
+ }
1520
+ function rewriteFieldValue(value, field) {
1521
+ var nested = field.nestedFields;
1522
+ if (!nested || nested.length === 0) return value;
1523
+ if (field.nestedIsArray) {
1524
+ if (!Array.isArray(value)) return value;
1525
+ return value.map(function(item) {
1526
+ return rewriteWithFields(item, nested);
1527
+ });
1528
+ }
1529
+ if (!isPlainObject(value)) return value;
1530
+ return rewriteWithFields(value, nested);
1531
+ }
1532
+ function isPlainObject(value) {
1533
+ if (value === null || (typeof value === "undefined" ? "undefined" : _type_of$1(value)) !== 'object') return false;
1534
+ if (Array.isArray(value)) return false;
1535
+ if (_instanceof$4(value, Date)) return false;
1536
+ // Objects from JSON.parse have Object.prototype as their proto. Anything
1537
+ // exotic (Map, Set, Buffer, class instances) we leave untouched.
1538
+ var proto = Object.getPrototypeOf(value);
1539
+ return proto === Object.prototype || proto === null;
1540
+ }
1541
+
1347
1542
  function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
1348
1543
  try {
1349
1544
  var info = gen[key](arg);
@@ -2349,7 +2544,7 @@ function trimSlash(url) {
2349
2544
  return url.endsWith('/') ? url.slice(0, -1) : url;
2350
2545
  }
2351
2546
 
2352
- function _array_like_to_array$4(arr, len) {
2547
+ function _array_like_to_array$5(arr, len) {
2353
2548
  if (len == null || len > arr.length) len = arr.length;
2354
2549
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2355
2550
  return arr2;
@@ -2414,15 +2609,15 @@ function _non_iterable_rest$2() {
2414
2609
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2415
2610
  }
2416
2611
  function _sliced_to_array$2(arr, i) {
2417
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
2612
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$2();
2418
2613
  }
2419
- function _unsupported_iterable_to_array$4(o, minLen) {
2614
+ function _unsupported_iterable_to_array$5(o, minLen) {
2420
2615
  if (!o) return;
2421
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
2616
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
2422
2617
  var n = Object.prototype.toString.call(o).slice(8, -1);
2423
2618
  if (n === "Object" && o.constructor) n = o.constructor.name;
2424
2619
  if (n === "Map" || n === "Set") return Array.from(n);
2425
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
2620
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
2426
2621
  }
2427
2622
  function _ts_generator$a(thisArg, body) {
2428
2623
  var f, y, t, _ = {
@@ -3918,13 +4113,13 @@ function maskEnv$1(env) {
3918
4113
  };
3919
4114
  }
3920
4115
 
3921
- function _array_like_to_array$3(arr, len) {
4116
+ function _array_like_to_array$4(arr, len) {
3922
4117
  if (len == null || len > arr.length) len = arr.length;
3923
4118
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3924
4119
  return arr2;
3925
4120
  }
3926
- function _array_without_holes$2(arr) {
3927
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
4121
+ function _array_without_holes$3(arr) {
4122
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
3928
4123
  }
3929
4124
  function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
3930
4125
  try {
@@ -3976,10 +4171,10 @@ function _instanceof$2(left, right) {
3976
4171
  return left instanceof right;
3977
4172
  }
3978
4173
  }
3979
- function _iterable_to_array$2(iter) {
4174
+ function _iterable_to_array$3(iter) {
3980
4175
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3981
4176
  }
3982
- function _non_iterable_spread$2() {
4177
+ function _non_iterable_spread$3() {
3983
4178
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3984
4179
  }
3985
4180
  function _object_spread$6(target) {
@@ -3997,16 +4192,16 @@ function _object_spread$6(target) {
3997
4192
  }
3998
4193
  return target;
3999
4194
  }
4000
- function _to_consumable_array$2(arr) {
4001
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$2();
4195
+ function _to_consumable_array$3(arr) {
4196
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
4002
4197
  }
4003
- function _unsupported_iterable_to_array$3(o, minLen) {
4198
+ function _unsupported_iterable_to_array$4(o, minLen) {
4004
4199
  if (!o) return;
4005
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
4200
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
4006
4201
  var n = Object.prototype.toString.call(o).slice(8, -1);
4007
4202
  if (n === "Object" && o.constructor) n = o.constructor.name;
4008
4203
  if (n === "Map" || n === "Set") return Array.from(n);
4009
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
4204
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
4010
4205
  }
4011
4206
  function _ts_generator$8(thisArg, body) {
4012
4207
  var f, y, t, _ = {
@@ -4448,7 +4643,7 @@ function _ts_generator$8(thisArg, body) {
4448
4643
  */ function createDoctorCommand(input) {
4449
4644
  var _input_checks;
4450
4645
  var cliName = input.cliName;
4451
- var checks = _to_consumable_array$2(defaultDoctorChecks()).concat(_to_consumable_array$2((_input_checks = input.checks) !== null && _input_checks !== void 0 ? _input_checks : []));
4646
+ var checks = _to_consumable_array$3(defaultDoctorChecks()).concat(_to_consumable_array$3((_input_checks = input.checks) !== null && _input_checks !== void 0 ? _input_checks : []));
4452
4647
  var defaultEnvs = input.defaultEnvs;
4453
4648
  return {
4454
4649
  command: 'doctor',
@@ -4615,7 +4810,7 @@ function _ts_generator$8(thisArg, body) {
4615
4810
  };
4616
4811
  }
4617
4812
 
4618
- function _array_like_to_array$2(arr, len) {
4813
+ function _array_like_to_array$3(arr, len) {
4619
4814
  if (len == null || len > arr.length) len = arr.length;
4620
4815
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4621
4816
  return arr2;
@@ -4735,15 +4930,15 @@ function _object_spread_props$4(target, source) {
4735
4930
  return target;
4736
4931
  }
4737
4932
  function _sliced_to_array$1(arr, i) {
4738
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
4933
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
4739
4934
  }
4740
- function _unsupported_iterable_to_array$2(o, minLen) {
4935
+ function _unsupported_iterable_to_array$3(o, minLen) {
4741
4936
  if (!o) return;
4742
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
4937
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
4743
4938
  var n = Object.prototype.toString.call(o).slice(8, -1);
4744
4939
  if (n === "Object" && o.constructor) n = o.constructor.name;
4745
4940
  if (n === "Map" || n === "Set") return Array.from(n);
4746
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
4941
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
4747
4942
  }
4748
4943
  function _ts_generator$7(thisArg, body) {
4749
4944
  var f, y, t, _ = {
@@ -5312,6 +5507,302 @@ function resolveEnvWithDefault(input) {
5312
5507
  };
5313
5508
  }
5314
5509
 
5510
+ function _array_like_to_array$2(arr, len) {
5511
+ if (len == null || len > arr.length) len = arr.length;
5512
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5513
+ return arr2;
5514
+ }
5515
+ function _array_without_holes$2(arr) {
5516
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
5517
+ }
5518
+ function _iterable_to_array$2(iter) {
5519
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5520
+ }
5521
+ function _non_iterable_spread$2() {
5522
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5523
+ }
5524
+ function _to_consumable_array$2(arr) {
5525
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
5526
+ }
5527
+ function _unsupported_iterable_to_array$2(o, minLen) {
5528
+ if (!o) return;
5529
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
5530
+ var n = Object.prototype.toString.call(o).slice(8, -1);
5531
+ if (n === "Object" && o.constructor) n = o.constructor.name;
5532
+ if (n === "Map" || n === "Set") return Array.from(n);
5533
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
5534
+ }
5535
+ /**
5536
+ * Resolves the manifest entry for `query` against `modelType`, `identityConst`,
5537
+ * and `collectionPrefix` in that order.
5538
+ *
5539
+ * Re-exports {@link findCliModelManifestEntry} under a more descriptive name
5540
+ * for the model-info command.
5541
+ *
5542
+ * @param manifest - the generated model manifest.
5543
+ * @param query - identifier to look up.
5544
+ * @returns the matching entry or `undefined`.
5545
+ * @__NO_SIDE_EFFECTS__
5546
+ */ function resolveCliModel(manifest, query) {
5547
+ return findCliModelManifestEntry(query, manifest);
5548
+ }
5549
+ /**
5550
+ * Produces a column-aligned summary table of every model in the manifest.
5551
+ *
5552
+ * @param manifest - the generated model manifest.
5553
+ * @returns the formatted table as a single string with a trailing newline.
5554
+ * @__NO_SIDE_EFFECTS__
5555
+ */ function renderModelManifestList(manifest) {
5556
+ if (manifest.length === 0) {
5557
+ return 'No models found in the generated manifest.\n';
5558
+ }
5559
+ var rows = [
5560
+ [
5561
+ 'MODEL',
5562
+ 'PREFIX',
5563
+ 'GROUP',
5564
+ 'FIELDS',
5565
+ 'PACKAGE',
5566
+ 'IDENTITY'
5567
+ ]
5568
+ ].concat(_to_consumable_array$2(manifest.map(function(m) {
5569
+ var _m_modelGroup;
5570
+ return [
5571
+ m.modelType,
5572
+ m.collectionPrefix,
5573
+ (_m_modelGroup = m.modelGroup) !== null && _m_modelGroup !== void 0 ? _m_modelGroup : '',
5574
+ String(m.fields.length),
5575
+ m.sourcePackage,
5576
+ m.identityConst
5577
+ ];
5578
+ })));
5579
+ return renderTable(rows);
5580
+ }
5581
+ /**
5582
+ * Produces a human-readable summary of one model entry: header, description,
5583
+ * and an indented field tree (recursing into `nestedFields`).
5584
+ *
5585
+ * @param entry - the manifest entry to render.
5586
+ * @returns the formatted summary as a single string with a trailing newline.
5587
+ * @__NO_SIDE_EFFECTS__
5588
+ */ function renderModelManifestEntry(entry) {
5589
+ var lines = [];
5590
+ lines.push("# ".concat(entry.modelType) + (entry.modelGroup ? " \xb7 group ".concat(entry.modelGroup) : ''));
5591
+ lines.push("Identity: ".concat(entry.identityConst));
5592
+ lines.push("Collection prefix: ".concat(entry.collectionPrefix));
5593
+ if (entry.parentIdentityConst) lines.push("Parent identity: ".concat(entry.parentIdentityConst));
5594
+ lines.push("Source package: ".concat(entry.sourcePackage));
5595
+ lines.push("Source file: ".concat(entry.sourceFile));
5596
+ if (entry.description) {
5597
+ lines.push('');
5598
+ lines.push(entry.description);
5599
+ }
5600
+ lines.push('');
5601
+ lines.push("Fields (".concat(entry.fields.length, "):"));
5602
+ lines.push(renderFieldsTree(entry.fields, 0));
5603
+ return lines.join('\n') + '\n';
5604
+ }
5605
+ /**
5606
+ * Produces the field-table portion of {@link renderModelManifestEntry} on its
5607
+ * own, used by the `--fields` flag of the `model-info` command.
5608
+ *
5609
+ * @param entry - the manifest entry whose fields should be rendered.
5610
+ * @returns the formatted field tree as a single string with a trailing newline.
5611
+ * @__NO_SIDE_EFFECTS__
5612
+ */ function renderModelManifestFields(entry) {
5613
+ return renderFieldsTree(entry.fields, 0) + '\n';
5614
+ }
5615
+ function renderFieldsTree(fields, indent) {
5616
+ var out = [];
5617
+ var rows = [
5618
+ [
5619
+ 'NAME',
5620
+ 'LONG NAME',
5621
+ 'TYPE',
5622
+ 'OPTIONAL',
5623
+ 'CONVERTER'
5624
+ ]
5625
+ ];
5626
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5627
+ try {
5628
+ for(var _iterator = fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5629
+ var field = _step.value;
5630
+ var _field_tsType;
5631
+ rows.push([
5632
+ field.name,
5633
+ field.longName,
5634
+ (_field_tsType = field.tsType) !== null && _field_tsType !== void 0 ? _field_tsType : '',
5635
+ field.optional ? 'yes' : 'no',
5636
+ truncate(field.converter, 60)
5637
+ ]);
5638
+ }
5639
+ } catch (err) {
5640
+ _didIteratorError = true;
5641
+ _iteratorError = err;
5642
+ } finally{
5643
+ try {
5644
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5645
+ _iterator.return();
5646
+ }
5647
+ } finally{
5648
+ if (_didIteratorError) {
5649
+ throw _iteratorError;
5650
+ }
5651
+ }
5652
+ }
5653
+ out.push(indentLines$1(renderTable(rows), indent));
5654
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
5655
+ try {
5656
+ for(var _iterator1 = fields[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
5657
+ var field1 = _step1.value;
5658
+ if (field1.nestedFields && field1.nestedFields.length > 0) {
5659
+ var label = field1.nestedIsArray ? 'array element' : 'sub-object';
5660
+ out.push(indentLines$1("↳ ".concat(field1.name, " (").concat(label, ", ").concat(field1.nestedFields.length, " field").concat(field1.nestedFields.length === 1 ? '' : 's', ")"), indent + 2));
5661
+ out.push(renderFieldsTree(field1.nestedFields, indent + 4));
5662
+ }
5663
+ }
5664
+ } catch (err) {
5665
+ _didIteratorError1 = true;
5666
+ _iteratorError1 = err;
5667
+ } finally{
5668
+ try {
5669
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
5670
+ _iterator1.return();
5671
+ }
5672
+ } finally{
5673
+ if (_didIteratorError1) {
5674
+ throw _iteratorError1;
5675
+ }
5676
+ }
5677
+ }
5678
+ return out.join('\n');
5679
+ }
5680
+ function renderTable(rows) {
5681
+ if (rows.length === 0) return '';
5682
+ var widths = [];
5683
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5684
+ try {
5685
+ for(var _iterator = rows[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5686
+ var row = _step.value;
5687
+ row.forEach(function(cell, i) {
5688
+ var _widths_i;
5689
+ var cellWidth = cell.length;
5690
+ widths[i] = Math.max((_widths_i = widths[i]) !== null && _widths_i !== void 0 ? _widths_i : 0, cellWidth);
5691
+ });
5692
+ }
5693
+ } catch (err) {
5694
+ _didIteratorError = true;
5695
+ _iteratorError = err;
5696
+ } finally{
5697
+ try {
5698
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5699
+ _iterator.return();
5700
+ }
5701
+ } finally{
5702
+ if (_didIteratorError) {
5703
+ throw _iteratorError;
5704
+ }
5705
+ }
5706
+ }
5707
+ return rows.map(function(row) {
5708
+ return row.map(function(cell, i) {
5709
+ var _widths_i;
5710
+ return i === row.length - 1 ? cell : cell.padEnd((_widths_i = widths[i]) !== null && _widths_i !== void 0 ? _widths_i : 0);
5711
+ }).join(' ').replace(/\s+$/, '');
5712
+ }).join('\n');
5713
+ }
5714
+ function truncate(text, max) {
5715
+ if (text.length <= max) return text;
5716
+ return text.slice(0, max - 1) + '…';
5717
+ }
5718
+ function indentLines$1(text, indent) {
5719
+ if (indent <= 0) return text;
5720
+ var pad = ' '.repeat(indent);
5721
+ return text.split('\n').map(function(line) {
5722
+ return line.length > 0 ? pad + line : line;
5723
+ }).join('\n');
5724
+ }
5725
+
5726
+ /**
5727
+ * Default command name for the model-info command. Top-level so it stays out
5728
+ * of the API-call namespace owned by `model <model> <action>`.
5729
+ */ var DEFAULT_MODEL_INFO_COMMAND_NAME = 'model-info';
5730
+ /**
5731
+ * Builds the top-level `model-info [model]` command.
5732
+ *
5733
+ * Without an argument: prints a column-aligned table summarising every model
5734
+ * in the manifest. With an argument: looks the model up by `modelType`,
5735
+ * `identityConst`, or `collectionPrefix` and prints its full per-field
5736
+ * documentation, recursing into nested converters when the manifest captured
5737
+ * them.
5738
+ *
5739
+ * Flags:
5740
+ * - `--json` emits a structured `{ ok, data }` envelope instead of the
5741
+ * human-readable table (useful for scripting or LLM agents).
5742
+ * - `--fields` prints only the field table for the resolved model.
5743
+ *
5744
+ * @param manifest - The generated model manifest (e.g. `DEMO_CLI_MODEL_MANIFEST`).
5745
+ * @param options - Optional overrides; see {@link BuildModelInfoCommandOptions}.
5746
+ * @returns A yargs `CommandModule` ready to be passed to `runCli({ configCommands })`.
5747
+ * @__NO_SIDE_EFFECTS__
5748
+ */ function buildModelInfoCommand(manifest, options) {
5749
+ var _ref;
5750
+ var commandName = (_ref = options === null || options === void 0 ? void 0 : options.commandName) !== null && _ref !== void 0 ? _ref : DEFAULT_MODEL_INFO_COMMAND_NAME;
5751
+ return {
5752
+ command: "".concat(commandName, " [model]"),
5753
+ describe: "Show generated catalog and field info for Firestore models (".concat(manifest.length, " model").concat(manifest.length === 1 ? '' : 's', ")."),
5754
+ builder: function builder(yargs) {
5755
+ return yargs.positional('model', {
5756
+ type: 'string',
5757
+ describe: 'Model to inspect (modelType, identity const, or collection prefix). Omit to list every model.'
5758
+ }).option('json', {
5759
+ type: 'boolean',
5760
+ default: false,
5761
+ describe: 'Emit a structured JSON envelope instead of the human-readable table.'
5762
+ }).option('fields', {
5763
+ type: 'boolean',
5764
+ default: false,
5765
+ describe: 'Print only the field table for the resolved model.'
5766
+ });
5767
+ },
5768
+ handler: function handler(argv) {
5769
+ try {
5770
+ runHandler(manifest, argv);
5771
+ } catch (e) {
5772
+ outputError(e);
5773
+ process.exit(1);
5774
+ }
5775
+ }
5776
+ };
5777
+ }
5778
+ function runHandler(manifest, argv) {
5779
+ var query = typeof argv.model === 'string' && argv.model.length > 0 ? argv.model : undefined;
5780
+ if (!query) {
5781
+ if (argv.json) {
5782
+ outputResult(manifest);
5783
+ return;
5784
+ }
5785
+ process.stdout.write(renderModelManifestList(manifest));
5786
+ return;
5787
+ }
5788
+ var entry = resolveCliModel(manifest, query);
5789
+ if (!entry) {
5790
+ throw new CliError({
5791
+ message: "No model matches '".concat(query, "'. Run `model-info` without an argument to list available models."),
5792
+ code: 'MODEL_INFO_NOT_FOUND'
5793
+ });
5794
+ }
5795
+ if (argv.json) {
5796
+ outputResult(entry);
5797
+ return;
5798
+ }
5799
+ if (argv.fields) {
5800
+ process.stdout.write(renderModelManifestFields(entry));
5801
+ return;
5802
+ }
5803
+ process.stdout.write(renderModelManifestEntry(entry));
5804
+ }
5805
+
5315
5806
  function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
5316
5807
  try {
5317
5808
  var info = gen[key](arg);
@@ -6739,6 +7230,10 @@ function _ts_generator$2(thisArg, body) {
6739
7230
  * @param input.defaultEnvs - Built-in env presets shipped with the CLI.
6740
7231
  * @param input.argv - Argv to parse. Defaults to `hideBin(process.argv)`.
6741
7232
  * @param input.disableCallPassthrough - When `true`, omits the built-in `call` passthrough.
7233
+ * @param input.modelManifest - Optional Firestore model manifest. When provided, auto-wires the
7234
+ * built-in `model-info` command. Opt-in per app.
7235
+ * @param input.disableModelInfo - When `true`, suppresses the auto-wired `model-info` command even
7236
+ * if {@link CreateCliInput.modelManifest} is provided.
6742
7237
  * @returns The configured yargs `Argv` ready to be `.parse()`-d.
6743
7238
  * @__NO_SIDE_EFFECTS__
6744
7239
  */ function createCli(input) {
@@ -6763,6 +7258,9 @@ function _ts_generator$2(thisArg, body) {
6763
7258
  cliName: cliName
6764
7259
  })
6765
7260
  ];
7261
+ if (input.modelManifest && input.disableModelInfo !== true) {
7262
+ builtInConfigCommands.push(buildModelInfoCommand(input.modelManifest));
7263
+ }
6766
7264
  var allConfigCommands = _to_consumable_array$1(builtInConfigCommands).concat(_to_consumable_array$1((_input_configCommands = input.configCommands) !== null && _input_configCommands !== void 0 ? _input_configCommands : []));
6767
7265
  var builtInApiCommands = input.disableCallPassthrough ? [] : [
6768
7266
  callPassthroughCommand
@@ -7220,7 +7718,8 @@ var DATA_HELP_FLAG = '--data-help';
7220
7718
  var context = {
7221
7719
  dataHelpFormat: dataHelpFormat,
7222
7720
  helpMode: helpMode,
7223
- hideOnFocus: hideOnFocus
7721
+ hideOnFocus: hideOnFocus,
7722
+ modelManifest: options === null || options === void 0 ? void 0 : options.modelManifest
7224
7723
  };
7225
7724
  return [
7226
7725
  {
@@ -7384,6 +7883,7 @@ function buildEntryCommand(entry, context) {
7384
7883
  var fallbackDescribe = "".concat(entry.verb).concat(specPart, " on ").concat(entry.model);
7385
7884
  var describeOneLine = (_oneLineDescription = oneLineDescription(entry.description)) !== null && _oneLineDescription !== void 0 ? _oneLineDescription : fallbackDescribe;
7386
7885
  var epilogue = buildEntryEpilogue(entry, context);
7886
+ var expandKeysAvailable = Boolean(context.modelManifest);
7387
7887
  return {
7388
7888
  command: action,
7389
7889
  describe: describeOneLine,
@@ -7392,6 +7892,13 @@ function buildEntryCommand(entry, context) {
7392
7892
  type: 'string',
7393
7893
  describe: 'JSON-encoded payload (defaults to {} when omitted)'
7394
7894
  });
7895
+ if (expandKeysAvailable) {
7896
+ y = y.option('expand-keys', {
7897
+ type: 'boolean',
7898
+ default: false,
7899
+ describe: "Rewrite the response payload's persisted short keys to their long-name form using the generated model manifest."
7900
+ });
7901
+ }
7395
7902
  hideGlobalOptions(y, context.hideOnFocus);
7396
7903
  return epilogue ? y.epilogue(epilogue) : y;
7397
7904
  },
@@ -7409,7 +7916,10 @@ function buildEntryCommand(entry, context) {
7409
7916
  ]);
7410
7917
  return [
7411
7918
  4,
7412
- callEntry(entry, typeof argv.data === 'string' ? argv.data : undefined)
7919
+ callEntry(entry, typeof argv.data === 'string' ? argv.data : undefined, {
7920
+ expandKeys: expandKeysAvailable && argv.expandKeys === true,
7921
+ modelManifest: context.modelManifest
7922
+ })
7413
7923
  ];
7414
7924
  case 1:
7415
7925
  _state.sent();
@@ -7734,9 +8244,9 @@ function readArktypeExpression(entry) {
7734
8244
  }
7735
8245
  return result;
7736
8246
  }
7737
- function callEntry(entry, rawData) {
8247
+ function callEntry(entry, rawData, options) {
7738
8248
  return _async_to_generator$1(function() {
7739
- var ctx, data, params, result;
8249
+ var ctx, data, params, result, finalResult;
7740
8250
  return _ts_generator$1(this, function(_state) {
7741
8251
  switch(_state.label){
7742
8252
  case 0:
@@ -7756,7 +8266,8 @@ function callEntry(entry, rawData) {
7756
8266
  ];
7757
8267
  case 1:
7758
8268
  result = _state.sent();
7759
- outputResult(result);
8269
+ finalResult = options.expandKeys && options.modelManifest ? expandModelKeys(entry.model, result, options.modelManifest) : result;
8270
+ outputResult(finalResult);
7760
8271
  return [
7761
8272
  2
7762
8273
  ];
@@ -8306,4 +8817,4 @@ function printPaginatedOutput(input) {
8306
8817
  })();
8307
8818
  }
8308
8819
 
8309
- 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 };
8820
+ 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, DEFAULT_MODEL_INFO_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, buildModelInfoCommand, callModelOverHttp, callPassthroughCommand, configureCliErrorMapper, configureCliSecretPatterns, configureOutputOptions, createAuthCommand, createAuthMiddleware, createCallModelCommand, createCli, createCliContext, createCliTokenCacheStore, createContextSlot, createDoctorCommand, createEnvCommand, createOutputCommand, createOutputMiddleware, defaultDoctorChecks, detectDataHelpFormat, detectHelpMode, discoverOidcMetadata, dumpTimestamp, exchangeAuthorizationCode, expandModelKeys, fetchUserInfo, filterReadOnlyModelScopes, findCliEnvDefault, findCliModelManifestEntry, generateOAuthState, generatePkceMaterial, getCliContext, getOutputOptions, isCliEnvConfigComplete, isTokenExpired, loadCliConfig, maskSecret, mergeCliConfig, mergeCliEnvWithDefault, mergeOutputConfig, openStreamingDump, outputError, outputResult, parsePastedRedirect, pickFields, promptLine, refreshAccessToken, renderModelManifestEntry, renderModelManifestFields, renderModelManifestList, requireCliContext, resolveActiveEnvName, resolveCliModel, resolveOutputConfig, revokeToken, runCli, runPaginatedList, sanitizeString, saveCliConfig, setCliContext, withCallModelArgs, withEnv, withMultiplePages, withOutput, wrapCommandHandler };