@base44-preview/cli 0.1.7-pr.568.c08ba20 → 0.1.7-pr.584.aff66d4

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
@@ -31176,7 +31176,7 @@ function cleanDoc(doc2) {
31176
31176
  return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc));
31177
31177
  }
31178
31178
  function replaceEndOfLine(doc2, replacement = literalline) {
31179
- return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join24(replacement, currentDoc.split(`
31179
+ return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join26(replacement, currentDoc.split(`
31180
31180
  `)) : currentDoc);
31181
31181
  }
31182
31182
  function canBreakFn(doc2) {
@@ -31256,7 +31256,7 @@ function indentIfBreak(contents, options) {
31256
31256
  negate: options.negate
31257
31257
  };
31258
31258
  }
31259
- function join24(separator, docs) {
31259
+ function join26(separator, docs) {
31260
31260
  assertDoc(separator);
31261
31261
  assertDocArray(docs);
31262
31262
  const parts = [];
@@ -31967,7 +31967,7 @@ var init_doc = __esm(() => {
31967
31967
  MODE_FLAT = Symbol("MODE_FLAT");
31968
31968
  DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
31969
31969
  builders = {
31970
- join: join24,
31970
+ join: join26,
31971
31971
  line,
31972
31972
  softline,
31973
31973
  hardline,
@@ -119578,11 +119578,11 @@ function chooseDescription(descriptions, printWidth) {
119578
119578
  return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription;
119579
119579
  }
119580
119580
  function createSchema(SchemaConstructor, parameters) {
119581
- const schema12 = new SchemaConstructor(parameters);
119582
- const subSchema = Object.create(schema12);
119581
+ const schema13 = new SchemaConstructor(parameters);
119582
+ const subSchema = Object.create(schema13);
119583
119583
  for (const handlerKey of HANDLER_KEYS) {
119584
119584
  if (handlerKey in parameters) {
119585
- subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema12, Schema2.prototype[handlerKey].length);
119585
+ subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema13, Schema2.prototype[handlerKey].length);
119586
119586
  }
119587
119587
  }
119588
119588
  return subSchema;
@@ -120385,7 +120385,7 @@ function skipVoid(str, ptr, banNewLines, banComments) {
120385
120385
  ptr++;
120386
120386
  return banComments || c24 !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
120387
120387
  }
120388
- function skipUntil(str, ptr, sep, end, banNewLines = false) {
120388
+ function skipUntil(str, ptr, sep2, end, banNewLines = false) {
120389
120389
  if (!end) {
120390
120390
  ptr = indexOfNewline(str, ptr);
120391
120391
  return ptr < 0 ? str.length : ptr;
@@ -120394,7 +120394,7 @@ function skipUntil(str, ptr, sep, end, banNewLines = false) {
120394
120394
  let c24 = str[i5];
120395
120395
  if (c24 === "#") {
120396
120396
  i5 = indexOfNewline(str, i5);
120397
- } else if (c24 === sep) {
120397
+ } else if (c24 === sep2) {
120398
120398
  return i5 + 1;
120399
120399
  } else if (c24 === end || banNewLines && (c24 === `
120400
120400
  ` || c24 === "\r" && str[i5 + 1] === `
@@ -120896,7 +120896,7 @@ function parse42(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
120896
120896
  }
120897
120897
  return res;
120898
120898
  }
120899
- async function readFile3(file2) {
120899
+ async function readFile6(file2) {
120900
120900
  if (isUrlString(file2)) {
120901
120901
  file2 = new URL(file2);
120902
120902
  }
@@ -121174,7 +121174,7 @@ function getDataProtocolModuleFormat(parsed) {
121174
121174
  const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null, null];
121175
121175
  return mimeToFormat(mime);
121176
121176
  }
121177
- function extname(url3) {
121177
+ function extname2(url3) {
121178
121178
  const pathname = url3.pathname;
121179
121179
  let index = pathname.length;
121180
121180
  while (index--) {
@@ -121189,7 +121189,7 @@ function extname(url3) {
121189
121189
  return "";
121190
121190
  }
121191
121191
  function getFileProtocolModuleFormat(url3, _context, ignoreErrors) {
121192
- const value = extname(url3);
121192
+ const value = extname2(url3);
121193
121193
  if (value === ".js") {
121194
121194
  const packageType = getPackageType(url3);
121195
121195
  if (packageType !== "none") {
@@ -121650,8 +121650,8 @@ function packageResolve(specifier, base, conditions) {
121650
121650
  let packageJsonPath = fileURLToPath42(packageJsonUrl);
121651
121651
  let lastPath;
121652
121652
  do {
121653
- const stat2 = tryStatSync(packageJsonPath.slice(0, -13));
121654
- if (!stat2 || !stat2.isDirectory()) {
121653
+ const stat22 = tryStatSync(packageJsonPath.slice(0, -13));
121654
+ if (!stat22 || !stat22.isDirectory()) {
121655
121655
  lastPath = packageJsonPath;
121656
121656
  packageJsonUrl = new URL((isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", packageJsonUrl);
121657
121657
  packageJsonPath = fileURLToPath42(packageJsonUrl);
@@ -122922,9 +122922,9 @@ function optionInfoToSchema(optionInfo, {
122922
122922
  throw new Error(`Unexpected type ${optionInfo.type}`);
122923
122923
  }
122924
122924
  if (optionInfo.exception) {
122925
- parameters.validate = (value, schema12, utils3) => optionInfo.exception(value) || schema12.validate(value, utils3);
122925
+ parameters.validate = (value, schema13, utils3) => optionInfo.exception(value) || schema13.validate(value, utils3);
122926
122926
  } else {
122927
- parameters.validate = (value, schema12, utils3) => value === undefined || schema12.validate(value, utils3);
122927
+ parameters.validate = (value, schema13, utils3) => value === undefined || schema13.validate(value, utils3);
122928
122928
  }
122929
122929
  if (optionInfo.redirect) {
122930
122930
  handlers.redirect = (value) => !value ? undefined : {
@@ -122939,7 +122939,7 @@ function optionInfoToSchema(optionInfo, {
122939
122939
  }
122940
122940
  if (isCLI && !optionInfo.array) {
122941
122941
  const originalPreprocess = parameters.preprocess || ((x10) => x10);
122942
- parameters.preprocess = (value, schema12, utils3) => schema12.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122942
+ parameters.preprocess = (value, schema13, utils3) => schema13.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122943
122943
  }
122944
122944
  return optionInfo.array ? ArraySchema.create({
122945
122945
  ...isCLI ? {
@@ -123904,14 +123904,14 @@ async function printToDoc(originalText, options8) {
123904
123904
  async function printDocToString2(doc2, options8) {
123905
123905
  return printDocToStringWithoutNormalizeOptions(doc2, await normalize_format_options_default(options8));
123906
123906
  }
123907
- function createParsersAndPrinters(modules) {
123907
+ function createParsersAndPrinters(modules2) {
123908
123908
  const parsers2 = /* @__PURE__ */ Object.create(null);
123909
123909
  const printers2 = /* @__PURE__ */ Object.create(null);
123910
123910
  for (const {
123911
123911
  importPlugin: importPlugin2,
123912
123912
  parsers: parserNames = [],
123913
123913
  printers: printerNames = []
123914
- } of modules) {
123914
+ } of modules2) {
123915
123915
  const loadPlugin2 = async () => {
123916
123916
  const plugin = await importPlugin2();
123917
123917
  Object.assign(parsers2, plugin.parsers);
@@ -124516,9 +124516,9 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124516
124516
  };
124517
124517
  applyNormalization();
124518
124518
  for (const key2 of Object.keys(this._utils.schemas)) {
124519
- const schema12 = this._utils.schemas[key2];
124519
+ const schema13 = this._utils.schemas[key2];
124520
124520
  if (!(key2 in newOptions)) {
124521
- const defaultResult = normalizeDefaultResult(schema12.default(this._utils));
124521
+ const defaultResult = normalizeDefaultResult(schema13.default(this._utils));
124522
124522
  if ("value" in defaultResult) {
124523
124523
  restOptionsArray.push({ [key2]: defaultResult.value });
124524
124524
  }
@@ -124529,13 +124529,13 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124529
124529
  if (!(key2 in newOptions)) {
124530
124530
  continue;
124531
124531
  }
124532
- const schema12 = this._utils.schemas[key2];
124532
+ const schema13 = this._utils.schemas[key2];
124533
124533
  const value = newOptions[key2];
124534
- const newValue = schema12.postprocess(value, this._utils);
124534
+ const newValue = schema13.postprocess(value, this._utils);
124535
124535
  if (newValue === VALUE_UNCHANGED) {
124536
124536
  continue;
124537
124537
  }
124538
- this._applyValidation(newValue, key2, schema12);
124538
+ this._applyValidation(newValue, key2, schema13);
124539
124539
  newOptions[key2] = newValue;
124540
124540
  }
124541
124541
  this._applyPostprocess(newOptions);
@@ -124546,14 +124546,14 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124546
124546
  const transferredOptionsArray = [];
124547
124547
  const { knownKeys, unknownKeys } = this._partitionOptionKeys(options8);
124548
124548
  for (const key2 of knownKeys) {
124549
- const schema12 = this._utils.schemas[key2];
124550
- const value = schema12.preprocess(options8[key2], this._utils);
124551
- this._applyValidation(value, key2, schema12);
124549
+ const schema13 = this._utils.schemas[key2];
124550
+ const value = schema13.preprocess(options8[key2], this._utils);
124551
+ this._applyValidation(value, key2, schema13);
124552
124552
  const appendTransferredOptions = ({ from, to: to5 }) => {
124553
124553
  transferredOptionsArray.push(typeof to5 === "string" ? { [to5]: from } : { [to5.key]: to5.value });
124554
124554
  };
124555
124555
  const warnDeprecated = ({ value: currentValue, redirectTo }) => {
124556
- const deprecatedResult = normalizeDeprecatedResult(schema12.deprecated(currentValue, this._utils), value, true);
124556
+ const deprecatedResult = normalizeDeprecatedResult(schema13.deprecated(currentValue, this._utils), value, true);
124557
124557
  if (deprecatedResult === false) {
124558
124558
  return;
124559
124559
  }
@@ -124571,13 +124571,13 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124571
124571
  }
124572
124572
  }
124573
124573
  };
124574
- const forwardResult = normalizeForwardResult(schema12.forward(value, this._utils), value);
124574
+ const forwardResult = normalizeForwardResult(schema13.forward(value, this._utils), value);
124575
124575
  forwardResult.forEach(appendTransferredOptions);
124576
- const redirectResult = normalizeRedirectResult(schema12.redirect(value, this._utils), value);
124576
+ const redirectResult = normalizeRedirectResult(schema13.redirect(value, this._utils), value);
124577
124577
  redirectResult.redirect.forEach(appendTransferredOptions);
124578
124578
  if ("remain" in redirectResult) {
124579
124579
  const remainingValue = redirectResult.remain;
124580
- newOptions[key2] = key2 in newOptions ? schema12.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124580
+ newOptions[key2] = key2 in newOptions ? schema13.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124581
124581
  warnDeprecated({ value: remainingValue });
124582
124582
  }
124583
124583
  for (const { from, to: to5 } of redirectResult.redirect) {
@@ -124605,8 +124605,8 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124605
124605
  const [knownKeys, unknownKeys] = partition(Object.keys(options8).filter((key2) => !this._identifyMissing(key2, options8)), (key2) => (key2 in this._utils.schemas));
124606
124606
  return { knownKeys, unknownKeys };
124607
124607
  }
124608
- _applyValidation(value, key2, schema12) {
124609
- const validateResult = normalizeValidateResult(schema12.validate(value, this._utils), value);
124608
+ _applyValidation(value, key2, schema13) {
124609
+ const validateResult = normalizeValidateResult(schema13.validate(value, this._utils), value);
124610
124610
  if (validateResult !== true) {
124611
124611
  throw this._invalidHandler(key2, validateResult.value, this._utils);
124612
124612
  }
@@ -124648,8 +124648,8 @@ var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc2,
124648
124648
  for (const key2 of unknownKeys) {
124649
124649
  const value = postprocessed.override[key2];
124650
124650
  this._applyUnknownHandler(key2, value, options8, (knownResultKey, knownResultValue) => {
124651
- const schema12 = this._utils.schemas[knownResultKey];
124652
- this._applyValidation(knownResultValue, knownResultKey, schema12);
124651
+ const schema13 = this._utils.schemas[knownResultKey];
124652
+ this._applyValidation(knownResultValue, knownResultKey, schema13);
124653
124653
  options8[knownResultKey] = knownResultValue;
124654
124654
  });
124655
124655
  }
@@ -128293,7 +128293,7 @@ var init_prettier = __esm(() => {
128293
128293
  callSuccessCallback(callback, lstat2);
128294
128294
  return;
128295
128295
  }
128296
- settings.fs.stat(path152, (statError, stat2) => {
128296
+ settings.fs.stat(path152, (statError, stat22) => {
128297
128297
  if (statError !== null) {
128298
128298
  if (settings.throwErrorOnBrokenSymbolicLink) {
128299
128299
  callFailureCallback(callback, statError);
@@ -128303,9 +128303,9 @@ var init_prettier = __esm(() => {
128303
128303
  return;
128304
128304
  }
128305
128305
  if (settings.markSymbolicLink) {
128306
- stat2.isSymbolicLink = () => true;
128306
+ stat22.isSymbolicLink = () => true;
128307
128307
  }
128308
- callSuccessCallback(callback, stat2);
128308
+ callSuccessCallback(callback, stat22);
128309
128309
  });
128310
128310
  });
128311
128311
  }
@@ -128328,11 +128328,11 @@ var init_prettier = __esm(() => {
128328
128328
  return lstat2;
128329
128329
  }
128330
128330
  try {
128331
- const stat2 = settings.fs.statSync(path152);
128331
+ const stat22 = settings.fs.statSync(path152);
128332
128332
  if (settings.markSymbolicLink) {
128333
- stat2.isSymbolicLink = () => true;
128333
+ stat22.isSymbolicLink = () => true;
128334
128334
  }
128335
- return stat2;
128335
+ return stat22;
128336
128336
  } catch (error48) {
128337
128337
  if (!settings.throwErrorOnBrokenSymbolicLink) {
128338
128338
  return lstat2;
@@ -128390,14 +128390,14 @@ var init_prettier = __esm(() => {
128390
128390
  var sync = require_sync7();
128391
128391
  var settings_1 = require_settings5();
128392
128392
  exports.Settings = settings_1.default;
128393
- function stat2(path152, optionsOrSettingsOrCallback, callback) {
128393
+ function stat22(path152, optionsOrSettingsOrCallback, callback) {
128394
128394
  if (typeof optionsOrSettingsOrCallback === "function") {
128395
128395
  async.read(path152, getSettings(), optionsOrSettingsOrCallback);
128396
128396
  return;
128397
128397
  }
128398
128398
  async.read(path152, getSettings(optionsOrSettingsOrCallback), callback);
128399
128399
  }
128400
- exports.stat = stat2;
128400
+ exports.stat = stat22;
128401
128401
  function statSync22(path152, optionsOrSettings) {
128402
128402
  const settings = getSettings(optionsOrSettings);
128403
128403
  return sync.read(path152, settings);
@@ -128544,7 +128544,7 @@ var init_prettier = __esm(() => {
128544
128544
  readdirWithFileTypes(directory, settings, callback);
128545
128545
  return;
128546
128546
  }
128547
- readdir2(directory, settings, callback);
128547
+ readdir3(directory, settings, callback);
128548
128548
  }
128549
128549
  exports.read = read3;
128550
128550
  function readdirWithFileTypes(directory, settings, callback) {
@@ -128593,7 +128593,7 @@ var init_prettier = __esm(() => {
128593
128593
  });
128594
128594
  };
128595
128595
  }
128596
- function readdir2(directory, settings, callback) {
128596
+ function readdir3(directory, settings, callback) {
128597
128597
  settings.fs.readdir(directory, (readdirError, names) => {
128598
128598
  if (readdirError !== null) {
128599
128599
  callFailureCallback(callback, readdirError);
@@ -128628,7 +128628,7 @@ var init_prettier = __esm(() => {
128628
128628
  });
128629
128629
  });
128630
128630
  }
128631
- exports.readdir = readdir2;
128631
+ exports.readdir = readdir3;
128632
128632
  function callFailureCallback(callback, error48) {
128633
128633
  callback(error48);
128634
128634
  }
@@ -128649,7 +128649,7 @@ var init_prettier = __esm(() => {
128649
128649
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
128650
128650
  return readdirWithFileTypes(directory, settings);
128651
128651
  }
128652
- return readdir2(directory, settings);
128652
+ return readdir3(directory, settings);
128653
128653
  }
128654
128654
  exports.read = read3;
128655
128655
  function readdirWithFileTypes(directory, settings) {
@@ -128674,7 +128674,7 @@ var init_prettier = __esm(() => {
128674
128674
  });
128675
128675
  }
128676
128676
  exports.readdirWithFileTypes = readdirWithFileTypes;
128677
- function readdir2(directory, settings) {
128677
+ function readdir3(directory, settings) {
128678
128678
  const names = settings.fs.readdirSync(directory);
128679
128679
  return names.map((name2) => {
128680
128680
  const entryPath = common2.joinPathSegments(directory, name2, settings.pathSegmentSeparator);
@@ -128690,7 +128690,7 @@ var init_prettier = __esm(() => {
128690
128690
  return entry;
128691
128691
  });
128692
128692
  }
128693
- exports.readdir = readdir2;
128693
+ exports.readdir = readdir3;
128694
128694
  }
128695
128695
  });
128696
128696
  require_fs42 = __commonJS2({
@@ -134690,7 +134690,7 @@ ${codeblock}`, options8);
134690
134690
  "\\": "\\"
134691
134691
  };
134692
134692
  KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
134693
- read_file_default = readFile3;
134693
+ read_file_default = readFile6;
134694
134694
  loadConfigFromPackageJson = process.versions.bun ? async function loadConfigFromBunPackageJson(file2) {
134695
134695
  const { prettier } = await readBunPackageJson(file2);
134696
134696
  return prettier;
@@ -136881,7 +136881,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
136881
136881
  return mapDoc2(doc2, (currentDoc) => cleanDocFn2(currentDoc));
136882
136882
  }
136883
136883
  function replaceEndOfLine2(doc2, replacement = literalline2) {
136884
- return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join26(replacement, currentDoc.split(`
136884
+ return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join28(replacement, currentDoc.split(`
136885
136885
  `)) : currentDoc);
136886
136886
  }
136887
136887
  function canBreakFn2(doc2) {
@@ -136967,7 +136967,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
136967
136967
  negate: options8.negate
136968
136968
  };
136969
136969
  }
136970
- function join26(separator, docs) {
136970
+ function join28(separator, docs) {
136971
136971
  assertDoc2(separator);
136972
136972
  assertDocArray2(docs);
136973
136973
  const parts = [];
@@ -137632,7 +137632,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
137632
137632
  }
137633
137633
  }
137634
137634
  var builders2 = {
137635
- join: join26,
137635
+ join: join28,
137636
137636
  line: line3,
137637
137637
  softline: softline2,
137638
137638
  hardline: hardline4,
@@ -138287,11 +138287,11 @@ var require_prettier = __commonJS((exports, module) => {
138287
138287
  var require_formatter = __commonJS((exports) => {
138288
138288
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
138289
138289
  function adopt(value) {
138290
- return value instanceof P9 ? value : new P9(function(resolve13) {
138291
- resolve13(value);
138290
+ return value instanceof P9 ? value : new P9(function(resolve16) {
138291
+ resolve16(value);
138292
138292
  });
138293
138293
  }
138294
- return new (P9 || (P9 = Promise))(function(resolve13, reject) {
138294
+ return new (P9 || (P9 = Promise))(function(resolve16, reject) {
138295
138295
  function fulfilled(value) {
138296
138296
  try {
138297
138297
  step(generator.next(value));
@@ -138307,7 +138307,7 @@ var require_formatter = __commonJS((exports) => {
138307
138307
  }
138308
138308
  }
138309
138309
  function step(result) {
138310
- result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
138310
+ result.done ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
138311
138311
  }
138312
138312
  step((generator = generator.apply(thisArg, _arguments || [])).next());
138313
138313
  });
@@ -138362,23 +138362,23 @@ var require_JSONSchema = __commonJS((exports) => {
138362
138362
  exports.Parent = Symbol("Parent");
138363
138363
  exports.Types = Symbol("Types");
138364
138364
  exports.Intersection = Symbol("Intersection");
138365
- exports.getRootSchema = (0, lodash_1.memoize)((schema12) => {
138366
- const parent = schema12[exports.Parent];
138365
+ exports.getRootSchema = (0, lodash_1.memoize)((schema13) => {
138366
+ const parent = schema13[exports.Parent];
138367
138367
  if (!parent) {
138368
- return schema12;
138368
+ return schema13;
138369
138369
  }
138370
138370
  return (0, exports.getRootSchema)(parent);
138371
138371
  });
138372
- function isBoolean(schema12) {
138373
- return schema12 === true || schema12 === false;
138372
+ function isBoolean(schema13) {
138373
+ return schema13 === true || schema13 === false;
138374
138374
  }
138375
138375
  exports.isBoolean = isBoolean;
138376
- function isPrimitive(schema12) {
138377
- return !(0, lodash_1.isPlainObject)(schema12);
138376
+ function isPrimitive(schema13) {
138377
+ return !(0, lodash_1.isPlainObject)(schema13);
138378
138378
  }
138379
138379
  exports.isPrimitive = isPrimitive;
138380
- function isCompound(schema12) {
138381
- return Array.isArray(schema12.type) || "anyOf" in schema12 || "oneOf" in schema12;
138380
+ function isCompound(schema13) {
138381
+ return Array.isArray(schema13.type) || "anyOf" in schema13 || "oneOf" in schema13;
138382
138382
  }
138383
138383
  exports.isCompound = isCompound;
138384
138384
  });
@@ -138605,9 +138605,9 @@ var require_type2 = __commonJS((exports, module) => {
138605
138605
  var require_schema5 = __commonJS((exports, module) => {
138606
138606
  var YAMLException = require_exception2();
138607
138607
  var Type = require_type2();
138608
- function compileList(schema12, name2) {
138608
+ function compileList(schema13, name2) {
138609
138609
  var result = [];
138610
- schema12[name2].forEach(function(currentType) {
138610
+ schema13[name2].forEach(function(currentType) {
138611
138611
  var newIndex = result.length;
138612
138612
  result.forEach(function(previousType, previousIndex) {
138613
138613
  if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
@@ -140552,7 +140552,7 @@ var require_dumper2 = __commonJS((exports, module) => {
140552
140552
  "OFF"
140553
140553
  ];
140554
140554
  var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
140555
- function compileStyleMap(schema12, map2) {
140555
+ function compileStyleMap(schema13, map2) {
140556
140556
  var result, keys, index, length, tag, style, type;
140557
140557
  if (map2 === null)
140558
140558
  return {};
@@ -140564,7 +140564,7 @@ var require_dumper2 = __commonJS((exports, module) => {
140564
140564
  if (tag.slice(0, 2) === "!!") {
140565
140565
  tag = "tag:yaml.org,2002:" + tag.slice(2);
140566
140566
  }
140567
- type = schema12.compiledTypeMap["fallback"][tag];
140567
+ type = schema13.compiledTypeMap["fallback"][tag];
140568
140568
  if (type && _hasOwnProperty.call(type.styleAliases, style)) {
140569
140569
  style = type.styleAliases[style];
140570
140570
  }
@@ -141223,11 +141223,11 @@ var require_utils7 = __commonJS((exports) => {
141223
141223
  function traverseArray(arr, callback, processed) {
141224
141224
  arr.forEach((s5, k9) => traverse(s5, callback, processed, k9.toString()));
141225
141225
  }
141226
- function traverseIntersection(schema12, callback, processed) {
141227
- if (typeof schema12 !== "object" || !schema12) {
141226
+ function traverseIntersection(schema13, callback, processed) {
141227
+ if (typeof schema13 !== "object" || !schema13) {
141228
141228
  return;
141229
141229
  }
141230
- const r5 = schema12;
141230
+ const r5 = schema13;
141231
141231
  const intersection2 = r5[JSONSchema_1.Intersection];
141232
141232
  if (!intersection2) {
141233
141233
  return;
@@ -141236,60 +141236,60 @@ var require_utils7 = __commonJS((exports) => {
141236
141236
  traverseArray(intersection2.allOf, callback, processed);
141237
141237
  }
141238
141238
  }
141239
- function traverse(schema12, callback, processed = new Set, key2) {
141240
- if (processed.has(schema12)) {
141239
+ function traverse(schema13, callback, processed = new Set, key2) {
141240
+ if (processed.has(schema13)) {
141241
141241
  return;
141242
141242
  }
141243
- processed.add(schema12);
141244
- callback(schema12, key2 !== null && key2 !== undefined ? key2 : null);
141245
- if (schema12.anyOf) {
141246
- traverseArray(schema12.anyOf, callback, processed);
141243
+ processed.add(schema13);
141244
+ callback(schema13, key2 !== null && key2 !== undefined ? key2 : null);
141245
+ if (schema13.anyOf) {
141246
+ traverseArray(schema13.anyOf, callback, processed);
141247
141247
  }
141248
- if (schema12.allOf) {
141249
- traverseArray(schema12.allOf, callback, processed);
141248
+ if (schema13.allOf) {
141249
+ traverseArray(schema13.allOf, callback, processed);
141250
141250
  }
141251
- if (schema12.oneOf) {
141252
- traverseArray(schema12.oneOf, callback, processed);
141251
+ if (schema13.oneOf) {
141252
+ traverseArray(schema13.oneOf, callback, processed);
141253
141253
  }
141254
- if (schema12.properties) {
141255
- traverseObjectKeys(schema12.properties, callback, processed);
141254
+ if (schema13.properties) {
141255
+ traverseObjectKeys(schema13.properties, callback, processed);
141256
141256
  }
141257
- if (schema12.patternProperties) {
141258
- traverseObjectKeys(schema12.patternProperties, callback, processed);
141257
+ if (schema13.patternProperties) {
141258
+ traverseObjectKeys(schema13.patternProperties, callback, processed);
141259
141259
  }
141260
- if (schema12.additionalProperties && typeof schema12.additionalProperties === "object") {
141261
- traverse(schema12.additionalProperties, callback, processed);
141260
+ if (schema13.additionalProperties && typeof schema13.additionalProperties === "object") {
141261
+ traverse(schema13.additionalProperties, callback, processed);
141262
141262
  }
141263
- if (schema12.items) {
141264
- const { items } = schema12;
141263
+ if (schema13.items) {
141264
+ const { items } = schema13;
141265
141265
  if (Array.isArray(items)) {
141266
141266
  traverseArray(items, callback, processed);
141267
141267
  } else {
141268
141268
  traverse(items, callback, processed);
141269
141269
  }
141270
141270
  }
141271
- if (schema12.additionalItems && typeof schema12.additionalItems === "object") {
141272
- traverse(schema12.additionalItems, callback, processed);
141271
+ if (schema13.additionalItems && typeof schema13.additionalItems === "object") {
141272
+ traverse(schema13.additionalItems, callback, processed);
141273
141273
  }
141274
- if (schema12.dependencies) {
141275
- if (Array.isArray(schema12.dependencies)) {
141276
- traverseArray(schema12.dependencies, callback, processed);
141274
+ if (schema13.dependencies) {
141275
+ if (Array.isArray(schema13.dependencies)) {
141276
+ traverseArray(schema13.dependencies, callback, processed);
141277
141277
  } else {
141278
- traverseObjectKeys(schema12.dependencies, callback, processed);
141278
+ traverseObjectKeys(schema13.dependencies, callback, processed);
141279
141279
  }
141280
141280
  }
141281
- if (schema12.definitions) {
141282
- traverseObjectKeys(schema12.definitions, callback, processed);
141281
+ if (schema13.definitions) {
141282
+ traverseObjectKeys(schema13.definitions, callback, processed);
141283
141283
  }
141284
- if (schema12.$defs) {
141285
- traverseObjectKeys(schema12.$defs, callback, processed);
141284
+ if (schema13.$defs) {
141285
+ traverseObjectKeys(schema13.$defs, callback, processed);
141286
141286
  }
141287
- if (schema12.not) {
141288
- traverse(schema12.not, callback, processed);
141287
+ if (schema13.not) {
141288
+ traverse(schema13.not, callback, processed);
141289
141289
  }
141290
- traverseIntersection(schema12, callback, processed);
141291
- Object.keys(schema12).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141292
- const child = schema12[key3];
141290
+ traverseIntersection(schema13, callback, processed);
141291
+ Object.keys(schema13).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141292
+ const child = schema13[key3];
141293
141293
  if (child && typeof child === "object") {
141294
141294
  traverseObjectKeys(child, callback, processed);
141295
141295
  }
@@ -141371,14 +141371,14 @@ var require_utils7 = __commonJS((exports) => {
141371
141371
  return (_g2 = color()) === null || _g2 === undefined ? undefined : _g2.whiteBright.bgYellow;
141372
141372
  }
141373
141373
  }
141374
- function escapeBlockComment(schema12) {
141374
+ function escapeBlockComment(schema13) {
141375
141375
  const replacer = "* /";
141376
- if (schema12 === null || typeof schema12 !== "object") {
141376
+ if (schema13 === null || typeof schema13 !== "object") {
141377
141377
  return;
141378
141378
  }
141379
- for (const key2 of Object.keys(schema12)) {
141380
- if (key2 === "description" && typeof schema12[key2] === "string") {
141381
- schema12[key2] = schema12[key2].replace(/\*\//g, replacer);
141379
+ for (const key2 of Object.keys(schema13)) {
141380
+ if (key2 === "description" && typeof schema13[key2] === "string") {
141381
+ schema13[key2] = schema13[key2].replace(/\*\//g, replacer);
141382
141382
  }
141383
141383
  }
141384
141384
  }
@@ -141390,45 +141390,45 @@ var require_utils7 = __commonJS((exports) => {
141390
141390
  return path_1.posix.join(path_1.posix.normalize(outputPath), ...filePathRel);
141391
141391
  }
141392
141392
  exports.pathTransform = pathTransform;
141393
- function maybeStripDefault(schema12) {
141394
- if (!("default" in schema12)) {
141395
- return schema12;
141393
+ function maybeStripDefault(schema13) {
141394
+ if (!("default" in schema13)) {
141395
+ return schema13;
141396
141396
  }
141397
- switch (schema12.type) {
141397
+ switch (schema13.type) {
141398
141398
  case "array":
141399
- if (Array.isArray(schema12.default)) {
141400
- return schema12;
141399
+ if (Array.isArray(schema13.default)) {
141400
+ return schema13;
141401
141401
  }
141402
141402
  break;
141403
141403
  case "boolean":
141404
- if (typeof schema12.default === "boolean") {
141405
- return schema12;
141404
+ if (typeof schema13.default === "boolean") {
141405
+ return schema13;
141406
141406
  }
141407
141407
  break;
141408
141408
  case "integer":
141409
141409
  case "number":
141410
- if (typeof schema12.default === "number") {
141411
- return schema12;
141410
+ if (typeof schema13.default === "number") {
141411
+ return schema13;
141412
141412
  }
141413
141413
  break;
141414
141414
  case "string":
141415
- if (typeof schema12.default === "string") {
141416
- return schema12;
141415
+ if (typeof schema13.default === "string") {
141416
+ return schema13;
141417
141417
  }
141418
141418
  break;
141419
141419
  case "null":
141420
- if (schema12.default === null) {
141421
- return schema12;
141420
+ if (schema13.default === null) {
141421
+ return schema13;
141422
141422
  }
141423
141423
  break;
141424
141424
  case "object":
141425
- if ((0, lodash_1.isPlainObject)(schema12.default)) {
141426
- return schema12;
141425
+ if ((0, lodash_1.isPlainObject)(schema13.default)) {
141426
+ return schema13;
141427
141427
  }
141428
141428
  break;
141429
141429
  }
141430
- delete schema12.default;
141431
- return schema12;
141430
+ delete schema13.default;
141431
+ return schema13;
141432
141432
  }
141433
141433
  exports.maybeStripDefault = maybeStripDefault;
141434
141434
  function appendToDescription(existingDescription, ...values) {
@@ -141442,11 +141442,11 @@ ${values.join(`
141442
141442
  `);
141443
141443
  }
141444
141444
  exports.appendToDescription = appendToDescription;
141445
- function isSchemaLike(schema12) {
141446
- if (!(0, lodash_1.isPlainObject)(schema12)) {
141445
+ function isSchemaLike(schema13) {
141446
+ if (!(0, lodash_1.isPlainObject)(schema13)) {
141447
141447
  return false;
141448
141448
  }
141449
- const parent = schema12[JSONSchema_1.Parent];
141449
+ const parent = schema13[JSONSchema_1.Parent];
141450
141450
  if (parent === null) {
141451
141451
  return true;
141452
141452
  }
@@ -141463,7 +141463,7 @@ ${values.join(`
141463
141463
  "properties",
141464
141464
  "required"
141465
141465
  ];
141466
- if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema12)) {
141466
+ if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema13)) {
141467
141467
  return false;
141468
141468
  }
141469
141469
  return true;
@@ -141761,13 +141761,13 @@ var require_typesOfSchema = __commonJS((exports) => {
141761
141761
  exports.typesOfSchema = undefined;
141762
141762
  var lodash_1 = require_lodash8();
141763
141763
  var JSONSchema_1 = require_JSONSchema();
141764
- function typesOfSchema(schema12) {
141765
- if (schema12.tsType) {
141764
+ function typesOfSchema(schema13) {
141765
+ if (schema13.tsType) {
141766
141766
  return new Set(["CUSTOM_TYPE"]);
141767
141767
  }
141768
141768
  const matchedTypes = new Set;
141769
141769
  for (const [schemaType, f7] of Object.entries(matchers)) {
141770
- if (f7(schema12)) {
141770
+ if (f7(schema13)) {
141771
141771
  matchedTypes.add(schemaType);
141772
141772
  }
141773
141773
  }
@@ -141778,26 +141778,26 @@ var require_typesOfSchema = __commonJS((exports) => {
141778
141778
  }
141779
141779
  exports.typesOfSchema = typesOfSchema;
141780
141780
  var matchers = {
141781
- ALL_OF(schema12) {
141782
- return "allOf" in schema12;
141781
+ ALL_OF(schema13) {
141782
+ return "allOf" in schema13;
141783
141783
  },
141784
- ANY(schema12) {
141785
- if (Object.keys(schema12).length === 0) {
141784
+ ANY(schema13) {
141785
+ if (Object.keys(schema13).length === 0) {
141786
141786
  return true;
141787
141787
  }
141788
- return schema12.type === "any";
141788
+ return schema13.type === "any";
141789
141789
  },
141790
- ANY_OF(schema12) {
141791
- return "anyOf" in schema12;
141790
+ ANY_OF(schema13) {
141791
+ return "anyOf" in schema13;
141792
141792
  },
141793
- BOOLEAN(schema12) {
141794
- if ("enum" in schema12) {
141793
+ BOOLEAN(schema13) {
141794
+ if ("enum" in schema13) {
141795
141795
  return false;
141796
141796
  }
141797
- if (schema12.type === "boolean") {
141797
+ if (schema13.type === "boolean") {
141798
141798
  return true;
141799
141799
  }
141800
- if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "boolean") {
141800
+ if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "boolean") {
141801
141801
  return true;
141802
141802
  }
141803
141803
  return false;
@@ -141805,74 +141805,74 @@ var require_typesOfSchema = __commonJS((exports) => {
141805
141805
  CUSTOM_TYPE() {
141806
141806
  return false;
141807
141807
  },
141808
- NAMED_ENUM(schema12) {
141809
- return "enum" in schema12 && "tsEnumNames" in schema12;
141808
+ NAMED_ENUM(schema13) {
141809
+ return "enum" in schema13 && "tsEnumNames" in schema13;
141810
141810
  },
141811
- NAMED_SCHEMA(schema12) {
141812
- return "$id" in schema12 && (("patternProperties" in schema12) || ("properties" in schema12));
141811
+ NAMED_SCHEMA(schema13) {
141812
+ return "$id" in schema13 && (("patternProperties" in schema13) || ("properties" in schema13));
141813
141813
  },
141814
- NEVER(schema12) {
141815
- return schema12 === false;
141814
+ NEVER(schema13) {
141815
+ return schema13 === false;
141816
141816
  },
141817
- NULL(schema12) {
141818
- return schema12.type === "null";
141817
+ NULL(schema13) {
141818
+ return schema13.type === "null";
141819
141819
  },
141820
- NUMBER(schema12) {
141821
- if ("enum" in schema12) {
141820
+ NUMBER(schema13) {
141821
+ if ("enum" in schema13) {
141822
141822
  return false;
141823
141823
  }
141824
- if (schema12.type === "integer" || schema12.type === "number") {
141824
+ if (schema13.type === "integer" || schema13.type === "number") {
141825
141825
  return true;
141826
141826
  }
141827
- if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "number") {
141827
+ if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "number") {
141828
141828
  return true;
141829
141829
  }
141830
141830
  return false;
141831
141831
  },
141832
- OBJECT(schema12) {
141833
- return schema12.type === "object" && !(0, lodash_1.isPlainObject)(schema12.additionalProperties) && !schema12.allOf && !schema12.anyOf && !schema12.oneOf && !schema12.patternProperties && !schema12.properties && !schema12.required;
141832
+ OBJECT(schema13) {
141833
+ return schema13.type === "object" && !(0, lodash_1.isPlainObject)(schema13.additionalProperties) && !schema13.allOf && !schema13.anyOf && !schema13.oneOf && !schema13.patternProperties && !schema13.properties && !schema13.required;
141834
141834
  },
141835
- ONE_OF(schema12) {
141836
- return "oneOf" in schema12;
141835
+ ONE_OF(schema13) {
141836
+ return "oneOf" in schema13;
141837
141837
  },
141838
- REFERENCE(schema12) {
141839
- return "$ref" in schema12;
141838
+ REFERENCE(schema13) {
141839
+ return "$ref" in schema13;
141840
141840
  },
141841
- STRING(schema12) {
141842
- if ("enum" in schema12) {
141841
+ STRING(schema13) {
141842
+ if ("enum" in schema13) {
141843
141843
  return false;
141844
141844
  }
141845
- if (schema12.type === "string") {
141845
+ if (schema13.type === "string") {
141846
141846
  return true;
141847
141847
  }
141848
- if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "string") {
141848
+ if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "string") {
141849
141849
  return true;
141850
141850
  }
141851
141851
  return false;
141852
141852
  },
141853
- TYPED_ARRAY(schema12) {
141854
- if (schema12.type && schema12.type !== "array") {
141853
+ TYPED_ARRAY(schema13) {
141854
+ if (schema13.type && schema13.type !== "array") {
141855
141855
  return false;
141856
141856
  }
141857
- return "items" in schema12;
141857
+ return "items" in schema13;
141858
141858
  },
141859
- UNION(schema12) {
141860
- return Array.isArray(schema12.type);
141859
+ UNION(schema13) {
141860
+ return Array.isArray(schema13.type);
141861
141861
  },
141862
- UNNAMED_ENUM(schema12) {
141863
- if ("tsEnumNames" in schema12) {
141862
+ UNNAMED_ENUM(schema13) {
141863
+ if ("tsEnumNames" in schema13) {
141864
141864
  return false;
141865
141865
  }
141866
- if (schema12.type && schema12.type !== "boolean" && schema12.type !== "integer" && schema12.type !== "number" && schema12.type !== "string") {
141866
+ if (schema13.type && schema13.type !== "boolean" && schema13.type !== "integer" && schema13.type !== "number" && schema13.type !== "string") {
141867
141867
  return false;
141868
141868
  }
141869
- return "enum" in schema12;
141869
+ return "enum" in schema13;
141870
141870
  },
141871
141871
  UNNAMED_SCHEMA() {
141872
141872
  return false;
141873
141873
  },
141874
- UNTYPED_ARRAY(schema12) {
141875
- return schema12.type === "array" && !("items" in schema12);
141874
+ UNTYPED_ARRAY(schema13) {
141875
+ return schema13.type === "array" && !("items" in schema13);
141876
141876
  }
141877
141877
  };
141878
141878
  });
@@ -141883,10 +141883,10 @@ var require_applySchemaTyping = __commonJS((exports) => {
141883
141883
  exports.applySchemaTyping = undefined;
141884
141884
  var JSONSchema_1 = require_JSONSchema();
141885
141885
  var typesOfSchema_1 = require_typesOfSchema();
141886
- function applySchemaTyping(schema12) {
141886
+ function applySchemaTyping(schema13) {
141887
141887
  var _a7;
141888
- const types = (0, typesOfSchema_1.typesOfSchema)(schema12);
141889
- Object.defineProperty(schema12, JSONSchema_1.Types, {
141888
+ const types = (0, typesOfSchema_1.typesOfSchema)(schema13);
141889
+ Object.defineProperty(schema13, JSONSchema_1.Types, {
141890
141890
  enumerable: false,
141891
141891
  value: types,
141892
141892
  writable: false
@@ -141895,23 +141895,23 @@ var require_applySchemaTyping = __commonJS((exports) => {
141895
141895
  return;
141896
141896
  }
141897
141897
  const intersection2 = {
141898
- [JSONSchema_1.Parent]: schema12,
141898
+ [JSONSchema_1.Parent]: schema13,
141899
141899
  [JSONSchema_1.Types]: new Set(["ALL_OF"]),
141900
- $id: schema12.$id,
141901
- description: schema12.description,
141902
- name: schema12.name,
141903
- title: schema12.title,
141904
- allOf: (_a7 = schema12.allOf) !== null && _a7 !== undefined ? _a7 : [],
141900
+ $id: schema13.$id,
141901
+ description: schema13.description,
141902
+ name: schema13.name,
141903
+ title: schema13.title,
141904
+ allOf: (_a7 = schema13.allOf) !== null && _a7 !== undefined ? _a7 : [],
141905
141905
  required: [],
141906
141906
  additionalProperties: false
141907
141907
  };
141908
141908
  types.delete("ALL_OF");
141909
- delete schema12.allOf;
141910
- delete schema12.$id;
141911
- delete schema12.description;
141912
- delete schema12.name;
141913
- delete schema12.title;
141914
- Object.defineProperty(schema12, JSONSchema_1.Intersection, {
141909
+ delete schema13.allOf;
141910
+ delete schema13.$id;
141911
+ delete schema13.description;
141912
+ delete schema13.name;
141913
+ delete schema13.title;
141914
+ Object.defineProperty(schema13, JSONSchema_1.Intersection, {
141915
141915
  enumerable: false,
141916
141916
  value: intersection2,
141917
141917
  writable: false
@@ -141929,186 +141929,186 @@ var require_normalizer = __commonJS((exports) => {
141929
141929
  var applySchemaTyping_1 = require_applySchemaTyping();
141930
141930
  var util_1 = __require("util");
141931
141931
  var rules = new Map;
141932
- function hasType(schema12, type) {
141933
- return schema12.type === type || Array.isArray(schema12.type) && schema12.type.includes(type);
141932
+ function hasType(schema13, type) {
141933
+ return schema13.type === type || Array.isArray(schema13.type) && schema13.type.includes(type);
141934
141934
  }
141935
- function isObjectType(schema12) {
141936
- return schema12.properties !== undefined || hasType(schema12, "object") || hasType(schema12, "any");
141935
+ function isObjectType(schema13) {
141936
+ return schema13.properties !== undefined || hasType(schema13, "object") || hasType(schema13, "any");
141937
141937
  }
141938
- function isArrayType(schema12) {
141939
- return schema12.items !== undefined || hasType(schema12, "array") || hasType(schema12, "any");
141938
+ function isArrayType(schema13) {
141939
+ return schema13.items !== undefined || hasType(schema13, "array") || hasType(schema13, "any");
141940
141940
  }
141941
- function isEnumTypeWithoutTsEnumNames(schema12) {
141942
- return schema12.type === "string" && schema12.enum !== undefined && schema12.tsEnumNames === undefined;
141941
+ function isEnumTypeWithoutTsEnumNames(schema13) {
141942
+ return schema13.type === "string" && schema13.enum !== undefined && schema13.tsEnumNames === undefined;
141943
141943
  }
141944
- rules.set('Remove `type=["null"]` if `enum=[null]`', (schema12) => {
141945
- if (Array.isArray(schema12.enum) && schema12.enum.some((e8) => e8 === null) && Array.isArray(schema12.type) && schema12.type.includes("null")) {
141946
- schema12.type = schema12.type.filter((type) => type !== "null");
141944
+ rules.set('Remove `type=["null"]` if `enum=[null]`', (schema13) => {
141945
+ if (Array.isArray(schema13.enum) && schema13.enum.some((e8) => e8 === null) && Array.isArray(schema13.type) && schema13.type.includes("null")) {
141946
+ schema13.type = schema13.type.filter((type) => type !== "null");
141947
141947
  }
141948
141948
  });
141949
- rules.set("Destructure unary types", (schema12) => {
141950
- if (schema12.type && Array.isArray(schema12.type) && schema12.type.length === 1) {
141951
- schema12.type = schema12.type[0];
141949
+ rules.set("Destructure unary types", (schema13) => {
141950
+ if (schema13.type && Array.isArray(schema13.type) && schema13.type.length === 1) {
141951
+ schema13.type = schema13.type[0];
141952
141952
  }
141953
141953
  });
141954
- rules.set("Add empty `required` property if none is defined", (schema12) => {
141955
- if (isObjectType(schema12) && !("required" in schema12)) {
141956
- schema12.required = [];
141954
+ rules.set("Add empty `required` property if none is defined", (schema13) => {
141955
+ if (isObjectType(schema13) && !("required" in schema13)) {
141956
+ schema13.required = [];
141957
141957
  }
141958
141958
  });
141959
- rules.set("Transform `required`=false to `required`=[]", (schema12) => {
141960
- if (schema12.required === false) {
141961
- schema12.required = [];
141959
+ rules.set("Transform `required`=false to `required`=[]", (schema13) => {
141960
+ if (schema13.required === false) {
141961
+ schema13.required = [];
141962
141962
  }
141963
141963
  });
141964
- rules.set("Default additionalProperties", (schema12, _10, options8) => {
141965
- if (isObjectType(schema12) && !("additionalProperties" in schema12) && schema12.patternProperties === undefined) {
141966
- schema12.additionalProperties = options8.additionalProperties;
141964
+ rules.set("Default additionalProperties", (schema13, _10, options8) => {
141965
+ if (isObjectType(schema13) && !("additionalProperties" in schema13) && schema13.patternProperties === undefined) {
141966
+ schema13.additionalProperties = options8.additionalProperties;
141967
141967
  }
141968
141968
  });
141969
- rules.set("Transform id to $id", (schema12, fileName) => {
141970
- if (!(0, utils_1.isSchemaLike)(schema12)) {
141969
+ rules.set("Transform id to $id", (schema13, fileName) => {
141970
+ if (!(0, utils_1.isSchemaLike)(schema13)) {
141971
141971
  return;
141972
141972
  }
141973
- if (schema12.id && schema12.$id && schema12.id !== schema12.$id) {
141974
- throw ReferenceError(`Schema must define either id or $id, not both. Given id=${schema12.id}, $id=${schema12.$id} in ${fileName}`);
141973
+ if (schema13.id && schema13.$id && schema13.id !== schema13.$id) {
141974
+ throw ReferenceError(`Schema must define either id or $id, not both. Given id=${schema13.id}, $id=${schema13.$id} in ${fileName}`);
141975
141975
  }
141976
- if (schema12.id) {
141977
- schema12.$id = schema12.id;
141978
- delete schema12.id;
141976
+ if (schema13.id) {
141977
+ schema13.$id = schema13.id;
141978
+ delete schema13.id;
141979
141979
  }
141980
141980
  });
141981
- rules.set("Add an $id to anything that needs it", (schema12, fileName, _options, _key, dereferencedPaths) => {
141982
- if (!(0, utils_1.isSchemaLike)(schema12)) {
141981
+ rules.set("Add an $id to anything that needs it", (schema13, fileName, _options, _key, dereferencedPaths) => {
141982
+ if (!(0, utils_1.isSchemaLike)(schema13)) {
141983
141983
  return;
141984
141984
  }
141985
- if (!schema12.$id && !schema12[JSONSchema_1.Parent]) {
141986
- schema12.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141985
+ if (!schema13.$id && !schema13[JSONSchema_1.Parent]) {
141986
+ schema13.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141987
141987
  return;
141988
141988
  }
141989
- if (!isArrayType(schema12) && !isObjectType(schema12)) {
141989
+ if (!isArrayType(schema13) && !isObjectType(schema13)) {
141990
141990
  return;
141991
141991
  }
141992
- const dereferencedName = dereferencedPaths.get(schema12);
141993
- if (!schema12.$id && !schema12.title && dereferencedName) {
141994
- schema12.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(dereferencedName));
141992
+ const dereferencedName = dereferencedPaths.get(schema13);
141993
+ if (!schema13.$id && !schema13.title && dereferencedName) {
141994
+ schema13.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(dereferencedName));
141995
141995
  }
141996
141996
  if (dereferencedName) {
141997
- dereferencedPaths.delete(schema12);
141997
+ dereferencedPaths.delete(schema13);
141998
141998
  }
141999
141999
  });
142000
- rules.set("Escape closing JSDoc comment", (schema12) => {
142001
- (0, utils_1.escapeBlockComment)(schema12);
142000
+ rules.set("Escape closing JSDoc comment", (schema13) => {
142001
+ (0, utils_1.escapeBlockComment)(schema13);
142002
142002
  });
142003
- rules.set("Add JSDoc comments for minItems and maxItems", (schema12) => {
142004
- if (!isArrayType(schema12)) {
142003
+ rules.set("Add JSDoc comments for minItems and maxItems", (schema13) => {
142004
+ if (!isArrayType(schema13)) {
142005
142005
  return;
142006
142006
  }
142007
142007
  const commentsToAppend = [
142008
- "minItems" in schema12 ? `@minItems ${schema12.minItems}` : "",
142009
- "maxItems" in schema12 ? `@maxItems ${schema12.maxItems}` : ""
142008
+ "minItems" in schema13 ? `@minItems ${schema13.minItems}` : "",
142009
+ "maxItems" in schema13 ? `@maxItems ${schema13.maxItems}` : ""
142010
142010
  ].filter(Boolean);
142011
142011
  if (commentsToAppend.length) {
142012
- schema12.description = (0, utils_1.appendToDescription)(schema12.description, ...commentsToAppend);
142012
+ schema13.description = (0, utils_1.appendToDescription)(schema13.description, ...commentsToAppend);
142013
142013
  }
142014
142014
  });
142015
- rules.set("Optionally remove maxItems and minItems", (schema12, _fileName, options8) => {
142016
- if (!isArrayType(schema12)) {
142015
+ rules.set("Optionally remove maxItems and minItems", (schema13, _fileName, options8) => {
142016
+ if (!isArrayType(schema13)) {
142017
142017
  return;
142018
142018
  }
142019
- if ("minItems" in schema12 && options8.ignoreMinAndMaxItems) {
142020
- delete schema12.minItems;
142019
+ if ("minItems" in schema13 && options8.ignoreMinAndMaxItems) {
142020
+ delete schema13.minItems;
142021
142021
  }
142022
- if ("maxItems" in schema12 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142023
- delete schema12.maxItems;
142022
+ if ("maxItems" in schema13 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142023
+ delete schema13.maxItems;
142024
142024
  }
142025
142025
  });
142026
- rules.set("Normalize schema.minItems", (schema12, _fileName, options8) => {
142026
+ rules.set("Normalize schema.minItems", (schema13, _fileName, options8) => {
142027
142027
  if (options8.ignoreMinAndMaxItems) {
142028
142028
  return;
142029
142029
  }
142030
- if (!isArrayType(schema12)) {
142030
+ if (!isArrayType(schema13)) {
142031
142031
  return;
142032
142032
  }
142033
- const { minItems } = schema12;
142034
- schema12.minItems = typeof minItems === "number" ? minItems : 0;
142033
+ const { minItems } = schema13;
142034
+ schema13.minItems = typeof minItems === "number" ? minItems : 0;
142035
142035
  });
142036
- rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema12, _fileName, options8) => {
142036
+ rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema13, _fileName, options8) => {
142037
142037
  if (options8.ignoreMinAndMaxItems || options8.maxItems === -1) {
142038
142038
  return;
142039
142039
  }
142040
- if (!isArrayType(schema12)) {
142040
+ if (!isArrayType(schema13)) {
142041
142041
  return;
142042
142042
  }
142043
- const { maxItems, minItems } = schema12;
142043
+ const { maxItems, minItems } = schema13;
142044
142044
  if (maxItems !== undefined && maxItems - minItems > options8.maxItems) {
142045
- delete schema12.maxItems;
142045
+ delete schema13.maxItems;
142046
142046
  }
142047
142047
  });
142048
- rules.set("Normalize schema.items", (schema12, _fileName, options8) => {
142048
+ rules.set("Normalize schema.items", (schema13, _fileName, options8) => {
142049
142049
  if (options8.ignoreMinAndMaxItems) {
142050
142050
  return;
142051
142051
  }
142052
- const { maxItems, minItems } = schema12;
142052
+ const { maxItems, minItems } = schema13;
142053
142053
  const hasMaxItems = typeof maxItems === "number" && maxItems >= 0;
142054
142054
  const hasMinItems = typeof minItems === "number" && minItems > 0;
142055
- if (schema12.items && !Array.isArray(schema12.items) && (hasMaxItems || hasMinItems)) {
142056
- const items = schema12.items;
142055
+ if (schema13.items && !Array.isArray(schema13.items) && (hasMaxItems || hasMinItems)) {
142056
+ const items = schema13.items;
142057
142057
  const newItems = Array(maxItems || minItems || 0).fill(items);
142058
142058
  if (!hasMaxItems) {
142059
- schema12.additionalItems = items;
142059
+ schema13.additionalItems = items;
142060
142060
  }
142061
- schema12.items = newItems;
142061
+ schema13.items = newItems;
142062
142062
  }
142063
- if (Array.isArray(schema12.items) && hasMaxItems && maxItems < schema12.items.length) {
142064
- schema12.items = schema12.items.slice(0, maxItems);
142063
+ if (Array.isArray(schema13.items) && hasMaxItems && maxItems < schema13.items.length) {
142064
+ schema13.items = schema13.items.slice(0, maxItems);
142065
142065
  }
142066
- return schema12;
142066
+ return schema13;
142067
142067
  });
142068
- rules.set("Remove extends, if it is empty", (schema12) => {
142069
- if (!schema12.hasOwnProperty("extends")) {
142068
+ rules.set("Remove extends, if it is empty", (schema13) => {
142069
+ if (!schema13.hasOwnProperty("extends")) {
142070
142070
  return;
142071
142071
  }
142072
- if (schema12.extends == null || Array.isArray(schema12.extends) && schema12.extends.length === 0) {
142073
- delete schema12.extends;
142072
+ if (schema13.extends == null || Array.isArray(schema13.extends) && schema13.extends.length === 0) {
142073
+ delete schema13.extends;
142074
142074
  }
142075
142075
  });
142076
- rules.set("Make extends always an array, if it is defined", (schema12) => {
142077
- if (schema12.extends == null) {
142076
+ rules.set("Make extends always an array, if it is defined", (schema13) => {
142077
+ if (schema13.extends == null) {
142078
142078
  return;
142079
142079
  }
142080
- if (!Array.isArray(schema12.extends)) {
142081
- schema12.extends = [schema12.extends];
142080
+ if (!Array.isArray(schema13.extends)) {
142081
+ schema13.extends = [schema13.extends];
142082
142082
  }
142083
142083
  });
142084
- rules.set("Transform definitions to $defs", (schema12, fileName) => {
142085
- if (schema12.definitions && schema12.$defs && !(0, util_1.isDeepStrictEqual)(schema12.definitions, schema12.$defs)) {
142086
- throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${schema12.id} in ${fileName}`);
142084
+ rules.set("Transform definitions to $defs", (schema13, fileName) => {
142085
+ if (schema13.definitions && schema13.$defs && !(0, util_1.isDeepStrictEqual)(schema13.definitions, schema13.$defs)) {
142086
+ throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${schema13.id} in ${fileName}`);
142087
142087
  }
142088
- if (schema12.definitions) {
142089
- schema12.$defs = schema12.definitions;
142090
- delete schema12.definitions;
142088
+ if (schema13.definitions) {
142089
+ schema13.$defs = schema13.definitions;
142090
+ delete schema13.definitions;
142091
142091
  }
142092
142092
  });
142093
- rules.set("Transform const to singleton enum", (schema12) => {
142094
- if (schema12.const !== undefined) {
142095
- schema12.enum = [schema12.const];
142096
- delete schema12.const;
142093
+ rules.set("Transform const to singleton enum", (schema13) => {
142094
+ if (schema13.const !== undefined) {
142095
+ schema13.enum = [schema13.const];
142096
+ delete schema13.const;
142097
142097
  }
142098
142098
  });
142099
- rules.set("Add tsEnumNames to enum types", (schema12, _10, options8) => {
142099
+ rules.set("Add tsEnumNames to enum types", (schema13, _10, options8) => {
142100
142100
  var _a7;
142101
- if (isEnumTypeWithoutTsEnumNames(schema12) && options8.inferStringEnumKeysFromValues) {
142102
- schema12.tsEnumNames = (_a7 = schema12.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142101
+ if (isEnumTypeWithoutTsEnumNames(schema13) && options8.inferStringEnumKeysFromValues) {
142102
+ schema13.tsEnumNames = (_a7 = schema13.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142103
142103
  }
142104
142104
  });
142105
- rules.set("Pre-calculate schema types and intersections", (schema12) => {
142106
- if (schema12 !== null && typeof schema12 === "object") {
142107
- (0, applySchemaTyping_1.applySchemaTyping)(schema12);
142105
+ rules.set("Pre-calculate schema types and intersections", (schema13) => {
142106
+ if (schema13 !== null && typeof schema13 === "object") {
142107
+ (0, applySchemaTyping_1.applySchemaTyping)(schema13);
142108
142108
  }
142109
142109
  });
142110
142110
  function normalize2(rootSchema, dereferencedPaths, filename, options8) {
142111
- rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema12, key2) => rule(schema12, filename, options8, key2, dereferencedPaths)));
142111
+ rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema13, key2) => rule(schema13, filename, options8, key2, dereferencedPaths)));
142112
142112
  return rootSchema;
142113
142113
  }
142114
142114
  exports.normalize = normalize2;
@@ -142190,37 +142190,37 @@ var require_parser2 = __commonJS((exports) => {
142190
142190
  var AST_1 = require_AST();
142191
142191
  var JSONSchema_1 = require_JSONSchema();
142192
142192
  var utils_1 = require_utils7();
142193
- function parse11(schema12, options8, keyName, processed = new Map, usedNames = new Set) {
142194
- if ((0, JSONSchema_1.isPrimitive)(schema12)) {
142195
- if ((0, JSONSchema_1.isBoolean)(schema12)) {
142196
- return parseBooleanSchema(schema12, keyName, options8);
142193
+ function parse11(schema13, options8, keyName, processed = new Map, usedNames = new Set) {
142194
+ if ((0, JSONSchema_1.isPrimitive)(schema13)) {
142195
+ if ((0, JSONSchema_1.isBoolean)(schema13)) {
142196
+ return parseBooleanSchema(schema13, keyName, options8);
142197
142197
  }
142198
- return parseLiteral(schema12, keyName);
142198
+ return parseLiteral(schema13, keyName);
142199
142199
  }
142200
- const intersection2 = schema12[JSONSchema_1.Intersection];
142201
- const types = schema12[JSONSchema_1.Types];
142200
+ const intersection2 = schema13[JSONSchema_1.Intersection];
142201
+ const types = schema13[JSONSchema_1.Types];
142202
142202
  if (intersection2) {
142203
142203
  const ast = parseAsTypeWithCache(intersection2, "ALL_OF", options8, keyName, processed, usedNames);
142204
142204
  types.forEach((type) => {
142205
- ast.params.push(parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames));
142205
+ ast.params.push(parseAsTypeWithCache(schema13, type, options8, keyName, processed, usedNames));
142206
142206
  });
142207
- (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema12, "Output:", ast);
142207
+ (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema13, "Output:", ast);
142208
142208
  return ast;
142209
142209
  }
142210
142210
  if (types.size === 1) {
142211
142211
  const type = [...types][0];
142212
- const ast = parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames);
142213
- (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema12, "Output:", ast);
142212
+ const ast = parseAsTypeWithCache(schema13, type, options8, keyName, processed, usedNames);
142213
+ (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema13, "Output:", ast);
142214
142214
  return ast;
142215
142215
  }
142216
142216
  throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.");
142217
142217
  }
142218
142218
  exports.parse = parse11;
142219
- function parseAsTypeWithCache(schema12, type, options8, keyName, processed = new Map, usedNames = new Set) {
142220
- let cachedTypeMap = processed.get(schema12);
142219
+ function parseAsTypeWithCache(schema13, type, options8, keyName, processed = new Map, usedNames = new Set) {
142220
+ let cachedTypeMap = processed.get(schema13);
142221
142221
  if (!cachedTypeMap) {
142222
142222
  cachedTypeMap = new Map;
142223
- processed.set(schema12, cachedTypeMap);
142223
+ processed.set(schema13, cachedTypeMap);
142224
142224
  }
142225
142225
  const cachedAST = cachedTypeMap.get(type);
142226
142226
  if (cachedAST) {
@@ -142228,10 +142228,10 @@ var require_parser2 = __commonJS((exports) => {
142228
142228
  }
142229
142229
  const ast = {};
142230
142230
  cachedTypeMap.set(type, ast);
142231
- return Object.assign(ast, parseNonLiteral(schema12, type, options8, keyName, processed, usedNames));
142231
+ return Object.assign(ast, parseNonLiteral(schema13, type, options8, keyName, processed, usedNames));
142232
142232
  }
142233
- function parseBooleanSchema(schema12, keyName, options8) {
142234
- if (schema12) {
142233
+ function parseBooleanSchema(schema13, keyName, options8) {
142234
+ if (schema13) {
142235
142235
  return {
142236
142236
  keyName,
142237
142237
  type: options8.unknownAny ? "UNKNOWN" : "ANY"
@@ -142242,157 +142242,157 @@ var require_parser2 = __commonJS((exports) => {
142242
142242
  type: "NEVER"
142243
142243
  };
142244
142244
  }
142245
- function parseLiteral(schema12, keyName) {
142245
+ function parseLiteral(schema13, keyName) {
142246
142246
  return {
142247
142247
  keyName,
142248
- params: schema12,
142248
+ params: schema13,
142249
142249
  type: "LITERAL"
142250
142250
  };
142251
142251
  }
142252
- function parseNonLiteral(schema12, type, options8, keyName, processed, usedNames) {
142253
- const definitions = getDefinitionsMemoized((0, JSONSchema_1.getRootSchema)(schema12));
142254
- const keyNameFromDefinition = (0, lodash_1.findKey)(definitions, (_10) => _10 === schema12);
142252
+ function parseNonLiteral(schema13, type, options8, keyName, processed, usedNames) {
142253
+ const definitions = getDefinitionsMemoized((0, JSONSchema_1.getRootSchema)(schema13));
142254
+ const keyNameFromDefinition = (0, lodash_1.findKey)(definitions, (_10) => _10 === schema13);
142255
142255
  switch (type) {
142256
142256
  case "ALL_OF":
142257
142257
  return {
142258
- comment: schema12.description,
142259
- deprecated: schema12.deprecated,
142258
+ comment: schema13.description,
142259
+ deprecated: schema13.deprecated,
142260
142260
  keyName,
142261
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142262
- params: schema12.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142261
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142262
+ params: schema13.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142263
142263
  type: "INTERSECTION"
142264
142264
  };
142265
142265
  case "ANY":
142266
- return Object.assign(Object.assign({}, options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY), { comment: schema12.description, deprecated: schema12.deprecated, keyName, standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8) });
142266
+ return Object.assign(Object.assign({}, options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY), { comment: schema13.description, deprecated: schema13.deprecated, keyName, standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8) });
142267
142267
  case "ANY_OF":
142268
142268
  return {
142269
- comment: schema12.description,
142270
- deprecated: schema12.deprecated,
142269
+ comment: schema13.description,
142270
+ deprecated: schema13.deprecated,
142271
142271
  keyName,
142272
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142273
- params: schema12.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142272
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142273
+ params: schema13.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142274
142274
  type: "UNION"
142275
142275
  };
142276
142276
  case "BOOLEAN":
142277
142277
  return {
142278
- comment: schema12.description,
142279
- deprecated: schema12.deprecated,
142278
+ comment: schema13.description,
142279
+ deprecated: schema13.deprecated,
142280
142280
  keyName,
142281
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142281
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142282
142282
  type: "BOOLEAN"
142283
142283
  };
142284
142284
  case "CUSTOM_TYPE":
142285
142285
  return {
142286
- comment: schema12.description,
142287
- deprecated: schema12.deprecated,
142286
+ comment: schema13.description,
142287
+ deprecated: schema13.deprecated,
142288
142288
  keyName,
142289
- params: schema12.tsType,
142290
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142289
+ params: schema13.tsType,
142290
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142291
142291
  type: "CUSTOM_TYPE"
142292
142292
  };
142293
142293
  case "NAMED_ENUM":
142294
142294
  return {
142295
- comment: schema12.description,
142296
- deprecated: schema12.deprecated,
142295
+ comment: schema13.description,
142296
+ deprecated: schema13.deprecated,
142297
142297
  keyName,
142298
- standaloneName: standaloneName(schema12, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142299
- params: schema12.enum.map((_10, n5) => ({
142298
+ standaloneName: standaloneName(schema13, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142299
+ params: schema13.enum.map((_10, n5) => ({
142300
142300
  ast: parseLiteral(_10, undefined),
142301
- keyName: schema12.tsEnumNames[n5]
142301
+ keyName: schema13.tsEnumNames[n5]
142302
142302
  })),
142303
142303
  type: "ENUM"
142304
142304
  };
142305
142305
  case "NAMED_SCHEMA":
142306
- return newInterface(schema12, options8, processed, usedNames, keyName);
142306
+ return newInterface(schema13, options8, processed, usedNames, keyName);
142307
142307
  case "NEVER":
142308
142308
  return {
142309
- comment: schema12.description,
142310
- deprecated: schema12.deprecated,
142309
+ comment: schema13.description,
142310
+ deprecated: schema13.deprecated,
142311
142311
  keyName,
142312
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142312
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142313
142313
  type: "NEVER"
142314
142314
  };
142315
142315
  case "NULL":
142316
142316
  return {
142317
- comment: schema12.description,
142318
- deprecated: schema12.deprecated,
142317
+ comment: schema13.description,
142318
+ deprecated: schema13.deprecated,
142319
142319
  keyName,
142320
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142320
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142321
142321
  type: "NULL"
142322
142322
  };
142323
142323
  case "NUMBER":
142324
142324
  return {
142325
- comment: schema12.description,
142326
- deprecated: schema12.deprecated,
142325
+ comment: schema13.description,
142326
+ deprecated: schema13.deprecated,
142327
142327
  keyName,
142328
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142328
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142329
142329
  type: "NUMBER"
142330
142330
  };
142331
142331
  case "OBJECT":
142332
142332
  return {
142333
- comment: schema12.description,
142333
+ comment: schema13.description,
142334
142334
  keyName,
142335
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142335
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142336
142336
  type: "OBJECT",
142337
- deprecated: schema12.deprecated
142337
+ deprecated: schema13.deprecated
142338
142338
  };
142339
142339
  case "ONE_OF":
142340
142340
  return {
142341
- comment: schema12.description,
142342
- deprecated: schema12.deprecated,
142341
+ comment: schema13.description,
142342
+ deprecated: schema13.deprecated,
142343
142343
  keyName,
142344
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142345
- params: schema12.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142344
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142345
+ params: schema13.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142346
142346
  type: "UNION"
142347
142347
  };
142348
142348
  case "REFERENCE":
142349
- throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema12));
142349
+ throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema13));
142350
142350
  case "STRING":
142351
142351
  return {
142352
- comment: schema12.description,
142353
- deprecated: schema12.deprecated,
142352
+ comment: schema13.description,
142353
+ deprecated: schema13.deprecated,
142354
142354
  keyName,
142355
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142355
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142356
142356
  type: "STRING"
142357
142357
  };
142358
142358
  case "TYPED_ARRAY":
142359
- if (Array.isArray(schema12.items)) {
142360
- const minItems2 = schema12.minItems;
142361
- const maxItems2 = schema12.maxItems;
142359
+ if (Array.isArray(schema13.items)) {
142360
+ const minItems2 = schema13.minItems;
142361
+ const maxItems2 = schema13.maxItems;
142362
142362
  const arrayType = {
142363
- comment: schema12.description,
142364
- deprecated: schema12.deprecated,
142363
+ comment: schema13.description,
142364
+ deprecated: schema13.deprecated,
142365
142365
  keyName,
142366
142366
  maxItems: maxItems2,
142367
142367
  minItems: minItems2,
142368
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142369
- params: schema12.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142368
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142369
+ params: schema13.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142370
142370
  type: "TUPLE"
142371
142371
  };
142372
- if (schema12.additionalItems === true) {
142372
+ if (schema13.additionalItems === true) {
142373
142373
  arrayType.spreadParam = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142374
- } else if (schema12.additionalItems) {
142375
- arrayType.spreadParam = parse11(schema12.additionalItems, options8, undefined, processed, usedNames);
142374
+ } else if (schema13.additionalItems) {
142375
+ arrayType.spreadParam = parse11(schema13.additionalItems, options8, undefined, processed, usedNames);
142376
142376
  }
142377
142377
  return arrayType;
142378
142378
  } else {
142379
142379
  return {
142380
- comment: schema12.description,
142381
- deprecated: schema12.deprecated,
142380
+ comment: schema13.description,
142381
+ deprecated: schema13.deprecated,
142382
142382
  keyName,
142383
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142384
- params: parse11(schema12.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142383
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142384
+ params: parse11(schema13.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142385
142385
  type: "ARRAY"
142386
142386
  };
142387
142387
  }
142388
142388
  case "UNION":
142389
142389
  return {
142390
- comment: schema12.description,
142391
- deprecated: schema12.deprecated,
142390
+ comment: schema13.description,
142391
+ deprecated: schema13.deprecated,
142392
142392
  keyName,
142393
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142394
- params: schema12.type.map((type2) => {
142395
- const member = Object.assign(Object.assign({}, (0, lodash_1.omit)(schema12, "$id", "description", "title")), { type: type2 });
142393
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142394
+ params: schema13.type.map((type2) => {
142395
+ const member = Object.assign(Object.assign({}, (0, lodash_1.omit)(schema13, "$id", "description", "title")), { type: type2 });
142396
142396
  (0, utils_1.maybeStripDefault)(member);
142397
142397
  (0, applySchemaTyping_1.applySchemaTyping)(member);
142398
142398
  return parse11(member, options8, undefined, processed, usedNames);
@@ -142401,80 +142401,80 @@ var require_parser2 = __commonJS((exports) => {
142401
142401
  };
142402
142402
  case "UNNAMED_ENUM":
142403
142403
  return {
142404
- comment: schema12.description,
142405
- deprecated: schema12.deprecated,
142404
+ comment: schema13.description,
142405
+ deprecated: schema13.deprecated,
142406
142406
  keyName,
142407
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142408
- params: schema12.enum.map((_10) => parseLiteral(_10, undefined)),
142407
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142408
+ params: schema13.enum.map((_10) => parseLiteral(_10, undefined)),
142409
142409
  type: "UNION"
142410
142410
  };
142411
142411
  case "UNNAMED_SCHEMA":
142412
- return newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition);
142412
+ return newInterface(schema13, options8, processed, usedNames, keyName, keyNameFromDefinition);
142413
142413
  case "UNTYPED_ARRAY":
142414
- const minItems = schema12.minItems;
142415
- const maxItems = typeof schema12.maxItems === "number" ? schema12.maxItems : -1;
142414
+ const minItems = schema13.minItems;
142415
+ const maxItems = typeof schema13.maxItems === "number" ? schema13.maxItems : -1;
142416
142416
  const params = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142417
142417
  if (minItems > 0 || maxItems >= 0) {
142418
142418
  return {
142419
- comment: schema12.description,
142420
- deprecated: schema12.deprecated,
142419
+ comment: schema13.description,
142420
+ deprecated: schema13.deprecated,
142421
142421
  keyName,
142422
- maxItems: schema12.maxItems,
142422
+ maxItems: schema13.maxItems,
142423
142423
  minItems,
142424
142424
  params: Array(Math.max(maxItems, minItems) || 0).fill(params),
142425
142425
  spreadParam: maxItems >= 0 ? undefined : params,
142426
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142426
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142427
142427
  type: "TUPLE"
142428
142428
  };
142429
142429
  }
142430
142430
  return {
142431
- comment: schema12.description,
142432
- deprecated: schema12.deprecated,
142431
+ comment: schema13.description,
142432
+ deprecated: schema13.deprecated,
142433
142433
  keyName,
142434
142434
  params,
142435
- standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142435
+ standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142436
142436
  type: "ARRAY"
142437
142437
  };
142438
142438
  }
142439
142439
  }
142440
- function standaloneName(schema12, keyNameFromDefinition, usedNames, options8) {
142440
+ function standaloneName(schema13, keyNameFromDefinition, usedNames, options8) {
142441
142441
  var _a7;
142442
- const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema12, keyNameFromDefinition)) || schema12.title || schema12.$id || keyNameFromDefinition;
142442
+ const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema13, keyNameFromDefinition)) || schema13.title || schema13.$id || keyNameFromDefinition;
142443
142443
  if (name2) {
142444
142444
  return (0, utils_1.generateName)(name2, usedNames);
142445
142445
  }
142446
142446
  }
142447
- function newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142448
- const name2 = standaloneName(schema12, keyNameFromDefinition, usedNames, options8);
142447
+ function newInterface(schema13, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142448
+ const name2 = standaloneName(schema13, keyNameFromDefinition, usedNames, options8);
142449
142449
  return {
142450
- comment: schema12.description,
142451
- deprecated: schema12.deprecated,
142450
+ comment: schema13.description,
142451
+ deprecated: schema13.deprecated,
142452
142452
  keyName,
142453
- params: parseSchema(schema12, options8, processed, usedNames, name2),
142453
+ params: parseSchema(schema13, options8, processed, usedNames, name2),
142454
142454
  standaloneName: name2,
142455
- superTypes: parseSuperTypes(schema12, options8, processed, usedNames),
142455
+ superTypes: parseSuperTypes(schema13, options8, processed, usedNames),
142456
142456
  type: "INTERFACE"
142457
142457
  };
142458
142458
  }
142459
- function parseSuperTypes(schema12, options8, processed, usedNames) {
142460
- const superTypes = schema12.extends;
142459
+ function parseSuperTypes(schema13, options8, processed, usedNames) {
142460
+ const superTypes = schema13.extends;
142461
142461
  if (!superTypes) {
142462
142462
  return [];
142463
142463
  }
142464
142464
  return superTypes.map((_10) => parse11(_10, options8, undefined, processed, usedNames));
142465
142465
  }
142466
- function parseSchema(schema12, options8, processed, usedNames, parentSchemaName) {
142467
- let asts = (0, lodash_1.map)(schema12.properties, (value, key2) => ({
142466
+ function parseSchema(schema13, options8, processed, usedNames, parentSchemaName) {
142467
+ let asts = (0, lodash_1.map)(schema13.properties, (value, key2) => ({
142468
142468
  ast: parse11(value, options8, key2, processed, usedNames),
142469
142469
  isPatternProperty: false,
142470
- isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142470
+ isRequired: (0, lodash_1.includes)(schema13.required || [], key2),
142471
142471
  isUnreachableDefinition: false,
142472
142472
  keyName: key2
142473
142473
  }));
142474
142474
  let singlePatternProperty = false;
142475
- if (schema12.patternProperties) {
142476
- singlePatternProperty = !schema12.additionalProperties && Object.keys(schema12.patternProperties).length === 1;
142477
- asts = asts.concat((0, lodash_1.map)(schema12.patternProperties, (value, key2) => {
142475
+ if (schema13.patternProperties) {
142476
+ singlePatternProperty = !schema13.additionalProperties && Object.keys(schema13.patternProperties).length === 1;
142477
+ asts = asts.concat((0, lodash_1.map)(schema13.patternProperties, (value, key2) => {
142478
142478
  const ast = parse11(value, options8, key2, processed, usedNames);
142479
142479
  const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema definition
142480
142480
  via the \`patternProperty\` "${key2.replace("*/", "*\\/")}".`;
@@ -142484,14 +142484,14 @@ ${comment}` : comment;
142484
142484
  return {
142485
142485
  ast,
142486
142486
  isPatternProperty: !singlePatternProperty,
142487
- isRequired: singlePatternProperty || (0, lodash_1.includes)(schema12.required || [], key2),
142487
+ isRequired: singlePatternProperty || (0, lodash_1.includes)(schema13.required || [], key2),
142488
142488
  isUnreachableDefinition: false,
142489
142489
  keyName: singlePatternProperty ? "[k: string]" : key2
142490
142490
  };
142491
142491
  }));
142492
142492
  }
142493
142493
  if (options8.unreachableDefinitions) {
142494
- asts = asts.concat((0, lodash_1.map)(schema12.$defs, (value, key2) => {
142494
+ asts = asts.concat((0, lodash_1.map)(schema13.$defs, (value, key2) => {
142495
142495
  const ast = parse11(value, options8, key2, processed, usedNames);
142496
142496
  const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema
142497
142497
  via the \`definition\` "${key2}".`;
@@ -142501,13 +142501,13 @@ ${comment}` : comment;
142501
142501
  return {
142502
142502
  ast,
142503
142503
  isPatternProperty: false,
142504
- isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142504
+ isRequired: (0, lodash_1.includes)(schema13.required || [], key2),
142505
142505
  isUnreachableDefinition: true,
142506
142506
  keyName: key2
142507
142507
  };
142508
142508
  }));
142509
142509
  }
142510
- switch (schema12.additionalProperties) {
142510
+ switch (schema13.additionalProperties) {
142511
142511
  case undefined:
142512
142512
  case true:
142513
142513
  if (singlePatternProperty) {
@@ -142524,7 +142524,7 @@ ${comment}` : comment;
142524
142524
  return asts;
142525
142525
  default:
142526
142526
  return asts.concat({
142527
- ast: parse11(schema12.additionalProperties, options8, "[k: string]", processed, usedNames),
142527
+ ast: parse11(schema13.additionalProperties, options8, "[k: string]", processed, usedNames),
142528
142528
  isPatternProperty: false,
142529
142529
  isRequired: true,
142530
142530
  isUnreachableDefinition: false,
@@ -142532,22 +142532,22 @@ ${comment}` : comment;
142532
142532
  });
142533
142533
  }
142534
142534
  }
142535
- function getDefinitions(schema12, isSchema = true, processed = new Set) {
142536
- if (processed.has(schema12)) {
142535
+ function getDefinitions(schema13, isSchema = true, processed = new Set) {
142536
+ if (processed.has(schema13)) {
142537
142537
  return {};
142538
142538
  }
142539
- processed.add(schema12);
142540
- if (Array.isArray(schema12)) {
142541
- return schema12.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142539
+ processed.add(schema13);
142540
+ if (Array.isArray(schema13)) {
142541
+ return schema13.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142542
142542
  }
142543
- if ((0, lodash_1.isPlainObject)(schema12)) {
142544
- 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)), {}));
142543
+ if ((0, lodash_1.isPlainObject)(schema13)) {
142544
+ return Object.assign(Object.assign({}, isSchema && hasDefinitions(schema13) ? schema13.$defs : {}), Object.keys(schema13).reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(schema13[cur], false, processed)), {}));
142545
142545
  }
142546
142546
  return {};
142547
142547
  }
142548
142548
  var getDefinitionsMemoized = (0, lodash_1.memoize)(getDefinitions);
142549
- function hasDefinitions(schema12) {
142550
- return "$defs" in schema12;
142549
+ function hasDefinitions(schema13) {
142550
+ return "$defs" in schema13;
142551
142551
  }
142552
142552
  });
142553
142553
 
@@ -142960,7 +142960,7 @@ var require_url = __commonJS((exports) => {
142960
142960
  };
142961
142961
  Object.defineProperty(exports, "__esModule", { value: true });
142962
142962
  exports.parse = undefined;
142963
- exports.resolve = resolve13;
142963
+ exports.resolve = resolve16;
142964
142964
  exports.cwd = cwd;
142965
142965
  exports.getProtocol = getProtocol;
142966
142966
  exports.getExtension = getExtension;
@@ -142972,7 +142972,7 @@ var require_url = __commonJS((exports) => {
142972
142972
  exports.fromFileSystemPath = fromFileSystemPath;
142973
142973
  exports.toFileSystemPath = toFileSystemPath;
142974
142974
  exports.safePointerToPath = safePointerToPath;
142975
- exports.relative = relative4;
142975
+ exports.relative = relative5;
142976
142976
  var convert_path_to_posix_1 = __importDefault(require_convert_path_to_posix());
142977
142977
  var path_1 = __importStar(__require("path"));
142978
142978
  var forwardSlashPattern = /\//g;
@@ -142988,7 +142988,7 @@ var require_url = __commonJS((exports) => {
142988
142988
  var urlDecodePatterns = [/%23/g, "#", /%24/g, "$", /%26/g, "&", /%2C/g, ",", /%40/g, "@"];
142989
142989
  var parse11 = (u4) => new URL(u4);
142990
142990
  exports.parse = parse11;
142991
- function resolve13(from, to5) {
142991
+ function resolve16(from, to5) {
142992
142992
  const fromUrl = new URL((0, convert_path_to_posix_1.default)(from), "https://aaa.nonexistanturl.com");
142993
142993
  const resolvedUrl = new URL((0, convert_path_to_posix_1.default)(to5), fromUrl);
142994
142994
  const endSpaces = to5.match(/(\s*)$/)?.[1] || "";
@@ -143122,9 +143122,9 @@ var require_url = __commonJS((exports) => {
143122
143122
  return decodeURIComponent(value).replace(jsonPointerSlash, "/").replace(jsonPointerTilde, "~");
143123
143123
  });
143124
143124
  }
143125
- function relative4(from, to5) {
143125
+ function relative5(from, to5) {
143126
143126
  if (!isFileSystemPath(from) || !isFileSystemPath(to5)) {
143127
- return resolve13(from, to5);
143127
+ return resolve16(from, to5);
143128
143128
  }
143129
143129
  const fromDir = path_1.default.dirname(stripHash(from));
143130
143130
  const toPath4 = stripHash(to5);
@@ -143800,7 +143800,7 @@ var require_plugins = __commonJS((exports) => {
143800
143800
  let plugin;
143801
143801
  let lastError;
143802
143802
  let index = 0;
143803
- return new Promise((resolve13, reject) => {
143803
+ return new Promise((resolve16, reject) => {
143804
143804
  runNextPlugin();
143805
143805
  function runNextPlugin() {
143806
143806
  plugin = plugins[index++];
@@ -143828,7 +143828,7 @@ var require_plugins = __commonJS((exports) => {
143828
143828
  }
143829
143829
  }
143830
143830
  function onSuccess(result) {
143831
- resolve13({
143831
+ resolve16({
143832
143832
  plugin,
143833
143833
  result
143834
143834
  });
@@ -143925,7 +143925,7 @@ var require_parse7 = __commonJS((exports) => {
143925
143925
  extension: url3.getExtension(path18)
143926
143926
  };
143927
143927
  try {
143928
- const resolver = await readFile4(file2, options8, $refs);
143928
+ const resolver = await readFile7(file2, options8, $refs);
143929
143929
  $ref.pathType = resolver.plugin.name;
143930
143930
  file2.data = resolver.result;
143931
143931
  const parser2 = await parseFile(file2, options8, $refs);
@@ -143938,7 +143938,7 @@ var require_parse7 = __commonJS((exports) => {
143938
143938
  throw err;
143939
143939
  }
143940
143940
  }
143941
- async function readFile4(file2, options8, $refs) {
143941
+ async function readFile7(file2, options8, $refs) {
143942
143942
  let resolvers = plugins.all(options8.resolve);
143943
143943
  resolvers = plugins.filter(resolvers, "canRead", file2);
143944
143944
  plugins.sort(resolvers);
@@ -144371,7 +144371,7 @@ var require_normalize_args = __commonJS((exports) => {
144371
144371
  var options_js_1 = require_options();
144372
144372
  function normalizeArgs(_args) {
144373
144373
  let path18;
144374
- let schema12;
144374
+ let schema13;
144375
144375
  let options8;
144376
144376
  let callback;
144377
144377
  const args = Array.prototype.slice.call(_args);
@@ -144381,15 +144381,15 @@ var require_normalize_args = __commonJS((exports) => {
144381
144381
  if (typeof args[0] === "string") {
144382
144382
  path18 = args[0];
144383
144383
  if (typeof args[2] === "object") {
144384
- schema12 = args[1];
144384
+ schema13 = args[1];
144385
144385
  options8 = args[2];
144386
144386
  } else {
144387
- schema12 = undefined;
144387
+ schema13 = undefined;
144388
144388
  options8 = args[1];
144389
144389
  }
144390
144390
  } else {
144391
144391
  path18 = "";
144392
- schema12 = args[0];
144392
+ schema13 = args[0];
144393
144393
  options8 = args[1];
144394
144394
  }
144395
144395
  try {
@@ -144397,12 +144397,12 @@ var require_normalize_args = __commonJS((exports) => {
144397
144397
  } catch (e8) {
144398
144398
  console.error(`JSON Schema Ref Parser: Error normalizing options: ${e8}`);
144399
144399
  }
144400
- if (!options8.mutateInputSchema && typeof schema12 === "object") {
144401
- schema12 = JSON.parse(JSON.stringify(schema12));
144400
+ if (!options8.mutateInputSchema && typeof schema13 === "object") {
144401
+ schema13 = JSON.parse(JSON.stringify(schema13));
144402
144402
  }
144403
144403
  return {
144404
144404
  path: path18,
144405
- schema: schema12,
144405
+ schema: schema13,
144406
144406
  options: options8,
144407
144407
  callback
144408
144408
  };
@@ -145161,11 +145161,11 @@ var require_lib3 = __commonJS((exports) => {
145161
145161
  var require_resolver = __commonJS((exports) => {
145162
145162
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
145163
145163
  function adopt(value) {
145164
- return value instanceof P9 ? value : new P9(function(resolve13) {
145165
- resolve13(value);
145164
+ return value instanceof P9 ? value : new P9(function(resolve16) {
145165
+ resolve16(value);
145166
145166
  });
145167
145167
  }
145168
- return new (P9 || (P9 = Promise))(function(resolve13, reject) {
145168
+ return new (P9 || (P9 = Promise))(function(resolve16, reject) {
145169
145169
  function fulfilled(value) {
145170
145170
  try {
145171
145171
  step(generator.next(value));
@@ -145181,7 +145181,7 @@ var require_resolver = __commonJS((exports) => {
145181
145181
  }
145182
145182
  }
145183
145183
  function step(result) {
145184
- result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
145184
+ result.done ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
145185
145185
  }
145186
145186
  step((generator = generator.apply(thisArg, _arguments || [])).next());
145187
145187
  });
@@ -145191,12 +145191,12 @@ var require_resolver = __commonJS((exports) => {
145191
145191
  var json_schema_ref_parser_1 = require_lib3();
145192
145192
  var utils_1 = require_utils7();
145193
145193
  function dereference(schema_1, _a7) {
145194
- return __awaiter(this, arguments, undefined, function* (schema12, { cwd, $refOptions }) {
145195
- (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema12);
145194
+ return __awaiter(this, arguments, undefined, function* (schema13, { cwd, $refOptions }) {
145195
+ (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema13);
145196
145196
  const parser2 = new json_schema_ref_parser_1.$RefParser;
145197
145197
  const dereferencedPaths = new WeakMap;
145198
- const dereferencedSchema = yield parser2.dereference(cwd, schema12, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema13) {
145199
- dereferencedPaths.set(schema13, $ref);
145198
+ const dereferencedSchema = yield parser2.dereference(cwd, schema13, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema14) {
145199
+ dereferencedPaths.set(schema14, $ref);
145200
145200
  } }) }));
145201
145201
  return { dereferencedPaths, dereferencedSchema };
145202
145202
  });
@@ -145210,46 +145210,46 @@ var require_validator = __commonJS((exports) => {
145210
145210
  exports.validate = undefined;
145211
145211
  var utils_1 = require_utils7();
145212
145212
  var rules = new Map;
145213
- rules.set("Enum members and tsEnumNames must be of the same length", (schema12) => {
145214
- if (schema12.enum && schema12.tsEnumNames && schema12.enum.length !== schema12.tsEnumNames.length) {
145213
+ rules.set("Enum members and tsEnumNames must be of the same length", (schema13) => {
145214
+ if (schema13.enum && schema13.tsEnumNames && schema13.enum.length !== schema13.tsEnumNames.length) {
145215
145215
  return false;
145216
145216
  }
145217
145217
  });
145218
- rules.set("tsEnumNames must be an array of strings", (schema12) => {
145219
- if (schema12.tsEnumNames && schema12.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145218
+ rules.set("tsEnumNames must be an array of strings", (schema13) => {
145219
+ if (schema13.tsEnumNames && schema13.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145220
145220
  return false;
145221
145221
  }
145222
145222
  });
145223
- rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema12) => {
145224
- const { maxItems, minItems } = schema12;
145223
+ rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema13) => {
145224
+ const { maxItems, minItems } = schema13;
145225
145225
  if (typeof maxItems === "number" && typeof minItems === "number") {
145226
145226
  return maxItems >= minItems;
145227
145227
  }
145228
145228
  });
145229
- rules.set("When maxItems exists, maxItems >= 0", (schema12) => {
145230
- const { maxItems } = schema12;
145229
+ rules.set("When maxItems exists, maxItems >= 0", (schema13) => {
145230
+ const { maxItems } = schema13;
145231
145231
  if (typeof maxItems === "number") {
145232
145232
  return maxItems >= 0;
145233
145233
  }
145234
145234
  });
145235
- rules.set("When minItems exists, minItems >= 0", (schema12) => {
145236
- const { minItems } = schema12;
145235
+ rules.set("When minItems exists, minItems >= 0", (schema13) => {
145236
+ const { minItems } = schema13;
145237
145237
  if (typeof minItems === "number") {
145238
145238
  return minItems >= 0;
145239
145239
  }
145240
145240
  });
145241
- rules.set("deprecated must be a boolean", (schema12) => {
145242
- const typeOfDeprecated = typeof schema12.deprecated;
145241
+ rules.set("deprecated must be a boolean", (schema13) => {
145242
+ const typeOfDeprecated = typeof schema13.deprecated;
145243
145243
  return typeOfDeprecated === "boolean" || typeOfDeprecated === "undefined";
145244
145244
  });
145245
- function validate2(schema12, filename) {
145245
+ function validate2(schema13, filename) {
145246
145246
  const errors5 = [];
145247
145247
  rules.forEach((rule, ruleName) => {
145248
- (0, utils_1.traverse)(schema12, (schema13, key2) => {
145249
- if (rule(schema13) === false) {
145248
+ (0, utils_1.traverse)(schema13, (schema14, key2) => {
145249
+ if (rule(schema14) === false) {
145250
145250
  errors5.push(`Error at key "${key2}" in file "${filename}": ${ruleName}`);
145251
145251
  }
145252
- return schema13;
145252
+ return schema14;
145253
145253
  });
145254
145254
  });
145255
145255
  return errors5;
@@ -145263,25 +145263,25 @@ var require_linker = __commonJS((exports) => {
145263
145263
  exports.link = undefined;
145264
145264
  var JSONSchema_1 = require_JSONSchema();
145265
145265
  var lodash_1 = require_lodash8();
145266
- function link2(schema12, parent = null) {
145267
- if (!Array.isArray(schema12) && !(0, lodash_1.isPlainObject)(schema12)) {
145268
- return schema12;
145266
+ function link2(schema13, parent = null) {
145267
+ if (!Array.isArray(schema13) && !(0, lodash_1.isPlainObject)(schema13)) {
145268
+ return schema13;
145269
145269
  }
145270
- if (schema12.hasOwnProperty(JSONSchema_1.Parent)) {
145271
- return schema12;
145270
+ if (schema13.hasOwnProperty(JSONSchema_1.Parent)) {
145271
+ return schema13;
145272
145272
  }
145273
- Object.defineProperty(schema12, JSONSchema_1.Parent, {
145273
+ Object.defineProperty(schema13, JSONSchema_1.Parent, {
145274
145274
  enumerable: false,
145275
145275
  value: parent,
145276
145276
  writable: false
145277
145277
  });
145278
- if (Array.isArray(schema12)) {
145279
- schema12.forEach((child) => link2(child, schema12));
145278
+ if (Array.isArray(schema13)) {
145279
+ schema13.forEach((child) => link2(child, schema13));
145280
145280
  }
145281
- for (const key2 in schema12) {
145282
- link2(schema12[key2], schema12);
145281
+ for (const key2 in schema13) {
145282
+ link2(schema13[key2], schema13);
145283
145283
  }
145284
- return schema12;
145284
+ return schema13;
145285
145285
  }
145286
145286
  exports.link = link2;
145287
145287
  });
@@ -145302,11 +145302,11 @@ var require_optionValidator = __commonJS((exports) => {
145302
145302
  var require_src3 = __commonJS((exports) => {
145303
145303
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
145304
145304
  function adopt(value) {
145305
- return value instanceof P9 ? value : new P9(function(resolve13) {
145306
- resolve13(value);
145305
+ return value instanceof P9 ? value : new P9(function(resolve16) {
145306
+ resolve16(value);
145307
145307
  });
145308
145308
  }
145309
- return new (P9 || (P9 = Promise))(function(resolve13, reject) {
145309
+ return new (P9 || (P9 = Promise))(function(resolve16, reject) {
145310
145310
  function fulfilled(value) {
145311
145311
  try {
145312
145312
  step(generator.next(value));
@@ -145322,7 +145322,7 @@ var require_src3 = __commonJS((exports) => {
145322
145322
  }
145323
145323
  }
145324
145324
  function step(result) {
145325
- result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
145325
+ result.done ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
145326
145326
  }
145327
145327
  step((generator = generator.apply(thisArg, _arguments || [])).next());
145328
145328
  });
@@ -145373,8 +145373,8 @@ var require_src3 = __commonJS((exports) => {
145373
145373
  unknownAny: true
145374
145374
  };
145375
145375
  function compileFromFile(filename, options8 = exports.DEFAULT_OPTIONS) {
145376
- const schema12 = parseAsJSONSchema(filename);
145377
- return compile(schema12, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145376
+ const schema13 = parseAsJSONSchema(filename);
145377
+ return compile(schema13, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145378
145378
  }
145379
145379
  exports.compileFromFile = compileFromFile;
145380
145380
  function parseAsJSONSchema(filename) {
@@ -145384,7 +145384,7 @@ var require_src3 = __commonJS((exports) => {
145384
145384
  return (0, utils_1.parseFileAsJSONSchema)(filename, contents.toString());
145385
145385
  }
145386
145386
  function compile(schema_1, name_1) {
145387
- return __awaiter(this, arguments, undefined, function* (schema12, name2, options8 = {}) {
145387
+ return __awaiter(this, arguments, undefined, function* (schema13, name2, options8 = {}) {
145388
145388
  (0, optionValidator_1.validateOptions)(options8);
145389
145389
  const _options = (0, lodash_1.merge)({}, exports.DEFAULT_OPTIONS, options8);
145390
145390
  const start = Date.now();
@@ -145394,7 +145394,7 @@ var require_src3 = __commonJS((exports) => {
145394
145394
  if (!(0, lodash_1.endsWith)(_options.cwd, "/")) {
145395
145395
  _options.cwd += "/";
145396
145396
  }
145397
- const _schema = (0, lodash_1.cloneDeep)(schema12);
145397
+ const _schema = (0, lodash_1.cloneDeep)(schema13);
145398
145398
  const { dereferencedPaths, dereferencedSchema } = yield (0, resolver_1.dereference)(_schema, _options);
145399
145399
  if (process.env.VERBOSE) {
145400
145400
  if ((0, util_1.isDeepStrictEqual)(_schema, dereferencedSchema)) {
@@ -146451,7 +146451,7 @@ var require_depd = __commonJS((exports, module) => {
146451
146451
  * Copyright(c) 2014-2018 Douglas Christopher Wilson
146452
146452
  * MIT Licensed
146453
146453
  */
146454
- var relative4 = __require("path").relative;
146454
+ var relative5 = __require("path").relative;
146455
146455
  module.exports = depd;
146456
146456
  var basePath = process.cwd();
146457
146457
  function containsNamespace(str, namespace) {
@@ -146647,7 +146647,7 @@ var require_depd = __commonJS((exports, module) => {
146647
146647
  return formatted;
146648
146648
  }
146649
146649
  function formatLocation(callSite) {
146650
- return relative4(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
146650
+ return relative5(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
146651
146651
  }
146652
146652
  function getStack() {
146653
146653
  var limit = Error.stackTraceLimit;
@@ -150643,7 +150643,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
150643
150643
  // ../../node_modules/iconv-lite/encodings/index.js
150644
150644
  var require_encodings = __commonJS((exports, module) => {
150645
150645
  var mergeModules = require_merge_exports();
150646
- var modules = [
150646
+ var modules2 = [
150647
150647
  require_internal(),
150648
150648
  require_utf32(),
150649
150649
  require_utf16(),
@@ -150654,8 +150654,8 @@ var require_encodings = __commonJS((exports, module) => {
150654
150654
  require_dbcs_codec(),
150655
150655
  require_dbcs_data()
150656
150656
  ];
150657
- for (i5 = 0;i5 < modules.length; i5++) {
150658
- module = modules[i5];
150657
+ for (i5 = 0;i5 < modules2.length; i5++) {
150658
+ module = modules2[i5];
150659
150659
  mergeModules(exports, module);
150660
150660
  }
150661
150661
  var module;
@@ -150984,11 +150984,11 @@ var require_raw_body = __commonJS((exports, module) => {
150984
150984
  if (done) {
150985
150985
  return readStream(stream, encoding, length, limit, wrap(done));
150986
150986
  }
150987
- return new Promise(function executor(resolve13, reject) {
150987
+ return new Promise(function executor(resolve16, reject) {
150988
150988
  readStream(stream, encoding, length, limit, function onRead2(err, buf) {
150989
150989
  if (err)
150990
150990
  return reject(err);
150991
- resolve13(buf);
150991
+ resolve16(buf);
150992
150992
  });
150993
150993
  });
150994
150994
  }
@@ -160792,7 +160792,7 @@ var require_mime_types = __commonJS((exports) => {
160792
160792
  * MIT Licensed
160793
160793
  */
160794
160794
  var db2 = require_db();
160795
- var extname2 = __require("path").extname;
160795
+ var extname3 = __require("path").extname;
160796
160796
  var mimeScore = require_mimeScore();
160797
160797
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
160798
160798
  var TEXT_TYPE_REGEXP = /^text\//i;
@@ -160849,7 +160849,7 @@ var require_mime_types = __commonJS((exports) => {
160849
160849
  if (!path18 || typeof path18 !== "string") {
160850
160850
  return false;
160851
160851
  }
160852
- var extension2 = extname2("x." + path18).toLowerCase().slice(1);
160852
+ var extension2 = extname3("x." + path18).toLowerCase().slice(1);
160853
160853
  if (!extension2) {
160854
160854
  return false;
160855
160855
  }
@@ -164109,16 +164109,16 @@ var require_view = __commonJS((exports, module) => {
164109
164109
  var debug = require_src4()("express:view");
164110
164110
  var path18 = __require("node:path");
164111
164111
  var fs28 = __require("node:fs");
164112
- var dirname20 = path18.dirname;
164112
+ var dirname21 = path18.dirname;
164113
164113
  var basename6 = path18.basename;
164114
- var extname2 = path18.extname;
164115
- var join27 = path18.join;
164116
- var resolve13 = path18.resolve;
164114
+ var extname3 = path18.extname;
164115
+ var join29 = path18.join;
164116
+ var resolve16 = path18.resolve;
164117
164117
  module.exports = View;
164118
164118
  function View(name2, options8) {
164119
164119
  var opts = options8 || {};
164120
164120
  this.defaultEngine = opts.defaultEngine;
164121
- this.ext = extname2(name2);
164121
+ this.ext = extname3(name2);
164122
164122
  this.name = name2;
164123
164123
  this.root = opts.root;
164124
164124
  if (!this.ext && !this.defaultEngine) {
@@ -164147,8 +164147,8 @@ var require_view = __commonJS((exports, module) => {
164147
164147
  debug('lookup "%s"', name2);
164148
164148
  for (var i5 = 0;i5 < roots.length && !path19; i5++) {
164149
164149
  var root2 = roots[i5];
164150
- var loc = resolve13(root2, name2);
164151
- var dir = dirname20(loc);
164150
+ var loc = resolve16(root2, name2);
164151
+ var dir = dirname21(loc);
164152
164152
  var file2 = basename6(loc);
164153
164153
  path19 = this.resolve(dir, file2);
164154
164154
  }
@@ -164172,16 +164172,16 @@ var require_view = __commonJS((exports, module) => {
164172
164172
  });
164173
164173
  sync = false;
164174
164174
  };
164175
- View.prototype.resolve = function resolve14(dir, file2) {
164175
+ View.prototype.resolve = function resolve17(dir, file2) {
164176
164176
  var ext = this.ext;
164177
- var path19 = join27(dir, file2);
164178
- var stat2 = tryStat(path19);
164179
- if (stat2 && stat2.isFile()) {
164177
+ var path19 = join29(dir, file2);
164178
+ var stat4 = tryStat(path19);
164179
+ if (stat4 && stat4.isFile()) {
164180
164180
  return path19;
164181
164181
  }
164182
- path19 = join27(dir, basename6(file2, ext), "index" + ext);
164183
- stat2 = tryStat(path19);
164184
- if (stat2 && stat2.isFile()) {
164182
+ path19 = join29(dir, basename6(file2, ext), "index" + ext);
164183
+ stat4 = tryStat(path19);
164184
+ if (stat4 && stat4.isFile()) {
164185
164185
  return path19;
164186
164186
  }
164187
164187
  };
@@ -164232,9 +164232,9 @@ var require_etag = __commonJS((exports, module) => {
164232
164232
  }
164233
164233
  return obj && typeof obj === "object" && "ctime" in obj && toString2.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString2.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number";
164234
164234
  }
164235
- function stattag(stat2) {
164236
- var mtime = stat2.mtime.getTime().toString(16);
164237
- var size = stat2.size.toString(16);
164235
+ function stattag(stat4) {
164236
+ var mtime = stat4.mtime.getTime().toString(16);
164237
+ var size = stat4.size.toString(16);
164238
164238
  return '"' + size + "-" + mtime + '"';
164239
164239
  }
164240
164240
  });
@@ -166331,7 +166331,7 @@ var require_application = __commonJS((exports, module) => {
166331
166331
  var compileETag = require_utils10().compileETag;
166332
166332
  var compileQueryParser = require_utils10().compileQueryParser;
166333
166333
  var compileTrust = require_utils10().compileTrust;
166334
- var resolve13 = __require("node:path").resolve;
166334
+ var resolve16 = __require("node:path").resolve;
166335
166335
  var once9 = require_once();
166336
166336
  var Router = require_router();
166337
166337
  var slice = Array.prototype.slice;
@@ -166385,7 +166385,7 @@ var require_application = __commonJS((exports, module) => {
166385
166385
  this.mountpath = "/";
166386
166386
  this.locals.settings = this.settings;
166387
166387
  this.set("view", View);
166388
- this.set("views", resolve13("views"));
166388
+ this.set("views", resolve16("views"));
166389
166389
  this.set("jsonp callback name", "callback");
166390
166390
  if (env4 === "production") {
166391
166391
  this.enable("view cache");
@@ -167873,11 +167873,11 @@ var require_send = __commonJS((exports, module) => {
167873
167873
  var statuses = require_statuses();
167874
167874
  var Stream2 = __require("stream");
167875
167875
  var util2 = __require("util");
167876
- var extname2 = path18.extname;
167877
- var join27 = path18.join;
167876
+ var extname3 = path18.extname;
167877
+ var join29 = path18.join;
167878
167878
  var normalize2 = path18.normalize;
167879
- var resolve13 = path18.resolve;
167880
- var sep = path18.sep;
167879
+ var resolve16 = path18.resolve;
167880
+ var sep2 = path18.sep;
167881
167881
  var BYTES_RANGE_REGEXP = /^ *bytes=/;
167882
167882
  var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000;
167883
167883
  var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
@@ -167905,7 +167905,7 @@ var require_send = __commonJS((exports, module) => {
167905
167905
  this._maxage = opts.maxAge || opts.maxage;
167906
167906
  this._maxage = typeof this._maxage === "string" ? ms9(this._maxage) : Number(this._maxage);
167907
167907
  this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0;
167908
- this._root = opts.root ? resolve13(opts.root) : null;
167908
+ this._root = opts.root ? resolve16(opts.root) : null;
167909
167909
  }
167910
167910
  util2.inherits(SendStream, Stream2);
167911
167911
  SendStream.prototype.error = function error48(status, err) {
@@ -168038,23 +168038,23 @@ var require_send = __commonJS((exports, module) => {
168038
168038
  var parts;
168039
168039
  if (root2 !== null) {
168040
168040
  if (path19) {
168041
- path19 = normalize2("." + sep + path19);
168041
+ path19 = normalize2("." + sep2 + path19);
168042
168042
  }
168043
168043
  if (UP_PATH_REGEXP.test(path19)) {
168044
168044
  debug('malicious path "%s"', path19);
168045
168045
  this.error(403);
168046
168046
  return res;
168047
168047
  }
168048
- parts = path19.split(sep);
168049
- path19 = normalize2(join27(root2, path19));
168048
+ parts = path19.split(sep2);
168049
+ path19 = normalize2(join29(root2, path19));
168050
168050
  } else {
168051
168051
  if (UP_PATH_REGEXP.test(path19)) {
168052
168052
  debug('malicious path "%s"', path19);
168053
168053
  this.error(403);
168054
168054
  return res;
168055
168055
  }
168056
- parts = normalize2(path19).split(sep);
168057
- path19 = resolve13(path19);
168056
+ parts = normalize2(path19).split(sep2);
168057
+ path19 = resolve16(path19);
168058
168058
  }
168059
168059
  if (containsDotFile(parts)) {
168060
168060
  debug('%s dotfile "%s"', this._dotfiles, path19);
@@ -168077,8 +168077,8 @@ var require_send = __commonJS((exports, module) => {
168077
168077
  this.sendFile(path19);
168078
168078
  return res;
168079
168079
  };
168080
- SendStream.prototype.send = function send2(path19, stat2) {
168081
- var len = stat2.size;
168080
+ SendStream.prototype.send = function send2(path19, stat4) {
168081
+ var len = stat4.size;
168082
168082
  var options8 = this.options;
168083
168083
  var opts = {};
168084
168084
  var res = this.res;
@@ -168090,7 +168090,7 @@ var require_send = __commonJS((exports, module) => {
168090
168090
  return;
168091
168091
  }
168092
168092
  debug('pipe "%s"', path19);
168093
- this.setHeader(path19, stat2);
168093
+ this.setHeader(path19, stat4);
168094
168094
  this.type(path19);
168095
168095
  if (this.isConditionalGET()) {
168096
168096
  if (this.isPreconditionFailure()) {
@@ -168147,19 +168147,19 @@ var require_send = __commonJS((exports, module) => {
168147
168147
  var i5 = 0;
168148
168148
  var self2 = this;
168149
168149
  debug('stat "%s"', path19);
168150
- fs28.stat(path19, function onstat(err, stat2) {
168151
- var pathEndsWithSep = path19[path19.length - 1] === sep;
168152
- if (err && err.code === "ENOENT" && !extname2(path19) && !pathEndsWithSep) {
168150
+ fs28.stat(path19, function onstat(err, stat4) {
168151
+ var pathEndsWithSep = path19[path19.length - 1] === sep2;
168152
+ if (err && err.code === "ENOENT" && !extname3(path19) && !pathEndsWithSep) {
168153
168153
  return next(err);
168154
168154
  }
168155
168155
  if (err)
168156
168156
  return self2.onStatError(err);
168157
- if (stat2.isDirectory())
168157
+ if (stat4.isDirectory())
168158
168158
  return self2.redirect(path19);
168159
168159
  if (pathEndsWithSep)
168160
168160
  return self2.error(404);
168161
- self2.emit("file", path19, stat2);
168162
- self2.send(path19, stat2);
168161
+ self2.emit("file", path19, stat4);
168162
+ self2.send(path19, stat4);
168163
168163
  });
168164
168164
  function next(err) {
168165
168165
  if (self2._extensions.length <= i5) {
@@ -168167,13 +168167,13 @@ var require_send = __commonJS((exports, module) => {
168167
168167
  }
168168
168168
  var p4 = path19 + "." + self2._extensions[i5++];
168169
168169
  debug('stat "%s"', p4);
168170
- fs28.stat(p4, function(err2, stat2) {
168170
+ fs28.stat(p4, function(err2, stat4) {
168171
168171
  if (err2)
168172
168172
  return next(err2);
168173
- if (stat2.isDirectory())
168173
+ if (stat4.isDirectory())
168174
168174
  return next();
168175
- self2.emit("file", p4, stat2);
168176
- self2.send(p4, stat2);
168175
+ self2.emit("file", p4, stat4);
168176
+ self2.send(p4, stat4);
168177
168177
  });
168178
168178
  }
168179
168179
  };
@@ -168186,15 +168186,15 @@ var require_send = __commonJS((exports, module) => {
168186
168186
  return self2.onStatError(err);
168187
168187
  return self2.error(404);
168188
168188
  }
168189
- var p4 = join27(path19, self2._index[i5]);
168189
+ var p4 = join29(path19, self2._index[i5]);
168190
168190
  debug('stat "%s"', p4);
168191
- fs28.stat(p4, function(err2, stat2) {
168191
+ fs28.stat(p4, function(err2, stat4) {
168192
168192
  if (err2)
168193
168193
  return next(err2);
168194
- if (stat2.isDirectory())
168194
+ if (stat4.isDirectory())
168195
168195
  return next();
168196
- self2.emit("file", p4, stat2);
168197
- self2.send(p4, stat2);
168196
+ self2.emit("file", p4, stat4);
168197
+ self2.send(p4, stat4);
168198
168198
  });
168199
168199
  }
168200
168200
  next();
@@ -168221,14 +168221,14 @@ var require_send = __commonJS((exports, module) => {
168221
168221
  var res = this.res;
168222
168222
  if (res.getHeader("Content-Type"))
168223
168223
  return;
168224
- var ext = extname2(path19);
168224
+ var ext = extname3(path19);
168225
168225
  var type2 = mime.contentType(ext) || "application/octet-stream";
168226
168226
  debug("content-type %s", type2);
168227
168227
  res.setHeader("Content-Type", type2);
168228
168228
  };
168229
- SendStream.prototype.setHeader = function setHeader(path19, stat2) {
168229
+ SendStream.prototype.setHeader = function setHeader(path19, stat4) {
168230
168230
  var res = this.res;
168231
- this.emit("headers", res, path19, stat2);
168231
+ this.emit("headers", res, path19, stat4);
168232
168232
  if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
168233
168233
  debug("accept ranges");
168234
168234
  res.setHeader("Accept-Ranges", "bytes");
@@ -168242,12 +168242,12 @@ var require_send = __commonJS((exports, module) => {
168242
168242
  res.setHeader("Cache-Control", cacheControl);
168243
168243
  }
168244
168244
  if (this._lastModified && !res.getHeader("Last-Modified")) {
168245
- var modified = stat2.mtime.toUTCString();
168245
+ var modified = stat4.mtime.toUTCString();
168246
168246
  debug("modified %s", modified);
168247
168247
  res.setHeader("Last-Modified", modified);
168248
168248
  }
168249
168249
  if (this._etag && !res.getHeader("ETag")) {
168250
- var val = etag(stat2);
168250
+ var val = etag(stat4);
168251
168251
  debug("etag %s", val);
168252
168252
  res.setHeader("ETag", val);
168253
168253
  }
@@ -168381,8 +168381,8 @@ var require_response = __commonJS((exports, module) => {
168381
168381
  var setCharset = require_utils10().setCharset;
168382
168382
  var cookie = require_cookie();
168383
168383
  var send = require_send();
168384
- var extname2 = path18.extname;
168385
- var resolve13 = path18.resolve;
168384
+ var extname3 = path18.extname;
168385
+ var resolve16 = path18.resolve;
168386
168386
  var vary = require_vary();
168387
168387
  var { Buffer: Buffer7 } = __require("node:buffer");
168388
168388
  var res = Object.create(http.ServerResponse.prototype);
@@ -168591,7 +168591,7 @@ var require_response = __commonJS((exports, module) => {
168591
168591
  }
168592
168592
  opts = Object.create(opts);
168593
168593
  opts.headers = headers;
168594
- var fullPath = !opts.root ? resolve13(path19) : path19;
168594
+ var fullPath = !opts.root ? resolve16(path19) : path19;
168595
168595
  return this.sendFile(fullPath, opts, done);
168596
168596
  };
168597
168597
  res.contentType = res.type = function contentType(type) {
@@ -168622,7 +168622,7 @@ var require_response = __commonJS((exports, module) => {
168622
168622
  };
168623
168623
  res.attachment = function attachment(filename) {
168624
168624
  if (filename) {
168625
- this.type(extname2(filename));
168625
+ this.type(extname3(filename));
168626
168626
  }
168627
168627
  this.set("Content-Disposition", contentDisposition(filename));
168628
168628
  return this;
@@ -168852,7 +168852,7 @@ var require_serve_static = __commonJS((exports, module) => {
168852
168852
  var encodeUrl = require_encodeurl();
168853
168853
  var escapeHtml = require_escape_html();
168854
168854
  var parseUrl = require_parseurl();
168855
- var resolve13 = __require("path").resolve;
168855
+ var resolve16 = __require("path").resolve;
168856
168856
  var send = require_send();
168857
168857
  var url3 = __require("url");
168858
168858
  module.exports = serveStatic;
@@ -168871,7 +168871,7 @@ var require_serve_static = __commonJS((exports, module) => {
168871
168871
  throw new TypeError("option setHeaders must be function");
168872
168872
  }
168873
168873
  opts.maxage = opts.maxage || opts.maxAge || 0;
168874
- opts.root = resolve13(root2);
168874
+ opts.root = resolve16(root2);
168875
168875
  var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener();
168876
168876
  return function serveStatic2(req, res, next) {
168877
168877
  if (req.method !== "GET" && req.method !== "HEAD") {
@@ -169795,8 +169795,8 @@ var require_follow_redirects = __commonJS((exports, module) => {
169795
169795
  }
169796
169796
  return parsed;
169797
169797
  }
169798
- function resolveUrl(relative4, base) {
169799
- return useNativeURL ? new URL2(relative4, base) : parseUrl(url3.resolve(base, relative4));
169798
+ function resolveUrl(relative5, base) {
169799
+ return useNativeURL ? new URL2(relative5, base) : parseUrl(url3.resolve(base, relative5));
169800
169800
  }
169801
169801
  function validateUrl(input) {
169802
169802
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -172245,8 +172245,8 @@ var require_executor = __commonJS((exports, module) => {
172245
172245
  }
172246
172246
  resetBuffer() {
172247
172247
  this.buffer = new Waterfall;
172248
- this.buffer.chain(new Promise((resolve13) => {
172249
- this._triggerBuffer = resolve13;
172248
+ this.buffer.chain(new Promise((resolve16) => {
172249
+ this._triggerBuffer = resolve16;
172250
172250
  }));
172251
172251
  if (this.ready)
172252
172252
  this._triggerBuffer();
@@ -173266,7 +173266,7 @@ var require_storage = __commonJS((exports, module) => {
173266
173266
  throw e8;
173267
173267
  }
173268
173268
  };
173269
- var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((resolve13, reject) => {
173269
+ var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((resolve16, reject) => {
173270
173270
  try {
173271
173271
  const stream = writeFileStream(filename, { mode });
173272
173272
  const readable2 = Readable6.from(lines);
@@ -173283,7 +173283,7 @@ var require_storage = __commonJS((exports, module) => {
173283
173283
  if (err)
173284
173284
  reject(err);
173285
173285
  else
173286
- resolve13();
173286
+ resolve16();
173287
173287
  });
173288
173288
  });
173289
173289
  readable2.on("error", (err) => {
@@ -173454,7 +173454,7 @@ var require_persistence = __commonJS((exports, module) => {
173454
173454
  return { data: tdata, indexes };
173455
173455
  }
173456
173456
  treatRawStreamAsync(rawStream) {
173457
- return new Promise((resolve13, reject) => {
173457
+ return new Promise((resolve16, reject) => {
173458
173458
  const dataById = {};
173459
173459
  const indexes = {};
173460
173460
  let corruptItems = 0;
@@ -173497,7 +173497,7 @@ var require_persistence = __commonJS((exports, module) => {
173497
173497
  }
173498
173498
  }
173499
173499
  const data = Object.values(dataById);
173500
- resolve13({ data, indexes });
173500
+ resolve16({ data, indexes });
173501
173501
  });
173502
173502
  lineStream.on("error", function(err) {
173503
173503
  reject(err, null);
@@ -183030,7 +183030,7 @@ var require_mime_types2 = __commonJS((exports) => {
183030
183030
  * MIT Licensed
183031
183031
  */
183032
183032
  var db2 = require_db2();
183033
- var extname2 = __require("path").extname;
183033
+ var extname3 = __require("path").extname;
183034
183034
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
183035
183035
  var TEXT_TYPE_REGEXP = /^text\//i;
183036
183036
  exports.charset = charset;
@@ -183085,7 +183085,7 @@ var require_mime_types2 = __commonJS((exports) => {
183085
183085
  if (!path18 || typeof path18 !== "string") {
183086
183086
  return false;
183087
183087
  }
183088
- var extension2 = extname2("x." + path18).toLowerCase().substr(1);
183088
+ var extension2 = extname3("x." + path18).toLowerCase().substr(1);
183089
183089
  if (!extension2) {
183090
183090
  return false;
183091
183091
  }
@@ -193077,7 +193077,7 @@ var require_mime_types3 = __commonJS((exports) => {
193077
193077
  * MIT Licensed
193078
193078
  */
193079
193079
  var db2 = require_db3();
193080
- var extname2 = __require("path").extname;
193080
+ var extname3 = __require("path").extname;
193081
193081
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
193082
193082
  var TEXT_TYPE_REGEXP = /^text\//i;
193083
193083
  exports.charset = charset;
@@ -193132,7 +193132,7 @@ var require_mime_types3 = __commonJS((exports) => {
193132
193132
  if (!path18 || typeof path18 !== "string") {
193133
193133
  return false;
193134
193134
  }
193135
- var extension2 = extname2("x." + path18).toLowerCase().substr(1);
193135
+ var extension2 = extname3("x." + path18).toLowerCase().substr(1);
193136
193136
  if (!extension2) {
193137
193137
  return false;
193138
193138
  }
@@ -195655,7 +195655,7 @@ var require_websocket2 = __commonJS((exports, module) => {
195655
195655
  var http = __require("http");
195656
195656
  var net2 = __require("net");
195657
195657
  var tls = __require("tls");
195658
- var { randomBytes: randomBytes2, createHash } = __require("crypto");
195658
+ var { randomBytes: randomBytes2, createHash: createHash2 } = __require("crypto");
195659
195659
  var { Duplex: Duplex4, Readable: Readable6 } = __require("stream");
195660
195660
  var { URL: URL2 } = __require("url");
195661
195661
  var PerMessageDeflate = require_permessage_deflate();
@@ -196187,7 +196187,7 @@ var require_websocket2 = __commonJS((exports, module) => {
196187
196187
  abortHandshake(websocket, socket, "Invalid Upgrade header");
196188
196188
  return;
196189
196189
  }
196190
- const digest = createHash("sha1").update(key2 + GUID).digest("base64");
196190
+ const digest = createHash2("sha1").update(key2 + GUID).digest("base64");
196191
196191
  if (res.headers["sec-websocket-accept"] !== digest) {
196192
196192
  abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
196193
196193
  return;
@@ -196560,7 +196560,7 @@ var require_websocket_server = __commonJS((exports, module) => {
196560
196560
  var EventEmitter3 = __require("events");
196561
196561
  var http = __require("http");
196562
196562
  var { Duplex: Duplex4 } = __require("stream");
196563
- var { createHash } = __require("crypto");
196563
+ var { createHash: createHash2 } = __require("crypto");
196564
196564
  var extension = require_extension();
196565
196565
  var PerMessageDeflate = require_permessage_deflate();
196566
196566
  var subprotocol = require_subprotocol();
@@ -196768,7 +196768,7 @@ var require_websocket_server = __commonJS((exports, module) => {
196768
196768
  }
196769
196769
  if (this._state > RUNNING)
196770
196770
  return abortHandshake(socket, 503);
196771
- const digest = createHash("sha1").update(key2 + GUID).digest("base64");
196771
+ const digest = createHash2("sha1").update(key2 + GUID).digest("base64");
196772
196772
  const headers = [
196773
196773
  "HTTP/1.1 101 Switching Protocols",
196774
196774
  "Upgrade: websocket",
@@ -199108,13 +199108,13 @@ var require_broadcast_operator = __commonJS((exports) => {
199108
199108
  return true;
199109
199109
  }
199110
199110
  emitWithAck(ev2, ...args) {
199111
- return new Promise((resolve13, reject) => {
199111
+ return new Promise((resolve16, reject) => {
199112
199112
  args.push((err, responses) => {
199113
199113
  if (err) {
199114
199114
  err.responses = responses;
199115
199115
  return reject(err);
199116
199116
  } else {
199117
- return resolve13(responses);
199117
+ return resolve16(responses);
199118
199118
  }
199119
199119
  });
199120
199120
  this.emit(ev2, ...args);
@@ -199302,12 +199302,12 @@ var require_socket2 = __commonJS((exports) => {
199302
199302
  }
199303
199303
  emitWithAck(ev2, ...args) {
199304
199304
  const withErr = this.flags.timeout !== undefined;
199305
- return new Promise((resolve13, reject) => {
199305
+ return new Promise((resolve16, reject) => {
199306
199306
  args.push((arg1, arg2) => {
199307
199307
  if (withErr) {
199308
- return arg1 ? reject(arg1) : resolve13(arg2);
199308
+ return arg1 ? reject(arg1) : resolve16(arg2);
199309
199309
  } else {
199310
- return resolve13(arg1);
199310
+ return resolve16(arg1);
199311
199311
  }
199312
199312
  });
199313
199313
  this.emit(ev2, ...args);
@@ -199762,13 +199762,13 @@ var require_namespace = __commonJS((exports) => {
199762
199762
  return true;
199763
199763
  }
199764
199764
  serverSideEmitWithAck(ev2, ...args) {
199765
- return new Promise((resolve13, reject) => {
199765
+ return new Promise((resolve16, reject) => {
199766
199766
  args.push((err, responses) => {
199767
199767
  if (err) {
199768
199768
  err.responses = responses;
199769
199769
  return reject(err);
199770
199770
  } else {
199771
- return resolve13(responses);
199771
+ return resolve16(responses);
199772
199772
  }
199773
199773
  });
199774
199774
  this.serverSideEmit(ev2, ...args);
@@ -201483,7 +201483,7 @@ var require_websocket4 = __commonJS((exports, module) => {
201483
201483
  var http = __require("http");
201484
201484
  var net2 = __require("net");
201485
201485
  var tls = __require("tls");
201486
- var { randomBytes: randomBytes2, createHash } = __require("crypto");
201486
+ var { randomBytes: randomBytes2, createHash: createHash2 } = __require("crypto");
201487
201487
  var { Duplex: Duplex4, Readable: Readable6 } = __require("stream");
201488
201488
  var { URL: URL2 } = __require("url");
201489
201489
  var PerMessageDeflate = require_permessage_deflate2();
@@ -202015,7 +202015,7 @@ var require_websocket4 = __commonJS((exports, module) => {
202015
202015
  abortHandshake(websocket, socket, "Invalid Upgrade header");
202016
202016
  return;
202017
202017
  }
202018
- const digest = createHash("sha1").update(key2 + GUID).digest("base64");
202018
+ const digest = createHash2("sha1").update(key2 + GUID).digest("base64");
202019
202019
  if (res.headers["sec-websocket-accept"] !== digest) {
202020
202020
  abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
202021
202021
  return;
@@ -202388,7 +202388,7 @@ var require_websocket_server2 = __commonJS((exports, module) => {
202388
202388
  var EventEmitter3 = __require("events");
202389
202389
  var http = __require("http");
202390
202390
  var { Duplex: Duplex4 } = __require("stream");
202391
- var { createHash } = __require("crypto");
202391
+ var { createHash: createHash2 } = __require("crypto");
202392
202392
  var extension = require_extension2();
202393
202393
  var PerMessageDeflate = require_permessage_deflate2();
202394
202394
  var subprotocol = require_subprotocol2();
@@ -202596,7 +202596,7 @@ var require_websocket_server2 = __commonJS((exports, module) => {
202596
202596
  }
202597
202597
  if (this._state > RUNNING)
202598
202598
  return abortHandshake(socket, 503);
202599
- const digest = createHash("sha1").update(key2 + GUID).digest("base64");
202599
+ const digest = createHash2("sha1").update(key2 + GUID).digest("base64");
202600
202600
  const headers = [
202601
202601
  "HTTP/1.1 101 Switching Protocols",
202602
202602
  "Upgrade: websocket",
@@ -203303,7 +203303,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203303
203303
  return localSockets;
203304
203304
  }
203305
203305
  const requestId = randomId();
203306
- return new Promise((resolve13, reject) => {
203306
+ return new Promise((resolve16, reject) => {
203307
203307
  const timeout3 = setTimeout(() => {
203308
203308
  const storedRequest2 = this.requests.get(requestId);
203309
203309
  if (storedRequest2) {
@@ -203313,7 +203313,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203313
203313
  }, opts.flags.timeout || DEFAULT_TIMEOUT);
203314
203314
  const storedRequest = {
203315
203315
  type: MessageType.FETCH_SOCKETS,
203316
- resolve: resolve13,
203316
+ resolve: resolve16,
203317
203317
  timeout: timeout3,
203318
203318
  current: 0,
203319
203319
  expected: expectedResponseCount,
@@ -203523,7 +203523,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203523
203523
  return localSockets;
203524
203524
  }
203525
203525
  const requestId = randomId();
203526
- return new Promise((resolve13, reject) => {
203526
+ return new Promise((resolve16, reject) => {
203527
203527
  const timeout3 = setTimeout(() => {
203528
203528
  const storedRequest2 = this.customRequests.get(requestId);
203529
203529
  if (storedRequest2) {
@@ -203533,7 +203533,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203533
203533
  }, opts.flags.timeout || DEFAULT_TIMEOUT);
203534
203534
  const storedRequest = {
203535
203535
  type: MessageType.FETCH_SOCKETS,
203536
- resolve: resolve13,
203536
+ resolve: resolve16,
203537
203537
  timeout: timeout3,
203538
203538
  missingUids: new Set([...this.nodesMap.keys()]),
203539
203539
  responses: localSockets
@@ -204262,13 +204262,13 @@ var require_dist4 = __commonJS((exports, module) => {
204262
204262
  this.engine.close();
204263
204263
  (0, uws_1.restoreAdapter)();
204264
204264
  if (this.httpServer) {
204265
- return new Promise((resolve13) => {
204265
+ return new Promise((resolve16) => {
204266
204266
  this.httpServer.close((err) => {
204267
204267
  fn9 && fn9(err);
204268
204268
  if (err) {
204269
204269
  debug("server was not running");
204270
204270
  }
204271
- resolve13();
204271
+ resolve16();
204272
204272
  });
204273
204273
  });
204274
204274
  } else {
@@ -213004,7 +213004,7 @@ var require_mime_types4 = __commonJS((exports) => {
213004
213004
  * MIT Licensed
213005
213005
  */
213006
213006
  var db2 = require_db4();
213007
- var extname2 = __require("path").extname;
213007
+ var extname3 = __require("path").extname;
213008
213008
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
213009
213009
  var TEXT_TYPE_REGEXP = /^text\//i;
213010
213010
  exports.charset = charset;
@@ -213059,7 +213059,7 @@ var require_mime_types4 = __commonJS((exports) => {
213059
213059
  if (!path18 || typeof path18 !== "string") {
213060
213060
  return false;
213061
213061
  }
213062
- var extension2 = extname2("x." + path18).toLowerCase().substr(1);
213062
+ var extension2 = extname3("x." + path18).toLowerCase().substr(1);
213063
213063
  if (!extension2) {
213064
213064
  return false;
213065
213065
  }
@@ -217391,8 +217391,8 @@ var require_mkdirp = __commonJS((exports, module) => {
217391
217391
  });
217392
217392
  break;
217393
217393
  default:
217394
- xfs.stat(p4, function(er22, stat2) {
217395
- if (er22 || !stat2.isDirectory())
217394
+ xfs.stat(p4, function(er22, stat4) {
217395
+ if (er22 || !stat4.isDirectory())
217396
217396
  cb2(er10, made);
217397
217397
  else
217398
217398
  cb2(null, made);
@@ -217423,13 +217423,13 @@ var require_mkdirp = __commonJS((exports, module) => {
217423
217423
  sync(p4, opts, made);
217424
217424
  break;
217425
217425
  default:
217426
- var stat2;
217426
+ var stat4;
217427
217427
  try {
217428
- stat2 = xfs.statSync(p4);
217428
+ stat4 = xfs.statSync(p4);
217429
217429
  } catch (err1) {
217430
217430
  throw err0;
217431
217431
  }
217432
- if (!stat2.isDirectory())
217432
+ if (!stat4.isDirectory())
217433
217433
  throw err0;
217434
217434
  break;
217435
217435
  }
@@ -217632,7 +217632,7 @@ var require_buffer_list = __commonJS((exports, module) => {
217632
217632
  }
217633
217633
  }, {
217634
217634
  key: "join",
217635
- value: function join29(s5) {
217635
+ value: function join31(s5) {
217636
217636
  if (this.length === 0)
217637
217637
  return "";
217638
217638
  var p4 = this.head;
@@ -218930,14 +218930,14 @@ var require_async_iterator = __commonJS((exports, module) => {
218930
218930
  };
218931
218931
  }
218932
218932
  function readAndResolve(iter) {
218933
- var resolve13 = iter[kLastResolve];
218934
- if (resolve13 !== null) {
218933
+ var resolve16 = iter[kLastResolve];
218934
+ if (resolve16 !== null) {
218935
218935
  var data = iter[kStream].read();
218936
218936
  if (data !== null) {
218937
218937
  iter[kLastPromise] = null;
218938
218938
  iter[kLastResolve] = null;
218939
218939
  iter[kLastReject] = null;
218940
- resolve13(createIterResult(data, false));
218940
+ resolve16(createIterResult(data, false));
218941
218941
  }
218942
218942
  }
218943
218943
  }
@@ -218945,13 +218945,13 @@ var require_async_iterator = __commonJS((exports, module) => {
218945
218945
  process.nextTick(readAndResolve, iter);
218946
218946
  }
218947
218947
  function wrapForNext(lastPromise, iter) {
218948
- return function(resolve13, reject) {
218948
+ return function(resolve16, reject) {
218949
218949
  lastPromise.then(function() {
218950
218950
  if (iter[kEnded]) {
218951
- resolve13(createIterResult(undefined, true));
218951
+ resolve16(createIterResult(undefined, true));
218952
218952
  return;
218953
218953
  }
218954
- iter[kHandlePromise](resolve13, reject);
218954
+ iter[kHandlePromise](resolve16, reject);
218955
218955
  }, reject);
218956
218956
  };
218957
218957
  }
@@ -218970,12 +218970,12 @@ var require_async_iterator = __commonJS((exports, module) => {
218970
218970
  return Promise.resolve(createIterResult(undefined, true));
218971
218971
  }
218972
218972
  if (this[kStream].destroyed) {
218973
- return new Promise(function(resolve13, reject) {
218973
+ return new Promise(function(resolve16, reject) {
218974
218974
  process.nextTick(function() {
218975
218975
  if (_this[kError]) {
218976
218976
  reject(_this[kError]);
218977
218977
  } else {
218978
- resolve13(createIterResult(undefined, true));
218978
+ resolve16(createIterResult(undefined, true));
218979
218979
  }
218980
218980
  });
218981
218981
  });
@@ -218998,13 +218998,13 @@ var require_async_iterator = __commonJS((exports, module) => {
218998
218998
  return this;
218999
218999
  }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
219000
219000
  var _this2 = this;
219001
- return new Promise(function(resolve13, reject) {
219001
+ return new Promise(function(resolve16, reject) {
219002
219002
  _this2[kStream].destroy(null, function(err) {
219003
219003
  if (err) {
219004
219004
  reject(err);
219005
219005
  return;
219006
219006
  }
219007
- resolve13(createIterResult(undefined, true));
219007
+ resolve16(createIterResult(undefined, true));
219008
219008
  });
219009
219009
  });
219010
219010
  }), _Object$setPrototypeO), AsyncIteratorPrototype);
@@ -219026,15 +219026,15 @@ var require_async_iterator = __commonJS((exports, module) => {
219026
219026
  value: stream._readableState.endEmitted,
219027
219027
  writable: true
219028
219028
  }), _defineProperty(_Object$create, kHandlePromise, {
219029
- value: function value(resolve13, reject) {
219029
+ value: function value(resolve16, reject) {
219030
219030
  var data = iterator[kStream].read();
219031
219031
  if (data) {
219032
219032
  iterator[kLastPromise] = null;
219033
219033
  iterator[kLastResolve] = null;
219034
219034
  iterator[kLastReject] = null;
219035
- resolve13(createIterResult(data, false));
219035
+ resolve16(createIterResult(data, false));
219036
219036
  } else {
219037
- iterator[kLastResolve] = resolve13;
219037
+ iterator[kLastResolve] = resolve16;
219038
219038
  iterator[kLastReject] = reject;
219039
219039
  }
219040
219040
  },
@@ -219053,12 +219053,12 @@ var require_async_iterator = __commonJS((exports, module) => {
219053
219053
  iterator[kError] = err;
219054
219054
  return;
219055
219055
  }
219056
- var resolve13 = iterator[kLastResolve];
219057
- if (resolve13 !== null) {
219056
+ var resolve16 = iterator[kLastResolve];
219057
+ if (resolve16 !== null) {
219058
219058
  iterator[kLastPromise] = null;
219059
219059
  iterator[kLastResolve] = null;
219060
219060
  iterator[kLastReject] = null;
219061
- resolve13(createIterResult(undefined, true));
219061
+ resolve16(createIterResult(undefined, true));
219062
219062
  }
219063
219063
  iterator[kEnded] = true;
219064
219064
  });
@@ -219070,7 +219070,7 @@ var require_async_iterator = __commonJS((exports, module) => {
219070
219070
 
219071
219071
  // ../../node_modules/readable-stream/lib/internal/streams/from.js
219072
219072
  var require_from = __commonJS((exports, module) => {
219073
- function asyncGeneratorStep(gen, resolve13, reject, _next, _throw, key2, arg) {
219073
+ function asyncGeneratorStep(gen, resolve16, reject, _next, _throw, key2, arg) {
219074
219074
  try {
219075
219075
  var info = gen[key2](arg);
219076
219076
  var value = info.value;
@@ -219079,7 +219079,7 @@ var require_from = __commonJS((exports, module) => {
219079
219079
  return;
219080
219080
  }
219081
219081
  if (info.done) {
219082
- resolve13(value);
219082
+ resolve16(value);
219083
219083
  } else {
219084
219084
  Promise.resolve(value).then(_next, _throw);
219085
219085
  }
@@ -219087,13 +219087,13 @@ var require_from = __commonJS((exports, module) => {
219087
219087
  function _asyncToGenerator(fn9) {
219088
219088
  return function() {
219089
219089
  var self2 = this, args = arguments;
219090
- return new Promise(function(resolve13, reject) {
219090
+ return new Promise(function(resolve16, reject) {
219091
219091
  var gen = fn9.apply(self2, args);
219092
219092
  function _next(value) {
219093
- asyncGeneratorStep(gen, resolve13, reject, _next, _throw, "next", value);
219093
+ asyncGeneratorStep(gen, resolve16, reject, _next, _throw, "next", value);
219094
219094
  }
219095
219095
  function _throw(err) {
219096
- asyncGeneratorStep(gen, resolve13, reject, _next, _throw, "throw", err);
219096
+ asyncGeneratorStep(gen, resolve16, reject, _next, _throw, "throw", err);
219097
219097
  }
219098
219098
  _next(undefined);
219099
219099
  });
@@ -221220,7 +221220,7 @@ var require_dist5 = __commonJS((exports, module) => {
221220
221220
  determineAgent: () => determineAgent
221221
221221
  });
221222
221222
  module.exports = __toCommonJS2(src_exports);
221223
- var import_promises22 = __require("node:fs/promises");
221223
+ var import_promises26 = __require("node:fs/promises");
221224
221224
  var import_node_fs24 = __require("node:fs");
221225
221225
  var DEVIN_LOCAL_PATH = "/opt/.devin";
221226
221226
  var CURSOR2 = "cursor";
@@ -221278,7 +221278,7 @@ var require_dist5 = __commonJS((exports, module) => {
221278
221278
  return { isAgent: true, agent: { name: REPLIT } };
221279
221279
  }
221280
221280
  try {
221281
- await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
221281
+ await (0, import_promises26.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
221282
221282
  return { isAgent: true, agent: { name: DEVIN } };
221283
221283
  } catch (error48) {}
221284
221284
  return { isAgent: false, agent: undefined };
@@ -237049,7 +237049,7 @@ function normalizeBase44Env() {
237049
237049
  loadProjectEnvFiles();
237050
237050
 
237051
237051
  // src/cli/index.ts
237052
- import { dirname as dirname25, join as join33 } from "node:path";
237052
+ import { dirname as dirname26, join as join36 } from "node:path";
237053
237053
  import { fileURLToPath as fileURLToPath6 } from "node:url";
237054
237054
 
237055
237055
  // ../../node_modules/@clack/core/dist/index.mjs
@@ -238257,7 +238257,7 @@ var {
238257
238257
  } = import__.default;
238258
238258
 
238259
238259
  // src/cli/commands/agent-skills/pull.ts
238260
- import { dirname as dirname10, join as join15 } from "node:path";
238260
+ import { dirname as dirname11, join as join17 } from "node:path";
238261
238261
  // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
238262
238262
  var ANSI_BACKGROUND_OFFSET = 10;
238263
238263
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -244912,15 +244912,14 @@ async function setAppVisibility(visibility) {
244912
244912
  throw await ApiError.fromHttpError(error48, "updating app visibility");
244913
244913
  }
244914
244914
  }
244915
- async function listProjects(options = {}) {
244915
+ async function listProjects() {
244916
244916
  let response;
244917
244917
  try {
244918
244918
  response = await base44Client.get("api/apps", {
244919
244919
  searchParams: {
244920
244920
  sort: "-updated_date",
244921
244921
  fields: "id,name,user_description,is_managed_source_code",
244922
- limit: 50,
244923
- ...options.workspaceId ? { workspace_id: options.workspaceId } : {}
244922
+ limit: 50
244924
244923
  }
244925
244924
  });
244926
244925
  } catch (error48) {
@@ -247552,7 +247551,7 @@ async function deployAll(projectData, options) {
247552
247551
  await authConfigResource.push(authConfig);
247553
247552
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
247554
247553
  const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
247555
- if (project.site?.outputDirectory) {
247554
+ if ((options?.site ?? true) && project.site?.outputDirectory) {
247556
247555
  const outputDir = resolve3(project.root, project.site.outputDirectory);
247557
247556
  const { appUrl } = await deploySite(outputDir);
247558
247557
  return { appUrl, connectorResults };
@@ -254715,6 +254714,587 @@ function formatYaml(data, options = {}) {
254715
254714
  const replacer = stripEmpty ? stripEmptyReplacer : undefined;
254716
254715
  return $stringify(data, replacer, { indent: YAML_INDENT }).trimEnd();
254717
254716
  }
254717
+ // src/core/deployments/api.ts
254718
+ import { readFile as readFile2 } from "node:fs/promises";
254719
+
254720
+ // src/core/deployments/schema.ts
254721
+ var GIT_HASH_PATTERN = /^[a-fA-F0-9]{7,64}$/;
254722
+ var CreateDeploymentResponseSchema = exports_external.object({
254723
+ deployment_id: exports_external.string(),
254724
+ asset_buckets: exports_external.array(exports_external.array(exports_external.string()))
254725
+ }).transform((data) => ({
254726
+ deploymentId: data.deployment_id,
254727
+ assetBuckets: data.asset_buckets
254728
+ }));
254729
+ var AssetUploadResponseSchema = exports_external.looseObject({
254730
+ result: exports_external.looseObject({ jwt: exports_external.string().nullable().optional() }).nullable().optional()
254731
+ });
254732
+ var FinalizeDeploymentResponseSchema = exports_external.object({
254733
+ deployment_id: exports_external.string()
254734
+ }).transform((data) => ({
254735
+ deploymentId: data.deployment_id
254736
+ }));
254737
+
254738
+ // src/core/deployments/api.ts
254739
+ var MODULE_CONTENT_TYPES = {
254740
+ esm: "application/javascript+module",
254741
+ sourcemap: "application/source-map",
254742
+ wasm: "application/wasm",
254743
+ text: "text/plain",
254744
+ data: "application/octet-stream"
254745
+ };
254746
+ async function createDeployment(request) {
254747
+ const appClient = getAppClient();
254748
+ let response;
254749
+ try {
254750
+ response = await appClient.post("deployments", {
254751
+ json: request,
254752
+ timeout: 120000
254753
+ });
254754
+ } catch (error48) {
254755
+ throw await ApiError.fromHttpError(error48, "creating deployment");
254756
+ }
254757
+ const result = CreateDeploymentResponseSchema.safeParse(await response.json());
254758
+ if (!result.success) {
254759
+ throw new SchemaValidationError("Invalid response from server", result.error);
254760
+ }
254761
+ return result.data;
254762
+ }
254763
+ async function uploadAssetBucket(deploymentId, formData) {
254764
+ const appClient = getAppClient();
254765
+ const response = await appClient.post(`deployments/${encodeURIComponent(deploymentId)}/assets`, {
254766
+ searchParams: { base64: "true" },
254767
+ body: formData,
254768
+ timeout: 120000,
254769
+ retry: 0
254770
+ });
254771
+ const parsed = AssetUploadResponseSchema.safeParse(await response.json());
254772
+ const jwt3 = parsed.success ? parsed.data.result?.jwt : null;
254773
+ return jwt3 || null;
254774
+ }
254775
+ async function finalizeDeployment(deploymentId, completionJwt, modules) {
254776
+ const appClient = getAppClient();
254777
+ const formData = new FormData;
254778
+ formData.append("payload", JSON.stringify({ completion_jwt: completionJwt }));
254779
+ for (const module of modules) {
254780
+ const content = await readFile2(module.absolutePath);
254781
+ formData.append(module.name, new File([new Uint8Array(content)], module.name, {
254782
+ type: MODULE_CONTENT_TYPES[module.type]
254783
+ }));
254784
+ }
254785
+ let response;
254786
+ try {
254787
+ response = await appClient.post(`deployments/${encodeURIComponent(deploymentId)}/finalize`, { body: formData, timeout: 180000 });
254788
+ } catch (error48) {
254789
+ throw await ApiError.fromHttpError(error48, "finalizing deployment");
254790
+ }
254791
+ const result = FinalizeDeploymentResponseSchema.safeParse(await response.json());
254792
+ if (!result.success) {
254793
+ throw new SchemaValidationError("Invalid response from server", result.error);
254794
+ }
254795
+ return result.data;
254796
+ }
254797
+ // src/core/deployments/manifest.ts
254798
+ import { createHash } from "node:crypto";
254799
+ import { readdir as readdir2, readFile as readFile3, stat } from "node:fs/promises";
254800
+ import { extname, join as join15 } from "node:path";
254801
+ var MAX_ASSET_SIZE_BYTES = 25 * 1024 * 1024;
254802
+ var MAX_ASSET_COUNT = 1e5;
254803
+ var ASSETS_IGNORE_FILE = ".assetsignore";
254804
+ var ALWAYS_SKIPPED_FILES = new Set([
254805
+ ASSETS_IGNORE_FILE,
254806
+ "wrangler.json",
254807
+ ".dev.vars"
254808
+ ]);
254809
+ var MIME_TYPES = {
254810
+ ".html": "text/html",
254811
+ ".htm": "text/html",
254812
+ ".css": "text/css",
254813
+ ".js": "text/javascript",
254814
+ ".mjs": "text/javascript",
254815
+ ".json": "application/json",
254816
+ ".map": "application/json",
254817
+ ".txt": "text/plain",
254818
+ ".xml": "application/xml",
254819
+ ".svg": "image/svg+xml",
254820
+ ".png": "image/png",
254821
+ ".jpg": "image/jpeg",
254822
+ ".jpeg": "image/jpeg",
254823
+ ".gif": "image/gif",
254824
+ ".webp": "image/webp",
254825
+ ".avif": "image/avif",
254826
+ ".ico": "image/x-icon",
254827
+ ".woff": "font/woff",
254828
+ ".woff2": "font/woff2",
254829
+ ".ttf": "font/ttf",
254830
+ ".otf": "font/otf",
254831
+ ".eot": "application/vnd.ms-fontobject",
254832
+ ".mp3": "audio/mpeg",
254833
+ ".mp4": "video/mp4",
254834
+ ".webm": "video/webm",
254835
+ ".pdf": "application/pdf",
254836
+ ".wasm": "application/wasm",
254837
+ ".webmanifest": "application/manifest+json"
254838
+ };
254839
+ function getMimeType(filePath) {
254840
+ return MIME_TYPES[extname(filePath).toLowerCase()] ?? "application/octet-stream";
254841
+ }
254842
+ function hashAsset(appId, content) {
254843
+ return createHash("sha256").update(Buffer.from(appId, "utf8")).update(content).digest("hex").slice(0, 32);
254844
+ }
254845
+ function globToRegExp(glob) {
254846
+ let source = "";
254847
+ for (let i2 = 0;i2 < glob.length; i2++) {
254848
+ const char = glob[i2];
254849
+ if (char === "*") {
254850
+ if (glob[i2 + 1] === "*") {
254851
+ source += ".*";
254852
+ i2++;
254853
+ } else {
254854
+ source += "[^/]*";
254855
+ }
254856
+ } else if (char === "?") {
254857
+ source += "[^/]";
254858
+ } else {
254859
+ source += char.replace(/[.+^${}()|[\]\\]/g, "\\$&");
254860
+ }
254861
+ }
254862
+ return new RegExp(`^${source}$`);
254863
+ }
254864
+ function createIgnoreMatcher(lines) {
254865
+ const rules = lines.map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#")).map((line) => {
254866
+ const isDirOnly = line.endsWith("/");
254867
+ let pattern = isDirOnly ? line.slice(0, -1) : line;
254868
+ const anchored = pattern.includes("/");
254869
+ pattern = pattern.replace(/^\//, "");
254870
+ return { regex: globToRegExp(pattern), anchored, isDirOnly };
254871
+ });
254872
+ return (relativePath, isDirectory2) => {
254873
+ const segments = relativePath.split("/");
254874
+ return rules.some((rule) => {
254875
+ if (rule.anchored) {
254876
+ if (rule.isDirOnly ? isDirectory2 : true) {
254877
+ if (rule.regex.test(relativePath))
254878
+ return true;
254879
+ }
254880
+ return false;
254881
+ }
254882
+ const basename4 = segments[segments.length - 1];
254883
+ if (rule.isDirOnly && !isDirectory2)
254884
+ return false;
254885
+ return rule.regex.test(basename4);
254886
+ });
254887
+ };
254888
+ }
254889
+ async function loadIgnoreMatcher(assetsDir) {
254890
+ const ignorePath = join15(assetsDir, ASSETS_IGNORE_FILE);
254891
+ if (!await pathExists(ignorePath)) {
254892
+ return () => false;
254893
+ }
254894
+ const content = await readTextFile(ignorePath);
254895
+ return createIgnoreMatcher(content.split(/\r?\n/));
254896
+ }
254897
+ async function buildAssetManifest(assetsDir, appId) {
254898
+ const isIgnored = await loadIgnoreMatcher(assetsDir);
254899
+ const manifest = {};
254900
+ const filesByHash = new Map;
254901
+ const relativeFilePaths = await collectFilePaths(assetsDir, "", isIgnored);
254902
+ if (relativeFilePaths.length > MAX_ASSET_COUNT) {
254903
+ throw new InvalidInputError(`Too many static assets: found ${relativeFilePaths.length}, the limit is ${MAX_ASSET_COUNT} files.`);
254904
+ }
254905
+ for (const relativePath of relativeFilePaths.sort()) {
254906
+ const absolutePath = join15(assetsDir, ...relativePath.split("/"));
254907
+ const { size } = await stat(absolutePath);
254908
+ if (size > MAX_ASSET_SIZE_BYTES) {
254909
+ throw new InvalidInputError(`Static asset "${relativePath}" is ${size} bytes, which exceeds the 25 MiB per-file limit.`);
254910
+ }
254911
+ const content = await readFile3(absolutePath);
254912
+ const hash2 = hashAsset(appId, content);
254913
+ manifest[`/${relativePath}`] = { hash: hash2, size };
254914
+ if (!filesByHash.has(hash2)) {
254915
+ filesByHash.set(hash2, {
254916
+ absolutePath,
254917
+ hash: hash2,
254918
+ size,
254919
+ contentType: getMimeType(absolutePath)
254920
+ });
254921
+ }
254922
+ }
254923
+ return { manifest, filesByHash };
254924
+ }
254925
+ async function collectFilePaths(dir, relativeDir, isIgnored) {
254926
+ const entries = await readdir2(dir, { withFileTypes: true });
254927
+ const results = [];
254928
+ for (const entry of entries) {
254929
+ const relativePath = relativeDir ? `${relativeDir}/${entry.name}` : entry.name;
254930
+ if (entry.isDirectory()) {
254931
+ if (isIgnored(relativePath, true))
254932
+ continue;
254933
+ results.push(...await collectFilePaths(join15(dir, entry.name), relativePath, isIgnored));
254934
+ continue;
254935
+ }
254936
+ if (!entry.isFile())
254937
+ continue;
254938
+ if (ALWAYS_SKIPPED_FILES.has(entry.name))
254939
+ continue;
254940
+ if (isIgnored(relativePath, false))
254941
+ continue;
254942
+ results.push(relativePath);
254943
+ }
254944
+ return results;
254945
+ }
254946
+
254947
+ // src/core/deployments/modules.ts
254948
+ import { stat as stat2 } from "node:fs/promises";
254949
+ import { relative as relative3, resolve as resolve4, sep } from "node:path";
254950
+ var MAX_TOTAL_MODULE_BYTES = 40 * 1024 * 1024;
254951
+ var MODULE_IGNORE = ["wrangler.json", ".dev.vars"];
254952
+ var RULE_TYPE_TO_MODULE_TYPE = {
254953
+ ESModule: "esm",
254954
+ CompiledWasm: "wasm",
254955
+ Text: "text",
254956
+ Data: "data"
254957
+ };
254958
+ function toPosix(path16) {
254959
+ return path16.split(sep).join("/");
254960
+ }
254961
+ async function collectModules(config12) {
254962
+ const entryPath = resolve4(config12.configDir, config12.main);
254963
+ if (!await pathExists(entryPath)) {
254964
+ throw new InvalidInputError(`Worker entry module does not exist: ${entryPath} (from "main" in ${config12.configPath})`, {
254965
+ hints: [{ message: "Rebuild the project to regenerate the artifact" }]
254966
+ });
254967
+ }
254968
+ const modulesByName = new Map;
254969
+ const entryName = toPosix(relative3(config12.configDir, entryPath));
254970
+ modulesByName.set(entryName, {
254971
+ name: entryName,
254972
+ absolutePath: entryPath,
254973
+ size: 0,
254974
+ type: "esm"
254975
+ });
254976
+ const ignore = [...MODULE_IGNORE];
254977
+ if (config12.assetsDirectory?.startsWith(config12.configDir + sep)) {
254978
+ ignore.push(`${toPosix(relative3(config12.configDir, config12.assetsDirectory))}/**`);
254979
+ }
254980
+ for (const rule of config12.rules) {
254981
+ const type = RULE_TYPE_TO_MODULE_TYPE[rule.type];
254982
+ if (!type) {
254983
+ throw new InvalidInputError(`Unsupported module rule type "${rule.type}" in ${config12.configPath}. Supported: ${Object.keys(RULE_TYPE_TO_MODULE_TYPE).join(", ")}.`);
254984
+ }
254985
+ const matches = await globby(rule.globs, {
254986
+ cwd: config12.configDir,
254987
+ onlyFiles: true,
254988
+ dot: true,
254989
+ ignore
254990
+ });
254991
+ for (const match of matches.sort()) {
254992
+ if (!modulesByName.has(match)) {
254993
+ modulesByName.set(match, {
254994
+ name: match,
254995
+ absolutePath: resolve4(config12.configDir, match),
254996
+ size: 0,
254997
+ type
254998
+ });
254999
+ }
255000
+ }
255001
+ }
255002
+ if (config12.uploadSourceMaps) {
255003
+ const maps = await globby("**/*.map", {
255004
+ cwd: config12.configDir,
255005
+ onlyFiles: true,
255006
+ dot: true,
255007
+ ignore
255008
+ });
255009
+ for (const map2 of maps.sort()) {
255010
+ addSourcemap(modulesByName, config12.configDir, map2);
255011
+ }
255012
+ } else {
255013
+ for (const name2 of [...modulesByName.keys()]) {
255014
+ const mapName = `${name2}.map`;
255015
+ if (await pathExists(resolve4(config12.configDir, mapName))) {
255016
+ addSourcemap(modulesByName, config12.configDir, mapName);
255017
+ }
255018
+ }
255019
+ }
255020
+ const modules = [...modulesByName.values()];
255021
+ let totalBytes = 0;
255022
+ for (const module of modules) {
255023
+ module.size = (await stat2(module.absolutePath)).size;
255024
+ totalBytes += module.size;
255025
+ }
255026
+ if (totalBytes > MAX_TOTAL_MODULE_BYTES) {
255027
+ throw new InvalidInputError(`Worker modules total ${totalBytes} bytes, which exceeds the 40 MB limit for Base44 full-stack deploys.`);
255028
+ }
255029
+ return modules;
255030
+ }
255031
+ function addSourcemap(modulesByName, configDir, name2) {
255032
+ if (modulesByName.has(name2))
255033
+ return;
255034
+ modulesByName.set(name2, {
255035
+ name: name2,
255036
+ absolutePath: resolve4(configDir, name2),
255037
+ size: 0,
255038
+ type: "sourcemap"
255039
+ });
255040
+ }
255041
+
255042
+ // src/core/deployments/upload.ts
255043
+ import { readFile as readFile4 } from "node:fs/promises";
255044
+ var BUCKET_CONCURRENCY = 3;
255045
+ var MAX_ATTEMPTS_PER_BUCKET = 3;
255046
+ var RETRY_BASE_DELAY_MS = 500;
255047
+ var MAX_RATE_LIMIT_WAITS = 10;
255048
+ var RATE_LIMIT_DELAY_MS = 15000;
255049
+ async function uploadAssetBuckets(deploymentId, buckets, filesByHash, onProgress) {
255050
+ if (buckets.length === 0) {
255051
+ return null;
255052
+ }
255053
+ const totalFiles = buckets.reduce((sum, bucket) => sum + bucket.length, 0);
255054
+ let uploadedFiles = 0;
255055
+ let completedBuckets = 0;
255056
+ let completionJwt = null;
255057
+ let nextBucket = 0;
255058
+ const worker = async () => {
255059
+ while (nextBucket < buckets.length) {
255060
+ const bucket = buckets[nextBucket++];
255061
+ const jwt3 = await uploadBucketWithRetry(deploymentId, bucket, filesByHash);
255062
+ if (jwt3) {
255063
+ completionJwt = jwt3;
255064
+ }
255065
+ uploadedFiles += bucket.length;
255066
+ completedBuckets++;
255067
+ onProgress?.({
255068
+ uploadedFiles,
255069
+ totalFiles,
255070
+ completedBuckets,
255071
+ totalBuckets: buckets.length
255072
+ });
255073
+ }
255074
+ };
255075
+ await Promise.all(Array.from({ length: Math.min(BUCKET_CONCURRENCY, buckets.length) }, worker));
255076
+ if (!completionJwt) {
255077
+ throw new ApiError("Asset upload finished but the server did not return a completion token.");
255078
+ }
255079
+ return completionJwt;
255080
+ }
255081
+ async function uploadBucketWithRetry(deploymentId, bucket, filesByHash) {
255082
+ let lastError;
255083
+ let rateLimitWaits = 0;
255084
+ const formData = await buildBucketForm(bucket, filesByHash);
255085
+ for (let attempt = 0;attempt < MAX_ATTEMPTS_PER_BUCKET; attempt++) {
255086
+ if (attempt > 0) {
255087
+ await sleep3(RETRY_BASE_DELAY_MS * 2 ** (attempt - 1));
255088
+ }
255089
+ try {
255090
+ return await uploadAssetBucket(deploymentId, formData);
255091
+ } catch (error48) {
255092
+ if (error48 instanceof HTTPError && error48.response.status === 429 && rateLimitWaits < MAX_RATE_LIMIT_WAITS) {
255093
+ rateLimitWaits++;
255094
+ attempt--;
255095
+ await sleep3(RATE_LIMIT_DELAY_MS);
255096
+ continue;
255097
+ }
255098
+ lastError = error48;
255099
+ }
255100
+ }
255101
+ if (lastError instanceof HTTPError && lastError.response.status === 409) {
255102
+ throw new ApiError("This deploy's upload session has expired — rerun deploy. Already-uploaded assets are skipped on the next attempt.", { statusCode: 409, cause: lastError });
255103
+ }
255104
+ throw await ApiError.fromHttpError(lastError, "uploading static assets");
255105
+ }
255106
+ async function buildBucketForm(bucket, filesByHash) {
255107
+ const formData = new FormData;
255108
+ for (const hash2 of bucket) {
255109
+ const file2 = filesByHash.get(hash2);
255110
+ if (!file2) {
255111
+ throw new InternalError(`Server requested upload of unknown asset hash: ${hash2}`);
255112
+ }
255113
+ const content = await readFile4(file2.absolutePath);
255114
+ formData.append(hash2, new File([content.toString("base64")], hash2, { type: file2.contentType }));
255115
+ }
255116
+ return formData;
255117
+ }
255118
+ function sleep3(ms) {
255119
+ return new Promise((resolve5) => setTimeout(resolve5, ms));
255120
+ }
255121
+
255122
+ // src/core/deployments/wrangler-config.ts
255123
+ import { dirname as dirname10, join as join16, resolve as resolve5 } from "node:path";
255124
+ var WRANGLER_REDIRECT_PATH = join16(".wrangler", "deploy", "config.json");
255125
+ var RedirectConfigSchema = exports_external.looseObject({
255126
+ configPath: exports_external.string().min(1)
255127
+ });
255128
+ var WranglerConfigSchema = exports_external.looseObject({
255129
+ main: exports_external.string().min(1, "wrangler config is missing a 'main' entry module"),
255130
+ no_bundle: exports_external.boolean().optional(),
255131
+ rules: exports_external.array(exports_external.looseObject({ type: exports_external.string(), globs: exports_external.array(exports_external.string()) })).optional(),
255132
+ assets: exports_external.looseObject({
255133
+ directory: exports_external.string().optional(),
255134
+ html_handling: exports_external.string().optional(),
255135
+ not_found_handling: exports_external.string().optional(),
255136
+ run_worker_first: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional(),
255137
+ headers: exports_external.string().optional(),
255138
+ redirects: exports_external.string().optional()
255139
+ }).optional(),
255140
+ compatibility_date: exports_external.string().optional(),
255141
+ compatibility_flags: exports_external.array(exports_external.string()).optional(),
255142
+ vars: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
255143
+ upload_source_maps: exports_external.boolean().optional()
255144
+ });
255145
+ async function detectFullStackArtifact(projectRoot) {
255146
+ const redirectPath = join16(projectRoot, WRANGLER_REDIRECT_PATH);
255147
+ if (await pathExists(redirectPath)) {
255148
+ return { source: "redirect", path: redirectPath };
255149
+ }
255150
+ for (const name2 of ["wrangler.jsonc", "wrangler.json"]) {
255151
+ const configPath = join16(projectRoot, name2);
255152
+ if (await pathExists(configPath)) {
255153
+ return { source: "root-config", path: configPath };
255154
+ }
255155
+ }
255156
+ const tomlPath = join16(projectRoot, "wrangler.toml");
255157
+ if (await pathExists(tomlPath)) {
255158
+ return { source: "toml", path: tomlPath };
255159
+ }
255160
+ return null;
255161
+ }
255162
+ async function resolveWranglerConfig(projectRoot) {
255163
+ const artifact = await detectFullStackArtifact(projectRoot);
255164
+ if (!artifact) {
255165
+ throw new InvalidInputError("No full-stack build artifact found. Expected a .wrangler/deploy/config.json redirect file or a root wrangler.jsonc.", {
255166
+ hints: [{ message: "Run your framework's build command first" }]
255167
+ });
255168
+ }
255169
+ if (artifact.source === "toml") {
255170
+ throw new InvalidInputError("wrangler.toml is not supported for Base44 full-stack deploys. Convert your config to wrangler.jsonc.");
255171
+ }
255172
+ const configPath = artifact.source === "redirect" ? await resolveRedirectedConfigPath(artifact.path) : artifact.path;
255173
+ const parsed = await readJsonFile(configPath);
255174
+ const result = WranglerConfigSchema.safeParse(parsed);
255175
+ if (!result.success) {
255176
+ throw new ConfigInvalidError(`Invalid wrangler config: ${exports_external.prettifyError(result.error)}`, configPath);
255177
+ }
255178
+ const config12 = result.data;
255179
+ if (config12.no_bundle !== true) {
255180
+ throw new InvalidInputError("This framework's output requires bundling; not yet supported. Base44 full-stack deploys only support pre-bundled Workers output (no_bundle: true).");
255181
+ }
255182
+ const configDir = dirname10(configPath);
255183
+ const assetsDirectory = config12.assets?.directory ? resolve5(configDir, config12.assets.directory) : null;
255184
+ return {
255185
+ configPath,
255186
+ configDir,
255187
+ main: config12.main,
255188
+ assetsDirectory,
255189
+ assetsConfig: config12.assets ? toResolvedAssetsConfig(config12.assets) : null,
255190
+ compatibilityDate: config12.compatibility_date ?? null,
255191
+ compatibilityFlags: config12.compatibility_flags ?? [],
255192
+ vars: config12.vars ?? {},
255193
+ rules: (config12.rules ?? []).map((rule) => ({
255194
+ type: rule.type,
255195
+ globs: rule.globs
255196
+ })),
255197
+ uploadSourceMaps: config12.upload_source_maps ?? false
255198
+ };
255199
+ }
255200
+ async function resolveRedirectedConfigPath(redirectPath) {
255201
+ const parsed = await readJsonFile(redirectPath);
255202
+ const result = RedirectConfigSchema.safeParse(parsed);
255203
+ if (!result.success) {
255204
+ throw new ConfigInvalidError(`Invalid deploy redirect file: ${exports_external.prettifyError(result.error)}`, redirectPath);
255205
+ }
255206
+ const configPath = resolve5(dirname10(redirectPath), result.data.configPath);
255207
+ if (!await pathExists(configPath)) {
255208
+ throw new ConfigInvalidError(`Wrangler config referenced by ${redirectPath} does not exist: ${configPath}`, redirectPath, {
255209
+ hints: [{ message: "Rebuild the project to regenerate the artifact" }]
255210
+ });
255211
+ }
255212
+ return configPath;
255213
+ }
255214
+ function toResolvedAssetsConfig(assets) {
255215
+ return {
255216
+ htmlHandling: assets.html_handling,
255217
+ notFoundHandling: assets.not_found_handling,
255218
+ runWorkerFirst: assets.run_worker_first,
255219
+ headers: assets.headers,
255220
+ redirects: assets.redirects
255221
+ };
255222
+ }
255223
+
255224
+ // src/core/deployments/deploy.ts
255225
+ async function resolveGitHash(projectRoot, explicit) {
255226
+ const hash2 = explicit ?? await gitHead(projectRoot);
255227
+ if (!hash2 || !GIT_HASH_PATTERN.test(hash2)) {
255228
+ throw new InvalidInputError(explicit ? `'${explicit}' is not a git commit hash.` : "Full-stack deployments are addressed by the commit that produced the build, and no git commit was found.", {
255229
+ hints: [
255230
+ {
255231
+ message: "Run the deploy from a git checkout, or pass the commit explicitly with --git-hash."
255232
+ }
255233
+ ]
255234
+ });
255235
+ }
255236
+ return hash2;
255237
+ }
255238
+ async function gitHead(projectRoot) {
255239
+ try {
255240
+ const { stdout } = await execa("git", ["rev-parse", "HEAD"], {
255241
+ cwd: projectRoot
255242
+ });
255243
+ return stdout.trim();
255244
+ } catch {
255245
+ return null;
255246
+ }
255247
+ }
255248
+ async function deployFullStack(options) {
255249
+ const { projectRoot, gitHash, progress } = options;
255250
+ const config12 = await resolveWranglerConfig(projectRoot);
255251
+ if (!config12.compatibilityFlags.includes("nodejs_compat")) {
255252
+ progress?.onWarning?.("The wrangler config has no 'nodejs_compat' compatibility flag; Node.js built-ins will be unavailable at runtime. Enable it in your framework's Cloudflare adapter settings if your server code needs Node APIs.");
255253
+ }
255254
+ if (config12.vars && Object.keys(config12.vars).length > 0) {
255255
+ progress?.onWarning?.("wrangler 'vars' are not supported and were ignored — a worker's environment comes from the app's secrets (base44 secrets set).");
255256
+ }
255257
+ const modules = await collectModules(config12);
255258
+ let assets = { manifest: {}, filesByHash: new Map };
255259
+ if (config12.assetsDirectory && await pathExists(config12.assetsDirectory)) {
255260
+ assets = await buildAssetManifest(config12.assetsDirectory, getAppContext().id);
255261
+ }
255262
+ const created = await createDeployment({
255263
+ git_hash: gitHash,
255264
+ config: {
255265
+ main: config12.main,
255266
+ compatibility_date: config12.compatibilityDate,
255267
+ compatibility_flags: config12.compatibilityFlags,
255268
+ assets: buildAssetsConfig(config12.assetsConfig, progress)
255269
+ },
255270
+ asset_manifest: assets.manifest
255271
+ });
255272
+ const totalAssets = Object.keys(assets.manifest).length;
255273
+ const newAssets = new Set(created.assetBuckets.flat()).size;
255274
+ progress?.onAssets?.({ totalAssets, newAssets });
255275
+ const completionJwt = await uploadAssetBuckets(created.deploymentId, created.assetBuckets, assets.filesByHash, progress?.onAssetUpload);
255276
+ progress?.onWorker?.({ moduleCount: modules.length });
255277
+ const finalized = await finalizeDeployment(created.deploymentId, completionJwt, modules);
255278
+ return { deploymentId: finalized.deploymentId, gitHash };
255279
+ }
255280
+ function buildAssetsConfig(assetsConfig, progress) {
255281
+ if (!assetsConfig)
255282
+ return null;
255283
+ if (assetsConfig.headers || assetsConfig.redirects) {
255284
+ progress?.onWarning?.("_headers/_redirects files are not supported yet and were ignored for this deploy.");
255285
+ }
255286
+ let runWorkerFirst;
255287
+ if (Array.isArray(assetsConfig.runWorkerFirst)) {
255288
+ progress?.onWarning?.("'run_worker_first' route patterns are not supported yet and were ignored for this deploy.");
255289
+ } else {
255290
+ runWorkerFirst = assetsConfig.runWorkerFirst;
255291
+ }
255292
+ return {
255293
+ html_handling: assetsConfig.htmlHandling,
255294
+ not_found_handling: assetsConfig.notFoundHandling,
255295
+ run_worker_first: runWorkerFirst
255296
+ };
255297
+ }
254718
255298
  // src/core/utils/dependencies.ts
254719
255299
  import { spawnSync as spawnSync2 } from "node:child_process";
254720
255300
  function verifyDenoInstalled(context) {
@@ -254803,7 +255383,7 @@ async function pullAction({
254803
255383
  runTask: runTask2
254804
255384
  }) {
254805
255385
  const { project: project2 } = await readProjectConfig();
254806
- const dir = join15(dirname10(project2.configPath), project2.agentSkillsDir);
255386
+ const dir = join17(dirname11(project2.configPath), project2.agentSkillsDir);
254807
255387
  const remote = await runTask2("Fetching agent skills from Base44", () => fetchAgentSkills(), {
254808
255388
  successMessage: "Agent skills fetched successfully",
254809
255389
  errorMessage: "Failed to fetch agent skills"
@@ -254859,14 +255439,14 @@ function getAgentSkillsCommand() {
254859
255439
  }
254860
255440
 
254861
255441
  // src/cli/commands/agents/pull.ts
254862
- import { dirname as dirname11, join as join16 } from "node:path";
255442
+ import { dirname as dirname12, join as join18 } from "node:path";
254863
255443
  async function pullAgentsAction({
254864
255444
  log,
254865
255445
  runTask: runTask2
254866
255446
  }) {
254867
255447
  const { project: project2 } = await readProjectConfig();
254868
- const configDir = dirname11(project2.configPath);
254869
- const agentsDir = join16(configDir, project2.agentsDir);
255448
+ const configDir = dirname12(project2.configPath);
255449
+ const agentsDir = join18(configDir, project2.agentsDir);
254870
255450
  const remoteAgents = await runTask2("Fetching agents from Base44", async () => {
254871
255451
  return await fetchAgents();
254872
255452
  }, {
@@ -254936,12 +255516,12 @@ function getAgentsCommand() {
254936
255516
  }
254937
255517
 
254938
255518
  // src/cli/commands/auth/password-login.ts
254939
- import { dirname as dirname12, join as join17 } from "node:path";
255519
+ import { dirname as dirname13, join as join19 } from "node:path";
254940
255520
  async function passwordLoginAction({ log, runTask: runTask2 }, action) {
254941
255521
  const shouldEnable = action === "enable";
254942
255522
  const { project: project2 } = await readProjectConfig();
254943
- const configDir = dirname12(project2.configPath);
254944
- const authDir = join17(configDir, project2.authDir);
255523
+ const configDir = dirname13(project2.configPath);
255524
+ const authDir = join19(configDir, project2.authDir);
254945
255525
  const updated = await runTask2("Updating local auth config", async () => {
254946
255526
  const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
254947
255527
  const merged = { ...current, enableUsernamePassword: shouldEnable };
@@ -254961,14 +255541,14 @@ function getPasswordLoginCommand() {
254961
255541
  }
254962
255542
 
254963
255543
  // src/cli/commands/auth/pull.ts
254964
- import { dirname as dirname13, join as join18 } from "node:path";
255544
+ import { dirname as dirname14, join as join20 } from "node:path";
254965
255545
  async function pullAuthAction({
254966
255546
  log,
254967
255547
  runTask: runTask2
254968
255548
  }) {
254969
255549
  const { project: project2 } = await readProjectConfig();
254970
- const configDir = dirname13(project2.configPath);
254971
- const authDir = join18(configDir, project2.authDir);
255550
+ const configDir = dirname14(project2.configPath);
255551
+ const authDir = join20(configDir, project2.authDir);
254972
255552
  const remoteConfig = await runTask2("Fetching auth config from Base44", async () => {
254973
255553
  return await pullAuthConfig();
254974
255554
  }, {
@@ -255032,7 +255612,7 @@ function getAuthPushCommand() {
255032
255612
  }
255033
255613
 
255034
255614
  // src/cli/commands/auth/social-login.ts
255035
- import { dirname as dirname14, join as join19, resolve as resolve4 } from "node:path";
255615
+ import { dirname as dirname15, join as join21, resolve as resolve6 } from "node:path";
255036
255616
  var PROVIDER_LABELS = {
255037
255617
  google: "Google",
255038
255618
  microsoft: "Microsoft",
@@ -255072,7 +255652,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
255072
255652
  let clientSecret;
255073
255653
  if (useCustomOAuth && oauth && oauthCli && hasSecretOptions(options)) {
255074
255654
  if (options.envFile) {
255075
- const secrets = await parseEnvFile(resolve4(options.envFile));
255655
+ const secrets = await parseEnvFile(resolve6(options.envFile));
255076
255656
  const value = secrets[oauthCli.envVar];
255077
255657
  if (!value) {
255078
255658
  throw new InvalidInputError(`Key "${oauthCli.envVar}" not found in ${options.envFile}.`);
@@ -255102,8 +255682,8 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
255102
255682
  }
255103
255683
  }
255104
255684
  const { project: project2 } = await readProjectConfig();
255105
- const configDir = dirname14(project2.configPath);
255106
- const authDir = join19(configDir, project2.authDir);
255685
+ const configDir = dirname15(project2.configPath);
255686
+ const authDir = join21(configDir, project2.authDir);
255107
255687
  const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
255108
255688
  if (clientSecret) {
255109
255689
  await runTask2("Saving client secret", async () => pushCustomOAuthSecret(provider, clientSecret));
@@ -255128,7 +255708,7 @@ function getSocialLoginCommand() {
255128
255708
  }
255129
255709
 
255130
255710
  // src/cli/commands/auth/sso.ts
255131
- import { dirname as dirname15, join as join20, resolve as resolve5 } from "node:path";
255711
+ import { dirname as dirname16, join as join22, resolve as resolve7 } from "node:path";
255132
255712
  var SSOConfigFileSchema = exports_external.object({
255133
255713
  provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
255134
255714
  clientId: exports_external.string(),
@@ -255144,7 +255724,7 @@ var SSOConfigFileSchema = exports_external.object({
255144
255724
  ssoName: exports_external.string().optional()
255145
255725
  });
255146
255726
  async function loadSSOConfigFile(filePath) {
255147
- const resolved = resolve5(filePath);
255727
+ const resolved = resolve7(filePath);
255148
255728
  const raw2 = await readJsonFile(resolved);
255149
255729
  const result = SSOConfigFileSchema.safeParse(raw2);
255150
255730
  if (!result.success) {
@@ -255232,7 +255812,7 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
255232
255812
  }
255233
255813
  let clientSecret;
255234
255814
  if (merged.envFile && !merged.clientSecret) {
255235
- const secrets2 = await parseEnvFile(resolve5(merged.envFile));
255815
+ const secrets2 = await parseEnvFile(resolve7(merged.envFile));
255236
255816
  const value = secrets2.sso_client_secret;
255237
255817
  if (!value) {
255238
255818
  throw new InvalidInputError(`Key "sso_client_secret" not found in ${merged.envFile}.`);
@@ -255291,8 +255871,8 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
255291
255871
  throw error48;
255292
255872
  }
255293
255873
  const { project: project2 } = await readProjectConfig();
255294
- const configDir = dirname15(project2.configPath);
255295
- const authDir = join20(configDir, project2.authDir);
255874
+ const configDir = dirname16(project2.configPath);
255875
+ const authDir = join22(configDir, project2.authDir);
255296
255876
  await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
255297
255877
  await runTask2("Saving SSO credentials", async () => pushSSOSecrets(secrets));
255298
255878
  return {
@@ -255307,8 +255887,8 @@ async function ssoDisableAction({ log, runTask: runTask2 }, options) {
255307
255887
  throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
255308
255888
  }
255309
255889
  const { project: project2 } = await readProjectConfig();
255310
- const configDir = dirname15(project2.configPath);
255311
- const authDir = join20(configDir, project2.authDir);
255890
+ const configDir = dirname16(project2.configPath);
255891
+ const authDir = join22(configDir, project2.authDir);
255312
255892
  const updated = await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
255313
255893
  await runTask2("Removing SSO credentials", async () => deleteSSOSecrets());
255314
255894
  if (!hasAnyLoginMethod(updated)) {
@@ -255870,19 +256450,19 @@ var baseOpen = async (options) => {
255870
256450
  }
255871
256451
  const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
255872
256452
  if (options.wait) {
255873
- return new Promise((resolve6, reject) => {
256453
+ return new Promise((resolve8, reject) => {
255874
256454
  subprocess.once("error", reject);
255875
256455
  subprocess.once("close", (exitCode) => {
255876
256456
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
255877
256457
  reject(new Error(`Exited with code ${exitCode}`));
255878
256458
  return;
255879
256459
  }
255880
- resolve6(subprocess);
256460
+ resolve8(subprocess);
255881
256461
  });
255882
256462
  });
255883
256463
  }
255884
256464
  if (isFallbackAttempt) {
255885
- return new Promise((resolve6, reject) => {
256465
+ return new Promise((resolve8, reject) => {
255886
256466
  subprocess.once("error", reject);
255887
256467
  subprocess.once("spawn", () => {
255888
256468
  subprocess.once("close", (exitCode) => {
@@ -255892,17 +256472,17 @@ var baseOpen = async (options) => {
255892
256472
  return;
255893
256473
  }
255894
256474
  subprocess.unref();
255895
- resolve6(subprocess);
256475
+ resolve8(subprocess);
255896
256476
  });
255897
256477
  });
255898
256478
  });
255899
256479
  }
255900
256480
  subprocess.unref();
255901
- return new Promise((resolve6, reject) => {
256481
+ return new Promise((resolve8, reject) => {
255902
256482
  subprocess.once("error", reject);
255903
256483
  subprocess.once("spawn", () => {
255904
256484
  subprocess.off("error", reject);
255905
- resolve6(subprocess);
256485
+ resolve8(subprocess);
255906
256486
  });
255907
256487
  });
255908
256488
  };
@@ -256165,13 +256745,13 @@ function getConnectorsListAvailableCommand() {
256165
256745
  }
256166
256746
 
256167
256747
  // src/cli/commands/connectors/pull.ts
256168
- import { dirname as dirname16, join as join21, resolve as resolve6 } from "node:path";
256748
+ import { dirname as dirname17, join as join23, resolve as resolve8 } from "node:path";
256169
256749
  async function resolveConnectorsDir(options) {
256170
256750
  if (!getAppContext().projectRoot) {
256171
- return resolve6(options.dir ?? "connectors");
256751
+ return resolve8(options.dir ?? "connectors");
256172
256752
  }
256173
256753
  const { project: project2 } = await readProjectConfig();
256174
- return join21(dirname16(project2.configPath), project2.connectorsDir);
256754
+ return join23(dirname17(project2.configPath), project2.connectorsDir);
256175
256755
  }
256176
256756
  async function pullConnectorsAction({ log, runTask: runTask2, jsonMode }, options) {
256177
256757
  const connectorsDir = await resolveConnectorsDir(options);
@@ -256212,10 +256792,10 @@ function getConnectorsPullCommand() {
256212
256792
  }
256213
256793
 
256214
256794
  // src/cli/commands/connectors/push.ts
256215
- import { resolve as resolve7 } from "node:path";
256795
+ import { resolve as resolve9 } from "node:path";
256216
256796
  async function readConnectorsToPush(options) {
256217
256797
  if (!getAppContext().projectRoot) {
256218
- return readAllConnectors(resolve7(options.dir ?? "connectors"));
256798
+ return readAllConnectors(resolve9(options.dir ?? "connectors"));
256219
256799
  }
256220
256800
  const { connectors } = await readProjectConfig();
256221
256801
  return connectors;
@@ -256579,11 +257159,11 @@ function getListCommand() {
256579
257159
  }
256580
257160
 
256581
257161
  // src/cli/commands/functions/pull.ts
256582
- import { dirname as dirname17, join as join22 } from "node:path";
257162
+ import { dirname as dirname18, join as join24 } from "node:path";
256583
257163
  async function pullFunctionsAction({ log, runTask: runTask2 }, name2) {
256584
257164
  const { project: project2, functions } = await readProjectConfig();
256585
- const configDir = dirname17(project2.configPath);
256586
- const functionsDir = join22(configDir, project2.functionsDir);
257165
+ const configDir = dirname18(project2.configPath);
257166
+ const functionsDir = join24(configDir, project2.functionsDir);
256587
257167
  const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
256588
257168
  const remoteFunctions = await runTask2("Fetching functions from Base44", async () => {
256589
257169
  const { functions: functions2 } = await listDeployedFunctions();
@@ -256642,11 +257222,11 @@ function getFunctionsCommand() {
256642
257222
  }
256643
257223
 
256644
257224
  // src/cli/commands/project/create.ts
256645
- import { basename as basename4, resolve as resolve8 } from "node:path";
257225
+ import { basename as basename4, resolve as resolve10 } from "node:path";
256646
257226
  var import_kebabCase = __toESM(require_kebabCase(), 1);
256647
257227
 
256648
257228
  // src/cli/commands/project/scaffold-shared.ts
256649
- import { join as join23 } from "node:path";
257229
+ import { join as join25 } from "node:path";
256650
257230
  var DEFAULT_TEMPLATE_ID = "backend-only";
256651
257231
  async function getTemplateById(templateId) {
256652
257232
  const templates = await listTemplates();
@@ -256663,7 +257243,7 @@ async function completeProjectSetup({
256663
257243
  projectId,
256664
257244
  name: name2,
256665
257245
  resolvedPath,
256666
- deploy: deploy5,
257246
+ deploy: deploy6,
256667
257247
  skills,
256668
257248
  isInteractive
256669
257249
  }, { runTask: runTask2 }) {
@@ -256677,7 +257257,7 @@ async function completeProjectSetup({
256677
257257
  });
256678
257258
  shouldPushEntities = !Ct(result) && result;
256679
257259
  } else {
256680
- shouldPushEntities = !!deploy5;
257260
+ shouldPushEntities = !!deploy6;
256681
257261
  }
256682
257262
  if (shouldPushEntities) {
256683
257263
  await runTask2(`Pushing ${entities.length} data models to Base44...`, async () => {
@@ -256697,7 +257277,7 @@ async function completeProjectSetup({
256697
257277
  });
256698
257278
  shouldDeploy = !Ct(result) && result;
256699
257279
  } else {
256700
- shouldDeploy = !!deploy5;
257280
+ shouldDeploy = !!deploy6;
256701
257281
  }
256702
257282
  if (shouldDeploy && installCommand && buildCommand && outputDirectory) {
256703
257283
  const { appUrl } = await runTask2("Installing dependencies...", async (updateMessage) => {
@@ -256705,7 +257285,7 @@ async function completeProjectSetup({
256705
257285
  updateMessage("Building project...");
256706
257286
  await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
256707
257287
  updateMessage("Deploying site...");
256708
- return await deploySite(join23(resolvedPath, outputDirectory));
257288
+ return await deploySite(join25(resolvedPath, outputDirectory));
256709
257289
  }, {
256710
257290
  successMessage: theme.colors.base44Orange("Site deployed successfully"),
256711
257291
  errorMessage: "Failed to deploy site"
@@ -256751,7 +257331,7 @@ function workspaceLabel(workspace2) {
256751
257331
  const suffix = workspace2.isPersonal ? "personal" : workspace2.userRole ?? "member";
256752
257332
  return `${workspace2.name} (${suffix})`;
256753
257333
  }
256754
- async function resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive, options = {}) {
257334
+ async function resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive) {
256755
257335
  if (flagWorkspaceId) {
256756
257336
  return flagWorkspaceId;
256757
257337
  }
@@ -256762,13 +257342,13 @@ async function resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive, options =
256762
257342
  if (workspaces.length <= 1) {
256763
257343
  return;
256764
257344
  }
256765
- const promptOptions = workspaces.map((w) => ({
257345
+ const options = workspaces.map((w) => ({
256766
257346
  value: w.id,
256767
257347
  label: workspaceLabel(w)
256768
257348
  }));
256769
257349
  const selected = await Je({
256770
- message: options.promptMessage ?? "Which workspace should this app belong to?",
256771
- options: promptOptions,
257350
+ message: "Which workspace should this app belong to?",
257351
+ options,
256772
257352
  initialValue: workspaces[0].id
256773
257353
  });
256774
257354
  if (Ct(selected)) {
@@ -256834,7 +257414,7 @@ async function createInteractive(options, ctx) {
256834
257414
  }, ctx);
256835
257415
  }
256836
257416
  async function createNonInteractive(options, ctx) {
256837
- ctx.log.info(`Creating a new project at ${resolve8(options.path)}`);
257417
+ ctx.log.info(`Creating a new project at ${resolve10(options.path)}`);
256838
257418
  const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
256839
257419
  return await executeCreate({
256840
257420
  template: template2,
@@ -256851,14 +257431,14 @@ async function executeCreate({
256851
257431
  name: rawName,
256852
257432
  description,
256853
257433
  projectPath,
256854
- deploy: deploy5,
257434
+ deploy: deploy6,
256855
257435
  skills,
256856
257436
  workspaceId: flagWorkspaceId,
256857
257437
  isInteractive
256858
257438
  }, ctx) {
256859
257439
  const { log, runTask: runTask2 } = ctx;
256860
257440
  const name2 = rawName.trim();
256861
- const resolvedPath = resolve8(projectPath);
257441
+ const resolvedPath = resolve10(projectPath);
256862
257442
  const organizationId = await resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive);
256863
257443
  const { projectId } = await runTask2("Setting up your project...", async () => {
256864
257444
  return await createProjectFiles({
@@ -256873,7 +257453,7 @@ async function executeCreate({
256873
257453
  errorMessage: "Failed to create project"
256874
257454
  });
256875
257455
  setAppContext({ id: projectId, projectRoot: resolvedPath });
256876
- const summary = await completeProjectSetup({ projectId, name: name2, resolvedPath, deploy: deploy5, skills, isInteractive }, ctx);
257456
+ const summary = await completeProjectSetup({ projectId, name: name2, resolvedPath, deploy: deploy6, skills, isInteractive }, ctx);
256877
257457
  printProjectSummary(summary, log);
256878
257458
  return { outroMessage: "Your project is set up and ready to use" };
256879
257459
  }
@@ -256909,17 +257489,24 @@ Examples:
256909
257489
  }
256910
257490
 
256911
257491
  // src/cli/commands/project/deploy.ts
256912
- async function deployAction({ isNonInteractive, log }, options = {}) {
257492
+ import { resolve as resolve11 } from "node:path";
257493
+ async function deployAction(ctx, options = {}) {
257494
+ const { isNonInteractive, log } = ctx;
256913
257495
  if (isNonInteractive && !options.yes) {
256914
257496
  throw new InvalidInputError("--yes is required in non-interactive mode");
256915
257497
  }
257498
+ if (options.build && options.prebuilt) {
257499
+ throw new InvalidInputError("--build and --prebuilt cannot be combined.");
257500
+ }
256916
257501
  const projectData = await readProjectConfig(options.projectRoot);
256917
- if (!hasResourcesToDeploy(projectData)) {
257502
+ const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
257503
+ let fullStackArtifact = await detectFullStackArtifact(project2.root);
257504
+ const isFullStackCandidate = fullStackArtifact !== null || Boolean(project2.site?.buildCommand);
257505
+ if (!hasResourcesToDeploy(projectData) && !isFullStackCandidate) {
256918
257506
  return {
256919
257507
  outroMessage: "No resources found to deploy"
256920
257508
  };
256921
257509
  }
256922
- const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
256923
257510
  const summaryLines = [];
256924
257511
  if (entities.length > 0) {
256925
257512
  summaryLines.push(` - ${entities.length} ${entities.length === 1 ? "entity" : "entities"}`);
@@ -256939,7 +257526,9 @@ async function deployAction({ isNonInteractive, log }, options = {}) {
256939
257526
  if (project2.visibility) {
256940
257527
  summaryLines.push(` - Visibility: ${project2.visibility}`);
256941
257528
  }
256942
- if (project2.site?.outputDirectory) {
257529
+ if (fullStackArtifact) {
257530
+ summaryLines.push(" - Full-stack app");
257531
+ } else if (project2.site?.outputDirectory) {
256943
257532
  summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
256944
257533
  }
256945
257534
  if (!options.yes) {
@@ -256960,6 +257549,7 @@ ${summaryLines.join(`
256960
257549
  let functionCompleted = 0;
256961
257550
  const functionTotal = functions.length;
256962
257551
  const result = await deployAll(projectData, {
257552
+ site: false,
256963
257553
  onVisibilitySet: (level) => {
256964
257554
  log.success(`App visibility set to ${level}`);
256965
257555
  },
@@ -256972,6 +257562,16 @@ ${summaryLines.join(`
256972
257562
  formatDeployResult(r, log);
256973
257563
  }
256974
257564
  });
257565
+ await buildSiteIfNeeded(ctx, projectData, options, fullStackArtifact);
257566
+ fullStackArtifact = await detectFullStackArtifact(project2.root);
257567
+ let appUrl;
257568
+ let fullStackResult;
257569
+ if (fullStackArtifact) {
257570
+ fullStackResult = await runFullStackDeploy(ctx, project2.root, options);
257571
+ } else if (project2.site?.outputDirectory) {
257572
+ const outputDir = resolve11(project2.root, project2.site.outputDirectory);
257573
+ ({ appUrl } = await deploySite(outputDir));
257574
+ }
256975
257575
  const connectorResults = result.connectorResults ?? [];
256976
257576
  await handleOAuthConnectors(connectorResults, isNonInteractive, options, log);
256977
257577
  const stripeResult = connectorResults.find((r) => r.type === "stripe");
@@ -256979,13 +257579,80 @@ ${summaryLines.join(`
256979
257579
  printStripeResult(stripeResult, log);
256980
257580
  }
256981
257581
  log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
256982
- if (result.appUrl) {
256983
- log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
257582
+ if (appUrl) {
257583
+ log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(appUrl)}`);
257584
+ }
257585
+ if (fullStackResult) {
257586
+ printFullStackSummary(fullStackResult, log);
257587
+ }
257588
+ return {
257589
+ outroMessage: "App deployed successfully",
257590
+ stdout: ctx.jsonMode && fullStackResult ? `${JSON.stringify({
257591
+ deploymentId: fullStackResult.deploymentId,
257592
+ gitHash: fullStackResult.gitHash
257593
+ }, null, 2)}
257594
+ ` : undefined
257595
+ };
257596
+ }
257597
+ async function buildSiteIfNeeded({ runTask: runTask2 }, { project: project2 }, options, fullStackArtifact) {
257598
+ const site2 = project2.site;
257599
+ if (!site2?.buildCommand || options.prebuilt)
257600
+ return;
257601
+ const artifactPresent = fullStackArtifact !== null || (site2.outputDirectory ? await pathExists(resolve11(project2.root, site2.outputDirectory)) : false);
257602
+ if (artifactPresent && !options.build)
257603
+ return;
257604
+ const { installCommand, buildCommand } = site2;
257605
+ await runTask2(installCommand ? "Installing dependencies..." : "Building project...", async (updateMessage) => {
257606
+ if (installCommand) {
257607
+ await execa({ cwd: project2.root, shell: true })`${installCommand}`;
257608
+ updateMessage("Building project...");
257609
+ }
257610
+ await execa({ cwd: project2.root, shell: true })`${buildCommand}`;
257611
+ }, {
257612
+ successMessage: "Project built successfully",
257613
+ errorMessage: "Failed to build project"
257614
+ });
257615
+ }
257616
+ async function runFullStackDeploy({ runTask: runTask2, log }, projectRoot, options) {
257617
+ const gitHash = await resolveGitHash(projectRoot, options.gitHash);
257618
+ const progressLines = [];
257619
+ const warnings = [];
257620
+ const deployment = await runTask2("Deploying full-stack app...", async (updateMessage) => await deployFullStack({
257621
+ projectRoot,
257622
+ gitHash,
257623
+ progress: {
257624
+ onWarning: (message) => {
257625
+ warnings.push(message);
257626
+ },
257627
+ onAssets: ({ totalAssets, newAssets }) => {
257628
+ const line = `Found ${totalAssets} static assets (${newAssets} new)`;
257629
+ progressLines.push(line);
257630
+ updateMessage(line);
257631
+ },
257632
+ onAssetUpload: ({ uploadedFiles, totalFiles }) => {
257633
+ updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
257634
+ },
257635
+ onWorker: ({ moduleCount }) => {
257636
+ updateMessage(`Deploying worker (${moduleCount} modules)…`);
257637
+ }
257638
+ }
257639
+ }), {
257640
+ successMessage: theme.colors.base44Orange("Full-stack app deployed"),
257641
+ errorMessage: "Full-stack deploy failed"
257642
+ });
257643
+ for (const line of progressLines) {
257644
+ log.message(theme.styles.dim(line));
256984
257645
  }
256985
- return { outroMessage: "App deployed successfully" };
257646
+ for (const warning of warnings) {
257647
+ log.warn(warning);
257648
+ }
257649
+ return deployment;
257650
+ }
257651
+ function printFullStackSummary(deployment, log) {
257652
+ log.message(`${theme.styles.header("Deployment")}: ${deployment.deploymentId} ${theme.styles.dim(`(commit ${deployment.gitHash.slice(0, 12)})`)}`);
256986
257653
  }
256987
257654
  function getDeployCommand2() {
256988
- return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(deployAction);
257655
+ return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").option("--git-hash <hash>", "Commit the full-stack build came from (defaults to the checkout's HEAD)").option("--build", "Run the configured install/build commands before deploying, even when a build artifact already exists").option("--prebuilt", "Skip the build step and deploy the existing artifact").action(deployAction);
256989
257656
  }
256990
257657
  async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
256991
257658
  const needsOAuth = filterPendingOAuth(connectorResults);
@@ -257101,36 +257768,6 @@ async function promptForExistingProject(projects) {
257101
257768
  }
257102
257769
  return selectedProject;
257103
257770
  }
257104
- async function resolveExplicitAppId(ctx, appId) {
257105
- await ctx.runTask("Validating app...", () => getApp(appId), {
257106
- errorMessage: "Could not validate app"
257107
- }).catch((error48) => {
257108
- if (error48 instanceof ApiError && (error48.statusCode === 404 || error48.statusCode === 403)) {
257109
- throw new InvalidInputError(`App "${appId}" not found, or you don't have access to it.`, {
257110
- hints: [
257111
- { message: "Check the app ID is correct" },
257112
- {
257113
- message: "Run 'base44 link' without --app-id to browse apps by workspace"
257114
- }
257115
- ]
257116
- });
257117
- }
257118
- throw error48;
257119
- });
257120
- return appId;
257121
- }
257122
- async function chooseProjectInteractively(ctx, options) {
257123
- const workspaceId = await resolveWorkspaceId(ctx, options.workspace ?? options.org, !ctx.isNonInteractive, { promptMessage: "Which workspace is the app in?" });
257124
- const projects = await ctx.runTask("Fetching projects...", () => listProjects({ workspaceId }), {
257125
- successMessage: "Projects fetched",
257126
- errorMessage: "Failed to fetch projects"
257127
- });
257128
- if (!projects.length) {
257129
- return;
257130
- }
257131
- const selectedProject = await promptForExistingProject(projects);
257132
- return selectedProject.id;
257133
- }
257134
257771
  async function link(ctx, options, command2) {
257135
257772
  const { log, runTask: runTask2, isNonInteractive } = ctx;
257136
257773
  const appId = readExplicitAppId(command2).value;
@@ -257154,10 +257791,31 @@ async function link(ctx, options, command2) {
257154
257791
  let finalAppId;
257155
257792
  const action = appId ? "choose" : options.create ? "create" : await promptForLinkAction();
257156
257793
  if (action === "choose") {
257157
- const linkedAppId = appId ? await resolveExplicitAppId(ctx, appId) : await chooseProjectInteractively(ctx, options);
257158
- if (!linkedAppId) {
257794
+ const projects = await runTask2("Fetching projects...", async () => listProjects(), {
257795
+ successMessage: "Projects fetched",
257796
+ errorMessage: "Failed to fetch projects"
257797
+ });
257798
+ if (!projects.length) {
257159
257799
  return { outroMessage: "No projects available for linking" };
257160
257800
  }
257801
+ let linkedAppId;
257802
+ if (appId) {
257803
+ const project2 = projects.find((p) => p.id === appId);
257804
+ if (!project2) {
257805
+ throw new InvalidInputError(`App with ID "${appId}" not found.`, {
257806
+ hints: [
257807
+ { message: "Check the app ID is correct" },
257808
+ {
257809
+ message: "Use 'base44 link' without --app-id to see available projects"
257810
+ }
257811
+ ]
257812
+ });
257813
+ }
257814
+ linkedAppId = appId;
257815
+ } else {
257816
+ const selectedProject = await promptForExistingProject(projects);
257817
+ linkedAppId = selectedProject.id;
257818
+ }
257161
257819
  await runTask2("Linking project...", async () => {
257162
257820
  await writeAppConfig(projectRoot.root, linkedAppId);
257163
257821
  setAppContext({ id: linkedAppId, projectRoot: projectRoot.root });
@@ -257186,7 +257844,7 @@ async function link(ctx, options, command2) {
257186
257844
  function getLinkCommand() {
257187
257845
  return new Base44Command("link", {
257188
257846
  requireAppContext: false
257189
- }).description("Link a local project to a Base44 project (create new or link existing)").configureHelp({ showGlobalOptions: true }).option("-c, --create", "Create a new project (skip selection prompt)").option("-n, --name <name>", "Project name (required when --create is used)").option("-d, --description <description>", "Project description").option("-w, --workspace <id>", "Workspace (organization) ID to scope the app picker to (or create the app in, with --create). Defaults to your personal workspace").addOption(new Option("--org <id>", "Alias for --workspace").hideHelp()).addOption(new Option("-p, --project-id <id>", "Project ID to link to an existing project").hideHelp()).addOption(new Option("--projectId <id>", "Project ID to link to an existing project").hideHelp()).hook("preAction", validateNonInteractiveFlags).action(link);
257847
+ }).description("Link a local project to a Base44 project (create new or link existing)").configureHelp({ showGlobalOptions: true }).option("-c, --create", "Create a new project (skip selection prompt)").option("-n, --name <name>", "Project name (required when --create is used)").option("-d, --description <description>", "Project description").option("-w, --workspace <id>", "Workspace (organization) ID to create the app in when using --create (defaults to your personal workspace)").addOption(new Option("--org <id>", "Alias for --workspace").hideHelp()).addOption(new Option("-p, --project-id <id>", "Project ID to link to an existing project").hideHelp()).addOption(new Option("--projectId <id>", "Project ID to link to an existing project").hideHelp()).hook("preAction", validateNonInteractiveFlags).action(link);
257190
257848
  }
257191
257849
 
257192
257850
  // src/cli/commands/project/logs.ts
@@ -257272,7 +257930,7 @@ async function followLogs(functionNames, options, availableFunctionNames, jsonMo
257272
257930
  for (const entry of fresh)
257273
257931
  writeFollowLine(entry, jsonMode);
257274
257932
  first = false;
257275
- await new Promise((resolve9) => setTimeout(resolve9, 2000));
257933
+ await new Promise((resolve12) => setTimeout(resolve12, 2000));
257276
257934
  }
257277
257935
  }
257278
257936
  function formatLogs(entries, env3) {
@@ -257386,7 +258044,7 @@ function getLogsCommand() {
257386
258044
  }
257387
258045
 
257388
258046
  // src/cli/commands/project/scaffold.ts
257389
- import { basename as basename5, resolve as resolve9 } from "node:path";
258047
+ import { basename as basename5, resolve as resolve12 } from "node:path";
257390
258048
  function resolveAppId(options) {
257391
258049
  const appId = options.appId;
257392
258050
  if (!appId) {
@@ -257402,7 +258060,7 @@ function resolveAppId(options) {
257402
258060
  async function scaffoldAction(ctx, name2, options, command2) {
257403
258061
  const { log, runTask: runTask2 } = ctx;
257404
258062
  const appId = resolveAppId(command2.optsWithGlobals());
257405
- const resolvedPath = resolve9("./");
258063
+ const resolvedPath = resolve12("./");
257406
258064
  const projectName = (name2 ?? basename5(resolvedPath)).trim();
257407
258065
  const template2 = await getTemplateById("backend-only");
257408
258066
  log.info(`Scaffolding project at ${resolvedPath}`);
@@ -257568,7 +258226,7 @@ function withSandboxAuthHint(error48) {
257568
258226
  cause: error48
257569
258227
  });
257570
258228
  }
257571
- async function callTool(appId, tool, payload, schema12, context, timeout2 = 60000) {
258229
+ async function callTool(appId, tool, payload, schema13, context, timeout2 = 60000) {
257572
258230
  const client = getSandboxClient(appId);
257573
258231
  let response;
257574
258232
  try {
@@ -257576,7 +258234,7 @@ async function callTool(appId, tool, payload, schema12, context, timeout2 = 6000
257576
258234
  } catch (error48) {
257577
258235
  throw withSandboxAuthHint(await ApiError.fromHttpError(error48, context));
257578
258236
  }
257579
- const result = schema12.safeParse(await response.json());
258237
+ const result = schema13.safeParse(await response.json());
257580
258238
  if (!result.success) {
257581
258239
  throw new SchemaValidationError("Invalid response from server", result.error);
257582
258240
  }
@@ -257585,7 +258243,7 @@ async function callTool(appId, tool, payload, schema12, context, timeout2 = 6000
257585
258243
  function listDirectory(appId, params) {
257586
258244
  return callTool(appId, "list_directory", { ...params }, ListDirectoryResponseSchema, "listing directory");
257587
258245
  }
257588
- function readFile2(appId, params) {
258246
+ function readFile5(appId, params) {
257589
258247
  return callTool(appId, "read_file", { ...params }, ReadFileResponseSchema, "reading file");
257590
258248
  }
257591
258249
  function writeFile2(appId, params) {
@@ -257715,7 +258373,7 @@ async function readFileAction({ runTask: runTask2 }, paths, options) {
257715
258373
  const { id: appId } = getAppContext();
257716
258374
  const offset = parsePositiveInt(options.offset, "--offset");
257717
258375
  const limit = parsePositiveInt(options.limit, "--limit");
257718
- const result = await runTask2("Reading file", () => readFile2(appId, { paths, offset, limit }));
258376
+ const result = await runTask2("Reading file", () => readFile5(appId, { paths, offset, limit }));
257719
258377
  return { outroMessage: "Read file", stdout: toJsonStdout(result) };
257720
258378
  }
257721
258379
  function getSandboxReadFileCommand() {
@@ -257799,7 +258457,7 @@ function getSecretsListCommand() {
257799
258457
  }
257800
258458
 
257801
258459
  // src/cli/commands/secrets/set.ts
257802
- import { resolve as resolve10 } from "node:path";
258460
+ import { resolve as resolve13 } from "node:path";
257803
258461
  function parseEntries(entries) {
257804
258462
  const secrets = {};
257805
258463
  for (const entry of entries) {
@@ -257830,7 +258488,7 @@ async function setSecretsAction({ log, runTask: runTask2 }, entries, options) {
257830
258488
  validateInput(entries, options);
257831
258489
  let secrets;
257832
258490
  if (options.envFile) {
257833
- secrets = await parseEnvFile(resolve10(options.envFile));
258491
+ secrets = await parseEnvFile(resolve13(options.envFile));
257834
258492
  if (Object.keys(secrets).length === 0) {
257835
258493
  throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
257836
258494
  }
@@ -257859,7 +258517,7 @@ function getSecretsCommand() {
257859
258517
  }
257860
258518
 
257861
258519
  // src/cli/commands/site/deploy.ts
257862
- import { resolve as resolve11 } from "node:path";
258520
+ import { resolve as resolve14 } from "node:path";
257863
258521
  async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
257864
258522
  if (isNonInteractive && !options.yes) {
257865
258523
  throw new InvalidInputError("--yes is required in non-interactive mode");
@@ -257874,7 +258532,7 @@ async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
257874
258532
  ]
257875
258533
  });
257876
258534
  }
257877
- const outputDir = resolve11(project2.root, project2.site.outputDirectory);
258535
+ const outputDir = resolve14(project2.root, project2.site.outputDirectory);
257878
258536
  if (!options.yes) {
257879
258537
  const shouldDeploy = await Re({
257880
258538
  message: `Deploy site from ${project2.site.outputDirectory}?`
@@ -257970,9 +258628,9 @@ async function generateContent(input) {
257970
258628
  `);
257971
258629
  }
257972
258630
  async function compileEntity(entity2) {
257973
- const { name: name2, source: _source, ...schema12 } = entity2;
258631
+ const { name: name2, source: _source, ...schema13 } = entity2;
257974
258632
  const jsonSchema = {
257975
- ...schema12,
258633
+ ...schema13,
257976
258634
  title: name2,
257977
258635
  additionalProperties: false
257978
258636
  };
@@ -257999,10 +258657,10 @@ function toPascalCase(name2) {
257999
258657
  return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
258000
258658
  }
258001
258659
  // src/core/types/update-project.ts
258002
- import { join as join26 } from "node:path";
258660
+ import { join as join28 } from "node:path";
258003
258661
  var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
258004
258662
  async function updateProjectConfig(projectRoot) {
258005
- const tsconfigPath = join26(projectRoot, "tsconfig.json");
258663
+ const tsconfigPath = join28(projectRoot, "tsconfig.json");
258006
258664
  if (!await pathExists(tsconfigPath)) {
258007
258665
  return false;
258008
258666
  }
@@ -258237,7 +258895,7 @@ function createDevLogger(label2, labelColor = theme.styles.dim) {
258237
258895
  // src/cli/dev/dev-server/main.ts
258238
258896
  var import_cors = __toESM(require_lib4(), 1);
258239
258897
  var import_express6 = __toESM(require_express(), 1);
258240
- import { dirname as dirname23, join as join31 } from "node:path";
258898
+ import { dirname as dirname24, join as join35 } from "node:path";
258241
258899
 
258242
258900
  // ../../node_modules/get-port/index.js
258243
258901
  import net from "node:net";
@@ -258264,14 +258922,14 @@ var getLocalHosts = () => {
258264
258922
  }
258265
258923
  return results;
258266
258924
  };
258267
- var checkAvailablePort = (options8) => new Promise((resolve13, reject) => {
258925
+ var checkAvailablePort = (options8) => new Promise((resolve16, reject) => {
258268
258926
  const server = net.createServer();
258269
258927
  server.unref();
258270
258928
  server.on("error", reject);
258271
258929
  server.listen(options8, () => {
258272
258930
  const { port } = server.address();
258273
258931
  server.close(() => {
258274
- resolve13(port);
258932
+ resolve16(port);
258275
258933
  });
258276
258934
  });
258277
258935
  });
@@ -258372,7 +259030,7 @@ var $setGracefulCleanup = tmp.setGracefulCleanup;
258372
259030
 
258373
259031
  // src/cli/dev/dev-server/function-manager.ts
258374
259032
  import { spawn as spawn2 } from "node:child_process";
258375
- import { dirname as dirname20, join as join27 } from "node:path";
259033
+ import { dirname as dirname21, join as join29 } from "node:path";
258376
259034
  import { pathToFileURL } from "node:url";
258377
259035
 
258378
259036
  // src/cli/dev/dev-server/base-function-manager.ts
@@ -258477,7 +259135,7 @@ class FunctionManager extends BaseFunctionManager {
258477
259135
  }
258478
259136
  spawnFunction(func, port) {
258479
259137
  this.logger.log(`Spawning function "${func.name}" on port ${port}`);
258480
- const importMapPath = join27(dirname20(this.wrapperPath), "import-map.json");
259138
+ const importMapPath = join29(dirname21(this.wrapperPath), "import-map.json");
258481
259139
  const process23 = spawn2("deno", ["run", "--allow-all", "--import-map", importMapPath, this.wrapperPath], {
258482
259140
  env: {
258483
259141
  ...globalThis.process.env,
@@ -258516,7 +259174,7 @@ class FunctionManager extends BaseFunctionManager {
258516
259174
  });
258517
259175
  }
258518
259176
  waitForReady(name2, runningFunc) {
258519
- return new Promise((resolve13, reject) => {
259177
+ return new Promise((resolve16, reject) => {
258520
259178
  runningFunc.process.on("exit", (code2) => {
258521
259179
  if (!runningFunc.ready) {
258522
259180
  clearTimeout(timeout3);
@@ -258539,7 +259197,7 @@ class FunctionManager extends BaseFunctionManager {
258539
259197
  runningFunc.ready = true;
258540
259198
  clearTimeout(timeout3);
258541
259199
  runningFunc.process.stdout?.off("data", onData);
258542
- resolve13(runningFunc.port);
259200
+ resolve16(runningFunc.port);
258543
259201
  }
258544
259202
  };
258545
259203
  runningFunc.process.stdout?.on("data", onData);
@@ -258551,7 +259209,7 @@ class FunctionManager extends BaseFunctionManager {
258551
259209
  import { mkdirSync as mkdirSync2, writeFileSync as writeFileSync2 } from "node:fs";
258552
259210
  import { isBuiltin } from "node:module";
258553
259211
  import { homedir as homedir3 } from "node:os";
258554
- import { join as join28 } from "node:path";
259212
+ import { join as join30 } from "node:path";
258555
259213
  import { pathToFileURL as pathToFileURL6 } from "node:url";
258556
259214
  var depsPromise;
258557
259215
  function loadDeps() {
@@ -258672,9 +259330,9 @@ export default {
258672
259330
  };
258673
259331
  `;
258674
259332
  function ensureBundlerConfig() {
258675
- const dir = join28(homedir3(), ".base44", "function-bundler");
259333
+ const dir = join30(homedir3(), ".base44", "function-bundler");
258676
259334
  mkdirSync2(dir, { recursive: true });
258677
- const configPath = join28(dir, "deno.json");
259335
+ const configPath = join30(dir, "deno.json");
258678
259336
  writeFileSync2(configPath, `${JSON.stringify({ nodeModulesDir: "auto" }, null, 2)}
258679
259337
  `);
258680
259338
  return configPath;
@@ -259262,22 +259920,22 @@ class Database {
259262
259920
  this.schemas.clear();
259263
259921
  }
259264
259922
  validate(entityName, record2, partial2 = false) {
259265
- const schema12 = this.schemas.get(this.normalizeName(entityName));
259266
- if (!schema12) {
259923
+ const schema13 = this.schemas.get(this.normalizeName(entityName));
259924
+ if (!schema13) {
259267
259925
  throw new Error(`Entity "${entityName}" not found`);
259268
259926
  }
259269
- return this.validator.validate(record2, schema12, partial2);
259927
+ return this.validator.validate(record2, schema13, partial2);
259270
259928
  }
259271
259929
  prepareRecord(entityName, record2, partial2 = false) {
259272
- const schema12 = this.schemas.get(this.normalizeName(entityName));
259273
- if (!schema12) {
259930
+ const schema13 = this.schemas.get(this.normalizeName(entityName));
259931
+ if (!schema13) {
259274
259932
  throw new Error(`Entity "${entityName}" not found`);
259275
259933
  }
259276
- const filteredRecord = this.validator.filterFields(record2, schema12);
259934
+ const filteredRecord = this.validator.filterFields(record2, schema13);
259277
259935
  if (partial2) {
259278
259936
  return filteredRecord;
259279
259937
  }
259280
- return this.validator.applyDefaults(filteredRecord, schema12);
259938
+ return this.validator.applyDefaults(filteredRecord, schema13);
259281
259939
  }
259282
259940
  normalizeName(entityName) {
259283
259941
  return entityName.toLowerCase();
@@ -259571,13 +260229,13 @@ function checkRLS(rule, record2, user) {
259571
260229
  return false;
259572
260230
  return evaluateCondition(rule, record2, user);
259573
260231
  }
259574
- function applyFLS(record2, schema12, user, operation) {
260232
+ function applyFLS(record2, schema13, user, operation) {
259575
260233
  if (Array.isArray(record2)) {
259576
- return record2.map((r5) => applyFLS(r5, schema12, user, operation));
260234
+ return record2.map((r5) => applyFLS(r5, schema13, user, operation));
259577
260235
  }
259578
260236
  const result = {};
259579
260237
  for (const [key2, value] of Object.entries(record2)) {
259580
- const rule = schema12.properties[key2]?.rls?.[operation];
260238
+ const rule = schema13.properties[key2]?.rls?.[operation];
259581
260239
  if (rule === undefined || checkRLS(rule, record2, user)) {
259582
260240
  result[key2] = value;
259583
260241
  }
@@ -259805,14 +260463,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259805
260463
  res.status(404).json({ error: `Entity "${entityName}" not found` });
259806
260464
  return;
259807
260465
  }
259808
- const schema12 = db2.getSchema(entityName);
259809
- if (!schema12) {
260466
+ const schema13 = db2.getSchema(entityName);
260467
+ if (!schema13) {
259810
260468
  res.status(404).json({ error: `Schema for "${entityName}" not found` });
259811
260469
  return;
259812
260470
  }
259813
260471
  const currentUserResult = await resolveCurrentUser(db2, req);
259814
260472
  const currentUser = currentUserResult.ok ? currentUserResult.user : undefined;
259815
- await handler(req, res, collection, schema12, currentUser);
260473
+ await handler(req, res, collection, schema13, currentUser);
259816
260474
  };
259817
260475
  }
259818
260476
  function emit(appId, entityName, type, data) {
@@ -259830,19 +260488,19 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259830
260488
  }
259831
260489
  broadcast(appId, entityName, createData(data));
259832
260490
  }
259833
- function prepareCreateRecord(entityName, body, schema12, currentUser, now) {
260491
+ function prepareCreateRecord(entityName, body, schema13, currentUser, now) {
259834
260492
  const { _id, ...recordBody } = body;
259835
260493
  const ownerFields = {
259836
260494
  created_by: currentUser?.email,
259837
260495
  created_by_id: currentUser?.id
259838
260496
  };
259839
- if (!checkRLS(schema12.rls?.create, {
260497
+ if (!checkRLS(schema13.rls?.create, {
259840
260498
  ...recordBody,
259841
260499
  ...ownerFields
259842
260500
  }, currentUser)) {
259843
260501
  return;
259844
260502
  }
259845
- const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema12, currentUser, "write");
260503
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema13, currentUser, "write");
259846
260504
  db2.validate(entityName, filteredBody);
259847
260505
  return {
259848
260506
  ...filteredBody,
@@ -259854,7 +260512,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259854
260512
  }
259855
260513
  const userRouter = createUserRouter(db2, logger2);
259856
260514
  router.use("/User", userRouter);
259857
- router.get("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
260515
+ router.get("/:entityName/:id", withCollection(async (req, res, collection, schema13, currentUser) => {
259858
260516
  const { entityName, id: id2 } = req.params;
259859
260517
  try {
259860
260518
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -259862,27 +260520,27 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259862
260520
  res.status(404).json({ error: `Record with id "${id2}" not found` });
259863
260521
  return;
259864
260522
  }
259865
- if (!checkRLS(schema12.rls?.read, doc2, currentUser)) {
260523
+ if (!checkRLS(schema13.rls?.read, doc2, currentUser)) {
259866
260524
  res.status(404).json({
259867
260525
  message: `Entity ${entityName} with ID ${id2} not found`
259868
260526
  });
259869
260527
  return;
259870
260528
  }
259871
- const result = applyFLS(stripInternalFields(doc2), schema12, currentUser, "read");
260529
+ const result = applyFLS(stripInternalFields(doc2), schema13, currentUser, "read");
259872
260530
  res.json(result);
259873
260531
  } catch (error48) {
259874
260532
  logger2.error(`Error in GET /${entityName}/${id2}:`, error48);
259875
260533
  res.status(500).json({ error: "Internal server error" });
259876
260534
  }
259877
260535
  }));
259878
- router.get("/:entityName", withCollection(async (req, res, collection, schema12, currentUser) => {
260536
+ router.get("/:entityName", withCollection(async (req, res, collection, schema13, currentUser) => {
259879
260537
  const { entityName } = req.params;
259880
260538
  try {
259881
260539
  let results = stripInternalFields(await queryEntity(collection, req.query));
259882
- if (schema12.rls?.read !== undefined && schema12.rls.read !== true) {
259883
- results = results.filter((doc2) => checkRLS(schema12.rls.read, doc2, currentUser));
260540
+ if (schema13.rls?.read !== undefined && schema13.rls.read !== true) {
260541
+ results = results.filter((doc2) => checkRLS(schema13.rls.read, doc2, currentUser));
259884
260542
  }
259885
- results = results.map((doc2) => applyFLS(doc2, schema12, currentUser, "read"));
260543
+ results = results.map((doc2) => applyFLS(doc2, schema13, currentUser, "read"));
259886
260544
  res.json(results);
259887
260545
  } catch (error48) {
259888
260546
  if (error48 instanceof InvalidInputError) {
@@ -259893,16 +260551,16 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259893
260551
  }
259894
260552
  }
259895
260553
  }));
259896
- router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260554
+ router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
259897
260555
  const { appId, entityName } = req.params;
259898
260556
  try {
259899
260557
  const now = new Date().toISOString();
259900
- const record2 = prepareCreateRecord(entityName, req.body, schema12, currentUser, now);
260558
+ const record2 = prepareCreateRecord(entityName, req.body, schema13, currentUser, now);
259901
260559
  if (!record2) {
259902
260560
  res.status(403).json({ error: "Permission denied" });
259903
260561
  return;
259904
260562
  }
259905
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema12, currentUser, "read");
260563
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema13, currentUser, "read");
259906
260564
  emit(appId, entityName, "create", inserted);
259907
260565
  res.status(201).json(inserted);
259908
260566
  } catch (error48) {
@@ -259914,7 +260572,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259914
260572
  res.status(500).json({ error: "Internal server error" });
259915
260573
  }
259916
260574
  }));
259917
- router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260575
+ router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
259918
260576
  const { appId, entityName } = req.params;
259919
260577
  if (!Array.isArray(req.body)) {
259920
260578
  res.status(400).json({ error: "Request body must be an array" });
@@ -259924,14 +260582,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259924
260582
  const now = new Date().toISOString();
259925
260583
  const records = [];
259926
260584
  for (const body of req.body) {
259927
- const record2 = prepareCreateRecord(entityName, body, schema12, currentUser, now);
260585
+ const record2 = prepareCreateRecord(entityName, body, schema13, currentUser, now);
259928
260586
  if (!record2) {
259929
260587
  res.status(403).json({ error: "Permission denied" });
259930
260588
  return;
259931
260589
  }
259932
260590
  records.push(record2);
259933
260591
  }
259934
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema12, currentUser, "read");
260592
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema13, currentUser, "read");
259935
260593
  emit(appId, entityName, "create", inserted);
259936
260594
  res.status(201).json(inserted);
259937
260595
  } catch (error48) {
@@ -259943,24 +260601,24 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259943
260601
  res.status(500).json({ error: "Internal server error" });
259944
260602
  }
259945
260603
  }));
259946
- router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260604
+ router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
259947
260605
  const { appId, entityName, id: id2 } = req.params;
259948
260606
  const { id: _id, created_date: _created_date, ...body } = req.body;
259949
260607
  try {
259950
- if (schema12.rls?.update !== undefined) {
260608
+ if (schema13.rls?.update !== undefined) {
259951
260609
  const existing = await collection.findOneAsync({ id: id2 });
259952
260610
  if (!existing) {
259953
260611
  res.status(404).json({ error: `Record with id "${id2}" not found` });
259954
260612
  return;
259955
260613
  }
259956
- if (!checkRLS(schema12.rls.update, existing, currentUser)) {
260614
+ if (!checkRLS(schema13.rls.update, existing, currentUser)) {
259957
260615
  res.status(404).json({
259958
260616
  message: `Entity ${entityName} with ID ${id2} not found`
259959
260617
  });
259960
260618
  return;
259961
260619
  }
259962
260620
  }
259963
- const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema12, currentUser, "write");
260621
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema13, currentUser, "write");
259964
260622
  db2.validate(entityName, filteredBody, true);
259965
260623
  const updateData = {
259966
260624
  ...filteredBody,
@@ -259971,7 +260629,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259971
260629
  res.status(404).json({ error: `Record with id "${id2}" not found` });
259972
260630
  return;
259973
260631
  }
259974
- const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema12, currentUser, "read");
260632
+ const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema13, currentUser, "read");
259975
260633
  emit(appId, entityName, "update", updated);
259976
260634
  res.json(updated);
259977
260635
  } catch (error48) {
@@ -259983,7 +260641,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259983
260641
  res.status(500).json({ error: "Internal server error" });
259984
260642
  }
259985
260643
  }));
259986
- router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
260644
+ router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema13, currentUser) => {
259987
260645
  const { appId, entityName, id: id2 } = req.params;
259988
260646
  try {
259989
260647
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -259991,7 +260649,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
259991
260649
  res.status(404).json({ error: `Record with id "${id2}" not found` });
259992
260650
  return;
259993
260651
  }
259994
- if (!checkRLS(schema12.rls?.delete, doc2, currentUser)) {
260652
+ if (!checkRLS(schema13.rls?.delete, doc2, currentUser)) {
259995
260653
  res.status(404).json({
259996
260654
  message: `Entity ${entityName} with ID ${id2} not found`
259997
260655
  });
@@ -260005,11 +260663,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260005
260663
  res.status(500).json({ error: "Internal server error" });
260006
260664
  }
260007
260665
  }));
260008
- router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260666
+ router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
260009
260667
  const { entityName } = req.params;
260010
260668
  try {
260011
260669
  const query = req.body || {};
260012
- const rlsDelete = schema12?.rls?.delete;
260670
+ const rlsDelete = schema13?.rls?.delete;
260013
260671
  if (rlsDelete !== undefined && rlsDelete !== true) {
260014
260672
  if (rlsDelete === false && currentUser?.is_service !== true) {
260015
260673
  res.status(403).json({ error: "Permission denied" });
@@ -260036,11 +260694,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260036
260694
  // src/cli/dev/dev-server/routes/integrations.ts
260037
260695
  var import_express5 = __toESM(require_express(), 1);
260038
260696
  var import_multer = __toESM(require_multer(), 1);
260039
- import { createHash, randomUUID as randomUUID4 } from "node:crypto";
260697
+ import { createHash as createHash2, randomUUID as randomUUID4 } from "node:crypto";
260040
260698
  import fs28 from "node:fs";
260041
260699
  import path18 from "node:path";
260042
260700
  function createFileToken(fileUri) {
260043
- return createHash("sha256").update(fileUri).digest("hex");
260701
+ return createHash2("sha256").update(fileUri).digest("hex");
260044
260702
  }
260045
260703
  function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger2) {
260046
260704
  const router = import_express5.Router({ mergeParams: true });
@@ -260063,12 +260721,12 @@ function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger2) {
260063
260721
  cb2(null, `${randomUUID4()}${ext}`);
260064
260722
  }
260065
260723
  });
260066
- const upload = import_multer.default({ storage, limits: { fileSize: MAX_FILE_SIZE } });
260724
+ const upload2 = import_multer.default({ storage, limits: { fileSize: MAX_FILE_SIZE } });
260067
260725
  const privateUpload = import_multer.default({
260068
260726
  storage: privateStorage,
260069
260727
  limits: { fileSize: MAX_FILE_SIZE }
260070
260728
  });
260071
- router.post("/Core/UploadFile", upload.single("file"), (req, res) => {
260729
+ router.post("/Core/UploadFile", upload2.single("file"), (req, res) => {
260072
260730
  if (!req.file) {
260073
260731
  res.status(400).json({ error: "No file uploaded" });
260074
260732
  return;
@@ -260125,16 +260783,16 @@ function createCustomIntegrationRoutes(remoteProxy, logger2) {
260125
260783
 
260126
260784
  // src/cli/dev/dev-server/watcher.ts
260127
260785
  import { EventEmitter as EventEmitter4 } from "node:events";
260128
- import { relative as relative6 } from "node:path";
260786
+ import { relative as relative7 } from "node:path";
260129
260787
 
260130
260788
  // ../../node_modules/chokidar/index.js
260131
260789
  import { EventEmitter as EventEmitter3 } from "node:events";
260132
260790
  import { stat as statcb, Stats } from "node:fs";
260133
- import { readdir as readdir3, stat as stat4 } from "node:fs/promises";
260791
+ import { readdir as readdir4, stat as stat6 } from "node:fs/promises";
260134
260792
  import * as sp3 from "node:path";
260135
260793
 
260136
260794
  // ../../node_modules/readdirp/index.js
260137
- import { lstat as lstat2, readdir as readdir2, realpath, stat as stat2 } from "node:fs/promises";
260795
+ import { lstat as lstat2, readdir as readdir3, realpath, stat as stat4 } from "node:fs/promises";
260138
260796
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
260139
260797
  import { Readable as Readable6 } from "node:stream";
260140
260798
  var EntryTypes = {
@@ -260216,7 +260874,7 @@ class ReaddirpStream extends Readable6 {
260216
260874
  const { root: root2, type } = opts;
260217
260875
  this._fileFilter = normalizeFilter(opts.fileFilter);
260218
260876
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
260219
- const statMethod = opts.lstat ? lstat2 : stat2;
260877
+ const statMethod = opts.lstat ? lstat2 : stat4;
260220
260878
  if (wantBigintFsStats) {
260221
260879
  this._stat = (path19) => statMethod(path19, { bigint: true });
260222
260880
  } else {
@@ -260287,7 +260945,7 @@ class ReaddirpStream extends Readable6 {
260287
260945
  async _exploreDir(path19, depth) {
260288
260946
  let files;
260289
260947
  try {
260290
- files = await readdir2(path19, this._rdOptions);
260948
+ files = await readdir3(path19, this._rdOptions);
260291
260949
  } catch (error48) {
260292
260950
  this._onError(error48);
260293
260951
  }
@@ -260369,7 +261027,7 @@ function readdirp(root2, options8 = {}) {
260369
261027
 
260370
261028
  // ../../node_modules/chokidar/handler.js
260371
261029
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
260372
- import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat3 } from "node:fs/promises";
261030
+ import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat5 } from "node:fs/promises";
260373
261031
  import { type as osType } from "node:os";
260374
261032
  import * as sp2 from "node:path";
260375
261033
  var STR_DATA = "data";
@@ -260395,7 +261053,7 @@ var EVENTS = {
260395
261053
  };
260396
261054
  var EV = EVENTS;
260397
261055
  var THROTTLE_MODE_WATCH = "watch";
260398
- var statMethods = { lstat: lstat3, stat: stat3 };
261056
+ var statMethods = { lstat: lstat3, stat: stat5 };
260399
261057
  var KEY_LISTENERS = "listeners";
260400
261058
  var KEY_ERR = "errHandlers";
260401
261059
  var KEY_RAW = "rawEmitters";
@@ -260855,9 +261513,9 @@ class NodeFsHandler {
260855
261513
  if (this.fsw.closed) {
260856
261514
  return;
260857
261515
  }
260858
- const dirname22 = sp2.dirname(file2);
261516
+ const dirname23 = sp2.dirname(file2);
260859
261517
  const basename7 = sp2.basename(file2);
260860
- const parent = this.fsw._getWatchedDir(dirname22);
261518
+ const parent = this.fsw._getWatchedDir(dirname23);
260861
261519
  let prevStats = stats;
260862
261520
  if (parent.has(basename7))
260863
261521
  return;
@@ -260866,7 +261524,7 @@ class NodeFsHandler {
260866
261524
  return;
260867
261525
  if (!newStats || newStats.mtimeMs === 0) {
260868
261526
  try {
260869
- const newStats2 = await stat3(file2);
261527
+ const newStats2 = await stat5(file2);
260870
261528
  if (this.fsw.closed)
260871
261529
  return;
260872
261530
  const at13 = newStats2.atimeMs;
@@ -260884,7 +261542,7 @@ class NodeFsHandler {
260884
261542
  prevStats = newStats2;
260885
261543
  }
260886
261544
  } catch (error48) {
260887
- this.fsw._remove(dirname22, basename7);
261545
+ this.fsw._remove(dirname23, basename7);
260888
261546
  }
260889
261547
  } else if (parent.has(basename7)) {
260890
261548
  const at13 = newStats.atimeMs;
@@ -260973,7 +261631,7 @@ class NodeFsHandler {
260973
261631
  this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
260974
261632
  }
260975
261633
  }).on(EV.ERROR, this._boundHandleError);
260976
- return new Promise((resolve14, reject) => {
261634
+ return new Promise((resolve17, reject) => {
260977
261635
  if (!stream)
260978
261636
  return reject();
260979
261637
  stream.once(STR_END, () => {
@@ -260982,7 +261640,7 @@ class NodeFsHandler {
260982
261640
  return;
260983
261641
  }
260984
261642
  const wasThrottled = throttler ? throttler.clear() : false;
260985
- resolve14(undefined);
261643
+ resolve17(undefined);
260986
261644
  previous.getChildren().filter((item) => {
260987
261645
  return item !== directory && !current.has(item);
260988
261646
  }).forEach((item) => {
@@ -261107,11 +261765,11 @@ function createPattern(matcher) {
261107
261765
  if (matcher.path === string4)
261108
261766
  return true;
261109
261767
  if (matcher.recursive) {
261110
- const relative6 = sp3.relative(matcher.path, string4);
261111
- if (!relative6) {
261768
+ const relative7 = sp3.relative(matcher.path, string4);
261769
+ if (!relative7) {
261112
261770
  return false;
261113
261771
  }
261114
- return !relative6.startsWith("..") && !sp3.isAbsolute(relative6);
261772
+ return !relative7.startsWith("..") && !sp3.isAbsolute(relative7);
261115
261773
  }
261116
261774
  return false;
261117
261775
  };
@@ -261214,7 +261872,7 @@ class DirEntry {
261214
261872
  return;
261215
261873
  const dir = this.path;
261216
261874
  try {
261217
- await readdir3(dir);
261875
+ await readdir4(dir);
261218
261876
  } catch (err) {
261219
261877
  if (this._removeWatcher) {
261220
261878
  this._removeWatcher(sp3.dirname(dir), sp3.basename(dir));
@@ -261538,7 +262196,7 @@ class FSWatcher extends EventEmitter3 {
261538
262196
  const fullPath = opts.cwd ? sp3.join(opts.cwd, path19) : path19;
261539
262197
  let stats2;
261540
262198
  try {
261541
- stats2 = await stat4(fullPath);
262199
+ stats2 = await stat6(fullPath);
261542
262200
  } catch (err) {}
261543
262201
  if (!stats2 || this.closed)
261544
262202
  return;
@@ -261642,8 +262300,8 @@ class FSWatcher extends EventEmitter3 {
261642
262300
  }
261643
262301
  return this._userIgnored(path19, stats);
261644
262302
  }
261645
- _isntIgnored(path19, stat5) {
261646
- return !this._isIgnored(path19, stat5);
262303
+ _isntIgnored(path19, stat7) {
262304
+ return !this._isIgnored(path19, stat7);
261647
262305
  }
261648
262306
  _getWatchHelpers(path19) {
261649
262307
  return new WatchHelper(path19, this.options.followSymlinks, this);
@@ -261810,7 +262468,7 @@ class WatchBase44 extends EventEmitter4 {
261810
262468
  ignoreInitial: true
261811
262469
  });
261812
262470
  watcher.on("all", import_debounce.default(async (_event, path19) => {
261813
- this.emit("change", name2, relative6(targetPath, path19));
262471
+ this.emit("change", name2, relative7(targetPath, path19));
261814
262472
  }, WATCH_DEBOUNCE_MS));
261815
262473
  watcher.on("error", (err) => {
261816
262474
  this.logger.error(`Watch handler failed for ${targetPath}`, err);
@@ -261899,7 +262557,7 @@ async function createDevServer(options8) {
261899
262557
  }
261900
262558
  remoteProxy(req, res, next);
261901
262559
  });
261902
- const server = await new Promise((resolve15, reject) => {
262560
+ const server = await new Promise((resolve18, reject) => {
261903
262561
  const s5 = app.listen(port, "127.0.0.1", (err) => {
261904
262562
  if (err) {
261905
262563
  if ("code" in err && err.code === "EADDRINUSE") {
@@ -261908,7 +262566,7 @@ async function createDevServer(options8) {
261908
262566
  reject(err);
261909
262567
  }
261910
262568
  } else {
261911
- resolve15(s5);
262569
+ resolve18(s5);
261912
262570
  }
261913
262571
  });
261914
262572
  });
@@ -261917,8 +262575,8 @@ async function createDevServer(options8) {
261917
262575
  broadcastEntityEvent(io6, appId, entityName, event);
261918
262576
  };
261919
262577
  const base44ConfigWatcher = new WatchBase44({
261920
- functions: join31(dirname23(project2.configPath), project2.functionsDir),
261921
- entities: join31(dirname23(project2.configPath), project2.entitiesDir)
262578
+ functions: join35(dirname24(project2.configPath), project2.functionsDir),
262579
+ entities: join35(dirname24(project2.configPath), project2.entitiesDir)
261922
262580
  }, devLogger);
261923
262581
  base44ConfigWatcher.on("change", async (name2) => {
261924
262582
  try {
@@ -261958,13 +262616,13 @@ async function createDevServer(options8) {
261958
262616
  if (!server.listening) {
261959
262617
  return;
261960
262618
  }
261961
- await new Promise((resolve15, reject) => {
262619
+ await new Promise((resolve18, reject) => {
261962
262620
  server.close((error48) => {
261963
262621
  if (error48) {
261964
262622
  reject(error48);
261965
262623
  return;
261966
262624
  }
261967
- resolve15();
262625
+ resolve18();
261968
262626
  });
261969
262627
  });
261970
262628
  };
@@ -262035,15 +262693,15 @@ class ServeRunner {
262035
262693
  return;
262036
262694
  }
262037
262695
  this.stopping = true;
262038
- const exited = new Promise((resolve15) => child.once("exit", () => resolve15()));
262696
+ const exited = new Promise((resolve18) => child.once("exit", () => resolve18()));
262039
262697
  if (process23.platform === "win32" && child.pid) {
262040
262698
  const taskkill = spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
262041
262699
  stdio: "ignore",
262042
262700
  windowsHide: true
262043
262701
  });
262044
- await new Promise((resolve15) => {
262045
- taskkill.once("exit", () => resolve15());
262046
- taskkill.once("error", () => resolve15());
262702
+ await new Promise((resolve18) => {
262703
+ taskkill.once("exit", () => resolve18());
262704
+ taskkill.once("error", () => resolve18());
262047
262705
  });
262048
262706
  } else if (child.pid) {
262049
262707
  try {
@@ -262213,13 +262871,13 @@ async function runScript(options8) {
262213
262871
  }
262214
262872
  // src/cli/commands/exec.ts
262215
262873
  function readStdin2() {
262216
- return new Promise((resolve15, reject) => {
262874
+ return new Promise((resolve18, reject) => {
262217
262875
  let data = "";
262218
262876
  process.stdin.setEncoding("utf-8");
262219
262877
  process.stdin.on("data", (chunk) => {
262220
262878
  data += chunk;
262221
262879
  });
262222
- process.stdin.on("end", () => resolve15(data));
262880
+ process.stdin.on("end", () => resolve18(data));
262223
262881
  process.stdin.on("error", reject);
262224
262882
  });
262225
262883
  }
@@ -262290,7 +262948,7 @@ Examples:
262290
262948
  }
262291
262949
 
262292
262950
  // src/cli/commands/project/eject.ts
262293
- import { resolve as resolve15 } from "node:path";
262951
+ import { resolve as resolve18 } from "node:path";
262294
262952
  var import_kebabCase2 = __toESM(require_kebabCase(), 1);
262295
262953
  async function eject(ctx, options8, command2) {
262296
262954
  const { log, runTask: runTask2, isNonInteractive } = ctx;
@@ -262354,7 +263012,7 @@ async function eject(ctx, options8, command2) {
262354
263012
  Ne("Operation cancelled.");
262355
263013
  throw new CLIExitError(0);
262356
263014
  }
262357
- const resolvedPath = resolve15(selectedPath);
263015
+ const resolvedPath = resolve18(selectedPath);
262358
263016
  await runTask2("Downloading your project's code...", async (updateMessage) => {
262359
263017
  await createProjectFilesForExistingProject({
262360
263018
  projectId,
@@ -262442,7 +263100,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
262442
263100
  import { release, type } from "node:os";
262443
263101
 
262444
263102
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
262445
- import { dirname as dirname24, posix, sep } from "path";
263103
+ import { dirname as dirname25, posix, sep as sep2 } from "path";
262446
263104
  function createModulerModifier() {
262447
263105
  const getModuleFromFileName = createGetModuleFromFilename();
262448
263106
  return async (frames) => {
@@ -262451,7 +263109,7 @@ function createModulerModifier() {
262451
263109
  return frames;
262452
263110
  };
262453
263111
  }
262454
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname24(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
263112
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname25(process.argv[1]) : process.cwd(), isWindows5 = sep2 === "\\") {
262455
263113
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
262456
263114
  return (filename) => {
262457
263115
  if (!filename)
@@ -264729,14 +265387,14 @@ async function addSourceContext(frames) {
264729
265387
  return frames;
264730
265388
  }
264731
265389
  function getContextLinesFromFile(path19, ranges, output) {
264732
- return new Promise((resolve16) => {
265390
+ return new Promise((resolve19) => {
264733
265391
  const stream = createReadStream2(path19);
264734
265392
  const lineReaded = createInterface2({
264735
265393
  input: stream
264736
265394
  });
264737
265395
  function destroyStreamAndResolve() {
264738
265396
  stream.destroy();
264739
- resolve16();
265397
+ resolve19();
264740
265398
  }
264741
265399
  let lineNumber = 0;
264742
265400
  let currentRangeIndex = 0;
@@ -265848,15 +266506,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
265848
266506
  return true;
265849
266507
  if (this.featureFlagsPoller === undefined)
265850
266508
  return false;
265851
- return new Promise((resolve16) => {
266509
+ return new Promise((resolve19) => {
265852
266510
  const timeout3 = setTimeout(() => {
265853
266511
  cleanup();
265854
- resolve16(false);
266512
+ resolve19(false);
265855
266513
  }, timeoutMs);
265856
266514
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
265857
266515
  clearTimeout(timeout3);
265858
266516
  cleanup();
265859
- resolve16(count2 > 0);
266517
+ resolve19(count2 > 0);
265860
266518
  });
265861
266519
  });
265862
266520
  }
@@ -266640,9 +267298,9 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
266640
267298
  });
266641
267299
  }
266642
267300
  // src/cli/index.ts
266643
- var __dirname4 = dirname25(fileURLToPath6(import.meta.url));
267301
+ var __dirname4 = dirname26(fileURLToPath6(import.meta.url));
266644
267302
  async function runCLI(options8) {
266645
- ensureNpmAssets(join33(__dirname4, "../assets"));
267303
+ ensureNpmAssets(join36(__dirname4, "../assets"));
266646
267304
  const errorReporter = new ErrorReporter;
266647
267305
  errorReporter.registerProcessErrorHandlers();
266648
267306
  const jsonMode = process.argv.includes("--json");
@@ -266681,4 +267339,4 @@ export {
266681
267339
  CLIExitError
266682
267340
  };
266683
267341
 
266684
- //# debugId=14B1FDDCC926290964756E2164756E21
267342
+ //# debugId=F8606390894E3DA564756E2164756E21