@base44-preview/cli 0.1.5-pr.575.c55cbe2 → 0.1.5-pr.576.5e79c21

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
@@ -13718,12 +13718,12 @@ var require_schema = __commonJS((exports, module) => {
13718
13718
  var common = require_common3();
13719
13719
  var YAMLException = require_exception();
13720
13720
  var Type = require_type();
13721
- function compileList(schema8, name2, result) {
13721
+ function compileList(schema7, name2, result) {
13722
13722
  var exclude = [];
13723
- schema8.include.forEach(function(includedSchema) {
13723
+ schema7.include.forEach(function(includedSchema) {
13724
13724
  result = compileList(includedSchema, name2, result);
13725
13725
  });
13726
- schema8[name2].forEach(function(currentType) {
13726
+ schema7[name2].forEach(function(currentType) {
13727
13727
  result.forEach(function(previousType, previousIndex) {
13728
13728
  if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
13729
13729
  exclude.push(previousIndex);
@@ -13780,8 +13780,8 @@ var require_schema = __commonJS((exports, module) => {
13780
13780
  }
13781
13781
  schemas3 = common.toArray(schemas3);
13782
13782
  types = common.toArray(types);
13783
- if (!schemas3.every(function(schema8) {
13784
- return schema8 instanceof Schema;
13783
+ if (!schemas3.every(function(schema7) {
13784
+ return schema7 instanceof Schema;
13785
13785
  })) {
13786
13786
  throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");
13787
13787
  }
@@ -15802,7 +15802,7 @@ var require_dumper = __commonJS((exports, module) => {
15802
15802
  "Off",
15803
15803
  "OFF"
15804
15804
  ];
15805
- function compileStyleMap(schema8, map2) {
15805
+ function compileStyleMap(schema7, map2) {
15806
15806
  var result, keys, index, length, tag, style, type;
15807
15807
  if (map2 === null)
15808
15808
  return {};
@@ -15814,7 +15814,7 @@ var require_dumper = __commonJS((exports, module) => {
15814
15814
  if (tag.slice(0, 2) === "!!") {
15815
15815
  tag = "tag:yaml.org,2002:" + tag.slice(2);
15816
15816
  }
15817
- type = schema8.compiledTypeMap["fallback"][tag];
15817
+ type = schema7.compiledTypeMap["fallback"][tag];
15818
15818
  if (type && _hasOwnProperty.call(type.styleAliases, style)) {
15819
15819
  style = type.styleAliases[style];
15820
15820
  }
@@ -20114,7 +20114,7 @@ var require_lodash8 = __commonJS((exports, module) => {
20114
20114
  }
20115
20115
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
20116
20116
  });
20117
- function join15(array2, separator) {
20117
+ function join14(array2, separator) {
20118
20118
  return array2 == null ? "" : nativeJoin.call(array2, separator);
20119
20119
  }
20120
20120
  function last(array2) {
@@ -22046,7 +22046,7 @@ __p += '`;
22046
22046
  lodash.isUndefined = isUndefined;
22047
22047
  lodash.isWeakMap = isWeakMap;
22048
22048
  lodash.isWeakSet = isWeakSet;
22049
- lodash.join = join15;
22049
+ lodash.join = join14;
22050
22050
  lodash.kebabCase = kebabCase;
22051
22051
  lodash.last = last;
22052
22052
  lodash.lastIndexOf = lastIndexOf;
@@ -23001,7 +23001,7 @@ var require_createNode = __commonJS((exports) => {
23001
23001
  if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
23002
23002
  value = value.valueOf();
23003
23003
  }
23004
- const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema11, sourceObjects } = ctx;
23004
+ const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema10, sourceObjects } = ctx;
23005
23005
  let ref = undefined;
23006
23006
  if (aliasDuplicateObjects && value && typeof value === "object") {
23007
23007
  ref = sourceObjects.get(value);
@@ -23015,7 +23015,7 @@ var require_createNode = __commonJS((exports) => {
23015
23015
  }
23016
23016
  if (tagName?.startsWith("!!"))
23017
23017
  tagName = defaultTagPrefix + tagName.slice(2);
23018
- let tagObj = findTagObject(value, tagName, schema11.tags);
23018
+ let tagObj = findTagObject(value, tagName, schema10.tags);
23019
23019
  if (!tagObj) {
23020
23020
  if (value && typeof value.toJSON === "function") {
23021
23021
  value = value.toJSON();
@@ -23026,7 +23026,7 @@ var require_createNode = __commonJS((exports) => {
23026
23026
  ref.node = node2;
23027
23027
  return node2;
23028
23028
  }
23029
- tagObj = value instanceof Map ? schema11[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema11[identity3.SEQ] : schema11[identity3.MAP];
23029
+ tagObj = value instanceof Map ? schema10[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema10[identity3.SEQ] : schema10[identity3.MAP];
23030
23030
  }
23031
23031
  if (onTagObj) {
23032
23032
  onTagObj(tagObj);
@@ -23049,7 +23049,7 @@ var require_Collection = __commonJS((exports) => {
23049
23049
  var createNode = require_createNode();
23050
23050
  var identity3 = require_identity();
23051
23051
  var Node2 = require_Node();
23052
- function collectionFromPath(schema11, path16, value) {
23052
+ function collectionFromPath(schema10, path16, value) {
23053
23053
  let v = value;
23054
23054
  for (let i2 = path16.length - 1;i2 >= 0; --i2) {
23055
23055
  const k2 = path16[i2];
@@ -23067,27 +23067,27 @@ var require_Collection = __commonJS((exports) => {
23067
23067
  onAnchor: () => {
23068
23068
  throw new Error("This should not happen, please report a bug.");
23069
23069
  },
23070
- schema: schema11,
23070
+ schema: schema10,
23071
23071
  sourceObjects: new Map
23072
23072
  });
23073
23073
  }
23074
23074
  var isEmptyPath = (path16) => path16 == null || typeof path16 === "object" && !!path16[Symbol.iterator]().next().done;
23075
23075
 
23076
23076
  class Collection extends Node2.NodeBase {
23077
- constructor(type, schema11) {
23077
+ constructor(type, schema10) {
23078
23078
  super(type);
23079
23079
  Object.defineProperty(this, "schema", {
23080
- value: schema11,
23080
+ value: schema10,
23081
23081
  configurable: true,
23082
23082
  enumerable: false,
23083
23083
  writable: true
23084
23084
  });
23085
23085
  }
23086
- clone(schema11) {
23086
+ clone(schema10) {
23087
23087
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
23088
- if (schema11)
23089
- copy.schema = schema11;
23090
- copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema11) : it3);
23088
+ if (schema10)
23089
+ copy.schema = schema10;
23090
+ copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema10) : it3);
23091
23091
  if (this.range)
23092
23092
  copy.range = this.range.slice();
23093
23093
  return copy;
@@ -24019,12 +24019,12 @@ var require_Pair = __commonJS((exports) => {
24019
24019
  this.key = key;
24020
24020
  this.value = value;
24021
24021
  }
24022
- clone(schema11) {
24022
+ clone(schema10) {
24023
24023
  let { key, value } = this;
24024
24024
  if (identity3.isNode(key))
24025
- key = key.clone(schema11);
24025
+ key = key.clone(schema10);
24026
24026
  if (identity3.isNode(value))
24027
- value = value.clone(schema11);
24027
+ value = value.clone(schema10);
24028
24028
  return new Pair(key, value);
24029
24029
  }
24030
24030
  toJSON(_2, ctx) {
@@ -24209,13 +24209,13 @@ var require_YAMLMap = __commonJS((exports) => {
24209
24209
  static get tagName() {
24210
24210
  return "tag:yaml.org,2002:map";
24211
24211
  }
24212
- constructor(schema11) {
24213
- super(identity3.MAP, schema11);
24212
+ constructor(schema10) {
24213
+ super(identity3.MAP, schema10);
24214
24214
  this.items = [];
24215
24215
  }
24216
- static from(schema11, obj, ctx) {
24216
+ static from(schema10, obj, ctx) {
24217
24217
  const { keepUndefined, replacer } = ctx;
24218
- const map2 = new this(schema11);
24218
+ const map2 = new this(schema10);
24219
24219
  const add = (key, value) => {
24220
24220
  if (typeof replacer === "function")
24221
24221
  value = replacer.call(obj, key, value);
@@ -24231,8 +24231,8 @@ var require_YAMLMap = __commonJS((exports) => {
24231
24231
  for (const key of Object.keys(obj))
24232
24232
  add(key, obj[key]);
24233
24233
  }
24234
- if (typeof schema11.sortMapEntries === "function") {
24235
- map2.items.sort(schema11.sortMapEntries);
24234
+ if (typeof schema10.sortMapEntries === "function") {
24235
+ map2.items.sort(schema10.sortMapEntries);
24236
24236
  }
24237
24237
  return map2;
24238
24238
  }
@@ -24325,7 +24325,7 @@ var require_map2 = __commonJS((exports) => {
24325
24325
  onError("Expected a mapping for this tag");
24326
24326
  return map3;
24327
24327
  },
24328
- createNode: (schema11, obj, ctx) => YAMLMap.YAMLMap.from(schema11, obj, ctx)
24328
+ createNode: (schema10, obj, ctx) => YAMLMap.YAMLMap.from(schema10, obj, ctx)
24329
24329
  };
24330
24330
  exports.map = map2;
24331
24331
  });
@@ -24343,8 +24343,8 @@ var require_YAMLSeq = __commonJS((exports) => {
24343
24343
  static get tagName() {
24344
24344
  return "tag:yaml.org,2002:seq";
24345
24345
  }
24346
- constructor(schema11) {
24347
- super(identity3.SEQ, schema11);
24346
+ constructor(schema10) {
24347
+ super(identity3.SEQ, schema10);
24348
24348
  this.items = [];
24349
24349
  }
24350
24350
  add(value) {
@@ -24398,9 +24398,9 @@ var require_YAMLSeq = __commonJS((exports) => {
24398
24398
  onComment
24399
24399
  });
24400
24400
  }
24401
- static from(schema11, obj, ctx) {
24401
+ static from(schema10, obj, ctx) {
24402
24402
  const { replacer } = ctx;
24403
- const seq = new this(schema11);
24403
+ const seq = new this(schema10);
24404
24404
  if (obj && Symbol.iterator in Object(obj)) {
24405
24405
  let i2 = 0;
24406
24406
  for (let it3 of obj) {
@@ -24437,7 +24437,7 @@ var require_seq2 = __commonJS((exports) => {
24437
24437
  onError("Expected a sequence for this tag");
24438
24438
  return seq2;
24439
24439
  },
24440
- createNode: (schema11, obj, ctx) => YAMLSeq.YAMLSeq.from(schema11, obj, ctx)
24440
+ createNode: (schema10, obj, ctx) => YAMLSeq.YAMLSeq.from(schema10, obj, ctx)
24441
24441
  };
24442
24442
  exports.seq = seq;
24443
24443
  });
@@ -24612,7 +24612,7 @@ var require_schema2 = __commonJS((exports) => {
24612
24612
  var bool = require_bool2();
24613
24613
  var float = require_float2();
24614
24614
  var int2 = require_int2();
24615
- var schema11 = [
24615
+ var schema10 = [
24616
24616
  map2.map,
24617
24617
  seq.seq,
24618
24618
  string4.string,
@@ -24625,7 +24625,7 @@ var require_schema2 = __commonJS((exports) => {
24625
24625
  float.floatExp,
24626
24626
  float.float
24627
24627
  ];
24628
- exports.schema = schema11;
24628
+ exports.schema = schema10;
24629
24629
  });
24630
24630
 
24631
24631
  // ../../node_modules/yaml/dist/schema/json/schema.js
@@ -24688,8 +24688,8 @@ var require_schema3 = __commonJS((exports) => {
24688
24688
  return str;
24689
24689
  }
24690
24690
  };
24691
- var schema11 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
24692
- exports.schema = schema11;
24691
+ var schema10 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
24692
+ exports.schema = schema10;
24693
24693
  });
24694
24694
 
24695
24695
  // ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js
@@ -24779,9 +24779,9 @@ ${cn.comment}` : item.comment;
24779
24779
  onError("Expected a sequence for this tag");
24780
24780
  return seq;
24781
24781
  }
24782
- function createPairs(schema11, iterable, ctx) {
24782
+ function createPairs(schema10, iterable, ctx) {
24783
24783
  const { replacer } = ctx;
24784
- const pairs2 = new YAMLSeq.YAMLSeq(schema11);
24784
+ const pairs2 = new YAMLSeq.YAMLSeq(schema10);
24785
24785
  pairs2.tag = "tag:yaml.org,2002:pairs";
24786
24786
  let i2 = 0;
24787
24787
  if (iterable && Symbol.iterator in Object(iterable))
@@ -24860,8 +24860,8 @@ var require_omap2 = __commonJS((exports) => {
24860
24860
  }
24861
24861
  return map2;
24862
24862
  }
24863
- static from(schema11, iterable, ctx) {
24864
- const pairs$1 = pairs.createPairs(schema11, iterable, ctx);
24863
+ static from(schema10, iterable, ctx) {
24864
+ const pairs$1 = pairs.createPairs(schema10, iterable, ctx);
24865
24865
  const omap2 = new this;
24866
24866
  omap2.items = pairs$1.items;
24867
24867
  return omap2;
@@ -24888,7 +24888,7 @@ var require_omap2 = __commonJS((exports) => {
24888
24888
  }
24889
24889
  return Object.assign(new YAMLOMap, pairs$1);
24890
24890
  },
24891
- createNode: (schema11, iterable, ctx) => YAMLOMap.from(schema11, iterable, ctx)
24891
+ createNode: (schema10, iterable, ctx) => YAMLOMap.from(schema10, iterable, ctx)
24892
24892
  };
24893
24893
  exports.YAMLOMap = YAMLOMap;
24894
24894
  exports.omap = omap;
@@ -25052,8 +25052,8 @@ var require_set2 = __commonJS((exports) => {
25052
25052
  var YAMLMap = require_YAMLMap();
25053
25053
 
25054
25054
  class YAMLSet extends YAMLMap.YAMLMap {
25055
- constructor(schema11) {
25056
- super(schema11);
25055
+ constructor(schema10) {
25056
+ super(schema10);
25057
25057
  this.tag = YAMLSet.tag;
25058
25058
  }
25059
25059
  add(key) {
@@ -25093,9 +25093,9 @@ var require_set2 = __commonJS((exports) => {
25093
25093
  else
25094
25094
  throw new Error("Set items must all have null values");
25095
25095
  }
25096
- static from(schema11, iterable, ctx) {
25096
+ static from(schema10, iterable, ctx) {
25097
25097
  const { replacer } = ctx;
25098
- const set3 = new this(schema11);
25098
+ const set3 = new this(schema10);
25099
25099
  if (iterable && Symbol.iterator in Object(iterable))
25100
25100
  for (let value of iterable) {
25101
25101
  if (typeof replacer === "function")
@@ -25112,7 +25112,7 @@ var require_set2 = __commonJS((exports) => {
25112
25112
  nodeClass: YAMLSet,
25113
25113
  default: false,
25114
25114
  tag: "tag:yaml.org,2002:set",
25115
- createNode: (schema11, iterable, ctx) => YAMLSet.from(schema11, iterable, ctx),
25115
+ createNode: (schema10, iterable, ctx) => YAMLSet.from(schema10, iterable, ctx),
25116
25116
  resolve(map2, onError) {
25117
25117
  if (identity3.isMap(map2)) {
25118
25118
  if (map2.hasAllNullValues(true))
@@ -25225,7 +25225,7 @@ var require_schema4 = __commonJS((exports) => {
25225
25225
  var pairs = require_pairs2();
25226
25226
  var set2 = require_set2();
25227
25227
  var timestamp = require_timestamp2();
25228
- var schema11 = [
25228
+ var schema10 = [
25229
25229
  map2.map,
25230
25230
  seq.seq,
25231
25231
  string4.string,
@@ -25248,7 +25248,7 @@ var require_schema4 = __commonJS((exports) => {
25248
25248
  timestamp.floatTime,
25249
25249
  timestamp.timestamp
25250
25250
  ];
25251
- exports.schema = schema11;
25251
+ exports.schema = schema10;
25252
25252
  });
25253
25253
 
25254
25254
  // ../../node_modules/yaml/dist/schema/tags.js
@@ -25260,7 +25260,7 @@ var require_tags = __commonJS((exports) => {
25260
25260
  var bool = require_bool2();
25261
25261
  var float = require_float2();
25262
25262
  var int2 = require_int2();
25263
- var schema11 = require_schema2();
25263
+ var schema10 = require_schema2();
25264
25264
  var schema$1 = require_schema3();
25265
25265
  var binary = require_binary2();
25266
25266
  var merge3 = require_merge3();
@@ -25270,7 +25270,7 @@ var require_tags = __commonJS((exports) => {
25270
25270
  var set2 = require_set2();
25271
25271
  var timestamp = require_timestamp2();
25272
25272
  var schemas3 = new Map([
25273
- ["core", schema11.schema],
25273
+ ["core", schema10.schema],
25274
25274
  ["failsafe", [map2.map, seq.seq, string4.string]],
25275
25275
  ["json", schema$1.schema],
25276
25276
  ["yaml11", schema$2.schema],
@@ -25352,9 +25352,9 @@ var require_Schema = __commonJS((exports) => {
25352
25352
  var sortMapEntriesByKey = (a2, b) => a2.key < b.key ? -1 : a2.key > b.key ? 1 : 0;
25353
25353
 
25354
25354
  class Schema {
25355
- constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema: schema11, sortMapEntries, toStringDefaults }) {
25355
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema: schema10, sortMapEntries, toStringDefaults }) {
25356
25356
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
25357
- this.name = typeof schema11 === "string" && schema11 || "core";
25357
+ this.name = typeof schema10 === "string" && schema10 || "core";
25358
25358
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
25359
25359
  this.tags = tags.getTags(customTags, this.name, merge3);
25360
25360
  this.toStringOptions = toStringDefaults ?? null;
@@ -26846,11 +26846,11 @@ var require_compose_scalar = __commonJS((exports) => {
26846
26846
  scalar.comment = comment;
26847
26847
  return scalar;
26848
26848
  }
26849
- function findScalarTagByName(schema11, value, tagName, tagToken, onError) {
26849
+ function findScalarTagByName(schema10, value, tagName, tagToken, onError) {
26850
26850
  if (tagName === "!")
26851
- return schema11[identity3.SCALAR];
26851
+ return schema10[identity3.SCALAR];
26852
26852
  const matchWithTest = [];
26853
- for (const tag of schema11.tags) {
26853
+ for (const tag of schema10.tags) {
26854
26854
  if (!tag.collection && tag.tag === tagName) {
26855
26855
  if (tag.default && tag.test)
26856
26856
  matchWithTest.push(tag);
@@ -26861,18 +26861,18 @@ var require_compose_scalar = __commonJS((exports) => {
26861
26861
  for (const tag of matchWithTest)
26862
26862
  if (tag.test?.test(value))
26863
26863
  return tag;
26864
- const kt3 = schema11.knownTags[tagName];
26864
+ const kt3 = schema10.knownTags[tagName];
26865
26865
  if (kt3 && !kt3.collection) {
26866
- schema11.tags.push(Object.assign({}, kt3, { default: false, test: undefined }));
26866
+ schema10.tags.push(Object.assign({}, kt3, { default: false, test: undefined }));
26867
26867
  return kt3;
26868
26868
  }
26869
26869
  onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
26870
- return schema11[identity3.SCALAR];
26870
+ return schema10[identity3.SCALAR];
26871
26871
  }
26872
- function findScalarTagByTest({ atKey, directives, schema: schema11 }, value, token, onError) {
26873
- const tag = schema11.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema11[identity3.SCALAR];
26874
- if (schema11.compat) {
26875
- const compat2 = schema11.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema11[identity3.SCALAR];
26872
+ function findScalarTagByTest({ atKey, directives, schema: schema10 }, value, token, onError) {
26873
+ const tag = schema10.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema10[identity3.SCALAR];
26874
+ if (schema10.compat) {
26875
+ const compat2 = schema10.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema10[identity3.SCALAR];
26876
26876
  if (tag.tag !== compat2.tag) {
26877
26877
  const ts = directives.tagString(tag.tag);
26878
26878
  const cs = directives.tagString(compat2.tag);
@@ -31158,7 +31158,7 @@ function cleanDoc(doc2) {
31158
31158
  return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc));
31159
31159
  }
31160
31160
  function replaceEndOfLine(doc2, replacement = literalline) {
31161
- return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join24(replacement, currentDoc.split(`
31161
+ return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join22(replacement, currentDoc.split(`
31162
31162
  `)) : currentDoc);
31163
31163
  }
31164
31164
  function canBreakFn(doc2) {
@@ -31238,7 +31238,7 @@ function indentIfBreak(contents, options) {
31238
31238
  negate: options.negate
31239
31239
  };
31240
31240
  }
31241
- function join24(separator, docs) {
31241
+ function join22(separator, docs) {
31242
31242
  assertDoc(separator);
31243
31243
  assertDocArray(docs);
31244
31244
  const parts = [];
@@ -31949,7 +31949,7 @@ var init_doc = __esm(() => {
31949
31949
  MODE_FLAT = Symbol("MODE_FLAT");
31950
31950
  DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
31951
31951
  builders = {
31952
- join: join24,
31952
+ join: join22,
31953
31953
  line,
31954
31954
  softline,
31955
31955
  hardline,
@@ -119560,11 +119560,11 @@ function chooseDescription(descriptions, printWidth) {
119560
119560
  return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription;
119561
119561
  }
119562
119562
  function createSchema(SchemaConstructor, parameters) {
119563
- const schema12 = new SchemaConstructor(parameters);
119564
- const subSchema = Object.create(schema12);
119563
+ const schema11 = new SchemaConstructor(parameters);
119564
+ const subSchema = Object.create(schema11);
119565
119565
  for (const handlerKey of HANDLER_KEYS) {
119566
119566
  if (handlerKey in parameters) {
119567
- subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema12, Schema2.prototype[handlerKey].length);
119567
+ subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema11, Schema2.prototype[handlerKey].length);
119568
119568
  }
119569
119569
  }
119570
119570
  return subSchema;
@@ -119821,8 +119821,8 @@ async function loadEditorconfigInternal(file2, { shouldCache }) {
119821
119821
  const directory = path52.dirname(file2);
119822
119822
  const root2 = await findProjectRoot2(directory, { shouldCache });
119823
119823
  const editorConfig = await import_editorconfig.default.parse(file2, { root: root2 });
119824
- const config13 = editorconfig_to_prettier_default(editorConfig);
119825
- return config13;
119824
+ const config12 = editorconfig_to_prettier_default(editorConfig);
119825
+ return config12;
119826
119826
  }
119827
119827
  function loadEditorconfig(file2, { shouldCache }) {
119828
119828
  file2 = path52.resolve(file2);
@@ -121812,18 +121812,18 @@ async function loadConfig(configFile) {
121812
121812
  if (!load2) {
121813
121813
  throw new Error(`No loader specified for extension "${extension || "noExt"}"`);
121814
121814
  }
121815
- let config13 = await load2(configFile);
121816
- if (!config13) {
121815
+ let config12 = await load2(configFile);
121816
+ if (!config12) {
121817
121817
  return;
121818
121818
  }
121819
- if (typeof config13 === "string") {
121820
- config13 = await load_external_config_default(config13, configFile);
121819
+ if (typeof config12 === "string") {
121820
+ config12 = await load_external_config_default(config12, configFile);
121821
121821
  }
121822
- if (typeof config13 !== "object") {
121823
- throw new TypeError(`Config is only allowed to be an object, but received ${typeof config13} in "${configFile}"`);
121822
+ if (typeof config12 !== "object") {
121823
+ throw new TypeError(`Config is only allowed to be an object, but received ${typeof config12} in "${configFile}"`);
121824
121824
  }
121825
- delete config13.$schema;
121826
- return config13;
121825
+ delete config12.$schema;
121826
+ return config12;
121827
121827
  }
121828
121828
  function clearPrettierConfigCache() {
121829
121829
  loadCache.clear();
@@ -121873,8 +121873,8 @@ async function loadPrettierConfig2(file2, options8) {
121873
121873
  return;
121874
121874
  }
121875
121875
  configFile = toPath3(configFile);
121876
- const config13 = await loadPrettierConfig(configFile, { shouldCache });
121877
- return { config: config13, configFile };
121876
+ const config12 = await loadPrettierConfig(configFile, { shouldCache });
121877
+ return { config: config12, configFile };
121878
121878
  }
121879
121879
  async function resolveConfig(fileUrlOrPath, options8) {
121880
121880
  options8 = { useCache: true, ...options8 };
@@ -121901,8 +121901,8 @@ async function resolveConfigFile(fileUrlOrPath) {
121901
121901
  return result ?? null;
121902
121902
  }
121903
121903
  function mergeOverrides(configResult, filePath) {
121904
- const { config: config13, configFile } = configResult || {};
121905
- const { overrides, ...options8 } = config13 || {};
121904
+ const { config: config12, configFile } = configResult || {};
121905
+ const { overrides, ...options8 } = config12 || {};
121906
121906
  if (filePath && overrides) {
121907
121907
  const relativeFilePath = path102.relative(path102.dirname(configFile), filePath);
121908
121908
  for (const override of overrides) {
@@ -122904,9 +122904,9 @@ function optionInfoToSchema(optionInfo, {
122904
122904
  throw new Error(`Unexpected type ${optionInfo.type}`);
122905
122905
  }
122906
122906
  if (optionInfo.exception) {
122907
- parameters.validate = (value, schema12, utils3) => optionInfo.exception(value) || schema12.validate(value, utils3);
122907
+ parameters.validate = (value, schema11, utils3) => optionInfo.exception(value) || schema11.validate(value, utils3);
122908
122908
  } else {
122909
- parameters.validate = (value, schema12, utils3) => value === undefined || schema12.validate(value, utils3);
122909
+ parameters.validate = (value, schema11, utils3) => value === undefined || schema11.validate(value, utils3);
122910
122910
  }
122911
122911
  if (optionInfo.redirect) {
122912
122912
  handlers.redirect = (value) => !value ? undefined : {
@@ -122921,7 +122921,7 @@ function optionInfoToSchema(optionInfo, {
122921
122921
  }
122922
122922
  if (isCLI && !optionInfo.array) {
122923
122923
  const originalPreprocess = parameters.preprocess || ((x10) => x10);
122924
- parameters.preprocess = (value, schema12, utils3) => schema12.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122924
+ parameters.preprocess = (value, schema11, utils3) => schema11.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122925
122925
  }
122926
122926
  return optionInfo.array ? ArraySchema.create({
122927
122927
  ...isCLI ? {
@@ -124011,16 +124011,16 @@ async function getFileInfo(file2, options8 = {}) {
124011
124011
  };
124012
124012
  }
124013
124013
  async function getParser(file2, options8) {
124014
- let config13;
124014
+ let config12;
124015
124015
  if (options8.resolveConfig !== false) {
124016
- config13 = await resolveConfig(file2, {
124016
+ config12 = await resolveConfig(file2, {
124017
124017
  editorconfig: false
124018
124018
  });
124019
124019
  }
124020
- if (config13?.parser) {
124021
- return config13.parser;
124020
+ if (config12?.parser) {
124021
+ return config12.parser;
124022
124022
  }
124023
- let plugins = options8.plugins ?? config13?.plugins ?? [];
124023
+ let plugins = options8.plugins ?? config12?.plugins ?? [];
124024
124024
  plugins = (await Promise.all([load_builtin_plugins_default(), load_plugins_default(plugins)])).flat();
124025
124025
  return infer_parser_default({ plugins }, { physicalFile: file2 });
124026
124026
  }
@@ -124498,9 +124498,9 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc,
124498
124498
  };
124499
124499
  applyNormalization();
124500
124500
  for (const key2 of Object.keys(this._utils.schemas)) {
124501
- const schema12 = this._utils.schemas[key2];
124501
+ const schema11 = this._utils.schemas[key2];
124502
124502
  if (!(key2 in newOptions)) {
124503
- const defaultResult = normalizeDefaultResult(schema12.default(this._utils));
124503
+ const defaultResult = normalizeDefaultResult(schema11.default(this._utils));
124504
124504
  if ("value" in defaultResult) {
124505
124505
  restOptionsArray.push({ [key2]: defaultResult.value });
124506
124506
  }
@@ -124511,13 +124511,13 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc,
124511
124511
  if (!(key2 in newOptions)) {
124512
124512
  continue;
124513
124513
  }
124514
- const schema12 = this._utils.schemas[key2];
124514
+ const schema11 = this._utils.schemas[key2];
124515
124515
  const value = newOptions[key2];
124516
- const newValue = schema12.postprocess(value, this._utils);
124516
+ const newValue = schema11.postprocess(value, this._utils);
124517
124517
  if (newValue === VALUE_UNCHANGED) {
124518
124518
  continue;
124519
124519
  }
124520
- this._applyValidation(newValue, key2, schema12);
124520
+ this._applyValidation(newValue, key2, schema11);
124521
124521
  newOptions[key2] = newValue;
124522
124522
  }
124523
124523
  this._applyPostprocess(newOptions);
@@ -124528,14 +124528,14 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc,
124528
124528
  const transferredOptionsArray = [];
124529
124529
  const { knownKeys, unknownKeys } = this._partitionOptionKeys(options8);
124530
124530
  for (const key2 of knownKeys) {
124531
- const schema12 = this._utils.schemas[key2];
124532
- const value = schema12.preprocess(options8[key2], this._utils);
124533
- this._applyValidation(value, key2, schema12);
124531
+ const schema11 = this._utils.schemas[key2];
124532
+ const value = schema11.preprocess(options8[key2], this._utils);
124533
+ this._applyValidation(value, key2, schema11);
124534
124534
  const appendTransferredOptions = ({ from, to: to5 }) => {
124535
124535
  transferredOptionsArray.push(typeof to5 === "string" ? { [to5]: from } : { [to5.key]: to5.value });
124536
124536
  };
124537
124537
  const warnDeprecated = ({ value: currentValue, redirectTo }) => {
124538
- const deprecatedResult = normalizeDeprecatedResult(schema12.deprecated(currentValue, this._utils), value, true);
124538
+ const deprecatedResult = normalizeDeprecatedResult(schema11.deprecated(currentValue, this._utils), value, true);
124539
124539
  if (deprecatedResult === false) {
124540
124540
  return;
124541
124541
  }
@@ -124553,13 +124553,13 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc,
124553
124553
  }
124554
124554
  }
124555
124555
  };
124556
- const forwardResult = normalizeForwardResult(schema12.forward(value, this._utils), value);
124556
+ const forwardResult = normalizeForwardResult(schema11.forward(value, this._utils), value);
124557
124557
  forwardResult.forEach(appendTransferredOptions);
124558
- const redirectResult = normalizeRedirectResult(schema12.redirect(value, this._utils), value);
124558
+ const redirectResult = normalizeRedirectResult(schema11.redirect(value, this._utils), value);
124559
124559
  redirectResult.redirect.forEach(appendTransferredOptions);
124560
124560
  if ("remain" in redirectResult) {
124561
124561
  const remainingValue = redirectResult.remain;
124562
- newOptions[key2] = key2 in newOptions ? schema12.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124562
+ newOptions[key2] = key2 in newOptions ? schema11.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124563
124563
  warnDeprecated({ value: remainingValue });
124564
124564
  }
124565
124565
  for (const { from, to: to5 } of redirectResult.redirect) {
@@ -124587,8 +124587,8 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc,
124587
124587
  const [knownKeys, unknownKeys] = partition(Object.keys(options8).filter((key2) => !this._identifyMissing(key2, options8)), (key2) => (key2 in this._utils.schemas));
124588
124588
  return { knownKeys, unknownKeys };
124589
124589
  }
124590
- _applyValidation(value, key2, schema12) {
124591
- const validateResult = normalizeValidateResult(schema12.validate(value, this._utils), value);
124590
+ _applyValidation(value, key2, schema11) {
124591
+ const validateResult = normalizeValidateResult(schema11.validate(value, this._utils), value);
124592
124592
  if (validateResult !== true) {
124593
124593
  throw this._invalidHandler(key2, validateResult.value, this._utils);
124594
124594
  }
@@ -124630,8 +124630,8 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc,
124630
124630
  for (const key2 of unknownKeys) {
124631
124631
  const value = postprocessed.override[key2];
124632
124632
  this._applyUnknownHandler(key2, value, options8, (knownResultKey, knownResultValue) => {
124633
- const schema12 = this._utils.schemas[knownResultKey];
124634
- this._applyValidation(knownResultValue, knownResultKey, schema12);
124633
+ const schema11 = this._utils.schemas[knownResultKey];
124634
+ this._applyValidation(knownResultValue, knownResultKey, schema11);
124635
124635
  options8[knownResultKey] = knownResultValue;
124636
124636
  });
124637
124637
  }
@@ -136863,7 +136863,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
136863
136863
  return mapDoc2(doc2, (currentDoc) => cleanDocFn2(currentDoc));
136864
136864
  }
136865
136865
  function replaceEndOfLine2(doc2, replacement = literalline2) {
136866
- return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join26(replacement, currentDoc.split(`
136866
+ return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join24(replacement, currentDoc.split(`
136867
136867
  `)) : currentDoc);
136868
136868
  }
136869
136869
  function canBreakFn2(doc2) {
@@ -136949,7 +136949,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
136949
136949
  negate: options8.negate
136950
136950
  };
136951
136951
  }
136952
- function join26(separator, docs) {
136952
+ function join24(separator, docs) {
136953
136953
  assertDoc2(separator);
136954
136954
  assertDocArray2(docs);
136955
136955
  const parts = [];
@@ -137614,7 +137614,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
137614
137614
  }
137615
137615
  }
137616
137616
  var builders2 = {
137617
- join: join26,
137617
+ join: join24,
137618
137618
  line: line3,
137619
137619
  softline: softline2,
137620
137620
  hardline: hardline4,
@@ -138344,23 +138344,23 @@ var require_JSONSchema = __commonJS((exports) => {
138344
138344
  exports.Parent = Symbol("Parent");
138345
138345
  exports.Types = Symbol("Types");
138346
138346
  exports.Intersection = Symbol("Intersection");
138347
- exports.getRootSchema = (0, lodash_1.memoize)((schema12) => {
138348
- const parent = schema12[exports.Parent];
138347
+ exports.getRootSchema = (0, lodash_1.memoize)((schema11) => {
138348
+ const parent = schema11[exports.Parent];
138349
138349
  if (!parent) {
138350
- return schema12;
138350
+ return schema11;
138351
138351
  }
138352
138352
  return (0, exports.getRootSchema)(parent);
138353
138353
  });
138354
- function isBoolean(schema12) {
138355
- return schema12 === true || schema12 === false;
138354
+ function isBoolean(schema11) {
138355
+ return schema11 === true || schema11 === false;
138356
138356
  }
138357
138357
  exports.isBoolean = isBoolean;
138358
- function isPrimitive(schema12) {
138359
- return !(0, lodash_1.isPlainObject)(schema12);
138358
+ function isPrimitive(schema11) {
138359
+ return !(0, lodash_1.isPlainObject)(schema11);
138360
138360
  }
138361
138361
  exports.isPrimitive = isPrimitive;
138362
- function isCompound(schema12) {
138363
- return Array.isArray(schema12.type) || "anyOf" in schema12 || "oneOf" in schema12;
138362
+ function isCompound(schema11) {
138363
+ return Array.isArray(schema11.type) || "anyOf" in schema11 || "oneOf" in schema11;
138364
138364
  }
138365
138365
  exports.isCompound = isCompound;
138366
138366
  });
@@ -138587,9 +138587,9 @@ var require_type2 = __commonJS((exports, module) => {
138587
138587
  var require_schema5 = __commonJS((exports, module) => {
138588
138588
  var YAMLException = require_exception2();
138589
138589
  var Type = require_type2();
138590
- function compileList(schema12, name2) {
138590
+ function compileList(schema11, name2) {
138591
138591
  var result = [];
138592
- schema12[name2].forEach(function(currentType) {
138592
+ schema11[name2].forEach(function(currentType) {
138593
138593
  var newIndex = result.length;
138594
138594
  result.forEach(function(previousType, previousIndex) {
138595
138595
  if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
@@ -140534,7 +140534,7 @@ var require_dumper2 = __commonJS((exports, module) => {
140534
140534
  "OFF"
140535
140535
  ];
140536
140536
  var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
140537
- function compileStyleMap(schema12, map2) {
140537
+ function compileStyleMap(schema11, map2) {
140538
140538
  var result, keys, index, length, tag, style, type;
140539
140539
  if (map2 === null)
140540
140540
  return {};
@@ -140546,7 +140546,7 @@ var require_dumper2 = __commonJS((exports, module) => {
140546
140546
  if (tag.slice(0, 2) === "!!") {
140547
140547
  tag = "tag:yaml.org,2002:" + tag.slice(2);
140548
140548
  }
140549
- type = schema12.compiledTypeMap["fallback"][tag];
140549
+ type = schema11.compiledTypeMap["fallback"][tag];
140550
140550
  if (type && _hasOwnProperty.call(type.styleAliases, style)) {
140551
140551
  style = type.styleAliases[style];
140552
140552
  }
@@ -141205,11 +141205,11 @@ var require_utils7 = __commonJS((exports) => {
141205
141205
  function traverseArray(arr, callback, processed) {
141206
141206
  arr.forEach((s5, k9) => traverse(s5, callback, processed, k9.toString()));
141207
141207
  }
141208
- function traverseIntersection(schema12, callback, processed) {
141209
- if (typeof schema12 !== "object" || !schema12) {
141208
+ function traverseIntersection(schema11, callback, processed) {
141209
+ if (typeof schema11 !== "object" || !schema11) {
141210
141210
  return;
141211
141211
  }
141212
- const r5 = schema12;
141212
+ const r5 = schema11;
141213
141213
  const intersection2 = r5[JSONSchema_1.Intersection];
141214
141214
  if (!intersection2) {
141215
141215
  return;
@@ -141218,60 +141218,60 @@ var require_utils7 = __commonJS((exports) => {
141218
141218
  traverseArray(intersection2.allOf, callback, processed);
141219
141219
  }
141220
141220
  }
141221
- function traverse(schema12, callback, processed = new Set, key2) {
141222
- if (processed.has(schema12)) {
141221
+ function traverse(schema11, callback, processed = new Set, key2) {
141222
+ if (processed.has(schema11)) {
141223
141223
  return;
141224
141224
  }
141225
- processed.add(schema12);
141226
- callback(schema12, key2 !== null && key2 !== undefined ? key2 : null);
141227
- if (schema12.anyOf) {
141228
- traverseArray(schema12.anyOf, callback, processed);
141225
+ processed.add(schema11);
141226
+ callback(schema11, key2 !== null && key2 !== undefined ? key2 : null);
141227
+ if (schema11.anyOf) {
141228
+ traverseArray(schema11.anyOf, callback, processed);
141229
141229
  }
141230
- if (schema12.allOf) {
141231
- traverseArray(schema12.allOf, callback, processed);
141230
+ if (schema11.allOf) {
141231
+ traverseArray(schema11.allOf, callback, processed);
141232
141232
  }
141233
- if (schema12.oneOf) {
141234
- traverseArray(schema12.oneOf, callback, processed);
141233
+ if (schema11.oneOf) {
141234
+ traverseArray(schema11.oneOf, callback, processed);
141235
141235
  }
141236
- if (schema12.properties) {
141237
- traverseObjectKeys(schema12.properties, callback, processed);
141236
+ if (schema11.properties) {
141237
+ traverseObjectKeys(schema11.properties, callback, processed);
141238
141238
  }
141239
- if (schema12.patternProperties) {
141240
- traverseObjectKeys(schema12.patternProperties, callback, processed);
141239
+ if (schema11.patternProperties) {
141240
+ traverseObjectKeys(schema11.patternProperties, callback, processed);
141241
141241
  }
141242
- if (schema12.additionalProperties && typeof schema12.additionalProperties === "object") {
141243
- traverse(schema12.additionalProperties, callback, processed);
141242
+ if (schema11.additionalProperties && typeof schema11.additionalProperties === "object") {
141243
+ traverse(schema11.additionalProperties, callback, processed);
141244
141244
  }
141245
- if (schema12.items) {
141246
- const { items } = schema12;
141245
+ if (schema11.items) {
141246
+ const { items } = schema11;
141247
141247
  if (Array.isArray(items)) {
141248
141248
  traverseArray(items, callback, processed);
141249
141249
  } else {
141250
141250
  traverse(items, callback, processed);
141251
141251
  }
141252
141252
  }
141253
- if (schema12.additionalItems && typeof schema12.additionalItems === "object") {
141254
- traverse(schema12.additionalItems, callback, processed);
141253
+ if (schema11.additionalItems && typeof schema11.additionalItems === "object") {
141254
+ traverse(schema11.additionalItems, callback, processed);
141255
141255
  }
141256
- if (schema12.dependencies) {
141257
- if (Array.isArray(schema12.dependencies)) {
141258
- traverseArray(schema12.dependencies, callback, processed);
141256
+ if (schema11.dependencies) {
141257
+ if (Array.isArray(schema11.dependencies)) {
141258
+ traverseArray(schema11.dependencies, callback, processed);
141259
141259
  } else {
141260
- traverseObjectKeys(schema12.dependencies, callback, processed);
141260
+ traverseObjectKeys(schema11.dependencies, callback, processed);
141261
141261
  }
141262
141262
  }
141263
- if (schema12.definitions) {
141264
- traverseObjectKeys(schema12.definitions, callback, processed);
141263
+ if (schema11.definitions) {
141264
+ traverseObjectKeys(schema11.definitions, callback, processed);
141265
141265
  }
141266
- if (schema12.$defs) {
141267
- traverseObjectKeys(schema12.$defs, callback, processed);
141266
+ if (schema11.$defs) {
141267
+ traverseObjectKeys(schema11.$defs, callback, processed);
141268
141268
  }
141269
- if (schema12.not) {
141270
- traverse(schema12.not, callback, processed);
141269
+ if (schema11.not) {
141270
+ traverse(schema11.not, callback, processed);
141271
141271
  }
141272
- traverseIntersection(schema12, callback, processed);
141273
- Object.keys(schema12).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141274
- const child = schema12[key3];
141272
+ traverseIntersection(schema11, callback, processed);
141273
+ Object.keys(schema11).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141274
+ const child = schema11[key3];
141275
141275
  if (child && typeof child === "object") {
141276
141276
  traverseObjectKeys(child, callback, processed);
141277
141277
  }
@@ -141353,14 +141353,14 @@ var require_utils7 = __commonJS((exports) => {
141353
141353
  return (_g2 = color()) === null || _g2 === undefined ? undefined : _g2.whiteBright.bgYellow;
141354
141354
  }
141355
141355
  }
141356
- function escapeBlockComment(schema12) {
141356
+ function escapeBlockComment(schema11) {
141357
141357
  const replacer = "* /";
141358
- if (schema12 === null || typeof schema12 !== "object") {
141358
+ if (schema11 === null || typeof schema11 !== "object") {
141359
141359
  return;
141360
141360
  }
141361
- for (const key2 of Object.keys(schema12)) {
141362
- if (key2 === "description" && typeof schema12[key2] === "string") {
141363
- schema12[key2] = schema12[key2].replace(/\*\//g, replacer);
141361
+ for (const key2 of Object.keys(schema11)) {
141362
+ if (key2 === "description" && typeof schema11[key2] === "string") {
141363
+ schema11[key2] = schema11[key2].replace(/\*\//g, replacer);
141364
141364
  }
141365
141365
  }
141366
141366
  }
@@ -141372,45 +141372,45 @@ var require_utils7 = __commonJS((exports) => {
141372
141372
  return path_1.posix.join(path_1.posix.normalize(outputPath), ...filePathRel);
141373
141373
  }
141374
141374
  exports.pathTransform = pathTransform;
141375
- function maybeStripDefault(schema12) {
141376
- if (!("default" in schema12)) {
141377
- return schema12;
141375
+ function maybeStripDefault(schema11) {
141376
+ if (!("default" in schema11)) {
141377
+ return schema11;
141378
141378
  }
141379
- switch (schema12.type) {
141379
+ switch (schema11.type) {
141380
141380
  case "array":
141381
- if (Array.isArray(schema12.default)) {
141382
- return schema12;
141381
+ if (Array.isArray(schema11.default)) {
141382
+ return schema11;
141383
141383
  }
141384
141384
  break;
141385
141385
  case "boolean":
141386
- if (typeof schema12.default === "boolean") {
141387
- return schema12;
141386
+ if (typeof schema11.default === "boolean") {
141387
+ return schema11;
141388
141388
  }
141389
141389
  break;
141390
141390
  case "integer":
141391
141391
  case "number":
141392
- if (typeof schema12.default === "number") {
141393
- return schema12;
141392
+ if (typeof schema11.default === "number") {
141393
+ return schema11;
141394
141394
  }
141395
141395
  break;
141396
141396
  case "string":
141397
- if (typeof schema12.default === "string") {
141398
- return schema12;
141397
+ if (typeof schema11.default === "string") {
141398
+ return schema11;
141399
141399
  }
141400
141400
  break;
141401
141401
  case "null":
141402
- if (schema12.default === null) {
141403
- return schema12;
141402
+ if (schema11.default === null) {
141403
+ return schema11;
141404
141404
  }
141405
141405
  break;
141406
141406
  case "object":
141407
- if ((0, lodash_1.isPlainObject)(schema12.default)) {
141408
- return schema12;
141407
+ if ((0, lodash_1.isPlainObject)(schema11.default)) {
141408
+ return schema11;
141409
141409
  }
141410
141410
  break;
141411
141411
  }
141412
- delete schema12.default;
141413
- return schema12;
141412
+ delete schema11.default;
141413
+ return schema11;
141414
141414
  }
141415
141415
  exports.maybeStripDefault = maybeStripDefault;
141416
141416
  function appendToDescription(existingDescription, ...values) {
@@ -141424,11 +141424,11 @@ ${values.join(`
141424
141424
  `);
141425
141425
  }
141426
141426
  exports.appendToDescription = appendToDescription;
141427
- function isSchemaLike(schema12) {
141428
- if (!(0, lodash_1.isPlainObject)(schema12)) {
141427
+ function isSchemaLike(schema11) {
141428
+ if (!(0, lodash_1.isPlainObject)(schema11)) {
141429
141429
  return false;
141430
141430
  }
141431
- const parent = schema12[JSONSchema_1.Parent];
141431
+ const parent = schema11[JSONSchema_1.Parent];
141432
141432
  if (parent === null) {
141433
141433
  return true;
141434
141434
  }
@@ -141445,7 +141445,7 @@ ${values.join(`
141445
141445
  "properties",
141446
141446
  "required"
141447
141447
  ];
141448
- if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema12)) {
141448
+ if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema11)) {
141449
141449
  return false;
141450
141450
  }
141451
141451
  return true;
@@ -141743,13 +141743,13 @@ var require_typesOfSchema = __commonJS((exports) => {
141743
141743
  exports.typesOfSchema = undefined;
141744
141744
  var lodash_1 = require_lodash8();
141745
141745
  var JSONSchema_1 = require_JSONSchema();
141746
- function typesOfSchema(schema12) {
141747
- if (schema12.tsType) {
141746
+ function typesOfSchema(schema11) {
141747
+ if (schema11.tsType) {
141748
141748
  return new Set(["CUSTOM_TYPE"]);
141749
141749
  }
141750
141750
  const matchedTypes = new Set;
141751
141751
  for (const [schemaType, f7] of Object.entries(matchers)) {
141752
- if (f7(schema12)) {
141752
+ if (f7(schema11)) {
141753
141753
  matchedTypes.add(schemaType);
141754
141754
  }
141755
141755
  }
@@ -141760,26 +141760,26 @@ var require_typesOfSchema = __commonJS((exports) => {
141760
141760
  }
141761
141761
  exports.typesOfSchema = typesOfSchema;
141762
141762
  var matchers = {
141763
- ALL_OF(schema12) {
141764
- return "allOf" in schema12;
141763
+ ALL_OF(schema11) {
141764
+ return "allOf" in schema11;
141765
141765
  },
141766
- ANY(schema12) {
141767
- if (Object.keys(schema12).length === 0) {
141766
+ ANY(schema11) {
141767
+ if (Object.keys(schema11).length === 0) {
141768
141768
  return true;
141769
141769
  }
141770
- return schema12.type === "any";
141770
+ return schema11.type === "any";
141771
141771
  },
141772
- ANY_OF(schema12) {
141773
- return "anyOf" in schema12;
141772
+ ANY_OF(schema11) {
141773
+ return "anyOf" in schema11;
141774
141774
  },
141775
- BOOLEAN(schema12) {
141776
- if ("enum" in schema12) {
141775
+ BOOLEAN(schema11) {
141776
+ if ("enum" in schema11) {
141777
141777
  return false;
141778
141778
  }
141779
- if (schema12.type === "boolean") {
141779
+ if (schema11.type === "boolean") {
141780
141780
  return true;
141781
141781
  }
141782
- if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "boolean") {
141782
+ if (!(0, JSONSchema_1.isCompound)(schema11) && typeof schema11.default === "boolean") {
141783
141783
  return true;
141784
141784
  }
141785
141785
  return false;
@@ -141787,74 +141787,74 @@ var require_typesOfSchema = __commonJS((exports) => {
141787
141787
  CUSTOM_TYPE() {
141788
141788
  return false;
141789
141789
  },
141790
- NAMED_ENUM(schema12) {
141791
- return "enum" in schema12 && "tsEnumNames" in schema12;
141790
+ NAMED_ENUM(schema11) {
141791
+ return "enum" in schema11 && "tsEnumNames" in schema11;
141792
141792
  },
141793
- NAMED_SCHEMA(schema12) {
141794
- return "$id" in schema12 && (("patternProperties" in schema12) || ("properties" in schema12));
141793
+ NAMED_SCHEMA(schema11) {
141794
+ return "$id" in schema11 && (("patternProperties" in schema11) || ("properties" in schema11));
141795
141795
  },
141796
- NEVER(schema12) {
141797
- return schema12 === false;
141796
+ NEVER(schema11) {
141797
+ return schema11 === false;
141798
141798
  },
141799
- NULL(schema12) {
141800
- return schema12.type === "null";
141799
+ NULL(schema11) {
141800
+ return schema11.type === "null";
141801
141801
  },
141802
- NUMBER(schema12) {
141803
- if ("enum" in schema12) {
141802
+ NUMBER(schema11) {
141803
+ if ("enum" in schema11) {
141804
141804
  return false;
141805
141805
  }
141806
- if (schema12.type === "integer" || schema12.type === "number") {
141806
+ if (schema11.type === "integer" || schema11.type === "number") {
141807
141807
  return true;
141808
141808
  }
141809
- if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "number") {
141809
+ if (!(0, JSONSchema_1.isCompound)(schema11) && typeof schema11.default === "number") {
141810
141810
  return true;
141811
141811
  }
141812
141812
  return false;
141813
141813
  },
141814
- OBJECT(schema12) {
141815
- return schema12.type === "object" && !(0, lodash_1.isPlainObject)(schema12.additionalProperties) && !schema12.allOf && !schema12.anyOf && !schema12.oneOf && !schema12.patternProperties && !schema12.properties && !schema12.required;
141814
+ OBJECT(schema11) {
141815
+ return schema11.type === "object" && !(0, lodash_1.isPlainObject)(schema11.additionalProperties) && !schema11.allOf && !schema11.anyOf && !schema11.oneOf && !schema11.patternProperties && !schema11.properties && !schema11.required;
141816
141816
  },
141817
- ONE_OF(schema12) {
141818
- return "oneOf" in schema12;
141817
+ ONE_OF(schema11) {
141818
+ return "oneOf" in schema11;
141819
141819
  },
141820
- REFERENCE(schema12) {
141821
- return "$ref" in schema12;
141820
+ REFERENCE(schema11) {
141821
+ return "$ref" in schema11;
141822
141822
  },
141823
- STRING(schema12) {
141824
- if ("enum" in schema12) {
141823
+ STRING(schema11) {
141824
+ if ("enum" in schema11) {
141825
141825
  return false;
141826
141826
  }
141827
- if (schema12.type === "string") {
141827
+ if (schema11.type === "string") {
141828
141828
  return true;
141829
141829
  }
141830
- if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "string") {
141830
+ if (!(0, JSONSchema_1.isCompound)(schema11) && typeof schema11.default === "string") {
141831
141831
  return true;
141832
141832
  }
141833
141833
  return false;
141834
141834
  },
141835
- TYPED_ARRAY(schema12) {
141836
- if (schema12.type && schema12.type !== "array") {
141835
+ TYPED_ARRAY(schema11) {
141836
+ if (schema11.type && schema11.type !== "array") {
141837
141837
  return false;
141838
141838
  }
141839
- return "items" in schema12;
141839
+ return "items" in schema11;
141840
141840
  },
141841
- UNION(schema12) {
141842
- return Array.isArray(schema12.type);
141841
+ UNION(schema11) {
141842
+ return Array.isArray(schema11.type);
141843
141843
  },
141844
- UNNAMED_ENUM(schema12) {
141845
- if ("tsEnumNames" in schema12) {
141844
+ UNNAMED_ENUM(schema11) {
141845
+ if ("tsEnumNames" in schema11) {
141846
141846
  return false;
141847
141847
  }
141848
- if (schema12.type && schema12.type !== "boolean" && schema12.type !== "integer" && schema12.type !== "number" && schema12.type !== "string") {
141848
+ if (schema11.type && schema11.type !== "boolean" && schema11.type !== "integer" && schema11.type !== "number" && schema11.type !== "string") {
141849
141849
  return false;
141850
141850
  }
141851
- return "enum" in schema12;
141851
+ return "enum" in schema11;
141852
141852
  },
141853
141853
  UNNAMED_SCHEMA() {
141854
141854
  return false;
141855
141855
  },
141856
- UNTYPED_ARRAY(schema12) {
141857
- return schema12.type === "array" && !("items" in schema12);
141856
+ UNTYPED_ARRAY(schema11) {
141857
+ return schema11.type === "array" && !("items" in schema11);
141858
141858
  }
141859
141859
  };
141860
141860
  });
@@ -141865,10 +141865,10 @@ var require_applySchemaTyping = __commonJS((exports) => {
141865
141865
  exports.applySchemaTyping = undefined;
141866
141866
  var JSONSchema_1 = require_JSONSchema();
141867
141867
  var typesOfSchema_1 = require_typesOfSchema();
141868
- function applySchemaTyping(schema12) {
141868
+ function applySchemaTyping(schema11) {
141869
141869
  var _a7;
141870
- const types = (0, typesOfSchema_1.typesOfSchema)(schema12);
141871
- Object.defineProperty(schema12, JSONSchema_1.Types, {
141870
+ const types = (0, typesOfSchema_1.typesOfSchema)(schema11);
141871
+ Object.defineProperty(schema11, JSONSchema_1.Types, {
141872
141872
  enumerable: false,
141873
141873
  value: types,
141874
141874
  writable: false
@@ -141877,23 +141877,23 @@ var require_applySchemaTyping = __commonJS((exports) => {
141877
141877
  return;
141878
141878
  }
141879
141879
  const intersection2 = {
141880
- [JSONSchema_1.Parent]: schema12,
141880
+ [JSONSchema_1.Parent]: schema11,
141881
141881
  [JSONSchema_1.Types]: new Set(["ALL_OF"]),
141882
- $id: schema12.$id,
141883
- description: schema12.description,
141884
- name: schema12.name,
141885
- title: schema12.title,
141886
- allOf: (_a7 = schema12.allOf) !== null && _a7 !== undefined ? _a7 : [],
141882
+ $id: schema11.$id,
141883
+ description: schema11.description,
141884
+ name: schema11.name,
141885
+ title: schema11.title,
141886
+ allOf: (_a7 = schema11.allOf) !== null && _a7 !== undefined ? _a7 : [],
141887
141887
  required: [],
141888
141888
  additionalProperties: false
141889
141889
  };
141890
141890
  types.delete("ALL_OF");
141891
- delete schema12.allOf;
141892
- delete schema12.$id;
141893
- delete schema12.description;
141894
- delete schema12.name;
141895
- delete schema12.title;
141896
- Object.defineProperty(schema12, JSONSchema_1.Intersection, {
141891
+ delete schema11.allOf;
141892
+ delete schema11.$id;
141893
+ delete schema11.description;
141894
+ delete schema11.name;
141895
+ delete schema11.title;
141896
+ Object.defineProperty(schema11, JSONSchema_1.Intersection, {
141897
141897
  enumerable: false,
141898
141898
  value: intersection2,
141899
141899
  writable: false
@@ -141911,186 +141911,186 @@ var require_normalizer = __commonJS((exports) => {
141911
141911
  var applySchemaTyping_1 = require_applySchemaTyping();
141912
141912
  var util_1 = __require("util");
141913
141913
  var rules = new Map;
141914
- function hasType(schema12, type) {
141915
- return schema12.type === type || Array.isArray(schema12.type) && schema12.type.includes(type);
141914
+ function hasType(schema11, type) {
141915
+ return schema11.type === type || Array.isArray(schema11.type) && schema11.type.includes(type);
141916
141916
  }
141917
- function isObjectType(schema12) {
141918
- return schema12.properties !== undefined || hasType(schema12, "object") || hasType(schema12, "any");
141917
+ function isObjectType(schema11) {
141918
+ return schema11.properties !== undefined || hasType(schema11, "object") || hasType(schema11, "any");
141919
141919
  }
141920
- function isArrayType(schema12) {
141921
- return schema12.items !== undefined || hasType(schema12, "array") || hasType(schema12, "any");
141920
+ function isArrayType(schema11) {
141921
+ return schema11.items !== undefined || hasType(schema11, "array") || hasType(schema11, "any");
141922
141922
  }
141923
- function isEnumTypeWithoutTsEnumNames(schema12) {
141924
- return schema12.type === "string" && schema12.enum !== undefined && schema12.tsEnumNames === undefined;
141923
+ function isEnumTypeWithoutTsEnumNames(schema11) {
141924
+ return schema11.type === "string" && schema11.enum !== undefined && schema11.tsEnumNames === undefined;
141925
141925
  }
141926
- rules.set('Remove `type=["null"]` if `enum=[null]`', (schema12) => {
141927
- if (Array.isArray(schema12.enum) && schema12.enum.some((e8) => e8 === null) && Array.isArray(schema12.type) && schema12.type.includes("null")) {
141928
- schema12.type = schema12.type.filter((type) => type !== "null");
141926
+ rules.set('Remove `type=["null"]` if `enum=[null]`', (schema11) => {
141927
+ if (Array.isArray(schema11.enum) && schema11.enum.some((e8) => e8 === null) && Array.isArray(schema11.type) && schema11.type.includes("null")) {
141928
+ schema11.type = schema11.type.filter((type) => type !== "null");
141929
141929
  }
141930
141930
  });
141931
- rules.set("Destructure unary types", (schema12) => {
141932
- if (schema12.type && Array.isArray(schema12.type) && schema12.type.length === 1) {
141933
- schema12.type = schema12.type[0];
141931
+ rules.set("Destructure unary types", (schema11) => {
141932
+ if (schema11.type && Array.isArray(schema11.type) && schema11.type.length === 1) {
141933
+ schema11.type = schema11.type[0];
141934
141934
  }
141935
141935
  });
141936
- rules.set("Add empty `required` property if none is defined", (schema12) => {
141937
- if (isObjectType(schema12) && !("required" in schema12)) {
141938
- schema12.required = [];
141936
+ rules.set("Add empty `required` property if none is defined", (schema11) => {
141937
+ if (isObjectType(schema11) && !("required" in schema11)) {
141938
+ schema11.required = [];
141939
141939
  }
141940
141940
  });
141941
- rules.set("Transform `required`=false to `required`=[]", (schema12) => {
141942
- if (schema12.required === false) {
141943
- schema12.required = [];
141941
+ rules.set("Transform `required`=false to `required`=[]", (schema11) => {
141942
+ if (schema11.required === false) {
141943
+ schema11.required = [];
141944
141944
  }
141945
141945
  });
141946
- rules.set("Default additionalProperties", (schema12, _10, options8) => {
141947
- if (isObjectType(schema12) && !("additionalProperties" in schema12) && schema12.patternProperties === undefined) {
141948
- schema12.additionalProperties = options8.additionalProperties;
141946
+ rules.set("Default additionalProperties", (schema11, _10, options8) => {
141947
+ if (isObjectType(schema11) && !("additionalProperties" in schema11) && schema11.patternProperties === undefined) {
141948
+ schema11.additionalProperties = options8.additionalProperties;
141949
141949
  }
141950
141950
  });
141951
- rules.set("Transform id to $id", (schema12, fileName) => {
141952
- if (!(0, utils_1.isSchemaLike)(schema12)) {
141951
+ rules.set("Transform id to $id", (schema11, fileName) => {
141952
+ if (!(0, utils_1.isSchemaLike)(schema11)) {
141953
141953
  return;
141954
141954
  }
141955
- if (schema12.id && schema12.$id && schema12.id !== schema12.$id) {
141956
- throw ReferenceError(`Schema must define either id or $id, not both. Given id=${schema12.id}, $id=${schema12.$id} in ${fileName}`);
141955
+ if (schema11.id && schema11.$id && schema11.id !== schema11.$id) {
141956
+ throw ReferenceError(`Schema must define either id or $id, not both. Given id=${schema11.id}, $id=${schema11.$id} in ${fileName}`);
141957
141957
  }
141958
- if (schema12.id) {
141959
- schema12.$id = schema12.id;
141960
- delete schema12.id;
141958
+ if (schema11.id) {
141959
+ schema11.$id = schema11.id;
141960
+ delete schema11.id;
141961
141961
  }
141962
141962
  });
141963
- rules.set("Add an $id to anything that needs it", (schema12, fileName, _options, _key, dereferencedPaths) => {
141964
- if (!(0, utils_1.isSchemaLike)(schema12)) {
141963
+ rules.set("Add an $id to anything that needs it", (schema11, fileName, _options, _key, dereferencedPaths) => {
141964
+ if (!(0, utils_1.isSchemaLike)(schema11)) {
141965
141965
  return;
141966
141966
  }
141967
- if (!schema12.$id && !schema12[JSONSchema_1.Parent]) {
141968
- schema12.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141967
+ if (!schema11.$id && !schema11[JSONSchema_1.Parent]) {
141968
+ schema11.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141969
141969
  return;
141970
141970
  }
141971
- if (!isArrayType(schema12) && !isObjectType(schema12)) {
141971
+ if (!isArrayType(schema11) && !isObjectType(schema11)) {
141972
141972
  return;
141973
141973
  }
141974
- const dereferencedName = dereferencedPaths.get(schema12);
141975
- if (!schema12.$id && !schema12.title && dereferencedName) {
141976
- schema12.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(dereferencedName));
141974
+ const dereferencedName = dereferencedPaths.get(schema11);
141975
+ if (!schema11.$id && !schema11.title && dereferencedName) {
141976
+ schema11.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(dereferencedName));
141977
141977
  }
141978
141978
  if (dereferencedName) {
141979
- dereferencedPaths.delete(schema12);
141979
+ dereferencedPaths.delete(schema11);
141980
141980
  }
141981
141981
  });
141982
- rules.set("Escape closing JSDoc comment", (schema12) => {
141983
- (0, utils_1.escapeBlockComment)(schema12);
141982
+ rules.set("Escape closing JSDoc comment", (schema11) => {
141983
+ (0, utils_1.escapeBlockComment)(schema11);
141984
141984
  });
141985
- rules.set("Add JSDoc comments for minItems and maxItems", (schema12) => {
141986
- if (!isArrayType(schema12)) {
141985
+ rules.set("Add JSDoc comments for minItems and maxItems", (schema11) => {
141986
+ if (!isArrayType(schema11)) {
141987
141987
  return;
141988
141988
  }
141989
141989
  const commentsToAppend = [
141990
- "minItems" in schema12 ? `@minItems ${schema12.minItems}` : "",
141991
- "maxItems" in schema12 ? `@maxItems ${schema12.maxItems}` : ""
141990
+ "minItems" in schema11 ? `@minItems ${schema11.minItems}` : "",
141991
+ "maxItems" in schema11 ? `@maxItems ${schema11.maxItems}` : ""
141992
141992
  ].filter(Boolean);
141993
141993
  if (commentsToAppend.length) {
141994
- schema12.description = (0, utils_1.appendToDescription)(schema12.description, ...commentsToAppend);
141994
+ schema11.description = (0, utils_1.appendToDescription)(schema11.description, ...commentsToAppend);
141995
141995
  }
141996
141996
  });
141997
- rules.set("Optionally remove maxItems and minItems", (schema12, _fileName, options8) => {
141998
- if (!isArrayType(schema12)) {
141997
+ rules.set("Optionally remove maxItems and minItems", (schema11, _fileName, options8) => {
141998
+ if (!isArrayType(schema11)) {
141999
141999
  return;
142000
142000
  }
142001
- if ("minItems" in schema12 && options8.ignoreMinAndMaxItems) {
142002
- delete schema12.minItems;
142001
+ if ("minItems" in schema11 && options8.ignoreMinAndMaxItems) {
142002
+ delete schema11.minItems;
142003
142003
  }
142004
- if ("maxItems" in schema12 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142005
- delete schema12.maxItems;
142004
+ if ("maxItems" in schema11 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142005
+ delete schema11.maxItems;
142006
142006
  }
142007
142007
  });
142008
- rules.set("Normalize schema.minItems", (schema12, _fileName, options8) => {
142008
+ rules.set("Normalize schema.minItems", (schema11, _fileName, options8) => {
142009
142009
  if (options8.ignoreMinAndMaxItems) {
142010
142010
  return;
142011
142011
  }
142012
- if (!isArrayType(schema12)) {
142012
+ if (!isArrayType(schema11)) {
142013
142013
  return;
142014
142014
  }
142015
- const { minItems } = schema12;
142016
- schema12.minItems = typeof minItems === "number" ? minItems : 0;
142015
+ const { minItems } = schema11;
142016
+ schema11.minItems = typeof minItems === "number" ? minItems : 0;
142017
142017
  });
142018
- rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema12, _fileName, options8) => {
142018
+ rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema11, _fileName, options8) => {
142019
142019
  if (options8.ignoreMinAndMaxItems || options8.maxItems === -1) {
142020
142020
  return;
142021
142021
  }
142022
- if (!isArrayType(schema12)) {
142022
+ if (!isArrayType(schema11)) {
142023
142023
  return;
142024
142024
  }
142025
- const { maxItems, minItems } = schema12;
142025
+ const { maxItems, minItems } = schema11;
142026
142026
  if (maxItems !== undefined && maxItems - minItems > options8.maxItems) {
142027
- delete schema12.maxItems;
142027
+ delete schema11.maxItems;
142028
142028
  }
142029
142029
  });
142030
- rules.set("Normalize schema.items", (schema12, _fileName, options8) => {
142030
+ rules.set("Normalize schema.items", (schema11, _fileName, options8) => {
142031
142031
  if (options8.ignoreMinAndMaxItems) {
142032
142032
  return;
142033
142033
  }
142034
- const { maxItems, minItems } = schema12;
142034
+ const { maxItems, minItems } = schema11;
142035
142035
  const hasMaxItems = typeof maxItems === "number" && maxItems >= 0;
142036
142036
  const hasMinItems = typeof minItems === "number" && minItems > 0;
142037
- if (schema12.items && !Array.isArray(schema12.items) && (hasMaxItems || hasMinItems)) {
142038
- const items = schema12.items;
142037
+ if (schema11.items && !Array.isArray(schema11.items) && (hasMaxItems || hasMinItems)) {
142038
+ const items = schema11.items;
142039
142039
  const newItems = Array(maxItems || minItems || 0).fill(items);
142040
142040
  if (!hasMaxItems) {
142041
- schema12.additionalItems = items;
142041
+ schema11.additionalItems = items;
142042
142042
  }
142043
- schema12.items = newItems;
142043
+ schema11.items = newItems;
142044
142044
  }
142045
- if (Array.isArray(schema12.items) && hasMaxItems && maxItems < schema12.items.length) {
142046
- schema12.items = schema12.items.slice(0, maxItems);
142045
+ if (Array.isArray(schema11.items) && hasMaxItems && maxItems < schema11.items.length) {
142046
+ schema11.items = schema11.items.slice(0, maxItems);
142047
142047
  }
142048
- return schema12;
142048
+ return schema11;
142049
142049
  });
142050
- rules.set("Remove extends, if it is empty", (schema12) => {
142051
- if (!schema12.hasOwnProperty("extends")) {
142050
+ rules.set("Remove extends, if it is empty", (schema11) => {
142051
+ if (!schema11.hasOwnProperty("extends")) {
142052
142052
  return;
142053
142053
  }
142054
- if (schema12.extends == null || Array.isArray(schema12.extends) && schema12.extends.length === 0) {
142055
- delete schema12.extends;
142054
+ if (schema11.extends == null || Array.isArray(schema11.extends) && schema11.extends.length === 0) {
142055
+ delete schema11.extends;
142056
142056
  }
142057
142057
  });
142058
- rules.set("Make extends always an array, if it is defined", (schema12) => {
142059
- if (schema12.extends == null) {
142058
+ rules.set("Make extends always an array, if it is defined", (schema11) => {
142059
+ if (schema11.extends == null) {
142060
142060
  return;
142061
142061
  }
142062
- if (!Array.isArray(schema12.extends)) {
142063
- schema12.extends = [schema12.extends];
142062
+ if (!Array.isArray(schema11.extends)) {
142063
+ schema11.extends = [schema11.extends];
142064
142064
  }
142065
142065
  });
142066
- rules.set("Transform definitions to $defs", (schema12, fileName) => {
142067
- if (schema12.definitions && schema12.$defs && !(0, util_1.isDeepStrictEqual)(schema12.definitions, schema12.$defs)) {
142068
- throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${schema12.id} in ${fileName}`);
142066
+ rules.set("Transform definitions to $defs", (schema11, fileName) => {
142067
+ if (schema11.definitions && schema11.$defs && !(0, util_1.isDeepStrictEqual)(schema11.definitions, schema11.$defs)) {
142068
+ throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${schema11.id} in ${fileName}`);
142069
142069
  }
142070
- if (schema12.definitions) {
142071
- schema12.$defs = schema12.definitions;
142072
- delete schema12.definitions;
142070
+ if (schema11.definitions) {
142071
+ schema11.$defs = schema11.definitions;
142072
+ delete schema11.definitions;
142073
142073
  }
142074
142074
  });
142075
- rules.set("Transform const to singleton enum", (schema12) => {
142076
- if (schema12.const !== undefined) {
142077
- schema12.enum = [schema12.const];
142078
- delete schema12.const;
142075
+ rules.set("Transform const to singleton enum", (schema11) => {
142076
+ if (schema11.const !== undefined) {
142077
+ schema11.enum = [schema11.const];
142078
+ delete schema11.const;
142079
142079
  }
142080
142080
  });
142081
- rules.set("Add tsEnumNames to enum types", (schema12, _10, options8) => {
142081
+ rules.set("Add tsEnumNames to enum types", (schema11, _10, options8) => {
142082
142082
  var _a7;
142083
- if (isEnumTypeWithoutTsEnumNames(schema12) && options8.inferStringEnumKeysFromValues) {
142084
- schema12.tsEnumNames = (_a7 = schema12.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142083
+ if (isEnumTypeWithoutTsEnumNames(schema11) && options8.inferStringEnumKeysFromValues) {
142084
+ schema11.tsEnumNames = (_a7 = schema11.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142085
142085
  }
142086
142086
  });
142087
- rules.set("Pre-calculate schema types and intersections", (schema12) => {
142088
- if (schema12 !== null && typeof schema12 === "object") {
142089
- (0, applySchemaTyping_1.applySchemaTyping)(schema12);
142087
+ rules.set("Pre-calculate schema types and intersections", (schema11) => {
142088
+ if (schema11 !== null && typeof schema11 === "object") {
142089
+ (0, applySchemaTyping_1.applySchemaTyping)(schema11);
142090
142090
  }
142091
142091
  });
142092
142092
  function normalize2(rootSchema, dereferencedPaths, filename, options8) {
142093
- rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema12, key2) => rule(schema12, filename, options8, key2, dereferencedPaths)));
142093
+ rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema11, key2) => rule(schema11, filename, options8, key2, dereferencedPaths)));
142094
142094
  return rootSchema;
142095
142095
  }
142096
142096
  exports.normalize = normalize2;
@@ -142172,37 +142172,37 @@ var require_parser2 = __commonJS((exports) => {
142172
142172
  var AST_1 = require_AST();
142173
142173
  var JSONSchema_1 = require_JSONSchema();
142174
142174
  var utils_1 = require_utils7();
142175
- function parse11(schema12, options8, keyName, processed = new Map, usedNames = new Set) {
142176
- if ((0, JSONSchema_1.isPrimitive)(schema12)) {
142177
- if ((0, JSONSchema_1.isBoolean)(schema12)) {
142178
- return parseBooleanSchema(schema12, keyName, options8);
142175
+ function parse11(schema11, options8, keyName, processed = new Map, usedNames = new Set) {
142176
+ if ((0, JSONSchema_1.isPrimitive)(schema11)) {
142177
+ if ((0, JSONSchema_1.isBoolean)(schema11)) {
142178
+ return parseBooleanSchema(schema11, keyName, options8);
142179
142179
  }
142180
- return parseLiteral(schema12, keyName);
142180
+ return parseLiteral(schema11, keyName);
142181
142181
  }
142182
- const intersection2 = schema12[JSONSchema_1.Intersection];
142183
- const types = schema12[JSONSchema_1.Types];
142182
+ const intersection2 = schema11[JSONSchema_1.Intersection];
142183
+ const types = schema11[JSONSchema_1.Types];
142184
142184
  if (intersection2) {
142185
142185
  const ast = parseAsTypeWithCache(intersection2, "ALL_OF", options8, keyName, processed, usedNames);
142186
142186
  types.forEach((type) => {
142187
- ast.params.push(parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames));
142187
+ ast.params.push(parseAsTypeWithCache(schema11, type, options8, keyName, processed, usedNames));
142188
142188
  });
142189
- (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema12, "Output:", ast);
142189
+ (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema11, "Output:", ast);
142190
142190
  return ast;
142191
142191
  }
142192
142192
  if (types.size === 1) {
142193
142193
  const type = [...types][0];
142194
- const ast = parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames);
142195
- (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema12, "Output:", ast);
142194
+ const ast = parseAsTypeWithCache(schema11, type, options8, keyName, processed, usedNames);
142195
+ (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema11, "Output:", ast);
142196
142196
  return ast;
142197
142197
  }
142198
142198
  throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.");
142199
142199
  }
142200
142200
  exports.parse = parse11;
142201
- function parseAsTypeWithCache(schema12, type, options8, keyName, processed = new Map, usedNames = new Set) {
142202
- let cachedTypeMap = processed.get(schema12);
142201
+ function parseAsTypeWithCache(schema11, type, options8, keyName, processed = new Map, usedNames = new Set) {
142202
+ let cachedTypeMap = processed.get(schema11);
142203
142203
  if (!cachedTypeMap) {
142204
142204
  cachedTypeMap = new Map;
142205
- processed.set(schema12, cachedTypeMap);
142205
+ processed.set(schema11, cachedTypeMap);
142206
142206
  }
142207
142207
  const cachedAST = cachedTypeMap.get(type);
142208
142208
  if (cachedAST) {
@@ -142210,10 +142210,10 @@ var require_parser2 = __commonJS((exports) => {
142210
142210
  }
142211
142211
  const ast = {};
142212
142212
  cachedTypeMap.set(type, ast);
142213
- return Object.assign(ast, parseNonLiteral(schema12, type, options8, keyName, processed, usedNames));
142213
+ return Object.assign(ast, parseNonLiteral(schema11, type, options8, keyName, processed, usedNames));
142214
142214
  }
142215
- function parseBooleanSchema(schema12, keyName, options8) {
142216
- if (schema12) {
142215
+ function parseBooleanSchema(schema11, keyName, options8) {
142216
+ if (schema11) {
142217
142217
  return {
142218
142218
  keyName,
142219
142219
  type: options8.unknownAny ? "UNKNOWN" : "ANY"
@@ -142224,157 +142224,157 @@ var require_parser2 = __commonJS((exports) => {
142224
142224
  type: "NEVER"
142225
142225
  };
142226
142226
  }
142227
- function parseLiteral(schema12, keyName) {
142227
+ function parseLiteral(schema11, keyName) {
142228
142228
  return {
142229
142229
  keyName,
142230
- params: schema12,
142230
+ params: schema11,
142231
142231
  type: "LITERAL"
142232
142232
  };
142233
142233
  }
142234
- function parseNonLiteral(schema12, type, options8, keyName, processed, usedNames) {
142235
- const definitions = getDefinitionsMemoized((0, JSONSchema_1.getRootSchema)(schema12));
142236
- const keyNameFromDefinition = (0, lodash_1.findKey)(definitions, (_10) => _10 === schema12);
142234
+ function parseNonLiteral(schema11, type, options8, keyName, processed, usedNames) {
142235
+ const definitions = getDefinitionsMemoized((0, JSONSchema_1.getRootSchema)(schema11));
142236
+ const keyNameFromDefinition = (0, lodash_1.findKey)(definitions, (_10) => _10 === schema11);
142237
142237
  switch (type) {
142238
142238
  case "ALL_OF":
142239
142239
  return {
142240
- comment: schema12.description,
142241
- deprecated: schema12.deprecated,
142240
+ comment: schema11.description,
142241
+ deprecated: schema11.deprecated,
142242
142242
  keyName,
142243
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142244
- params: schema12.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142243
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142244
+ params: schema11.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142245
142245
  type: "INTERSECTION"
142246
142246
  };
142247
142247
  case "ANY":
142248
- return Object.assign(Object.assign({}, options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY), { comment: schema12.description, deprecated: schema12.deprecated, keyName, standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8) });
142248
+ return Object.assign(Object.assign({}, options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY), { comment: schema11.description, deprecated: schema11.deprecated, keyName, standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8) });
142249
142249
  case "ANY_OF":
142250
142250
  return {
142251
- comment: schema12.description,
142252
- deprecated: schema12.deprecated,
142251
+ comment: schema11.description,
142252
+ deprecated: schema11.deprecated,
142253
142253
  keyName,
142254
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142255
- params: schema12.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142254
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142255
+ params: schema11.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142256
142256
  type: "UNION"
142257
142257
  };
142258
142258
  case "BOOLEAN":
142259
142259
  return {
142260
- comment: schema12.description,
142261
- deprecated: schema12.deprecated,
142260
+ comment: schema11.description,
142261
+ deprecated: schema11.deprecated,
142262
142262
  keyName,
142263
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142263
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142264
142264
  type: "BOOLEAN"
142265
142265
  };
142266
142266
  case "CUSTOM_TYPE":
142267
142267
  return {
142268
- comment: schema12.description,
142269
- deprecated: schema12.deprecated,
142268
+ comment: schema11.description,
142269
+ deprecated: schema11.deprecated,
142270
142270
  keyName,
142271
- params: schema12.tsType,
142272
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142271
+ params: schema11.tsType,
142272
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142273
142273
  type: "CUSTOM_TYPE"
142274
142274
  };
142275
142275
  case "NAMED_ENUM":
142276
142276
  return {
142277
- comment: schema12.description,
142278
- deprecated: schema12.deprecated,
142277
+ comment: schema11.description,
142278
+ deprecated: schema11.deprecated,
142279
142279
  keyName,
142280
- standaloneName: standaloneName(schema12, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142281
- params: schema12.enum.map((_10, n5) => ({
142280
+ standaloneName: standaloneName(schema11, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142281
+ params: schema11.enum.map((_10, n5) => ({
142282
142282
  ast: parseLiteral(_10, undefined),
142283
- keyName: schema12.tsEnumNames[n5]
142283
+ keyName: schema11.tsEnumNames[n5]
142284
142284
  })),
142285
142285
  type: "ENUM"
142286
142286
  };
142287
142287
  case "NAMED_SCHEMA":
142288
- return newInterface(schema12, options8, processed, usedNames, keyName);
142288
+ return newInterface(schema11, options8, processed, usedNames, keyName);
142289
142289
  case "NEVER":
142290
142290
  return {
142291
- comment: schema12.description,
142292
- deprecated: schema12.deprecated,
142291
+ comment: schema11.description,
142292
+ deprecated: schema11.deprecated,
142293
142293
  keyName,
142294
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142294
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142295
142295
  type: "NEVER"
142296
142296
  };
142297
142297
  case "NULL":
142298
142298
  return {
142299
- comment: schema12.description,
142300
- deprecated: schema12.deprecated,
142299
+ comment: schema11.description,
142300
+ deprecated: schema11.deprecated,
142301
142301
  keyName,
142302
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142302
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142303
142303
  type: "NULL"
142304
142304
  };
142305
142305
  case "NUMBER":
142306
142306
  return {
142307
- comment: schema12.description,
142308
- deprecated: schema12.deprecated,
142307
+ comment: schema11.description,
142308
+ deprecated: schema11.deprecated,
142309
142309
  keyName,
142310
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142310
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142311
142311
  type: "NUMBER"
142312
142312
  };
142313
142313
  case "OBJECT":
142314
142314
  return {
142315
- comment: schema12.description,
142315
+ comment: schema11.description,
142316
142316
  keyName,
142317
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142317
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142318
142318
  type: "OBJECT",
142319
- deprecated: schema12.deprecated
142319
+ deprecated: schema11.deprecated
142320
142320
  };
142321
142321
  case "ONE_OF":
142322
142322
  return {
142323
- comment: schema12.description,
142324
- deprecated: schema12.deprecated,
142323
+ comment: schema11.description,
142324
+ deprecated: schema11.deprecated,
142325
142325
  keyName,
142326
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142327
- params: schema12.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142326
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142327
+ params: schema11.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142328
142328
  type: "UNION"
142329
142329
  };
142330
142330
  case "REFERENCE":
142331
- throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema12));
142331
+ throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema11));
142332
142332
  case "STRING":
142333
142333
  return {
142334
- comment: schema12.description,
142335
- deprecated: schema12.deprecated,
142334
+ comment: schema11.description,
142335
+ deprecated: schema11.deprecated,
142336
142336
  keyName,
142337
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142337
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142338
142338
  type: "STRING"
142339
142339
  };
142340
142340
  case "TYPED_ARRAY":
142341
- if (Array.isArray(schema12.items)) {
142342
- const minItems2 = schema12.minItems;
142343
- const maxItems2 = schema12.maxItems;
142341
+ if (Array.isArray(schema11.items)) {
142342
+ const minItems2 = schema11.minItems;
142343
+ const maxItems2 = schema11.maxItems;
142344
142344
  const arrayType = {
142345
- comment: schema12.description,
142346
- deprecated: schema12.deprecated,
142345
+ comment: schema11.description,
142346
+ deprecated: schema11.deprecated,
142347
142347
  keyName,
142348
142348
  maxItems: maxItems2,
142349
142349
  minItems: minItems2,
142350
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142351
- params: schema12.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142350
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142351
+ params: schema11.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142352
142352
  type: "TUPLE"
142353
142353
  };
142354
- if (schema12.additionalItems === true) {
142354
+ if (schema11.additionalItems === true) {
142355
142355
  arrayType.spreadParam = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142356
- } else if (schema12.additionalItems) {
142357
- arrayType.spreadParam = parse11(schema12.additionalItems, options8, undefined, processed, usedNames);
142356
+ } else if (schema11.additionalItems) {
142357
+ arrayType.spreadParam = parse11(schema11.additionalItems, options8, undefined, processed, usedNames);
142358
142358
  }
142359
142359
  return arrayType;
142360
142360
  } else {
142361
142361
  return {
142362
- comment: schema12.description,
142363
- deprecated: schema12.deprecated,
142362
+ comment: schema11.description,
142363
+ deprecated: schema11.deprecated,
142364
142364
  keyName,
142365
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142366
- params: parse11(schema12.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142365
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142366
+ params: parse11(schema11.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142367
142367
  type: "ARRAY"
142368
142368
  };
142369
142369
  }
142370
142370
  case "UNION":
142371
142371
  return {
142372
- comment: schema12.description,
142373
- deprecated: schema12.deprecated,
142372
+ comment: schema11.description,
142373
+ deprecated: schema11.deprecated,
142374
142374
  keyName,
142375
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142376
- params: schema12.type.map((type2) => {
142377
- const member = Object.assign(Object.assign({}, (0, lodash_1.omit)(schema12, "$id", "description", "title")), { type: type2 });
142375
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142376
+ params: schema11.type.map((type2) => {
142377
+ const member = Object.assign(Object.assign({}, (0, lodash_1.omit)(schema11, "$id", "description", "title")), { type: type2 });
142378
142378
  (0, utils_1.maybeStripDefault)(member);
142379
142379
  (0, applySchemaTyping_1.applySchemaTyping)(member);
142380
142380
  return parse11(member, options8, undefined, processed, usedNames);
@@ -142383,80 +142383,80 @@ var require_parser2 = __commonJS((exports) => {
142383
142383
  };
142384
142384
  case "UNNAMED_ENUM":
142385
142385
  return {
142386
- comment: schema12.description,
142387
- deprecated: schema12.deprecated,
142386
+ comment: schema11.description,
142387
+ deprecated: schema11.deprecated,
142388
142388
  keyName,
142389
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142390
- params: schema12.enum.map((_10) => parseLiteral(_10, undefined)),
142389
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142390
+ params: schema11.enum.map((_10) => parseLiteral(_10, undefined)),
142391
142391
  type: "UNION"
142392
142392
  };
142393
142393
  case "UNNAMED_SCHEMA":
142394
- return newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition);
142394
+ return newInterface(schema11, options8, processed, usedNames, keyName, keyNameFromDefinition);
142395
142395
  case "UNTYPED_ARRAY":
142396
- const minItems = schema12.minItems;
142397
- const maxItems = typeof schema12.maxItems === "number" ? schema12.maxItems : -1;
142396
+ const minItems = schema11.minItems;
142397
+ const maxItems = typeof schema11.maxItems === "number" ? schema11.maxItems : -1;
142398
142398
  const params = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142399
142399
  if (minItems > 0 || maxItems >= 0) {
142400
142400
  return {
142401
- comment: schema12.description,
142402
- deprecated: schema12.deprecated,
142401
+ comment: schema11.description,
142402
+ deprecated: schema11.deprecated,
142403
142403
  keyName,
142404
- maxItems: schema12.maxItems,
142404
+ maxItems: schema11.maxItems,
142405
142405
  minItems,
142406
142406
  params: Array(Math.max(maxItems, minItems) || 0).fill(params),
142407
142407
  spreadParam: maxItems >= 0 ? undefined : params,
142408
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142408
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142409
142409
  type: "TUPLE"
142410
142410
  };
142411
142411
  }
142412
142412
  return {
142413
- comment: schema12.description,
142414
- deprecated: schema12.deprecated,
142413
+ comment: schema11.description,
142414
+ deprecated: schema11.deprecated,
142415
142415
  keyName,
142416
142416
  params,
142417
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142417
+ standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142418
142418
  type: "ARRAY"
142419
142419
  };
142420
142420
  }
142421
142421
  }
142422
- function standaloneName(schema12, keyNameFromDefinition, usedNames, options8) {
142422
+ function standaloneName(schema11, keyNameFromDefinition, usedNames, options8) {
142423
142423
  var _a7;
142424
- const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema12, keyNameFromDefinition)) || schema12.title || schema12.$id || keyNameFromDefinition;
142424
+ const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema11, keyNameFromDefinition)) || schema11.title || schema11.$id || keyNameFromDefinition;
142425
142425
  if (name2) {
142426
142426
  return (0, utils_1.generateName)(name2, usedNames);
142427
142427
  }
142428
142428
  }
142429
- function newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142430
- const name2 = standaloneName(schema12, keyNameFromDefinition, usedNames, options8);
142429
+ function newInterface(schema11, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142430
+ const name2 = standaloneName(schema11, keyNameFromDefinition, usedNames, options8);
142431
142431
  return {
142432
- comment: schema12.description,
142433
- deprecated: schema12.deprecated,
142432
+ comment: schema11.description,
142433
+ deprecated: schema11.deprecated,
142434
142434
  keyName,
142435
- params: parseSchema(schema12, options8, processed, usedNames, name2),
142435
+ params: parseSchema(schema11, options8, processed, usedNames, name2),
142436
142436
  standaloneName: name2,
142437
- superTypes: parseSuperTypes(schema12, options8, processed, usedNames),
142437
+ superTypes: parseSuperTypes(schema11, options8, processed, usedNames),
142438
142438
  type: "INTERFACE"
142439
142439
  };
142440
142440
  }
142441
- function parseSuperTypes(schema12, options8, processed, usedNames) {
142442
- const superTypes = schema12.extends;
142441
+ function parseSuperTypes(schema11, options8, processed, usedNames) {
142442
+ const superTypes = schema11.extends;
142443
142443
  if (!superTypes) {
142444
142444
  return [];
142445
142445
  }
142446
142446
  return superTypes.map((_10) => parse11(_10, options8, undefined, processed, usedNames));
142447
142447
  }
142448
- function parseSchema(schema12, options8, processed, usedNames, parentSchemaName) {
142449
- let asts = (0, lodash_1.map)(schema12.properties, (value, key2) => ({
142448
+ function parseSchema(schema11, options8, processed, usedNames, parentSchemaName) {
142449
+ let asts = (0, lodash_1.map)(schema11.properties, (value, key2) => ({
142450
142450
  ast: parse11(value, options8, key2, processed, usedNames),
142451
142451
  isPatternProperty: false,
142452
- isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142452
+ isRequired: (0, lodash_1.includes)(schema11.required || [], key2),
142453
142453
  isUnreachableDefinition: false,
142454
142454
  keyName: key2
142455
142455
  }));
142456
142456
  let singlePatternProperty = false;
142457
- if (schema12.patternProperties) {
142458
- singlePatternProperty = !schema12.additionalProperties && Object.keys(schema12.patternProperties).length === 1;
142459
- asts = asts.concat((0, lodash_1.map)(schema12.patternProperties, (value, key2) => {
142457
+ if (schema11.patternProperties) {
142458
+ singlePatternProperty = !schema11.additionalProperties && Object.keys(schema11.patternProperties).length === 1;
142459
+ asts = asts.concat((0, lodash_1.map)(schema11.patternProperties, (value, key2) => {
142460
142460
  const ast = parse11(value, options8, key2, processed, usedNames);
142461
142461
  const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema definition
142462
142462
  via the \`patternProperty\` "${key2.replace("*/", "*\\/")}".`;
@@ -142466,14 +142466,14 @@ ${comment}` : comment;
142466
142466
  return {
142467
142467
  ast,
142468
142468
  isPatternProperty: !singlePatternProperty,
142469
- isRequired: singlePatternProperty || (0, lodash_1.includes)(schema12.required || [], key2),
142469
+ isRequired: singlePatternProperty || (0, lodash_1.includes)(schema11.required || [], key2),
142470
142470
  isUnreachableDefinition: false,
142471
142471
  keyName: singlePatternProperty ? "[k: string]" : key2
142472
142472
  };
142473
142473
  }));
142474
142474
  }
142475
142475
  if (options8.unreachableDefinitions) {
142476
- asts = asts.concat((0, lodash_1.map)(schema12.$defs, (value, key2) => {
142476
+ asts = asts.concat((0, lodash_1.map)(schema11.$defs, (value, key2) => {
142477
142477
  const ast = parse11(value, options8, key2, processed, usedNames);
142478
142478
  const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema
142479
142479
  via the \`definition\` "${key2}".`;
@@ -142483,13 +142483,13 @@ ${comment}` : comment;
142483
142483
  return {
142484
142484
  ast,
142485
142485
  isPatternProperty: false,
142486
- isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142486
+ isRequired: (0, lodash_1.includes)(schema11.required || [], key2),
142487
142487
  isUnreachableDefinition: true,
142488
142488
  keyName: key2
142489
142489
  };
142490
142490
  }));
142491
142491
  }
142492
- switch (schema12.additionalProperties) {
142492
+ switch (schema11.additionalProperties) {
142493
142493
  case undefined:
142494
142494
  case true:
142495
142495
  if (singlePatternProperty) {
@@ -142506,7 +142506,7 @@ ${comment}` : comment;
142506
142506
  return asts;
142507
142507
  default:
142508
142508
  return asts.concat({
142509
- ast: parse11(schema12.additionalProperties, options8, "[k: string]", processed, usedNames),
142509
+ ast: parse11(schema11.additionalProperties, options8, "[k: string]", processed, usedNames),
142510
142510
  isPatternProperty: false,
142511
142511
  isRequired: true,
142512
142512
  isUnreachableDefinition: false,
@@ -142514,22 +142514,22 @@ ${comment}` : comment;
142514
142514
  });
142515
142515
  }
142516
142516
  }
142517
- function getDefinitions(schema12, isSchema = true, processed = new Set) {
142518
- if (processed.has(schema12)) {
142517
+ function getDefinitions(schema11, isSchema = true, processed = new Set) {
142518
+ if (processed.has(schema11)) {
142519
142519
  return {};
142520
142520
  }
142521
- processed.add(schema12);
142522
- if (Array.isArray(schema12)) {
142523
- return schema12.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142521
+ processed.add(schema11);
142522
+ if (Array.isArray(schema11)) {
142523
+ return schema11.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142524
142524
  }
142525
- if ((0, lodash_1.isPlainObject)(schema12)) {
142526
- return Object.assign(Object.assign({}, isSchema && hasDefinitions(schema12) ? schema12.$defs : {}), Object.keys(schema12).reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(schema12[cur], false, processed)), {}));
142525
+ if ((0, lodash_1.isPlainObject)(schema11)) {
142526
+ return Object.assign(Object.assign({}, isSchema && hasDefinitions(schema11) ? schema11.$defs : {}), Object.keys(schema11).reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(schema11[cur], false, processed)), {}));
142527
142527
  }
142528
142528
  return {};
142529
142529
  }
142530
142530
  var getDefinitionsMemoized = (0, lodash_1.memoize)(getDefinitions);
142531
- function hasDefinitions(schema12) {
142532
- return "$defs" in schema12;
142531
+ function hasDefinitions(schema11) {
142532
+ return "$defs" in schema11;
142533
142533
  }
142534
142534
  });
142535
142535
 
@@ -144353,7 +144353,7 @@ var require_normalize_args = __commonJS((exports) => {
144353
144353
  var options_js_1 = require_options();
144354
144354
  function normalizeArgs(_args) {
144355
144355
  let path18;
144356
- let schema12;
144356
+ let schema11;
144357
144357
  let options8;
144358
144358
  let callback;
144359
144359
  const args = Array.prototype.slice.call(_args);
@@ -144363,15 +144363,15 @@ var require_normalize_args = __commonJS((exports) => {
144363
144363
  if (typeof args[0] === "string") {
144364
144364
  path18 = args[0];
144365
144365
  if (typeof args[2] === "object") {
144366
- schema12 = args[1];
144366
+ schema11 = args[1];
144367
144367
  options8 = args[2];
144368
144368
  } else {
144369
- schema12 = undefined;
144369
+ schema11 = undefined;
144370
144370
  options8 = args[1];
144371
144371
  }
144372
144372
  } else {
144373
144373
  path18 = "";
144374
- schema12 = args[0];
144374
+ schema11 = args[0];
144375
144375
  options8 = args[1];
144376
144376
  }
144377
144377
  try {
@@ -144379,12 +144379,12 @@ var require_normalize_args = __commonJS((exports) => {
144379
144379
  } catch (e8) {
144380
144380
  console.error(`JSON Schema Ref Parser: Error normalizing options: ${e8}`);
144381
144381
  }
144382
- if (!options8.mutateInputSchema && typeof schema12 === "object") {
144383
- schema12 = JSON.parse(JSON.stringify(schema12));
144382
+ if (!options8.mutateInputSchema && typeof schema11 === "object") {
144383
+ schema11 = JSON.parse(JSON.stringify(schema11));
144384
144384
  }
144385
144385
  return {
144386
144386
  path: path18,
144387
- schema: schema12,
144387
+ schema: schema11,
144388
144388
  options: options8,
144389
144389
  callback
144390
144390
  };
@@ -145173,12 +145173,12 @@ var require_resolver = __commonJS((exports) => {
145173
145173
  var json_schema_ref_parser_1 = require_lib3();
145174
145174
  var utils_1 = require_utils7();
145175
145175
  function dereference(schema_1, _a7) {
145176
- return __awaiter(this, arguments, undefined, function* (schema12, { cwd, $refOptions }) {
145177
- (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema12);
145176
+ return __awaiter(this, arguments, undefined, function* (schema11, { cwd, $refOptions }) {
145177
+ (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema11);
145178
145178
  const parser2 = new json_schema_ref_parser_1.$RefParser;
145179
145179
  const dereferencedPaths = new WeakMap;
145180
- const dereferencedSchema = yield parser2.dereference(cwd, schema12, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema13) {
145181
- dereferencedPaths.set(schema13, $ref);
145180
+ const dereferencedSchema = yield parser2.dereference(cwd, schema11, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema12) {
145181
+ dereferencedPaths.set(schema12, $ref);
145182
145182
  } }) }));
145183
145183
  return { dereferencedPaths, dereferencedSchema };
145184
145184
  });
@@ -145192,46 +145192,46 @@ var require_validator = __commonJS((exports) => {
145192
145192
  exports.validate = undefined;
145193
145193
  var utils_1 = require_utils7();
145194
145194
  var rules = new Map;
145195
- rules.set("Enum members and tsEnumNames must be of the same length", (schema12) => {
145196
- if (schema12.enum && schema12.tsEnumNames && schema12.enum.length !== schema12.tsEnumNames.length) {
145195
+ rules.set("Enum members and tsEnumNames must be of the same length", (schema11) => {
145196
+ if (schema11.enum && schema11.tsEnumNames && schema11.enum.length !== schema11.tsEnumNames.length) {
145197
145197
  return false;
145198
145198
  }
145199
145199
  });
145200
- rules.set("tsEnumNames must be an array of strings", (schema12) => {
145201
- if (schema12.tsEnumNames && schema12.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145200
+ rules.set("tsEnumNames must be an array of strings", (schema11) => {
145201
+ if (schema11.tsEnumNames && schema11.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145202
145202
  return false;
145203
145203
  }
145204
145204
  });
145205
- rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema12) => {
145206
- const { maxItems, minItems } = schema12;
145205
+ rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema11) => {
145206
+ const { maxItems, minItems } = schema11;
145207
145207
  if (typeof maxItems === "number" && typeof minItems === "number") {
145208
145208
  return maxItems >= minItems;
145209
145209
  }
145210
145210
  });
145211
- rules.set("When maxItems exists, maxItems >= 0", (schema12) => {
145212
- const { maxItems } = schema12;
145211
+ rules.set("When maxItems exists, maxItems >= 0", (schema11) => {
145212
+ const { maxItems } = schema11;
145213
145213
  if (typeof maxItems === "number") {
145214
145214
  return maxItems >= 0;
145215
145215
  }
145216
145216
  });
145217
- rules.set("When minItems exists, minItems >= 0", (schema12) => {
145218
- const { minItems } = schema12;
145217
+ rules.set("When minItems exists, minItems >= 0", (schema11) => {
145218
+ const { minItems } = schema11;
145219
145219
  if (typeof minItems === "number") {
145220
145220
  return minItems >= 0;
145221
145221
  }
145222
145222
  });
145223
- rules.set("deprecated must be a boolean", (schema12) => {
145224
- const typeOfDeprecated = typeof schema12.deprecated;
145223
+ rules.set("deprecated must be a boolean", (schema11) => {
145224
+ const typeOfDeprecated = typeof schema11.deprecated;
145225
145225
  return typeOfDeprecated === "boolean" || typeOfDeprecated === "undefined";
145226
145226
  });
145227
- function validate2(schema12, filename) {
145227
+ function validate2(schema11, filename) {
145228
145228
  const errors5 = [];
145229
145229
  rules.forEach((rule, ruleName) => {
145230
- (0, utils_1.traverse)(schema12, (schema13, key2) => {
145231
- if (rule(schema13) === false) {
145230
+ (0, utils_1.traverse)(schema11, (schema12, key2) => {
145231
+ if (rule(schema12) === false) {
145232
145232
  errors5.push(`Error at key "${key2}" in file "${filename}": ${ruleName}`);
145233
145233
  }
145234
- return schema13;
145234
+ return schema12;
145235
145235
  });
145236
145236
  });
145237
145237
  return errors5;
@@ -145245,25 +145245,25 @@ var require_linker = __commonJS((exports) => {
145245
145245
  exports.link = undefined;
145246
145246
  var JSONSchema_1 = require_JSONSchema();
145247
145247
  var lodash_1 = require_lodash8();
145248
- function link2(schema12, parent = null) {
145249
- if (!Array.isArray(schema12) && !(0, lodash_1.isPlainObject)(schema12)) {
145250
- return schema12;
145248
+ function link2(schema11, parent = null) {
145249
+ if (!Array.isArray(schema11) && !(0, lodash_1.isPlainObject)(schema11)) {
145250
+ return schema11;
145251
145251
  }
145252
- if (schema12.hasOwnProperty(JSONSchema_1.Parent)) {
145253
- return schema12;
145252
+ if (schema11.hasOwnProperty(JSONSchema_1.Parent)) {
145253
+ return schema11;
145254
145254
  }
145255
- Object.defineProperty(schema12, JSONSchema_1.Parent, {
145255
+ Object.defineProperty(schema11, JSONSchema_1.Parent, {
145256
145256
  enumerable: false,
145257
145257
  value: parent,
145258
145258
  writable: false
145259
145259
  });
145260
- if (Array.isArray(schema12)) {
145261
- schema12.forEach((child) => link2(child, schema12));
145260
+ if (Array.isArray(schema11)) {
145261
+ schema11.forEach((child) => link2(child, schema11));
145262
145262
  }
145263
- for (const key2 in schema12) {
145264
- link2(schema12[key2], schema12);
145263
+ for (const key2 in schema11) {
145264
+ link2(schema11[key2], schema11);
145265
145265
  }
145266
- return schema12;
145266
+ return schema11;
145267
145267
  }
145268
145268
  exports.link = link2;
145269
145269
  });
@@ -145355,8 +145355,8 @@ var require_src3 = __commonJS((exports) => {
145355
145355
  unknownAny: true
145356
145356
  };
145357
145357
  function compileFromFile(filename, options8 = exports.DEFAULT_OPTIONS) {
145358
- const schema12 = parseAsJSONSchema(filename);
145359
- return compile(schema12, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145358
+ const schema11 = parseAsJSONSchema(filename);
145359
+ return compile(schema11, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145360
145360
  }
145361
145361
  exports.compileFromFile = compileFromFile;
145362
145362
  function parseAsJSONSchema(filename) {
@@ -145366,7 +145366,7 @@ var require_src3 = __commonJS((exports) => {
145366
145366
  return (0, utils_1.parseFileAsJSONSchema)(filename, contents.toString());
145367
145367
  }
145368
145368
  function compile(schema_1, name_1) {
145369
- return __awaiter(this, arguments, undefined, function* (schema12, name2, options8 = {}) {
145369
+ return __awaiter(this, arguments, undefined, function* (schema11, name2, options8 = {}) {
145370
145370
  (0, optionValidator_1.validateOptions)(options8);
145371
145371
  const _options = (0, lodash_1.merge)({}, exports.DEFAULT_OPTIONS, options8);
145372
145372
  const start = Date.now();
@@ -145376,7 +145376,7 @@ var require_src3 = __commonJS((exports) => {
145376
145376
  if (!(0, lodash_1.endsWith)(_options.cwd, "/")) {
145377
145377
  _options.cwd += "/";
145378
145378
  }
145379
- const _schema = (0, lodash_1.cloneDeep)(schema12);
145379
+ const _schema = (0, lodash_1.cloneDeep)(schema11);
145380
145380
  const { dereferencedPaths, dereferencedSchema } = yield (0, resolver_1.dereference)(_schema, _options);
145381
145381
  if (process.env.VERBOSE) {
145382
145382
  if ((0, util_1.isDeepStrictEqual)(_schema, dereferencedSchema)) {
@@ -163944,10 +163944,10 @@ var require_view = __commonJS((exports, module) => {
163944
163944
  var debug = require_src4()("express:view");
163945
163945
  var path18 = __require("node:path");
163946
163946
  var fs28 = __require("node:fs");
163947
- var dirname20 = path18.dirname;
163947
+ var dirname19 = path18.dirname;
163948
163948
  var basename6 = path18.basename;
163949
163949
  var extname2 = path18.extname;
163950
- var join27 = path18.join;
163950
+ var join25 = path18.join;
163951
163951
  var resolve13 = path18.resolve;
163952
163952
  module.exports = View;
163953
163953
  function View(name2, options8) {
@@ -163983,7 +163983,7 @@ var require_view = __commonJS((exports, module) => {
163983
163983
  for (var i5 = 0;i5 < roots.length && !path19; i5++) {
163984
163984
  var root2 = roots[i5];
163985
163985
  var loc = resolve13(root2, name2);
163986
- var dir = dirname20(loc);
163986
+ var dir = dirname19(loc);
163987
163987
  var file2 = basename6(loc);
163988
163988
  path19 = this.resolve(dir, file2);
163989
163989
  }
@@ -164009,12 +164009,12 @@ var require_view = __commonJS((exports, module) => {
164009
164009
  };
164010
164010
  View.prototype.resolve = function resolve14(dir, file2) {
164011
164011
  var ext = this.ext;
164012
- var path19 = join27(dir, file2);
164012
+ var path19 = join25(dir, file2);
164013
164013
  var stat2 = tryStat(path19);
164014
164014
  if (stat2 && stat2.isFile()) {
164015
164015
  return path19;
164016
164016
  }
164017
- path19 = join27(dir, basename6(file2, ext), "index" + ext);
164017
+ path19 = join25(dir, basename6(file2, ext), "index" + ext);
164018
164018
  stat2 = tryStat(path19);
164019
164019
  if (stat2 && stat2.isFile()) {
164020
164020
  return path19;
@@ -167709,7 +167709,7 @@ var require_send = __commonJS((exports, module) => {
167709
167709
  var Stream2 = __require("stream");
167710
167710
  var util2 = __require("util");
167711
167711
  var extname2 = path18.extname;
167712
- var join27 = path18.join;
167712
+ var join25 = path18.join;
167713
167713
  var normalize2 = path18.normalize;
167714
167714
  var resolve13 = path18.resolve;
167715
167715
  var sep = path18.sep;
@@ -167881,7 +167881,7 @@ var require_send = __commonJS((exports, module) => {
167881
167881
  return res;
167882
167882
  }
167883
167883
  parts = path19.split(sep);
167884
- path19 = normalize2(join27(root2, path19));
167884
+ path19 = normalize2(join25(root2, path19));
167885
167885
  } else {
167886
167886
  if (UP_PATH_REGEXP.test(path19)) {
167887
167887
  debug('malicious path "%s"', path19);
@@ -168021,7 +168021,7 @@ var require_send = __commonJS((exports, module) => {
168021
168021
  return self2.onStatError(err);
168022
168022
  return self2.error(404);
168023
168023
  }
168024
- var p4 = join27(path19, self2._index[i5]);
168024
+ var p4 = join25(path19, self2._index[i5]);
168025
168025
  debug('stat "%s"', p4);
168026
168026
  fs28.stat(p4, function(err2, stat2) {
168027
168027
  if (err2)
@@ -169119,18 +169119,18 @@ var require_common7 = __commonJS((exports) => {
169119
169119
  retSegs.push.apply(retSegs, lastSegs);
169120
169120
  return retSegs.join("?");
169121
169121
  };
169122
- common2.rewriteCookieProperty = function rewriteCookieProperty(header2, config13, property) {
169122
+ common2.rewriteCookieProperty = function rewriteCookieProperty(header2, config12, property) {
169123
169123
  if (Array.isArray(header2)) {
169124
169124
  return header2.map(function(headerElement) {
169125
- return rewriteCookieProperty(headerElement, config13, property);
169125
+ return rewriteCookieProperty(headerElement, config12, property);
169126
169126
  });
169127
169127
  }
169128
169128
  return header2.replace(new RegExp("(;\\s*" + property + "=)([^;]+)", "i"), function(match, prefix, previousValue) {
169129
169129
  var newValue;
169130
- if (previousValue in config13) {
169131
- newValue = config13[previousValue];
169132
- } else if ("*" in config13) {
169133
- newValue = config13["*"];
169130
+ if (previousValue in config12) {
169131
+ newValue = config12[previousValue];
169132
+ } else if ("*" in config12) {
169133
+ newValue = config12["*"];
169134
169134
  } else {
169135
169135
  return match;
169136
169136
  }
@@ -170495,9 +170495,9 @@ var require_router2 = __commonJS((exports) => {
170495
170495
  var is_plain_object_1 = require_is_plain_object();
170496
170496
  var debug_1 = require_debug4();
170497
170497
  var debug = debug_1.Debug.extend("router");
170498
- async function getTarget(req, config13) {
170498
+ async function getTarget(req, config12) {
170499
170499
  let newTarget;
170500
- const router = config13.router;
170500
+ const router = config12.router;
170501
170501
  if ((0, is_plain_object_1.isPlainObject)(router)) {
170502
170502
  newTarget = getTargetFromProxyTable(req, router);
170503
170503
  } else if (typeof router === "function") {
@@ -213884,7 +213884,7 @@ var require_parse_path = __commonJS((exports, module) => {
213884
213884
  var reFirstKey = /^[^\[]*/;
213885
213885
  var reDigitPath = /^\[(\d+)\]/;
213886
213886
  var reNormalPath = /^\[([^\]]+)\]/;
213887
- function parsePath(key2) {
213887
+ function parsePath2(key2) {
213888
213888
  function failure() {
213889
213889
  return [{ type: "object", key: key2, last: true }];
213890
213890
  }
@@ -213925,7 +213925,7 @@ var require_parse_path = __commonJS((exports, module) => {
213925
213925
  tail.last = true;
213926
213926
  return steps;
213927
213927
  }
213928
- module.exports = parsePath;
213928
+ module.exports = parsePath2;
213929
213929
  });
213930
213930
 
213931
213931
  // ../../node_modules/append-field/lib/set-value.js
@@ -213996,10 +213996,10 @@ var require_set_value = __commonJS((exports, module) => {
213996
213996
 
213997
213997
  // ../../node_modules/append-field/index.js
213998
213998
  var require_append_field = __commonJS((exports, module) => {
213999
- var parsePath = require_parse_path();
213999
+ var parsePath2 = require_parse_path();
214000
214000
  var setValue = require_set_value();
214001
214001
  function appendField(store, key2, value) {
214002
- var steps = parsePath(key2);
214002
+ var steps = parsePath2(key2);
214003
214003
  steps.reduce(function(context, step) {
214004
214004
  return setValue(context, step, context[step.key], value);
214005
214005
  }, store);
@@ -218205,7 +218205,7 @@ var require_dist5 = __commonJS((exports, module) => {
218205
218205
  });
218206
218206
  module.exports = __toCommonJS(src_exports);
218207
218207
  var import_promises22 = __require("node:fs/promises");
218208
- var import_node_fs23 = __require("node:fs");
218208
+ var import_node_fs24 = __require("node:fs");
218209
218209
  var DEVIN_LOCAL_PATH = "/opt/.devin";
218210
218210
  var CURSOR2 = "cursor";
218211
218211
  var CURSOR_CLI = "cursor-cli";
@@ -218262,7 +218262,7 @@ var require_dist5 = __commonJS((exports, module) => {
218262
218262
  return { isAgent: true, agent: { name: REPLIT } };
218263
218263
  }
218264
218264
  try {
218265
- await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs23.constants.F_OK);
218265
+ await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
218266
218266
  return { isAgent: true, agent: { name: DEVIN } };
218267
218267
  } catch (error48) {}
218268
218268
  return { isAgent: false, agent: undefined };
@@ -234033,7 +234033,7 @@ function normalizeBase44Env() {
234033
234033
  loadProjectEnvFiles();
234034
234034
 
234035
234035
  // src/cli/index.ts
234036
- import { dirname as dirname24, join as join30 } from "node:path";
234036
+ import { dirname as dirname25, join as join30 } from "node:path";
234037
234037
  import { fileURLToPath as fileURLToPath6 } from "node:url";
234038
234038
 
234039
234039
  // ../../node_modules/@clack/core/dist/index.mjs
@@ -235240,8 +235240,8 @@ var {
235240
235240
  Help
235241
235241
  } = import__.default;
235242
235242
 
235243
- // src/cli/commands/agent-skills/pull.ts
235244
- import { dirname as dirname10, join as join15 } from "node:path";
235243
+ // src/cli/commands/agents/pull.ts
235244
+ import { dirname as dirname10, join as join14 } from "node:path";
235245
235245
  // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
235246
235246
  var ANSI_BACKGROUND_OFFSET = 10;
235247
235247
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -236056,7 +236056,6 @@ var ProjectConfigSchema = exports_external.object({
236056
236056
  entitiesDir: exports_external.string().optional().default("entities"),
236057
236057
  functionsDir: exports_external.string().optional().default("functions"),
236058
236058
  agentsDir: exports_external.string().optional().default("agents"),
236059
- agentSkillsDir: exports_external.string().optional().default("agent-skills"),
236060
236059
  connectorsDir: exports_external.string().optional().default("connectors"),
236061
236060
  authDir: exports_external.string().optional().default("auth"),
236062
236061
  plugin: PluginMetadataSchema.optional(),
@@ -241966,7 +241965,7 @@ async function getSiteUrl() {
241966
241965
  return result.data.url;
241967
241966
  }
241968
241967
  // src/core/project/config.ts
241969
- import { dirname as dirname8, join as join11 } from "node:path";
241968
+ import { dirname as dirname8, join as join10 } from "node:path";
241970
241969
 
241971
241970
  // src/core/project/plugins.ts
241972
241971
  import { createRequire as createRequire2 } from "node:module";
@@ -242029,7 +242028,6 @@ var AgentConfigSchema = exports_external.looseObject({
242029
242028
  description: exports_external.string().trim().min(1, "Description is required"),
242030
242029
  instructions: exports_external.string().trim().min(1, "Instructions are required"),
242031
242030
  tool_configs: exports_external.array(ToolConfigSchema).optional().default([]),
242032
- selected_skill_names: exports_external.array(exports_external.string()).optional().default([]),
242033
242031
  memory_config: MemoryConfigSchema.optional(),
242034
242032
  whatsapp_greeting: exports_external.string().nullable().optional()
242035
242033
  });
@@ -242173,145 +242171,6 @@ var agentResource = {
242173
242171
  readAll: readAllAgents,
242174
242172
  push: pushAgents
242175
242173
  };
242176
- // src/core/resources/agent-skill/schema.ts
242177
- var SKILL_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
242178
- var AgentSkillSchema = exports_external.object({
242179
- name: exports_external.string().trim().min(1).max(64).regex(SKILL_NAME_REGEX, "Skill name must be lowercase-hyphenated (a-z, 0-9, -)"),
242180
- description: exports_external.string().trim().min(1, "Description is required").max(1024),
242181
- body: exports_external.string().trim().min(1, "Body is required").max(15000)
242182
- });
242183
- var AgentSkillApiResponseSchema = exports_external.object({
242184
- name: exports_external.string(),
242185
- description: exports_external.string(),
242186
- body: exports_external.string()
242187
- });
242188
- var ListAgentSkillsResponseSchema = exports_external.object({
242189
- items: exports_external.array(AgentSkillApiResponseSchema),
242190
- total: exports_external.number()
242191
- });
242192
- var SyncAgentSkillsResultSchema = exports_external.object({
242193
- created: exports_external.array(exports_external.string()),
242194
- updated: exports_external.array(exports_external.string()),
242195
- deleted: exports_external.array(exports_external.string())
242196
- });
242197
-
242198
- // src/core/resources/agent-skill/api.ts
242199
- async function fetchAgentSkills() {
242200
- const appClient = getAppClient();
242201
- let response;
242202
- try {
242203
- response = await appClient.get("agent-skills");
242204
- } catch (error48) {
242205
- throw await ApiError.fromHttpError(error48, "fetching agent skills");
242206
- }
242207
- const result = ListAgentSkillsResponseSchema.safeParse(await response.json());
242208
- if (!result.success) {
242209
- throw new SchemaValidationError("Invalid response from server", result.error);
242210
- }
242211
- return result.data;
242212
- }
242213
- async function pushAgentSkills(skills) {
242214
- if (skills.length === 0) {
242215
- return { created: [], updated: [], deleted: [] };
242216
- }
242217
- const appClient = getAppClient();
242218
- const remote = await fetchAgentSkills();
242219
- const remoteByName = new Map(remote.items.map((s) => [s.name, s]));
242220
- const localNames = new Set(skills.map((s) => s.name));
242221
- const created = [];
242222
- const updated = [];
242223
- const deleted = [];
242224
- try {
242225
- for (const skill of skills) {
242226
- const prev = remoteByName.get(skill.name);
242227
- if (!prev) {
242228
- await appClient.post("agent-skills", { json: skill });
242229
- created.push(skill.name);
242230
- } else if (prev.description !== skill.description || prev.body !== skill.body) {
242231
- await appClient.put(`agent-skills/${skill.name}`, {
242232
- json: { description: skill.description, body: skill.body }
242233
- });
242234
- updated.push(skill.name);
242235
- }
242236
- }
242237
- for (const remoteSkill of remote.items) {
242238
- if (!localNames.has(remoteSkill.name)) {
242239
- await appClient.delete(`agent-skills/${remoteSkill.name}`);
242240
- deleted.push(remoteSkill.name);
242241
- }
242242
- }
242243
- } catch (error48) {
242244
- throw await ApiError.fromHttpError(error48, "syncing agent skills");
242245
- }
242246
- return { created, updated, deleted };
242247
- }
242248
- // src/core/resources/agent-skill/config.ts
242249
- import { join as join6 } from "node:path";
242250
- function parseSkillFile(raw2) {
242251
- const match = raw2.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);
242252
- if (!match) {
242253
- return { description: "", body: raw2.trim() };
242254
- }
242255
- const [, frontmatter, body] = match;
242256
- let description = "";
242257
- for (const line of frontmatter.split(/\r?\n/)) {
242258
- const kv = line.match(/^([A-Za-z0-9_-]+):\s*(.*)$/);
242259
- if (kv && kv[1] === "description") {
242260
- description = kv[2].trim().replace(/^["']|["']$/g, "");
242261
- }
242262
- }
242263
- return { description, body: body.trim() };
242264
- }
242265
- function serializeSkillFile(skill) {
242266
- return `---
242267
- description: ${skill.description}
242268
- ---
242269
-
242270
- ${skill.body}
242271
- `;
242272
- }
242273
- async function readAllAgentSkills(dir) {
242274
- if (!await pathExists(dir)) {
242275
- return [];
242276
- }
242277
- const files = await globby("*.md", { cwd: dir, absolute: true });
242278
- return await Promise.all(files.map(async (filePath) => {
242279
- const name2 = filePath.split(/[/\\]/).pop()?.replace(/\.md$/, "") ?? "";
242280
- const { description, body } = parseSkillFile(await readTextFile(filePath));
242281
- const result = AgentSkillSchema.safeParse({ name: name2, description, body });
242282
- if (!result.success) {
242283
- throw new SchemaValidationError("Invalid skill file", result.error, filePath);
242284
- }
242285
- return result.data;
242286
- }));
242287
- }
242288
- async function writeAgentSkills(dir, remote) {
242289
- const existing = await readAllAgentSkills(dir);
242290
- const remoteNames = new Set(remote.map((s) => s.name));
242291
- const deleted = [];
242292
- for (const skill of existing) {
242293
- if (!remoteNames.has(skill.name)) {
242294
- await deleteFile(join6(dir, `${skill.name}.md`));
242295
- deleted.push(skill.name);
242296
- }
242297
- }
242298
- const existingByName = new Map(existing.map((s) => [s.name, s]));
242299
- const written = [];
242300
- for (const skill of remote) {
242301
- const prev = existingByName.get(skill.name);
242302
- if (prev && prev.description === skill.description && prev.body === skill.body) {
242303
- continue;
242304
- }
242305
- await writeFile(join6(dir, `${skill.name}.md`), serializeSkillFile(skill));
242306
- written.push(skill.name);
242307
- }
242308
- return { written, deleted };
242309
- }
242310
- // src/core/resources/agent-skill/resource.ts
242311
- var agentSkillResource = {
242312
- readAll: readAllAgentSkills,
242313
- push: pushAgentSkills
242314
- };
242315
242174
  // src/core/resources/auth-config/schema.ts
242316
242175
  var GoogleOAuthMode = exports_external.enum(["default", "custom"]);
242317
242176
  var AuthConfigSchema = exports_external.object({
@@ -242354,8 +242213,8 @@ var AppAuthConfigResponseSchema = exports_external.object({
242354
242213
  }).transform((data) => ({
242355
242214
  authConfig: data.auth_config
242356
242215
  }));
242357
- function hasAnyLoginMethod(config5) {
242358
- return config5.enableUsernamePassword || config5.enableGoogleLogin || config5.enableMicrosoftLogin || config5.enableFacebookLogin || config5.enableAppleLogin || config5.enableSSOLogin;
242216
+ function hasAnyLoginMethod(config4) {
242217
+ return config4.enableUsernamePassword || config4.enableGoogleLogin || config4.enableMicrosoftLogin || config4.enableFacebookLogin || config4.enableAppleLogin || config4.enableSSOLogin;
242359
242218
  }
242360
242219
  var SOCIAL_PROVIDERS = {
242361
242220
  google: {
@@ -242370,18 +242229,18 @@ var SOCIAL_PROVIDERS = {
242370
242229
  facebook: { field: "enableFacebookLogin" },
242371
242230
  apple: { field: "enableAppleLogin" }
242372
242231
  };
242373
- function toAuthConfigPayload(config5) {
242232
+ function toAuthConfigPayload(config4) {
242374
242233
  return {
242375
- enable_username_password: config5.enableUsernamePassword,
242376
- enable_google_login: config5.enableGoogleLogin,
242377
- enable_microsoft_login: config5.enableMicrosoftLogin,
242378
- enable_facebook_login: config5.enableFacebookLogin,
242379
- enable_apple_login: config5.enableAppleLogin,
242380
- sso_provider_name: config5.ssoProviderName,
242381
- enable_sso_login: config5.enableSSOLogin,
242382
- google_oauth_mode: config5.googleOAuthMode,
242383
- google_oauth_client_id: config5.googleOAuthClientId,
242384
- use_workspace_sso: config5.useWorkspaceSSO
242234
+ enable_username_password: config4.enableUsernamePassword,
242235
+ enable_google_login: config4.enableGoogleLogin,
242236
+ enable_microsoft_login: config4.enableMicrosoftLogin,
242237
+ enable_facebook_login: config4.enableFacebookLogin,
242238
+ enable_apple_login: config4.enableAppleLogin,
242239
+ sso_provider_name: config4.ssoProviderName,
242240
+ enable_sso_login: config4.enableSSOLogin,
242241
+ google_oauth_mode: config4.googleOAuthMode,
242242
+ google_oauth_client_id: config4.googleOAuthClientId,
242243
+ use_workspace_sso: config4.useWorkspaceSSO
242385
242244
  };
242386
242245
  }
242387
242246
 
@@ -242400,9 +242259,9 @@ async function getAuthConfig() {
242400
242259
  }
242401
242260
  return result.data.authConfig;
242402
242261
  }
242403
- async function pushAuthConfigToApi(config5) {
242262
+ async function pushAuthConfigToApi(config4) {
242404
242263
  const { id } = getAppContext();
242405
- const payload = toAuthConfigPayload(config5);
242264
+ const payload = toAuthConfigPayload(config4);
242406
242265
  if (hasWorkspaceApiKeyAuth()) {
242407
242266
  try {
242408
242267
  await base44Client.put(`api/apps/${id}/deployment/auth-configuration`, {
@@ -242411,7 +242270,7 @@ async function pushAuthConfigToApi(config5) {
242411
242270
  } catch (error48) {
242412
242271
  throw await ApiError.fromHttpError(error48, "updating auth config");
242413
242272
  }
242414
- return config5;
242273
+ return config4;
242415
242274
  }
242416
242275
  let response;
242417
242276
  try {
@@ -242428,7 +242287,7 @@ async function pushAuthConfigToApi(config5) {
242428
242287
  return result.data.authConfig;
242429
242288
  }
242430
242289
  // src/core/resources/auth-config/config.ts
242431
- import { join as join7 } from "node:path";
242290
+ import { join as join6 } from "node:path";
242432
242291
  import { isDeepStrictEqual as isDeepStrictEqual2 } from "node:util";
242433
242292
  var AUTH_CONFIG_FILENAME = `config.${CONFIG_FILE_EXTENSION}`;
242434
242293
  var DEFAULT_AUTH_CONFIG = {
@@ -242444,7 +242303,7 @@ var DEFAULT_AUTH_CONFIG = {
242444
242303
  useWorkspaceSSO: false
242445
242304
  };
242446
242305
  function getAuthConfigPath(authDir) {
242447
- return join7(authDir, AUTH_CONFIG_FILENAME);
242306
+ return join6(authDir, AUTH_CONFIG_FILENAME);
242448
242307
  }
242449
242308
  async function readAuthConfig(authDir) {
242450
242309
  const filePath = getAuthConfigPath(authDir);
@@ -242458,16 +242317,16 @@ async function readAuthConfig(authDir) {
242458
242317
  }
242459
242318
  return result.data;
242460
242319
  }
242461
- async function writeAuthConfig(authDir, config5) {
242320
+ async function writeAuthConfig(authDir, config4) {
242462
242321
  const filePath = getAuthConfigPath(authDir);
242463
242322
  if (await pathExists(filePath)) {
242464
242323
  const existing = await readJsonFile(filePath);
242465
242324
  const existingResult = AuthConfigFileSchema.safeParse(existing);
242466
- if (existingResult.success && isDeepStrictEqual2(existingResult.data, config5)) {
242325
+ if (existingResult.success && isDeepStrictEqual2(existingResult.data, config4)) {
242467
242326
  return { written: false };
242468
242327
  }
242469
242328
  }
242470
- await writeJsonFile(filePath, config5);
242329
+ await writeJsonFile(filePath, config4);
242471
242330
  return { written: true };
242472
242331
  }
242473
242332
  // src/core/resources/auth-config/pull.ts
@@ -242475,17 +242334,17 @@ async function pullAuthConfig() {
242475
242334
  return await getAuthConfig();
242476
242335
  }
242477
242336
  // src/core/resources/auth-config/push.ts
242478
- async function pushAuthConfig(config5) {
242479
- if (!config5) {
242337
+ async function pushAuthConfig(config4) {
242338
+ if (!config4) {
242480
242339
  return;
242481
242340
  }
242482
- await pushAuthConfigToApi(config5);
242341
+ await pushAuthConfigToApi(config4);
242483
242342
  }
242484
242343
  // src/core/resources/auth-config/resource.ts
242485
242344
  var authConfigResource = {
242486
242345
  readAll: async (dir) => {
242487
- const config5 = await readAuthConfig(dir);
242488
- return config5 ? [config5] : [];
242346
+ const config4 = await readAuthConfig(dir);
242347
+ return config4 ? [config4] : [];
242489
242348
  },
242490
242349
  push: async (items) => {
242491
242350
  await pushAuthConfig(items[0] ?? null);
@@ -242725,7 +242584,7 @@ class MissingSSOFieldsError extends InvalidInputError {
242725
242584
  }
242726
242585
  }
242727
242586
  function buildSSOSecrets(provider, options) {
242728
- const schema4 = SSO_PROVIDER_SCHEMAS[provider];
242587
+ const schema3 = SSO_PROVIDER_SCHEMAS[provider];
242729
242588
  const secrets = {};
242730
242589
  secrets["sso_name" /* Name */] = options.ssoName ?? provider;
242731
242590
  secrets["sso_client_id" /* ClientId */] = options.clientId;
@@ -242736,21 +242595,21 @@ function buildSSOSecrets(provider, options) {
242736
242595
  secrets[secretKey] = value;
242737
242596
  }
242738
242597
  }
242739
- if (schema4.deriveDefaults) {
242740
- const derived = schema4.deriveDefaults(secrets);
242598
+ if (schema3.deriveDefaults) {
242599
+ const derived = schema3.deriveDefaults(secrets);
242741
242600
  for (const [key, val] of Object.entries(derived)) {
242742
242601
  if (!secrets[key]) {
242743
242602
  secrets[key] = val;
242744
242603
  }
242745
242604
  }
242746
242605
  }
242747
- for (const [key, val] of Object.entries(schema4.defaults)) {
242606
+ for (const [key, val] of Object.entries(schema3.defaults)) {
242748
242607
  if (!secrets[key]) {
242749
242608
  secrets[key] = val;
242750
242609
  }
242751
242610
  }
242752
242611
  const missing = [];
242753
- for (const key of schema4.requiredKeys) {
242612
+ for (const key of schema3.requiredKeys) {
242754
242613
  if (!secrets[key]) {
242755
242614
  missing.push(key);
242756
242615
  }
@@ -243096,7 +242955,7 @@ async function removeStripe() {
243096
242955
  return result.data;
243097
242956
  }
243098
242957
  // src/core/resources/connector/config.ts
243099
- import { join as join8 } from "node:path";
242958
+ import { join as join7 } from "node:path";
243100
242959
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "node:util";
243101
242960
  async function readConnectorFile(connectorPath) {
243102
242961
  const parsed = await readJsonFile(connectorPath);
@@ -243157,7 +243016,7 @@ async function writeConnectors(connectorsDir, remoteConnectors) {
243157
243016
  if (existing && isDeepStrictEqual3(existing.data, connector)) {
243158
243017
  continue;
243159
243018
  }
243160
- const filePath = existing?.filePath ?? join8(connectorsDir, `${connector.type}.${CONFIG_FILE_EXTENSION}`);
243019
+ const filePath = existing?.filePath ?? join7(connectorsDir, `${connector.type}.${CONFIG_FILE_EXTENSION}`);
243161
243020
  await writeJsonFile(filePath, connector);
243162
243021
  written.push(connector.type);
243163
243022
  }
@@ -243759,7 +243618,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
243759
243618
  return result.data;
243760
243619
  }
243761
243620
  // src/core/resources/function/config.ts
243762
- import { basename as basename3, dirname as dirname6, join as join9, relative, resolve as resolve2 } from "node:path";
243621
+ import { basename as basename3, dirname as dirname6, join as join8, relative, resolve as resolve2 } from "node:path";
243763
243622
  async function readSharedFiles(functionsDir) {
243764
243623
  const sharedDir = resolve2(functionsDir, "..", "shared");
243765
243624
  if (!await pathExists(sharedDir)) {
@@ -243776,9 +243635,9 @@ async function readFunctionConfig(configPath) {
243776
243635
  return result.data;
243777
243636
  }
243778
243637
  async function readFunction(configPath, sharedFiles) {
243779
- const config8 = await readFunctionConfig(configPath);
243638
+ const config7 = await readFunctionConfig(configPath);
243780
243639
  const functionDir = dirname6(configPath);
243781
- const entryPath = join9(functionDir, config8.entry);
243640
+ const entryPath = join8(functionDir, config7.entry);
243782
243641
  if (!await pathExists(entryPath)) {
243783
243642
  throw new InvalidInputError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`, {
243784
243643
  hints: [{ message: "Check the 'entry' field in your function config" }]
@@ -243790,7 +243649,7 @@ async function readFunction(configPath, sharedFiles) {
243790
243649
  });
243791
243650
  const allFilePaths = [...new Set([...filePaths, ...sharedFiles])];
243792
243651
  const functionData = {
243793
- ...config8,
243652
+ ...config7,
243794
243653
  entryPath,
243795
243654
  filePaths: allFilePaths,
243796
243655
  source: { type: "project" }
@@ -243927,28 +243786,28 @@ async function pruneRemovedFunctions(localFunctionNames, options) {
243927
243786
  return results;
243928
243787
  }
243929
243788
  // src/core/resources/function/pull.ts
243930
- import { join as join10 } from "node:path";
243789
+ import { join as join9 } from "node:path";
243931
243790
  import { isDeepStrictEqual as isDeepStrictEqual4 } from "node:util";
243932
243791
  async function writeFunctions(functionsDir, functions) {
243933
243792
  const written = [];
243934
243793
  const skipped = [];
243935
243794
  for (const fn of functions) {
243936
- const functionDir = join10(functionsDir, fn.name);
243937
- const configPath = join10(functionDir, "function.jsonc");
243795
+ const functionDir = join9(functionsDir, fn.name);
243796
+ const configPath = join9(functionDir, "function.jsonc");
243938
243797
  if (await isFunctionUnchanged(functionDir, fn)) {
243939
243798
  skipped.push(fn.name);
243940
243799
  continue;
243941
243800
  }
243942
- const config8 = {
243801
+ const config7 = {
243943
243802
  name: fn.name,
243944
243803
  entry: fn.entry
243945
243804
  };
243946
243805
  if (fn.automations.length > 0) {
243947
- config8.automations = fn.automations;
243806
+ config7.automations = fn.automations;
243948
243807
  }
243949
- await writeJsonFile(configPath, config8);
243808
+ await writeJsonFile(configPath, config7);
243950
243809
  for (const file2 of fn.files) {
243951
- await writeFile(join10(functionDir, file2.path), file2.content);
243810
+ await writeFile(join9(functionDir, file2.path), file2.content);
243952
243811
  }
243953
243812
  written.push(fn.name);
243954
243813
  }
@@ -243958,7 +243817,7 @@ async function isFunctionUnchanged(functionDir, fn) {
243958
243817
  if (!await pathExists(functionDir)) {
243959
243818
  return false;
243960
243819
  }
243961
- const configPath = join10(functionDir, "function.jsonc");
243820
+ const configPath = join9(functionDir, "function.jsonc");
243962
243821
  try {
243963
243822
  const localConfig = await readJsonFile(configPath);
243964
243823
  if (localConfig.entry !== fn.entry) {
@@ -243971,7 +243830,7 @@ async function isFunctionUnchanged(functionDir, fn) {
243971
243830
  return false;
243972
243831
  }
243973
243832
  for (const file2 of fn.files) {
243974
- const filePath = join10(functionDir, file2.path);
243833
+ const filePath = join9(functionDir, file2.path);
243975
243834
  if (!await pathExists(filePath)) {
243976
243835
  return false;
243977
243836
  }
@@ -244011,7 +243870,6 @@ class ProjectConfigReader {
244011
243870
  entities,
244012
243871
  functions,
244013
243872
  agents: localResources.agents,
244014
- agentSkills: localResources.agentSkills,
244015
243873
  connectors: localResources.connectors,
244016
243874
  authConfig: localResources.authConfig
244017
243875
  };
@@ -244039,15 +243897,14 @@ class ProjectConfigReader {
244039
243897
  }
244040
243898
  async readProjectResources(configPath, project) {
244041
243899
  const configDir = dirname8(configPath);
244042
- const [entities, functions, agents, agentSkills, connectors, authConfig] = await Promise.all([
244043
- entityResource.readAll(join11(configDir, project.entitiesDir)),
244044
- functionResource.readAll(join11(configDir, project.functionsDir)),
244045
- agentResource.readAll(join11(configDir, project.agentsDir)),
244046
- agentSkillResource.readAll(join11(configDir, project.agentSkillsDir)),
244047
- connectorResource.readAll(join11(configDir, project.connectorsDir)),
244048
- authConfigResource.readAll(join11(configDir, project.authDir))
243900
+ const [entities, functions, agents, connectors, authConfig] = await Promise.all([
243901
+ entityResource.readAll(join10(configDir, project.entitiesDir)),
243902
+ functionResource.readAll(join10(configDir, project.functionsDir)),
243903
+ agentResource.readAll(join10(configDir, project.agentsDir)),
243904
+ connectorResource.readAll(join10(configDir, project.connectorsDir)),
243905
+ authConfigResource.readAll(join10(configDir, project.authDir))
244049
243906
  ]);
244050
- return { entities, functions, agents, agentSkills, connectors, authConfig };
243907
+ return { entities, functions, agents, connectors, authConfig };
244051
243908
  }
244052
243909
  assertPluginProjectDoesNotLoadPlugins(project, configPath) {
244053
243910
  if (project.plugin && project.plugins.length > 0) {
@@ -244081,7 +243938,6 @@ class ProjectConfigReader {
244081
243938
  entities: markPluginEntities(resources.entities, namespace),
244082
243939
  functions: namespacePluginFunctions(resources.functions, namespace),
244083
243940
  agents: [],
244084
- agentSkills: [],
244085
243941
  connectors: [],
244086
243942
  authConfig: []
244087
243943
  };
@@ -244119,7 +243975,6 @@ class ProjectConfigReader {
244119
243975
  entities,
244120
243976
  functions,
244121
243977
  agents: [],
244122
- agentSkills: [],
244123
243978
  connectors: [],
244124
243979
  authConfig: []
244125
243980
  };
@@ -244148,12 +244003,12 @@ async function readProjectConfig(projectRoot) {
244148
244003
  // src/core/project/template.ts
244149
244004
  var import_ejs = __toESM(require_ejs(), 1);
244150
244005
  var import_front_matter = __toESM(require_front_matter(), 1);
244151
- import { dirname as dirname9, join as join13 } from "node:path";
244006
+ import { dirname as dirname9, join as join12 } from "node:path";
244152
244007
 
244153
244008
  // src/core/assets.ts
244154
244009
  import { cpSync, existsSync } from "node:fs";
244155
244010
  import { homedir as homedir2 } from "node:os";
244156
- import { join as join12 } from "node:path";
244011
+ import { join as join11 } from "node:path";
244157
244012
  // package.json
244158
244013
  var package_default = {
244159
244014
  name: "base44",
@@ -244254,21 +244109,24 @@ var package_default = {
244254
244109
  };
244255
244110
 
244256
244111
  // src/core/assets.ts
244257
- var ASSETS_DIR = join12(homedir2(), ".base44", "assets", package_default.version);
244112
+ var ASSETS_DIR = join11(homedir2(), ".base44", "assets", package_default.version);
244258
244113
  function getTemplatesDir() {
244259
- return join12(ASSETS_DIR, "templates");
244114
+ return join11(ASSETS_DIR, "templates");
244260
244115
  }
244261
244116
  function getTemplatesIndexPath() {
244262
- return join12(ASSETS_DIR, "templates", "templates.json");
244117
+ return join11(ASSETS_DIR, "templates", "templates.json");
244118
+ }
244119
+ function getBackendRuntimeDir() {
244120
+ return join11(ASSETS_DIR, "backend-runtime");
244263
244121
  }
244264
244122
  function getDenoWrapperPath() {
244265
- return join12(ASSETS_DIR, "deno-runtime", "main.ts");
244123
+ return join11(getBackendRuntimeDir(), "main.ts");
244266
244124
  }
244267
244125
  function getExecWrapperPath() {
244268
- return join12(ASSETS_DIR, "deno-runtime", "exec.ts");
244126
+ return join11(getBackendRuntimeDir(), "exec.ts");
244269
244127
  }
244270
244128
  function ensureNpmAssets(sourceDir) {
244271
- if (existsSync(ASSETS_DIR))
244129
+ if (existsSync(ASSETS_DIR) && existsSync(getBackendRuntimeDir()))
244272
244130
  return;
244273
244131
  if (!existsSync(sourceDir))
244274
244132
  return;
@@ -244287,7 +244145,7 @@ async function listTemplates() {
244287
244145
  }
244288
244146
  async function renderTemplate(template, destPath, data, options = {}) {
244289
244147
  const { skipExisting = false } = options;
244290
- const templateDir = join13(getTemplatesDir(), template.path);
244148
+ const templateDir = join12(getTemplatesDir(), template.path);
244291
244149
  const files = await globby("**/*", {
244292
244150
  cwd: templateDir,
244293
244151
  dot: true,
@@ -244295,20 +244153,20 @@ async function renderTemplate(template, destPath, data, options = {}) {
244295
244153
  });
244296
244154
  const skipped = [];
244297
244155
  for (const file2 of files) {
244298
- const srcPath = join13(templateDir, file2);
244156
+ const srcPath = join12(templateDir, file2);
244299
244157
  try {
244300
244158
  if (file2.endsWith(".ejs")) {
244301
244159
  const rendered = await import_ejs.default.renderFile(srcPath, data);
244302
244160
  const { attributes, body } = import_front_matter.default(rendered);
244303
- const destFile = attributes.outputFileName ? join13(dirname9(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
244304
- const destFilePath = join13(destPath, destFile);
244161
+ const destFile = attributes.outputFileName ? join12(dirname9(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
244162
+ const destFilePath = join12(destPath, destFile);
244305
244163
  if (skipExisting && await pathExists(destFilePath)) {
244306
244164
  skipped.push(destFile);
244307
244165
  continue;
244308
244166
  }
244309
244167
  await writeFile(destFilePath, body);
244310
244168
  } else {
244311
- const destFilePath = join13(destPath, file2);
244169
+ const destFilePath = join12(destPath, file2);
244312
244170
  if (skipExisting && await pathExists(destFilePath)) {
244313
244171
  skipped.push(file2);
244314
244172
  continue;
@@ -244408,7 +244266,7 @@ async function getSiteFilePaths(outputDir) {
244408
244266
  // src/core/site/deploy.ts
244409
244267
  import { randomUUID } from "node:crypto";
244410
244268
  import { tmpdir } from "node:os";
244411
- import { join as join14 } from "node:path";
244269
+ import { join as join13 } from "node:path";
244412
244270
  async function deploySite(siteOutputDir) {
244413
244271
  if (!await pathExists(siteOutputDir)) {
244414
244272
  throw new InvalidInputError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
@@ -244425,7 +244283,7 @@ async function deploySite(siteOutputDir) {
244425
244283
  ]
244426
244284
  });
244427
244285
  }
244428
- const archivePath = join14(tmpdir(), `base44-site-${randomUUID()}.tar.gz`);
244286
+ const archivePath = join13(tmpdir(), `base44-site-${randomUUID()}.tar.gz`);
244429
244287
  try {
244430
244288
  await createArchive(siteOutputDir, archivePath);
244431
244289
  return await uploadSite(archivePath);
@@ -244442,35 +244300,18 @@ async function createArchive(pathToArchive, targetArchivePath) {
244442
244300
  }
244443
244301
  // src/core/project/deploy.ts
244444
244302
  function hasResourcesToDeploy(projectData) {
244445
- const {
244446
- project,
244447
- entities,
244448
- functions,
244449
- agents,
244450
- agentSkills,
244451
- connectors,
244452
- authConfig
244453
- } = projectData;
244303
+ const { project, entities, functions, agents, connectors, authConfig } = projectData;
244454
244304
  const hasSite = Boolean(project.site?.outputDirectory);
244455
244305
  const hasEntities = entities.length > 0;
244456
244306
  const hasFunctions = functions.length > 0;
244457
244307
  const hasAgents = agents.length > 0;
244458
- const hasAgentSkills = agentSkills.length > 0;
244459
244308
  const hasConnectors = connectors.length > 0;
244460
244309
  const hasAuthConfig = authConfig.length > 0;
244461
244310
  const hasVisibility = Boolean(project.visibility);
244462
- return hasEntities || hasFunctions || hasAgents || hasAgentSkills || hasConnectors || hasAuthConfig || hasVisibility || hasSite;
244311
+ return hasEntities || hasFunctions || hasAgents || hasConnectors || hasAuthConfig || hasVisibility || hasSite;
244463
244312
  }
244464
244313
  async function deployAll(projectData, options) {
244465
- const {
244466
- project,
244467
- entities,
244468
- functions,
244469
- agents,
244470
- agentSkills,
244471
- connectors,
244472
- authConfig
244473
- } = projectData;
244314
+ const { project, entities, functions, agents, connectors, authConfig } = projectData;
244474
244315
  await setAppVisibility(project.visibility);
244475
244316
  if (project.visibility) {
244476
244317
  options?.onVisibilitySet?.(project.visibility);
@@ -244480,7 +244321,6 @@ async function deployAll(projectData, options) {
244480
244321
  onStart: options?.onFunctionStart,
244481
244322
  onResult: options?.onFunctionResult
244482
244323
  });
244483
- await agentSkillResource.push(agentSkills);
244484
244324
  await agentResource.push(agents);
244485
244325
  await authConfigResource.push(authConfig);
244486
244326
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
@@ -251778,70 +251618,14 @@ async function moveAppToWorkspace(appId, targetWorkspaceId, options = {}) {
251778
251618
  }
251779
251619
  return result.data;
251780
251620
  }
251781
- // src/cli/commands/agent-skills/pull.ts
251782
- async function pullAction({
251783
- log,
251784
- runTask: runTask2
251785
- }) {
251786
- const { project: project2 } = await readProjectConfig();
251787
- const dir = join15(dirname10(project2.configPath), project2.agentSkillsDir);
251788
- const remote = await runTask2("Fetching agent skills from Base44", () => fetchAgentSkills(), {
251789
- successMessage: "Agent skills fetched",
251790
- errorMessage: "Failed to fetch agent skills"
251791
- });
251792
- const { written, deleted } = await runTask2("Syncing skill files", () => writeAgentSkills(dir, remote.items), {
251793
- successMessage: "Skill files synced",
251794
- errorMessage: "Failed to sync skill files"
251795
- });
251796
- if (written.length > 0)
251797
- log.success(`Written: ${written.join(", ")}`);
251798
- if (deleted.length > 0)
251799
- log.warn(`Deleted: ${deleted.join(", ")}`);
251800
- if (written.length === 0 && deleted.length === 0)
251801
- log.info("All skills are already up to date");
251802
- return { outroMessage: `Pulled ${remote.total} agent skills to ${dir}` };
251803
- }
251804
- function getAgentSkillsPullCommand() {
251805
- return new Base44Command("pull").description("Pull agent skills from Base44 to local files").action(pullAction);
251806
- }
251807
-
251808
- // src/cli/commands/agent-skills/push.ts
251809
- async function pushAction({
251810
- log,
251811
- runTask: runTask2
251812
- }) {
251813
- const { agentSkills } = await readProjectConfig();
251814
- log.info(agentSkills.length === 0 ? "No local agent skills found - this will delete all remote skills" : `Found ${agentSkills.length} agent skills to push`);
251815
- const result = await runTask2("Pushing agent skills to Base44", () => pushAgentSkills(agentSkills), {
251816
- successMessage: "Agent skills pushed",
251817
- errorMessage: "Failed to push agent skills"
251818
- });
251819
- if (result.created.length > 0)
251820
- log.success(`Created: ${result.created.join(", ")}`);
251821
- if (result.updated.length > 0)
251822
- log.success(`Updated: ${result.updated.join(", ")}`);
251823
- if (result.deleted.length > 0)
251824
- log.warn(`Deleted: ${result.deleted.join(", ")}`);
251825
- return { outroMessage: "Agent skills pushed to Base44" };
251826
- }
251827
- function getAgentSkillsPushCommand() {
251828
- return new Base44Command("push").description("Push local agent skills to Base44").action(pushAction);
251829
- }
251830
-
251831
- // src/cli/commands/agent-skills/index.ts
251832
- function getAgentSkillsCommand() {
251833
- return new Command("agent-skills").description("Manage app agent skills").addCommand(getAgentSkillsPushCommand()).addCommand(getAgentSkillsPullCommand());
251834
- }
251835
-
251836
251621
  // src/cli/commands/agents/pull.ts
251837
- import { dirname as dirname11, join as join16 } from "node:path";
251838
251622
  async function pullAgentsAction({
251839
251623
  log,
251840
251624
  runTask: runTask2
251841
251625
  }) {
251842
251626
  const { project: project2 } = await readProjectConfig();
251843
- const configDir = dirname11(project2.configPath);
251844
- const agentsDir = join16(configDir, project2.agentsDir);
251627
+ const configDir = dirname10(project2.configPath);
251628
+ const agentsDir = join14(configDir, project2.agentsDir);
251845
251629
  const remoteAgents = await runTask2("Fetching agents from Base44", async () => {
251846
251630
  return await fetchAgents();
251847
251631
  }, {
@@ -251911,12 +251695,12 @@ function getAgentsCommand() {
251911
251695
  }
251912
251696
 
251913
251697
  // src/cli/commands/auth/password-login.ts
251914
- import { dirname as dirname12, join as join17 } from "node:path";
251698
+ import { dirname as dirname11, join as join15 } from "node:path";
251915
251699
  async function passwordLoginAction({ log, runTask: runTask2 }, action) {
251916
251700
  const shouldEnable = action === "enable";
251917
251701
  const { project: project2 } = await readProjectConfig();
251918
- const configDir = dirname12(project2.configPath);
251919
- const authDir = join17(configDir, project2.authDir);
251702
+ const configDir = dirname11(project2.configPath);
251703
+ const authDir = join15(configDir, project2.authDir);
251920
251704
  const updated = await runTask2("Updating local auth config", async () => {
251921
251705
  const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
251922
251706
  const merged = { ...current, enableUsernamePassword: shouldEnable };
@@ -251936,14 +251720,14 @@ function getPasswordLoginCommand() {
251936
251720
  }
251937
251721
 
251938
251722
  // src/cli/commands/auth/pull.ts
251939
- import { dirname as dirname13, join as join18 } from "node:path";
251723
+ import { dirname as dirname12, join as join16 } from "node:path";
251940
251724
  async function pullAuthAction({
251941
251725
  log,
251942
251726
  runTask: runTask2
251943
251727
  }) {
251944
251728
  const { project: project2 } = await readProjectConfig();
251945
- const configDir = dirname13(project2.configPath);
251946
- const authDir = join18(configDir, project2.authDir);
251729
+ const configDir = dirname12(project2.configPath);
251730
+ const authDir = join16(configDir, project2.authDir);
251947
251731
  const remoteConfig = await runTask2("Fetching auth config from Base44", async () => {
251948
251732
  return await pullAuthConfig();
251949
251733
  }, {
@@ -252007,7 +251791,7 @@ function getAuthPushCommand() {
252007
251791
  }
252008
251792
 
252009
251793
  // src/cli/commands/auth/social-login.ts
252010
- import { dirname as dirname14, join as join19, resolve as resolve4 } from "node:path";
251794
+ import { dirname as dirname13, join as join17, resolve as resolve4 } from "node:path";
252011
251795
  var PROVIDER_LABELS = {
252012
251796
  google: "Google",
252013
251797
  microsoft: "Microsoft",
@@ -252077,8 +251861,8 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
252077
251861
  }
252078
251862
  }
252079
251863
  const { project: project2 } = await readProjectConfig();
252080
- const configDir = dirname14(project2.configPath);
252081
- const authDir = join19(configDir, project2.authDir);
251864
+ const configDir = dirname13(project2.configPath);
251865
+ const authDir = join17(configDir, project2.authDir);
252082
251866
  const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
252083
251867
  if (clientSecret) {
252084
251868
  await runTask2("Saving client secret", async () => pushCustomOAuthSecret(provider, clientSecret));
@@ -252103,7 +251887,7 @@ function getSocialLoginCommand() {
252103
251887
  }
252104
251888
 
252105
251889
  // src/cli/commands/auth/sso.ts
252106
- import { dirname as dirname15, join as join20, resolve as resolve5 } from "node:path";
251890
+ import { dirname as dirname14, join as join18, resolve as resolve5 } from "node:path";
252107
251891
  var SSOConfigFileSchema = exports_external.object({
252108
251892
  provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
252109
251893
  clientId: exports_external.string(),
@@ -252266,8 +252050,8 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
252266
252050
  throw error48;
252267
252051
  }
252268
252052
  const { project: project2 } = await readProjectConfig();
252269
- const configDir = dirname15(project2.configPath);
252270
- const authDir = join20(configDir, project2.authDir);
252053
+ const configDir = dirname14(project2.configPath);
252054
+ const authDir = join18(configDir, project2.authDir);
252271
252055
  await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
252272
252056
  await runTask2("Saving SSO credentials", async () => pushSSOSecrets(secrets));
252273
252057
  return {
@@ -252282,8 +252066,8 @@ async function ssoDisableAction({ log, runTask: runTask2 }, options) {
252282
252066
  throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
252283
252067
  }
252284
252068
  const { project: project2 } = await readProjectConfig();
252285
- const configDir = dirname15(project2.configPath);
252286
- const authDir = join20(configDir, project2.authDir);
252069
+ const configDir = dirname14(project2.configPath);
252070
+ const authDir = join18(configDir, project2.authDir);
252287
252071
  const updated = await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
252288
252072
  await runTask2("Removing SSO credentials", async () => deleteSSOSecrets());
252289
252073
  if (!hasAnyLoginMethod(updated)) {
@@ -253140,13 +252924,13 @@ function getConnectorsListAvailableCommand() {
253140
252924
  }
253141
252925
 
253142
252926
  // src/cli/commands/connectors/pull.ts
253143
- import { dirname as dirname16, join as join21, resolve as resolve6 } from "node:path";
252927
+ import { dirname as dirname15, join as join19, resolve as resolve6 } from "node:path";
253144
252928
  async function resolveConnectorsDir(options) {
253145
252929
  if (!getAppContext().projectRoot) {
253146
252930
  return resolve6(options.dir ?? "connectors");
253147
252931
  }
253148
252932
  const { project: project2 } = await readProjectConfig();
253149
- return join21(dirname16(project2.configPath), project2.connectorsDir);
252933
+ return join19(dirname15(project2.configPath), project2.connectorsDir);
253150
252934
  }
253151
252935
  async function pullConnectorsAction({ log, runTask: runTask2, jsonMode }, options) {
253152
252936
  const connectorsDir = await resolveConnectorsDir(options);
@@ -253554,11 +253338,11 @@ function getListCommand() {
253554
253338
  }
253555
253339
 
253556
253340
  // src/cli/commands/functions/pull.ts
253557
- import { dirname as dirname17, join as join22 } from "node:path";
253341
+ import { dirname as dirname16, join as join20 } from "node:path";
253558
253342
  async function pullFunctionsAction({ log, runTask: runTask2 }, name2) {
253559
253343
  const { project: project2, functions } = await readProjectConfig();
253560
- const configDir = dirname17(project2.configPath);
253561
- const functionsDir = join22(configDir, project2.functionsDir);
253344
+ const configDir = dirname16(project2.configPath);
253345
+ const functionsDir = join20(configDir, project2.functionsDir);
253562
253346
  const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
253563
253347
  const remoteFunctions = await runTask2("Fetching functions from Base44", async () => {
253564
253348
  const { functions: functions2 } = await listDeployedFunctions();
@@ -253621,7 +253405,7 @@ import { basename as basename4, resolve as resolve8 } from "node:path";
253621
253405
  var import_kebabCase = __toESM(require_kebabCase(), 1);
253622
253406
 
253623
253407
  // src/cli/commands/project/scaffold-shared.ts
253624
- import { join as join23 } from "node:path";
253408
+ import { join as join21 } from "node:path";
253625
253409
  var DEFAULT_TEMPLATE_ID = "backend-only";
253626
253410
  async function getTemplateById(templateId) {
253627
253411
  const templates = await listTemplates();
@@ -253680,7 +253464,7 @@ async function completeProjectSetup({
253680
253464
  updateMessage("Building project...");
253681
253465
  await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
253682
253466
  updateMessage("Deploying site...");
253683
- return await deploySite(join23(resolvedPath, outputDirectory));
253467
+ return await deploySite(join21(resolvedPath, outputDirectory));
253684
253468
  }, {
253685
253469
  successMessage: theme.colors.base44Orange("Site deployed successfully"),
253686
253470
  errorMessage: "Failed to deploy site"
@@ -254535,7 +254319,7 @@ function withSandboxAuthHint(error48) {
254535
254319
  cause: error48
254536
254320
  });
254537
254321
  }
254538
- async function callTool(appId, tool, payload, schema12, context, timeout2 = 60000) {
254322
+ async function callTool(appId, tool, payload, schema11, context, timeout2 = 60000) {
254539
254323
  const client = getSandboxClient(appId);
254540
254324
  let response;
254541
254325
  try {
@@ -254543,7 +254327,7 @@ async function callTool(appId, tool, payload, schema12, context, timeout2 = 6000
254543
254327
  } catch (error48) {
254544
254328
  throw withSandboxAuthHint(await ApiError.fromHttpError(error48, context));
254545
254329
  }
254546
- const result = schema12.safeParse(await response.json());
254330
+ const result = schema11.safeParse(await response.json());
254547
254331
  if (!result.success) {
254548
254332
  throw new SchemaValidationError("Invalid response from server", result.error);
254549
254333
  }
@@ -254937,9 +254721,9 @@ async function generateContent(input) {
254937
254721
  `);
254938
254722
  }
254939
254723
  async function compileEntity(entity2) {
254940
- const { name: name2, source: _source, ...schema12 } = entity2;
254724
+ const { name: name2, source: _source, ...schema11 } = entity2;
254941
254725
  const jsonSchema = {
254942
- ...schema12,
254726
+ ...schema11,
254943
254727
  title: name2,
254944
254728
  additionalProperties: false
254945
254729
  };
@@ -254966,10 +254750,10 @@ function toPascalCase(name2) {
254966
254750
  return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
254967
254751
  }
254968
254752
  // src/core/types/update-project.ts
254969
- import { join as join26 } from "node:path";
254753
+ import { join as join24 } from "node:path";
254970
254754
  var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
254971
254755
  async function updateProjectConfig(projectRoot) {
254972
- const tsconfigPath = join26(projectRoot, "tsconfig.json");
254756
+ const tsconfigPath = join24(projectRoot, "tsconfig.json");
254973
254757
  if (!await pathExists(tsconfigPath)) {
254974
254758
  return false;
254975
254759
  }
@@ -255167,7 +254951,7 @@ function getWorkspaceCommand() {
255167
254951
  // src/cli/dev/dev-server/main.ts
255168
254952
  var import_cors = __toESM(require_lib4(), 1);
255169
254953
  var import_express6 = __toESM(require_express(), 1);
255170
- import { dirname as dirname22, join as join29 } from "node:path";
254954
+ import { dirname as dirname23, join as join29 } from "node:path";
255171
254955
 
255172
254956
  // ../../node_modules/get-port/index.js
255173
254957
  import net from "node:net";
@@ -255188,8 +254972,8 @@ var getLocalHosts = () => {
255188
254972
  const interfaces = os9.networkInterfaces();
255189
254973
  const results = new Set([undefined, "0.0.0.0"]);
255190
254974
  for (const _interface of Object.values(interfaces)) {
255191
- for (const config13 of _interface) {
255192
- results.add(config13.address);
254975
+ for (const config12 of _interface) {
254976
+ results.add(config12.address);
255193
254977
  }
255194
254978
  }
255195
254979
  return results;
@@ -255339,7 +255123,79 @@ function createDevLogger(label2, labelColor = theme.styles.dim) {
255339
255123
 
255340
255124
  // src/cli/dev/dev-server/function-manager.ts
255341
255125
  import { spawn as spawn2 } from "node:child_process";
255126
+ import { dirname as dirname20, join as join26 } from "node:path";
255127
+ import { pathToFileURL as pathToFileURL6 } from "node:url";
255128
+
255129
+ // src/cli/dev/dev-server/import-map.ts
255130
+ var import_json52 = __toESM(require_lib(), 1);
255131
+ import { existsSync as existsSync2, readFileSync as readFileSync3 } from "node:fs";
255132
+ import { dirname as dirname19, join as join25, parse as parsePath } from "node:path";
255342
255133
  import { pathToFileURL } from "node:url";
255134
+ var DENO_CONFIG_NAMES = ["deno.json", "deno.jsonc"];
255135
+ function findDenoConfig(startDir) {
255136
+ const { root: root2 } = parsePath(startDir);
255137
+ let dir = startDir;
255138
+ while (true) {
255139
+ for (const name2 of DENO_CONFIG_NAMES) {
255140
+ const candidate = join25(dir, name2);
255141
+ if (existsSync2(candidate))
255142
+ return candidate;
255143
+ }
255144
+ if (dir === root2)
255145
+ return null;
255146
+ const parent = dirname19(dir);
255147
+ if (parent === dir)
255148
+ return null;
255149
+ dir = parent;
255150
+ }
255151
+ }
255152
+ function absolutize(value, baseUrl) {
255153
+ if (!value.startsWith("./") && !value.startsWith("../"))
255154
+ return value;
255155
+ return new URL(value, baseUrl).href;
255156
+ }
255157
+ function absolutizeEntries(entries, baseUrl) {
255158
+ return Object.fromEntries(Object.entries(entries).map(([key2, value]) => [
255159
+ absolutize(key2, baseUrl),
255160
+ absolutize(value, baseUrl)
255161
+ ]));
255162
+ }
255163
+ function readImportMap(filePath) {
255164
+ const parsed = import_json52.default.parse(readFileSync3(filePath, "utf-8"));
255165
+ if (!parsed || typeof parsed !== "object")
255166
+ return {};
255167
+ const { imports, scopes } = parsed;
255168
+ return { imports, scopes };
255169
+ }
255170
+ function buildImportMapArg(baseImportMapPath, projectDir) {
255171
+ const baseUrl = pathToFileURL(baseImportMapPath).href;
255172
+ const base = readImportMap(baseImportMapPath);
255173
+ const merged = {
255174
+ imports: absolutizeEntries(base.imports ?? {}, baseUrl),
255175
+ scopes: {}
255176
+ };
255177
+ const projectConfigPath = findDenoConfig(projectDir);
255178
+ if (projectConfigPath) {
255179
+ const projectUrl = pathToFileURL(projectConfigPath).href;
255180
+ let project2 = {};
255181
+ try {
255182
+ project2 = readImportMap(projectConfigPath);
255183
+ } catch {
255184
+ project2 = {};
255185
+ }
255186
+ merged.imports = {
255187
+ ...absolutizeEntries(project2.imports ?? {}, projectUrl),
255188
+ ...merged.imports
255189
+ };
255190
+ for (const [scope, entries] of Object.entries(project2.scopes ?? {})) {
255191
+ merged.scopes[absolutize(scope, projectUrl)] = absolutizeEntries(entries, projectUrl);
255192
+ }
255193
+ }
255194
+ const json3 = JSON.stringify(merged);
255195
+ return `data:application/json,${encodeURIComponent(json3)}`;
255196
+ }
255197
+
255198
+ // src/cli/dev/dev-server/function-manager.ts
255343
255199
  var READY_TIMEOUT = 30000;
255344
255200
 
255345
255201
  class FunctionManager {
@@ -255422,10 +255278,11 @@ class FunctionManager {
255422
255278
  }
255423
255279
  spawnFunction(func, port) {
255424
255280
  this.logger.log(`Spawning function "${func.name}" on port ${port}`);
255425
- const process21 = spawn2("deno", ["run", "--allow-all", this.wrapperPath], {
255281
+ const importMapArg = buildImportMapArg(join26(dirname20(this.wrapperPath), "import-map.json"), globalThis.process.cwd());
255282
+ const process21 = spawn2("deno", ["run", "--allow-all", "--import-map", importMapArg, this.wrapperPath], {
255426
255283
  env: {
255427
255284
  ...globalThis.process.env,
255428
- FUNCTION_PATH: pathToFileURL(func.entryPath).href,
255285
+ FUNCTION_PATH: pathToFileURL6(func.entryPath).href,
255429
255286
  FUNCTION_PORT: String(port),
255430
255287
  FUNCTION_NAME: func.name
255431
255288
  },
@@ -255829,22 +255686,22 @@ class Database {
255829
255686
  this.schemas.clear();
255830
255687
  }
255831
255688
  validate(entityName, record2, partial2 = false) {
255832
- const schema12 = this.schemas.get(this.normalizeName(entityName));
255833
- if (!schema12) {
255689
+ const schema11 = this.schemas.get(this.normalizeName(entityName));
255690
+ if (!schema11) {
255834
255691
  throw new Error(`Entity "${entityName}" not found`);
255835
255692
  }
255836
- return this.validator.validate(record2, schema12, partial2);
255693
+ return this.validator.validate(record2, schema11, partial2);
255837
255694
  }
255838
255695
  prepareRecord(entityName, record2, partial2 = false) {
255839
- const schema12 = this.schemas.get(this.normalizeName(entityName));
255840
- if (!schema12) {
255696
+ const schema11 = this.schemas.get(this.normalizeName(entityName));
255697
+ if (!schema11) {
255841
255698
  throw new Error(`Entity "${entityName}" not found`);
255842
255699
  }
255843
- const filteredRecord = this.validator.filterFields(record2, schema12);
255700
+ const filteredRecord = this.validator.filterFields(record2, schema11);
255844
255701
  if (partial2) {
255845
255702
  return filteredRecord;
255846
255703
  }
255847
- return this.validator.applyDefaults(filteredRecord, schema12);
255704
+ return this.validator.applyDefaults(filteredRecord, schema11);
255848
255705
  }
255849
255706
  normalizeName(entityName) {
255850
255707
  return entityName.toLowerCase();
@@ -256138,13 +255995,13 @@ function checkRLS(rule, record2, user) {
256138
255995
  return false;
256139
255996
  return evaluateCondition(rule, record2, user);
256140
255997
  }
256141
- function applyFLS(record2, schema12, user, operation) {
255998
+ function applyFLS(record2, schema11, user, operation) {
256142
255999
  if (Array.isArray(record2)) {
256143
- return record2.map((r5) => applyFLS(r5, schema12, user, operation));
256000
+ return record2.map((r5) => applyFLS(r5, schema11, user, operation));
256144
256001
  }
256145
256002
  const result = {};
256146
256003
  for (const [key2, value] of Object.entries(record2)) {
256147
- const rule = schema12.properties[key2]?.rls?.[operation];
256004
+ const rule = schema11.properties[key2]?.rls?.[operation];
256148
256005
  if (rule === undefined || checkRLS(rule, record2, user)) {
256149
256006
  result[key2] = value;
256150
256007
  }
@@ -256372,14 +256229,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256372
256229
  res.status(404).json({ error: `Entity "${entityName}" not found` });
256373
256230
  return;
256374
256231
  }
256375
- const schema12 = db2.getSchema(entityName);
256376
- if (!schema12) {
256232
+ const schema11 = db2.getSchema(entityName);
256233
+ if (!schema11) {
256377
256234
  res.status(404).json({ error: `Schema for "${entityName}" not found` });
256378
256235
  return;
256379
256236
  }
256380
256237
  const currentUserResult = await resolveCurrentUser(db2, req);
256381
256238
  const currentUser = currentUserResult.ok ? currentUserResult.user : undefined;
256382
- await handler(req, res, collection, schema12, currentUser);
256239
+ await handler(req, res, collection, schema11, currentUser);
256383
256240
  };
256384
256241
  }
256385
256242
  function emit(appId, entityName, type, data) {
@@ -256397,19 +256254,19 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256397
256254
  }
256398
256255
  broadcast(appId, entityName, createData(data));
256399
256256
  }
256400
- function prepareCreateRecord(entityName, body, schema12, currentUser, now) {
256257
+ function prepareCreateRecord(entityName, body, schema11, currentUser, now) {
256401
256258
  const { _id, ...recordBody } = body;
256402
256259
  const ownerFields = {
256403
256260
  created_by: currentUser?.email,
256404
256261
  created_by_id: currentUser?.id
256405
256262
  };
256406
- if (!checkRLS(schema12.rls?.create, {
256263
+ if (!checkRLS(schema11.rls?.create, {
256407
256264
  ...recordBody,
256408
256265
  ...ownerFields
256409
256266
  }, currentUser)) {
256410
256267
  return;
256411
256268
  }
256412
- const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema12, currentUser, "write");
256269
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema11, currentUser, "write");
256413
256270
  db2.validate(entityName, filteredBody);
256414
256271
  return {
256415
256272
  ...filteredBody,
@@ -256421,7 +256278,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256421
256278
  }
256422
256279
  const userRouter = createUserRouter(db2, logger2);
256423
256280
  router.use("/User", userRouter);
256424
- router.get("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
256281
+ router.get("/:entityName/:id", withCollection(async (req, res, collection, schema11, currentUser) => {
256425
256282
  const { entityName, id: id2 } = req.params;
256426
256283
  try {
256427
256284
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -256429,27 +256286,27 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256429
256286
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256430
256287
  return;
256431
256288
  }
256432
- if (!checkRLS(schema12.rls?.read, doc2, currentUser)) {
256289
+ if (!checkRLS(schema11.rls?.read, doc2, currentUser)) {
256433
256290
  res.status(404).json({
256434
256291
  message: `Entity ${entityName} with ID ${id2} not found`
256435
256292
  });
256436
256293
  return;
256437
256294
  }
256438
- const result = applyFLS(stripInternalFields(doc2), schema12, currentUser, "read");
256295
+ const result = applyFLS(stripInternalFields(doc2), schema11, currentUser, "read");
256439
256296
  res.json(result);
256440
256297
  } catch (error48) {
256441
256298
  logger2.error(`Error in GET /${entityName}/${id2}:`, error48);
256442
256299
  res.status(500).json({ error: "Internal server error" });
256443
256300
  }
256444
256301
  }));
256445
- router.get("/:entityName", withCollection(async (req, res, collection, schema12, currentUser) => {
256302
+ router.get("/:entityName", withCollection(async (req, res, collection, schema11, currentUser) => {
256446
256303
  const { entityName } = req.params;
256447
256304
  try {
256448
256305
  let results = stripInternalFields(await queryEntity(collection, req.query));
256449
- if (schema12.rls?.read !== undefined && schema12.rls.read !== true) {
256450
- results = results.filter((doc2) => checkRLS(schema12.rls.read, doc2, currentUser));
256306
+ if (schema11.rls?.read !== undefined && schema11.rls.read !== true) {
256307
+ results = results.filter((doc2) => checkRLS(schema11.rls.read, doc2, currentUser));
256451
256308
  }
256452
- results = results.map((doc2) => applyFLS(doc2, schema12, currentUser, "read"));
256309
+ results = results.map((doc2) => applyFLS(doc2, schema11, currentUser, "read"));
256453
256310
  res.json(results);
256454
256311
  } catch (error48) {
256455
256312
  if (error48 instanceof InvalidInputError) {
@@ -256460,16 +256317,16 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256460
256317
  }
256461
256318
  }
256462
256319
  }));
256463
- router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256320
+ router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256464
256321
  const { appId, entityName } = req.params;
256465
256322
  try {
256466
256323
  const now = new Date().toISOString();
256467
- const record2 = prepareCreateRecord(entityName, req.body, schema12, currentUser, now);
256324
+ const record2 = prepareCreateRecord(entityName, req.body, schema11, currentUser, now);
256468
256325
  if (!record2) {
256469
256326
  res.status(403).json({ error: "Permission denied" });
256470
256327
  return;
256471
256328
  }
256472
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema12, currentUser, "read");
256329
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema11, currentUser, "read");
256473
256330
  emit(appId, entityName, "create", inserted);
256474
256331
  res.status(201).json(inserted);
256475
256332
  } catch (error48) {
@@ -256481,7 +256338,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256481
256338
  res.status(500).json({ error: "Internal server error" });
256482
256339
  }
256483
256340
  }));
256484
- router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256341
+ router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256485
256342
  const { appId, entityName } = req.params;
256486
256343
  if (!Array.isArray(req.body)) {
256487
256344
  res.status(400).json({ error: "Request body must be an array" });
@@ -256491,14 +256348,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256491
256348
  const now = new Date().toISOString();
256492
256349
  const records = [];
256493
256350
  for (const body of req.body) {
256494
- const record2 = prepareCreateRecord(entityName, body, schema12, currentUser, now);
256351
+ const record2 = prepareCreateRecord(entityName, body, schema11, currentUser, now);
256495
256352
  if (!record2) {
256496
256353
  res.status(403).json({ error: "Permission denied" });
256497
256354
  return;
256498
256355
  }
256499
256356
  records.push(record2);
256500
256357
  }
256501
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema12, currentUser, "read");
256358
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema11, currentUser, "read");
256502
256359
  emit(appId, entityName, "create", inserted);
256503
256360
  res.status(201).json(inserted);
256504
256361
  } catch (error48) {
@@ -256510,24 +256367,24 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256510
256367
  res.status(500).json({ error: "Internal server error" });
256511
256368
  }
256512
256369
  }));
256513
- router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256370
+ router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256514
256371
  const { appId, entityName, id: id2 } = req.params;
256515
256372
  const { id: _id, created_date: _created_date, ...body } = req.body;
256516
256373
  try {
256517
- if (schema12.rls?.update !== undefined) {
256374
+ if (schema11.rls?.update !== undefined) {
256518
256375
  const existing = await collection.findOneAsync({ id: id2 });
256519
256376
  if (!existing) {
256520
256377
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256521
256378
  return;
256522
256379
  }
256523
- if (!checkRLS(schema12.rls.update, existing, currentUser)) {
256380
+ if (!checkRLS(schema11.rls.update, existing, currentUser)) {
256524
256381
  res.status(404).json({
256525
256382
  message: `Entity ${entityName} with ID ${id2} not found`
256526
256383
  });
256527
256384
  return;
256528
256385
  }
256529
256386
  }
256530
- const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema12, currentUser, "write");
256387
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema11, currentUser, "write");
256531
256388
  db2.validate(entityName, filteredBody, true);
256532
256389
  const updateData = {
256533
256390
  ...filteredBody,
@@ -256538,7 +256395,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256538
256395
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256539
256396
  return;
256540
256397
  }
256541
- const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema12, currentUser, "read");
256398
+ const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema11, currentUser, "read");
256542
256399
  emit(appId, entityName, "update", updated);
256543
256400
  res.json(updated);
256544
256401
  } catch (error48) {
@@ -256550,7 +256407,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256550
256407
  res.status(500).json({ error: "Internal server error" });
256551
256408
  }
256552
256409
  }));
256553
- router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
256410
+ router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema11, currentUser) => {
256554
256411
  const { appId, entityName, id: id2 } = req.params;
256555
256412
  try {
256556
256413
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -256558,7 +256415,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256558
256415
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256559
256416
  return;
256560
256417
  }
256561
- if (!checkRLS(schema12.rls?.delete, doc2, currentUser)) {
256418
+ if (!checkRLS(schema11.rls?.delete, doc2, currentUser)) {
256562
256419
  res.status(404).json({
256563
256420
  message: `Entity ${entityName} with ID ${id2} not found`
256564
256421
  });
@@ -256572,11 +256429,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256572
256429
  res.status(500).json({ error: "Internal server error" });
256573
256430
  }
256574
256431
  }));
256575
- router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256432
+ router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256576
256433
  const { entityName } = req.params;
256577
256434
  try {
256578
256435
  const query = req.body || {};
256579
- const rlsDelete = schema12?.rls?.delete;
256436
+ const rlsDelete = schema11?.rls?.delete;
256580
256437
  if (rlsDelete !== undefined && rlsDelete !== true) {
256581
256438
  if (rlsDelete === false && currentUser?.is_service !== true) {
256582
256439
  res.status(403).json({ error: "Permission denied" });
@@ -257525,9 +257382,9 @@ class NodeFsHandler {
257525
257382
  if (this.fsw.closed) {
257526
257383
  return;
257527
257384
  }
257528
- const dirname21 = sp2.dirname(file2);
257385
+ const dirname22 = sp2.dirname(file2);
257529
257386
  const basename7 = sp2.basename(file2);
257530
- const parent = this.fsw._getWatchedDir(dirname21);
257387
+ const parent = this.fsw._getWatchedDir(dirname22);
257531
257388
  let prevStats = stats;
257532
257389
  if (parent.has(basename7))
257533
257390
  return;
@@ -257554,7 +257411,7 @@ class NodeFsHandler {
257554
257411
  prevStats = newStats2;
257555
257412
  }
257556
257413
  } catch (error48) {
257557
- this.fsw._remove(dirname21, basename7);
257414
+ this.fsw._remove(dirname22, basename7);
257558
257415
  }
257559
257416
  } else if (parent.has(basename7)) {
257560
257417
  const at13 = newStats.atimeMs;
@@ -258587,8 +258444,8 @@ async function createDevServer(options8) {
258587
258444
  broadcastEntityEvent(io6, appId, entityName, event);
258588
258445
  };
258589
258446
  const base44ConfigWatcher = new WatchBase44({
258590
- functions: join29(dirname22(project2.configPath), project2.functionsDir),
258591
- entities: join29(dirname22(project2.configPath), project2.entitiesDir)
258447
+ functions: join29(dirname23(project2.configPath), project2.functionsDir),
258448
+ entities: join29(dirname23(project2.configPath), project2.entitiesDir)
258592
258449
  }, devLogger);
258593
258450
  base44ConfigWatcher.on("change", async (name2) => {
258594
258451
  try {
@@ -258965,7 +258822,6 @@ function createProgram(context) {
258965
258822
  program2.addCommand(getWorkspaceCommand());
258966
258823
  program2.addCommand(getEntitiesPushCommand());
258967
258824
  program2.addCommand(getAgentsCommand());
258968
- program2.addCommand(getAgentSkillsCommand());
258969
258825
  program2.addCommand(getConnectorsCommand());
258970
258826
  program2.addCommand(getFunctionsCommand());
258971
258827
  program2.addCommand(getSecretsCommand());
@@ -258984,7 +258840,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
258984
258840
  import { release, type } from "node:os";
258985
258841
 
258986
258842
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
258987
- import { dirname as dirname23, posix, sep } from "path";
258843
+ import { dirname as dirname24, posix, sep } from "path";
258988
258844
  function createModulerModifier() {
258989
258845
  const getModuleFromFileName = createGetModuleFromFilename();
258990
258846
  return async (frames) => {
@@ -258993,7 +258849,7 @@ function createModulerModifier() {
258993
258849
  return frames;
258994
258850
  };
258995
258851
  }
258996
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname23(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
258852
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname24(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
258997
258853
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
258998
258854
  return (filename) => {
258999
258855
  if (!filename)
@@ -263182,7 +263038,7 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
263182
263038
  });
263183
263039
  }
263184
263040
  // src/cli/index.ts
263185
- var __dirname4 = dirname24(fileURLToPath6(import.meta.url));
263041
+ var __dirname4 = dirname25(fileURLToPath6(import.meta.url));
263186
263042
  async function runCLI(options8) {
263187
263043
  ensureNpmAssets(join30(__dirname4, "../assets"));
263188
263044
  const errorReporter = new ErrorReporter;
@@ -263223,4 +263079,4 @@ export {
263223
263079
  CLIExitError
263224
263080
  };
263225
263081
 
263226
- //# debugId=8336FC5974E395C864756E2164756E21
263082
+ //# debugId=81AA053654470EFC64756E2164756E21