@base44-preview/cli 0.1.5-pr.574.218ee97 → 0.1.5-pr.575.c55cbe2

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(schema7, name2, result) {
13721
+ function compileList(schema8, name2, result) {
13722
13722
  var exclude = [];
13723
- schema7.include.forEach(function(includedSchema) {
13723
+ schema8.include.forEach(function(includedSchema) {
13724
13724
  result = compileList(includedSchema, name2, result);
13725
13725
  });
13726
- schema7[name2].forEach(function(currentType) {
13726
+ schema8[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(schema7) {
13784
- return schema7 instanceof Schema;
13783
+ if (!schemas3.every(function(schema8) {
13784
+ return schema8 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(schema7, map2) {
15805
+ function compileStyleMap(schema8, 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 = schema7.compiledTypeMap["fallback"][tag];
15817
+ type = schema8.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 join14(array2, separator) {
20117
+ function join15(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 = join14;
22049
+ lodash.join = join15;
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: schema10, sourceObjects } = ctx;
23004
+ const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema11, 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, schema10.tags);
23018
+ let tagObj = findTagObject(value, tagName, schema11.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 ? schema10[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema10[identity3.SEQ] : schema10[identity3.MAP];
23029
+ tagObj = value instanceof Map ? schema11[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema11[identity3.SEQ] : schema11[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(schema10, path16, value) {
23052
+ function collectionFromPath(schema11, 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: schema10,
23070
+ schema: schema11,
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, schema10) {
23077
+ constructor(type, schema11) {
23078
23078
  super(type);
23079
23079
  Object.defineProperty(this, "schema", {
23080
- value: schema10,
23080
+ value: schema11,
23081
23081
  configurable: true,
23082
23082
  enumerable: false,
23083
23083
  writable: true
23084
23084
  });
23085
23085
  }
23086
- clone(schema10) {
23086
+ clone(schema11) {
23087
23087
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
23088
- if (schema10)
23089
- copy.schema = schema10;
23090
- copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema10) : it3);
23088
+ if (schema11)
23089
+ copy.schema = schema11;
23090
+ copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema11) : 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(schema10) {
24022
+ clone(schema11) {
24023
24023
  let { key, value } = this;
24024
24024
  if (identity3.isNode(key))
24025
- key = key.clone(schema10);
24025
+ key = key.clone(schema11);
24026
24026
  if (identity3.isNode(value))
24027
- value = value.clone(schema10);
24027
+ value = value.clone(schema11);
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(schema10) {
24213
- super(identity3.MAP, schema10);
24212
+ constructor(schema11) {
24213
+ super(identity3.MAP, schema11);
24214
24214
  this.items = [];
24215
24215
  }
24216
- static from(schema10, obj, ctx) {
24216
+ static from(schema11, obj, ctx) {
24217
24217
  const { keepUndefined, replacer } = ctx;
24218
- const map2 = new this(schema10);
24218
+ const map2 = new this(schema11);
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 schema10.sortMapEntries === "function") {
24235
- map2.items.sort(schema10.sortMapEntries);
24234
+ if (typeof schema11.sortMapEntries === "function") {
24235
+ map2.items.sort(schema11.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: (schema10, obj, ctx) => YAMLMap.YAMLMap.from(schema10, obj, ctx)
24328
+ createNode: (schema11, obj, ctx) => YAMLMap.YAMLMap.from(schema11, 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(schema10) {
24347
- super(identity3.SEQ, schema10);
24346
+ constructor(schema11) {
24347
+ super(identity3.SEQ, schema11);
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(schema10, obj, ctx) {
24401
+ static from(schema11, obj, ctx) {
24402
24402
  const { replacer } = ctx;
24403
- const seq = new this(schema10);
24403
+ const seq = new this(schema11);
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: (schema10, obj, ctx) => YAMLSeq.YAMLSeq.from(schema10, obj, ctx)
24440
+ createNode: (schema11, obj, ctx) => YAMLSeq.YAMLSeq.from(schema11, 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 schema10 = [
24615
+ var schema11 = [
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 = schema10;
24628
+ exports.schema = schema11;
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 schema10 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
24692
- exports.schema = schema10;
24691
+ var schema11 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
24692
+ exports.schema = schema11;
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(schema10, iterable, ctx) {
24782
+ function createPairs(schema11, iterable, ctx) {
24783
24783
  const { replacer } = ctx;
24784
- const pairs2 = new YAMLSeq.YAMLSeq(schema10);
24784
+ const pairs2 = new YAMLSeq.YAMLSeq(schema11);
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(schema10, iterable, ctx) {
24864
- const pairs$1 = pairs.createPairs(schema10, iterable, ctx);
24863
+ static from(schema11, iterable, ctx) {
24864
+ const pairs$1 = pairs.createPairs(schema11, 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: (schema10, iterable, ctx) => YAMLOMap.from(schema10, iterable, ctx)
24891
+ createNode: (schema11, iterable, ctx) => YAMLOMap.from(schema11, 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(schema10) {
25056
- super(schema10);
25055
+ constructor(schema11) {
25056
+ super(schema11);
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(schema10, iterable, ctx) {
25096
+ static from(schema11, iterable, ctx) {
25097
25097
  const { replacer } = ctx;
25098
- const set3 = new this(schema10);
25098
+ const set3 = new this(schema11);
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: (schema10, iterable, ctx) => YAMLSet.from(schema10, iterable, ctx),
25115
+ createNode: (schema11, iterable, ctx) => YAMLSet.from(schema11, 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 schema10 = [
25228
+ var schema11 = [
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 = schema10;
25251
+ exports.schema = schema11;
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 schema10 = require_schema2();
25263
+ var schema11 = 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", schema10.schema],
25273
+ ["core", schema11.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: schema10, sortMapEntries, toStringDefaults }) {
25355
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema: schema11, sortMapEntries, toStringDefaults }) {
25356
25356
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
25357
- this.name = typeof schema10 === "string" && schema10 || "core";
25357
+ this.name = typeof schema11 === "string" && schema11 || "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(schema10, value, tagName, tagToken, onError) {
26849
+ function findScalarTagByName(schema11, value, tagName, tagToken, onError) {
26850
26850
  if (tagName === "!")
26851
- return schema10[identity3.SCALAR];
26851
+ return schema11[identity3.SCALAR];
26852
26852
  const matchWithTest = [];
26853
- for (const tag of schema10.tags) {
26853
+ for (const tag of schema11.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 = schema10.knownTags[tagName];
26864
+ const kt3 = schema11.knownTags[tagName];
26865
26865
  if (kt3 && !kt3.collection) {
26866
- schema10.tags.push(Object.assign({}, kt3, { default: false, test: undefined }));
26866
+ schema11.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 schema10[identity3.SCALAR];
26870
+ return schema11[identity3.SCALAR];
26871
26871
  }
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];
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];
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" ? join22(replacement, currentDoc.split(`
31161
+ return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join24(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 join22(separator, docs) {
31241
+ function join24(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: join22,
31952
+ join: join24,
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 schema11 = new SchemaConstructor(parameters);
119564
- const subSchema = Object.create(schema11);
119563
+ const schema12 = new SchemaConstructor(parameters);
119564
+ const subSchema = Object.create(schema12);
119565
119565
  for (const handlerKey of HANDLER_KEYS) {
119566
119566
  if (handlerKey in parameters) {
119567
- subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema11, Schema2.prototype[handlerKey].length);
119567
+ subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema12, 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 config12 = editorconfig_to_prettier_default(editorConfig);
119825
- return config12;
119824
+ const config13 = editorconfig_to_prettier_default(editorConfig);
119825
+ return config13;
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 config12 = await load2(configFile);
121816
- if (!config12) {
121815
+ let config13 = await load2(configFile);
121816
+ if (!config13) {
121817
121817
  return;
121818
121818
  }
121819
- if (typeof config12 === "string") {
121820
- config12 = await load_external_config_default(config12, configFile);
121819
+ if (typeof config13 === "string") {
121820
+ config13 = await load_external_config_default(config13, configFile);
121821
121821
  }
121822
- if (typeof config12 !== "object") {
121823
- throw new TypeError(`Config is only allowed to be an object, but received ${typeof config12} in "${configFile}"`);
121822
+ if (typeof config13 !== "object") {
121823
+ throw new TypeError(`Config is only allowed to be an object, but received ${typeof config13} in "${configFile}"`);
121824
121824
  }
121825
- delete config12.$schema;
121826
- return config12;
121825
+ delete config13.$schema;
121826
+ return config13;
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 config12 = await loadPrettierConfig(configFile, { shouldCache });
121877
- return { config: config12, configFile };
121876
+ const config13 = await loadPrettierConfig(configFile, { shouldCache });
121877
+ return { config: config13, 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: config12, configFile } = configResult || {};
121905
- const { overrides, ...options8 } = config12 || {};
121904
+ const { config: config13, configFile } = configResult || {};
121905
+ const { overrides, ...options8 } = config13 || {};
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, schema11, utils3) => optionInfo.exception(value) || schema11.validate(value, utils3);
122907
+ parameters.validate = (value, schema12, utils3) => optionInfo.exception(value) || schema12.validate(value, utils3);
122908
122908
  } else {
122909
- parameters.validate = (value, schema11, utils3) => value === undefined || schema11.validate(value, utils3);
122909
+ parameters.validate = (value, schema12, utils3) => value === undefined || schema12.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, schema11, utils3) => schema11.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122924
+ parameters.preprocess = (value, schema12, utils3) => schema12.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 config12;
124014
+ let config13;
124015
124015
  if (options8.resolveConfig !== false) {
124016
- config12 = await resolveConfig(file2, {
124016
+ config13 = await resolveConfig(file2, {
124017
124017
  editorconfig: false
124018
124018
  });
124019
124019
  }
124020
- if (config12?.parser) {
124021
- return config12.parser;
124020
+ if (config13?.parser) {
124021
+ return config13.parser;
124022
124022
  }
124023
- let plugins = options8.plugins ?? config12?.plugins ?? [];
124023
+ let plugins = options8.plugins ?? config13?.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 schema11 = this._utils.schemas[key2];
124501
+ const schema12 = this._utils.schemas[key2];
124502
124502
  if (!(key2 in newOptions)) {
124503
- const defaultResult = normalizeDefaultResult(schema11.default(this._utils));
124503
+ const defaultResult = normalizeDefaultResult(schema12.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 schema11 = this._utils.schemas[key2];
124514
+ const schema12 = this._utils.schemas[key2];
124515
124515
  const value = newOptions[key2];
124516
- const newValue = schema11.postprocess(value, this._utils);
124516
+ const newValue = schema12.postprocess(value, this._utils);
124517
124517
  if (newValue === VALUE_UNCHANGED) {
124518
124518
  continue;
124519
124519
  }
124520
- this._applyValidation(newValue, key2, schema11);
124520
+ this._applyValidation(newValue, key2, schema12);
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 schema11 = this._utils.schemas[key2];
124532
- const value = schema11.preprocess(options8[key2], this._utils);
124533
- this._applyValidation(value, key2, schema11);
124531
+ const schema12 = this._utils.schemas[key2];
124532
+ const value = schema12.preprocess(options8[key2], this._utils);
124533
+ this._applyValidation(value, key2, schema12);
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(schema11.deprecated(currentValue, this._utils), value, true);
124538
+ const deprecatedResult = normalizeDeprecatedResult(schema12.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(schema11.forward(value, this._utils), value);
124556
+ const forwardResult = normalizeForwardResult(schema12.forward(value, this._utils), value);
124557
124557
  forwardResult.forEach(appendTransferredOptions);
124558
- const redirectResult = normalizeRedirectResult(schema11.redirect(value, this._utils), value);
124558
+ const redirectResult = normalizeRedirectResult(schema12.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 ? schema11.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124562
+ newOptions[key2] = key2 in newOptions ? schema12.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, schema11) {
124591
- const validateResult = normalizeValidateResult(schema11.validate(value, this._utils), value);
124590
+ _applyValidation(value, key2, schema12) {
124591
+ const validateResult = normalizeValidateResult(schema12.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 schema11 = this._utils.schemas[knownResultKey];
124634
- this._applyValidation(knownResultValue, knownResultKey, schema11);
124633
+ const schema12 = this._utils.schemas[knownResultKey];
124634
+ this._applyValidation(knownResultValue, knownResultKey, schema12);
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" ? join24(replacement, currentDoc.split(`
136866
+ return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join26(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 join24(separator, docs) {
136952
+ function join26(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: join24,
137617
+ join: join26,
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)((schema11) => {
138348
- const parent = schema11[exports.Parent];
138347
+ exports.getRootSchema = (0, lodash_1.memoize)((schema12) => {
138348
+ const parent = schema12[exports.Parent];
138349
138349
  if (!parent) {
138350
- return schema11;
138350
+ return schema12;
138351
138351
  }
138352
138352
  return (0, exports.getRootSchema)(parent);
138353
138353
  });
138354
- function isBoolean(schema11) {
138355
- return schema11 === true || schema11 === false;
138354
+ function isBoolean(schema12) {
138355
+ return schema12 === true || schema12 === false;
138356
138356
  }
138357
138357
  exports.isBoolean = isBoolean;
138358
- function isPrimitive(schema11) {
138359
- return !(0, lodash_1.isPlainObject)(schema11);
138358
+ function isPrimitive(schema12) {
138359
+ return !(0, lodash_1.isPlainObject)(schema12);
138360
138360
  }
138361
138361
  exports.isPrimitive = isPrimitive;
138362
- function isCompound(schema11) {
138363
- return Array.isArray(schema11.type) || "anyOf" in schema11 || "oneOf" in schema11;
138362
+ function isCompound(schema12) {
138363
+ return Array.isArray(schema12.type) || "anyOf" in schema12 || "oneOf" in schema12;
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(schema11, name2) {
138590
+ function compileList(schema12, name2) {
138591
138591
  var result = [];
138592
- schema11[name2].forEach(function(currentType) {
138592
+ schema12[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(schema11, map2) {
140537
+ function compileStyleMap(schema12, 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 = schema11.compiledTypeMap["fallback"][tag];
140549
+ type = schema12.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(schema11, callback, processed) {
141209
- if (typeof schema11 !== "object" || !schema11) {
141208
+ function traverseIntersection(schema12, callback, processed) {
141209
+ if (typeof schema12 !== "object" || !schema12) {
141210
141210
  return;
141211
141211
  }
141212
- const r5 = schema11;
141212
+ const r5 = schema12;
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(schema11, callback, processed = new Set, key2) {
141222
- if (processed.has(schema11)) {
141221
+ function traverse(schema12, callback, processed = new Set, key2) {
141222
+ if (processed.has(schema12)) {
141223
141223
  return;
141224
141224
  }
141225
- processed.add(schema11);
141226
- callback(schema11, key2 !== null && key2 !== undefined ? key2 : null);
141227
- if (schema11.anyOf) {
141228
- traverseArray(schema11.anyOf, callback, processed);
141225
+ processed.add(schema12);
141226
+ callback(schema12, key2 !== null && key2 !== undefined ? key2 : null);
141227
+ if (schema12.anyOf) {
141228
+ traverseArray(schema12.anyOf, callback, processed);
141229
141229
  }
141230
- if (schema11.allOf) {
141231
- traverseArray(schema11.allOf, callback, processed);
141230
+ if (schema12.allOf) {
141231
+ traverseArray(schema12.allOf, callback, processed);
141232
141232
  }
141233
- if (schema11.oneOf) {
141234
- traverseArray(schema11.oneOf, callback, processed);
141233
+ if (schema12.oneOf) {
141234
+ traverseArray(schema12.oneOf, callback, processed);
141235
141235
  }
141236
- if (schema11.properties) {
141237
- traverseObjectKeys(schema11.properties, callback, processed);
141236
+ if (schema12.properties) {
141237
+ traverseObjectKeys(schema12.properties, callback, processed);
141238
141238
  }
141239
- if (schema11.patternProperties) {
141240
- traverseObjectKeys(schema11.patternProperties, callback, processed);
141239
+ if (schema12.patternProperties) {
141240
+ traverseObjectKeys(schema12.patternProperties, callback, processed);
141241
141241
  }
141242
- if (schema11.additionalProperties && typeof schema11.additionalProperties === "object") {
141243
- traverse(schema11.additionalProperties, callback, processed);
141242
+ if (schema12.additionalProperties && typeof schema12.additionalProperties === "object") {
141243
+ traverse(schema12.additionalProperties, callback, processed);
141244
141244
  }
141245
- if (schema11.items) {
141246
- const { items } = schema11;
141245
+ if (schema12.items) {
141246
+ const { items } = schema12;
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 (schema11.additionalItems && typeof schema11.additionalItems === "object") {
141254
- traverse(schema11.additionalItems, callback, processed);
141253
+ if (schema12.additionalItems && typeof schema12.additionalItems === "object") {
141254
+ traverse(schema12.additionalItems, callback, processed);
141255
141255
  }
141256
- if (schema11.dependencies) {
141257
- if (Array.isArray(schema11.dependencies)) {
141258
- traverseArray(schema11.dependencies, callback, processed);
141256
+ if (schema12.dependencies) {
141257
+ if (Array.isArray(schema12.dependencies)) {
141258
+ traverseArray(schema12.dependencies, callback, processed);
141259
141259
  } else {
141260
- traverseObjectKeys(schema11.dependencies, callback, processed);
141260
+ traverseObjectKeys(schema12.dependencies, callback, processed);
141261
141261
  }
141262
141262
  }
141263
- if (schema11.definitions) {
141264
- traverseObjectKeys(schema11.definitions, callback, processed);
141263
+ if (schema12.definitions) {
141264
+ traverseObjectKeys(schema12.definitions, callback, processed);
141265
141265
  }
141266
- if (schema11.$defs) {
141267
- traverseObjectKeys(schema11.$defs, callback, processed);
141266
+ if (schema12.$defs) {
141267
+ traverseObjectKeys(schema12.$defs, callback, processed);
141268
141268
  }
141269
- if (schema11.not) {
141270
- traverse(schema11.not, callback, processed);
141269
+ if (schema12.not) {
141270
+ traverse(schema12.not, callback, processed);
141271
141271
  }
141272
- traverseIntersection(schema11, callback, processed);
141273
- Object.keys(schema11).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141274
- const child = schema11[key3];
141272
+ traverseIntersection(schema12, callback, processed);
141273
+ Object.keys(schema12).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141274
+ const child = schema12[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(schema11) {
141356
+ function escapeBlockComment(schema12) {
141357
141357
  const replacer = "* /";
141358
- if (schema11 === null || typeof schema11 !== "object") {
141358
+ if (schema12 === null || typeof schema12 !== "object") {
141359
141359
  return;
141360
141360
  }
141361
- for (const key2 of Object.keys(schema11)) {
141362
- if (key2 === "description" && typeof schema11[key2] === "string") {
141363
- schema11[key2] = schema11[key2].replace(/\*\//g, replacer);
141361
+ for (const key2 of Object.keys(schema12)) {
141362
+ if (key2 === "description" && typeof schema12[key2] === "string") {
141363
+ schema12[key2] = schema12[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(schema11) {
141376
- if (!("default" in schema11)) {
141377
- return schema11;
141375
+ function maybeStripDefault(schema12) {
141376
+ if (!("default" in schema12)) {
141377
+ return schema12;
141378
141378
  }
141379
- switch (schema11.type) {
141379
+ switch (schema12.type) {
141380
141380
  case "array":
141381
- if (Array.isArray(schema11.default)) {
141382
- return schema11;
141381
+ if (Array.isArray(schema12.default)) {
141382
+ return schema12;
141383
141383
  }
141384
141384
  break;
141385
141385
  case "boolean":
141386
- if (typeof schema11.default === "boolean") {
141387
- return schema11;
141386
+ if (typeof schema12.default === "boolean") {
141387
+ return schema12;
141388
141388
  }
141389
141389
  break;
141390
141390
  case "integer":
141391
141391
  case "number":
141392
- if (typeof schema11.default === "number") {
141393
- return schema11;
141392
+ if (typeof schema12.default === "number") {
141393
+ return schema12;
141394
141394
  }
141395
141395
  break;
141396
141396
  case "string":
141397
- if (typeof schema11.default === "string") {
141398
- return schema11;
141397
+ if (typeof schema12.default === "string") {
141398
+ return schema12;
141399
141399
  }
141400
141400
  break;
141401
141401
  case "null":
141402
- if (schema11.default === null) {
141403
- return schema11;
141402
+ if (schema12.default === null) {
141403
+ return schema12;
141404
141404
  }
141405
141405
  break;
141406
141406
  case "object":
141407
- if ((0, lodash_1.isPlainObject)(schema11.default)) {
141408
- return schema11;
141407
+ if ((0, lodash_1.isPlainObject)(schema12.default)) {
141408
+ return schema12;
141409
141409
  }
141410
141410
  break;
141411
141411
  }
141412
- delete schema11.default;
141413
- return schema11;
141412
+ delete schema12.default;
141413
+ return schema12;
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(schema11) {
141428
- if (!(0, lodash_1.isPlainObject)(schema11)) {
141427
+ function isSchemaLike(schema12) {
141428
+ if (!(0, lodash_1.isPlainObject)(schema12)) {
141429
141429
  return false;
141430
141430
  }
141431
- const parent = schema11[JSONSchema_1.Parent];
141431
+ const parent = schema12[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] === schema11)) {
141448
+ if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema12)) {
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(schema11) {
141747
- if (schema11.tsType) {
141746
+ function typesOfSchema(schema12) {
141747
+ if (schema12.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(schema11)) {
141752
+ if (f7(schema12)) {
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(schema11) {
141764
- return "allOf" in schema11;
141763
+ ALL_OF(schema12) {
141764
+ return "allOf" in schema12;
141765
141765
  },
141766
- ANY(schema11) {
141767
- if (Object.keys(schema11).length === 0) {
141766
+ ANY(schema12) {
141767
+ if (Object.keys(schema12).length === 0) {
141768
141768
  return true;
141769
141769
  }
141770
- return schema11.type === "any";
141770
+ return schema12.type === "any";
141771
141771
  },
141772
- ANY_OF(schema11) {
141773
- return "anyOf" in schema11;
141772
+ ANY_OF(schema12) {
141773
+ return "anyOf" in schema12;
141774
141774
  },
141775
- BOOLEAN(schema11) {
141776
- if ("enum" in schema11) {
141775
+ BOOLEAN(schema12) {
141776
+ if ("enum" in schema12) {
141777
141777
  return false;
141778
141778
  }
141779
- if (schema11.type === "boolean") {
141779
+ if (schema12.type === "boolean") {
141780
141780
  return true;
141781
141781
  }
141782
- if (!(0, JSONSchema_1.isCompound)(schema11) && typeof schema11.default === "boolean") {
141782
+ if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.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(schema11) {
141791
- return "enum" in schema11 && "tsEnumNames" in schema11;
141790
+ NAMED_ENUM(schema12) {
141791
+ return "enum" in schema12 && "tsEnumNames" in schema12;
141792
141792
  },
141793
- NAMED_SCHEMA(schema11) {
141794
- return "$id" in schema11 && (("patternProperties" in schema11) || ("properties" in schema11));
141793
+ NAMED_SCHEMA(schema12) {
141794
+ return "$id" in schema12 && (("patternProperties" in schema12) || ("properties" in schema12));
141795
141795
  },
141796
- NEVER(schema11) {
141797
- return schema11 === false;
141796
+ NEVER(schema12) {
141797
+ return schema12 === false;
141798
141798
  },
141799
- NULL(schema11) {
141800
- return schema11.type === "null";
141799
+ NULL(schema12) {
141800
+ return schema12.type === "null";
141801
141801
  },
141802
- NUMBER(schema11) {
141803
- if ("enum" in schema11) {
141802
+ NUMBER(schema12) {
141803
+ if ("enum" in schema12) {
141804
141804
  return false;
141805
141805
  }
141806
- if (schema11.type === "integer" || schema11.type === "number") {
141806
+ if (schema12.type === "integer" || schema12.type === "number") {
141807
141807
  return true;
141808
141808
  }
141809
- if (!(0, JSONSchema_1.isCompound)(schema11) && typeof schema11.default === "number") {
141809
+ if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "number") {
141810
141810
  return true;
141811
141811
  }
141812
141812
  return false;
141813
141813
  },
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;
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;
141816
141816
  },
141817
- ONE_OF(schema11) {
141818
- return "oneOf" in schema11;
141817
+ ONE_OF(schema12) {
141818
+ return "oneOf" in schema12;
141819
141819
  },
141820
- REFERENCE(schema11) {
141821
- return "$ref" in schema11;
141820
+ REFERENCE(schema12) {
141821
+ return "$ref" in schema12;
141822
141822
  },
141823
- STRING(schema11) {
141824
- if ("enum" in schema11) {
141823
+ STRING(schema12) {
141824
+ if ("enum" in schema12) {
141825
141825
  return false;
141826
141826
  }
141827
- if (schema11.type === "string") {
141827
+ if (schema12.type === "string") {
141828
141828
  return true;
141829
141829
  }
141830
- if (!(0, JSONSchema_1.isCompound)(schema11) && typeof schema11.default === "string") {
141830
+ if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "string") {
141831
141831
  return true;
141832
141832
  }
141833
141833
  return false;
141834
141834
  },
141835
- TYPED_ARRAY(schema11) {
141836
- if (schema11.type && schema11.type !== "array") {
141835
+ TYPED_ARRAY(schema12) {
141836
+ if (schema12.type && schema12.type !== "array") {
141837
141837
  return false;
141838
141838
  }
141839
- return "items" in schema11;
141839
+ return "items" in schema12;
141840
141840
  },
141841
- UNION(schema11) {
141842
- return Array.isArray(schema11.type);
141841
+ UNION(schema12) {
141842
+ return Array.isArray(schema12.type);
141843
141843
  },
141844
- UNNAMED_ENUM(schema11) {
141845
- if ("tsEnumNames" in schema11) {
141844
+ UNNAMED_ENUM(schema12) {
141845
+ if ("tsEnumNames" in schema12) {
141846
141846
  return false;
141847
141847
  }
141848
- if (schema11.type && schema11.type !== "boolean" && schema11.type !== "integer" && schema11.type !== "number" && schema11.type !== "string") {
141848
+ if (schema12.type && schema12.type !== "boolean" && schema12.type !== "integer" && schema12.type !== "number" && schema12.type !== "string") {
141849
141849
  return false;
141850
141850
  }
141851
- return "enum" in schema11;
141851
+ return "enum" in schema12;
141852
141852
  },
141853
141853
  UNNAMED_SCHEMA() {
141854
141854
  return false;
141855
141855
  },
141856
- UNTYPED_ARRAY(schema11) {
141857
- return schema11.type === "array" && !("items" in schema11);
141856
+ UNTYPED_ARRAY(schema12) {
141857
+ return schema12.type === "array" && !("items" in schema12);
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(schema11) {
141868
+ function applySchemaTyping(schema12) {
141869
141869
  var _a7;
141870
- const types = (0, typesOfSchema_1.typesOfSchema)(schema11);
141871
- Object.defineProperty(schema11, JSONSchema_1.Types, {
141870
+ const types = (0, typesOfSchema_1.typesOfSchema)(schema12);
141871
+ Object.defineProperty(schema12, 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]: schema11,
141880
+ [JSONSchema_1.Parent]: schema12,
141881
141881
  [JSONSchema_1.Types]: new Set(["ALL_OF"]),
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 : [],
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 : [],
141887
141887
  required: [],
141888
141888
  additionalProperties: false
141889
141889
  };
141890
141890
  types.delete("ALL_OF");
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, {
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, {
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(schema11, type) {
141915
- return schema11.type === type || Array.isArray(schema11.type) && schema11.type.includes(type);
141914
+ function hasType(schema12, type) {
141915
+ return schema12.type === type || Array.isArray(schema12.type) && schema12.type.includes(type);
141916
141916
  }
141917
- function isObjectType(schema11) {
141918
- return schema11.properties !== undefined || hasType(schema11, "object") || hasType(schema11, "any");
141917
+ function isObjectType(schema12) {
141918
+ return schema12.properties !== undefined || hasType(schema12, "object") || hasType(schema12, "any");
141919
141919
  }
141920
- function isArrayType(schema11) {
141921
- return schema11.items !== undefined || hasType(schema11, "array") || hasType(schema11, "any");
141920
+ function isArrayType(schema12) {
141921
+ return schema12.items !== undefined || hasType(schema12, "array") || hasType(schema12, "any");
141922
141922
  }
141923
- function isEnumTypeWithoutTsEnumNames(schema11) {
141924
- return schema11.type === "string" && schema11.enum !== undefined && schema11.tsEnumNames === undefined;
141923
+ function isEnumTypeWithoutTsEnumNames(schema12) {
141924
+ return schema12.type === "string" && schema12.enum !== undefined && schema12.tsEnumNames === undefined;
141925
141925
  }
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");
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");
141929
141929
  }
141930
141930
  });
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];
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];
141934
141934
  }
141935
141935
  });
141936
- rules.set("Add empty `required` property if none is defined", (schema11) => {
141937
- if (isObjectType(schema11) && !("required" in schema11)) {
141938
- schema11.required = [];
141936
+ rules.set("Add empty `required` property if none is defined", (schema12) => {
141937
+ if (isObjectType(schema12) && !("required" in schema12)) {
141938
+ schema12.required = [];
141939
141939
  }
141940
141940
  });
141941
- rules.set("Transform `required`=false to `required`=[]", (schema11) => {
141942
- if (schema11.required === false) {
141943
- schema11.required = [];
141941
+ rules.set("Transform `required`=false to `required`=[]", (schema12) => {
141942
+ if (schema12.required === false) {
141943
+ schema12.required = [];
141944
141944
  }
141945
141945
  });
141946
- rules.set("Default additionalProperties", (schema11, _10, options8) => {
141947
- if (isObjectType(schema11) && !("additionalProperties" in schema11) && schema11.patternProperties === undefined) {
141948
- schema11.additionalProperties = options8.additionalProperties;
141946
+ rules.set("Default additionalProperties", (schema12, _10, options8) => {
141947
+ if (isObjectType(schema12) && !("additionalProperties" in schema12) && schema12.patternProperties === undefined) {
141948
+ schema12.additionalProperties = options8.additionalProperties;
141949
141949
  }
141950
141950
  });
141951
- rules.set("Transform id to $id", (schema11, fileName) => {
141952
- if (!(0, utils_1.isSchemaLike)(schema11)) {
141951
+ rules.set("Transform id to $id", (schema12, fileName) => {
141952
+ if (!(0, utils_1.isSchemaLike)(schema12)) {
141953
141953
  return;
141954
141954
  }
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}`);
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}`);
141957
141957
  }
141958
- if (schema11.id) {
141959
- schema11.$id = schema11.id;
141960
- delete schema11.id;
141958
+ if (schema12.id) {
141959
+ schema12.$id = schema12.id;
141960
+ delete schema12.id;
141961
141961
  }
141962
141962
  });
141963
- rules.set("Add an $id to anything that needs it", (schema11, fileName, _options, _key, dereferencedPaths) => {
141964
- if (!(0, utils_1.isSchemaLike)(schema11)) {
141963
+ rules.set("Add an $id to anything that needs it", (schema12, fileName, _options, _key, dereferencedPaths) => {
141964
+ if (!(0, utils_1.isSchemaLike)(schema12)) {
141965
141965
  return;
141966
141966
  }
141967
- if (!schema11.$id && !schema11[JSONSchema_1.Parent]) {
141968
- schema11.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141967
+ if (!schema12.$id && !schema12[JSONSchema_1.Parent]) {
141968
+ schema12.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141969
141969
  return;
141970
141970
  }
141971
- if (!isArrayType(schema11) && !isObjectType(schema11)) {
141971
+ if (!isArrayType(schema12) && !isObjectType(schema12)) {
141972
141972
  return;
141973
141973
  }
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));
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));
141977
141977
  }
141978
141978
  if (dereferencedName) {
141979
- dereferencedPaths.delete(schema11);
141979
+ dereferencedPaths.delete(schema12);
141980
141980
  }
141981
141981
  });
141982
- rules.set("Escape closing JSDoc comment", (schema11) => {
141983
- (0, utils_1.escapeBlockComment)(schema11);
141982
+ rules.set("Escape closing JSDoc comment", (schema12) => {
141983
+ (0, utils_1.escapeBlockComment)(schema12);
141984
141984
  });
141985
- rules.set("Add JSDoc comments for minItems and maxItems", (schema11) => {
141986
- if (!isArrayType(schema11)) {
141985
+ rules.set("Add JSDoc comments for minItems and maxItems", (schema12) => {
141986
+ if (!isArrayType(schema12)) {
141987
141987
  return;
141988
141988
  }
141989
141989
  const commentsToAppend = [
141990
- "minItems" in schema11 ? `@minItems ${schema11.minItems}` : "",
141991
- "maxItems" in schema11 ? `@maxItems ${schema11.maxItems}` : ""
141990
+ "minItems" in schema12 ? `@minItems ${schema12.minItems}` : "",
141991
+ "maxItems" in schema12 ? `@maxItems ${schema12.maxItems}` : ""
141992
141992
  ].filter(Boolean);
141993
141993
  if (commentsToAppend.length) {
141994
- schema11.description = (0, utils_1.appendToDescription)(schema11.description, ...commentsToAppend);
141994
+ schema12.description = (0, utils_1.appendToDescription)(schema12.description, ...commentsToAppend);
141995
141995
  }
141996
141996
  });
141997
- rules.set("Optionally remove maxItems and minItems", (schema11, _fileName, options8) => {
141998
- if (!isArrayType(schema11)) {
141997
+ rules.set("Optionally remove maxItems and minItems", (schema12, _fileName, options8) => {
141998
+ if (!isArrayType(schema12)) {
141999
141999
  return;
142000
142000
  }
142001
- if ("minItems" in schema11 && options8.ignoreMinAndMaxItems) {
142002
- delete schema11.minItems;
142001
+ if ("minItems" in schema12 && options8.ignoreMinAndMaxItems) {
142002
+ delete schema12.minItems;
142003
142003
  }
142004
- if ("maxItems" in schema11 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142005
- delete schema11.maxItems;
142004
+ if ("maxItems" in schema12 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142005
+ delete schema12.maxItems;
142006
142006
  }
142007
142007
  });
142008
- rules.set("Normalize schema.minItems", (schema11, _fileName, options8) => {
142008
+ rules.set("Normalize schema.minItems", (schema12, _fileName, options8) => {
142009
142009
  if (options8.ignoreMinAndMaxItems) {
142010
142010
  return;
142011
142011
  }
142012
- if (!isArrayType(schema11)) {
142012
+ if (!isArrayType(schema12)) {
142013
142013
  return;
142014
142014
  }
142015
- const { minItems } = schema11;
142016
- schema11.minItems = typeof minItems === "number" ? minItems : 0;
142015
+ const { minItems } = schema12;
142016
+ schema12.minItems = typeof minItems === "number" ? minItems : 0;
142017
142017
  });
142018
- rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema11, _fileName, options8) => {
142018
+ rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema12, _fileName, options8) => {
142019
142019
  if (options8.ignoreMinAndMaxItems || options8.maxItems === -1) {
142020
142020
  return;
142021
142021
  }
142022
- if (!isArrayType(schema11)) {
142022
+ if (!isArrayType(schema12)) {
142023
142023
  return;
142024
142024
  }
142025
- const { maxItems, minItems } = schema11;
142025
+ const { maxItems, minItems } = schema12;
142026
142026
  if (maxItems !== undefined && maxItems - minItems > options8.maxItems) {
142027
- delete schema11.maxItems;
142027
+ delete schema12.maxItems;
142028
142028
  }
142029
142029
  });
142030
- rules.set("Normalize schema.items", (schema11, _fileName, options8) => {
142030
+ rules.set("Normalize schema.items", (schema12, _fileName, options8) => {
142031
142031
  if (options8.ignoreMinAndMaxItems) {
142032
142032
  return;
142033
142033
  }
142034
- const { maxItems, minItems } = schema11;
142034
+ const { maxItems, minItems } = schema12;
142035
142035
  const hasMaxItems = typeof maxItems === "number" && maxItems >= 0;
142036
142036
  const hasMinItems = typeof minItems === "number" && minItems > 0;
142037
- if (schema11.items && !Array.isArray(schema11.items) && (hasMaxItems || hasMinItems)) {
142038
- const items = schema11.items;
142037
+ if (schema12.items && !Array.isArray(schema12.items) && (hasMaxItems || hasMinItems)) {
142038
+ const items = schema12.items;
142039
142039
  const newItems = Array(maxItems || minItems || 0).fill(items);
142040
142040
  if (!hasMaxItems) {
142041
- schema11.additionalItems = items;
142041
+ schema12.additionalItems = items;
142042
142042
  }
142043
- schema11.items = newItems;
142043
+ schema12.items = newItems;
142044
142044
  }
142045
- if (Array.isArray(schema11.items) && hasMaxItems && maxItems < schema11.items.length) {
142046
- schema11.items = schema11.items.slice(0, maxItems);
142045
+ if (Array.isArray(schema12.items) && hasMaxItems && maxItems < schema12.items.length) {
142046
+ schema12.items = schema12.items.slice(0, maxItems);
142047
142047
  }
142048
- return schema11;
142048
+ return schema12;
142049
142049
  });
142050
- rules.set("Remove extends, if it is empty", (schema11) => {
142051
- if (!schema11.hasOwnProperty("extends")) {
142050
+ rules.set("Remove extends, if it is empty", (schema12) => {
142051
+ if (!schema12.hasOwnProperty("extends")) {
142052
142052
  return;
142053
142053
  }
142054
- if (schema11.extends == null || Array.isArray(schema11.extends) && schema11.extends.length === 0) {
142055
- delete schema11.extends;
142054
+ if (schema12.extends == null || Array.isArray(schema12.extends) && schema12.extends.length === 0) {
142055
+ delete schema12.extends;
142056
142056
  }
142057
142057
  });
142058
- rules.set("Make extends always an array, if it is defined", (schema11) => {
142059
- if (schema11.extends == null) {
142058
+ rules.set("Make extends always an array, if it is defined", (schema12) => {
142059
+ if (schema12.extends == null) {
142060
142060
  return;
142061
142061
  }
142062
- if (!Array.isArray(schema11.extends)) {
142063
- schema11.extends = [schema11.extends];
142062
+ if (!Array.isArray(schema12.extends)) {
142063
+ schema12.extends = [schema12.extends];
142064
142064
  }
142065
142065
  });
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}`);
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}`);
142069
142069
  }
142070
- if (schema11.definitions) {
142071
- schema11.$defs = schema11.definitions;
142072
- delete schema11.definitions;
142070
+ if (schema12.definitions) {
142071
+ schema12.$defs = schema12.definitions;
142072
+ delete schema12.definitions;
142073
142073
  }
142074
142074
  });
142075
- rules.set("Transform const to singleton enum", (schema11) => {
142076
- if (schema11.const !== undefined) {
142077
- schema11.enum = [schema11.const];
142078
- delete schema11.const;
142075
+ rules.set("Transform const to singleton enum", (schema12) => {
142076
+ if (schema12.const !== undefined) {
142077
+ schema12.enum = [schema12.const];
142078
+ delete schema12.const;
142079
142079
  }
142080
142080
  });
142081
- rules.set("Add tsEnumNames to enum types", (schema11, _10, options8) => {
142081
+ rules.set("Add tsEnumNames to enum types", (schema12, _10, options8) => {
142082
142082
  var _a7;
142083
- if (isEnumTypeWithoutTsEnumNames(schema11) && options8.inferStringEnumKeysFromValues) {
142084
- schema11.tsEnumNames = (_a7 = schema11.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142083
+ if (isEnumTypeWithoutTsEnumNames(schema12) && options8.inferStringEnumKeysFromValues) {
142084
+ schema12.tsEnumNames = (_a7 = schema12.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142085
142085
  }
142086
142086
  });
142087
- rules.set("Pre-calculate schema types and intersections", (schema11) => {
142088
- if (schema11 !== null && typeof schema11 === "object") {
142089
- (0, applySchemaTyping_1.applySchemaTyping)(schema11);
142087
+ rules.set("Pre-calculate schema types and intersections", (schema12) => {
142088
+ if (schema12 !== null && typeof schema12 === "object") {
142089
+ (0, applySchemaTyping_1.applySchemaTyping)(schema12);
142090
142090
  }
142091
142091
  });
142092
142092
  function normalize2(rootSchema, dereferencedPaths, filename, options8) {
142093
- rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema11, key2) => rule(schema11, filename, options8, key2, dereferencedPaths)));
142093
+ rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema12, key2) => rule(schema12, 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(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);
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);
142179
142179
  }
142180
- return parseLiteral(schema11, keyName);
142180
+ return parseLiteral(schema12, keyName);
142181
142181
  }
142182
- const intersection2 = schema11[JSONSchema_1.Intersection];
142183
- const types = schema11[JSONSchema_1.Types];
142182
+ const intersection2 = schema12[JSONSchema_1.Intersection];
142183
+ const types = schema12[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(schema11, type, options8, keyName, processed, usedNames));
142187
+ ast.params.push(parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames));
142188
142188
  });
142189
- (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema11, "Output:", ast);
142189
+ (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema12, "Output:", ast);
142190
142190
  return ast;
142191
142191
  }
142192
142192
  if (types.size === 1) {
142193
142193
  const type = [...types][0];
142194
- const ast = parseAsTypeWithCache(schema11, type, options8, keyName, processed, usedNames);
142195
- (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema11, "Output:", ast);
142194
+ const ast = parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames);
142195
+ (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema12, "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(schema11, type, options8, keyName, processed = new Map, usedNames = new Set) {
142202
- let cachedTypeMap = processed.get(schema11);
142201
+ function parseAsTypeWithCache(schema12, type, options8, keyName, processed = new Map, usedNames = new Set) {
142202
+ let cachedTypeMap = processed.get(schema12);
142203
142203
  if (!cachedTypeMap) {
142204
142204
  cachedTypeMap = new Map;
142205
- processed.set(schema11, cachedTypeMap);
142205
+ processed.set(schema12, 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(schema11, type, options8, keyName, processed, usedNames));
142213
+ return Object.assign(ast, parseNonLiteral(schema12, type, options8, keyName, processed, usedNames));
142214
142214
  }
142215
- function parseBooleanSchema(schema11, keyName, options8) {
142216
- if (schema11) {
142215
+ function parseBooleanSchema(schema12, keyName, options8) {
142216
+ if (schema12) {
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(schema11, keyName) {
142227
+ function parseLiteral(schema12, keyName) {
142228
142228
  return {
142229
142229
  keyName,
142230
- params: schema11,
142230
+ params: schema12,
142231
142231
  type: "LITERAL"
142232
142232
  };
142233
142233
  }
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);
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);
142237
142237
  switch (type) {
142238
142238
  case "ALL_OF":
142239
142239
  return {
142240
- comment: schema11.description,
142241
- deprecated: schema11.deprecated,
142240
+ comment: schema12.description,
142241
+ deprecated: schema12.deprecated,
142242
142242
  keyName,
142243
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142244
- params: schema11.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142243
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142244
+ params: schema12.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: schema11.description, deprecated: schema11.deprecated, keyName, standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8) });
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) });
142249
142249
  case "ANY_OF":
142250
142250
  return {
142251
- comment: schema11.description,
142252
- deprecated: schema11.deprecated,
142251
+ comment: schema12.description,
142252
+ deprecated: schema12.deprecated,
142253
142253
  keyName,
142254
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142255
- params: schema11.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142254
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142255
+ params: schema12.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142256
142256
  type: "UNION"
142257
142257
  };
142258
142258
  case "BOOLEAN":
142259
142259
  return {
142260
- comment: schema11.description,
142261
- deprecated: schema11.deprecated,
142260
+ comment: schema12.description,
142261
+ deprecated: schema12.deprecated,
142262
142262
  keyName,
142263
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142263
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142264
142264
  type: "BOOLEAN"
142265
142265
  };
142266
142266
  case "CUSTOM_TYPE":
142267
142267
  return {
142268
- comment: schema11.description,
142269
- deprecated: schema11.deprecated,
142268
+ comment: schema12.description,
142269
+ deprecated: schema12.deprecated,
142270
142270
  keyName,
142271
- params: schema11.tsType,
142272
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142271
+ params: schema12.tsType,
142272
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142273
142273
  type: "CUSTOM_TYPE"
142274
142274
  };
142275
142275
  case "NAMED_ENUM":
142276
142276
  return {
142277
- comment: schema11.description,
142278
- deprecated: schema11.deprecated,
142277
+ comment: schema12.description,
142278
+ deprecated: schema12.deprecated,
142279
142279
  keyName,
142280
- standaloneName: standaloneName(schema11, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142281
- params: schema11.enum.map((_10, n5) => ({
142280
+ standaloneName: standaloneName(schema12, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142281
+ params: schema12.enum.map((_10, n5) => ({
142282
142282
  ast: parseLiteral(_10, undefined),
142283
- keyName: schema11.tsEnumNames[n5]
142283
+ keyName: schema12.tsEnumNames[n5]
142284
142284
  })),
142285
142285
  type: "ENUM"
142286
142286
  };
142287
142287
  case "NAMED_SCHEMA":
142288
- return newInterface(schema11, options8, processed, usedNames, keyName);
142288
+ return newInterface(schema12, options8, processed, usedNames, keyName);
142289
142289
  case "NEVER":
142290
142290
  return {
142291
- comment: schema11.description,
142292
- deprecated: schema11.deprecated,
142291
+ comment: schema12.description,
142292
+ deprecated: schema12.deprecated,
142293
142293
  keyName,
142294
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142294
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142295
142295
  type: "NEVER"
142296
142296
  };
142297
142297
  case "NULL":
142298
142298
  return {
142299
- comment: schema11.description,
142300
- deprecated: schema11.deprecated,
142299
+ comment: schema12.description,
142300
+ deprecated: schema12.deprecated,
142301
142301
  keyName,
142302
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142302
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142303
142303
  type: "NULL"
142304
142304
  };
142305
142305
  case "NUMBER":
142306
142306
  return {
142307
- comment: schema11.description,
142308
- deprecated: schema11.deprecated,
142307
+ comment: schema12.description,
142308
+ deprecated: schema12.deprecated,
142309
142309
  keyName,
142310
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142310
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142311
142311
  type: "NUMBER"
142312
142312
  };
142313
142313
  case "OBJECT":
142314
142314
  return {
142315
- comment: schema11.description,
142315
+ comment: schema12.description,
142316
142316
  keyName,
142317
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142317
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142318
142318
  type: "OBJECT",
142319
- deprecated: schema11.deprecated
142319
+ deprecated: schema12.deprecated
142320
142320
  };
142321
142321
  case "ONE_OF":
142322
142322
  return {
142323
- comment: schema11.description,
142324
- deprecated: schema11.deprecated,
142323
+ comment: schema12.description,
142324
+ deprecated: schema12.deprecated,
142325
142325
  keyName,
142326
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142327
- params: schema11.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142326
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142327
+ params: schema12.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!", schema11));
142331
+ throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema12));
142332
142332
  case "STRING":
142333
142333
  return {
142334
- comment: schema11.description,
142335
- deprecated: schema11.deprecated,
142334
+ comment: schema12.description,
142335
+ deprecated: schema12.deprecated,
142336
142336
  keyName,
142337
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142337
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142338
142338
  type: "STRING"
142339
142339
  };
142340
142340
  case "TYPED_ARRAY":
142341
- if (Array.isArray(schema11.items)) {
142342
- const minItems2 = schema11.minItems;
142343
- const maxItems2 = schema11.maxItems;
142341
+ if (Array.isArray(schema12.items)) {
142342
+ const minItems2 = schema12.minItems;
142343
+ const maxItems2 = schema12.maxItems;
142344
142344
  const arrayType = {
142345
- comment: schema11.description,
142346
- deprecated: schema11.deprecated,
142345
+ comment: schema12.description,
142346
+ deprecated: schema12.deprecated,
142347
142347
  keyName,
142348
142348
  maxItems: maxItems2,
142349
142349
  minItems: minItems2,
142350
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142351
- params: schema11.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142350
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142351
+ params: schema12.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142352
142352
  type: "TUPLE"
142353
142353
  };
142354
- if (schema11.additionalItems === true) {
142354
+ if (schema12.additionalItems === true) {
142355
142355
  arrayType.spreadParam = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142356
- } else if (schema11.additionalItems) {
142357
- arrayType.spreadParam = parse11(schema11.additionalItems, options8, undefined, processed, usedNames);
142356
+ } else if (schema12.additionalItems) {
142357
+ arrayType.spreadParam = parse11(schema12.additionalItems, options8, undefined, processed, usedNames);
142358
142358
  }
142359
142359
  return arrayType;
142360
142360
  } else {
142361
142361
  return {
142362
- comment: schema11.description,
142363
- deprecated: schema11.deprecated,
142362
+ comment: schema12.description,
142363
+ deprecated: schema12.deprecated,
142364
142364
  keyName,
142365
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142366
- params: parse11(schema11.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142365
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142366
+ params: parse11(schema12.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142367
142367
  type: "ARRAY"
142368
142368
  };
142369
142369
  }
142370
142370
  case "UNION":
142371
142371
  return {
142372
- comment: schema11.description,
142373
- deprecated: schema11.deprecated,
142372
+ comment: schema12.description,
142373
+ deprecated: schema12.deprecated,
142374
142374
  keyName,
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 });
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 });
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: schema11.description,
142387
- deprecated: schema11.deprecated,
142386
+ comment: schema12.description,
142387
+ deprecated: schema12.deprecated,
142388
142388
  keyName,
142389
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142390
- params: schema11.enum.map((_10) => parseLiteral(_10, undefined)),
142389
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142390
+ params: schema12.enum.map((_10) => parseLiteral(_10, undefined)),
142391
142391
  type: "UNION"
142392
142392
  };
142393
142393
  case "UNNAMED_SCHEMA":
142394
- return newInterface(schema11, options8, processed, usedNames, keyName, keyNameFromDefinition);
142394
+ return newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition);
142395
142395
  case "UNTYPED_ARRAY":
142396
- const minItems = schema11.minItems;
142397
- const maxItems = typeof schema11.maxItems === "number" ? schema11.maxItems : -1;
142396
+ const minItems = schema12.minItems;
142397
+ const maxItems = typeof schema12.maxItems === "number" ? schema12.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: schema11.description,
142402
- deprecated: schema11.deprecated,
142401
+ comment: schema12.description,
142402
+ deprecated: schema12.deprecated,
142403
142403
  keyName,
142404
- maxItems: schema11.maxItems,
142404
+ maxItems: schema12.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(schema11, keyNameFromDefinition, usedNames, options8),
142408
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142409
142409
  type: "TUPLE"
142410
142410
  };
142411
142411
  }
142412
142412
  return {
142413
- comment: schema11.description,
142414
- deprecated: schema11.deprecated,
142413
+ comment: schema12.description,
142414
+ deprecated: schema12.deprecated,
142415
142415
  keyName,
142416
142416
  params,
142417
- standaloneName: standaloneName(schema11, keyNameFromDefinition, usedNames, options8),
142417
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142418
142418
  type: "ARRAY"
142419
142419
  };
142420
142420
  }
142421
142421
  }
142422
- function standaloneName(schema11, keyNameFromDefinition, usedNames, options8) {
142422
+ function standaloneName(schema12, keyNameFromDefinition, usedNames, options8) {
142423
142423
  var _a7;
142424
- const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema11, keyNameFromDefinition)) || schema11.title || schema11.$id || keyNameFromDefinition;
142424
+ const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema12, keyNameFromDefinition)) || schema12.title || schema12.$id || keyNameFromDefinition;
142425
142425
  if (name2) {
142426
142426
  return (0, utils_1.generateName)(name2, usedNames);
142427
142427
  }
142428
142428
  }
142429
- function newInterface(schema11, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142430
- const name2 = standaloneName(schema11, keyNameFromDefinition, usedNames, options8);
142429
+ function newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142430
+ const name2 = standaloneName(schema12, keyNameFromDefinition, usedNames, options8);
142431
142431
  return {
142432
- comment: schema11.description,
142433
- deprecated: schema11.deprecated,
142432
+ comment: schema12.description,
142433
+ deprecated: schema12.deprecated,
142434
142434
  keyName,
142435
- params: parseSchema(schema11, options8, processed, usedNames, name2),
142435
+ params: parseSchema(schema12, options8, processed, usedNames, name2),
142436
142436
  standaloneName: name2,
142437
- superTypes: parseSuperTypes(schema11, options8, processed, usedNames),
142437
+ superTypes: parseSuperTypes(schema12, options8, processed, usedNames),
142438
142438
  type: "INTERFACE"
142439
142439
  };
142440
142440
  }
142441
- function parseSuperTypes(schema11, options8, processed, usedNames) {
142442
- const superTypes = schema11.extends;
142441
+ function parseSuperTypes(schema12, options8, processed, usedNames) {
142442
+ const superTypes = schema12.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(schema11, options8, processed, usedNames, parentSchemaName) {
142449
- let asts = (0, lodash_1.map)(schema11.properties, (value, key2) => ({
142448
+ function parseSchema(schema12, options8, processed, usedNames, parentSchemaName) {
142449
+ let asts = (0, lodash_1.map)(schema12.properties, (value, key2) => ({
142450
142450
  ast: parse11(value, options8, key2, processed, usedNames),
142451
142451
  isPatternProperty: false,
142452
- isRequired: (0, lodash_1.includes)(schema11.required || [], key2),
142452
+ isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142453
142453
  isUnreachableDefinition: false,
142454
142454
  keyName: key2
142455
142455
  }));
142456
142456
  let singlePatternProperty = false;
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) => {
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) => {
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)(schema11.required || [], key2),
142469
+ isRequired: singlePatternProperty || (0, lodash_1.includes)(schema12.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)(schema11.$defs, (value, key2) => {
142476
+ asts = asts.concat((0, lodash_1.map)(schema12.$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)(schema11.required || [], key2),
142486
+ isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142487
142487
  isUnreachableDefinition: true,
142488
142488
  keyName: key2
142489
142489
  };
142490
142490
  }));
142491
142491
  }
142492
- switch (schema11.additionalProperties) {
142492
+ switch (schema12.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(schema11.additionalProperties, options8, "[k: string]", processed, usedNames),
142509
+ ast: parse11(schema12.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(schema11, isSchema = true, processed = new Set) {
142518
- if (processed.has(schema11)) {
142517
+ function getDefinitions(schema12, isSchema = true, processed = new Set) {
142518
+ if (processed.has(schema12)) {
142519
142519
  return {};
142520
142520
  }
142521
- processed.add(schema11);
142522
- if (Array.isArray(schema11)) {
142523
- return schema11.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142521
+ processed.add(schema12);
142522
+ if (Array.isArray(schema12)) {
142523
+ return schema12.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142524
142524
  }
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)), {}));
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)), {}));
142527
142527
  }
142528
142528
  return {};
142529
142529
  }
142530
142530
  var getDefinitionsMemoized = (0, lodash_1.memoize)(getDefinitions);
142531
- function hasDefinitions(schema11) {
142532
- return "$defs" in schema11;
142531
+ function hasDefinitions(schema12) {
142532
+ return "$defs" in schema12;
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 schema11;
144356
+ let schema12;
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
- schema11 = args[1];
144366
+ schema12 = args[1];
144367
144367
  options8 = args[2];
144368
144368
  } else {
144369
- schema11 = undefined;
144369
+ schema12 = undefined;
144370
144370
  options8 = args[1];
144371
144371
  }
144372
144372
  } else {
144373
144373
  path18 = "";
144374
- schema11 = args[0];
144374
+ schema12 = 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 schema11 === "object") {
144383
- schema11 = JSON.parse(JSON.stringify(schema11));
144382
+ if (!options8.mutateInputSchema && typeof schema12 === "object") {
144383
+ schema12 = JSON.parse(JSON.stringify(schema12));
144384
144384
  }
144385
144385
  return {
144386
144386
  path: path18,
144387
- schema: schema11,
144387
+ schema: schema12,
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* (schema11, { cwd, $refOptions }) {
145177
- (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema11);
145176
+ return __awaiter(this, arguments, undefined, function* (schema12, { cwd, $refOptions }) {
145177
+ (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema12);
145178
145178
  const parser2 = new json_schema_ref_parser_1.$RefParser;
145179
145179
  const dereferencedPaths = new WeakMap;
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);
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);
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", (schema11) => {
145196
- if (schema11.enum && schema11.tsEnumNames && schema11.enum.length !== schema11.tsEnumNames.length) {
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) {
145197
145197
  return false;
145198
145198
  }
145199
145199
  });
145200
- rules.set("tsEnumNames must be an array of strings", (schema11) => {
145201
- if (schema11.tsEnumNames && schema11.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145200
+ rules.set("tsEnumNames must be an array of strings", (schema12) => {
145201
+ if (schema12.tsEnumNames && schema12.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", (schema11) => {
145206
- const { maxItems, minItems } = schema11;
145205
+ rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema12) => {
145206
+ const { maxItems, minItems } = schema12;
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", (schema11) => {
145212
- const { maxItems } = schema11;
145211
+ rules.set("When maxItems exists, maxItems >= 0", (schema12) => {
145212
+ const { maxItems } = schema12;
145213
145213
  if (typeof maxItems === "number") {
145214
145214
  return maxItems >= 0;
145215
145215
  }
145216
145216
  });
145217
- rules.set("When minItems exists, minItems >= 0", (schema11) => {
145218
- const { minItems } = schema11;
145217
+ rules.set("When minItems exists, minItems >= 0", (schema12) => {
145218
+ const { minItems } = schema12;
145219
145219
  if (typeof minItems === "number") {
145220
145220
  return minItems >= 0;
145221
145221
  }
145222
145222
  });
145223
- rules.set("deprecated must be a boolean", (schema11) => {
145224
- const typeOfDeprecated = typeof schema11.deprecated;
145223
+ rules.set("deprecated must be a boolean", (schema12) => {
145224
+ const typeOfDeprecated = typeof schema12.deprecated;
145225
145225
  return typeOfDeprecated === "boolean" || typeOfDeprecated === "undefined";
145226
145226
  });
145227
- function validate2(schema11, filename) {
145227
+ function validate2(schema12, filename) {
145228
145228
  const errors5 = [];
145229
145229
  rules.forEach((rule, ruleName) => {
145230
- (0, utils_1.traverse)(schema11, (schema12, key2) => {
145231
- if (rule(schema12) === false) {
145230
+ (0, utils_1.traverse)(schema12, (schema13, key2) => {
145231
+ if (rule(schema13) === false) {
145232
145232
  errors5.push(`Error at key "${key2}" in file "${filename}": ${ruleName}`);
145233
145233
  }
145234
- return schema12;
145234
+ return schema13;
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(schema11, parent = null) {
145249
- if (!Array.isArray(schema11) && !(0, lodash_1.isPlainObject)(schema11)) {
145250
- return schema11;
145248
+ function link2(schema12, parent = null) {
145249
+ if (!Array.isArray(schema12) && !(0, lodash_1.isPlainObject)(schema12)) {
145250
+ return schema12;
145251
145251
  }
145252
- if (schema11.hasOwnProperty(JSONSchema_1.Parent)) {
145253
- return schema11;
145252
+ if (schema12.hasOwnProperty(JSONSchema_1.Parent)) {
145253
+ return schema12;
145254
145254
  }
145255
- Object.defineProperty(schema11, JSONSchema_1.Parent, {
145255
+ Object.defineProperty(schema12, JSONSchema_1.Parent, {
145256
145256
  enumerable: false,
145257
145257
  value: parent,
145258
145258
  writable: false
145259
145259
  });
145260
- if (Array.isArray(schema11)) {
145261
- schema11.forEach((child) => link2(child, schema11));
145260
+ if (Array.isArray(schema12)) {
145261
+ schema12.forEach((child) => link2(child, schema12));
145262
145262
  }
145263
- for (const key2 in schema11) {
145264
- link2(schema11[key2], schema11);
145263
+ for (const key2 in schema12) {
145264
+ link2(schema12[key2], schema12);
145265
145265
  }
145266
- return schema11;
145266
+ return schema12;
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 schema11 = parseAsJSONSchema(filename);
145359
- return compile(schema11, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145358
+ const schema12 = parseAsJSONSchema(filename);
145359
+ return compile(schema12, (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* (schema11, name2, options8 = {}) {
145369
+ return __awaiter(this, arguments, undefined, function* (schema12, 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)(schema11);
145379
+ const _schema = (0, lodash_1.cloneDeep)(schema12);
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 dirname19 = path18.dirname;
163947
+ var dirname20 = path18.dirname;
163948
163948
  var basename6 = path18.basename;
163949
163949
  var extname2 = path18.extname;
163950
- var join25 = path18.join;
163950
+ var join27 = 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 = dirname19(loc);
163986
+ var dir = dirname20(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 = join25(dir, file2);
164012
+ var path19 = join27(dir, file2);
164013
164013
  var stat2 = tryStat(path19);
164014
164014
  if (stat2 && stat2.isFile()) {
164015
164015
  return path19;
164016
164016
  }
164017
- path19 = join25(dir, basename6(file2, ext), "index" + ext);
164017
+ path19 = join27(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 join25 = path18.join;
167712
+ var join27 = 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(join25(root2, path19));
167884
+ path19 = normalize2(join27(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 = join25(path19, self2._index[i5]);
168024
+ var p4 = join27(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, config12, property) {
169122
+ common2.rewriteCookieProperty = function rewriteCookieProperty(header2, config13, property) {
169123
169123
  if (Array.isArray(header2)) {
169124
169124
  return header2.map(function(headerElement) {
169125
- return rewriteCookieProperty(headerElement, config12, property);
169125
+ return rewriteCookieProperty(headerElement, config13, 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 config12) {
169131
- newValue = config12[previousValue];
169132
- } else if ("*" in config12) {
169133
- newValue = config12["*"];
169130
+ if (previousValue in config13) {
169131
+ newValue = config13[previousValue];
169132
+ } else if ("*" in config13) {
169133
+ newValue = config13["*"];
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, config12) {
170498
+ async function getTarget(req, config13) {
170499
170499
  let newTarget;
170500
- const router = config12.router;
170500
+ const router = config13.router;
170501
170501
  if ((0, is_plain_object_1.isPlainObject)(router)) {
170502
170502
  newTarget = getTargetFromProxyTable(req, router);
170503
170503
  } else if (typeof router === "function") {
@@ -214616,7 +214616,7 @@ var require_buffer_list = __commonJS((exports, module) => {
214616
214616
  }
214617
214617
  }, {
214618
214618
  key: "join",
214619
- value: function join25(s5) {
214619
+ value: function join27(s5) {
214620
214620
  if (this.length === 0)
214621
214621
  return "";
214622
214622
  var p4 = this.head;
@@ -234033,7 +234033,7 @@ function normalizeBase44Env() {
234033
234033
  loadProjectEnvFiles();
234034
234034
 
234035
234035
  // src/cli/index.ts
234036
- import { dirname as dirname23, join as join28 } from "node:path";
234036
+ import { dirname as dirname24, 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/agents/pull.ts
235244
- import { dirname as dirname10, join as join14 } from "node:path";
235243
+ // src/cli/commands/agent-skills/pull.ts
235244
+ import { dirname as dirname10, join as join15 } 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,6 +236056,7 @@ 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"),
236059
236060
  connectorsDir: exports_external.string().optional().default("connectors"),
236060
236061
  authDir: exports_external.string().optional().default("auth"),
236061
236062
  plugin: PluginMetadataSchema.optional(),
@@ -241965,7 +241966,7 @@ async function getSiteUrl() {
241965
241966
  return result.data.url;
241966
241967
  }
241967
241968
  // src/core/project/config.ts
241968
- import { dirname as dirname8, join as join10 } from "node:path";
241969
+ import { dirname as dirname8, join as join11 } from "node:path";
241969
241970
 
241970
241971
  // src/core/project/plugins.ts
241971
241972
  import { createRequire as createRequire2 } from "node:module";
@@ -242028,6 +242029,7 @@ var AgentConfigSchema = exports_external.looseObject({
242028
242029
  description: exports_external.string().trim().min(1, "Description is required"),
242029
242030
  instructions: exports_external.string().trim().min(1, "Instructions are required"),
242030
242031
  tool_configs: exports_external.array(ToolConfigSchema).optional().default([]),
242032
+ selected_skill_names: exports_external.array(exports_external.string()).optional().default([]),
242031
242033
  memory_config: MemoryConfigSchema.optional(),
242032
242034
  whatsapp_greeting: exports_external.string().nullable().optional()
242033
242035
  });
@@ -242171,6 +242173,145 @@ var agentResource = {
242171
242173
  readAll: readAllAgents,
242172
242174
  push: pushAgents
242173
242175
  };
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
+ };
242174
242315
  // src/core/resources/auth-config/schema.ts
242175
242316
  var GoogleOAuthMode = exports_external.enum(["default", "custom"]);
242176
242317
  var AuthConfigSchema = exports_external.object({
@@ -242213,8 +242354,8 @@ var AppAuthConfigResponseSchema = exports_external.object({
242213
242354
  }).transform((data) => ({
242214
242355
  authConfig: data.auth_config
242215
242356
  }));
242216
- function hasAnyLoginMethod(config4) {
242217
- return config4.enableUsernamePassword || config4.enableGoogleLogin || config4.enableMicrosoftLogin || config4.enableFacebookLogin || config4.enableAppleLogin || config4.enableSSOLogin;
242357
+ function hasAnyLoginMethod(config5) {
242358
+ return config5.enableUsernamePassword || config5.enableGoogleLogin || config5.enableMicrosoftLogin || config5.enableFacebookLogin || config5.enableAppleLogin || config5.enableSSOLogin;
242218
242359
  }
242219
242360
  var SOCIAL_PROVIDERS = {
242220
242361
  google: {
@@ -242229,18 +242370,18 @@ var SOCIAL_PROVIDERS = {
242229
242370
  facebook: { field: "enableFacebookLogin" },
242230
242371
  apple: { field: "enableAppleLogin" }
242231
242372
  };
242232
- function toAuthConfigPayload(config4) {
242373
+ function toAuthConfigPayload(config5) {
242233
242374
  return {
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
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
242244
242385
  };
242245
242386
  }
242246
242387
 
@@ -242259,9 +242400,9 @@ async function getAuthConfig() {
242259
242400
  }
242260
242401
  return result.data.authConfig;
242261
242402
  }
242262
- async function pushAuthConfigToApi(config4) {
242403
+ async function pushAuthConfigToApi(config5) {
242263
242404
  const { id } = getAppContext();
242264
- const payload = toAuthConfigPayload(config4);
242405
+ const payload = toAuthConfigPayload(config5);
242265
242406
  if (hasWorkspaceApiKeyAuth()) {
242266
242407
  try {
242267
242408
  await base44Client.put(`api/apps/${id}/deployment/auth-configuration`, {
@@ -242270,7 +242411,7 @@ async function pushAuthConfigToApi(config4) {
242270
242411
  } catch (error48) {
242271
242412
  throw await ApiError.fromHttpError(error48, "updating auth config");
242272
242413
  }
242273
- return config4;
242414
+ return config5;
242274
242415
  }
242275
242416
  let response;
242276
242417
  try {
@@ -242287,7 +242428,7 @@ async function pushAuthConfigToApi(config4) {
242287
242428
  return result.data.authConfig;
242288
242429
  }
242289
242430
  // src/core/resources/auth-config/config.ts
242290
- import { join as join6 } from "node:path";
242431
+ import { join as join7 } from "node:path";
242291
242432
  import { isDeepStrictEqual as isDeepStrictEqual2 } from "node:util";
242292
242433
  var AUTH_CONFIG_FILENAME = `config.${CONFIG_FILE_EXTENSION}`;
242293
242434
  var DEFAULT_AUTH_CONFIG = {
@@ -242303,7 +242444,7 @@ var DEFAULT_AUTH_CONFIG = {
242303
242444
  useWorkspaceSSO: false
242304
242445
  };
242305
242446
  function getAuthConfigPath(authDir) {
242306
- return join6(authDir, AUTH_CONFIG_FILENAME);
242447
+ return join7(authDir, AUTH_CONFIG_FILENAME);
242307
242448
  }
242308
242449
  async function readAuthConfig(authDir) {
242309
242450
  const filePath = getAuthConfigPath(authDir);
@@ -242317,16 +242458,16 @@ async function readAuthConfig(authDir) {
242317
242458
  }
242318
242459
  return result.data;
242319
242460
  }
242320
- async function writeAuthConfig(authDir, config4) {
242461
+ async function writeAuthConfig(authDir, config5) {
242321
242462
  const filePath = getAuthConfigPath(authDir);
242322
242463
  if (await pathExists(filePath)) {
242323
242464
  const existing = await readJsonFile(filePath);
242324
242465
  const existingResult = AuthConfigFileSchema.safeParse(existing);
242325
- if (existingResult.success && isDeepStrictEqual2(existingResult.data, config4)) {
242466
+ if (existingResult.success && isDeepStrictEqual2(existingResult.data, config5)) {
242326
242467
  return { written: false };
242327
242468
  }
242328
242469
  }
242329
- await writeJsonFile(filePath, config4);
242470
+ await writeJsonFile(filePath, config5);
242330
242471
  return { written: true };
242331
242472
  }
242332
242473
  // src/core/resources/auth-config/pull.ts
@@ -242334,17 +242475,17 @@ async function pullAuthConfig() {
242334
242475
  return await getAuthConfig();
242335
242476
  }
242336
242477
  // src/core/resources/auth-config/push.ts
242337
- async function pushAuthConfig(config4) {
242338
- if (!config4) {
242478
+ async function pushAuthConfig(config5) {
242479
+ if (!config5) {
242339
242480
  return;
242340
242481
  }
242341
- await pushAuthConfigToApi(config4);
242482
+ await pushAuthConfigToApi(config5);
242342
242483
  }
242343
242484
  // src/core/resources/auth-config/resource.ts
242344
242485
  var authConfigResource = {
242345
242486
  readAll: async (dir) => {
242346
- const config4 = await readAuthConfig(dir);
242347
- return config4 ? [config4] : [];
242487
+ const config5 = await readAuthConfig(dir);
242488
+ return config5 ? [config5] : [];
242348
242489
  },
242349
242490
  push: async (items) => {
242350
242491
  await pushAuthConfig(items[0] ?? null);
@@ -242584,7 +242725,7 @@ class MissingSSOFieldsError extends InvalidInputError {
242584
242725
  }
242585
242726
  }
242586
242727
  function buildSSOSecrets(provider, options) {
242587
- const schema3 = SSO_PROVIDER_SCHEMAS[provider];
242728
+ const schema4 = SSO_PROVIDER_SCHEMAS[provider];
242588
242729
  const secrets = {};
242589
242730
  secrets["sso_name" /* Name */] = options.ssoName ?? provider;
242590
242731
  secrets["sso_client_id" /* ClientId */] = options.clientId;
@@ -242595,21 +242736,21 @@ function buildSSOSecrets(provider, options) {
242595
242736
  secrets[secretKey] = value;
242596
242737
  }
242597
242738
  }
242598
- if (schema3.deriveDefaults) {
242599
- const derived = schema3.deriveDefaults(secrets);
242739
+ if (schema4.deriveDefaults) {
242740
+ const derived = schema4.deriveDefaults(secrets);
242600
242741
  for (const [key, val] of Object.entries(derived)) {
242601
242742
  if (!secrets[key]) {
242602
242743
  secrets[key] = val;
242603
242744
  }
242604
242745
  }
242605
242746
  }
242606
- for (const [key, val] of Object.entries(schema3.defaults)) {
242747
+ for (const [key, val] of Object.entries(schema4.defaults)) {
242607
242748
  if (!secrets[key]) {
242608
242749
  secrets[key] = val;
242609
242750
  }
242610
242751
  }
242611
242752
  const missing = [];
242612
- for (const key of schema3.requiredKeys) {
242753
+ for (const key of schema4.requiredKeys) {
242613
242754
  if (!secrets[key]) {
242614
242755
  missing.push(key);
242615
242756
  }
@@ -242955,7 +243096,7 @@ async function removeStripe() {
242955
243096
  return result.data;
242956
243097
  }
242957
243098
  // src/core/resources/connector/config.ts
242958
- import { join as join7 } from "node:path";
243099
+ import { join as join8 } from "node:path";
242959
243100
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "node:util";
242960
243101
  async function readConnectorFile(connectorPath) {
242961
243102
  const parsed = await readJsonFile(connectorPath);
@@ -243016,7 +243157,7 @@ async function writeConnectors(connectorsDir, remoteConnectors) {
243016
243157
  if (existing && isDeepStrictEqual3(existing.data, connector)) {
243017
243158
  continue;
243018
243159
  }
243019
- const filePath = existing?.filePath ?? join7(connectorsDir, `${connector.type}.${CONFIG_FILE_EXTENSION}`);
243160
+ const filePath = existing?.filePath ?? join8(connectorsDir, `${connector.type}.${CONFIG_FILE_EXTENSION}`);
243020
243161
  await writeJsonFile(filePath, connector);
243021
243162
  written.push(connector.type);
243022
243163
  }
@@ -243618,7 +243759,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
243618
243759
  return result.data;
243619
243760
  }
243620
243761
  // src/core/resources/function/config.ts
243621
- import { basename as basename3, dirname as dirname6, join as join8, relative, resolve as resolve2 } from "node:path";
243762
+ import { basename as basename3, dirname as dirname6, join as join9, relative, resolve as resolve2 } from "node:path";
243622
243763
  async function readSharedFiles(functionsDir) {
243623
243764
  const sharedDir = resolve2(functionsDir, "..", "shared");
243624
243765
  if (!await pathExists(sharedDir)) {
@@ -243635,9 +243776,9 @@ async function readFunctionConfig(configPath) {
243635
243776
  return result.data;
243636
243777
  }
243637
243778
  async function readFunction(configPath, sharedFiles) {
243638
- const config7 = await readFunctionConfig(configPath);
243779
+ const config8 = await readFunctionConfig(configPath);
243639
243780
  const functionDir = dirname6(configPath);
243640
- const entryPath = join8(functionDir, config7.entry);
243781
+ const entryPath = join9(functionDir, config8.entry);
243641
243782
  if (!await pathExists(entryPath)) {
243642
243783
  throw new InvalidInputError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`, {
243643
243784
  hints: [{ message: "Check the 'entry' field in your function config" }]
@@ -243649,7 +243790,7 @@ async function readFunction(configPath, sharedFiles) {
243649
243790
  });
243650
243791
  const allFilePaths = [...new Set([...filePaths, ...sharedFiles])];
243651
243792
  const functionData = {
243652
- ...config7,
243793
+ ...config8,
243653
243794
  entryPath,
243654
243795
  filePaths: allFilePaths,
243655
243796
  source: { type: "project" }
@@ -243786,28 +243927,28 @@ async function pruneRemovedFunctions(localFunctionNames, options) {
243786
243927
  return results;
243787
243928
  }
243788
243929
  // src/core/resources/function/pull.ts
243789
- import { join as join9 } from "node:path";
243930
+ import { join as join10 } from "node:path";
243790
243931
  import { isDeepStrictEqual as isDeepStrictEqual4 } from "node:util";
243791
243932
  async function writeFunctions(functionsDir, functions) {
243792
243933
  const written = [];
243793
243934
  const skipped = [];
243794
243935
  for (const fn of functions) {
243795
- const functionDir = join9(functionsDir, fn.name);
243796
- const configPath = join9(functionDir, "function.jsonc");
243936
+ const functionDir = join10(functionsDir, fn.name);
243937
+ const configPath = join10(functionDir, "function.jsonc");
243797
243938
  if (await isFunctionUnchanged(functionDir, fn)) {
243798
243939
  skipped.push(fn.name);
243799
243940
  continue;
243800
243941
  }
243801
- const config7 = {
243942
+ const config8 = {
243802
243943
  name: fn.name,
243803
243944
  entry: fn.entry
243804
243945
  };
243805
243946
  if (fn.automations.length > 0) {
243806
- config7.automations = fn.automations;
243947
+ config8.automations = fn.automations;
243807
243948
  }
243808
- await writeJsonFile(configPath, config7);
243949
+ await writeJsonFile(configPath, config8);
243809
243950
  for (const file2 of fn.files) {
243810
- await writeFile(join9(functionDir, file2.path), file2.content);
243951
+ await writeFile(join10(functionDir, file2.path), file2.content);
243811
243952
  }
243812
243953
  written.push(fn.name);
243813
243954
  }
@@ -243817,7 +243958,7 @@ async function isFunctionUnchanged(functionDir, fn) {
243817
243958
  if (!await pathExists(functionDir)) {
243818
243959
  return false;
243819
243960
  }
243820
- const configPath = join9(functionDir, "function.jsonc");
243961
+ const configPath = join10(functionDir, "function.jsonc");
243821
243962
  try {
243822
243963
  const localConfig = await readJsonFile(configPath);
243823
243964
  if (localConfig.entry !== fn.entry) {
@@ -243830,7 +243971,7 @@ async function isFunctionUnchanged(functionDir, fn) {
243830
243971
  return false;
243831
243972
  }
243832
243973
  for (const file2 of fn.files) {
243833
- const filePath = join9(functionDir, file2.path);
243974
+ const filePath = join10(functionDir, file2.path);
243834
243975
  if (!await pathExists(filePath)) {
243835
243976
  return false;
243836
243977
  }
@@ -243870,6 +244011,7 @@ class ProjectConfigReader {
243870
244011
  entities,
243871
244012
  functions,
243872
244013
  agents: localResources.agents,
244014
+ agentSkills: localResources.agentSkills,
243873
244015
  connectors: localResources.connectors,
243874
244016
  authConfig: localResources.authConfig
243875
244017
  };
@@ -243897,14 +244039,15 @@ class ProjectConfigReader {
243897
244039
  }
243898
244040
  async readProjectResources(configPath, project) {
243899
244041
  const configDir = dirname8(configPath);
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))
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))
243906
244049
  ]);
243907
- return { entities, functions, agents, connectors, authConfig };
244050
+ return { entities, functions, agents, agentSkills, connectors, authConfig };
243908
244051
  }
243909
244052
  assertPluginProjectDoesNotLoadPlugins(project, configPath) {
243910
244053
  if (project.plugin && project.plugins.length > 0) {
@@ -243938,6 +244081,7 @@ class ProjectConfigReader {
243938
244081
  entities: markPluginEntities(resources.entities, namespace),
243939
244082
  functions: namespacePluginFunctions(resources.functions, namespace),
243940
244083
  agents: [],
244084
+ agentSkills: [],
243941
244085
  connectors: [],
243942
244086
  authConfig: []
243943
244087
  };
@@ -243975,6 +244119,7 @@ class ProjectConfigReader {
243975
244119
  entities,
243976
244120
  functions,
243977
244121
  agents: [],
244122
+ agentSkills: [],
243978
244123
  connectors: [],
243979
244124
  authConfig: []
243980
244125
  };
@@ -244003,12 +244148,12 @@ async function readProjectConfig(projectRoot) {
244003
244148
  // src/core/project/template.ts
244004
244149
  var import_ejs = __toESM(require_ejs(), 1);
244005
244150
  var import_front_matter = __toESM(require_front_matter(), 1);
244006
- import { dirname as dirname9, join as join12 } from "node:path";
244151
+ import { dirname as dirname9, join as join13 } from "node:path";
244007
244152
 
244008
244153
  // src/core/assets.ts
244009
244154
  import { cpSync, existsSync } from "node:fs";
244010
244155
  import { homedir as homedir2 } from "node:os";
244011
- import { join as join11 } from "node:path";
244156
+ import { join as join12 } from "node:path";
244012
244157
  // package.json
244013
244158
  var package_default = {
244014
244159
  name: "base44",
@@ -244109,18 +244254,18 @@ var package_default = {
244109
244254
  };
244110
244255
 
244111
244256
  // src/core/assets.ts
244112
- var ASSETS_DIR = join11(homedir2(), ".base44", "assets", package_default.version);
244257
+ var ASSETS_DIR = join12(homedir2(), ".base44", "assets", package_default.version);
244113
244258
  function getTemplatesDir() {
244114
- return join11(ASSETS_DIR, "templates");
244259
+ return join12(ASSETS_DIR, "templates");
244115
244260
  }
244116
244261
  function getTemplatesIndexPath() {
244117
- return join11(ASSETS_DIR, "templates", "templates.json");
244262
+ return join12(ASSETS_DIR, "templates", "templates.json");
244118
244263
  }
244119
244264
  function getDenoWrapperPath() {
244120
- return join11(ASSETS_DIR, "deno-runtime", "main.ts");
244265
+ return join12(ASSETS_DIR, "deno-runtime", "main.ts");
244121
244266
  }
244122
244267
  function getExecWrapperPath() {
244123
- return join11(ASSETS_DIR, "deno-runtime", "exec.ts");
244268
+ return join12(ASSETS_DIR, "deno-runtime", "exec.ts");
244124
244269
  }
244125
244270
  function ensureNpmAssets(sourceDir) {
244126
244271
  if (existsSync(ASSETS_DIR))
@@ -244142,7 +244287,7 @@ async function listTemplates() {
244142
244287
  }
244143
244288
  async function renderTemplate(template, destPath, data, options = {}) {
244144
244289
  const { skipExisting = false } = options;
244145
- const templateDir = join12(getTemplatesDir(), template.path);
244290
+ const templateDir = join13(getTemplatesDir(), template.path);
244146
244291
  const files = await globby("**/*", {
244147
244292
  cwd: templateDir,
244148
244293
  dot: true,
@@ -244150,20 +244295,20 @@ async function renderTemplate(template, destPath, data, options = {}) {
244150
244295
  });
244151
244296
  const skipped = [];
244152
244297
  for (const file2 of files) {
244153
- const srcPath = join12(templateDir, file2);
244298
+ const srcPath = join13(templateDir, file2);
244154
244299
  try {
244155
244300
  if (file2.endsWith(".ejs")) {
244156
244301
  const rendered = await import_ejs.default.renderFile(srcPath, data);
244157
244302
  const { attributes, body } = import_front_matter.default(rendered);
244158
- const destFile = attributes.outputFileName ? join12(dirname9(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
244159
- const destFilePath = join12(destPath, destFile);
244303
+ const destFile = attributes.outputFileName ? join13(dirname9(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
244304
+ const destFilePath = join13(destPath, destFile);
244160
244305
  if (skipExisting && await pathExists(destFilePath)) {
244161
244306
  skipped.push(destFile);
244162
244307
  continue;
244163
244308
  }
244164
244309
  await writeFile(destFilePath, body);
244165
244310
  } else {
244166
- const destFilePath = join12(destPath, file2);
244311
+ const destFilePath = join13(destPath, file2);
244167
244312
  if (skipExisting && await pathExists(destFilePath)) {
244168
244313
  skipped.push(file2);
244169
244314
  continue;
@@ -244263,7 +244408,7 @@ async function getSiteFilePaths(outputDir) {
244263
244408
  // src/core/site/deploy.ts
244264
244409
  import { randomUUID } from "node:crypto";
244265
244410
  import { tmpdir } from "node:os";
244266
- import { join as join13 } from "node:path";
244411
+ import { join as join14 } from "node:path";
244267
244412
  async function deploySite(siteOutputDir) {
244268
244413
  if (!await pathExists(siteOutputDir)) {
244269
244414
  throw new InvalidInputError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
@@ -244280,7 +244425,7 @@ async function deploySite(siteOutputDir) {
244280
244425
  ]
244281
244426
  });
244282
244427
  }
244283
- const archivePath = join13(tmpdir(), `base44-site-${randomUUID()}.tar.gz`);
244428
+ const archivePath = join14(tmpdir(), `base44-site-${randomUUID()}.tar.gz`);
244284
244429
  try {
244285
244430
  await createArchive(siteOutputDir, archivePath);
244286
244431
  return await uploadSite(archivePath);
@@ -244297,18 +244442,35 @@ async function createArchive(pathToArchive, targetArchivePath) {
244297
244442
  }
244298
244443
  // src/core/project/deploy.ts
244299
244444
  function hasResourcesToDeploy(projectData) {
244300
- const { project, entities, functions, agents, connectors, authConfig } = projectData;
244445
+ const {
244446
+ project,
244447
+ entities,
244448
+ functions,
244449
+ agents,
244450
+ agentSkills,
244451
+ connectors,
244452
+ authConfig
244453
+ } = projectData;
244301
244454
  const hasSite = Boolean(project.site?.outputDirectory);
244302
244455
  const hasEntities = entities.length > 0;
244303
244456
  const hasFunctions = functions.length > 0;
244304
244457
  const hasAgents = agents.length > 0;
244458
+ const hasAgentSkills = agentSkills.length > 0;
244305
244459
  const hasConnectors = connectors.length > 0;
244306
244460
  const hasAuthConfig = authConfig.length > 0;
244307
244461
  const hasVisibility = Boolean(project.visibility);
244308
- return hasEntities || hasFunctions || hasAgents || hasConnectors || hasAuthConfig || hasVisibility || hasSite;
244462
+ return hasEntities || hasFunctions || hasAgents || hasAgentSkills || hasConnectors || hasAuthConfig || hasVisibility || hasSite;
244309
244463
  }
244310
244464
  async function deployAll(projectData, options) {
244311
- const { project, entities, functions, agents, connectors, authConfig } = projectData;
244465
+ const {
244466
+ project,
244467
+ entities,
244468
+ functions,
244469
+ agents,
244470
+ agentSkills,
244471
+ connectors,
244472
+ authConfig
244473
+ } = projectData;
244312
244474
  await setAppVisibility(project.visibility);
244313
244475
  if (project.visibility) {
244314
244476
  options?.onVisibilitySet?.(project.visibility);
@@ -244318,6 +244480,7 @@ async function deployAll(projectData, options) {
244318
244480
  onStart: options?.onFunctionStart,
244319
244481
  onResult: options?.onFunctionResult
244320
244482
  });
244483
+ await agentSkillResource.push(agentSkills);
244321
244484
  await agentResource.push(agents);
244322
244485
  await authConfigResource.push(authConfig);
244323
244486
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
@@ -251342,6 +251505,25 @@ class Base44Command extends Command {
251342
251505
  });
251343
251506
  }
251344
251507
  }
251508
+ // src/cli/utils/confirm-push.ts
251509
+ async function confirmPush({
251510
+ isNonInteractive,
251511
+ yes,
251512
+ log,
251513
+ warning
251514
+ }) {
251515
+ if (isNonInteractive && !yes) {
251516
+ throw new InvalidInputError("--yes is required in non-interactive mode");
251517
+ }
251518
+ if (yes) {
251519
+ return true;
251520
+ }
251521
+ log.warn(warning);
251522
+ const proceed = await Re({
251523
+ message: "Are you sure you want to continue?"
251524
+ });
251525
+ return !Ct(proceed) && proceed;
251526
+ }
251345
251527
  // src/cli/utils/json.ts
251346
251528
  function toJsonStdout(result) {
251347
251529
  return `${JSON.stringify(result, null, 2)}
@@ -251596,14 +251778,70 @@ async function moveAppToWorkspace(appId, targetWorkspaceId, options = {}) {
251596
251778
  }
251597
251779
  return result.data;
251598
251780
  }
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
+
251599
251836
  // src/cli/commands/agents/pull.ts
251837
+ import { dirname as dirname11, join as join16 } from "node:path";
251600
251838
  async function pullAgentsAction({
251601
251839
  log,
251602
251840
  runTask: runTask2
251603
251841
  }) {
251604
251842
  const { project: project2 } = await readProjectConfig();
251605
- const configDir = dirname10(project2.configPath);
251606
- const agentsDir = join14(configDir, project2.agentsDir);
251843
+ const configDir = dirname11(project2.configPath);
251844
+ const agentsDir = join16(configDir, project2.agentsDir);
251607
251845
  const remoteAgents = await runTask2("Fetching agents from Base44", async () => {
251608
251846
  return await fetchAgents();
251609
251847
  }, {
@@ -251634,12 +251872,18 @@ function getAgentsPullCommand() {
251634
251872
  }
251635
251873
 
251636
251874
  // src/cli/commands/agents/push.ts
251637
- async function pushAgentsAction({
251638
- log,
251639
- runTask: runTask2
251640
- }) {
251875
+ async function pushAgentsAction({ isNonInteractive, log, runTask: runTask2 }, options) {
251641
251876
  const { agents } = await readProjectConfig();
251642
251877
  log.info(agents.length === 0 ? "No local agents found - this will delete all remote agents" : `Found ${agents.length} agents to push`);
251878
+ const proceed = await confirmPush({
251879
+ isNonInteractive,
251880
+ yes: options.yes,
251881
+ log,
251882
+ warning: "This will replace all remote agent configs with your local agents and delete any not present locally."
251883
+ });
251884
+ if (!proceed) {
251885
+ return { outroMessage: "Push cancelled" };
251886
+ }
251643
251887
  const result = await runTask2("Pushing agents to Base44", async () => {
251644
251888
  return await pushAgents(agents);
251645
251889
  }, {
@@ -251658,7 +251902,7 @@ async function pushAgentsAction({
251658
251902
  return { outroMessage: "Agents pushed to Base44" };
251659
251903
  }
251660
251904
  function getAgentsPushCommand() {
251661
- return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").action(pushAgentsAction);
251905
+ return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").option("-y, --yes", "Skip confirmation prompt").action(pushAgentsAction);
251662
251906
  }
251663
251907
 
251664
251908
  // src/cli/commands/agents/index.ts
@@ -251667,12 +251911,12 @@ function getAgentsCommand() {
251667
251911
  }
251668
251912
 
251669
251913
  // src/cli/commands/auth/password-login.ts
251670
- import { dirname as dirname11, join as join15 } from "node:path";
251914
+ import { dirname as dirname12, join as join17 } from "node:path";
251671
251915
  async function passwordLoginAction({ log, runTask: runTask2 }, action) {
251672
251916
  const shouldEnable = action === "enable";
251673
251917
  const { project: project2 } = await readProjectConfig();
251674
- const configDir = dirname11(project2.configPath);
251675
- const authDir = join15(configDir, project2.authDir);
251918
+ const configDir = dirname12(project2.configPath);
251919
+ const authDir = join17(configDir, project2.authDir);
251676
251920
  const updated = await runTask2("Updating local auth config", async () => {
251677
251921
  const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
251678
251922
  const merged = { ...current, enableUsernamePassword: shouldEnable };
@@ -251692,14 +251936,14 @@ function getPasswordLoginCommand() {
251692
251936
  }
251693
251937
 
251694
251938
  // src/cli/commands/auth/pull.ts
251695
- import { dirname as dirname12, join as join16 } from "node:path";
251939
+ import { dirname as dirname13, join as join18 } from "node:path";
251696
251940
  async function pullAuthAction({
251697
251941
  log,
251698
251942
  runTask: runTask2
251699
251943
  }) {
251700
251944
  const { project: project2 } = await readProjectConfig();
251701
- const configDir = dirname12(project2.configPath);
251702
- const authDir = join16(configDir, project2.authDir);
251945
+ const configDir = dirname13(project2.configPath);
251946
+ const authDir = join18(configDir, project2.authDir);
251703
251947
  const remoteConfig = await runTask2("Fetching auth config from Base44", async () => {
251704
251948
  return await pullAuthConfig();
251705
251949
  }, {
@@ -251763,7 +252007,7 @@ function getAuthPushCommand() {
251763
252007
  }
251764
252008
 
251765
252009
  // src/cli/commands/auth/social-login.ts
251766
- import { dirname as dirname13, join as join17, resolve as resolve4 } from "node:path";
252010
+ import { dirname as dirname14, join as join19, resolve as resolve4 } from "node:path";
251767
252011
  var PROVIDER_LABELS = {
251768
252012
  google: "Google",
251769
252013
  microsoft: "Microsoft",
@@ -251833,8 +252077,8 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
251833
252077
  }
251834
252078
  }
251835
252079
  const { project: project2 } = await readProjectConfig();
251836
- const configDir = dirname13(project2.configPath);
251837
- const authDir = join17(configDir, project2.authDir);
252080
+ const configDir = dirname14(project2.configPath);
252081
+ const authDir = join19(configDir, project2.authDir);
251838
252082
  const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
251839
252083
  if (clientSecret) {
251840
252084
  await runTask2("Saving client secret", async () => pushCustomOAuthSecret(provider, clientSecret));
@@ -251859,7 +252103,7 @@ function getSocialLoginCommand() {
251859
252103
  }
251860
252104
 
251861
252105
  // src/cli/commands/auth/sso.ts
251862
- import { dirname as dirname14, join as join18, resolve as resolve5 } from "node:path";
252106
+ import { dirname as dirname15, join as join20, resolve as resolve5 } from "node:path";
251863
252107
  var SSOConfigFileSchema = exports_external.object({
251864
252108
  provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
251865
252109
  clientId: exports_external.string(),
@@ -252022,8 +252266,8 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
252022
252266
  throw error48;
252023
252267
  }
252024
252268
  const { project: project2 } = await readProjectConfig();
252025
- const configDir = dirname14(project2.configPath);
252026
- const authDir = join18(configDir, project2.authDir);
252269
+ const configDir = dirname15(project2.configPath);
252270
+ const authDir = join20(configDir, project2.authDir);
252027
252271
  await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
252028
252272
  await runTask2("Saving SSO credentials", async () => pushSSOSecrets(secrets));
252029
252273
  return {
@@ -252038,8 +252282,8 @@ async function ssoDisableAction({ log, runTask: runTask2 }, options) {
252038
252282
  throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
252039
252283
  }
252040
252284
  const { project: project2 } = await readProjectConfig();
252041
- const configDir = dirname14(project2.configPath);
252042
- const authDir = join18(configDir, project2.authDir);
252285
+ const configDir = dirname15(project2.configPath);
252286
+ const authDir = join20(configDir, project2.authDir);
252043
252287
  const updated = await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
252044
252288
  await runTask2("Removing SSO credentials", async () => deleteSSOSecrets());
252045
252289
  if (!hasAnyLoginMethod(updated)) {
@@ -252896,13 +253140,13 @@ function getConnectorsListAvailableCommand() {
252896
253140
  }
252897
253141
 
252898
253142
  // src/cli/commands/connectors/pull.ts
252899
- import { dirname as dirname15, join as join19, resolve as resolve6 } from "node:path";
253143
+ import { dirname as dirname16, join as join21, resolve as resolve6 } from "node:path";
252900
253144
  async function resolveConnectorsDir(options) {
252901
253145
  if (!getAppContext().projectRoot) {
252902
253146
  return resolve6(options.dir ?? "connectors");
252903
253147
  }
252904
253148
  const { project: project2 } = await readProjectConfig();
252905
- return join19(dirname15(project2.configPath), project2.connectorsDir);
253149
+ return join21(dirname16(project2.configPath), project2.connectorsDir);
252906
253150
  }
252907
253151
  async function pullConnectorsAction({ log, runTask: runTask2, jsonMode }, options) {
252908
253152
  const connectorsDir = await resolveConnectorsDir(options);
@@ -253023,6 +253267,15 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
253023
253267
  log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
253024
253268
  }
253025
253269
  }
253270
+ const proceed = await confirmPush({
253271
+ isNonInteractive,
253272
+ yes: options.yes,
253273
+ log,
253274
+ warning: "This will overwrite your app's connectors with your local copy and remove any not present locally."
253275
+ });
253276
+ if (!proceed) {
253277
+ return { outroMessage: "Push cancelled" };
253278
+ }
253026
253279
  const { results } = await runTask2("Pushing connectors to Base44", async () => {
253027
253280
  return await pushConnectors(connectors);
253028
253281
  });
@@ -253046,7 +253299,7 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
253046
253299
  return { outroMessage };
253047
253300
  }
253048
253301
  function getConnectorsPushCommand() {
253049
- return new Base44Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").option("--dir <path>", "Directory to read connector files from (default: ./connectors when using --app-id)").action(pushConnectorsAction);
253302
+ return new Base44Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").option("--dir <path>", "Directory to read connector files from (default: ./connectors when using --app-id)").option("-y, --yes", "Skip confirmation prompt").action(pushConnectorsAction);
253050
253303
  }
253051
253304
 
253052
253305
  // src/cli/commands/connectors/index.ts
@@ -253074,16 +253327,22 @@ function getDashboardCommand() {
253074
253327
  }
253075
253328
 
253076
253329
  // src/cli/commands/entities/push.ts
253077
- async function pushEntitiesAction({
253078
- log,
253079
- runTask: runTask2
253080
- }) {
253330
+ async function pushEntitiesAction({ isNonInteractive, log, runTask: runTask2 }, options) {
253081
253331
  const { entities } = await readProjectConfig();
253082
253332
  if (entities.length === 0) {
253083
253333
  return { outroMessage: "No entities found in project" };
253084
253334
  }
253085
253335
  const entityNames = entities.map((e2) => e2.name).join(", ");
253086
253336
  log.info(`Found ${entities.length} entities to push: ${entityNames}`);
253337
+ const proceed = await confirmPush({
253338
+ isNonInteractive,
253339
+ yes: options.yes,
253340
+ log,
253341
+ warning: "This will overwrite your app's entities with your local copy and delete any not present locally."
253342
+ });
253343
+ if (!proceed) {
253344
+ return { outroMessage: "Push cancelled" };
253345
+ }
253087
253346
  const result = await runTask2("Pushing entities to Base44", async () => {
253088
253347
  return await pushEntities(entities);
253089
253348
  }, {
@@ -253102,7 +253361,7 @@ async function pushEntitiesAction({
253102
253361
  return { outroMessage: "Entities pushed to Base44" };
253103
253362
  }
253104
253363
  function getEntitiesPushCommand() {
253105
- return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").action(pushEntitiesAction));
253364
+ return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").option("-y, --yes", "Skip confirmation prompt").action(pushEntitiesAction));
253106
253365
  }
253107
253366
 
253108
253367
  // src/cli/commands/functions/delete.ts
@@ -253295,11 +253554,11 @@ function getListCommand() {
253295
253554
  }
253296
253555
 
253297
253556
  // src/cli/commands/functions/pull.ts
253298
- import { dirname as dirname16, join as join20 } from "node:path";
253557
+ import { dirname as dirname17, join as join22 } from "node:path";
253299
253558
  async function pullFunctionsAction({ log, runTask: runTask2 }, name2) {
253300
253559
  const { project: project2, functions } = await readProjectConfig();
253301
- const configDir = dirname16(project2.configPath);
253302
- const functionsDir = join20(configDir, project2.functionsDir);
253560
+ const configDir = dirname17(project2.configPath);
253561
+ const functionsDir = join22(configDir, project2.functionsDir);
253303
253562
  const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
253304
253563
  const remoteFunctions = await runTask2("Fetching functions from Base44", async () => {
253305
253564
  const { functions: functions2 } = await listDeployedFunctions();
@@ -253362,7 +253621,7 @@ import { basename as basename4, resolve as resolve8 } from "node:path";
253362
253621
  var import_kebabCase = __toESM(require_kebabCase(), 1);
253363
253622
 
253364
253623
  // src/cli/commands/project/scaffold-shared.ts
253365
- import { join as join21 } from "node:path";
253624
+ import { join as join23 } from "node:path";
253366
253625
  var DEFAULT_TEMPLATE_ID = "backend-only";
253367
253626
  async function getTemplateById(templateId) {
253368
253627
  const templates = await listTemplates();
@@ -253421,7 +253680,7 @@ async function completeProjectSetup({
253421
253680
  updateMessage("Building project...");
253422
253681
  await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
253423
253682
  updateMessage("Deploying site...");
253424
- return await deploySite(join21(resolvedPath, outputDirectory));
253683
+ return await deploySite(join23(resolvedPath, outputDirectory));
253425
253684
  }, {
253426
253685
  successMessage: theme.colors.base44Orange("Site deployed successfully"),
253427
253686
  errorMessage: "Failed to deploy site"
@@ -254276,7 +254535,7 @@ function withSandboxAuthHint(error48) {
254276
254535
  cause: error48
254277
254536
  });
254278
254537
  }
254279
- async function callTool(appId, tool, payload, schema11, context, timeout2 = 60000) {
254538
+ async function callTool(appId, tool, payload, schema12, context, timeout2 = 60000) {
254280
254539
  const client = getSandboxClient(appId);
254281
254540
  let response;
254282
254541
  try {
@@ -254284,7 +254543,7 @@ async function callTool(appId, tool, payload, schema11, context, timeout2 = 6000
254284
254543
  } catch (error48) {
254285
254544
  throw withSandboxAuthHint(await ApiError.fromHttpError(error48, context));
254286
254545
  }
254287
- const result = schema11.safeParse(await response.json());
254546
+ const result = schema12.safeParse(await response.json());
254288
254547
  if (!result.success) {
254289
254548
  throw new SchemaValidationError("Invalid response from server", result.error);
254290
254549
  }
@@ -254678,9 +254937,9 @@ async function generateContent(input) {
254678
254937
  `);
254679
254938
  }
254680
254939
  async function compileEntity(entity2) {
254681
- const { name: name2, source: _source, ...schema11 } = entity2;
254940
+ const { name: name2, source: _source, ...schema12 } = entity2;
254682
254941
  const jsonSchema = {
254683
- ...schema11,
254942
+ ...schema12,
254684
254943
  title: name2,
254685
254944
  additionalProperties: false
254686
254945
  };
@@ -254707,10 +254966,10 @@ function toPascalCase(name2) {
254707
254966
  return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
254708
254967
  }
254709
254968
  // src/core/types/update-project.ts
254710
- import { join as join24 } from "node:path";
254969
+ import { join as join26 } from "node:path";
254711
254970
  var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
254712
254971
  async function updateProjectConfig(projectRoot) {
254713
- const tsconfigPath = join24(projectRoot, "tsconfig.json");
254972
+ const tsconfigPath = join26(projectRoot, "tsconfig.json");
254714
254973
  if (!await pathExists(tsconfigPath)) {
254715
254974
  return false;
254716
254975
  }
@@ -254908,7 +255167,7 @@ function getWorkspaceCommand() {
254908
255167
  // src/cli/dev/dev-server/main.ts
254909
255168
  var import_cors = __toESM(require_lib4(), 1);
254910
255169
  var import_express6 = __toESM(require_express(), 1);
254911
- import { dirname as dirname21, join as join27 } from "node:path";
255170
+ import { dirname as dirname22, join as join29 } from "node:path";
254912
255171
 
254913
255172
  // ../../node_modules/get-port/index.js
254914
255173
  import net from "node:net";
@@ -254929,8 +255188,8 @@ var getLocalHosts = () => {
254929
255188
  const interfaces = os9.networkInterfaces();
254930
255189
  const results = new Set([undefined, "0.0.0.0"]);
254931
255190
  for (const _interface of Object.values(interfaces)) {
254932
- for (const config12 of _interface) {
254933
- results.add(config12.address);
255191
+ for (const config13 of _interface) {
255192
+ results.add(config13.address);
254934
255193
  }
254935
255194
  }
254936
255195
  return results;
@@ -255570,22 +255829,22 @@ class Database {
255570
255829
  this.schemas.clear();
255571
255830
  }
255572
255831
  validate(entityName, record2, partial2 = false) {
255573
- const schema11 = this.schemas.get(this.normalizeName(entityName));
255574
- if (!schema11) {
255832
+ const schema12 = this.schemas.get(this.normalizeName(entityName));
255833
+ if (!schema12) {
255575
255834
  throw new Error(`Entity "${entityName}" not found`);
255576
255835
  }
255577
- return this.validator.validate(record2, schema11, partial2);
255836
+ return this.validator.validate(record2, schema12, partial2);
255578
255837
  }
255579
255838
  prepareRecord(entityName, record2, partial2 = false) {
255580
- const schema11 = this.schemas.get(this.normalizeName(entityName));
255581
- if (!schema11) {
255839
+ const schema12 = this.schemas.get(this.normalizeName(entityName));
255840
+ if (!schema12) {
255582
255841
  throw new Error(`Entity "${entityName}" not found`);
255583
255842
  }
255584
- const filteredRecord = this.validator.filterFields(record2, schema11);
255843
+ const filteredRecord = this.validator.filterFields(record2, schema12);
255585
255844
  if (partial2) {
255586
255845
  return filteredRecord;
255587
255846
  }
255588
- return this.validator.applyDefaults(filteredRecord, schema11);
255847
+ return this.validator.applyDefaults(filteredRecord, schema12);
255589
255848
  }
255590
255849
  normalizeName(entityName) {
255591
255850
  return entityName.toLowerCase();
@@ -255879,13 +256138,13 @@ function checkRLS(rule, record2, user) {
255879
256138
  return false;
255880
256139
  return evaluateCondition(rule, record2, user);
255881
256140
  }
255882
- function applyFLS(record2, schema11, user, operation) {
256141
+ function applyFLS(record2, schema12, user, operation) {
255883
256142
  if (Array.isArray(record2)) {
255884
- return record2.map((r5) => applyFLS(r5, schema11, user, operation));
256143
+ return record2.map((r5) => applyFLS(r5, schema12, user, operation));
255885
256144
  }
255886
256145
  const result = {};
255887
256146
  for (const [key2, value] of Object.entries(record2)) {
255888
- const rule = schema11.properties[key2]?.rls?.[operation];
256147
+ const rule = schema12.properties[key2]?.rls?.[operation];
255889
256148
  if (rule === undefined || checkRLS(rule, record2, user)) {
255890
256149
  result[key2] = value;
255891
256150
  }
@@ -256113,14 +256372,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256113
256372
  res.status(404).json({ error: `Entity "${entityName}" not found` });
256114
256373
  return;
256115
256374
  }
256116
- const schema11 = db2.getSchema(entityName);
256117
- if (!schema11) {
256375
+ const schema12 = db2.getSchema(entityName);
256376
+ if (!schema12) {
256118
256377
  res.status(404).json({ error: `Schema for "${entityName}" not found` });
256119
256378
  return;
256120
256379
  }
256121
256380
  const currentUserResult = await resolveCurrentUser(db2, req);
256122
256381
  const currentUser = currentUserResult.ok ? currentUserResult.user : undefined;
256123
- await handler(req, res, collection, schema11, currentUser);
256382
+ await handler(req, res, collection, schema12, currentUser);
256124
256383
  };
256125
256384
  }
256126
256385
  function emit(appId, entityName, type, data) {
@@ -256138,19 +256397,19 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256138
256397
  }
256139
256398
  broadcast(appId, entityName, createData(data));
256140
256399
  }
256141
- function prepareCreateRecord(entityName, body, schema11, currentUser, now) {
256400
+ function prepareCreateRecord(entityName, body, schema12, currentUser, now) {
256142
256401
  const { _id, ...recordBody } = body;
256143
256402
  const ownerFields = {
256144
256403
  created_by: currentUser?.email,
256145
256404
  created_by_id: currentUser?.id
256146
256405
  };
256147
- if (!checkRLS(schema11.rls?.create, {
256406
+ if (!checkRLS(schema12.rls?.create, {
256148
256407
  ...recordBody,
256149
256408
  ...ownerFields
256150
256409
  }, currentUser)) {
256151
256410
  return;
256152
256411
  }
256153
- const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema11, currentUser, "write");
256412
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema12, currentUser, "write");
256154
256413
  db2.validate(entityName, filteredBody);
256155
256414
  return {
256156
256415
  ...filteredBody,
@@ -256162,7 +256421,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256162
256421
  }
256163
256422
  const userRouter = createUserRouter(db2, logger2);
256164
256423
  router.use("/User", userRouter);
256165
- router.get("/:entityName/:id", withCollection(async (req, res, collection, schema11, currentUser) => {
256424
+ router.get("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
256166
256425
  const { entityName, id: id2 } = req.params;
256167
256426
  try {
256168
256427
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -256170,27 +256429,27 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256170
256429
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256171
256430
  return;
256172
256431
  }
256173
- if (!checkRLS(schema11.rls?.read, doc2, currentUser)) {
256432
+ if (!checkRLS(schema12.rls?.read, doc2, currentUser)) {
256174
256433
  res.status(404).json({
256175
256434
  message: `Entity ${entityName} with ID ${id2} not found`
256176
256435
  });
256177
256436
  return;
256178
256437
  }
256179
- const result = applyFLS(stripInternalFields(doc2), schema11, currentUser, "read");
256438
+ const result = applyFLS(stripInternalFields(doc2), schema12, currentUser, "read");
256180
256439
  res.json(result);
256181
256440
  } catch (error48) {
256182
256441
  logger2.error(`Error in GET /${entityName}/${id2}:`, error48);
256183
256442
  res.status(500).json({ error: "Internal server error" });
256184
256443
  }
256185
256444
  }));
256186
- router.get("/:entityName", withCollection(async (req, res, collection, schema11, currentUser) => {
256445
+ router.get("/:entityName", withCollection(async (req, res, collection, schema12, currentUser) => {
256187
256446
  const { entityName } = req.params;
256188
256447
  try {
256189
256448
  let results = stripInternalFields(await queryEntity(collection, req.query));
256190
- if (schema11.rls?.read !== undefined && schema11.rls.read !== true) {
256191
- results = results.filter((doc2) => checkRLS(schema11.rls.read, doc2, currentUser));
256449
+ if (schema12.rls?.read !== undefined && schema12.rls.read !== true) {
256450
+ results = results.filter((doc2) => checkRLS(schema12.rls.read, doc2, currentUser));
256192
256451
  }
256193
- results = results.map((doc2) => applyFLS(doc2, schema11, currentUser, "read"));
256452
+ results = results.map((doc2) => applyFLS(doc2, schema12, currentUser, "read"));
256194
256453
  res.json(results);
256195
256454
  } catch (error48) {
256196
256455
  if (error48 instanceof InvalidInputError) {
@@ -256201,16 +256460,16 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256201
256460
  }
256202
256461
  }
256203
256462
  }));
256204
- router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256463
+ router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256205
256464
  const { appId, entityName } = req.params;
256206
256465
  try {
256207
256466
  const now = new Date().toISOString();
256208
- const record2 = prepareCreateRecord(entityName, req.body, schema11, currentUser, now);
256467
+ const record2 = prepareCreateRecord(entityName, req.body, schema12, currentUser, now);
256209
256468
  if (!record2) {
256210
256469
  res.status(403).json({ error: "Permission denied" });
256211
256470
  return;
256212
256471
  }
256213
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema11, currentUser, "read");
256472
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema12, currentUser, "read");
256214
256473
  emit(appId, entityName, "create", inserted);
256215
256474
  res.status(201).json(inserted);
256216
256475
  } catch (error48) {
@@ -256222,7 +256481,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256222
256481
  res.status(500).json({ error: "Internal server error" });
256223
256482
  }
256224
256483
  }));
256225
- router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256484
+ router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256226
256485
  const { appId, entityName } = req.params;
256227
256486
  if (!Array.isArray(req.body)) {
256228
256487
  res.status(400).json({ error: "Request body must be an array" });
@@ -256232,14 +256491,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256232
256491
  const now = new Date().toISOString();
256233
256492
  const records = [];
256234
256493
  for (const body of req.body) {
256235
- const record2 = prepareCreateRecord(entityName, body, schema11, currentUser, now);
256494
+ const record2 = prepareCreateRecord(entityName, body, schema12, currentUser, now);
256236
256495
  if (!record2) {
256237
256496
  res.status(403).json({ error: "Permission denied" });
256238
256497
  return;
256239
256498
  }
256240
256499
  records.push(record2);
256241
256500
  }
256242
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema11, currentUser, "read");
256501
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema12, currentUser, "read");
256243
256502
  emit(appId, entityName, "create", inserted);
256244
256503
  res.status(201).json(inserted);
256245
256504
  } catch (error48) {
@@ -256251,24 +256510,24 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256251
256510
  res.status(500).json({ error: "Internal server error" });
256252
256511
  }
256253
256512
  }));
256254
- router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256513
+ router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256255
256514
  const { appId, entityName, id: id2 } = req.params;
256256
256515
  const { id: _id, created_date: _created_date, ...body } = req.body;
256257
256516
  try {
256258
- if (schema11.rls?.update !== undefined) {
256517
+ if (schema12.rls?.update !== undefined) {
256259
256518
  const existing = await collection.findOneAsync({ id: id2 });
256260
256519
  if (!existing) {
256261
256520
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256262
256521
  return;
256263
256522
  }
256264
- if (!checkRLS(schema11.rls.update, existing, currentUser)) {
256523
+ if (!checkRLS(schema12.rls.update, existing, currentUser)) {
256265
256524
  res.status(404).json({
256266
256525
  message: `Entity ${entityName} with ID ${id2} not found`
256267
256526
  });
256268
256527
  return;
256269
256528
  }
256270
256529
  }
256271
- const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema11, currentUser, "write");
256530
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema12, currentUser, "write");
256272
256531
  db2.validate(entityName, filteredBody, true);
256273
256532
  const updateData = {
256274
256533
  ...filteredBody,
@@ -256279,7 +256538,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256279
256538
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256280
256539
  return;
256281
256540
  }
256282
- const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema11, currentUser, "read");
256541
+ const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema12, currentUser, "read");
256283
256542
  emit(appId, entityName, "update", updated);
256284
256543
  res.json(updated);
256285
256544
  } catch (error48) {
@@ -256291,7 +256550,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256291
256550
  res.status(500).json({ error: "Internal server error" });
256292
256551
  }
256293
256552
  }));
256294
- router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema11, currentUser) => {
256553
+ router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
256295
256554
  const { appId, entityName, id: id2 } = req.params;
256296
256555
  try {
256297
256556
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -256299,7 +256558,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256299
256558
  res.status(404).json({ error: `Record with id "${id2}" not found` });
256300
256559
  return;
256301
256560
  }
256302
- if (!checkRLS(schema11.rls?.delete, doc2, currentUser)) {
256561
+ if (!checkRLS(schema12.rls?.delete, doc2, currentUser)) {
256303
256562
  res.status(404).json({
256304
256563
  message: `Entity ${entityName} with ID ${id2} not found`
256305
256564
  });
@@ -256313,11 +256572,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
256313
256572
  res.status(500).json({ error: "Internal server error" });
256314
256573
  }
256315
256574
  }));
256316
- router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema11, currentUser) => {
256575
+ router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
256317
256576
  const { entityName } = req.params;
256318
256577
  try {
256319
256578
  const query = req.body || {};
256320
- const rlsDelete = schema11?.rls?.delete;
256579
+ const rlsDelete = schema12?.rls?.delete;
256321
256580
  if (rlsDelete !== undefined && rlsDelete !== true) {
256322
256581
  if (rlsDelete === false && currentUser?.is_service !== true) {
256323
256582
  res.status(403).json({ error: "Permission denied" });
@@ -256434,15 +256693,12 @@ function createCustomIntegrationRoutes(remoteProxy, logger2) {
256434
256693
  // src/cli/dev/dev-server/serve-runner.ts
256435
256694
  import { spawn as spawn3 } from "node:child_process";
256436
256695
  import process21 from "node:process";
256437
- var LOCALHOST_URL = /https?:\/\/(?:localhost|127\.0\.0\.1):\d+/;
256438
256696
 
256439
256697
  class ServeRunner {
256440
256698
  command;
256441
256699
  cwd;
256442
256700
  env;
256443
256701
  logger;
256444
- onUrl;
256445
- urlReported = false;
256446
256702
  child;
256447
256703
  stopping = false;
256448
256704
  stopPromise;
@@ -256452,7 +256708,6 @@ class ServeRunner {
256452
256708
  this.cwd = options8.cwd;
256453
256709
  this.env = options8.env;
256454
256710
  this.logger = options8.logger;
256455
- this.onUrl = options8.onUrl;
256456
256711
  }
256457
256712
  start() {
256458
256713
  if (this.child) {
@@ -256533,20 +256788,9 @@ class ServeRunner {
256533
256788
  this.logger.error(line3);
256534
256789
  } else {
256535
256790
  this.logger.log(line3);
256536
- this.reportUrl(line3);
256537
256791
  }
256538
256792
  }
256539
256793
  }
256540
- reportUrl(line3) {
256541
- if (this.urlReported || !this.onUrl) {
256542
- return;
256543
- }
256544
- const match = line3.match(LOCALHOST_URL);
256545
- if (match) {
256546
- this.urlReported = true;
256547
- this.onUrl(match[0]);
256548
- }
256549
- }
256550
256794
  }
256551
256795
 
256552
256796
  // src/cli/dev/dev-server/watcher.ts
@@ -257281,9 +257525,9 @@ class NodeFsHandler {
257281
257525
  if (this.fsw.closed) {
257282
257526
  return;
257283
257527
  }
257284
- const dirname20 = sp2.dirname(file2);
257528
+ const dirname21 = sp2.dirname(file2);
257285
257529
  const basename7 = sp2.basename(file2);
257286
- const parent = this.fsw._getWatchedDir(dirname20);
257530
+ const parent = this.fsw._getWatchedDir(dirname21);
257287
257531
  let prevStats = stats;
257288
257532
  if (parent.has(basename7))
257289
257533
  return;
@@ -257310,7 +257554,7 @@ class NodeFsHandler {
257310
257554
  prevStats = newStats2;
257311
257555
  }
257312
257556
  } catch (error48) {
257313
- this.fsw._remove(dirname20, basename7);
257557
+ this.fsw._remove(dirname21, basename7);
257314
257558
  }
257315
257559
  } else if (parent.has(basename7)) {
257316
257560
  const at13 = newStats.atimeMs;
@@ -258343,8 +258587,8 @@ async function createDevServer(options8) {
258343
258587
  broadcastEntityEvent(io6, appId, entityName, event);
258344
258588
  };
258345
258589
  const base44ConfigWatcher = new WatchBase44({
258346
- functions: join27(dirname21(project2.configPath), project2.functionsDir),
258347
- entities: join27(dirname21(project2.configPath), project2.entitiesDir)
258590
+ functions: join29(dirname22(project2.configPath), project2.functionsDir),
258591
+ entities: join29(dirname22(project2.configPath), project2.entitiesDir)
258348
258592
  }, devLogger);
258349
258593
  base44ConfigWatcher.on("change", async (name2) => {
258350
258594
  try {
@@ -258386,8 +258630,7 @@ async function createDevServer(options8) {
258386
258630
  VITE_BASE44_APP_ID: options8.appId,
258387
258631
  VITE_BASE44_APP_BASE_URL: baseUrl
258388
258632
  },
258389
- logger: createDevLogger("frontend", theme.colors.base44Orange),
258390
- onUrl: (url3) => devLogger.log(`Open your app in the browser: ${theme.colors.links(url3)}`)
258633
+ logger: createDevLogger("frontend", theme.colors.base44Orange)
258391
258634
  });
258392
258635
  }
258393
258636
  const handleShutdownError = (error48) => {
@@ -258463,7 +258706,7 @@ async function devAction(ctx, options8) {
258463
258706
  return { functions, entities, project: project2, siteUrl };
258464
258707
  }
258465
258708
  });
258466
- const outroMessage = isServingFrontend ? "Open your app in the browser once the frontend URL is printed" : `Dev server is available at ${theme.colors.links(localServerUrl(resolvedPort))}`;
258709
+ const outroMessage = isServingFrontend ? "Open your app using the frontend dev server URL" : `Dev server is available at ${theme.colors.links(localServerUrl(resolvedPort))}`;
258467
258710
  return { outroMessage };
258468
258711
  }
258469
258712
  function getDevCommand() {
@@ -258474,7 +258717,7 @@ function getDevCommand() {
258474
258717
  import { spawn as spawn4 } from "node:child_process";
258475
258718
  import { copyFileSync, writeFileSync as writeFileSync2 } from "node:fs";
258476
258719
  async function runScript(options8) {
258477
- const { appId, code: code2, local } = options8;
258720
+ const { appId, code: code2, local, privileged, dataEnv } = options8;
258478
258721
  verifyDenoInstalled("to run scripts with exec");
258479
258722
  const cleanupFns = [];
258480
258723
  const tempScript = await $file({ postfix: ".ts" });
@@ -258493,7 +258736,9 @@ async function runScript(options8) {
258493
258736
  SCRIPT_PATH: scriptPath,
258494
258737
  BASE44_APP_ID: appId,
258495
258738
  BASE44_ACCESS_TOKEN: appUserToken,
258496
- BASE44_APP_BASE_URL: appBaseUrl
258739
+ BASE44_APP_BASE_URL: appBaseUrl,
258740
+ ...privileged ? { BASE44_PRIVILEGED: "true" } : {},
258741
+ ...dataEnv ? { BASE44_DATA_ENV: dataEnv } : {}
258497
258742
  },
258498
258743
  stdio: "inherit"
258499
258744
  });
@@ -258558,14 +258803,20 @@ async function execAction({ app, isNonInteractive }, options8) {
258558
258803
  throw noInputError;
258559
258804
  }
258560
258805
  const local = options8.local ? await resolveLocalTarget(options8.port !== undefined ? parsePort(options8.port) : DEFAULT_DEV_SERVER_PORT) : undefined;
258561
- const { exitCode } = await runScript({ appId: app.id, code: code2, local });
258806
+ const { exitCode } = await runScript({
258807
+ appId: app.id,
258808
+ code: code2,
258809
+ local,
258810
+ privileged: options8.privileged,
258811
+ dataEnv: options8.dataEnv
258812
+ });
258562
258813
  if (exitCode !== 0) {
258563
258814
  process.exitCode = exitCode;
258564
258815
  }
258565
258816
  return {};
258566
258817
  }
258567
258818
  function getExecCommand() {
258568
- return new Base44Command("exec").description("Run a script with the Base44 SDK pre-authenticated as the current user").option("--local", "Run against the local `base44 dev` server instead of the deployed app").option("--port <number>", `Port the local dev server is on (with --local; defaults to ${DEFAULT_DEV_SERVER_PORT})`).addHelpText("after", `
258819
+ return new Base44Command("exec").description("Run a script with the Base44 SDK pre-authenticated as the current user").option("--local", "Run against the local `base44 dev` server instead of the deployed app").option("--port <number>", `Port the local dev server is on (with --local; defaults to ${DEFAULT_DEV_SERVER_PORT})`).option("--privileged", "Run with admin privileges (bypass RLS). Requires app owner/editor role.").option("--data-env <environment>", "Data environment to run against (e.g. dev, prod)").addHelpText("after", `
258569
258820
  Examples:
258570
258821
  Run a script file:
258571
258822
  $ cat ./script.ts | base44 exec
@@ -258574,7 +258825,10 @@ Examples:
258574
258825
  $ echo "const users = await base44.entities.User.list()" | base44 exec
258575
258826
 
258576
258827
  Against the local dev server (base44 dev must be running):
258577
- $ echo "await base44.entities.Task.create({ title: 'seed' })" | base44 exec --local`).action(execAction);
258828
+ $ echo "await base44.entities.Task.create({ title: 'seed' })" | base44 exec --local
258829
+
258830
+ With privileged access (bypass RLS):
258831
+ $ echo "const all = await base44.entities.Task.list()" | base44 exec --privileged`).action(execAction);
258578
258832
  }
258579
258833
 
258580
258834
  // src/cli/commands/project/eject.ts
@@ -258711,6 +258965,7 @@ function createProgram(context) {
258711
258965
  program2.addCommand(getWorkspaceCommand());
258712
258966
  program2.addCommand(getEntitiesPushCommand());
258713
258967
  program2.addCommand(getAgentsCommand());
258968
+ program2.addCommand(getAgentSkillsCommand());
258714
258969
  program2.addCommand(getConnectorsCommand());
258715
258970
  program2.addCommand(getFunctionsCommand());
258716
258971
  program2.addCommand(getSecretsCommand());
@@ -258729,7 +258984,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
258729
258984
  import { release, type } from "node:os";
258730
258985
 
258731
258986
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
258732
- import { dirname as dirname22, posix, sep } from "path";
258987
+ import { dirname as dirname23, posix, sep } from "path";
258733
258988
  function createModulerModifier() {
258734
258989
  const getModuleFromFileName = createGetModuleFromFilename();
258735
258990
  return async (frames) => {
@@ -258738,7 +258993,7 @@ function createModulerModifier() {
258738
258993
  return frames;
258739
258994
  };
258740
258995
  }
258741
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname22(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
258996
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname23(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
258742
258997
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
258743
258998
  return (filename) => {
258744
258999
  if (!filename)
@@ -262927,9 +263182,9 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
262927
263182
  });
262928
263183
  }
262929
263184
  // src/cli/index.ts
262930
- var __dirname4 = dirname23(fileURLToPath6(import.meta.url));
263185
+ var __dirname4 = dirname24(fileURLToPath6(import.meta.url));
262931
263186
  async function runCLI(options8) {
262932
- ensureNpmAssets(join28(__dirname4, "../assets"));
263187
+ ensureNpmAssets(join30(__dirname4, "../assets"));
262933
263188
  const errorReporter = new ErrorReporter;
262934
263189
  errorReporter.registerProcessErrorHandlers();
262935
263190
  const jsonMode = process.argv.includes("--json");
@@ -262968,4 +263223,4 @@ export {
262968
263223
  CLIExitError
262969
263224
  };
262970
263225
 
262971
- //# debugId=F062A81759675D6F64756E2164756E21
263226
+ //# debugId=8336FC5974E395C864756E2164756E21