@base44-preview/cli 0.1.7-pr.559.bb696d5 → 0.1.7-pr.584.b9b7274

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/dist/cli/index.js CHANGED
@@ -119578,11 +119578,11 @@ function chooseDescription(descriptions, printWidth) {
119578
119578
  return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription;
119579
119579
  }
119580
119580
  function createSchema(SchemaConstructor, parameters) {
119581
- const schema15 = new SchemaConstructor(parameters);
119582
- const subSchema = Object.create(schema15);
119581
+ const schema13 = new SchemaConstructor(parameters);
119582
+ const subSchema = Object.create(schema13);
119583
119583
  for (const handlerKey of HANDLER_KEYS) {
119584
119584
  if (handlerKey in parameters) {
119585
- subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema15, Schema2.prototype[handlerKey].length);
119585
+ subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema13, Schema2.prototype[handlerKey].length);
119586
119586
  }
119587
119587
  }
119588
119588
  return subSchema;
@@ -122922,9 +122922,9 @@ function optionInfoToSchema(optionInfo, {
122922
122922
  throw new Error(`Unexpected type ${optionInfo.type}`);
122923
122923
  }
122924
122924
  if (optionInfo.exception) {
122925
- parameters.validate = (value, schema15, utils3) => optionInfo.exception(value) || schema15.validate(value, utils3);
122925
+ parameters.validate = (value, schema13, utils3) => optionInfo.exception(value) || schema13.validate(value, utils3);
122926
122926
  } else {
122927
- parameters.validate = (value, schema15, utils3) => value === undefined || schema15.validate(value, utils3);
122927
+ parameters.validate = (value, schema13, utils3) => value === undefined || schema13.validate(value, utils3);
122928
122928
  }
122929
122929
  if (optionInfo.redirect) {
122930
122930
  handlers.redirect = (value) => !value ? undefined : {
@@ -122939,7 +122939,7 @@ function optionInfoToSchema(optionInfo, {
122939
122939
  }
122940
122940
  if (isCLI && !optionInfo.array) {
122941
122941
  const originalPreprocess = parameters.preprocess || ((x10) => x10);
122942
- parameters.preprocess = (value, schema15, utils3) => schema15.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122942
+ parameters.preprocess = (value, schema13, utils3) => schema13.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122943
122943
  }
122944
122944
  return optionInfo.array ? ArraySchema.create({
122945
122945
  ...isCLI ? {
@@ -124516,9 +124516,9 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124516
124516
  };
124517
124517
  applyNormalization();
124518
124518
  for (const key2 of Object.keys(this._utils.schemas)) {
124519
- const schema15 = this._utils.schemas[key2];
124519
+ const schema13 = this._utils.schemas[key2];
124520
124520
  if (!(key2 in newOptions)) {
124521
- const defaultResult = normalizeDefaultResult(schema15.default(this._utils));
124521
+ const defaultResult = normalizeDefaultResult(schema13.default(this._utils));
124522
124522
  if ("value" in defaultResult) {
124523
124523
  restOptionsArray.push({ [key2]: defaultResult.value });
124524
124524
  }
@@ -124529,13 +124529,13 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124529
124529
  if (!(key2 in newOptions)) {
124530
124530
  continue;
124531
124531
  }
124532
- const schema15 = this._utils.schemas[key2];
124532
+ const schema13 = this._utils.schemas[key2];
124533
124533
  const value = newOptions[key2];
124534
- const newValue = schema15.postprocess(value, this._utils);
124534
+ const newValue = schema13.postprocess(value, this._utils);
124535
124535
  if (newValue === VALUE_UNCHANGED) {
124536
124536
  continue;
124537
124537
  }
124538
- this._applyValidation(newValue, key2, schema15);
124538
+ this._applyValidation(newValue, key2, schema13);
124539
124539
  newOptions[key2] = newValue;
124540
124540
  }
124541
124541
  this._applyPostprocess(newOptions);
@@ -124546,14 +124546,14 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124546
124546
  const transferredOptionsArray = [];
124547
124547
  const { knownKeys, unknownKeys } = this._partitionOptionKeys(options8);
124548
124548
  for (const key2 of knownKeys) {
124549
- const schema15 = this._utils.schemas[key2];
124550
- const value = schema15.preprocess(options8[key2], this._utils);
124551
- this._applyValidation(value, key2, schema15);
124549
+ const schema13 = this._utils.schemas[key2];
124550
+ const value = schema13.preprocess(options8[key2], this._utils);
124551
+ this._applyValidation(value, key2, schema13);
124552
124552
  const appendTransferredOptions = ({ from, to: to5 }) => {
124553
124553
  transferredOptionsArray.push(typeof to5 === "string" ? { [to5]: from } : { [to5.key]: to5.value });
124554
124554
  };
124555
124555
  const warnDeprecated = ({ value: currentValue, redirectTo }) => {
124556
- const deprecatedResult = normalizeDeprecatedResult(schema15.deprecated(currentValue, this._utils), value, true);
124556
+ const deprecatedResult = normalizeDeprecatedResult(schema13.deprecated(currentValue, this._utils), value, true);
124557
124557
  if (deprecatedResult === false) {
124558
124558
  return;
124559
124559
  }
@@ -124571,13 +124571,13 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124571
124571
  }
124572
124572
  }
124573
124573
  };
124574
- const forwardResult = normalizeForwardResult(schema15.forward(value, this._utils), value);
124574
+ const forwardResult = normalizeForwardResult(schema13.forward(value, this._utils), value);
124575
124575
  forwardResult.forEach(appendTransferredOptions);
124576
- const redirectResult = normalizeRedirectResult(schema15.redirect(value, this._utils), value);
124576
+ const redirectResult = normalizeRedirectResult(schema13.redirect(value, this._utils), value);
124577
124577
  redirectResult.redirect.forEach(appendTransferredOptions);
124578
124578
  if ("remain" in redirectResult) {
124579
124579
  const remainingValue = redirectResult.remain;
124580
- newOptions[key2] = key2 in newOptions ? schema15.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124580
+ newOptions[key2] = key2 in newOptions ? schema13.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124581
124581
  warnDeprecated({ value: remainingValue });
124582
124582
  }
124583
124583
  for (const { from, to: to5 } of redirectResult.redirect) {
@@ -124605,8 +124605,8 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124605
124605
  const [knownKeys, unknownKeys] = partition(Object.keys(options8).filter((key2) => !this._identifyMissing(key2, options8)), (key2) => (key2 in this._utils.schemas));
124606
124606
  return { knownKeys, unknownKeys };
124607
124607
  }
124608
- _applyValidation(value, key2, schema15) {
124609
- const validateResult = normalizeValidateResult(schema15.validate(value, this._utils), value);
124608
+ _applyValidation(value, key2, schema13) {
124609
+ const validateResult = normalizeValidateResult(schema13.validate(value, this._utils), value);
124610
124610
  if (validateResult !== true) {
124611
124611
  throw this._invalidHandler(key2, validateResult.value, this._utils);
124612
124612
  }
@@ -124648,8 +124648,8 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124648
124648
  for (const key2 of unknownKeys) {
124649
124649
  const value = postprocessed.override[key2];
124650
124650
  this._applyUnknownHandler(key2, value, options8, (knownResultKey, knownResultValue) => {
124651
- const schema15 = this._utils.schemas[knownResultKey];
124652
- this._applyValidation(knownResultValue, knownResultKey, schema15);
124651
+ const schema13 = this._utils.schemas[knownResultKey];
124652
+ this._applyValidation(knownResultValue, knownResultKey, schema13);
124653
124653
  options8[knownResultKey] = knownResultValue;
124654
124654
  });
124655
124655
  }
@@ -138362,23 +138362,23 @@ var require_JSONSchema = __commonJS((exports) => {
138362
138362
  exports.Parent = Symbol("Parent");
138363
138363
  exports.Types = Symbol("Types");
138364
138364
  exports.Intersection = Symbol("Intersection");
138365
- exports.getRootSchema = (0, lodash_1.memoize)((schema15) => {
138366
- const parent = schema15[exports.Parent];
138365
+ exports.getRootSchema = (0, lodash_1.memoize)((schema13) => {
138366
+ const parent = schema13[exports.Parent];
138367
138367
  if (!parent) {
138368
- return schema15;
138368
+ return schema13;
138369
138369
  }
138370
138370
  return (0, exports.getRootSchema)(parent);
138371
138371
  });
138372
- function isBoolean(schema15) {
138373
- return schema15 === true || schema15 === false;
138372
+ function isBoolean(schema13) {
138373
+ return schema13 === true || schema13 === false;
138374
138374
  }
138375
138375
  exports.isBoolean = isBoolean;
138376
- function isPrimitive(schema15) {
138377
- return !(0, lodash_1.isPlainObject)(schema15);
138376
+ function isPrimitive(schema13) {
138377
+ return !(0, lodash_1.isPlainObject)(schema13);
138378
138378
  }
138379
138379
  exports.isPrimitive = isPrimitive;
138380
- function isCompound(schema15) {
138381
- return Array.isArray(schema15.type) || "anyOf" in schema15 || "oneOf" in schema15;
138380
+ function isCompound(schema13) {
138381
+ return Array.isArray(schema13.type) || "anyOf" in schema13 || "oneOf" in schema13;
138382
138382
  }
138383
138383
  exports.isCompound = isCompound;
138384
138384
  });
@@ -138605,9 +138605,9 @@ var require_type2 = __commonJS((exports, module) => {
138605
138605
  var require_schema5 = __commonJS((exports, module) => {
138606
138606
  var YAMLException = require_exception2();
138607
138607
  var Type = require_type2();
138608
- function compileList(schema15, name2) {
138608
+ function compileList(schema13, name2) {
138609
138609
  var result = [];
138610
- schema15[name2].forEach(function(currentType) {
138610
+ schema13[name2].forEach(function(currentType) {
138611
138611
  var newIndex = result.length;
138612
138612
  result.forEach(function(previousType, previousIndex) {
138613
138613
  if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
@@ -140552,7 +140552,7 @@ var require_dumper2 = __commonJS((exports, module) => {
140552
140552
  "OFF"
140553
140553
  ];
140554
140554
  var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
140555
- function compileStyleMap(schema15, map2) {
140555
+ function compileStyleMap(schema13, map2) {
140556
140556
  var result, keys, index, length, tag, style, type;
140557
140557
  if (map2 === null)
140558
140558
  return {};
@@ -140564,7 +140564,7 @@ var require_dumper2 = __commonJS((exports, module) => {
140564
140564
  if (tag.slice(0, 2) === "!!") {
140565
140565
  tag = "tag:yaml.org,2002:" + tag.slice(2);
140566
140566
  }
140567
- type = schema15.compiledTypeMap["fallback"][tag];
140567
+ type = schema13.compiledTypeMap["fallback"][tag];
140568
140568
  if (type && _hasOwnProperty.call(type.styleAliases, style)) {
140569
140569
  style = type.styleAliases[style];
140570
140570
  }
@@ -141223,11 +141223,11 @@ var require_utils7 = __commonJS((exports) => {
141223
141223
  function traverseArray(arr, callback, processed) {
141224
141224
  arr.forEach((s5, k9) => traverse(s5, callback, processed, k9.toString()));
141225
141225
  }
141226
- function traverseIntersection(schema15, callback, processed) {
141227
- if (typeof schema15 !== "object" || !schema15) {
141226
+ function traverseIntersection(schema13, callback, processed) {
141227
+ if (typeof schema13 !== "object" || !schema13) {
141228
141228
  return;
141229
141229
  }
141230
- const r5 = schema15;
141230
+ const r5 = schema13;
141231
141231
  const intersection2 = r5[JSONSchema_1.Intersection];
141232
141232
  if (!intersection2) {
141233
141233
  return;
@@ -141236,60 +141236,60 @@ var require_utils7 = __commonJS((exports) => {
141236
141236
  traverseArray(intersection2.allOf, callback, processed);
141237
141237
  }
141238
141238
  }
141239
- function traverse(schema15, callback, processed = new Set, key2) {
141240
- if (processed.has(schema15)) {
141239
+ function traverse(schema13, callback, processed = new Set, key2) {
141240
+ if (processed.has(schema13)) {
141241
141241
  return;
141242
141242
  }
141243
- processed.add(schema15);
141244
- callback(schema15, key2 !== null && key2 !== undefined ? key2 : null);
141245
- if (schema15.anyOf) {
141246
- traverseArray(schema15.anyOf, callback, processed);
141243
+ processed.add(schema13);
141244
+ callback(schema13, key2 !== null && key2 !== undefined ? key2 : null);
141245
+ if (schema13.anyOf) {
141246
+ traverseArray(schema13.anyOf, callback, processed);
141247
141247
  }
141248
- if (schema15.allOf) {
141249
- traverseArray(schema15.allOf, callback, processed);
141248
+ if (schema13.allOf) {
141249
+ traverseArray(schema13.allOf, callback, processed);
141250
141250
  }
141251
- if (schema15.oneOf) {
141252
- traverseArray(schema15.oneOf, callback, processed);
141251
+ if (schema13.oneOf) {
141252
+ traverseArray(schema13.oneOf, callback, processed);
141253
141253
  }
141254
- if (schema15.properties) {
141255
- traverseObjectKeys(schema15.properties, callback, processed);
141254
+ if (schema13.properties) {
141255
+ traverseObjectKeys(schema13.properties, callback, processed);
141256
141256
  }
141257
- if (schema15.patternProperties) {
141258
- traverseObjectKeys(schema15.patternProperties, callback, processed);
141257
+ if (schema13.patternProperties) {
141258
+ traverseObjectKeys(schema13.patternProperties, callback, processed);
141259
141259
  }
141260
- if (schema15.additionalProperties && typeof schema15.additionalProperties === "object") {
141261
- traverse(schema15.additionalProperties, callback, processed);
141260
+ if (schema13.additionalProperties && typeof schema13.additionalProperties === "object") {
141261
+ traverse(schema13.additionalProperties, callback, processed);
141262
141262
  }
141263
- if (schema15.items) {
141264
- const { items } = schema15;
141263
+ if (schema13.items) {
141264
+ const { items } = schema13;
141265
141265
  if (Array.isArray(items)) {
141266
141266
  traverseArray(items, callback, processed);
141267
141267
  } else {
141268
141268
  traverse(items, callback, processed);
141269
141269
  }
141270
141270
  }
141271
- if (schema15.additionalItems && typeof schema15.additionalItems === "object") {
141272
- traverse(schema15.additionalItems, callback, processed);
141271
+ if (schema13.additionalItems && typeof schema13.additionalItems === "object") {
141272
+ traverse(schema13.additionalItems, callback, processed);
141273
141273
  }
141274
- if (schema15.dependencies) {
141275
- if (Array.isArray(schema15.dependencies)) {
141276
- traverseArray(schema15.dependencies, callback, processed);
141274
+ if (schema13.dependencies) {
141275
+ if (Array.isArray(schema13.dependencies)) {
141276
+ traverseArray(schema13.dependencies, callback, processed);
141277
141277
  } else {
141278
- traverseObjectKeys(schema15.dependencies, callback, processed);
141278
+ traverseObjectKeys(schema13.dependencies, callback, processed);
141279
141279
  }
141280
141280
  }
141281
- if (schema15.definitions) {
141282
- traverseObjectKeys(schema15.definitions, callback, processed);
141281
+ if (schema13.definitions) {
141282
+ traverseObjectKeys(schema13.definitions, callback, processed);
141283
141283
  }
141284
- if (schema15.$defs) {
141285
- traverseObjectKeys(schema15.$defs, callback, processed);
141284
+ if (schema13.$defs) {
141285
+ traverseObjectKeys(schema13.$defs, callback, processed);
141286
141286
  }
141287
- if (schema15.not) {
141288
- traverse(schema15.not, callback, processed);
141287
+ if (schema13.not) {
141288
+ traverse(schema13.not, callback, processed);
141289
141289
  }
141290
- traverseIntersection(schema15, callback, processed);
141291
- Object.keys(schema15).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141292
- const child = schema15[key3];
141290
+ traverseIntersection(schema13, callback, processed);
141291
+ Object.keys(schema13).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141292
+ const child = schema13[key3];
141293
141293
  if (child && typeof child === "object") {
141294
141294
  traverseObjectKeys(child, callback, processed);
141295
141295
  }
@@ -141371,14 +141371,14 @@ var require_utils7 = __commonJS((exports) => {
141371
141371
  return (_g2 = color()) === null || _g2 === undefined ? undefined : _g2.whiteBright.bgYellow;
141372
141372
  }
141373
141373
  }
141374
- function escapeBlockComment(schema15) {
141374
+ function escapeBlockComment(schema13) {
141375
141375
  const replacer = "* /";
141376
- if (schema15 === null || typeof schema15 !== "object") {
141376
+ if (schema13 === null || typeof schema13 !== "object") {
141377
141377
  return;
141378
141378
  }
141379
- for (const key2 of Object.keys(schema15)) {
141380
- if (key2 === "description" && typeof schema15[key2] === "string") {
141381
- schema15[key2] = schema15[key2].replace(/\*\//g, replacer);
141379
+ for (const key2 of Object.keys(schema13)) {
141380
+ if (key2 === "description" && typeof schema13[key2] === "string") {
141381
+ schema13[key2] = schema13[key2].replace(/\*\//g, replacer);
141382
141382
  }
141383
141383
  }
141384
141384
  }
@@ -141390,45 +141390,45 @@ var require_utils7 = __commonJS((exports) => {
141390
141390
  return path_1.posix.join(path_1.posix.normalize(outputPath), ...filePathRel);
141391
141391
  }
141392
141392
  exports.pathTransform = pathTransform;
141393
- function maybeStripDefault(schema15) {
141394
- if (!("default" in schema15)) {
141395
- return schema15;
141393
+ function maybeStripDefault(schema13) {
141394
+ if (!("default" in schema13)) {
141395
+ return schema13;
141396
141396
  }
141397
- switch (schema15.type) {
141397
+ switch (schema13.type) {
141398
141398
  case "array":
141399
- if (Array.isArray(schema15.default)) {
141400
- return schema15;
141399
+ if (Array.isArray(schema13.default)) {
141400
+ return schema13;
141401
141401
  }
141402
141402
  break;
141403
141403
  case "boolean":
141404
- if (typeof schema15.default === "boolean") {
141405
- return schema15;
141404
+ if (typeof schema13.default === "boolean") {
141405
+ return schema13;
141406
141406
  }
141407
141407
  break;
141408
141408
  case "integer":
141409
141409
  case "number":
141410
- if (typeof schema15.default === "number") {
141411
- return schema15;
141410
+ if (typeof schema13.default === "number") {
141411
+ return schema13;
141412
141412
  }
141413
141413
  break;
141414
141414
  case "string":
141415
- if (typeof schema15.default === "string") {
141416
- return schema15;
141415
+ if (typeof schema13.default === "string") {
141416
+ return schema13;
141417
141417
  }
141418
141418
  break;
141419
141419
  case "null":
141420
- if (schema15.default === null) {
141421
- return schema15;
141420
+ if (schema13.default === null) {
141421
+ return schema13;
141422
141422
  }
141423
141423
  break;
141424
141424
  case "object":
141425
- if ((0, lodash_1.isPlainObject)(schema15.default)) {
141426
- return schema15;
141425
+ if ((0, lodash_1.isPlainObject)(schema13.default)) {
141426
+ return schema13;
141427
141427
  }
141428
141428
  break;
141429
141429
  }
141430
- delete schema15.default;
141431
- return schema15;
141430
+ delete schema13.default;
141431
+ return schema13;
141432
141432
  }
141433
141433
  exports.maybeStripDefault = maybeStripDefault;
141434
141434
  function appendToDescription(existingDescription, ...values) {
@@ -141442,11 +141442,11 @@ ${values.join(`
141442
141442
  `);
141443
141443
  }
141444
141444
  exports.appendToDescription = appendToDescription;
141445
- function isSchemaLike(schema15) {
141446
- if (!(0, lodash_1.isPlainObject)(schema15)) {
141445
+ function isSchemaLike(schema13) {
141446
+ if (!(0, lodash_1.isPlainObject)(schema13)) {
141447
141447
  return false;
141448
141448
  }
141449
- const parent = schema15[JSONSchema_1.Parent];
141449
+ const parent = schema13[JSONSchema_1.Parent];
141450
141450
  if (parent === null) {
141451
141451
  return true;
141452
141452
  }
@@ -141463,7 +141463,7 @@ ${values.join(`
141463
141463
  "properties",
141464
141464
  "required"
141465
141465
  ];
141466
- if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema15)) {
141466
+ if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema13)) {
141467
141467
  return false;
141468
141468
  }
141469
141469
  return true;
@@ -141761,13 +141761,13 @@ var require_typesOfSchema = __commonJS((exports) => {
141761
141761
  exports.typesOfSchema = undefined;
141762
141762
  var lodash_1 = require_lodash8();
141763
141763
  var JSONSchema_1 = require_JSONSchema();
141764
- function typesOfSchema(schema15) {
141765
- if (schema15.tsType) {
141764
+ function typesOfSchema(schema13) {
141765
+ if (schema13.tsType) {
141766
141766
  return new Set(["CUSTOM_TYPE"]);
141767
141767
  }
141768
141768
  const matchedTypes = new Set;
141769
141769
  for (const [schemaType, f7] of Object.entries(matchers)) {
141770
- if (f7(schema15)) {
141770
+ if (f7(schema13)) {
141771
141771
  matchedTypes.add(schemaType);
141772
141772
  }
141773
141773
  }
@@ -141778,26 +141778,26 @@ var require_typesOfSchema = __commonJS((exports) => {
141778
141778
  }
141779
141779
  exports.typesOfSchema = typesOfSchema;
141780
141780
  var matchers = {
141781
- ALL_OF(schema15) {
141782
- return "allOf" in schema15;
141781
+ ALL_OF(schema13) {
141782
+ return "allOf" in schema13;
141783
141783
  },
141784
- ANY(schema15) {
141785
- if (Object.keys(schema15).length === 0) {
141784
+ ANY(schema13) {
141785
+ if (Object.keys(schema13).length === 0) {
141786
141786
  return true;
141787
141787
  }
141788
- return schema15.type === "any";
141788
+ return schema13.type === "any";
141789
141789
  },
141790
- ANY_OF(schema15) {
141791
- return "anyOf" in schema15;
141790
+ ANY_OF(schema13) {
141791
+ return "anyOf" in schema13;
141792
141792
  },
141793
- BOOLEAN(schema15) {
141794
- if ("enum" in schema15) {
141793
+ BOOLEAN(schema13) {
141794
+ if ("enum" in schema13) {
141795
141795
  return false;
141796
141796
  }
141797
- if (schema15.type === "boolean") {
141797
+ if (schema13.type === "boolean") {
141798
141798
  return true;
141799
141799
  }
141800
- if (!(0, JSONSchema_1.isCompound)(schema15) && typeof schema15.default === "boolean") {
141800
+ if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "boolean") {
141801
141801
  return true;
141802
141802
  }
141803
141803
  return false;
@@ -141805,74 +141805,74 @@ var require_typesOfSchema = __commonJS((exports) => {
141805
141805
  CUSTOM_TYPE() {
141806
141806
  return false;
141807
141807
  },
141808
- NAMED_ENUM(schema15) {
141809
- return "enum" in schema15 && "tsEnumNames" in schema15;
141808
+ NAMED_ENUM(schema13) {
141809
+ return "enum" in schema13 && "tsEnumNames" in schema13;
141810
141810
  },
141811
- NAMED_SCHEMA(schema15) {
141812
- return "$id" in schema15 && (("patternProperties" in schema15) || ("properties" in schema15));
141811
+ NAMED_SCHEMA(schema13) {
141812
+ return "$id" in schema13 && (("patternProperties" in schema13) || ("properties" in schema13));
141813
141813
  },
141814
- NEVER(schema15) {
141815
- return schema15 === false;
141814
+ NEVER(schema13) {
141815
+ return schema13 === false;
141816
141816
  },
141817
- NULL(schema15) {
141818
- return schema15.type === "null";
141817
+ NULL(schema13) {
141818
+ return schema13.type === "null";
141819
141819
  },
141820
- NUMBER(schema15) {
141821
- if ("enum" in schema15) {
141820
+ NUMBER(schema13) {
141821
+ if ("enum" in schema13) {
141822
141822
  return false;
141823
141823
  }
141824
- if (schema15.type === "integer" || schema15.type === "number") {
141824
+ if (schema13.type === "integer" || schema13.type === "number") {
141825
141825
  return true;
141826
141826
  }
141827
- if (!(0, JSONSchema_1.isCompound)(schema15) && typeof schema15.default === "number") {
141827
+ if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "number") {
141828
141828
  return true;
141829
141829
  }
141830
141830
  return false;
141831
141831
  },
141832
- OBJECT(schema15) {
141833
- return schema15.type === "object" && !(0, lodash_1.isPlainObject)(schema15.additionalProperties) && !schema15.allOf && !schema15.anyOf && !schema15.oneOf && !schema15.patternProperties && !schema15.properties && !schema15.required;
141832
+ OBJECT(schema13) {
141833
+ return schema13.type === "object" && !(0, lodash_1.isPlainObject)(schema13.additionalProperties) && !schema13.allOf && !schema13.anyOf && !schema13.oneOf && !schema13.patternProperties && !schema13.properties && !schema13.required;
141834
141834
  },
141835
- ONE_OF(schema15) {
141836
- return "oneOf" in schema15;
141835
+ ONE_OF(schema13) {
141836
+ return "oneOf" in schema13;
141837
141837
  },
141838
- REFERENCE(schema15) {
141839
- return "$ref" in schema15;
141838
+ REFERENCE(schema13) {
141839
+ return "$ref" in schema13;
141840
141840
  },
141841
- STRING(schema15) {
141842
- if ("enum" in schema15) {
141841
+ STRING(schema13) {
141842
+ if ("enum" in schema13) {
141843
141843
  return false;
141844
141844
  }
141845
- if (schema15.type === "string") {
141845
+ if (schema13.type === "string") {
141846
141846
  return true;
141847
141847
  }
141848
- if (!(0, JSONSchema_1.isCompound)(schema15) && typeof schema15.default === "string") {
141848
+ if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "string") {
141849
141849
  return true;
141850
141850
  }
141851
141851
  return false;
141852
141852
  },
141853
- TYPED_ARRAY(schema15) {
141854
- if (schema15.type && schema15.type !== "array") {
141853
+ TYPED_ARRAY(schema13) {
141854
+ if (schema13.type && schema13.type !== "array") {
141855
141855
  return false;
141856
141856
  }
141857
- return "items" in schema15;
141857
+ return "items" in schema13;
141858
141858
  },
141859
- UNION(schema15) {
141860
- return Array.isArray(schema15.type);
141859
+ UNION(schema13) {
141860
+ return Array.isArray(schema13.type);
141861
141861
  },
141862
- UNNAMED_ENUM(schema15) {
141863
- if ("tsEnumNames" in schema15) {
141862
+ UNNAMED_ENUM(schema13) {
141863
+ if ("tsEnumNames" in schema13) {
141864
141864
  return false;
141865
141865
  }
141866
- if (schema15.type && schema15.type !== "boolean" && schema15.type !== "integer" && schema15.type !== "number" && schema15.type !== "string") {
141866
+ if (schema13.type && schema13.type !== "boolean" && schema13.type !== "integer" && schema13.type !== "number" && schema13.type !== "string") {
141867
141867
  return false;
141868
141868
  }
141869
- return "enum" in schema15;
141869
+ return "enum" in schema13;
141870
141870
  },
141871
141871
  UNNAMED_SCHEMA() {
141872
141872
  return false;
141873
141873
  },
141874
- UNTYPED_ARRAY(schema15) {
141875
- return schema15.type === "array" && !("items" in schema15);
141874
+ UNTYPED_ARRAY(schema13) {
141875
+ return schema13.type === "array" && !("items" in schema13);
141876
141876
  }
141877
141877
  };
141878
141878
  });
@@ -141883,10 +141883,10 @@ var require_applySchemaTyping = __commonJS((exports) => {
141883
141883
  exports.applySchemaTyping = undefined;
141884
141884
  var JSONSchema_1 = require_JSONSchema();
141885
141885
  var typesOfSchema_1 = require_typesOfSchema();
141886
- function applySchemaTyping(schema15) {
141886
+ function applySchemaTyping(schema13) {
141887
141887
  var _a7;
141888
- const types = (0, typesOfSchema_1.typesOfSchema)(schema15);
141889
- Object.defineProperty(schema15, JSONSchema_1.Types, {
141888
+ const types = (0, typesOfSchema_1.typesOfSchema)(schema13);
141889
+ Object.defineProperty(schema13, JSONSchema_1.Types, {
141890
141890
  enumerable: false,
141891
141891
  value: types,
141892
141892
  writable: false
@@ -141895,23 +141895,23 @@ var require_applySchemaTyping = __commonJS((exports) => {
141895
141895
  return;
141896
141896
  }
141897
141897
  const intersection2 = {
141898
- [JSONSchema_1.Parent]: schema15,
141898
+ [JSONSchema_1.Parent]: schema13,
141899
141899
  [JSONSchema_1.Types]: new Set(["ALL_OF"]),
141900
- $id: schema15.$id,
141901
- description: schema15.description,
141902
- name: schema15.name,
141903
- title: schema15.title,
141904
- allOf: (_a7 = schema15.allOf) !== null && _a7 !== undefined ? _a7 : [],
141900
+ $id: schema13.$id,
141901
+ description: schema13.description,
141902
+ name: schema13.name,
141903
+ title: schema13.title,
141904
+ allOf: (_a7 = schema13.allOf) !== null && _a7 !== undefined ? _a7 : [],
141905
141905
  required: [],
141906
141906
  additionalProperties: false
141907
141907
  };
141908
141908
  types.delete("ALL_OF");
141909
- delete schema15.allOf;
141910
- delete schema15.$id;
141911
- delete schema15.description;
141912
- delete schema15.name;
141913
- delete schema15.title;
141914
- Object.defineProperty(schema15, JSONSchema_1.Intersection, {
141909
+ delete schema13.allOf;
141910
+ delete schema13.$id;
141911
+ delete schema13.description;
141912
+ delete schema13.name;
141913
+ delete schema13.title;
141914
+ Object.defineProperty(schema13, JSONSchema_1.Intersection, {
141915
141915
  enumerable: false,
141916
141916
  value: intersection2,
141917
141917
  writable: false
@@ -141929,186 +141929,186 @@ var require_normalizer = __commonJS((exports) => {
141929
141929
  var applySchemaTyping_1 = require_applySchemaTyping();
141930
141930
  var util_1 = __require("util");
141931
141931
  var rules = new Map;
141932
- function hasType(schema15, type) {
141933
- return schema15.type === type || Array.isArray(schema15.type) && schema15.type.includes(type);
141932
+ function hasType(schema13, type) {
141933
+ return schema13.type === type || Array.isArray(schema13.type) && schema13.type.includes(type);
141934
141934
  }
141935
- function isObjectType(schema15) {
141936
- return schema15.properties !== undefined || hasType(schema15, "object") || hasType(schema15, "any");
141935
+ function isObjectType(schema13) {
141936
+ return schema13.properties !== undefined || hasType(schema13, "object") || hasType(schema13, "any");
141937
141937
  }
141938
- function isArrayType(schema15) {
141939
- return schema15.items !== undefined || hasType(schema15, "array") || hasType(schema15, "any");
141938
+ function isArrayType(schema13) {
141939
+ return schema13.items !== undefined || hasType(schema13, "array") || hasType(schema13, "any");
141940
141940
  }
141941
- function isEnumTypeWithoutTsEnumNames(schema15) {
141942
- return schema15.type === "string" && schema15.enum !== undefined && schema15.tsEnumNames === undefined;
141941
+ function isEnumTypeWithoutTsEnumNames(schema13) {
141942
+ return schema13.type === "string" && schema13.enum !== undefined && schema13.tsEnumNames === undefined;
141943
141943
  }
141944
- rules.set('Remove `type=["null"]` if `enum=[null]`', (schema15) => {
141945
- if (Array.isArray(schema15.enum) && schema15.enum.some((e8) => e8 === null) && Array.isArray(schema15.type) && schema15.type.includes("null")) {
141946
- schema15.type = schema15.type.filter((type) => type !== "null");
141944
+ rules.set('Remove `type=["null"]` if `enum=[null]`', (schema13) => {
141945
+ if (Array.isArray(schema13.enum) && schema13.enum.some((e8) => e8 === null) && Array.isArray(schema13.type) && schema13.type.includes("null")) {
141946
+ schema13.type = schema13.type.filter((type) => type !== "null");
141947
141947
  }
141948
141948
  });
141949
- rules.set("Destructure unary types", (schema15) => {
141950
- if (schema15.type && Array.isArray(schema15.type) && schema15.type.length === 1) {
141951
- schema15.type = schema15.type[0];
141949
+ rules.set("Destructure unary types", (schema13) => {
141950
+ if (schema13.type && Array.isArray(schema13.type) && schema13.type.length === 1) {
141951
+ schema13.type = schema13.type[0];
141952
141952
  }
141953
141953
  });
141954
- rules.set("Add empty `required` property if none is defined", (schema15) => {
141955
- if (isObjectType(schema15) && !("required" in schema15)) {
141956
- schema15.required = [];
141954
+ rules.set("Add empty `required` property if none is defined", (schema13) => {
141955
+ if (isObjectType(schema13) && !("required" in schema13)) {
141956
+ schema13.required = [];
141957
141957
  }
141958
141958
  });
141959
- rules.set("Transform `required`=false to `required`=[]", (schema15) => {
141960
- if (schema15.required === false) {
141961
- schema15.required = [];
141959
+ rules.set("Transform `required`=false to `required`=[]", (schema13) => {
141960
+ if (schema13.required === false) {
141961
+ schema13.required = [];
141962
141962
  }
141963
141963
  });
141964
- rules.set("Default additionalProperties", (schema15, _10, options8) => {
141965
- if (isObjectType(schema15) && !("additionalProperties" in schema15) && schema15.patternProperties === undefined) {
141966
- schema15.additionalProperties = options8.additionalProperties;
141964
+ rules.set("Default additionalProperties", (schema13, _10, options8) => {
141965
+ if (isObjectType(schema13) && !("additionalProperties" in schema13) && schema13.patternProperties === undefined) {
141966
+ schema13.additionalProperties = options8.additionalProperties;
141967
141967
  }
141968
141968
  });
141969
- rules.set("Transform id to $id", (schema15, fileName) => {
141970
- if (!(0, utils_1.isSchemaLike)(schema15)) {
141969
+ rules.set("Transform id to $id", (schema13, fileName) => {
141970
+ if (!(0, utils_1.isSchemaLike)(schema13)) {
141971
141971
  return;
141972
141972
  }
141973
- if (schema15.id && schema15.$id && schema15.id !== schema15.$id) {
141974
- throw ReferenceError(`Schema must define either id or $id, not both. Given id=${schema15.id}, $id=${schema15.$id} in ${fileName}`);
141973
+ if (schema13.id && schema13.$id && schema13.id !== schema13.$id) {
141974
+ throw ReferenceError(`Schema must define either id or $id, not both. Given id=${schema13.id}, $id=${schema13.$id} in ${fileName}`);
141975
141975
  }
141976
- if (schema15.id) {
141977
- schema15.$id = schema15.id;
141978
- delete schema15.id;
141976
+ if (schema13.id) {
141977
+ schema13.$id = schema13.id;
141978
+ delete schema13.id;
141979
141979
  }
141980
141980
  });
141981
- rules.set("Add an $id to anything that needs it", (schema15, fileName, _options, _key, dereferencedPaths) => {
141982
- if (!(0, utils_1.isSchemaLike)(schema15)) {
141981
+ rules.set("Add an $id to anything that needs it", (schema13, fileName, _options, _key, dereferencedPaths) => {
141982
+ if (!(0, utils_1.isSchemaLike)(schema13)) {
141983
141983
  return;
141984
141984
  }
141985
- if (!schema15.$id && !schema15[JSONSchema_1.Parent]) {
141986
- schema15.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141985
+ if (!schema13.$id && !schema13[JSONSchema_1.Parent]) {
141986
+ schema13.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141987
141987
  return;
141988
141988
  }
141989
- if (!isArrayType(schema15) && !isObjectType(schema15)) {
141989
+ if (!isArrayType(schema13) && !isObjectType(schema13)) {
141990
141990
  return;
141991
141991
  }
141992
- const dereferencedName = dereferencedPaths.get(schema15);
141993
- if (!schema15.$id && !schema15.title && dereferencedName) {
141994
- schema15.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(dereferencedName));
141992
+ const dereferencedName = dereferencedPaths.get(schema13);
141993
+ if (!schema13.$id && !schema13.title && dereferencedName) {
141994
+ schema13.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(dereferencedName));
141995
141995
  }
141996
141996
  if (dereferencedName) {
141997
- dereferencedPaths.delete(schema15);
141997
+ dereferencedPaths.delete(schema13);
141998
141998
  }
141999
141999
  });
142000
- rules.set("Escape closing JSDoc comment", (schema15) => {
142001
- (0, utils_1.escapeBlockComment)(schema15);
142000
+ rules.set("Escape closing JSDoc comment", (schema13) => {
142001
+ (0, utils_1.escapeBlockComment)(schema13);
142002
142002
  });
142003
- rules.set("Add JSDoc comments for minItems and maxItems", (schema15) => {
142004
- if (!isArrayType(schema15)) {
142003
+ rules.set("Add JSDoc comments for minItems and maxItems", (schema13) => {
142004
+ if (!isArrayType(schema13)) {
142005
142005
  return;
142006
142006
  }
142007
142007
  const commentsToAppend = [
142008
- "minItems" in schema15 ? `@minItems ${schema15.minItems}` : "",
142009
- "maxItems" in schema15 ? `@maxItems ${schema15.maxItems}` : ""
142008
+ "minItems" in schema13 ? `@minItems ${schema13.minItems}` : "",
142009
+ "maxItems" in schema13 ? `@maxItems ${schema13.maxItems}` : ""
142010
142010
  ].filter(Boolean);
142011
142011
  if (commentsToAppend.length) {
142012
- schema15.description = (0, utils_1.appendToDescription)(schema15.description, ...commentsToAppend);
142012
+ schema13.description = (0, utils_1.appendToDescription)(schema13.description, ...commentsToAppend);
142013
142013
  }
142014
142014
  });
142015
- rules.set("Optionally remove maxItems and minItems", (schema15, _fileName, options8) => {
142016
- if (!isArrayType(schema15)) {
142015
+ rules.set("Optionally remove maxItems and minItems", (schema13, _fileName, options8) => {
142016
+ if (!isArrayType(schema13)) {
142017
142017
  return;
142018
142018
  }
142019
- if ("minItems" in schema15 && options8.ignoreMinAndMaxItems) {
142020
- delete schema15.minItems;
142019
+ if ("minItems" in schema13 && options8.ignoreMinAndMaxItems) {
142020
+ delete schema13.minItems;
142021
142021
  }
142022
- if ("maxItems" in schema15 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142023
- delete schema15.maxItems;
142022
+ if ("maxItems" in schema13 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142023
+ delete schema13.maxItems;
142024
142024
  }
142025
142025
  });
142026
- rules.set("Normalize schema.minItems", (schema15, _fileName, options8) => {
142026
+ rules.set("Normalize schema.minItems", (schema13, _fileName, options8) => {
142027
142027
  if (options8.ignoreMinAndMaxItems) {
142028
142028
  return;
142029
142029
  }
142030
- if (!isArrayType(schema15)) {
142030
+ if (!isArrayType(schema13)) {
142031
142031
  return;
142032
142032
  }
142033
- const { minItems } = schema15;
142034
- schema15.minItems = typeof minItems === "number" ? minItems : 0;
142033
+ const { minItems } = schema13;
142034
+ schema13.minItems = typeof minItems === "number" ? minItems : 0;
142035
142035
  });
142036
- rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema15, _fileName, options8) => {
142036
+ rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema13, _fileName, options8) => {
142037
142037
  if (options8.ignoreMinAndMaxItems || options8.maxItems === -1) {
142038
142038
  return;
142039
142039
  }
142040
- if (!isArrayType(schema15)) {
142040
+ if (!isArrayType(schema13)) {
142041
142041
  return;
142042
142042
  }
142043
- const { maxItems, minItems } = schema15;
142043
+ const { maxItems, minItems } = schema13;
142044
142044
  if (maxItems !== undefined && maxItems - minItems > options8.maxItems) {
142045
- delete schema15.maxItems;
142045
+ delete schema13.maxItems;
142046
142046
  }
142047
142047
  });
142048
- rules.set("Normalize schema.items", (schema15, _fileName, options8) => {
142048
+ rules.set("Normalize schema.items", (schema13, _fileName, options8) => {
142049
142049
  if (options8.ignoreMinAndMaxItems) {
142050
142050
  return;
142051
142051
  }
142052
- const { maxItems, minItems } = schema15;
142052
+ const { maxItems, minItems } = schema13;
142053
142053
  const hasMaxItems = typeof maxItems === "number" && maxItems >= 0;
142054
142054
  const hasMinItems = typeof minItems === "number" && minItems > 0;
142055
- if (schema15.items && !Array.isArray(schema15.items) && (hasMaxItems || hasMinItems)) {
142056
- const items = schema15.items;
142055
+ if (schema13.items && !Array.isArray(schema13.items) && (hasMaxItems || hasMinItems)) {
142056
+ const items = schema13.items;
142057
142057
  const newItems = Array(maxItems || minItems || 0).fill(items);
142058
142058
  if (!hasMaxItems) {
142059
- schema15.additionalItems = items;
142059
+ schema13.additionalItems = items;
142060
142060
  }
142061
- schema15.items = newItems;
142061
+ schema13.items = newItems;
142062
142062
  }
142063
- if (Array.isArray(schema15.items) && hasMaxItems && maxItems < schema15.items.length) {
142064
- schema15.items = schema15.items.slice(0, maxItems);
142063
+ if (Array.isArray(schema13.items) && hasMaxItems && maxItems < schema13.items.length) {
142064
+ schema13.items = schema13.items.slice(0, maxItems);
142065
142065
  }
142066
- return schema15;
142066
+ return schema13;
142067
142067
  });
142068
- rules.set("Remove extends, if it is empty", (schema15) => {
142069
- if (!schema15.hasOwnProperty("extends")) {
142068
+ rules.set("Remove extends, if it is empty", (schema13) => {
142069
+ if (!schema13.hasOwnProperty("extends")) {
142070
142070
  return;
142071
142071
  }
142072
- if (schema15.extends == null || Array.isArray(schema15.extends) && schema15.extends.length === 0) {
142073
- delete schema15.extends;
142072
+ if (schema13.extends == null || Array.isArray(schema13.extends) && schema13.extends.length === 0) {
142073
+ delete schema13.extends;
142074
142074
  }
142075
142075
  });
142076
- rules.set("Make extends always an array, if it is defined", (schema15) => {
142077
- if (schema15.extends == null) {
142076
+ rules.set("Make extends always an array, if it is defined", (schema13) => {
142077
+ if (schema13.extends == null) {
142078
142078
  return;
142079
142079
  }
142080
- if (!Array.isArray(schema15.extends)) {
142081
- schema15.extends = [schema15.extends];
142080
+ if (!Array.isArray(schema13.extends)) {
142081
+ schema13.extends = [schema13.extends];
142082
142082
  }
142083
142083
  });
142084
- rules.set("Transform definitions to $defs", (schema15, fileName) => {
142085
- if (schema15.definitions && schema15.$defs && !(0, util_1.isDeepStrictEqual)(schema15.definitions, schema15.$defs)) {
142086
- throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${schema15.id} in ${fileName}`);
142084
+ rules.set("Transform definitions to $defs", (schema13, fileName) => {
142085
+ if (schema13.definitions && schema13.$defs && !(0, util_1.isDeepStrictEqual)(schema13.definitions, schema13.$defs)) {
142086
+ throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${schema13.id} in ${fileName}`);
142087
142087
  }
142088
- if (schema15.definitions) {
142089
- schema15.$defs = schema15.definitions;
142090
- delete schema15.definitions;
142088
+ if (schema13.definitions) {
142089
+ schema13.$defs = schema13.definitions;
142090
+ delete schema13.definitions;
142091
142091
  }
142092
142092
  });
142093
- rules.set("Transform const to singleton enum", (schema15) => {
142094
- if (schema15.const !== undefined) {
142095
- schema15.enum = [schema15.const];
142096
- delete schema15.const;
142093
+ rules.set("Transform const to singleton enum", (schema13) => {
142094
+ if (schema13.const !== undefined) {
142095
+ schema13.enum = [schema13.const];
142096
+ delete schema13.const;
142097
142097
  }
142098
142098
  });
142099
- rules.set("Add tsEnumNames to enum types", (schema15, _10, options8) => {
142099
+ rules.set("Add tsEnumNames to enum types", (schema13, _10, options8) => {
142100
142100
  var _a7;
142101
- if (isEnumTypeWithoutTsEnumNames(schema15) && options8.inferStringEnumKeysFromValues) {
142102
- schema15.tsEnumNames = (_a7 = schema15.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142101
+ if (isEnumTypeWithoutTsEnumNames(schema13) && options8.inferStringEnumKeysFromValues) {
142102
+ schema13.tsEnumNames = (_a7 = schema13.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142103
142103
  }
142104
142104
  });
142105
- rules.set("Pre-calculate schema types and intersections", (schema15) => {
142106
- if (schema15 !== null && typeof schema15 === "object") {
142107
- (0, applySchemaTyping_1.applySchemaTyping)(schema15);
142105
+ rules.set("Pre-calculate schema types and intersections", (schema13) => {
142106
+ if (schema13 !== null && typeof schema13 === "object") {
142107
+ (0, applySchemaTyping_1.applySchemaTyping)(schema13);
142108
142108
  }
142109
142109
  });
142110
142110
  function normalize2(rootSchema, dereferencedPaths, filename, options8) {
142111
- rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema15, key2) => rule(schema15, filename, options8, key2, dereferencedPaths)));
142111
+ rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema13, key2) => rule(schema13, filename, options8, key2, dereferencedPaths)));
142112
142112
  return rootSchema;
142113
142113
  }
142114
142114
  exports.normalize = normalize2;
@@ -142190,37 +142190,37 @@ var require_parser2 = __commonJS((exports) => {
142190
142190
  var AST_1 = require_AST();
142191
142191
  var JSONSchema_1 = require_JSONSchema();
142192
142192
  var utils_1 = require_utils7();
142193
- function parse11(schema15, options8, keyName, processed = new Map, usedNames = new Set) {
142194
- if ((0, JSONSchema_1.isPrimitive)(schema15)) {
142195
- if ((0, JSONSchema_1.isBoolean)(schema15)) {
142196
- return parseBooleanSchema(schema15, keyName, options8);
142193
+ function parse11(schema13, options8, keyName, processed = new Map, usedNames = new Set) {
142194
+ if ((0, JSONSchema_1.isPrimitive)(schema13)) {
142195
+ if ((0, JSONSchema_1.isBoolean)(schema13)) {
142196
+ return parseBooleanSchema(schema13, keyName, options8);
142197
142197
  }
142198
- return parseLiteral(schema15, keyName);
142198
+ return parseLiteral(schema13, keyName);
142199
142199
  }
142200
- const intersection2 = schema15[JSONSchema_1.Intersection];
142201
- const types = schema15[JSONSchema_1.Types];
142200
+ const intersection2 = schema13[JSONSchema_1.Intersection];
142201
+ const types = schema13[JSONSchema_1.Types];
142202
142202
  if (intersection2) {
142203
142203
  const ast = parseAsTypeWithCache(intersection2, "ALL_OF", options8, keyName, processed, usedNames);
142204
142204
  types.forEach((type) => {
142205
- ast.params.push(parseAsTypeWithCache(schema15, type, options8, keyName, processed, usedNames));
142205
+ ast.params.push(parseAsTypeWithCache(schema13, type, options8, keyName, processed, usedNames));
142206
142206
  });
142207
- (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema15, "Output:", ast);
142207
+ (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema13, "Output:", ast);
142208
142208
  return ast;
142209
142209
  }
142210
142210
  if (types.size === 1) {
142211
142211
  const type = [...types][0];
142212
- const ast = parseAsTypeWithCache(schema15, type, options8, keyName, processed, usedNames);
142213
- (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema15, "Output:", ast);
142212
+ const ast = parseAsTypeWithCache(schema13, type, options8, keyName, processed, usedNames);
142213
+ (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema13, "Output:", ast);
142214
142214
  return ast;
142215
142215
  }
142216
142216
  throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.");
142217
142217
  }
142218
142218
  exports.parse = parse11;
142219
- function parseAsTypeWithCache(schema15, type, options8, keyName, processed = new Map, usedNames = new Set) {
142220
- let cachedTypeMap = processed.get(schema15);
142219
+ function parseAsTypeWithCache(schema13, type, options8, keyName, processed = new Map, usedNames = new Set) {
142220
+ let cachedTypeMap = processed.get(schema13);
142221
142221
  if (!cachedTypeMap) {
142222
142222
  cachedTypeMap = new Map;
142223
- processed.set(schema15, cachedTypeMap);
142223
+ processed.set(schema13, cachedTypeMap);
142224
142224
  }
142225
142225
  const cachedAST = cachedTypeMap.get(type);
142226
142226
  if (cachedAST) {
@@ -142228,10 +142228,10 @@ var require_parser2 = __commonJS((exports) => {
142228
142228
  }
142229
142229
  const ast = {};
142230
142230
  cachedTypeMap.set(type, ast);
142231
- return Object.assign(ast, parseNonLiteral(schema15, type, options8, keyName, processed, usedNames));
142231
+ return Object.assign(ast, parseNonLiteral(schema13, type, options8, keyName, processed, usedNames));
142232
142232
  }
142233
- function parseBooleanSchema(schema15, keyName, options8) {
142234
- if (schema15) {
142233
+ function parseBooleanSchema(schema13, keyName, options8) {
142234
+ if (schema13) {
142235
142235
  return {
142236
142236
  keyName,
142237
142237
  type: options8.unknownAny ? "UNKNOWN" : "ANY"
@@ -142242,157 +142242,157 @@ var require_parser2 = __commonJS((exports) => {
142242
142242
  type: "NEVER"
142243
142243
  };
142244
142244
  }
142245
- function parseLiteral(schema15, keyName) {
142245
+ function parseLiteral(schema13, keyName) {
142246
142246
  return {
142247
142247
  keyName,
142248
- params: schema15,
142248
+ params: schema13,
142249
142249
  type: "LITERAL"
142250
142250
  };
142251
142251
  }
142252
- function parseNonLiteral(schema15, type, options8, keyName, processed, usedNames) {
142253
- const definitions = getDefinitionsMemoized((0, JSONSchema_1.getRootSchema)(schema15));
142254
- const keyNameFromDefinition = (0, lodash_1.findKey)(definitions, (_10) => _10 === schema15);
142252
+ function parseNonLiteral(schema13, type, options8, keyName, processed, usedNames) {
142253
+ const definitions = getDefinitionsMemoized((0, JSONSchema_1.getRootSchema)(schema13));
142254
+ const keyNameFromDefinition = (0, lodash_1.findKey)(definitions, (_10) => _10 === schema13);
142255
142255
  switch (type) {
142256
142256
  case "ALL_OF":
142257
142257
  return {
142258
- comment: schema15.description,
142259
- deprecated: schema15.deprecated,
142258
+ comment: schema13.description,
142259
+ deprecated: schema13.deprecated,
142260
142260
  keyName,
142261
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142262
- params: schema15.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142261
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142262
+ params: schema13.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142263
142263
  type: "INTERSECTION"
142264
142264
  };
142265
142265
  case "ANY":
142266
- return Object.assign(Object.assign({}, options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY), { comment: schema15.description, deprecated: schema15.deprecated, keyName, standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8) });
142266
+ return Object.assign(Object.assign({}, options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY), { comment: schema13.description, deprecated: schema13.deprecated, keyName, standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8) });
142267
142267
  case "ANY_OF":
142268
142268
  return {
142269
- comment: schema15.description,
142270
- deprecated: schema15.deprecated,
142269
+ comment: schema13.description,
142270
+ deprecated: schema13.deprecated,
142271
142271
  keyName,
142272
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142273
- params: schema15.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142272
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142273
+ params: schema13.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142274
142274
  type: "UNION"
142275
142275
  };
142276
142276
  case "BOOLEAN":
142277
142277
  return {
142278
- comment: schema15.description,
142279
- deprecated: schema15.deprecated,
142278
+ comment: schema13.description,
142279
+ deprecated: schema13.deprecated,
142280
142280
  keyName,
142281
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142281
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142282
142282
  type: "BOOLEAN"
142283
142283
  };
142284
142284
  case "CUSTOM_TYPE":
142285
142285
  return {
142286
- comment: schema15.description,
142287
- deprecated: schema15.deprecated,
142286
+ comment: schema13.description,
142287
+ deprecated: schema13.deprecated,
142288
142288
  keyName,
142289
- params: schema15.tsType,
142290
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142289
+ params: schema13.tsType,
142290
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142291
142291
  type: "CUSTOM_TYPE"
142292
142292
  };
142293
142293
  case "NAMED_ENUM":
142294
142294
  return {
142295
- comment: schema15.description,
142296
- deprecated: schema15.deprecated,
142295
+ comment: schema13.description,
142296
+ deprecated: schema13.deprecated,
142297
142297
  keyName,
142298
- standaloneName: standaloneName(schema15, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142299
- params: schema15.enum.map((_10, n5) => ({
142298
+ standaloneName: standaloneName(schema13, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142299
+ params: schema13.enum.map((_10, n5) => ({
142300
142300
  ast: parseLiteral(_10, undefined),
142301
- keyName: schema15.tsEnumNames[n5]
142301
+ keyName: schema13.tsEnumNames[n5]
142302
142302
  })),
142303
142303
  type: "ENUM"
142304
142304
  };
142305
142305
  case "NAMED_SCHEMA":
142306
- return newInterface(schema15, options8, processed, usedNames, keyName);
142306
+ return newInterface(schema13, options8, processed, usedNames, keyName);
142307
142307
  case "NEVER":
142308
142308
  return {
142309
- comment: schema15.description,
142310
- deprecated: schema15.deprecated,
142309
+ comment: schema13.description,
142310
+ deprecated: schema13.deprecated,
142311
142311
  keyName,
142312
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142312
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142313
142313
  type: "NEVER"
142314
142314
  };
142315
142315
  case "NULL":
142316
142316
  return {
142317
- comment: schema15.description,
142318
- deprecated: schema15.deprecated,
142317
+ comment: schema13.description,
142318
+ deprecated: schema13.deprecated,
142319
142319
  keyName,
142320
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142320
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142321
142321
  type: "NULL"
142322
142322
  };
142323
142323
  case "NUMBER":
142324
142324
  return {
142325
- comment: schema15.description,
142326
- deprecated: schema15.deprecated,
142325
+ comment: schema13.description,
142326
+ deprecated: schema13.deprecated,
142327
142327
  keyName,
142328
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142328
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142329
142329
  type: "NUMBER"
142330
142330
  };
142331
142331
  case "OBJECT":
142332
142332
  return {
142333
- comment: schema15.description,
142333
+ comment: schema13.description,
142334
142334
  keyName,
142335
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142335
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142336
142336
  type: "OBJECT",
142337
- deprecated: schema15.deprecated
142337
+ deprecated: schema13.deprecated
142338
142338
  };
142339
142339
  case "ONE_OF":
142340
142340
  return {
142341
- comment: schema15.description,
142342
- deprecated: schema15.deprecated,
142341
+ comment: schema13.description,
142342
+ deprecated: schema13.deprecated,
142343
142343
  keyName,
142344
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142345
- params: schema15.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142344
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142345
+ params: schema13.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142346
142346
  type: "UNION"
142347
142347
  };
142348
142348
  case "REFERENCE":
142349
- throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema15));
142349
+ throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema13));
142350
142350
  case "STRING":
142351
142351
  return {
142352
- comment: schema15.description,
142353
- deprecated: schema15.deprecated,
142352
+ comment: schema13.description,
142353
+ deprecated: schema13.deprecated,
142354
142354
  keyName,
142355
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142355
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142356
142356
  type: "STRING"
142357
142357
  };
142358
142358
  case "TYPED_ARRAY":
142359
- if (Array.isArray(schema15.items)) {
142360
- const minItems2 = schema15.minItems;
142361
- const maxItems2 = schema15.maxItems;
142359
+ if (Array.isArray(schema13.items)) {
142360
+ const minItems2 = schema13.minItems;
142361
+ const maxItems2 = schema13.maxItems;
142362
142362
  const arrayType = {
142363
- comment: schema15.description,
142364
- deprecated: schema15.deprecated,
142363
+ comment: schema13.description,
142364
+ deprecated: schema13.deprecated,
142365
142365
  keyName,
142366
142366
  maxItems: maxItems2,
142367
142367
  minItems: minItems2,
142368
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142369
- params: schema15.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142368
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142369
+ params: schema13.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142370
142370
  type: "TUPLE"
142371
142371
  };
142372
- if (schema15.additionalItems === true) {
142372
+ if (schema13.additionalItems === true) {
142373
142373
  arrayType.spreadParam = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142374
- } else if (schema15.additionalItems) {
142375
- arrayType.spreadParam = parse11(schema15.additionalItems, options8, undefined, processed, usedNames);
142374
+ } else if (schema13.additionalItems) {
142375
+ arrayType.spreadParam = parse11(schema13.additionalItems, options8, undefined, processed, usedNames);
142376
142376
  }
142377
142377
  return arrayType;
142378
142378
  } else {
142379
142379
  return {
142380
- comment: schema15.description,
142381
- deprecated: schema15.deprecated,
142380
+ comment: schema13.description,
142381
+ deprecated: schema13.deprecated,
142382
142382
  keyName,
142383
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142384
- params: parse11(schema15.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142383
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142384
+ params: parse11(schema13.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142385
142385
  type: "ARRAY"
142386
142386
  };
142387
142387
  }
142388
142388
  case "UNION":
142389
142389
  return {
142390
- comment: schema15.description,
142391
- deprecated: schema15.deprecated,
142390
+ comment: schema13.description,
142391
+ deprecated: schema13.deprecated,
142392
142392
  keyName,
142393
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142394
- params: schema15.type.map((type2) => {
142395
- const member = Object.assign(Object.assign({}, (0, lodash_1.omit)(schema15, "$id", "description", "title")), { type: type2 });
142393
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142394
+ params: schema13.type.map((type2) => {
142395
+ const member = Object.assign(Object.assign({}, (0, lodash_1.omit)(schema13, "$id", "description", "title")), { type: type2 });
142396
142396
  (0, utils_1.maybeStripDefault)(member);
142397
142397
  (0, applySchemaTyping_1.applySchemaTyping)(member);
142398
142398
  return parse11(member, options8, undefined, processed, usedNames);
@@ -142401,80 +142401,80 @@ var require_parser2 = __commonJS((exports) => {
142401
142401
  };
142402
142402
  case "UNNAMED_ENUM":
142403
142403
  return {
142404
- comment: schema15.description,
142405
- deprecated: schema15.deprecated,
142404
+ comment: schema13.description,
142405
+ deprecated: schema13.deprecated,
142406
142406
  keyName,
142407
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142408
- params: schema15.enum.map((_10) => parseLiteral(_10, undefined)),
142407
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142408
+ params: schema13.enum.map((_10) => parseLiteral(_10, undefined)),
142409
142409
  type: "UNION"
142410
142410
  };
142411
142411
  case "UNNAMED_SCHEMA":
142412
- return newInterface(schema15, options8, processed, usedNames, keyName, keyNameFromDefinition);
142412
+ return newInterface(schema13, options8, processed, usedNames, keyName, keyNameFromDefinition);
142413
142413
  case "UNTYPED_ARRAY":
142414
- const minItems = schema15.minItems;
142415
- const maxItems = typeof schema15.maxItems === "number" ? schema15.maxItems : -1;
142414
+ const minItems = schema13.minItems;
142415
+ const maxItems = typeof schema13.maxItems === "number" ? schema13.maxItems : -1;
142416
142416
  const params = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142417
142417
  if (minItems > 0 || maxItems >= 0) {
142418
142418
  return {
142419
- comment: schema15.description,
142420
- deprecated: schema15.deprecated,
142419
+ comment: schema13.description,
142420
+ deprecated: schema13.deprecated,
142421
142421
  keyName,
142422
- maxItems: schema15.maxItems,
142422
+ maxItems: schema13.maxItems,
142423
142423
  minItems,
142424
142424
  params: Array(Math.max(maxItems, minItems) || 0).fill(params),
142425
142425
  spreadParam: maxItems >= 0 ? undefined : params,
142426
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142426
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142427
142427
  type: "TUPLE"
142428
142428
  };
142429
142429
  }
142430
142430
  return {
142431
- comment: schema15.description,
142432
- deprecated: schema15.deprecated,
142431
+ comment: schema13.description,
142432
+ deprecated: schema13.deprecated,
142433
142433
  keyName,
142434
142434
  params,
142435
- standaloneName: standaloneName(schema15, keyNameFromDefinition, usedNames, options8),
142435
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142436
142436
  type: "ARRAY"
142437
142437
  };
142438
142438
  }
142439
142439
  }
142440
- function standaloneName(schema15, keyNameFromDefinition, usedNames, options8) {
142440
+ function standaloneName(schema13, keyNameFromDefinition, usedNames, options8) {
142441
142441
  var _a7;
142442
- const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema15, keyNameFromDefinition)) || schema15.title || schema15.$id || keyNameFromDefinition;
142442
+ const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema13, keyNameFromDefinition)) || schema13.title || schema13.$id || keyNameFromDefinition;
142443
142443
  if (name2) {
142444
142444
  return (0, utils_1.generateName)(name2, usedNames);
142445
142445
  }
142446
142446
  }
142447
- function newInterface(schema15, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142448
- const name2 = standaloneName(schema15, keyNameFromDefinition, usedNames, options8);
142447
+ function newInterface(schema13, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142448
+ const name2 = standaloneName(schema13, keyNameFromDefinition, usedNames, options8);
142449
142449
  return {
142450
- comment: schema15.description,
142451
- deprecated: schema15.deprecated,
142450
+ comment: schema13.description,
142451
+ deprecated: schema13.deprecated,
142452
142452
  keyName,
142453
- params: parseSchema(schema15, options8, processed, usedNames, name2),
142453
+ params: parseSchema(schema13, options8, processed, usedNames, name2),
142454
142454
  standaloneName: name2,
142455
- superTypes: parseSuperTypes(schema15, options8, processed, usedNames),
142455
+ superTypes: parseSuperTypes(schema13, options8, processed, usedNames),
142456
142456
  type: "INTERFACE"
142457
142457
  };
142458
142458
  }
142459
- function parseSuperTypes(schema15, options8, processed, usedNames) {
142460
- const superTypes = schema15.extends;
142459
+ function parseSuperTypes(schema13, options8, processed, usedNames) {
142460
+ const superTypes = schema13.extends;
142461
142461
  if (!superTypes) {
142462
142462
  return [];
142463
142463
  }
142464
142464
  return superTypes.map((_10) => parse11(_10, options8, undefined, processed, usedNames));
142465
142465
  }
142466
- function parseSchema(schema15, options8, processed, usedNames, parentSchemaName) {
142467
- let asts = (0, lodash_1.map)(schema15.properties, (value, key2) => ({
142466
+ function parseSchema(schema13, options8, processed, usedNames, parentSchemaName) {
142467
+ let asts = (0, lodash_1.map)(schema13.properties, (value, key2) => ({
142468
142468
  ast: parse11(value, options8, key2, processed, usedNames),
142469
142469
  isPatternProperty: false,
142470
- isRequired: (0, lodash_1.includes)(schema15.required || [], key2),
142470
+ isRequired: (0, lodash_1.includes)(schema13.required || [], key2),
142471
142471
  isUnreachableDefinition: false,
142472
142472
  keyName: key2
142473
142473
  }));
142474
142474
  let singlePatternProperty = false;
142475
- if (schema15.patternProperties) {
142476
- singlePatternProperty = !schema15.additionalProperties && Object.keys(schema15.patternProperties).length === 1;
142477
- asts = asts.concat((0, lodash_1.map)(schema15.patternProperties, (value, key2) => {
142475
+ if (schema13.patternProperties) {
142476
+ singlePatternProperty = !schema13.additionalProperties && Object.keys(schema13.patternProperties).length === 1;
142477
+ asts = asts.concat((0, lodash_1.map)(schema13.patternProperties, (value, key2) => {
142478
142478
  const ast = parse11(value, options8, key2, processed, usedNames);
142479
142479
  const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema definition
142480
142480
  via the \`patternProperty\` "${key2.replace("*/", "*\\/")}".`;
@@ -142484,14 +142484,14 @@ ${comment}` : comment;
142484
142484
  return {
142485
142485
  ast,
142486
142486
  isPatternProperty: !singlePatternProperty,
142487
- isRequired: singlePatternProperty || (0, lodash_1.includes)(schema15.required || [], key2),
142487
+ isRequired: singlePatternProperty || (0, lodash_1.includes)(schema13.required || [], key2),
142488
142488
  isUnreachableDefinition: false,
142489
142489
  keyName: singlePatternProperty ? "[k: string]" : key2
142490
142490
  };
142491
142491
  }));
142492
142492
  }
142493
142493
  if (options8.unreachableDefinitions) {
142494
- asts = asts.concat((0, lodash_1.map)(schema15.$defs, (value, key2) => {
142494
+ asts = asts.concat((0, lodash_1.map)(schema13.$defs, (value, key2) => {
142495
142495
  const ast = parse11(value, options8, key2, processed, usedNames);
142496
142496
  const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema
142497
142497
  via the \`definition\` "${key2}".`;
@@ -142501,13 +142501,13 @@ ${comment}` : comment;
142501
142501
  return {
142502
142502
  ast,
142503
142503
  isPatternProperty: false,
142504
- isRequired: (0, lodash_1.includes)(schema15.required || [], key2),
142504
+ isRequired: (0, lodash_1.includes)(schema13.required || [], key2),
142505
142505
  isUnreachableDefinition: true,
142506
142506
  keyName: key2
142507
142507
  };
142508
142508
  }));
142509
142509
  }
142510
- switch (schema15.additionalProperties) {
142510
+ switch (schema13.additionalProperties) {
142511
142511
  case undefined:
142512
142512
  case true:
142513
142513
  if (singlePatternProperty) {
@@ -142524,7 +142524,7 @@ ${comment}` : comment;
142524
142524
  return asts;
142525
142525
  default:
142526
142526
  return asts.concat({
142527
- ast: parse11(schema15.additionalProperties, options8, "[k: string]", processed, usedNames),
142527
+ ast: parse11(schema13.additionalProperties, options8, "[k: string]", processed, usedNames),
142528
142528
  isPatternProperty: false,
142529
142529
  isRequired: true,
142530
142530
  isUnreachableDefinition: false,
@@ -142532,22 +142532,22 @@ ${comment}` : comment;
142532
142532
  });
142533
142533
  }
142534
142534
  }
142535
- function getDefinitions(schema15, isSchema = true, processed = new Set) {
142536
- if (processed.has(schema15)) {
142535
+ function getDefinitions(schema13, isSchema = true, processed = new Set) {
142536
+ if (processed.has(schema13)) {
142537
142537
  return {};
142538
142538
  }
142539
- processed.add(schema15);
142540
- if (Array.isArray(schema15)) {
142541
- return schema15.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142539
+ processed.add(schema13);
142540
+ if (Array.isArray(schema13)) {
142541
+ return schema13.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142542
142542
  }
142543
- if ((0, lodash_1.isPlainObject)(schema15)) {
142544
- return Object.assign(Object.assign({}, isSchema && hasDefinitions(schema15) ? schema15.$defs : {}), Object.keys(schema15).reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(schema15[cur], false, processed)), {}));
142543
+ if ((0, lodash_1.isPlainObject)(schema13)) {
142544
+ return Object.assign(Object.assign({}, isSchema && hasDefinitions(schema13) ? schema13.$defs : {}), Object.keys(schema13).reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(schema13[cur], false, processed)), {}));
142545
142545
  }
142546
142546
  return {};
142547
142547
  }
142548
142548
  var getDefinitionsMemoized = (0, lodash_1.memoize)(getDefinitions);
142549
- function hasDefinitions(schema15) {
142550
- return "$defs" in schema15;
142549
+ function hasDefinitions(schema13) {
142550
+ return "$defs" in schema13;
142551
142551
  }
142552
142552
  });
142553
142553
 
@@ -143233,14 +143233,14 @@ var require_errors2 = __commonJS((exports) => {
143233
143233
  }
143234
143234
  exports.MissingPointerError = MissingPointerError;
143235
143235
 
143236
- class TimeoutError4 extends JSONParserError {
143236
+ class TimeoutError3 extends JSONParserError {
143237
143237
  constructor(timeout2) {
143238
143238
  super(`Dereferencing timeout reached: ${timeout2}ms`);
143239
143239
  this.code = "ETIMEOUT";
143240
143240
  this.name = "TimeoutError";
143241
143241
  }
143242
143242
  }
143243
- exports.TimeoutError = TimeoutError4;
143243
+ exports.TimeoutError = TimeoutError3;
143244
143244
 
143245
143245
  class InvalidPointerError extends JSONParserError {
143246
143246
  constructor(pointer, path18) {
@@ -144371,7 +144371,7 @@ var require_normalize_args = __commonJS((exports) => {
144371
144371
  var options_js_1 = require_options();
144372
144372
  function normalizeArgs(_args) {
144373
144373
  let path18;
144374
- let schema15;
144374
+ let schema13;
144375
144375
  let options8;
144376
144376
  let callback;
144377
144377
  const args = Array.prototype.slice.call(_args);
@@ -144381,15 +144381,15 @@ var require_normalize_args = __commonJS((exports) => {
144381
144381
  if (typeof args[0] === "string") {
144382
144382
  path18 = args[0];
144383
144383
  if (typeof args[2] === "object") {
144384
- schema15 = args[1];
144384
+ schema13 = args[1];
144385
144385
  options8 = args[2];
144386
144386
  } else {
144387
- schema15 = undefined;
144387
+ schema13 = undefined;
144388
144388
  options8 = args[1];
144389
144389
  }
144390
144390
  } else {
144391
144391
  path18 = "";
144392
- schema15 = args[0];
144392
+ schema13 = args[0];
144393
144393
  options8 = args[1];
144394
144394
  }
144395
144395
  try {
@@ -144397,12 +144397,12 @@ var require_normalize_args = __commonJS((exports) => {
144397
144397
  } catch (e8) {
144398
144398
  console.error(`JSON Schema Ref Parser: Error normalizing options: ${e8}`);
144399
144399
  }
144400
- if (!options8.mutateInputSchema && typeof schema15 === "object") {
144401
- schema15 = JSON.parse(JSON.stringify(schema15));
144400
+ if (!options8.mutateInputSchema && typeof schema13 === "object") {
144401
+ schema13 = JSON.parse(JSON.stringify(schema13));
144402
144402
  }
144403
144403
  return {
144404
144404
  path: path18,
144405
- schema: schema15,
144405
+ schema: schema13,
144406
144406
  options: options8,
144407
144407
  callback
144408
144408
  };
@@ -145191,12 +145191,12 @@ var require_resolver = __commonJS((exports) => {
145191
145191
  var json_schema_ref_parser_1 = require_lib3();
145192
145192
  var utils_1 = require_utils7();
145193
145193
  function dereference(schema_1, _a7) {
145194
- return __awaiter(this, arguments, undefined, function* (schema15, { cwd, $refOptions }) {
145195
- (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema15);
145194
+ return __awaiter(this, arguments, undefined, function* (schema13, { cwd, $refOptions }) {
145195
+ (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema13);
145196
145196
  const parser2 = new json_schema_ref_parser_1.$RefParser;
145197
145197
  const dereferencedPaths = new WeakMap;
145198
- const dereferencedSchema = yield parser2.dereference(cwd, schema15, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema16) {
145199
- dereferencedPaths.set(schema16, $ref);
145198
+ const dereferencedSchema = yield parser2.dereference(cwd, schema13, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema14) {
145199
+ dereferencedPaths.set(schema14, $ref);
145200
145200
  } }) }));
145201
145201
  return { dereferencedPaths, dereferencedSchema };
145202
145202
  });
@@ -145210,46 +145210,46 @@ var require_validator = __commonJS((exports) => {
145210
145210
  exports.validate = undefined;
145211
145211
  var utils_1 = require_utils7();
145212
145212
  var rules = new Map;
145213
- rules.set("Enum members and tsEnumNames must be of the same length", (schema15) => {
145214
- if (schema15.enum && schema15.tsEnumNames && schema15.enum.length !== schema15.tsEnumNames.length) {
145213
+ rules.set("Enum members and tsEnumNames must be of the same length", (schema13) => {
145214
+ if (schema13.enum && schema13.tsEnumNames && schema13.enum.length !== schema13.tsEnumNames.length) {
145215
145215
  return false;
145216
145216
  }
145217
145217
  });
145218
- rules.set("tsEnumNames must be an array of strings", (schema15) => {
145219
- if (schema15.tsEnumNames && schema15.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145218
+ rules.set("tsEnumNames must be an array of strings", (schema13) => {
145219
+ if (schema13.tsEnumNames && schema13.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145220
145220
  return false;
145221
145221
  }
145222
145222
  });
145223
- rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema15) => {
145224
- const { maxItems, minItems } = schema15;
145223
+ rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema13) => {
145224
+ const { maxItems, minItems } = schema13;
145225
145225
  if (typeof maxItems === "number" && typeof minItems === "number") {
145226
145226
  return maxItems >= minItems;
145227
145227
  }
145228
145228
  });
145229
- rules.set("When maxItems exists, maxItems >= 0", (schema15) => {
145230
- const { maxItems } = schema15;
145229
+ rules.set("When maxItems exists, maxItems >= 0", (schema13) => {
145230
+ const { maxItems } = schema13;
145231
145231
  if (typeof maxItems === "number") {
145232
145232
  return maxItems >= 0;
145233
145233
  }
145234
145234
  });
145235
- rules.set("When minItems exists, minItems >= 0", (schema15) => {
145236
- const { minItems } = schema15;
145235
+ rules.set("When minItems exists, minItems >= 0", (schema13) => {
145236
+ const { minItems } = schema13;
145237
145237
  if (typeof minItems === "number") {
145238
145238
  return minItems >= 0;
145239
145239
  }
145240
145240
  });
145241
- rules.set("deprecated must be a boolean", (schema15) => {
145242
- const typeOfDeprecated = typeof schema15.deprecated;
145241
+ rules.set("deprecated must be a boolean", (schema13) => {
145242
+ const typeOfDeprecated = typeof schema13.deprecated;
145243
145243
  return typeOfDeprecated === "boolean" || typeOfDeprecated === "undefined";
145244
145244
  });
145245
- function validate2(schema15, filename) {
145245
+ function validate2(schema13, filename) {
145246
145246
  const errors5 = [];
145247
145247
  rules.forEach((rule, ruleName) => {
145248
- (0, utils_1.traverse)(schema15, (schema16, key2) => {
145249
- if (rule(schema16) === false) {
145248
+ (0, utils_1.traverse)(schema13, (schema14, key2) => {
145249
+ if (rule(schema14) === false) {
145250
145250
  errors5.push(`Error at key "${key2}" in file "${filename}": ${ruleName}`);
145251
145251
  }
145252
- return schema16;
145252
+ return schema14;
145253
145253
  });
145254
145254
  });
145255
145255
  return errors5;
@@ -145263,25 +145263,25 @@ var require_linker = __commonJS((exports) => {
145263
145263
  exports.link = undefined;
145264
145264
  var JSONSchema_1 = require_JSONSchema();
145265
145265
  var lodash_1 = require_lodash8();
145266
- function link2(schema15, parent = null) {
145267
- if (!Array.isArray(schema15) && !(0, lodash_1.isPlainObject)(schema15)) {
145268
- return schema15;
145266
+ function link2(schema13, parent = null) {
145267
+ if (!Array.isArray(schema13) && !(0, lodash_1.isPlainObject)(schema13)) {
145268
+ return schema13;
145269
145269
  }
145270
- if (schema15.hasOwnProperty(JSONSchema_1.Parent)) {
145271
- return schema15;
145270
+ if (schema13.hasOwnProperty(JSONSchema_1.Parent)) {
145271
+ return schema13;
145272
145272
  }
145273
- Object.defineProperty(schema15, JSONSchema_1.Parent, {
145273
+ Object.defineProperty(schema13, JSONSchema_1.Parent, {
145274
145274
  enumerable: false,
145275
145275
  value: parent,
145276
145276
  writable: false
145277
145277
  });
145278
- if (Array.isArray(schema15)) {
145279
- schema15.forEach((child) => link2(child, schema15));
145278
+ if (Array.isArray(schema13)) {
145279
+ schema13.forEach((child) => link2(child, schema13));
145280
145280
  }
145281
- for (const key2 in schema15) {
145282
- link2(schema15[key2], schema15);
145281
+ for (const key2 in schema13) {
145282
+ link2(schema13[key2], schema13);
145283
145283
  }
145284
- return schema15;
145284
+ return schema13;
145285
145285
  }
145286
145286
  exports.link = link2;
145287
145287
  });
@@ -145373,8 +145373,8 @@ var require_src3 = __commonJS((exports) => {
145373
145373
  unknownAny: true
145374
145374
  };
145375
145375
  function compileFromFile(filename, options8 = exports.DEFAULT_OPTIONS) {
145376
- const schema15 = parseAsJSONSchema(filename);
145377
- return compile(schema15, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145376
+ const schema13 = parseAsJSONSchema(filename);
145377
+ return compile(schema13, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145378
145378
  }
145379
145379
  exports.compileFromFile = compileFromFile;
145380
145380
  function parseAsJSONSchema(filename) {
@@ -145384,7 +145384,7 @@ var require_src3 = __commonJS((exports) => {
145384
145384
  return (0, utils_1.parseFileAsJSONSchema)(filename, contents.toString());
145385
145385
  }
145386
145386
  function compile(schema_1, name_1) {
145387
- return __awaiter(this, arguments, undefined, function* (schema15, name2, options8 = {}) {
145387
+ return __awaiter(this, arguments, undefined, function* (schema13, name2, options8 = {}) {
145388
145388
  (0, optionValidator_1.validateOptions)(options8);
145389
145389
  const _options = (0, lodash_1.merge)({}, exports.DEFAULT_OPTIONS, options8);
145390
145390
  const start = Date.now();
@@ -145394,7 +145394,7 @@ var require_src3 = __commonJS((exports) => {
145394
145394
  if (!(0, lodash_1.endsWith)(_options.cwd, "/")) {
145395
145395
  _options.cwd += "/";
145396
145396
  }
145397
- const _schema = (0, lodash_1.cloneDeep)(schema15);
145397
+ const _schema = (0, lodash_1.cloneDeep)(schema13);
145398
145398
  const { dereferencedPaths, dereferencedSchema } = yield (0, resolver_1.dereference)(_schema, _options);
145399
145399
  if (process.env.VERBOSE) {
145400
145400
  if ((0, util_1.isDeepStrictEqual)(_schema, dereferencedSchema)) {
@@ -236729,10 +236729,6 @@ class InvalidInputError extends UserError {
236729
236729
  code = "INVALID_INPUT";
236730
236730
  }
236731
236731
 
236732
- class TimeoutError2 extends UserError {
236733
- code = "TIMEOUT";
236734
- }
236735
-
236736
236732
  class DependencyNotFoundError extends UserError {
236737
236733
  code = "DEPENDENCY_NOT_FOUND";
236738
236734
  constructor(message, options) {
@@ -238925,7 +238921,7 @@ var createTimeoutError = (timeout2) => {
238925
238921
  return timeout2.message;
238926
238922
  }
238927
238923
  const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
238928
- return new TimeoutError3(message);
238924
+ return new TimeoutError2(message);
238929
238925
  };
238930
238926
  var handleFallback = (timeout2) => {
238931
238927
  if (timeout2.fallback) {
@@ -238938,7 +238934,7 @@ var handleAbortError = (timeoutSignal, timeout2, signal) => {
238938
238934
  if (typeof timeout2 === "object") {
238939
238935
  return handleFallback(timeout2);
238940
238936
  }
238941
- throw new TimeoutError3;
238937
+ throw new TimeoutError2;
238942
238938
  }
238943
238939
  throw signal.reason;
238944
238940
  };
@@ -238983,7 +238979,7 @@ async function pWaitFor(condition, options = {}) {
238983
238979
  }
238984
238980
  pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
238985
238981
 
238986
- class TimeoutError3 extends Error {
238982
+ class TimeoutError2 extends Error {
238987
238983
  constructor(message = "Promise timed out") {
238988
238984
  super(message);
238989
238985
  this.name = "TimeoutError";
@@ -256631,7 +256627,7 @@ async function runOAuthFlowWithSkip(connector2) {
256631
256627
  timeout: POLL_TIMEOUT_MS
256632
256628
  });
256633
256629
  } catch (err) {
256634
- if (err instanceof TimeoutError3) {
256630
+ if (err instanceof TimeoutError2) {
256635
256631
  finalStatus = "PENDING";
256636
256632
  } else {
256637
256633
  throw err;
@@ -256971,214 +256967,6 @@ function getDashboardCommand() {
256971
256967
  return new Command("dashboard").description("Manage app dashboard").addCommand(getDashboardOpenCommand());
256972
256968
  }
256973
256969
 
256974
- // src/core/domains/schema.ts
256975
- var DomainVerificationSchema = exports_external.object({
256976
- ownership_verification: exports_external.unknown().nullable().optional(),
256977
- ownership_verification_http: exports_external.unknown().nullable().optional(),
256978
- ssl_validation_records: exports_external.array(exports_external.unknown()).nullable().optional(),
256979
- ssl_validation_errors: exports_external.array(exports_external.unknown()).nullable().optional()
256980
- }).transform((data) => ({
256981
- ownershipVerification: data.ownership_verification ?? null,
256982
- ownershipVerificationHttp: data.ownership_verification_http ?? null,
256983
- sslValidationRecords: data.ssl_validation_records ?? null,
256984
- sslValidationErrors: data.ssl_validation_errors ?? null
256985
- }));
256986
- var DomainSchema = exports_external.object({
256987
- hostname: exports_external.string(),
256988
- cname_target: exports_external.string(),
256989
- status: exports_external.string().nullable(),
256990
- ssl_status: exports_external.string().nullable(),
256991
- active: exports_external.boolean(),
256992
- pending_deployment: exports_external.boolean().optional(),
256993
- verification: DomainVerificationSchema
256994
- }).transform((data) => ({
256995
- hostname: data.hostname,
256996
- cnameTarget: data.cname_target,
256997
- status: data.status,
256998
- sslStatus: data.ssl_status,
256999
- active: data.active,
257000
- pendingDeployment: data.pending_deployment ?? false,
257001
- verification: data.verification
257002
- }));
257003
- var AddDomainResponseSchema = DomainSchema;
257004
- var DomainsListResponseSchema = exports_external.object({ domains: exports_external.array(DomainSchema) }).transform((data) => data.domains);
257005
- var RemoveDomainResponseSchema = exports_external.object({ hostname: exports_external.string(), deleted: exports_external.boolean() }).transform((data) => ({ hostname: data.hostname, deleted: data.deleted }));
257006
-
257007
- // src/core/domains/api.ts
257008
- async function addDomain(hostname3) {
257009
- const appClient = getAppClient();
257010
- const request = { hostname: hostname3 };
257011
- let response;
257012
- try {
257013
- response = await appClient.post("domains", {
257014
- json: request,
257015
- timeout: 120000
257016
- });
257017
- } catch (error48) {
257018
- throw await ApiError.fromHttpError(error48, "connecting domain");
257019
- }
257020
- const result = AddDomainResponseSchema.safeParse(await response.json());
257021
- if (!result.success) {
257022
- throw new SchemaValidationError("Invalid response from server", result.error);
257023
- }
257024
- return result.data;
257025
- }
257026
- async function listDomains() {
257027
- const appClient = getAppClient();
257028
- let response;
257029
- try {
257030
- response = await appClient.get("domains");
257031
- } catch (error48) {
257032
- throw await ApiError.fromHttpError(error48, "listing domains");
257033
- }
257034
- const result = DomainsListResponseSchema.safeParse(await response.json());
257035
- if (!result.success) {
257036
- throw new SchemaValidationError("Invalid response from server", result.error);
257037
- }
257038
- return result.data;
257039
- }
257040
- async function removeDomain(hostname3) {
257041
- const appClient = getAppClient();
257042
- let response;
257043
- try {
257044
- response = await appClient.delete(`domains/${encodeURIComponent(hostname3)}`);
257045
- } catch (error48) {
257046
- throw await ApiError.fromHttpError(error48, "removing domain");
257047
- }
257048
- const result = RemoveDomainResponseSchema.safeParse(await response.json());
257049
- if (!result.success) {
257050
- throw new SchemaValidationError("Invalid response from server", result.error);
257051
- }
257052
- return result.data;
257053
- }
257054
- var delay2 = (ms) => new Promise((resolve10) => setTimeout(resolve10, ms));
257055
- async function waitForDomainActive(hostname3, options = {}) {
257056
- const intervalMs = options.intervalMs ?? 2000;
257057
- const timeoutMs = options.timeoutMs ?? 10 * 60000;
257058
- const deadline = Date.now() + timeoutMs;
257059
- for (;; ) {
257060
- const domain2 = (await listDomains()).find((d2) => d2.hostname === hostname3);
257061
- options.onTick?.(domain2);
257062
- if (domain2?.active) {
257063
- return domain2;
257064
- }
257065
- if (Date.now() >= deadline) {
257066
- throw new TimeoutError2(`Timed out waiting for ${hostname3} to become active`);
257067
- }
257068
- await delay2(intervalMs);
257069
- }
257070
- }
257071
- // src/cli/commands/domains/shared.ts
257072
- function toJsonStdout2(result) {
257073
- return `${JSON.stringify(result, null, 2)}
257074
- `;
257075
- }
257076
- function domainStatusText(domain2) {
257077
- const status = domain2.status ?? "unknown";
257078
- const ssl = domain2.sslStatus ?? "unknown";
257079
- return domain2.active ? "active" : `${status} (SSL: ${ssl})`;
257080
- }
257081
- function formatDomainLine(domain2) {
257082
- const status = (domain2.active ? "active" : domain2.status ?? "unknown").padEnd(12);
257083
- const ssl = `ssl:${domain2.sslStatus ?? "unknown"}`.padEnd(22);
257084
- return `${domain2.hostname.padEnd(32)} ${status} ${ssl} → ${theme.colors.links(domain2.cnameTarget)}`;
257085
- }
257086
- function logDomainSetup(domain2, log) {
257087
- log.message(`${theme.styles.header("Add this DNS record")}:`);
257088
- log.message(` CNAME ${domain2.hostname} ${theme.styles.dim("→")} ${theme.colors.links(domain2.cnameTarget)}`);
257089
- log.message(`${theme.styles.header("Status")}: ${domainStatusText(domain2)}`);
257090
- if (domain2.pendingDeployment) {
257091
- log.warn("This app has no production deployment yet — the domain will start serving once the app is published.");
257092
- }
257093
- log.message(theme.styles.dim("TLS certificate is issued automatically once the CNAME resolves."));
257094
- }
257095
-
257096
- // src/cli/commands/domains/add.ts
257097
- function waitMessage(domain2) {
257098
- if (!domain2)
257099
- return "Waiting for domain to appear...";
257100
- return `Waiting for domain to become active (${domainStatusText(domain2)})...`;
257101
- }
257102
- async function addDomainAction({ log, runTask: runTask2, jsonMode }, hostname3, options) {
257103
- let domain2 = await runTask2(`Connecting ${hostname3}...`, async () => await addDomain(hostname3), { errorMessage: "Failed to connect domain" });
257104
- if (options.wait && !domain2.active) {
257105
- domain2 = await runTask2(waitMessage(domain2), async (updateMessage) => await waitForDomainActive(hostname3, {
257106
- onTick: (d2) => updateMessage(waitMessage(d2))
257107
- }), {
257108
- successMessage: `${hostname3} is active`,
257109
- errorMessage: "Domain did not become active"
257110
- });
257111
- }
257112
- if (jsonMode) {
257113
- return {
257114
- outroMessage: `Domain ${hostname3} is ${domainStatusText(domain2)}`,
257115
- stdout: toJsonStdout2(domain2)
257116
- };
257117
- }
257118
- logDomainSetup(domain2, log);
257119
- return {
257120
- outroMessage: domain2.active ? `${hostname3} is active` : `${hostname3} connected — add the CNAME record above to finish`
257121
- };
257122
- }
257123
- function getDomainsAddCommand() {
257124
- return new Base44Command("add").description("Connect a custom domain to this app").argument("<hostname>", "Domain to connect, e.g. app.example.com").option("--wait", "Poll until the domain and its TLS certificate are active").action(addDomainAction);
257125
- }
257126
-
257127
- // src/cli/commands/domains/list.ts
257128
- async function listDomainsAction({
257129
- log,
257130
- runTask: runTask2,
257131
- jsonMode
257132
- }) {
257133
- const domains = await runTask2("Fetching domains...", async () => await listDomains(), { errorMessage: "Failed to fetch domains" });
257134
- if (jsonMode) {
257135
- return {
257136
- outroMessage: `${domains.length} domains`,
257137
- stdout: toJsonStdout2({ domains })
257138
- };
257139
- }
257140
- if (domains.length === 0) {
257141
- return { outroMessage: "No custom domains found" };
257142
- }
257143
- for (const domain2 of domains) {
257144
- log.message(formatDomainLine(domain2));
257145
- }
257146
- return {
257147
- outroMessage: `${domains.length} domain${domains.length !== 1 ? "s" : ""}`
257148
- };
257149
- }
257150
- function getDomainsListCommand() {
257151
- return new Base44Command("list").description("List custom domains connected to this app").action(listDomainsAction);
257152
- }
257153
-
257154
- // src/cli/commands/domains/remove.ts
257155
- async function removeDomainAction({ runTask: runTask2, jsonMode, isNonInteractive }, hostname3, options) {
257156
- if (isNonInteractive && !options.yes) {
257157
- throw new InvalidInputError("--yes is required in non-interactive mode");
257158
- }
257159
- if (!options.yes) {
257160
- const shouldRemove = await Re({
257161
- message: `Disconnect ${hostname3} from this app?`
257162
- });
257163
- if (Ct(shouldRemove) || !shouldRemove) {
257164
- return { outroMessage: "Removal cancelled" };
257165
- }
257166
- }
257167
- const result = await runTask2(`Removing ${hostname3}...`, async () => await removeDomain(hostname3), { errorMessage: "Failed to remove domain" });
257168
- return {
257169
- outroMessage: `Disconnected ${hostname3}`,
257170
- stdout: jsonMode ? toJsonStdout2(result) : undefined
257171
- };
257172
- }
257173
- function getDomainsRemoveCommand() {
257174
- return new Base44Command("remove").description("Disconnect a custom domain from this app").argument("<hostname>", "Domain to disconnect").option("-y, --yes", "Skip confirmation prompt").action(removeDomainAction);
257175
- }
257176
-
257177
- // src/cli/commands/domains/index.ts
257178
- function getDomainsCommand() {
257179
- return new Command("domains").description("Manage custom domains for full-stack apps").addCommand(getDomainsAddCommand()).addCommand(getDomainsListCommand()).addCommand(getDomainsRemoveCommand());
257180
- }
257181
-
257182
256970
  // src/cli/commands/entities/push.ts
257183
256971
  async function pushEntitiesAction({ isNonInteractive, log, runTask: runTask2 }, options) {
257184
256972
  const { entities } = await readProjectConfig();
@@ -258254,14 +258042,6 @@ function validateLimit(limit) {
258254
258042
  }
258255
258043
  async function logsAction(ctx, options) {
258256
258044
  validateLimit(options.limit);
258257
- if (options.follow) {
258258
- if (options.until) {
258259
- throw new InvalidInputError("--until cannot be combined with --follow (a stream has no end).");
258260
- }
258261
- if (options.order) {
258262
- throw new InvalidInputError("--order cannot be combined with --follow (a live tail always streams oldest to newest).");
258263
- }
258264
- }
258265
258045
  const specifiedFunctions = parseFunctionNames(options.function);
258266
258046
  const localProjectRoot = ctx.app?.projectRoot;
258267
258047
  const availableFunctionNames = localProjectRoot ? await getProjectFunctionNames(localProjectRoot) : await getRemoteFunctionNames();
@@ -258272,6 +258052,12 @@ async function logsAction(ctx, options) {
258272
258052
  };
258273
258053
  }
258274
258054
  if (options.follow) {
258055
+ if (options.until) {
258056
+ throw new InvalidInputError("--until cannot be combined with --follow (a stream has no end).");
258057
+ }
258058
+ if (options.order) {
258059
+ throw new InvalidInputError("--order cannot be combined with --follow (a live tail always streams oldest to newest).");
258060
+ }
258275
258061
  options.order = "asc";
258276
258062
  return followLogs(functionNames, options, availableFunctionNames, ctx.jsonMode);
258277
258063
  }
@@ -258476,7 +258262,7 @@ function withSandboxAuthHint(error48) {
258476
258262
  cause: error48
258477
258263
  });
258478
258264
  }
258479
- async function callTool(appId, tool, payload, schema14, context, timeout2 = 60000) {
258265
+ async function callTool(appId, tool, payload, schema13, context, timeout2 = 60000) {
258480
258266
  const client = getSandboxClient(appId);
258481
258267
  let response;
258482
258268
  try {
@@ -258484,7 +258270,7 @@ async function callTool(appId, tool, payload, schema14, context, timeout2 = 6000
258484
258270
  } catch (error48) {
258485
258271
  throw withSandboxAuthHint(await ApiError.fromHttpError(error48, context));
258486
258272
  }
258487
- const result = schema14.safeParse(await response.json());
258273
+ const result = schema13.safeParse(await response.json());
258488
258274
  if (!result.success) {
258489
258275
  throw new SchemaValidationError("Invalid response from server", result.error);
258490
258276
  }
@@ -258822,136 +258608,6 @@ function getSiteCommand() {
258822
258608
  return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteOpenCommand());
258823
258609
  }
258824
258610
 
258825
- // src/core/slug/schema.ts
258826
- var AppSlugResponseSchema = exports_external.object({ slug: exports_external.string().nullable().optional() }).transform((data) => ({ slug: data.slug ?? null }));
258827
- var SlugSuggestionsSchema = exports_external.object({
258828
- suggestions: exports_external.array(exports_external.string())
258829
- });
258830
-
258831
- // src/core/slug/api.ts
258832
- async function getSlug() {
258833
- const { id } = getAppContext();
258834
- let response;
258835
- try {
258836
- response = await base44Client.get(`api/apps/${id}`);
258837
- } catch (error48) {
258838
- throw await ApiError.fromHttpError(error48, "fetching app slug");
258839
- }
258840
- const result = AppSlugResponseSchema.safeParse(await response.json());
258841
- if (!result.success) {
258842
- throw new SchemaValidationError("Invalid response from server", result.error);
258843
- }
258844
- return result.data;
258845
- }
258846
- async function updateSlug(slug) {
258847
- const appClient = getAppClient();
258848
- const request = { slug };
258849
- let response;
258850
- try {
258851
- response = await appClient.patch("metadata/slug", { json: request });
258852
- } catch (error48) {
258853
- const apiError = await ApiError.fromHttpError(error48, "updating slug");
258854
- const suggestions = SlugSuggestionsSchema.safeParse(apiError.responseBody).data?.suggestions;
258855
- if (suggestions && suggestions.length > 0) {
258856
- apiError.hints.unshift({
258857
- message: `Available alternatives: ${suggestions.join(", ")}`
258858
- });
258859
- }
258860
- throw apiError;
258861
- }
258862
- const result = AppSlugResponseSchema.safeParse(await response.json());
258863
- if (!result.success) {
258864
- throw new SchemaValidationError("Invalid response from server", result.error);
258865
- }
258866
- return result.data;
258867
- }
258868
- // src/cli/commands/slug/shared.ts
258869
- function toJsonStdout3(result) {
258870
- return `${JSON.stringify(result, null, 2)}
258871
- `;
258872
- }
258873
- function logAppUrl(url2, log) {
258874
- log.message(`${theme.styles.header("URL")}: ${theme.colors.links(url2)}`);
258875
- }
258876
-
258877
- // src/cli/commands/slug/reset.ts
258878
- async function resetSlugAction({
258879
- log,
258880
- runTask: runTask2,
258881
- jsonMode
258882
- }) {
258883
- const result = await runTask2("Resetting slug...", async () => {
258884
- const updated = await updateSlug(null);
258885
- return { slug: updated.slug, url: await getSiteUrl() };
258886
- }, { errorMessage: "Failed to reset slug" });
258887
- if (jsonMode) {
258888
- return {
258889
- outroMessage: `Slug reset to ${result.slug}`,
258890
- stdout: toJsonStdout3(result)
258891
- };
258892
- }
258893
- log.message(`${theme.styles.header("Slug")}: ${theme.styles.bold(result.slug ?? "")}`);
258894
- logAppUrl(result.url, log);
258895
- return { outroMessage: `Slug reset to ${result.slug}` };
258896
- }
258897
- function getSlugResetCommand() {
258898
- return new Base44Command("reset").description("Reset the slug to an auto-generated one").action(resetSlugAction);
258899
- }
258900
-
258901
- // src/cli/commands/slug/set.ts
258902
- async function setSlugAction({ log, runTask: runTask2, jsonMode }, slug) {
258903
- const result = await runTask2(`Setting slug to ${slug}...`, async () => {
258904
- const { slug: previousSlug } = await getSlug();
258905
- const updated = await updateSlug(slug);
258906
- return { previousSlug, slug: updated.slug, url: await getSiteUrl() };
258907
- }, { errorMessage: "Failed to update slug" });
258908
- if (jsonMode) {
258909
- return {
258910
- outroMessage: `Slug set to ${result.slug}`,
258911
- stdout: toJsonStdout3(result)
258912
- };
258913
- }
258914
- log.message(`${theme.styles.header("Slug")}: ${result.previousSlug ?? "(none)"} ${theme.styles.dim("→")} ${theme.styles.bold(result.slug ?? "")}`);
258915
- logAppUrl(result.url, log);
258916
- return { outroMessage: `Slug set to ${result.slug}` };
258917
- }
258918
- function getSlugSetCommand() {
258919
- return new Base44Command("set").description("Set a custom slug for this app").argument("<slug>", "New slug, e.g. my-app (3-50 chars: lowercase letters, numbers, hyphens)").action(setSlugAction);
258920
- }
258921
-
258922
- // src/cli/commands/slug/show.ts
258923
- async function showSlugAction({
258924
- log,
258925
- runTask: runTask2,
258926
- jsonMode
258927
- }) {
258928
- const { slug, url: url2 } = await runTask2("Fetching slug...", async () => {
258929
- const { slug: slug2 } = await getSlug();
258930
- return { slug: slug2, url: slug2 ? await getSiteUrl() : null };
258931
- }, { errorMessage: "Failed to fetch slug" });
258932
- if (jsonMode) {
258933
- return {
258934
- outroMessage: slug ? `Slug: ${slug}` : "This app has no slug yet",
258935
- stdout: toJsonStdout3({ slug, url: url2 })
258936
- };
258937
- }
258938
- if (!slug) {
258939
- return {
258940
- outroMessage: "This app has no slug yet — set one with 'base44 slug set <slug>'"
258941
- };
258942
- }
258943
- log.message(`${theme.styles.header("Slug")}: ${theme.styles.bold(slug)}`);
258944
- if (url2) {
258945
- logAppUrl(url2, log);
258946
- }
258947
- return { outroMessage: `Slug: ${slug}` };
258948
- }
258949
-
258950
- // src/cli/commands/slug/index.ts
258951
- function getSlugCommand() {
258952
- return new Base44Command("slug").description("Show or change the app's URL slug (its public subdomain)").allowExcessArguments(false).action(showSlugAction).addCommand(getSlugSetCommand()).addCommand(getSlugResetCommand());
258953
- }
258954
-
258955
258611
  // src/core/types/generator.ts
258956
258612
  var import_common_tags = __toESM(require_lib2(), 1);
258957
258613
  var import_json_schema_to_typescript = __toESM(require_src3(), 1);
@@ -259008,9 +258664,9 @@ async function generateContent(input) {
259008
258664
  `);
259009
258665
  }
259010
258666
  async function compileEntity(entity2) {
259011
- const { name: name2, source: _source, ...schema15 } = entity2;
258667
+ const { name: name2, source: _source, ...schema13 } = entity2;
259012
258668
  const jsonSchema = {
259013
- ...schema15,
258669
+ ...schema13,
259014
258670
  title: name2,
259015
258671
  additionalProperties: false
259016
258672
  };
@@ -260300,22 +259956,22 @@ class Database {
260300
259956
  this.schemas.clear();
260301
259957
  }
260302
259958
  validate(entityName, record2, partial2 = false) {
260303
- const schema15 = this.schemas.get(this.normalizeName(entityName));
260304
- if (!schema15) {
259959
+ const schema13 = this.schemas.get(this.normalizeName(entityName));
259960
+ if (!schema13) {
260305
259961
  throw new Error(`Entity "${entityName}" not found`);
260306
259962
  }
260307
- return this.validator.validate(record2, schema15, partial2);
259963
+ return this.validator.validate(record2, schema13, partial2);
260308
259964
  }
260309
259965
  prepareRecord(entityName, record2, partial2 = false) {
260310
- const schema15 = this.schemas.get(this.normalizeName(entityName));
260311
- if (!schema15) {
259966
+ const schema13 = this.schemas.get(this.normalizeName(entityName));
259967
+ if (!schema13) {
260312
259968
  throw new Error(`Entity "${entityName}" not found`);
260313
259969
  }
260314
- const filteredRecord = this.validator.filterFields(record2, schema15);
259970
+ const filteredRecord = this.validator.filterFields(record2, schema13);
260315
259971
  if (partial2) {
260316
259972
  return filteredRecord;
260317
259973
  }
260318
- return this.validator.applyDefaults(filteredRecord, schema15);
259974
+ return this.validator.applyDefaults(filteredRecord, schema13);
260319
259975
  }
260320
259976
  normalizeName(entityName) {
260321
259977
  return entityName.toLowerCase();
@@ -260609,13 +260265,13 @@ function checkRLS(rule, record2, user) {
260609
260265
  return false;
260610
260266
  return evaluateCondition(rule, record2, user);
260611
260267
  }
260612
- function applyFLS(record2, schema15, user, operation) {
260268
+ function applyFLS(record2, schema13, user, operation) {
260613
260269
  if (Array.isArray(record2)) {
260614
- return record2.map((r5) => applyFLS(r5, schema15, user, operation));
260270
+ return record2.map((r5) => applyFLS(r5, schema13, user, operation));
260615
260271
  }
260616
260272
  const result = {};
260617
260273
  for (const [key2, value] of Object.entries(record2)) {
260618
- const rule = schema15.properties[key2]?.rls?.[operation];
260274
+ const rule = schema13.properties[key2]?.rls?.[operation];
260619
260275
  if (rule === undefined || checkRLS(rule, record2, user)) {
260620
260276
  result[key2] = value;
260621
260277
  }
@@ -260843,14 +260499,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260843
260499
  res.status(404).json({ error: `Entity "${entityName}" not found` });
260844
260500
  return;
260845
260501
  }
260846
- const schema15 = db2.getSchema(entityName);
260847
- if (!schema15) {
260502
+ const schema13 = db2.getSchema(entityName);
260503
+ if (!schema13) {
260848
260504
  res.status(404).json({ error: `Schema for "${entityName}" not found` });
260849
260505
  return;
260850
260506
  }
260851
260507
  const currentUserResult = await resolveCurrentUser(db2, req);
260852
260508
  const currentUser = currentUserResult.ok ? currentUserResult.user : undefined;
260853
- await handler(req, res, collection, schema15, currentUser);
260509
+ await handler(req, res, collection, schema13, currentUser);
260854
260510
  };
260855
260511
  }
260856
260512
  function emit(appId, entityName, type, data) {
@@ -260868,19 +260524,19 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260868
260524
  }
260869
260525
  broadcast(appId, entityName, createData(data));
260870
260526
  }
260871
- function prepareCreateRecord(entityName, body, schema15, currentUser, now) {
260527
+ function prepareCreateRecord(entityName, body, schema13, currentUser, now) {
260872
260528
  const { _id, ...recordBody } = body;
260873
260529
  const ownerFields = {
260874
260530
  created_by: currentUser?.email,
260875
260531
  created_by_id: currentUser?.id
260876
260532
  };
260877
- if (!checkRLS(schema15.rls?.create, {
260533
+ if (!checkRLS(schema13.rls?.create, {
260878
260534
  ...recordBody,
260879
260535
  ...ownerFields
260880
260536
  }, currentUser)) {
260881
260537
  return;
260882
260538
  }
260883
- const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema15, currentUser, "write");
260539
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema13, currentUser, "write");
260884
260540
  db2.validate(entityName, filteredBody);
260885
260541
  return {
260886
260542
  ...filteredBody,
@@ -260892,7 +260548,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260892
260548
  }
260893
260549
  const userRouter = createUserRouter(db2, logger2);
260894
260550
  router.use("/User", userRouter);
260895
- router.get("/:entityName/:id", withCollection(async (req, res, collection, schema15, currentUser) => {
260551
+ router.get("/:entityName/:id", withCollection(async (req, res, collection, schema13, currentUser) => {
260896
260552
  const { entityName, id: id2 } = req.params;
260897
260553
  try {
260898
260554
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -260900,27 +260556,27 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260900
260556
  res.status(404).json({ error: `Record with id "${id2}" not found` });
260901
260557
  return;
260902
260558
  }
260903
- if (!checkRLS(schema15.rls?.read, doc2, currentUser)) {
260559
+ if (!checkRLS(schema13.rls?.read, doc2, currentUser)) {
260904
260560
  res.status(404).json({
260905
260561
  message: `Entity ${entityName} with ID ${id2} not found`
260906
260562
  });
260907
260563
  return;
260908
260564
  }
260909
- const result = applyFLS(stripInternalFields(doc2), schema15, currentUser, "read");
260565
+ const result = applyFLS(stripInternalFields(doc2), schema13, currentUser, "read");
260910
260566
  res.json(result);
260911
260567
  } catch (error48) {
260912
260568
  logger2.error(`Error in GET /${entityName}/${id2}:`, error48);
260913
260569
  res.status(500).json({ error: "Internal server error" });
260914
260570
  }
260915
260571
  }));
260916
- router.get("/:entityName", withCollection(async (req, res, collection, schema15, currentUser) => {
260572
+ router.get("/:entityName", withCollection(async (req, res, collection, schema13, currentUser) => {
260917
260573
  const { entityName } = req.params;
260918
260574
  try {
260919
260575
  let results = stripInternalFields(await queryEntity(collection, req.query));
260920
- if (schema15.rls?.read !== undefined && schema15.rls.read !== true) {
260921
- results = results.filter((doc2) => checkRLS(schema15.rls.read, doc2, currentUser));
260576
+ if (schema13.rls?.read !== undefined && schema13.rls.read !== true) {
260577
+ results = results.filter((doc2) => checkRLS(schema13.rls.read, doc2, currentUser));
260922
260578
  }
260923
- results = results.map((doc2) => applyFLS(doc2, schema15, currentUser, "read"));
260579
+ results = results.map((doc2) => applyFLS(doc2, schema13, currentUser, "read"));
260924
260580
  res.json(results);
260925
260581
  } catch (error48) {
260926
260582
  if (error48 instanceof InvalidInputError) {
@@ -260931,16 +260587,16 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260931
260587
  }
260932
260588
  }
260933
260589
  }));
260934
- router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema15, currentUser) => {
260590
+ router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
260935
260591
  const { appId, entityName } = req.params;
260936
260592
  try {
260937
260593
  const now = new Date().toISOString();
260938
- const record2 = prepareCreateRecord(entityName, req.body, schema15, currentUser, now);
260594
+ const record2 = prepareCreateRecord(entityName, req.body, schema13, currentUser, now);
260939
260595
  if (!record2) {
260940
260596
  res.status(403).json({ error: "Permission denied" });
260941
260597
  return;
260942
260598
  }
260943
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema15, currentUser, "read");
260599
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema13, currentUser, "read");
260944
260600
  emit(appId, entityName, "create", inserted);
260945
260601
  res.status(201).json(inserted);
260946
260602
  } catch (error48) {
@@ -260952,7 +260608,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260952
260608
  res.status(500).json({ error: "Internal server error" });
260953
260609
  }
260954
260610
  }));
260955
- router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema15, currentUser) => {
260611
+ router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
260956
260612
  const { appId, entityName } = req.params;
260957
260613
  if (!Array.isArray(req.body)) {
260958
260614
  res.status(400).json({ error: "Request body must be an array" });
@@ -260962,14 +260618,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260962
260618
  const now = new Date().toISOString();
260963
260619
  const records = [];
260964
260620
  for (const body of req.body) {
260965
- const record2 = prepareCreateRecord(entityName, body, schema15, currentUser, now);
260621
+ const record2 = prepareCreateRecord(entityName, body, schema13, currentUser, now);
260966
260622
  if (!record2) {
260967
260623
  res.status(403).json({ error: "Permission denied" });
260968
260624
  return;
260969
260625
  }
260970
260626
  records.push(record2);
260971
260627
  }
260972
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema15, currentUser, "read");
260628
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema13, currentUser, "read");
260973
260629
  emit(appId, entityName, "create", inserted);
260974
260630
  res.status(201).json(inserted);
260975
260631
  } catch (error48) {
@@ -260981,24 +260637,24 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260981
260637
  res.status(500).json({ error: "Internal server error" });
260982
260638
  }
260983
260639
  }));
260984
- router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema15, currentUser) => {
260640
+ router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
260985
260641
  const { appId, entityName, id: id2 } = req.params;
260986
260642
  const { id: _id, created_date: _created_date, ...body } = req.body;
260987
260643
  try {
260988
- if (schema15.rls?.update !== undefined) {
260644
+ if (schema13.rls?.update !== undefined) {
260989
260645
  const existing = await collection.findOneAsync({ id: id2 });
260990
260646
  if (!existing) {
260991
260647
  res.status(404).json({ error: `Record with id "${id2}" not found` });
260992
260648
  return;
260993
260649
  }
260994
- if (!checkRLS(schema15.rls.update, existing, currentUser)) {
260650
+ if (!checkRLS(schema13.rls.update, existing, currentUser)) {
260995
260651
  res.status(404).json({
260996
260652
  message: `Entity ${entityName} with ID ${id2} not found`
260997
260653
  });
260998
260654
  return;
260999
260655
  }
261000
260656
  }
261001
- const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema15, currentUser, "write");
260657
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema13, currentUser, "write");
261002
260658
  db2.validate(entityName, filteredBody, true);
261003
260659
  const updateData = {
261004
260660
  ...filteredBody,
@@ -261009,7 +260665,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
261009
260665
  res.status(404).json({ error: `Record with id "${id2}" not found` });
261010
260666
  return;
261011
260667
  }
261012
- const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema15, currentUser, "read");
260668
+ const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema13, currentUser, "read");
261013
260669
  emit(appId, entityName, "update", updated);
261014
260670
  res.json(updated);
261015
260671
  } catch (error48) {
@@ -261021,7 +260677,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
261021
260677
  res.status(500).json({ error: "Internal server error" });
261022
260678
  }
261023
260679
  }));
261024
- router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema15, currentUser) => {
260680
+ router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema13, currentUser) => {
261025
260681
  const { appId, entityName, id: id2 } = req.params;
261026
260682
  try {
261027
260683
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -261029,7 +260685,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
261029
260685
  res.status(404).json({ error: `Record with id "${id2}" not found` });
261030
260686
  return;
261031
260687
  }
261032
- if (!checkRLS(schema15.rls?.delete, doc2, currentUser)) {
260688
+ if (!checkRLS(schema13.rls?.delete, doc2, currentUser)) {
261033
260689
  res.status(404).json({
261034
260690
  message: `Entity ${entityName} with ID ${id2} not found`
261035
260691
  });
@@ -261043,11 +260699,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
261043
260699
  res.status(500).json({ error: "Internal server error" });
261044
260700
  }
261045
260701
  }));
261046
- router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema15, currentUser) => {
260702
+ router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
261047
260703
  const { entityName } = req.params;
261048
260704
  try {
261049
260705
  const query = req.body || {};
261050
- const rlsDelete = schema15?.rls?.delete;
260706
+ const rlsDelete = schema13?.rls?.delete;
261051
260707
  if (rlsDelete !== undefined && rlsDelete !== true) {
261052
260708
  if (rlsDelete === false && currentUser?.is_service !== true) {
261053
260709
  res.status(403).json({ error: "Permission denied" });
@@ -263464,8 +263120,6 @@ function createProgram(context) {
263464
263120
  program2.addCommand(getAgentSkillsCommand());
263465
263121
  program2.addCommand(getConnectorsCommand());
263466
263122
  program2.addCommand(getFunctionsCommand());
263467
- program2.addCommand(getDomainsCommand());
263468
- program2.addCommand(getSlugCommand());
263469
263123
  program2.addCommand(getSecretsCommand());
263470
263124
  program2.addCommand(getSandboxCommand());
263471
263125
  program2.addCommand(getAuthCommand());
@@ -267721,4 +267375,4 @@ export {
267721
267375
  CLIExitError
267722
267376
  };
267723
267377
 
267724
- //# debugId=8FD9B142584B37FC64756E2164756E21
267378
+ //# debugId=ACC632618E19D78664756E2164756E21