@base44-preview/cli 0.1.7-pr.585.083d2ac → 0.1.7-pr.586.03862c7

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" ? join26(replacement, currentDoc.split(`
31179
+ return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join24(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 join26(separator, docs) {
31259
+ function join24(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: join26,
31970
+ join: join24,
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 schema13 = new SchemaConstructor(parameters);
119582
- const subSchema = Object.create(schema13);
119581
+ const schema12 = new SchemaConstructor(parameters);
119582
+ const subSchema = Object.create(schema12);
119583
119583
  for (const handlerKey of HANDLER_KEYS) {
119584
119584
  if (handlerKey in parameters) {
119585
- subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema13, Schema2.prototype[handlerKey].length);
119585
+ subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema12, 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, sep2, end, banNewLines = false) {
120388
+ function skipUntil(str, ptr, sep, 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, sep2, end, banNewLines = false) {
120394
120394
  let c24 = str[i5];
120395
120395
  if (c24 === "#") {
120396
120396
  i5 = indexOfNewline(str, i5);
120397
- } else if (c24 === sep2) {
120397
+ } else if (c24 === sep) {
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 readFile6(file2) {
120899
+ async function readFile3(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 extname2(url3) {
121177
+ function extname(url3) {
121178
121178
  const pathname = url3.pathname;
121179
121179
  let index = pathname.length;
121180
121180
  while (index--) {
@@ -121189,7 +121189,7 @@ function extname2(url3) {
121189
121189
  return "";
121190
121190
  }
121191
121191
  function getFileProtocolModuleFormat(url3, _context, ignoreErrors) {
121192
- const value = extname2(url3);
121192
+ const value = extname(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 stat22 = tryStatSync(packageJsonPath.slice(0, -13));
121654
- if (!stat22 || !stat22.isDirectory()) {
121653
+ const stat2 = tryStatSync(packageJsonPath.slice(0, -13));
121654
+ if (!stat2 || !stat2.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, schema13, utils3) => optionInfo.exception(value) || schema13.validate(value, utils3);
122925
+ parameters.validate = (value, schema12, utils3) => optionInfo.exception(value) || schema12.validate(value, utils3);
122926
122926
  } else {
122927
- parameters.validate = (value, schema13, utils3) => value === undefined || schema13.validate(value, utils3);
122927
+ parameters.validate = (value, schema12, utils3) => value === undefined || schema12.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, schema13, utils3) => schema13.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default2(0, value, -1) : value), utils3);
122942
+ parameters.preprocess = (value, schema12, utils3) => schema12.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(modules2) {
123907
+ function createParsersAndPrinters(modules) {
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 modules2) {
123914
+ } of modules) {
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 schema13 = this._utils.schemas[key2];
124519
+ const schema12 = this._utils.schemas[key2];
124520
124520
  if (!(key2 in newOptions)) {
124521
- const defaultResult = normalizeDefaultResult(schema13.default(this._utils));
124521
+ const defaultResult = normalizeDefaultResult(schema12.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 schema13 = this._utils.schemas[key2];
124532
+ const schema12 = this._utils.schemas[key2];
124533
124533
  const value = newOptions[key2];
124534
- const newValue = schema13.postprocess(value, this._utils);
124534
+ const newValue = schema12.postprocess(value, this._utils);
124535
124535
  if (newValue === VALUE_UNCHANGED) {
124536
124536
  continue;
124537
124537
  }
124538
- this._applyValidation(newValue, key2, schema13);
124538
+ this._applyValidation(newValue, key2, schema12);
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 schema13 = this._utils.schemas[key2];
124550
- const value = schema13.preprocess(options8[key2], this._utils);
124551
- this._applyValidation(value, key2, schema13);
124549
+ const schema12 = this._utils.schemas[key2];
124550
+ const value = schema12.preprocess(options8[key2], this._utils);
124551
+ this._applyValidation(value, key2, schema12);
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(schema13.deprecated(currentValue, this._utils), value, true);
124556
+ const deprecatedResult = normalizeDeprecatedResult(schema12.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(schema13.forward(value, this._utils), value);
124574
+ const forwardResult = normalizeForwardResult(schema12.forward(value, this._utils), value);
124575
124575
  forwardResult.forEach(appendTransferredOptions);
124576
- const redirectResult = normalizeRedirectResult(schema13.redirect(value, this._utils), value);
124576
+ const redirectResult = normalizeRedirectResult(schema12.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 ? schema13.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue;
124580
+ newOptions[key2] = key2 in newOptions ? schema12.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, schema13) {
124609
- const validateResult = normalizeValidateResult(schema13.validate(value, this._utils), value);
124608
+ _applyValidation(value, key2, schema12) {
124609
+ const validateResult = normalizeValidateResult(schema12.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 schema13 = this._utils.schemas[knownResultKey];
124652
- this._applyValidation(knownResultValue, knownResultKey, schema13);
124651
+ const schema12 = this._utils.schemas[knownResultKey];
124652
+ this._applyValidation(knownResultValue, knownResultKey, schema12);
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, stat22) => {
128296
+ settings.fs.stat(path152, (statError, stat2) => {
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
- stat22.isSymbolicLink = () => true;
128306
+ stat2.isSymbolicLink = () => true;
128307
128307
  }
128308
- callSuccessCallback(callback, stat22);
128308
+ callSuccessCallback(callback, stat2);
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 stat22 = settings.fs.statSync(path152);
128331
+ const stat2 = settings.fs.statSync(path152);
128332
128332
  if (settings.markSymbolicLink) {
128333
- stat22.isSymbolicLink = () => true;
128333
+ stat2.isSymbolicLink = () => true;
128334
128334
  }
128335
- return stat22;
128335
+ return stat2;
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 stat22(path152, optionsOrSettingsOrCallback, callback) {
128393
+ function stat2(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 = stat22;
128400
+ exports.stat = stat2;
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
- readdir3(directory, settings, callback);
128547
+ readdir2(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 readdir3(directory, settings, callback) {
128596
+ function readdir2(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 = readdir3;
128631
+ exports.readdir = readdir2;
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 readdir3(directory, settings);
128652
+ return readdir2(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 readdir3(directory, settings) {
128677
+ function readdir2(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 = readdir3;
128693
+ exports.readdir = readdir2;
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 = readFile6;
134693
+ read_file_default = readFile3;
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" ? join28(replacement, currentDoc.split(`
136884
+ return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join26(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 join28(separator, docs) {
136970
+ function join26(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: join28,
137635
+ join: join26,
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(resolve16) {
138291
- resolve16(value);
138290
+ return value instanceof P9 ? value : new P9(function(resolve13) {
138291
+ resolve13(value);
138292
138292
  });
138293
138293
  }
138294
- return new (P9 || (P9 = Promise))(function(resolve16, reject) {
138294
+ return new (P9 || (P9 = Promise))(function(resolve13, 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 ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
138310
+ result.done ? resolve13(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)((schema13) => {
138366
- const parent = schema13[exports.Parent];
138365
+ exports.getRootSchema = (0, lodash_1.memoize)((schema12) => {
138366
+ const parent = schema12[exports.Parent];
138367
138367
  if (!parent) {
138368
- return schema13;
138368
+ return schema12;
138369
138369
  }
138370
138370
  return (0, exports.getRootSchema)(parent);
138371
138371
  });
138372
- function isBoolean(schema13) {
138373
- return schema13 === true || schema13 === false;
138372
+ function isBoolean(schema12) {
138373
+ return schema12 === true || schema12 === false;
138374
138374
  }
138375
138375
  exports.isBoolean = isBoolean;
138376
- function isPrimitive(schema13) {
138377
- return !(0, lodash_1.isPlainObject)(schema13);
138376
+ function isPrimitive(schema12) {
138377
+ return !(0, lodash_1.isPlainObject)(schema12);
138378
138378
  }
138379
138379
  exports.isPrimitive = isPrimitive;
138380
- function isCompound(schema13) {
138381
- return Array.isArray(schema13.type) || "anyOf" in schema13 || "oneOf" in schema13;
138380
+ function isCompound(schema12) {
138381
+ return Array.isArray(schema12.type) || "anyOf" in schema12 || "oneOf" in schema12;
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(schema13, name2) {
138608
+ function compileList(schema12, name2) {
138609
138609
  var result = [];
138610
- schema13[name2].forEach(function(currentType) {
138610
+ schema12[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(schema13, map2) {
140555
+ function compileStyleMap(schema12, 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 = schema13.compiledTypeMap["fallback"][tag];
140567
+ type = schema12.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(schema13, callback, processed) {
141227
- if (typeof schema13 !== "object" || !schema13) {
141226
+ function traverseIntersection(schema12, callback, processed) {
141227
+ if (typeof schema12 !== "object" || !schema12) {
141228
141228
  return;
141229
141229
  }
141230
- const r5 = schema13;
141230
+ const r5 = schema12;
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(schema13, callback, processed = new Set, key2) {
141240
- if (processed.has(schema13)) {
141239
+ function traverse(schema12, callback, processed = new Set, key2) {
141240
+ if (processed.has(schema12)) {
141241
141241
  return;
141242
141242
  }
141243
- processed.add(schema13);
141244
- callback(schema13, key2 !== null && key2 !== undefined ? key2 : null);
141245
- if (schema13.anyOf) {
141246
- traverseArray(schema13.anyOf, callback, processed);
141243
+ processed.add(schema12);
141244
+ callback(schema12, key2 !== null && key2 !== undefined ? key2 : null);
141245
+ if (schema12.anyOf) {
141246
+ traverseArray(schema12.anyOf, callback, processed);
141247
141247
  }
141248
- if (schema13.allOf) {
141249
- traverseArray(schema13.allOf, callback, processed);
141248
+ if (schema12.allOf) {
141249
+ traverseArray(schema12.allOf, callback, processed);
141250
141250
  }
141251
- if (schema13.oneOf) {
141252
- traverseArray(schema13.oneOf, callback, processed);
141251
+ if (schema12.oneOf) {
141252
+ traverseArray(schema12.oneOf, callback, processed);
141253
141253
  }
141254
- if (schema13.properties) {
141255
- traverseObjectKeys(schema13.properties, callback, processed);
141254
+ if (schema12.properties) {
141255
+ traverseObjectKeys(schema12.properties, callback, processed);
141256
141256
  }
141257
- if (schema13.patternProperties) {
141258
- traverseObjectKeys(schema13.patternProperties, callback, processed);
141257
+ if (schema12.patternProperties) {
141258
+ traverseObjectKeys(schema12.patternProperties, callback, processed);
141259
141259
  }
141260
- if (schema13.additionalProperties && typeof schema13.additionalProperties === "object") {
141261
- traverse(schema13.additionalProperties, callback, processed);
141260
+ if (schema12.additionalProperties && typeof schema12.additionalProperties === "object") {
141261
+ traverse(schema12.additionalProperties, callback, processed);
141262
141262
  }
141263
- if (schema13.items) {
141264
- const { items } = schema13;
141263
+ if (schema12.items) {
141264
+ const { items } = schema12;
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 (schema13.additionalItems && typeof schema13.additionalItems === "object") {
141272
- traverse(schema13.additionalItems, callback, processed);
141271
+ if (schema12.additionalItems && typeof schema12.additionalItems === "object") {
141272
+ traverse(schema12.additionalItems, callback, processed);
141273
141273
  }
141274
- if (schema13.dependencies) {
141275
- if (Array.isArray(schema13.dependencies)) {
141276
- traverseArray(schema13.dependencies, callback, processed);
141274
+ if (schema12.dependencies) {
141275
+ if (Array.isArray(schema12.dependencies)) {
141276
+ traverseArray(schema12.dependencies, callback, processed);
141277
141277
  } else {
141278
- traverseObjectKeys(schema13.dependencies, callback, processed);
141278
+ traverseObjectKeys(schema12.dependencies, callback, processed);
141279
141279
  }
141280
141280
  }
141281
- if (schema13.definitions) {
141282
- traverseObjectKeys(schema13.definitions, callback, processed);
141281
+ if (schema12.definitions) {
141282
+ traverseObjectKeys(schema12.definitions, callback, processed);
141283
141283
  }
141284
- if (schema13.$defs) {
141285
- traverseObjectKeys(schema13.$defs, callback, processed);
141284
+ if (schema12.$defs) {
141285
+ traverseObjectKeys(schema12.$defs, callback, processed);
141286
141286
  }
141287
- if (schema13.not) {
141288
- traverse(schema13.not, callback, processed);
141287
+ if (schema12.not) {
141288
+ traverse(schema12.not, callback, processed);
141289
141289
  }
141290
- traverseIntersection(schema13, callback, processed);
141291
- Object.keys(schema13).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141292
- const child = schema13[key3];
141290
+ traverseIntersection(schema12, callback, processed);
141291
+ Object.keys(schema12).filter((key3) => !BLACKLISTED_KEYS.has(key3)).forEach((key3) => {
141292
+ const child = schema12[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(schema13) {
141374
+ function escapeBlockComment(schema12) {
141375
141375
  const replacer = "* /";
141376
- if (schema13 === null || typeof schema13 !== "object") {
141376
+ if (schema12 === null || typeof schema12 !== "object") {
141377
141377
  return;
141378
141378
  }
141379
- for (const key2 of Object.keys(schema13)) {
141380
- if (key2 === "description" && typeof schema13[key2] === "string") {
141381
- schema13[key2] = schema13[key2].replace(/\*\//g, replacer);
141379
+ for (const key2 of Object.keys(schema12)) {
141380
+ if (key2 === "description" && typeof schema12[key2] === "string") {
141381
+ schema12[key2] = schema12[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(schema13) {
141394
- if (!("default" in schema13)) {
141395
- return schema13;
141393
+ function maybeStripDefault(schema12) {
141394
+ if (!("default" in schema12)) {
141395
+ return schema12;
141396
141396
  }
141397
- switch (schema13.type) {
141397
+ switch (schema12.type) {
141398
141398
  case "array":
141399
- if (Array.isArray(schema13.default)) {
141400
- return schema13;
141399
+ if (Array.isArray(schema12.default)) {
141400
+ return schema12;
141401
141401
  }
141402
141402
  break;
141403
141403
  case "boolean":
141404
- if (typeof schema13.default === "boolean") {
141405
- return schema13;
141404
+ if (typeof schema12.default === "boolean") {
141405
+ return schema12;
141406
141406
  }
141407
141407
  break;
141408
141408
  case "integer":
141409
141409
  case "number":
141410
- if (typeof schema13.default === "number") {
141411
- return schema13;
141410
+ if (typeof schema12.default === "number") {
141411
+ return schema12;
141412
141412
  }
141413
141413
  break;
141414
141414
  case "string":
141415
- if (typeof schema13.default === "string") {
141416
- return schema13;
141415
+ if (typeof schema12.default === "string") {
141416
+ return schema12;
141417
141417
  }
141418
141418
  break;
141419
141419
  case "null":
141420
- if (schema13.default === null) {
141421
- return schema13;
141420
+ if (schema12.default === null) {
141421
+ return schema12;
141422
141422
  }
141423
141423
  break;
141424
141424
  case "object":
141425
- if ((0, lodash_1.isPlainObject)(schema13.default)) {
141426
- return schema13;
141425
+ if ((0, lodash_1.isPlainObject)(schema12.default)) {
141426
+ return schema12;
141427
141427
  }
141428
141428
  break;
141429
141429
  }
141430
- delete schema13.default;
141431
- return schema13;
141430
+ delete schema12.default;
141431
+ return schema12;
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(schema13) {
141446
- if (!(0, lodash_1.isPlainObject)(schema13)) {
141445
+ function isSchemaLike(schema12) {
141446
+ if (!(0, lodash_1.isPlainObject)(schema12)) {
141447
141447
  return false;
141448
141448
  }
141449
- const parent = schema13[JSONSchema_1.Parent];
141449
+ const parent = schema12[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] === schema13)) {
141466
+ if (JSON_SCHEMA_KEYWORDS.some((_10) => parent[_10] === schema12)) {
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(schema13) {
141765
- if (schema13.tsType) {
141764
+ function typesOfSchema(schema12) {
141765
+ if (schema12.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(schema13)) {
141770
+ if (f7(schema12)) {
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(schema13) {
141782
- return "allOf" in schema13;
141781
+ ALL_OF(schema12) {
141782
+ return "allOf" in schema12;
141783
141783
  },
141784
- ANY(schema13) {
141785
- if (Object.keys(schema13).length === 0) {
141784
+ ANY(schema12) {
141785
+ if (Object.keys(schema12).length === 0) {
141786
141786
  return true;
141787
141787
  }
141788
- return schema13.type === "any";
141788
+ return schema12.type === "any";
141789
141789
  },
141790
- ANY_OF(schema13) {
141791
- return "anyOf" in schema13;
141790
+ ANY_OF(schema12) {
141791
+ return "anyOf" in schema12;
141792
141792
  },
141793
- BOOLEAN(schema13) {
141794
- if ("enum" in schema13) {
141793
+ BOOLEAN(schema12) {
141794
+ if ("enum" in schema12) {
141795
141795
  return false;
141796
141796
  }
141797
- if (schema13.type === "boolean") {
141797
+ if (schema12.type === "boolean") {
141798
141798
  return true;
141799
141799
  }
141800
- if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "boolean") {
141800
+ if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.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(schema13) {
141809
- return "enum" in schema13 && "tsEnumNames" in schema13;
141808
+ NAMED_ENUM(schema12) {
141809
+ return "enum" in schema12 && "tsEnumNames" in schema12;
141810
141810
  },
141811
- NAMED_SCHEMA(schema13) {
141812
- return "$id" in schema13 && (("patternProperties" in schema13) || ("properties" in schema13));
141811
+ NAMED_SCHEMA(schema12) {
141812
+ return "$id" in schema12 && (("patternProperties" in schema12) || ("properties" in schema12));
141813
141813
  },
141814
- NEVER(schema13) {
141815
- return schema13 === false;
141814
+ NEVER(schema12) {
141815
+ return schema12 === false;
141816
141816
  },
141817
- NULL(schema13) {
141818
- return schema13.type === "null";
141817
+ NULL(schema12) {
141818
+ return schema12.type === "null";
141819
141819
  },
141820
- NUMBER(schema13) {
141821
- if ("enum" in schema13) {
141820
+ NUMBER(schema12) {
141821
+ if ("enum" in schema12) {
141822
141822
  return false;
141823
141823
  }
141824
- if (schema13.type === "integer" || schema13.type === "number") {
141824
+ if (schema12.type === "integer" || schema12.type === "number") {
141825
141825
  return true;
141826
141826
  }
141827
- if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "number") {
141827
+ if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "number") {
141828
141828
  return true;
141829
141829
  }
141830
141830
  return false;
141831
141831
  },
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;
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;
141834
141834
  },
141835
- ONE_OF(schema13) {
141836
- return "oneOf" in schema13;
141835
+ ONE_OF(schema12) {
141836
+ return "oneOf" in schema12;
141837
141837
  },
141838
- REFERENCE(schema13) {
141839
- return "$ref" in schema13;
141838
+ REFERENCE(schema12) {
141839
+ return "$ref" in schema12;
141840
141840
  },
141841
- STRING(schema13) {
141842
- if ("enum" in schema13) {
141841
+ STRING(schema12) {
141842
+ if ("enum" in schema12) {
141843
141843
  return false;
141844
141844
  }
141845
- if (schema13.type === "string") {
141845
+ if (schema12.type === "string") {
141846
141846
  return true;
141847
141847
  }
141848
- if (!(0, JSONSchema_1.isCompound)(schema13) && typeof schema13.default === "string") {
141848
+ if (!(0, JSONSchema_1.isCompound)(schema12) && typeof schema12.default === "string") {
141849
141849
  return true;
141850
141850
  }
141851
141851
  return false;
141852
141852
  },
141853
- TYPED_ARRAY(schema13) {
141854
- if (schema13.type && schema13.type !== "array") {
141853
+ TYPED_ARRAY(schema12) {
141854
+ if (schema12.type && schema12.type !== "array") {
141855
141855
  return false;
141856
141856
  }
141857
- return "items" in schema13;
141857
+ return "items" in schema12;
141858
141858
  },
141859
- UNION(schema13) {
141860
- return Array.isArray(schema13.type);
141859
+ UNION(schema12) {
141860
+ return Array.isArray(schema12.type);
141861
141861
  },
141862
- UNNAMED_ENUM(schema13) {
141863
- if ("tsEnumNames" in schema13) {
141862
+ UNNAMED_ENUM(schema12) {
141863
+ if ("tsEnumNames" in schema12) {
141864
141864
  return false;
141865
141865
  }
141866
- if (schema13.type && schema13.type !== "boolean" && schema13.type !== "integer" && schema13.type !== "number" && schema13.type !== "string") {
141866
+ if (schema12.type && schema12.type !== "boolean" && schema12.type !== "integer" && schema12.type !== "number" && schema12.type !== "string") {
141867
141867
  return false;
141868
141868
  }
141869
- return "enum" in schema13;
141869
+ return "enum" in schema12;
141870
141870
  },
141871
141871
  UNNAMED_SCHEMA() {
141872
141872
  return false;
141873
141873
  },
141874
- UNTYPED_ARRAY(schema13) {
141875
- return schema13.type === "array" && !("items" in schema13);
141874
+ UNTYPED_ARRAY(schema12) {
141875
+ return schema12.type === "array" && !("items" in schema12);
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(schema13) {
141886
+ function applySchemaTyping(schema12) {
141887
141887
  var _a7;
141888
- const types = (0, typesOfSchema_1.typesOfSchema)(schema13);
141889
- Object.defineProperty(schema13, JSONSchema_1.Types, {
141888
+ const types = (0, typesOfSchema_1.typesOfSchema)(schema12);
141889
+ Object.defineProperty(schema12, 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]: schema13,
141898
+ [JSONSchema_1.Parent]: schema12,
141899
141899
  [JSONSchema_1.Types]: new Set(["ALL_OF"]),
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 : [],
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 : [],
141905
141905
  required: [],
141906
141906
  additionalProperties: false
141907
141907
  };
141908
141908
  types.delete("ALL_OF");
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, {
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, {
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(schema13, type) {
141933
- return schema13.type === type || Array.isArray(schema13.type) && schema13.type.includes(type);
141932
+ function hasType(schema12, type) {
141933
+ return schema12.type === type || Array.isArray(schema12.type) && schema12.type.includes(type);
141934
141934
  }
141935
- function isObjectType(schema13) {
141936
- return schema13.properties !== undefined || hasType(schema13, "object") || hasType(schema13, "any");
141935
+ function isObjectType(schema12) {
141936
+ return schema12.properties !== undefined || hasType(schema12, "object") || hasType(schema12, "any");
141937
141937
  }
141938
- function isArrayType(schema13) {
141939
- return schema13.items !== undefined || hasType(schema13, "array") || hasType(schema13, "any");
141938
+ function isArrayType(schema12) {
141939
+ return schema12.items !== undefined || hasType(schema12, "array") || hasType(schema12, "any");
141940
141940
  }
141941
- function isEnumTypeWithoutTsEnumNames(schema13) {
141942
- return schema13.type === "string" && schema13.enum !== undefined && schema13.tsEnumNames === undefined;
141941
+ function isEnumTypeWithoutTsEnumNames(schema12) {
141942
+ return schema12.type === "string" && schema12.enum !== undefined && schema12.tsEnumNames === undefined;
141943
141943
  }
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");
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");
141947
141947
  }
141948
141948
  });
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];
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];
141952
141952
  }
141953
141953
  });
141954
- rules.set("Add empty `required` property if none is defined", (schema13) => {
141955
- if (isObjectType(schema13) && !("required" in schema13)) {
141956
- schema13.required = [];
141954
+ rules.set("Add empty `required` property if none is defined", (schema12) => {
141955
+ if (isObjectType(schema12) && !("required" in schema12)) {
141956
+ schema12.required = [];
141957
141957
  }
141958
141958
  });
141959
- rules.set("Transform `required`=false to `required`=[]", (schema13) => {
141960
- if (schema13.required === false) {
141961
- schema13.required = [];
141959
+ rules.set("Transform `required`=false to `required`=[]", (schema12) => {
141960
+ if (schema12.required === false) {
141961
+ schema12.required = [];
141962
141962
  }
141963
141963
  });
141964
- rules.set("Default additionalProperties", (schema13, _10, options8) => {
141965
- if (isObjectType(schema13) && !("additionalProperties" in schema13) && schema13.patternProperties === undefined) {
141966
- schema13.additionalProperties = options8.additionalProperties;
141964
+ rules.set("Default additionalProperties", (schema12, _10, options8) => {
141965
+ if (isObjectType(schema12) && !("additionalProperties" in schema12) && schema12.patternProperties === undefined) {
141966
+ schema12.additionalProperties = options8.additionalProperties;
141967
141967
  }
141968
141968
  });
141969
- rules.set("Transform id to $id", (schema13, fileName) => {
141970
- if (!(0, utils_1.isSchemaLike)(schema13)) {
141969
+ rules.set("Transform id to $id", (schema12, fileName) => {
141970
+ if (!(0, utils_1.isSchemaLike)(schema12)) {
141971
141971
  return;
141972
141972
  }
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}`);
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}`);
141975
141975
  }
141976
- if (schema13.id) {
141977
- schema13.$id = schema13.id;
141978
- delete schema13.id;
141976
+ if (schema12.id) {
141977
+ schema12.$id = schema12.id;
141978
+ delete schema12.id;
141979
141979
  }
141980
141980
  });
141981
- rules.set("Add an $id to anything that needs it", (schema13, fileName, _options, _key, dereferencedPaths) => {
141982
- if (!(0, utils_1.isSchemaLike)(schema13)) {
141981
+ rules.set("Add an $id to anything that needs it", (schema12, fileName, _options, _key, dereferencedPaths) => {
141982
+ if (!(0, utils_1.isSchemaLike)(schema12)) {
141983
141983
  return;
141984
141984
  }
141985
- if (!schema13.$id && !schema13[JSONSchema_1.Parent]) {
141986
- schema13.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141985
+ if (!schema12.$id && !schema12[JSONSchema_1.Parent]) {
141986
+ schema12.$id = (0, utils_1.toSafeString)((0, utils_1.justName)(fileName));
141987
141987
  return;
141988
141988
  }
141989
- if (!isArrayType(schema13) && !isObjectType(schema13)) {
141989
+ if (!isArrayType(schema12) && !isObjectType(schema12)) {
141990
141990
  return;
141991
141991
  }
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));
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));
141995
141995
  }
141996
141996
  if (dereferencedName) {
141997
- dereferencedPaths.delete(schema13);
141997
+ dereferencedPaths.delete(schema12);
141998
141998
  }
141999
141999
  });
142000
- rules.set("Escape closing JSDoc comment", (schema13) => {
142001
- (0, utils_1.escapeBlockComment)(schema13);
142000
+ rules.set("Escape closing JSDoc comment", (schema12) => {
142001
+ (0, utils_1.escapeBlockComment)(schema12);
142002
142002
  });
142003
- rules.set("Add JSDoc comments for minItems and maxItems", (schema13) => {
142004
- if (!isArrayType(schema13)) {
142003
+ rules.set("Add JSDoc comments for minItems and maxItems", (schema12) => {
142004
+ if (!isArrayType(schema12)) {
142005
142005
  return;
142006
142006
  }
142007
142007
  const commentsToAppend = [
142008
- "minItems" in schema13 ? `@minItems ${schema13.minItems}` : "",
142009
- "maxItems" in schema13 ? `@maxItems ${schema13.maxItems}` : ""
142008
+ "minItems" in schema12 ? `@minItems ${schema12.minItems}` : "",
142009
+ "maxItems" in schema12 ? `@maxItems ${schema12.maxItems}` : ""
142010
142010
  ].filter(Boolean);
142011
142011
  if (commentsToAppend.length) {
142012
- schema13.description = (0, utils_1.appendToDescription)(schema13.description, ...commentsToAppend);
142012
+ schema12.description = (0, utils_1.appendToDescription)(schema12.description, ...commentsToAppend);
142013
142013
  }
142014
142014
  });
142015
- rules.set("Optionally remove maxItems and minItems", (schema13, _fileName, options8) => {
142016
- if (!isArrayType(schema13)) {
142015
+ rules.set("Optionally remove maxItems and minItems", (schema12, _fileName, options8) => {
142016
+ if (!isArrayType(schema12)) {
142017
142017
  return;
142018
142018
  }
142019
- if ("minItems" in schema13 && options8.ignoreMinAndMaxItems) {
142020
- delete schema13.minItems;
142019
+ if ("minItems" in schema12 && options8.ignoreMinAndMaxItems) {
142020
+ delete schema12.minItems;
142021
142021
  }
142022
- if ("maxItems" in schema13 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142023
- delete schema13.maxItems;
142022
+ if ("maxItems" in schema12 && (options8.ignoreMinAndMaxItems || options8.maxItems === -1)) {
142023
+ delete schema12.maxItems;
142024
142024
  }
142025
142025
  });
142026
- rules.set("Normalize schema.minItems", (schema13, _fileName, options8) => {
142026
+ rules.set("Normalize schema.minItems", (schema12, _fileName, options8) => {
142027
142027
  if (options8.ignoreMinAndMaxItems) {
142028
142028
  return;
142029
142029
  }
142030
- if (!isArrayType(schema13)) {
142030
+ if (!isArrayType(schema12)) {
142031
142031
  return;
142032
142032
  }
142033
- const { minItems } = schema13;
142034
- schema13.minItems = typeof minItems === "number" ? minItems : 0;
142033
+ const { minItems } = schema12;
142034
+ schema12.minItems = typeof minItems === "number" ? minItems : 0;
142035
142035
  });
142036
- rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema13, _fileName, options8) => {
142036
+ rules.set("Remove maxItems if it is big enough to likely cause OOMs", (schema12, _fileName, options8) => {
142037
142037
  if (options8.ignoreMinAndMaxItems || options8.maxItems === -1) {
142038
142038
  return;
142039
142039
  }
142040
- if (!isArrayType(schema13)) {
142040
+ if (!isArrayType(schema12)) {
142041
142041
  return;
142042
142042
  }
142043
- const { maxItems, minItems } = schema13;
142043
+ const { maxItems, minItems } = schema12;
142044
142044
  if (maxItems !== undefined && maxItems - minItems > options8.maxItems) {
142045
- delete schema13.maxItems;
142045
+ delete schema12.maxItems;
142046
142046
  }
142047
142047
  });
142048
- rules.set("Normalize schema.items", (schema13, _fileName, options8) => {
142048
+ rules.set("Normalize schema.items", (schema12, _fileName, options8) => {
142049
142049
  if (options8.ignoreMinAndMaxItems) {
142050
142050
  return;
142051
142051
  }
142052
- const { maxItems, minItems } = schema13;
142052
+ const { maxItems, minItems } = schema12;
142053
142053
  const hasMaxItems = typeof maxItems === "number" && maxItems >= 0;
142054
142054
  const hasMinItems = typeof minItems === "number" && minItems > 0;
142055
- if (schema13.items && !Array.isArray(schema13.items) && (hasMaxItems || hasMinItems)) {
142056
- const items = schema13.items;
142055
+ if (schema12.items && !Array.isArray(schema12.items) && (hasMaxItems || hasMinItems)) {
142056
+ const items = schema12.items;
142057
142057
  const newItems = Array(maxItems || minItems || 0).fill(items);
142058
142058
  if (!hasMaxItems) {
142059
- schema13.additionalItems = items;
142059
+ schema12.additionalItems = items;
142060
142060
  }
142061
- schema13.items = newItems;
142061
+ schema12.items = newItems;
142062
142062
  }
142063
- if (Array.isArray(schema13.items) && hasMaxItems && maxItems < schema13.items.length) {
142064
- schema13.items = schema13.items.slice(0, maxItems);
142063
+ if (Array.isArray(schema12.items) && hasMaxItems && maxItems < schema12.items.length) {
142064
+ schema12.items = schema12.items.slice(0, maxItems);
142065
142065
  }
142066
- return schema13;
142066
+ return schema12;
142067
142067
  });
142068
- rules.set("Remove extends, if it is empty", (schema13) => {
142069
- if (!schema13.hasOwnProperty("extends")) {
142068
+ rules.set("Remove extends, if it is empty", (schema12) => {
142069
+ if (!schema12.hasOwnProperty("extends")) {
142070
142070
  return;
142071
142071
  }
142072
- if (schema13.extends == null || Array.isArray(schema13.extends) && schema13.extends.length === 0) {
142073
- delete schema13.extends;
142072
+ if (schema12.extends == null || Array.isArray(schema12.extends) && schema12.extends.length === 0) {
142073
+ delete schema12.extends;
142074
142074
  }
142075
142075
  });
142076
- rules.set("Make extends always an array, if it is defined", (schema13) => {
142077
- if (schema13.extends == null) {
142076
+ rules.set("Make extends always an array, if it is defined", (schema12) => {
142077
+ if (schema12.extends == null) {
142078
142078
  return;
142079
142079
  }
142080
- if (!Array.isArray(schema13.extends)) {
142081
- schema13.extends = [schema13.extends];
142080
+ if (!Array.isArray(schema12.extends)) {
142081
+ schema12.extends = [schema12.extends];
142082
142082
  }
142083
142083
  });
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}`);
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}`);
142087
142087
  }
142088
- if (schema13.definitions) {
142089
- schema13.$defs = schema13.definitions;
142090
- delete schema13.definitions;
142088
+ if (schema12.definitions) {
142089
+ schema12.$defs = schema12.definitions;
142090
+ delete schema12.definitions;
142091
142091
  }
142092
142092
  });
142093
- rules.set("Transform const to singleton enum", (schema13) => {
142094
- if (schema13.const !== undefined) {
142095
- schema13.enum = [schema13.const];
142096
- delete schema13.const;
142093
+ rules.set("Transform const to singleton enum", (schema12) => {
142094
+ if (schema12.const !== undefined) {
142095
+ schema12.enum = [schema12.const];
142096
+ delete schema12.const;
142097
142097
  }
142098
142098
  });
142099
- rules.set("Add tsEnumNames to enum types", (schema13, _10, options8) => {
142099
+ rules.set("Add tsEnumNames to enum types", (schema12, _10, options8) => {
142100
142100
  var _a7;
142101
- if (isEnumTypeWithoutTsEnumNames(schema13) && options8.inferStringEnumKeysFromValues) {
142102
- schema13.tsEnumNames = (_a7 = schema13.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142101
+ if (isEnumTypeWithoutTsEnumNames(schema12) && options8.inferStringEnumKeysFromValues) {
142102
+ schema12.tsEnumNames = (_a7 = schema12.enum) === null || _a7 === undefined ? undefined : _a7.map(String);
142103
142103
  }
142104
142104
  });
142105
- rules.set("Pre-calculate schema types and intersections", (schema13) => {
142106
- if (schema13 !== null && typeof schema13 === "object") {
142107
- (0, applySchemaTyping_1.applySchemaTyping)(schema13);
142105
+ rules.set("Pre-calculate schema types and intersections", (schema12) => {
142106
+ if (schema12 !== null && typeof schema12 === "object") {
142107
+ (0, applySchemaTyping_1.applySchemaTyping)(schema12);
142108
142108
  }
142109
142109
  });
142110
142110
  function normalize2(rootSchema, dereferencedPaths, filename, options8) {
142111
- rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema13, key2) => rule(schema13, filename, options8, key2, dereferencedPaths)));
142111
+ rules.forEach((rule) => (0, utils_1.traverse)(rootSchema, (schema12, key2) => rule(schema12, 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(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);
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);
142197
142197
  }
142198
- return parseLiteral(schema13, keyName);
142198
+ return parseLiteral(schema12, keyName);
142199
142199
  }
142200
- const intersection2 = schema13[JSONSchema_1.Intersection];
142201
- const types = schema13[JSONSchema_1.Types];
142200
+ const intersection2 = schema12[JSONSchema_1.Intersection];
142201
+ const types = schema12[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(schema13, type, options8, keyName, processed, usedNames));
142205
+ ast.params.push(parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames));
142206
142206
  });
142207
- (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema13, "Output:", ast);
142207
+ (0, utils_1.log)("blue", "parser", "Types:", [...types], "Input:", schema12, "Output:", ast);
142208
142208
  return ast;
142209
142209
  }
142210
142210
  if (types.size === 1) {
142211
142211
  const type = [...types][0];
142212
- const ast = parseAsTypeWithCache(schema13, type, options8, keyName, processed, usedNames);
142213
- (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema13, "Output:", ast);
142212
+ const ast = parseAsTypeWithCache(schema12, type, options8, keyName, processed, usedNames);
142213
+ (0, utils_1.log)("blue", "parser", "Type:", type, "Input:", schema12, "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(schema13, type, options8, keyName, processed = new Map, usedNames = new Set) {
142220
- let cachedTypeMap = processed.get(schema13);
142219
+ function parseAsTypeWithCache(schema12, type, options8, keyName, processed = new Map, usedNames = new Set) {
142220
+ let cachedTypeMap = processed.get(schema12);
142221
142221
  if (!cachedTypeMap) {
142222
142222
  cachedTypeMap = new Map;
142223
- processed.set(schema13, cachedTypeMap);
142223
+ processed.set(schema12, 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(schema13, type, options8, keyName, processed, usedNames));
142231
+ return Object.assign(ast, parseNonLiteral(schema12, type, options8, keyName, processed, usedNames));
142232
142232
  }
142233
- function parseBooleanSchema(schema13, keyName, options8) {
142234
- if (schema13) {
142233
+ function parseBooleanSchema(schema12, keyName, options8) {
142234
+ if (schema12) {
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(schema13, keyName) {
142245
+ function parseLiteral(schema12, keyName) {
142246
142246
  return {
142247
142247
  keyName,
142248
- params: schema13,
142248
+ params: schema12,
142249
142249
  type: "LITERAL"
142250
142250
  };
142251
142251
  }
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);
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);
142255
142255
  switch (type) {
142256
142256
  case "ALL_OF":
142257
142257
  return {
142258
- comment: schema13.description,
142259
- deprecated: schema13.deprecated,
142258
+ comment: schema12.description,
142259
+ deprecated: schema12.deprecated,
142260
142260
  keyName,
142261
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142262
- params: schema13.allOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142261
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142262
+ params: schema12.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: schema13.description, deprecated: schema13.deprecated, keyName, standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8) });
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) });
142267
142267
  case "ANY_OF":
142268
142268
  return {
142269
- comment: schema13.description,
142270
- deprecated: schema13.deprecated,
142269
+ comment: schema12.description,
142270
+ deprecated: schema12.deprecated,
142271
142271
  keyName,
142272
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142273
- params: schema13.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142272
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142273
+ params: schema12.anyOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142274
142274
  type: "UNION"
142275
142275
  };
142276
142276
  case "BOOLEAN":
142277
142277
  return {
142278
- comment: schema13.description,
142279
- deprecated: schema13.deprecated,
142278
+ comment: schema12.description,
142279
+ deprecated: schema12.deprecated,
142280
142280
  keyName,
142281
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142281
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142282
142282
  type: "BOOLEAN"
142283
142283
  };
142284
142284
  case "CUSTOM_TYPE":
142285
142285
  return {
142286
- comment: schema13.description,
142287
- deprecated: schema13.deprecated,
142286
+ comment: schema12.description,
142287
+ deprecated: schema12.deprecated,
142288
142288
  keyName,
142289
- params: schema13.tsType,
142290
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142289
+ params: schema12.tsType,
142290
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142291
142291
  type: "CUSTOM_TYPE"
142292
142292
  };
142293
142293
  case "NAMED_ENUM":
142294
142294
  return {
142295
- comment: schema13.description,
142296
- deprecated: schema13.deprecated,
142295
+ comment: schema12.description,
142296
+ deprecated: schema12.deprecated,
142297
142297
  keyName,
142298
- standaloneName: standaloneName(schema13, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142299
- params: schema13.enum.map((_10, n5) => ({
142298
+ standaloneName: standaloneName(schema12, keyNameFromDefinition !== null && keyNameFromDefinition !== undefined ? keyNameFromDefinition : keyName, usedNames, options8),
142299
+ params: schema12.enum.map((_10, n5) => ({
142300
142300
  ast: parseLiteral(_10, undefined),
142301
- keyName: schema13.tsEnumNames[n5]
142301
+ keyName: schema12.tsEnumNames[n5]
142302
142302
  })),
142303
142303
  type: "ENUM"
142304
142304
  };
142305
142305
  case "NAMED_SCHEMA":
142306
- return newInterface(schema13, options8, processed, usedNames, keyName);
142306
+ return newInterface(schema12, options8, processed, usedNames, keyName);
142307
142307
  case "NEVER":
142308
142308
  return {
142309
- comment: schema13.description,
142310
- deprecated: schema13.deprecated,
142309
+ comment: schema12.description,
142310
+ deprecated: schema12.deprecated,
142311
142311
  keyName,
142312
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142312
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142313
142313
  type: "NEVER"
142314
142314
  };
142315
142315
  case "NULL":
142316
142316
  return {
142317
- comment: schema13.description,
142318
- deprecated: schema13.deprecated,
142317
+ comment: schema12.description,
142318
+ deprecated: schema12.deprecated,
142319
142319
  keyName,
142320
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142320
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142321
142321
  type: "NULL"
142322
142322
  };
142323
142323
  case "NUMBER":
142324
142324
  return {
142325
- comment: schema13.description,
142326
- deprecated: schema13.deprecated,
142325
+ comment: schema12.description,
142326
+ deprecated: schema12.deprecated,
142327
142327
  keyName,
142328
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142328
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142329
142329
  type: "NUMBER"
142330
142330
  };
142331
142331
  case "OBJECT":
142332
142332
  return {
142333
- comment: schema13.description,
142333
+ comment: schema12.description,
142334
142334
  keyName,
142335
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142335
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142336
142336
  type: "OBJECT",
142337
- deprecated: schema13.deprecated
142337
+ deprecated: schema12.deprecated
142338
142338
  };
142339
142339
  case "ONE_OF":
142340
142340
  return {
142341
- comment: schema13.description,
142342
- deprecated: schema13.deprecated,
142341
+ comment: schema12.description,
142342
+ deprecated: schema12.deprecated,
142343
142343
  keyName,
142344
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142345
- params: schema13.oneOf.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142344
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142345
+ params: schema12.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!", schema13));
142349
+ throw Error((0, util_1.format)("Refs should have been resolved by the resolver!", schema12));
142350
142350
  case "STRING":
142351
142351
  return {
142352
- comment: schema13.description,
142353
- deprecated: schema13.deprecated,
142352
+ comment: schema12.description,
142353
+ deprecated: schema12.deprecated,
142354
142354
  keyName,
142355
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142355
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142356
142356
  type: "STRING"
142357
142357
  };
142358
142358
  case "TYPED_ARRAY":
142359
- if (Array.isArray(schema13.items)) {
142360
- const minItems2 = schema13.minItems;
142361
- const maxItems2 = schema13.maxItems;
142359
+ if (Array.isArray(schema12.items)) {
142360
+ const minItems2 = schema12.minItems;
142361
+ const maxItems2 = schema12.maxItems;
142362
142362
  const arrayType = {
142363
- comment: schema13.description,
142364
- deprecated: schema13.deprecated,
142363
+ comment: schema12.description,
142364
+ deprecated: schema12.deprecated,
142365
142365
  keyName,
142366
142366
  maxItems: maxItems2,
142367
142367
  minItems: minItems2,
142368
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142369
- params: schema13.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142368
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142369
+ params: schema12.items.map((_10) => parse11(_10, options8, undefined, processed, usedNames)),
142370
142370
  type: "TUPLE"
142371
142371
  };
142372
- if (schema13.additionalItems === true) {
142372
+ if (schema12.additionalItems === true) {
142373
142373
  arrayType.spreadParam = options8.unknownAny ? AST_1.T_UNKNOWN : AST_1.T_ANY;
142374
- } else if (schema13.additionalItems) {
142375
- arrayType.spreadParam = parse11(schema13.additionalItems, options8, undefined, processed, usedNames);
142374
+ } else if (schema12.additionalItems) {
142375
+ arrayType.spreadParam = parse11(schema12.additionalItems, options8, undefined, processed, usedNames);
142376
142376
  }
142377
142377
  return arrayType;
142378
142378
  } else {
142379
142379
  return {
142380
- comment: schema13.description,
142381
- deprecated: schema13.deprecated,
142380
+ comment: schema12.description,
142381
+ deprecated: schema12.deprecated,
142382
142382
  keyName,
142383
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142384
- params: parse11(schema13.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142383
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142384
+ params: parse11(schema12.items, options8, `{keyNameFromDefinition}Items`, processed, usedNames),
142385
142385
  type: "ARRAY"
142386
142386
  };
142387
142387
  }
142388
142388
  case "UNION":
142389
142389
  return {
142390
- comment: schema13.description,
142391
- deprecated: schema13.deprecated,
142390
+ comment: schema12.description,
142391
+ deprecated: schema12.deprecated,
142392
142392
  keyName,
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 });
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 });
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: schema13.description,
142405
- deprecated: schema13.deprecated,
142404
+ comment: schema12.description,
142405
+ deprecated: schema12.deprecated,
142406
142406
  keyName,
142407
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142408
- params: schema13.enum.map((_10) => parseLiteral(_10, undefined)),
142407
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142408
+ params: schema12.enum.map((_10) => parseLiteral(_10, undefined)),
142409
142409
  type: "UNION"
142410
142410
  };
142411
142411
  case "UNNAMED_SCHEMA":
142412
- return newInterface(schema13, options8, processed, usedNames, keyName, keyNameFromDefinition);
142412
+ return newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition);
142413
142413
  case "UNTYPED_ARRAY":
142414
- const minItems = schema13.minItems;
142415
- const maxItems = typeof schema13.maxItems === "number" ? schema13.maxItems : -1;
142414
+ const minItems = schema12.minItems;
142415
+ const maxItems = typeof schema12.maxItems === "number" ? schema12.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: schema13.description,
142420
- deprecated: schema13.deprecated,
142419
+ comment: schema12.description,
142420
+ deprecated: schema12.deprecated,
142421
142421
  keyName,
142422
- maxItems: schema13.maxItems,
142422
+ maxItems: schema12.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(schema13, keyNameFromDefinition, usedNames, options8),
142426
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142427
142427
  type: "TUPLE"
142428
142428
  };
142429
142429
  }
142430
142430
  return {
142431
- comment: schema13.description,
142432
- deprecated: schema13.deprecated,
142431
+ comment: schema12.description,
142432
+ deprecated: schema12.deprecated,
142433
142433
  keyName,
142434
142434
  params,
142435
- standaloneName: standaloneName(schema13, keyNameFromDefinition, usedNames, options8),
142435
+ standaloneName: standaloneName(schema12, keyNameFromDefinition, usedNames, options8),
142436
142436
  type: "ARRAY"
142437
142437
  };
142438
142438
  }
142439
142439
  }
142440
- function standaloneName(schema13, keyNameFromDefinition, usedNames, options8) {
142440
+ function standaloneName(schema12, keyNameFromDefinition, usedNames, options8) {
142441
142441
  var _a7;
142442
- const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema13, keyNameFromDefinition)) || schema13.title || schema13.$id || keyNameFromDefinition;
142442
+ const name2 = ((_a7 = options8.customName) === null || _a7 === undefined ? undefined : _a7.call(options8, schema12, keyNameFromDefinition)) || schema12.title || schema12.$id || keyNameFromDefinition;
142443
142443
  if (name2) {
142444
142444
  return (0, utils_1.generateName)(name2, usedNames);
142445
142445
  }
142446
142446
  }
142447
- function newInterface(schema13, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142448
- const name2 = standaloneName(schema13, keyNameFromDefinition, usedNames, options8);
142447
+ function newInterface(schema12, options8, processed, usedNames, keyName, keyNameFromDefinition) {
142448
+ const name2 = standaloneName(schema12, keyNameFromDefinition, usedNames, options8);
142449
142449
  return {
142450
- comment: schema13.description,
142451
- deprecated: schema13.deprecated,
142450
+ comment: schema12.description,
142451
+ deprecated: schema12.deprecated,
142452
142452
  keyName,
142453
- params: parseSchema(schema13, options8, processed, usedNames, name2),
142453
+ params: parseSchema(schema12, options8, processed, usedNames, name2),
142454
142454
  standaloneName: name2,
142455
- superTypes: parseSuperTypes(schema13, options8, processed, usedNames),
142455
+ superTypes: parseSuperTypes(schema12, options8, processed, usedNames),
142456
142456
  type: "INTERFACE"
142457
142457
  };
142458
142458
  }
142459
- function parseSuperTypes(schema13, options8, processed, usedNames) {
142460
- const superTypes = schema13.extends;
142459
+ function parseSuperTypes(schema12, options8, processed, usedNames) {
142460
+ const superTypes = schema12.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(schema13, options8, processed, usedNames, parentSchemaName) {
142467
- let asts = (0, lodash_1.map)(schema13.properties, (value, key2) => ({
142466
+ function parseSchema(schema12, options8, processed, usedNames, parentSchemaName) {
142467
+ let asts = (0, lodash_1.map)(schema12.properties, (value, key2) => ({
142468
142468
  ast: parse11(value, options8, key2, processed, usedNames),
142469
142469
  isPatternProperty: false,
142470
- isRequired: (0, lodash_1.includes)(schema13.required || [], key2),
142470
+ isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142471
142471
  isUnreachableDefinition: false,
142472
142472
  keyName: key2
142473
142473
  }));
142474
142474
  let singlePatternProperty = false;
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) => {
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) => {
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)(schema13.required || [], key2),
142487
+ isRequired: singlePatternProperty || (0, lodash_1.includes)(schema12.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)(schema13.$defs, (value, key2) => {
142494
+ asts = asts.concat((0, lodash_1.map)(schema12.$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)(schema13.required || [], key2),
142504
+ isRequired: (0, lodash_1.includes)(schema12.required || [], key2),
142505
142505
  isUnreachableDefinition: true,
142506
142506
  keyName: key2
142507
142507
  };
142508
142508
  }));
142509
142509
  }
142510
- switch (schema13.additionalProperties) {
142510
+ switch (schema12.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(schema13.additionalProperties, options8, "[k: string]", processed, usedNames),
142527
+ ast: parse11(schema12.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(schema13, isSchema = true, processed = new Set) {
142536
- if (processed.has(schema13)) {
142535
+ function getDefinitions(schema12, isSchema = true, processed = new Set) {
142536
+ if (processed.has(schema12)) {
142537
142537
  return {};
142538
142538
  }
142539
- processed.add(schema13);
142540
- if (Array.isArray(schema13)) {
142541
- return schema13.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142539
+ processed.add(schema12);
142540
+ if (Array.isArray(schema12)) {
142541
+ return schema12.reduce((prev, cur) => Object.assign(Object.assign({}, prev), getDefinitions(cur, false, processed)), {});
142542
142542
  }
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)), {}));
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)), {}));
142545
142545
  }
142546
142546
  return {};
142547
142547
  }
142548
142548
  var getDefinitionsMemoized = (0, lodash_1.memoize)(getDefinitions);
142549
- function hasDefinitions(schema13) {
142550
- return "$defs" in schema13;
142549
+ function hasDefinitions(schema12) {
142550
+ return "$defs" in schema12;
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 = resolve16;
142963
+ exports.resolve = resolve13;
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 = relative5;
142975
+ exports.relative = relative4;
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 resolve16(from, to5) {
142991
+ function resolve13(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 relative5(from, to5) {
143125
+ function relative4(from, to5) {
143126
143126
  if (!isFileSystemPath(from) || !isFileSystemPath(to5)) {
143127
- return resolve16(from, to5);
143127
+ return resolve13(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((resolve16, reject) => {
143803
+ return new Promise((resolve13, 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
- resolve16({
143831
+ resolve13({
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 readFile7(file2, options8, $refs);
143928
+ const resolver = await readFile4(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 readFile7(file2, options8, $refs) {
143941
+ async function readFile4(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 schema13;
144374
+ let schema12;
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
- schema13 = args[1];
144384
+ schema12 = args[1];
144385
144385
  options8 = args[2];
144386
144386
  } else {
144387
- schema13 = undefined;
144387
+ schema12 = undefined;
144388
144388
  options8 = args[1];
144389
144389
  }
144390
144390
  } else {
144391
144391
  path18 = "";
144392
- schema13 = args[0];
144392
+ schema12 = 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 schema13 === "object") {
144401
- schema13 = JSON.parse(JSON.stringify(schema13));
144400
+ if (!options8.mutateInputSchema && typeof schema12 === "object") {
144401
+ schema12 = JSON.parse(JSON.stringify(schema12));
144402
144402
  }
144403
144403
  return {
144404
144404
  path: path18,
144405
- schema: schema13,
144405
+ schema: schema12,
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(resolve16) {
145165
- resolve16(value);
145164
+ return value instanceof P9 ? value : new P9(function(resolve13) {
145165
+ resolve13(value);
145166
145166
  });
145167
145167
  }
145168
- return new (P9 || (P9 = Promise))(function(resolve16, reject) {
145168
+ return new (P9 || (P9 = Promise))(function(resolve13, 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 ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
145184
+ result.done ? resolve13(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* (schema13, { cwd, $refOptions }) {
145195
- (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema13);
145194
+ return __awaiter(this, arguments, undefined, function* (schema12, { cwd, $refOptions }) {
145195
+ (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd, schema12);
145196
145196
  const parser2 = new json_schema_ref_parser_1.$RefParser;
145197
145197
  const dereferencedPaths = new WeakMap;
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);
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);
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", (schema13) => {
145214
- if (schema13.enum && schema13.tsEnumNames && schema13.enum.length !== schema13.tsEnumNames.length) {
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) {
145215
145215
  return false;
145216
145216
  }
145217
145217
  });
145218
- rules.set("tsEnumNames must be an array of strings", (schema13) => {
145219
- if (schema13.tsEnumNames && schema13.tsEnumNames.some((_10) => typeof _10 !== "string")) {
145218
+ rules.set("tsEnumNames must be an array of strings", (schema12) => {
145219
+ if (schema12.tsEnumNames && schema12.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", (schema13) => {
145224
- const { maxItems, minItems } = schema13;
145223
+ rules.set("When both maxItems and minItems are present, maxItems >= minItems", (schema12) => {
145224
+ const { maxItems, minItems } = schema12;
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", (schema13) => {
145230
- const { maxItems } = schema13;
145229
+ rules.set("When maxItems exists, maxItems >= 0", (schema12) => {
145230
+ const { maxItems } = schema12;
145231
145231
  if (typeof maxItems === "number") {
145232
145232
  return maxItems >= 0;
145233
145233
  }
145234
145234
  });
145235
- rules.set("When minItems exists, minItems >= 0", (schema13) => {
145236
- const { minItems } = schema13;
145235
+ rules.set("When minItems exists, minItems >= 0", (schema12) => {
145236
+ const { minItems } = schema12;
145237
145237
  if (typeof minItems === "number") {
145238
145238
  return minItems >= 0;
145239
145239
  }
145240
145240
  });
145241
- rules.set("deprecated must be a boolean", (schema13) => {
145242
- const typeOfDeprecated = typeof schema13.deprecated;
145241
+ rules.set("deprecated must be a boolean", (schema12) => {
145242
+ const typeOfDeprecated = typeof schema12.deprecated;
145243
145243
  return typeOfDeprecated === "boolean" || typeOfDeprecated === "undefined";
145244
145244
  });
145245
- function validate2(schema13, filename) {
145245
+ function validate2(schema12, filename) {
145246
145246
  const errors5 = [];
145247
145247
  rules.forEach((rule, ruleName) => {
145248
- (0, utils_1.traverse)(schema13, (schema14, key2) => {
145249
- if (rule(schema14) === false) {
145248
+ (0, utils_1.traverse)(schema12, (schema13, key2) => {
145249
+ if (rule(schema13) === false) {
145250
145250
  errors5.push(`Error at key "${key2}" in file "${filename}": ${ruleName}`);
145251
145251
  }
145252
- return schema14;
145252
+ return schema13;
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(schema13, parent = null) {
145267
- if (!Array.isArray(schema13) && !(0, lodash_1.isPlainObject)(schema13)) {
145268
- return schema13;
145266
+ function link2(schema12, parent = null) {
145267
+ if (!Array.isArray(schema12) && !(0, lodash_1.isPlainObject)(schema12)) {
145268
+ return schema12;
145269
145269
  }
145270
- if (schema13.hasOwnProperty(JSONSchema_1.Parent)) {
145271
- return schema13;
145270
+ if (schema12.hasOwnProperty(JSONSchema_1.Parent)) {
145271
+ return schema12;
145272
145272
  }
145273
- Object.defineProperty(schema13, JSONSchema_1.Parent, {
145273
+ Object.defineProperty(schema12, JSONSchema_1.Parent, {
145274
145274
  enumerable: false,
145275
145275
  value: parent,
145276
145276
  writable: false
145277
145277
  });
145278
- if (Array.isArray(schema13)) {
145279
- schema13.forEach((child) => link2(child, schema13));
145278
+ if (Array.isArray(schema12)) {
145279
+ schema12.forEach((child) => link2(child, schema12));
145280
145280
  }
145281
- for (const key2 in schema13) {
145282
- link2(schema13[key2], schema13);
145281
+ for (const key2 in schema12) {
145282
+ link2(schema12[key2], schema12);
145283
145283
  }
145284
- return schema13;
145284
+ return schema12;
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(resolve16) {
145306
- resolve16(value);
145305
+ return value instanceof P9 ? value : new P9(function(resolve13) {
145306
+ resolve13(value);
145307
145307
  });
145308
145308
  }
145309
- return new (P9 || (P9 = Promise))(function(resolve16, reject) {
145309
+ return new (P9 || (P9 = Promise))(function(resolve13, 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 ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
145325
+ result.done ? resolve13(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 schema13 = parseAsJSONSchema(filename);
145377
- return compile(schema13, (0, utils_1.stripExtension)(filename), Object.assign({ cwd: (0, path_1.dirname)(filename) }, options8));
145376
+ const schema12 = parseAsJSONSchema(filename);
145377
+ return compile(schema12, (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* (schema13, name2, options8 = {}) {
145387
+ return __awaiter(this, arguments, undefined, function* (schema12, 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)(schema13);
145397
+ const _schema = (0, lodash_1.cloneDeep)(schema12);
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 relative5 = __require("path").relative;
146454
+ var relative4 = __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 relative5(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
146650
+ return relative4(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 modules2 = [
150646
+ var modules = [
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 < modules2.length; i5++) {
150658
- module = modules2[i5];
150657
+ for (i5 = 0;i5 < modules.length; i5++) {
150658
+ module = modules[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(resolve16, reject) {
150987
+ return new Promise(function executor(resolve13, reject) {
150988
150988
  readStream(stream, encoding, length, limit, function onRead2(err, buf) {
150989
150989
  if (err)
150990
150990
  return reject(err);
150991
- resolve16(buf);
150991
+ resolve13(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 extname3 = __require("path").extname;
160795
+ var extname2 = __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 = extname3("x." + path18).toLowerCase().slice(1);
160852
+ var extension2 = extname2("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 dirname21 = path18.dirname;
164112
+ var dirname20 = path18.dirname;
164113
164113
  var basename6 = path18.basename;
164114
- var extname3 = path18.extname;
164115
- var join29 = path18.join;
164116
- var resolve16 = path18.resolve;
164114
+ var extname2 = path18.extname;
164115
+ var join27 = path18.join;
164116
+ var resolve13 = 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 = extname3(name2);
164121
+ this.ext = extname2(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 = resolve16(root2, name2);
164151
- var dir = dirname21(loc);
164150
+ var loc = resolve13(root2, name2);
164151
+ var dir = dirname20(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 resolve17(dir, file2) {
164175
+ View.prototype.resolve = function resolve14(dir, file2) {
164176
164176
  var ext = this.ext;
164177
- var path19 = join29(dir, file2);
164178
- var stat4 = tryStat(path19);
164179
- if (stat4 && stat4.isFile()) {
164177
+ var path19 = join27(dir, file2);
164178
+ var stat2 = tryStat(path19);
164179
+ if (stat2 && stat2.isFile()) {
164180
164180
  return path19;
164181
164181
  }
164182
- path19 = join29(dir, basename6(file2, ext), "index" + ext);
164183
- stat4 = tryStat(path19);
164184
- if (stat4 && stat4.isFile()) {
164182
+ path19 = join27(dir, basename6(file2, ext), "index" + ext);
164183
+ stat2 = tryStat(path19);
164184
+ if (stat2 && stat2.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(stat4) {
164236
- var mtime = stat4.mtime.getTime().toString(16);
164237
- var size = stat4.size.toString(16);
164235
+ function stattag(stat2) {
164236
+ var mtime = stat2.mtime.getTime().toString(16);
164237
+ var size = stat2.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 resolve16 = __require("node:path").resolve;
166334
+ var resolve13 = __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", resolve16("views"));
166388
+ this.set("views", resolve13("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 extname3 = path18.extname;
167877
- var join29 = path18.join;
167876
+ var extname2 = path18.extname;
167877
+ var join27 = path18.join;
167878
167878
  var normalize2 = path18.normalize;
167879
- var resolve16 = path18.resolve;
167880
- var sep2 = path18.sep;
167879
+ var resolve13 = path18.resolve;
167880
+ var sep = 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 ? resolve16(opts.root) : null;
167908
+ this._root = opts.root ? resolve13(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("." + sep2 + path19);
168041
+ path19 = normalize2("." + sep + 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(sep2);
168049
- path19 = normalize2(join29(root2, path19));
168048
+ parts = path19.split(sep);
168049
+ path19 = normalize2(join27(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(sep2);
168057
- path19 = resolve16(path19);
168056
+ parts = normalize2(path19).split(sep);
168057
+ path19 = resolve13(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, stat4) {
168081
- var len = stat4.size;
168080
+ SendStream.prototype.send = function send2(path19, stat2) {
168081
+ var len = stat2.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, stat4);
168093
+ this.setHeader(path19, stat2);
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, stat4) {
168151
- var pathEndsWithSep = path19[path19.length - 1] === sep2;
168152
- if (err && err.code === "ENOENT" && !extname3(path19) && !pathEndsWithSep) {
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) {
168153
168153
  return next(err);
168154
168154
  }
168155
168155
  if (err)
168156
168156
  return self2.onStatError(err);
168157
- if (stat4.isDirectory())
168157
+ if (stat2.isDirectory())
168158
168158
  return self2.redirect(path19);
168159
168159
  if (pathEndsWithSep)
168160
168160
  return self2.error(404);
168161
- self2.emit("file", path19, stat4);
168162
- self2.send(path19, stat4);
168161
+ self2.emit("file", path19, stat2);
168162
+ self2.send(path19, stat2);
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, stat4) {
168170
+ fs28.stat(p4, function(err2, stat2) {
168171
168171
  if (err2)
168172
168172
  return next(err2);
168173
- if (stat4.isDirectory())
168173
+ if (stat2.isDirectory())
168174
168174
  return next();
168175
- self2.emit("file", p4, stat4);
168176
- self2.send(p4, stat4);
168175
+ self2.emit("file", p4, stat2);
168176
+ self2.send(p4, stat2);
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 = join29(path19, self2._index[i5]);
168189
+ var p4 = join27(path19, self2._index[i5]);
168190
168190
  debug('stat "%s"', p4);
168191
- fs28.stat(p4, function(err2, stat4) {
168191
+ fs28.stat(p4, function(err2, stat2) {
168192
168192
  if (err2)
168193
168193
  return next(err2);
168194
- if (stat4.isDirectory())
168194
+ if (stat2.isDirectory())
168195
168195
  return next();
168196
- self2.emit("file", p4, stat4);
168197
- self2.send(p4, stat4);
168196
+ self2.emit("file", p4, stat2);
168197
+ self2.send(p4, stat2);
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 = extname3(path19);
168224
+ var ext = extname2(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, stat4) {
168229
+ SendStream.prototype.setHeader = function setHeader(path19, stat2) {
168230
168230
  var res = this.res;
168231
- this.emit("headers", res, path19, stat4);
168231
+ this.emit("headers", res, path19, stat2);
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 = stat4.mtime.toUTCString();
168245
+ var modified = stat2.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(stat4);
168250
+ var val = etag(stat2);
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 extname3 = path18.extname;
168385
- var resolve16 = path18.resolve;
168384
+ var extname2 = path18.extname;
168385
+ var resolve13 = 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 ? resolve16(path19) : path19;
168594
+ var fullPath = !opts.root ? resolve13(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(extname3(filename));
168625
+ this.type(extname2(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 resolve16 = __require("path").resolve;
168855
+ var resolve13 = __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 = resolve16(root2);
168874
+ opts.root = resolve13(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(relative5, base) {
169799
- return useNativeURL ? new URL2(relative5, base) : parseUrl(url3.resolve(base, relative5));
169798
+ function resolveUrl(relative4, base) {
169799
+ return useNativeURL ? new URL2(relative4, base) : parseUrl(url3.resolve(base, relative4));
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((resolve16) => {
172249
- this._triggerBuffer = resolve16;
172248
+ this.buffer.chain(new Promise((resolve13) => {
172249
+ this._triggerBuffer = resolve13;
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((resolve16, reject) => {
173269
+ var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((resolve13, 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
- resolve16();
173286
+ resolve13();
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((resolve16, reject) => {
173457
+ return new Promise((resolve13, 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
- resolve16({ data, indexes });
173500
+ resolve13({ 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 extname3 = __require("path").extname;
183033
+ var extname2 = __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 = extname3("x." + path18).toLowerCase().substr(1);
183088
+ var extension2 = extname2("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 extname3 = __require("path").extname;
193080
+ var extname2 = __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 = extname3("x." + path18).toLowerCase().substr(1);
193135
+ var extension2 = extname2("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: createHash2 } = __require("crypto");
195658
+ var { randomBytes: randomBytes2, createHash } = __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 = createHash2("sha1").update(key2 + GUID).digest("base64");
196190
+ const digest = createHash("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: createHash2 } = __require("crypto");
196563
+ var { createHash } = __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 = createHash2("sha1").update(key2 + GUID).digest("base64");
196771
+ const digest = createHash("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((resolve16, reject) => {
199111
+ return new Promise((resolve13, 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 resolve16(responses);
199117
+ return resolve13(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((resolve16, reject) => {
199305
+ return new Promise((resolve13, reject) => {
199306
199306
  args.push((arg1, arg2) => {
199307
199307
  if (withErr) {
199308
- return arg1 ? reject(arg1) : resolve16(arg2);
199308
+ return arg1 ? reject(arg1) : resolve13(arg2);
199309
199309
  } else {
199310
- return resolve16(arg1);
199310
+ return resolve13(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((resolve16, reject) => {
199765
+ return new Promise((resolve13, 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 resolve16(responses);
199771
+ return resolve13(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: createHash2 } = __require("crypto");
201486
+ var { randomBytes: randomBytes2, createHash } = __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 = createHash2("sha1").update(key2 + GUID).digest("base64");
202018
+ const digest = createHash("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: createHash2 } = __require("crypto");
202391
+ var { createHash } = __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 = createHash2("sha1").update(key2 + GUID).digest("base64");
202599
+ const digest = createHash("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((resolve16, reject) => {
203306
+ return new Promise((resolve13, 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: resolve16,
203316
+ resolve: resolve13,
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((resolve16, reject) => {
203526
+ return new Promise((resolve13, 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: resolve16,
203536
+ resolve: resolve13,
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((resolve16) => {
204265
+ return new Promise((resolve13) => {
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
- resolve16();
204271
+ resolve13();
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 extname3 = __require("path").extname;
213007
+ var extname2 = __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 = extname3("x." + path18).toLowerCase().substr(1);
213062
+ var extension2 = extname2("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, stat4) {
217395
- if (er22 || !stat4.isDirectory())
217394
+ xfs.stat(p4, function(er22, stat2) {
217395
+ if (er22 || !stat2.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 stat4;
217426
+ var stat2;
217427
217427
  try {
217428
- stat4 = xfs.statSync(p4);
217428
+ stat2 = xfs.statSync(p4);
217429
217429
  } catch (err1) {
217430
217430
  throw err0;
217431
217431
  }
217432
- if (!stat4.isDirectory())
217432
+ if (!stat2.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 join31(s5) {
217635
+ value: function join29(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 resolve16 = iter[kLastResolve];
218934
- if (resolve16 !== null) {
218933
+ var resolve13 = iter[kLastResolve];
218934
+ if (resolve13 !== 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
- resolve16(createIterResult(data, false));
218940
+ resolve13(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(resolve16, reject) {
218948
+ return function(resolve13, reject) {
218949
218949
  lastPromise.then(function() {
218950
218950
  if (iter[kEnded]) {
218951
- resolve16(createIterResult(undefined, true));
218951
+ resolve13(createIterResult(undefined, true));
218952
218952
  return;
218953
218953
  }
218954
- iter[kHandlePromise](resolve16, reject);
218954
+ iter[kHandlePromise](resolve13, 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(resolve16, reject) {
218973
+ return new Promise(function(resolve13, reject) {
218974
218974
  process.nextTick(function() {
218975
218975
  if (_this[kError]) {
218976
218976
  reject(_this[kError]);
218977
218977
  } else {
218978
- resolve16(createIterResult(undefined, true));
218978
+ resolve13(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(resolve16, reject) {
219001
+ return new Promise(function(resolve13, reject) {
219002
219002
  _this2[kStream].destroy(null, function(err) {
219003
219003
  if (err) {
219004
219004
  reject(err);
219005
219005
  return;
219006
219006
  }
219007
- resolve16(createIterResult(undefined, true));
219007
+ resolve13(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(resolve16, reject) {
219029
+ value: function value(resolve13, 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
- resolve16(createIterResult(data, false));
219035
+ resolve13(createIterResult(data, false));
219036
219036
  } else {
219037
- iterator[kLastResolve] = resolve16;
219037
+ iterator[kLastResolve] = resolve13;
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 resolve16 = iterator[kLastResolve];
219057
- if (resolve16 !== null) {
219056
+ var resolve13 = iterator[kLastResolve];
219057
+ if (resolve13 !== null) {
219058
219058
  iterator[kLastPromise] = null;
219059
219059
  iterator[kLastResolve] = null;
219060
219060
  iterator[kLastReject] = null;
219061
- resolve16(createIterResult(undefined, true));
219061
+ resolve13(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, resolve16, reject, _next, _throw, key2, arg) {
219073
+ function asyncGeneratorStep(gen, resolve13, 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
- resolve16(value);
219082
+ resolve13(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(resolve16, reject) {
219090
+ return new Promise(function(resolve13, reject) {
219091
219091
  var gen = fn9.apply(self2, args);
219092
219092
  function _next(value) {
219093
- asyncGeneratorStep(gen, resolve16, reject, _next, _throw, "next", value);
219093
+ asyncGeneratorStep(gen, resolve13, reject, _next, _throw, "next", value);
219094
219094
  }
219095
219095
  function _throw(err) {
219096
- asyncGeneratorStep(gen, resolve16, reject, _next, _throw, "throw", err);
219096
+ asyncGeneratorStep(gen, resolve13, 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_promises26 = __require("node:fs/promises");
221223
+ var import_promises22 = __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_promises26.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
221281
+ await (0, import_promises22.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 dirname26, join as join36 } from "node:path";
237052
+ import { dirname as dirname25, join as join33 } 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 dirname11, join as join17 } from "node:path";
238260
+ import { dirname as dirname10, join as join15 } 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`;
@@ -247551,7 +247551,7 @@ async function deployAll(projectData, options) {
247551
247551
  await authConfigResource.push(authConfig);
247552
247552
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
247553
247553
  const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
247554
- if ((options?.site ?? true) && project.site?.outputDirectory) {
247554
+ if (project.site?.outputDirectory) {
247555
247555
  const outputDir = resolve3(project.root, project.site.outputDirectory);
247556
247556
  const { appUrl } = await deploySite(outputDir);
247557
247557
  return { appUrl, connectorResults };
@@ -254714,667 +254714,6 @@ function formatYaml(data, options = {}) {
254714
254714
  const replacer = stripEmpty ? stripEmptyReplacer : undefined;
254715
254715
  return $stringify(data, replacer, { indent: YAML_INDENT }).trimEnd();
254716
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 = module.content !== undefined ? module.content : new Uint8Array(await readFile2(module.absolutePath));
254781
- formData.append(module.name, new File([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 BindingArraySchema = exports_external.array(exports_external.unknown()).optional();
255129
- var WranglerConfigSchema = exports_external.looseObject({
255130
- name: exports_external.string().optional(),
255131
- main: exports_external.string().min(1, "wrangler config is missing a 'main' entry module"),
255132
- no_bundle: exports_external.boolean().optional(),
255133
- rules: exports_external.array(exports_external.looseObject({ type: exports_external.string(), globs: exports_external.array(exports_external.string()) })).optional(),
255134
- assets: exports_external.looseObject({
255135
- directory: exports_external.string().optional(),
255136
- html_handling: exports_external.string().optional(),
255137
- not_found_handling: exports_external.string().optional(),
255138
- run_worker_first: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional(),
255139
- headers: exports_external.string().optional(),
255140
- redirects: exports_external.string().optional()
255141
- }).optional(),
255142
- compatibility_date: exports_external.string().optional(),
255143
- compatibility_flags: exports_external.array(exports_external.string()).optional(),
255144
- vars: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
255145
- upload_source_maps: exports_external.boolean().optional(),
255146
- kv_namespaces: BindingArraySchema,
255147
- d1_databases: BindingArraySchema,
255148
- r2_buckets: BindingArraySchema,
255149
- durable_objects: exports_external.looseObject({ bindings: BindingArraySchema }).optional(),
255150
- services: BindingArraySchema,
255151
- queues: exports_external.looseObject({
255152
- producers: BindingArraySchema,
255153
- consumers: BindingArraySchema
255154
- }).optional(),
255155
- hyperdrive: BindingArraySchema,
255156
- analytics_engine_datasets: BindingArraySchema,
255157
- vectorize: BindingArraySchema
255158
- });
255159
- async function detectFullStackArtifact(projectRoot) {
255160
- const redirectPath = join16(projectRoot, WRANGLER_REDIRECT_PATH);
255161
- if (await pathExists(redirectPath)) {
255162
- return { source: "redirect", path: redirectPath };
255163
- }
255164
- for (const name2 of ["wrangler.jsonc", "wrangler.json"]) {
255165
- const configPath = join16(projectRoot, name2);
255166
- if (await pathExists(configPath)) {
255167
- return { source: "root-config", path: configPath };
255168
- }
255169
- }
255170
- const tomlPath = join16(projectRoot, "wrangler.toml");
255171
- if (await pathExists(tomlPath)) {
255172
- return { source: "toml", path: tomlPath };
255173
- }
255174
- return null;
255175
- }
255176
- async function resolveWranglerConfig(projectRoot) {
255177
- const artifact = await detectFullStackArtifact(projectRoot);
255178
- if (!artifact) {
255179
- throw new InvalidInputError("No full-stack build artifact found. Expected a .wrangler/deploy/config.json redirect file or a root wrangler.jsonc.", {
255180
- hints: [{ message: "Run your framework's build command first" }]
255181
- });
255182
- }
255183
- if (artifact.source === "toml") {
255184
- throw new InvalidInputError("wrangler.toml is not supported for Base44 full-stack deploys. Convert your config to wrangler.jsonc.");
255185
- }
255186
- const configPath = artifact.source === "redirect" ? await resolveRedirectedConfigPath(artifact.path) : artifact.path;
255187
- const parsed = await readJsonFile(configPath);
255188
- const result = WranglerConfigSchema.safeParse(parsed);
255189
- if (!result.success) {
255190
- throw new ConfigInvalidError(`Invalid wrangler config: ${exports_external.prettifyError(result.error)}`, configPath);
255191
- }
255192
- const config12 = result.data;
255193
- if (config12.no_bundle !== true) {
255194
- 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).");
255195
- }
255196
- assertNoUnsupportedBindings(config12, configPath);
255197
- const configDir = dirname10(configPath);
255198
- const assetsDirectory = config12.assets?.directory ? resolve5(configDir, config12.assets.directory) : null;
255199
- return {
255200
- configPath,
255201
- configDir,
255202
- name: config12.name ?? null,
255203
- main: config12.main,
255204
- assetsDirectory,
255205
- assetsConfig: config12.assets ? toResolvedAssetsConfig(config12.assets) : null,
255206
- compatibilityDate: config12.compatibility_date ?? null,
255207
- compatibilityFlags: config12.compatibility_flags ?? [],
255208
- vars: config12.vars ?? {},
255209
- rules: (config12.rules ?? []).map((rule) => ({
255210
- type: rule.type,
255211
- globs: rule.globs
255212
- })),
255213
- uploadSourceMaps: config12.upload_source_maps ?? false
255214
- };
255215
- }
255216
- async function resolveRedirectedConfigPath(redirectPath) {
255217
- const parsed = await readJsonFile(redirectPath);
255218
- const result = RedirectConfigSchema.safeParse(parsed);
255219
- if (!result.success) {
255220
- throw new ConfigInvalidError(`Invalid deploy redirect file: ${exports_external.prettifyError(result.error)}`, redirectPath);
255221
- }
255222
- const configPath = resolve5(dirname10(redirectPath), result.data.configPath);
255223
- if (!await pathExists(configPath)) {
255224
- throw new ConfigInvalidError(`Wrangler config referenced by ${redirectPath} does not exist: ${configPath}`, redirectPath, {
255225
- hints: [{ message: "Rebuild the project to regenerate the artifact" }]
255226
- });
255227
- }
255228
- return configPath;
255229
- }
255230
- function toResolvedAssetsConfig(assets) {
255231
- return {
255232
- htmlHandling: assets.html_handling,
255233
- notFoundHandling: assets.not_found_handling,
255234
- runWorkerFirst: assets.run_worker_first,
255235
- headers: assets.headers,
255236
- redirects: assets.redirects
255237
- };
255238
- }
255239
- function assertNoUnsupportedBindings(config12, configPath) {
255240
- const bindingSources = {
255241
- kv_namespaces: config12.kv_namespaces,
255242
- d1_databases: config12.d1_databases,
255243
- r2_buckets: config12.r2_buckets,
255244
- "durable_objects.bindings": config12.durable_objects?.bindings,
255245
- services: config12.services,
255246
- "queues.producers": config12.queues?.producers,
255247
- "queues.consumers": config12.queues?.consumers,
255248
- hyperdrive: config12.hyperdrive,
255249
- analytics_engine_datasets: config12.analytics_engine_datasets,
255250
- vectorize: config12.vectorize
255251
- };
255252
- const used = Object.entries(bindingSources).filter(([, values]) => (values?.length ?? 0) > 0).map(([name2]) => name2);
255253
- if (used.length > 0) {
255254
- throw new InvalidInputError(`Unsupported bindings for Base44 full-stack deploys: ${used.join(", ")}. Remove them or file a feature request.`, {
255255
- hints: [{ message: `Edit the bindings in ${configPath}` }]
255256
- });
255257
- }
255258
- }
255259
-
255260
- // src/core/deployments/deploy.ts
255261
- async function resolveGitHash(projectRoot, explicit) {
255262
- const hash2 = explicit ?? await gitHead(projectRoot);
255263
- if (!hash2 || !GIT_HASH_PATTERN.test(hash2)) {
255264
- 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.", {
255265
- hints: [
255266
- {
255267
- message: "Run the deploy from a git checkout, or pass the commit explicitly with --git-hash."
255268
- }
255269
- ]
255270
- });
255271
- }
255272
- return hash2;
255273
- }
255274
- async function gitHead(projectRoot) {
255275
- try {
255276
- const { stdout } = await execa("git", ["rev-parse", "HEAD"], {
255277
- cwd: projectRoot
255278
- });
255279
- return stdout.trim();
255280
- } catch {
255281
- return null;
255282
- }
255283
- }
255284
- async function deployFullStack(options) {
255285
- const { projectRoot, gitHash, progress } = options;
255286
- const config12 = await resolveWranglerConfig(projectRoot);
255287
- if (!config12.compatibilityFlags.includes("nodejs_compat")) {
255288
- 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.");
255289
- }
255290
- if (config12.vars && Object.keys(config12.vars).length > 0) {
255291
- progress?.onWarning?.("wrangler 'vars' are not supported and were ignored — a worker's environment comes from the app's secrets (base44 secrets set).");
255292
- }
255293
- const modules = await collectModules(config12);
255294
- let assets = { manifest: {}, filesByHash: new Map };
255295
- if (config12.assetsDirectory && await pathExists(config12.assetsDirectory)) {
255296
- assets = await buildAssetManifest(config12.assetsDirectory, getAppContext().id);
255297
- }
255298
- const created = await createDeployment({
255299
- git_hash: gitHash,
255300
- config: {
255301
- main: config12.main,
255302
- compatibility_date: config12.compatibilityDate,
255303
- compatibility_flags: config12.compatibilityFlags,
255304
- assets: buildAssetsConfig(config12.assetsConfig, progress)
255305
- },
255306
- asset_manifest: assets.manifest
255307
- });
255308
- const totalAssets = Object.keys(assets.manifest).length;
255309
- const newAssets = new Set(created.assetBuckets.flat()).size;
255310
- progress?.onAssets?.({ totalAssets, newAssets });
255311
- const completionJwt = await uploadAssetBuckets(created.deploymentId, created.assetBuckets, assets.filesByHash, progress?.onAssetUpload);
255312
- progress?.onWorker?.({ moduleCount: modules.length });
255313
- const finalized = await finalizeDeployment(created.deploymentId, completionJwt, modules);
255314
- return { deploymentId: finalized.deploymentId, gitHash };
255315
- }
255316
- function buildAssetsConfig(assetsConfig, progress) {
255317
- if (!assetsConfig)
255318
- return null;
255319
- if (assetsConfig.headers || assetsConfig.redirects) {
255320
- progress?.onWarning?.("_headers/_redirects files are not supported yet and were ignored for this deploy.");
255321
- }
255322
- let runWorkerFirst;
255323
- if (Array.isArray(assetsConfig.runWorkerFirst)) {
255324
- progress?.onWarning?.("'run_worker_first' route patterns are not supported yet and were ignored for this deploy.");
255325
- } else {
255326
- runWorkerFirst = assetsConfig.runWorkerFirst;
255327
- }
255328
- return {
255329
- html_handling: assetsConfig.htmlHandling,
255330
- not_found_handling: assetsConfig.notFoundHandling,
255331
- run_worker_first: runWorkerFirst
255332
- };
255333
- }
255334
- // src/core/deployments/static-site.ts
255335
- var STATIC_WORKERS_ENV = "BASE44_STATIC_WORKERS";
255336
- function staticWorkersEnabled(env2 = process.env) {
255337
- const value = env2[STATIC_WORKERS_ENV];
255338
- return value === "1" || value === "true";
255339
- }
255340
- var STUB_MODULE_NAME = "index.js";
255341
- var STUB_SOURCE = `export default {
255342
- async fetch(request, env) {
255343
- return env.ASSETS.fetch(request);
255344
- },
255345
- };
255346
- `;
255347
- var STATIC_COMPATIBILITY_DATE = "2026-01-01";
255348
- async function deployStaticSite(options) {
255349
- const { outputDir, gitHash, progress } = options;
255350
- const assets = await buildAssetManifest(outputDir, getAppContext().id);
255351
- const created = await createDeployment({
255352
- git_hash: gitHash,
255353
- config: {
255354
- main: STUB_MODULE_NAME,
255355
- compatibility_date: STATIC_COMPATIBILITY_DATE,
255356
- compatibility_flags: [],
255357
- assets: { not_found_handling: "single-page-application" }
255358
- },
255359
- asset_manifest: assets.manifest
255360
- });
255361
- const totalAssets = Object.keys(assets.manifest).length;
255362
- const newAssets = new Set(created.assetBuckets.flat()).size;
255363
- progress?.onAssets?.({ totalAssets, newAssets });
255364
- const completionJwt = await uploadAssetBuckets(created.deploymentId, created.assetBuckets, assets.filesByHash, progress?.onAssetUpload);
255365
- const stubBytes = new TextEncoder().encode(STUB_SOURCE);
255366
- const modules = [
255367
- {
255368
- name: STUB_MODULE_NAME,
255369
- content: stubBytes,
255370
- size: stubBytes.byteLength,
255371
- type: "esm"
255372
- }
255373
- ];
255374
- progress?.onWorker?.({ moduleCount: modules.length });
255375
- const finalized = await finalizeDeployment(created.deploymentId, completionJwt, modules);
255376
- return { deploymentId: finalized.deploymentId, gitHash };
255377
- }
255378
254717
  // src/core/utils/dependencies.ts
255379
254718
  import { spawnSync as spawnSync2 } from "node:child_process";
255380
254719
  function verifyDenoInstalled(context) {
@@ -255463,7 +254802,7 @@ async function pullAction({
255463
254802
  runTask: runTask2
255464
254803
  }) {
255465
254804
  const { project: project2 } = await readProjectConfig();
255466
- const dir = join17(dirname11(project2.configPath), project2.agentSkillsDir);
254805
+ const dir = join15(dirname10(project2.configPath), project2.agentSkillsDir);
255467
254806
  const remote = await runTask2("Fetching agent skills from Base44", () => fetchAgentSkills(), {
255468
254807
  successMessage: "Agent skills fetched successfully",
255469
254808
  errorMessage: "Failed to fetch agent skills"
@@ -255519,14 +254858,14 @@ function getAgentSkillsCommand() {
255519
254858
  }
255520
254859
 
255521
254860
  // src/cli/commands/agents/pull.ts
255522
- import { dirname as dirname12, join as join18 } from "node:path";
254861
+ import { dirname as dirname11, join as join16 } from "node:path";
255523
254862
  async function pullAgentsAction({
255524
254863
  log,
255525
254864
  runTask: runTask2
255526
254865
  }) {
255527
254866
  const { project: project2 } = await readProjectConfig();
255528
- const configDir = dirname12(project2.configPath);
255529
- const agentsDir = join18(configDir, project2.agentsDir);
254867
+ const configDir = dirname11(project2.configPath);
254868
+ const agentsDir = join16(configDir, project2.agentsDir);
255530
254869
  const remoteAgents = await runTask2("Fetching agents from Base44", async () => {
255531
254870
  return await fetchAgents();
255532
254871
  }, {
@@ -255596,12 +254935,12 @@ function getAgentsCommand() {
255596
254935
  }
255597
254936
 
255598
254937
  // src/cli/commands/auth/password-login.ts
255599
- import { dirname as dirname13, join as join19 } from "node:path";
254938
+ import { dirname as dirname12, join as join17 } from "node:path";
255600
254939
  async function passwordLoginAction({ log, runTask: runTask2 }, action) {
255601
254940
  const shouldEnable = action === "enable";
255602
254941
  const { project: project2 } = await readProjectConfig();
255603
- const configDir = dirname13(project2.configPath);
255604
- const authDir = join19(configDir, project2.authDir);
254942
+ const configDir = dirname12(project2.configPath);
254943
+ const authDir = join17(configDir, project2.authDir);
255605
254944
  const updated = await runTask2("Updating local auth config", async () => {
255606
254945
  const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
255607
254946
  const merged = { ...current, enableUsernamePassword: shouldEnable };
@@ -255621,14 +254960,14 @@ function getPasswordLoginCommand() {
255621
254960
  }
255622
254961
 
255623
254962
  // src/cli/commands/auth/pull.ts
255624
- import { dirname as dirname14, join as join20 } from "node:path";
254963
+ import { dirname as dirname13, join as join18 } from "node:path";
255625
254964
  async function pullAuthAction({
255626
254965
  log,
255627
254966
  runTask: runTask2
255628
254967
  }) {
255629
254968
  const { project: project2 } = await readProjectConfig();
255630
- const configDir = dirname14(project2.configPath);
255631
- const authDir = join20(configDir, project2.authDir);
254969
+ const configDir = dirname13(project2.configPath);
254970
+ const authDir = join18(configDir, project2.authDir);
255632
254971
  const remoteConfig = await runTask2("Fetching auth config from Base44", async () => {
255633
254972
  return await pullAuthConfig();
255634
254973
  }, {
@@ -255692,7 +255031,7 @@ function getAuthPushCommand() {
255692
255031
  }
255693
255032
 
255694
255033
  // src/cli/commands/auth/social-login.ts
255695
- import { dirname as dirname15, join as join21, resolve as resolve6 } from "node:path";
255034
+ import { dirname as dirname14, join as join19, resolve as resolve4 } from "node:path";
255696
255035
  var PROVIDER_LABELS = {
255697
255036
  google: "Google",
255698
255037
  microsoft: "Microsoft",
@@ -255732,7 +255071,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
255732
255071
  let clientSecret;
255733
255072
  if (useCustomOAuth && oauth && oauthCli && hasSecretOptions(options)) {
255734
255073
  if (options.envFile) {
255735
- const secrets = await parseEnvFile(resolve6(options.envFile));
255074
+ const secrets = await parseEnvFile(resolve4(options.envFile));
255736
255075
  const value = secrets[oauthCli.envVar];
255737
255076
  if (!value) {
255738
255077
  throw new InvalidInputError(`Key "${oauthCli.envVar}" not found in ${options.envFile}.`);
@@ -255762,8 +255101,8 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
255762
255101
  }
255763
255102
  }
255764
255103
  const { project: project2 } = await readProjectConfig();
255765
- const configDir = dirname15(project2.configPath);
255766
- const authDir = join21(configDir, project2.authDir);
255104
+ const configDir = dirname14(project2.configPath);
255105
+ const authDir = join19(configDir, project2.authDir);
255767
255106
  const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
255768
255107
  if (clientSecret) {
255769
255108
  await runTask2("Saving client secret", async () => pushCustomOAuthSecret(provider, clientSecret));
@@ -255788,7 +255127,7 @@ function getSocialLoginCommand() {
255788
255127
  }
255789
255128
 
255790
255129
  // src/cli/commands/auth/sso.ts
255791
- import { dirname as dirname16, join as join22, resolve as resolve7 } from "node:path";
255130
+ import { dirname as dirname15, join as join20, resolve as resolve5 } from "node:path";
255792
255131
  var SSOConfigFileSchema = exports_external.object({
255793
255132
  provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
255794
255133
  clientId: exports_external.string(),
@@ -255804,7 +255143,7 @@ var SSOConfigFileSchema = exports_external.object({
255804
255143
  ssoName: exports_external.string().optional()
255805
255144
  });
255806
255145
  async function loadSSOConfigFile(filePath) {
255807
- const resolved = resolve7(filePath);
255146
+ const resolved = resolve5(filePath);
255808
255147
  const raw2 = await readJsonFile(resolved);
255809
255148
  const result = SSOConfigFileSchema.safeParse(raw2);
255810
255149
  if (!result.success) {
@@ -255892,7 +255231,7 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
255892
255231
  }
255893
255232
  let clientSecret;
255894
255233
  if (merged.envFile && !merged.clientSecret) {
255895
- const secrets2 = await parseEnvFile(resolve7(merged.envFile));
255234
+ const secrets2 = await parseEnvFile(resolve5(merged.envFile));
255896
255235
  const value = secrets2.sso_client_secret;
255897
255236
  if (!value) {
255898
255237
  throw new InvalidInputError(`Key "sso_client_secret" not found in ${merged.envFile}.`);
@@ -255951,8 +255290,8 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
255951
255290
  throw error48;
255952
255291
  }
255953
255292
  const { project: project2 } = await readProjectConfig();
255954
- const configDir = dirname16(project2.configPath);
255955
- const authDir = join22(configDir, project2.authDir);
255293
+ const configDir = dirname15(project2.configPath);
255294
+ const authDir = join20(configDir, project2.authDir);
255956
255295
  await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
255957
255296
  await runTask2("Saving SSO credentials", async () => pushSSOSecrets(secrets));
255958
255297
  return {
@@ -255967,8 +255306,8 @@ async function ssoDisableAction({ log, runTask: runTask2 }, options) {
255967
255306
  throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
255968
255307
  }
255969
255308
  const { project: project2 } = await readProjectConfig();
255970
- const configDir = dirname16(project2.configPath);
255971
- const authDir = join22(configDir, project2.authDir);
255309
+ const configDir = dirname15(project2.configPath);
255310
+ const authDir = join20(configDir, project2.authDir);
255972
255311
  const updated = await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
255973
255312
  await runTask2("Removing SSO credentials", async () => deleteSSOSecrets());
255974
255313
  if (!hasAnyLoginMethod(updated)) {
@@ -256530,19 +255869,19 @@ var baseOpen = async (options) => {
256530
255869
  }
256531
255870
  const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
256532
255871
  if (options.wait) {
256533
- return new Promise((resolve8, reject) => {
255872
+ return new Promise((resolve6, reject) => {
256534
255873
  subprocess.once("error", reject);
256535
255874
  subprocess.once("close", (exitCode) => {
256536
255875
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
256537
255876
  reject(new Error(`Exited with code ${exitCode}`));
256538
255877
  return;
256539
255878
  }
256540
- resolve8(subprocess);
255879
+ resolve6(subprocess);
256541
255880
  });
256542
255881
  });
256543
255882
  }
256544
255883
  if (isFallbackAttempt) {
256545
- return new Promise((resolve8, reject) => {
255884
+ return new Promise((resolve6, reject) => {
256546
255885
  subprocess.once("error", reject);
256547
255886
  subprocess.once("spawn", () => {
256548
255887
  subprocess.once("close", (exitCode) => {
@@ -256552,17 +255891,17 @@ var baseOpen = async (options) => {
256552
255891
  return;
256553
255892
  }
256554
255893
  subprocess.unref();
256555
- resolve8(subprocess);
255894
+ resolve6(subprocess);
256556
255895
  });
256557
255896
  });
256558
255897
  });
256559
255898
  }
256560
255899
  subprocess.unref();
256561
- return new Promise((resolve8, reject) => {
255900
+ return new Promise((resolve6, reject) => {
256562
255901
  subprocess.once("error", reject);
256563
255902
  subprocess.once("spawn", () => {
256564
255903
  subprocess.off("error", reject);
256565
- resolve8(subprocess);
255904
+ resolve6(subprocess);
256566
255905
  });
256567
255906
  });
256568
255907
  };
@@ -256825,13 +256164,13 @@ function getConnectorsListAvailableCommand() {
256825
256164
  }
256826
256165
 
256827
256166
  // src/cli/commands/connectors/pull.ts
256828
- import { dirname as dirname17, join as join23, resolve as resolve8 } from "node:path";
256167
+ import { dirname as dirname16, join as join21, resolve as resolve6 } from "node:path";
256829
256168
  async function resolveConnectorsDir(options) {
256830
256169
  if (!getAppContext().projectRoot) {
256831
- return resolve8(options.dir ?? "connectors");
256170
+ return resolve6(options.dir ?? "connectors");
256832
256171
  }
256833
256172
  const { project: project2 } = await readProjectConfig();
256834
- return join23(dirname17(project2.configPath), project2.connectorsDir);
256173
+ return join21(dirname16(project2.configPath), project2.connectorsDir);
256835
256174
  }
256836
256175
  async function pullConnectorsAction({ log, runTask: runTask2, jsonMode }, options) {
256837
256176
  const connectorsDir = await resolveConnectorsDir(options);
@@ -256872,10 +256211,10 @@ function getConnectorsPullCommand() {
256872
256211
  }
256873
256212
 
256874
256213
  // src/cli/commands/connectors/push.ts
256875
- import { resolve as resolve9 } from "node:path";
256214
+ import { resolve as resolve7 } from "node:path";
256876
256215
  async function readConnectorsToPush(options) {
256877
256216
  if (!getAppContext().projectRoot) {
256878
- return readAllConnectors(resolve9(options.dir ?? "connectors"));
256217
+ return readAllConnectors(resolve7(options.dir ?? "connectors"));
256879
256218
  }
256880
256219
  const { connectors } = await readProjectConfig();
256881
256220
  return connectors;
@@ -257239,11 +256578,11 @@ function getListCommand() {
257239
256578
  }
257240
256579
 
257241
256580
  // src/cli/commands/functions/pull.ts
257242
- import { dirname as dirname18, join as join24 } from "node:path";
256581
+ import { dirname as dirname17, join as join22 } from "node:path";
257243
256582
  async function pullFunctionsAction({ log, runTask: runTask2 }, name2) {
257244
256583
  const { project: project2, functions } = await readProjectConfig();
257245
- const configDir = dirname18(project2.configPath);
257246
- const functionsDir = join24(configDir, project2.functionsDir);
256584
+ const configDir = dirname17(project2.configPath);
256585
+ const functionsDir = join22(configDir, project2.functionsDir);
257247
256586
  const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
257248
256587
  const remoteFunctions = await runTask2("Fetching functions from Base44", async () => {
257249
256588
  const { functions: functions2 } = await listDeployedFunctions();
@@ -257301,12 +256640,45 @@ function getFunctionsCommand() {
257301
256640
  return new Command("functions").description("Manage backend functions").addCommand(getDeployCommand()).addCommand(getDeleteCommand()).addCommand(getListCommand()).addCommand(getPullCommand());
257302
256641
  }
257303
256642
 
256643
+ // src/cli/commands/project/build.ts
256644
+ async function buildAction(ctx) {
256645
+ const { app } = ctx;
256646
+ if (!app?.projectRoot) {
256647
+ throw new ConfigInvalidError("base44 build requires a linked local project. Run it from a project with base44/.app.jsonc.");
256648
+ }
256649
+ const { project: project2 } = await readProjectConfig(app.projectRoot);
256650
+ const buildCommand = project2.site?.buildCommand;
256651
+ if (!buildCommand) {
256652
+ throw new ConfigNotFoundError("No site build command found.", {
256653
+ hints: [
256654
+ {
256655
+ message: `Add 'site.buildCommand' to your config.jsonc (e.g., "site": { "buildCommand": "npm run build" })`
256656
+ }
256657
+ ]
256658
+ });
256659
+ }
256660
+ await ctx.runTask("Building site...", () => execa({
256661
+ cwd: project2.root,
256662
+ shell: true,
256663
+ env: { VITE_BASE44_APP_ID: app.id }
256664
+ })`${buildCommand}`, {
256665
+ successMessage: "Site built successfully",
256666
+ errorMessage: "Build failed"
256667
+ });
256668
+ return {
256669
+ outroMessage: `Site built with app id ${theme.styles.bold(app.id)}`
256670
+ };
256671
+ }
256672
+ function getBuildCommand() {
256673
+ return new Base44Command("build").description("Build the site with the Base44 app id injected").action(buildAction);
256674
+ }
256675
+
257304
256676
  // src/cli/commands/project/create.ts
257305
- import { basename as basename4, resolve as resolve10 } from "node:path";
256677
+ import { basename as basename4, resolve as resolve8 } from "node:path";
257306
256678
  var import_kebabCase = __toESM(require_kebabCase(), 1);
257307
256679
 
257308
256680
  // src/cli/commands/project/scaffold-shared.ts
257309
- import { join as join25 } from "node:path";
256681
+ import { join as join23 } from "node:path";
257310
256682
  var DEFAULT_TEMPLATE_ID = "backend-only";
257311
256683
  async function getTemplateById(templateId) {
257312
256684
  const templates = await listTemplates();
@@ -257323,7 +256695,7 @@ async function completeProjectSetup({
257323
256695
  projectId,
257324
256696
  name: name2,
257325
256697
  resolvedPath,
257326
- deploy: deploy6,
256698
+ deploy: deploy5,
257327
256699
  skills,
257328
256700
  isInteractive
257329
256701
  }, { runTask: runTask2 }) {
@@ -257337,7 +256709,7 @@ async function completeProjectSetup({
257337
256709
  });
257338
256710
  shouldPushEntities = !Ct(result) && result;
257339
256711
  } else {
257340
- shouldPushEntities = !!deploy6;
256712
+ shouldPushEntities = !!deploy5;
257341
256713
  }
257342
256714
  if (shouldPushEntities) {
257343
256715
  await runTask2(`Pushing ${entities.length} data models to Base44...`, async () => {
@@ -257357,7 +256729,7 @@ async function completeProjectSetup({
257357
256729
  });
257358
256730
  shouldDeploy = !Ct(result) && result;
257359
256731
  } else {
257360
- shouldDeploy = !!deploy6;
256732
+ shouldDeploy = !!deploy5;
257361
256733
  }
257362
256734
  if (shouldDeploy && installCommand && buildCommand && outputDirectory) {
257363
256735
  const { appUrl } = await runTask2("Installing dependencies...", async (updateMessage) => {
@@ -257365,7 +256737,7 @@ async function completeProjectSetup({
257365
256737
  updateMessage("Building project...");
257366
256738
  await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
257367
256739
  updateMessage("Deploying site...");
257368
- return await deploySite(join25(resolvedPath, outputDirectory));
256740
+ return await deploySite(join23(resolvedPath, outputDirectory));
257369
256741
  }, {
257370
256742
  successMessage: theme.colors.base44Orange("Site deployed successfully"),
257371
256743
  errorMessage: "Failed to deploy site"
@@ -257494,7 +256866,7 @@ async function createInteractive(options, ctx) {
257494
256866
  }, ctx);
257495
256867
  }
257496
256868
  async function createNonInteractive(options, ctx) {
257497
- ctx.log.info(`Creating a new project at ${resolve10(options.path)}`);
256869
+ ctx.log.info(`Creating a new project at ${resolve8(options.path)}`);
257498
256870
  const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
257499
256871
  return await executeCreate({
257500
256872
  template: template2,
@@ -257511,14 +256883,14 @@ async function executeCreate({
257511
256883
  name: rawName,
257512
256884
  description,
257513
256885
  projectPath,
257514
- deploy: deploy6,
256886
+ deploy: deploy5,
257515
256887
  skills,
257516
256888
  workspaceId: flagWorkspaceId,
257517
256889
  isInteractive
257518
256890
  }, ctx) {
257519
256891
  const { log, runTask: runTask2 } = ctx;
257520
256892
  const name2 = rawName.trim();
257521
- const resolvedPath = resolve10(projectPath);
256893
+ const resolvedPath = resolve8(projectPath);
257522
256894
  const organizationId = await resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive);
257523
256895
  const { projectId } = await runTask2("Setting up your project...", async () => {
257524
256896
  return await createProjectFiles({
@@ -257533,7 +256905,7 @@ async function executeCreate({
257533
256905
  errorMessage: "Failed to create project"
257534
256906
  });
257535
256907
  setAppContext({ id: projectId, projectRoot: resolvedPath });
257536
- const summary = await completeProjectSetup({ projectId, name: name2, resolvedPath, deploy: deploy6, skills, isInteractive }, ctx);
256908
+ const summary = await completeProjectSetup({ projectId, name: name2, resolvedPath, deploy: deploy5, skills, isInteractive }, ctx);
257537
256909
  printProjectSummary(summary, log);
257538
256910
  return { outroMessage: "Your project is set up and ready to use" };
257539
256911
  }
@@ -257569,24 +256941,17 @@ Examples:
257569
256941
  }
257570
256942
 
257571
256943
  // src/cli/commands/project/deploy.ts
257572
- import { resolve as resolve11 } from "node:path";
257573
- async function deployAction(ctx, options = {}) {
257574
- const { isNonInteractive, log } = ctx;
256944
+ async function deployAction({ isNonInteractive, log }, options = {}) {
257575
256945
  if (isNonInteractive && !options.yes) {
257576
256946
  throw new InvalidInputError("--yes is required in non-interactive mode");
257577
256947
  }
257578
- if (options.build && options.prebuilt) {
257579
- throw new InvalidInputError("--build and --prebuilt cannot be combined.");
257580
- }
257581
256948
  const projectData = await readProjectConfig(options.projectRoot);
257582
- const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
257583
- let fullStackArtifact = await detectFullStackArtifact(project2.root);
257584
- const isFullStackCandidate = fullStackArtifact !== null || Boolean(project2.site?.buildCommand);
257585
- if (!hasResourcesToDeploy(projectData) && !isFullStackCandidate) {
256949
+ if (!hasResourcesToDeploy(projectData)) {
257586
256950
  return {
257587
256951
  outroMessage: "No resources found to deploy"
257588
256952
  };
257589
256953
  }
256954
+ const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
257590
256955
  const summaryLines = [];
257591
256956
  if (entities.length > 0) {
257592
256957
  summaryLines.push(` - ${entities.length} ${entities.length === 1 ? "entity" : "entities"}`);
@@ -257606,9 +256971,7 @@ async function deployAction(ctx, options = {}) {
257606
256971
  if (project2.visibility) {
257607
256972
  summaryLines.push(` - Visibility: ${project2.visibility}`);
257608
256973
  }
257609
- if (fullStackArtifact) {
257610
- summaryLines.push(" - Full-stack app");
257611
- } else if (project2.site?.outputDirectory) {
256974
+ if (project2.site?.outputDirectory) {
257612
256975
  summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
257613
256976
  }
257614
256977
  if (!options.yes) {
@@ -257629,7 +256992,6 @@ ${summaryLines.join(`
257629
256992
  let functionCompleted = 0;
257630
256993
  const functionTotal = functions.length;
257631
256994
  const result = await deployAll(projectData, {
257632
- site: false,
257633
256995
  onVisibilitySet: (level) => {
257634
256996
  log.success(`App visibility set to ${level}`);
257635
256997
  },
@@ -257642,20 +257004,6 @@ ${summaryLines.join(`
257642
257004
  formatDeployResult(r, log);
257643
257005
  }
257644
257006
  });
257645
- await buildSiteIfNeeded(ctx, projectData, options, fullStackArtifact);
257646
- fullStackArtifact = await detectFullStackArtifact(project2.root);
257647
- let appUrl;
257648
- let fullStackResult;
257649
- if (fullStackArtifact) {
257650
- fullStackResult = await runFullStackDeploy(ctx, project2.root, options);
257651
- } else if (project2.site?.outputDirectory) {
257652
- const outputDir = resolve11(project2.root, project2.site.outputDirectory);
257653
- if (staticWorkersEnabled()) {
257654
- fullStackResult = await runFullStackDeploy(ctx, project2.root, options, outputDir);
257655
- } else {
257656
- ({ appUrl } = await deploySite(outputDir));
257657
- }
257658
- }
257659
257007
  const connectorResults = result.connectorResults ?? [];
257660
257008
  await handleOAuthConnectors(connectorResults, isNonInteractive, options, log);
257661
257009
  const stripeResult = connectorResults.find((r) => r.type === "stripe");
@@ -257663,83 +257011,13 @@ ${summaryLines.join(`
257663
257011
  printStripeResult(stripeResult, log);
257664
257012
  }
257665
257013
  log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
257666
- if (appUrl) {
257667
- log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(appUrl)}`);
257014
+ if (result.appUrl) {
257015
+ log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
257668
257016
  }
257669
- if (fullStackResult) {
257670
- printFullStackSummary(fullStackResult, log);
257671
- }
257672
- return {
257673
- outroMessage: "App deployed successfully",
257674
- stdout: ctx.jsonMode && fullStackResult ? `${JSON.stringify({
257675
- deploymentId: fullStackResult.deploymentId,
257676
- gitHash: fullStackResult.gitHash
257677
- }, null, 2)}
257678
- ` : undefined
257679
- };
257680
- }
257681
- async function buildSiteIfNeeded({ runTask: runTask2 }, { project: project2 }, options, fullStackArtifact) {
257682
- const site2 = project2.site;
257683
- if (!site2?.buildCommand || options.prebuilt)
257684
- return;
257685
- const artifactPresent = fullStackArtifact !== null || (site2.outputDirectory ? await pathExists(resolve11(project2.root, site2.outputDirectory)) : false);
257686
- if (artifactPresent && !options.build)
257687
- return;
257688
- const { installCommand, buildCommand } = site2;
257689
- await runTask2(installCommand ? "Installing dependencies..." : "Building project...", async (updateMessage) => {
257690
- if (installCommand) {
257691
- await execa({ cwd: project2.root, shell: true })`${installCommand}`;
257692
- updateMessage("Building project...");
257693
- }
257694
- await execa({ cwd: project2.root, shell: true })`${buildCommand}`;
257695
- }, {
257696
- successMessage: "Project built successfully",
257697
- errorMessage: "Failed to build project"
257698
- });
257699
- }
257700
- async function runFullStackDeploy({ runTask: runTask2, log }, projectRoot, options, staticOutputDir) {
257701
- const gitHash = await resolveGitHash(projectRoot, options.gitHash);
257702
- const progressLines = [];
257703
- const warnings = [];
257704
- const deployment = await runTask2(staticOutputDir ? "Deploying site to Workers..." : "Deploying full-stack app...", async (updateMessage) => {
257705
- const progress = {
257706
- onWarning: (message) => {
257707
- warnings.push(message);
257708
- },
257709
- onAssets: ({ totalAssets, newAssets }) => {
257710
- const line = `Found ${totalAssets} static assets (${newAssets} new)`;
257711
- progressLines.push(line);
257712
- updateMessage(line);
257713
- },
257714
- onAssetUpload: ({ uploadedFiles, totalFiles }) => {
257715
- updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
257716
- },
257717
- onWorker: ({ moduleCount }) => {
257718
- updateMessage(`Deploying worker (${moduleCount} modules)…`);
257719
- }
257720
- };
257721
- return staticOutputDir ? await deployStaticSite({
257722
- outputDir: staticOutputDir,
257723
- gitHash,
257724
- progress
257725
- }) : await deployFullStack({ projectRoot, gitHash, progress });
257726
- }, {
257727
- successMessage: theme.colors.base44Orange(staticOutputDir ? "Site deployed to Workers" : "Full-stack app deployed"),
257728
- errorMessage: staticOutputDir ? "Site deploy failed" : "Full-stack deploy failed"
257729
- });
257730
- for (const line of progressLines) {
257731
- log.message(theme.styles.dim(line));
257732
- }
257733
- for (const warning of warnings) {
257734
- log.warn(warning);
257735
- }
257736
- return deployment;
257737
- }
257738
- function printFullStackSummary(deployment, log) {
257739
- log.message(`${theme.styles.header("Deployment")}: ${deployment.deploymentId} ${theme.styles.dim(`(commit ${deployment.gitHash.slice(0, 12)})`)}`);
257017
+ return { outroMessage: "App deployed successfully" };
257740
257018
  }
257741
257019
  function getDeployCommand2() {
257742
- 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);
257020
+ return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(deployAction);
257743
257021
  }
257744
257022
  async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
257745
257023
  const needsOAuth = filterPendingOAuth(connectorResults);
@@ -258017,7 +257295,7 @@ async function followLogs(functionNames, options, availableFunctionNames, jsonMo
258017
257295
  for (const entry of fresh)
258018
257296
  writeFollowLine(entry, jsonMode);
258019
257297
  first = false;
258020
- await new Promise((resolve12) => setTimeout(resolve12, 2000));
257298
+ await new Promise((resolve9) => setTimeout(resolve9, 2000));
258021
257299
  }
258022
257300
  }
258023
257301
  function formatLogs(entries, env3) {
@@ -258131,7 +257409,7 @@ function getLogsCommand() {
258131
257409
  }
258132
257410
 
258133
257411
  // src/cli/commands/project/scaffold.ts
258134
- import { basename as basename5, resolve as resolve12 } from "node:path";
257412
+ import { basename as basename5, resolve as resolve9 } from "node:path";
258135
257413
  function resolveAppId(options) {
258136
257414
  const appId = options.appId;
258137
257415
  if (!appId) {
@@ -258147,7 +257425,7 @@ function resolveAppId(options) {
258147
257425
  async function scaffoldAction(ctx, name2, options, command2) {
258148
257426
  const { log, runTask: runTask2 } = ctx;
258149
257427
  const appId = resolveAppId(command2.optsWithGlobals());
258150
- const resolvedPath = resolve12("./");
257428
+ const resolvedPath = resolve9("./");
258151
257429
  const projectName = (name2 ?? basename5(resolvedPath)).trim();
258152
257430
  const template2 = await getTemplateById("backend-only");
258153
257431
  log.info(`Scaffolding project at ${resolvedPath}`);
@@ -258313,7 +257591,7 @@ function withSandboxAuthHint(error48) {
258313
257591
  cause: error48
258314
257592
  });
258315
257593
  }
258316
- async function callTool(appId, tool, payload, schema13, context, timeout2 = 60000) {
257594
+ async function callTool(appId, tool, payload, schema12, context, timeout2 = 60000) {
258317
257595
  const client = getSandboxClient(appId);
258318
257596
  let response;
258319
257597
  try {
@@ -258321,7 +257599,7 @@ async function callTool(appId, tool, payload, schema13, context, timeout2 = 6000
258321
257599
  } catch (error48) {
258322
257600
  throw withSandboxAuthHint(await ApiError.fromHttpError(error48, context));
258323
257601
  }
258324
- const result = schema13.safeParse(await response.json());
257602
+ const result = schema12.safeParse(await response.json());
258325
257603
  if (!result.success) {
258326
257604
  throw new SchemaValidationError("Invalid response from server", result.error);
258327
257605
  }
@@ -258330,7 +257608,7 @@ async function callTool(appId, tool, payload, schema13, context, timeout2 = 6000
258330
257608
  function listDirectory(appId, params) {
258331
257609
  return callTool(appId, "list_directory", { ...params }, ListDirectoryResponseSchema, "listing directory");
258332
257610
  }
258333
- function readFile5(appId, params) {
257611
+ function readFile2(appId, params) {
258334
257612
  return callTool(appId, "read_file", { ...params }, ReadFileResponseSchema, "reading file");
258335
257613
  }
258336
257614
  function writeFile2(appId, params) {
@@ -258460,7 +257738,7 @@ async function readFileAction({ runTask: runTask2 }, paths, options) {
258460
257738
  const { id: appId } = getAppContext();
258461
257739
  const offset = parsePositiveInt(options.offset, "--offset");
258462
257740
  const limit = parsePositiveInt(options.limit, "--limit");
258463
- const result = await runTask2("Reading file", () => readFile5(appId, { paths, offset, limit }));
257741
+ const result = await runTask2("Reading file", () => readFile2(appId, { paths, offset, limit }));
258464
257742
  return { outroMessage: "Read file", stdout: toJsonStdout(result) };
258465
257743
  }
258466
257744
  function getSandboxReadFileCommand() {
@@ -258544,7 +257822,7 @@ function getSecretsListCommand() {
258544
257822
  }
258545
257823
 
258546
257824
  // src/cli/commands/secrets/set.ts
258547
- import { resolve as resolve13 } from "node:path";
257825
+ import { resolve as resolve10 } from "node:path";
258548
257826
  function parseEntries(entries) {
258549
257827
  const secrets = {};
258550
257828
  for (const entry of entries) {
@@ -258575,7 +257853,7 @@ async function setSecretsAction({ log, runTask: runTask2 }, entries, options) {
258575
257853
  validateInput(entries, options);
258576
257854
  let secrets;
258577
257855
  if (options.envFile) {
258578
- secrets = await parseEnvFile(resolve13(options.envFile));
257856
+ secrets = await parseEnvFile(resolve10(options.envFile));
258579
257857
  if (Object.keys(secrets).length === 0) {
258580
257858
  throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
258581
257859
  }
@@ -258604,7 +257882,7 @@ function getSecretsCommand() {
258604
257882
  }
258605
257883
 
258606
257884
  // src/cli/commands/site/deploy.ts
258607
- import { resolve as resolve14 } from "node:path";
257885
+ import { resolve as resolve11 } from "node:path";
258608
257886
  async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
258609
257887
  if (isNonInteractive && !options.yes) {
258610
257888
  throw new InvalidInputError("--yes is required in non-interactive mode");
@@ -258619,7 +257897,7 @@ async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
258619
257897
  ]
258620
257898
  });
258621
257899
  }
258622
- const outputDir = resolve14(project2.root, project2.site.outputDirectory);
257900
+ const outputDir = resolve11(project2.root, project2.site.outputDirectory);
258623
257901
  if (!options.yes) {
258624
257902
  const shouldDeploy = await Re({
258625
257903
  message: `Deploy site from ${project2.site.outputDirectory}?`
@@ -258715,9 +257993,9 @@ async function generateContent(input) {
258715
257993
  `);
258716
257994
  }
258717
257995
  async function compileEntity(entity2) {
258718
- const { name: name2, source: _source, ...schema13 } = entity2;
257996
+ const { name: name2, source: _source, ...schema12 } = entity2;
258719
257997
  const jsonSchema = {
258720
- ...schema13,
257998
+ ...schema12,
258721
257999
  title: name2,
258722
258000
  additionalProperties: false
258723
258001
  };
@@ -258744,10 +258022,10 @@ function toPascalCase(name2) {
258744
258022
  return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
258745
258023
  }
258746
258024
  // src/core/types/update-project.ts
258747
- import { join as join28 } from "node:path";
258025
+ import { join as join26 } from "node:path";
258748
258026
  var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
258749
258027
  async function updateProjectConfig(projectRoot) {
258750
- const tsconfigPath = join28(projectRoot, "tsconfig.json");
258028
+ const tsconfigPath = join26(projectRoot, "tsconfig.json");
258751
258029
  if (!await pathExists(tsconfigPath)) {
258752
258030
  return false;
258753
258031
  }
@@ -258982,7 +258260,7 @@ function createDevLogger(label2, labelColor = theme.styles.dim) {
258982
258260
  // src/cli/dev/dev-server/main.ts
258983
258261
  var import_cors = __toESM(require_lib4(), 1);
258984
258262
  var import_express6 = __toESM(require_express(), 1);
258985
- import { dirname as dirname24, join as join35 } from "node:path";
258263
+ import { dirname as dirname23, join as join31 } from "node:path";
258986
258264
 
258987
258265
  // ../../node_modules/get-port/index.js
258988
258266
  import net from "node:net";
@@ -259009,14 +258287,14 @@ var getLocalHosts = () => {
259009
258287
  }
259010
258288
  return results;
259011
258289
  };
259012
- var checkAvailablePort = (options8) => new Promise((resolve16, reject) => {
258290
+ var checkAvailablePort = (options8) => new Promise((resolve13, reject) => {
259013
258291
  const server = net.createServer();
259014
258292
  server.unref();
259015
258293
  server.on("error", reject);
259016
258294
  server.listen(options8, () => {
259017
258295
  const { port } = server.address();
259018
258296
  server.close(() => {
259019
- resolve16(port);
258297
+ resolve13(port);
259020
258298
  });
259021
258299
  });
259022
258300
  });
@@ -259117,7 +258395,7 @@ var $setGracefulCleanup = tmp.setGracefulCleanup;
259117
258395
 
259118
258396
  // src/cli/dev/dev-server/function-manager.ts
259119
258397
  import { spawn as spawn2 } from "node:child_process";
259120
- import { dirname as dirname21, join as join29 } from "node:path";
258398
+ import { dirname as dirname20, join as join27 } from "node:path";
259121
258399
  import { pathToFileURL } from "node:url";
259122
258400
 
259123
258401
  // src/cli/dev/dev-server/base-function-manager.ts
@@ -259222,7 +258500,7 @@ class FunctionManager extends BaseFunctionManager {
259222
258500
  }
259223
258501
  spawnFunction(func, port) {
259224
258502
  this.logger.log(`Spawning function "${func.name}" on port ${port}`);
259225
- const importMapPath = join29(dirname21(this.wrapperPath), "import-map.json");
258503
+ const importMapPath = join27(dirname20(this.wrapperPath), "import-map.json");
259226
258504
  const process23 = spawn2("deno", ["run", "--allow-all", "--import-map", importMapPath, this.wrapperPath], {
259227
258505
  env: {
259228
258506
  ...globalThis.process.env,
@@ -259261,7 +258539,7 @@ class FunctionManager extends BaseFunctionManager {
259261
258539
  });
259262
258540
  }
259263
258541
  waitForReady(name2, runningFunc) {
259264
- return new Promise((resolve16, reject) => {
258542
+ return new Promise((resolve13, reject) => {
259265
258543
  runningFunc.process.on("exit", (code2) => {
259266
258544
  if (!runningFunc.ready) {
259267
258545
  clearTimeout(timeout3);
@@ -259284,7 +258562,7 @@ class FunctionManager extends BaseFunctionManager {
259284
258562
  runningFunc.ready = true;
259285
258563
  clearTimeout(timeout3);
259286
258564
  runningFunc.process.stdout?.off("data", onData);
259287
- resolve16(runningFunc.port);
258565
+ resolve13(runningFunc.port);
259288
258566
  }
259289
258567
  };
259290
258568
  runningFunc.process.stdout?.on("data", onData);
@@ -259296,7 +258574,7 @@ class FunctionManager extends BaseFunctionManager {
259296
258574
  import { mkdirSync as mkdirSync2, writeFileSync as writeFileSync2 } from "node:fs";
259297
258575
  import { isBuiltin } from "node:module";
259298
258576
  import { homedir as homedir3 } from "node:os";
259299
- import { join as join30 } from "node:path";
258577
+ import { join as join28 } from "node:path";
259300
258578
  import { pathToFileURL as pathToFileURL6 } from "node:url";
259301
258579
  var depsPromise;
259302
258580
  function loadDeps() {
@@ -259417,9 +258695,9 @@ export default {
259417
258695
  };
259418
258696
  `;
259419
258697
  function ensureBundlerConfig() {
259420
- const dir = join30(homedir3(), ".base44", "function-bundler");
258698
+ const dir = join28(homedir3(), ".base44", "function-bundler");
259421
258699
  mkdirSync2(dir, { recursive: true });
259422
- const configPath = join30(dir, "deno.json");
258700
+ const configPath = join28(dir, "deno.json");
259423
258701
  writeFileSync2(configPath, `${JSON.stringify({ nodeModulesDir: "auto" }, null, 2)}
259424
258702
  `);
259425
258703
  return configPath;
@@ -260007,22 +259285,22 @@ class Database {
260007
259285
  this.schemas.clear();
260008
259286
  }
260009
259287
  validate(entityName, record2, partial2 = false) {
260010
- const schema13 = this.schemas.get(this.normalizeName(entityName));
260011
- if (!schema13) {
259288
+ const schema12 = this.schemas.get(this.normalizeName(entityName));
259289
+ if (!schema12) {
260012
259290
  throw new Error(`Entity "${entityName}" not found`);
260013
259291
  }
260014
- return this.validator.validate(record2, schema13, partial2);
259292
+ return this.validator.validate(record2, schema12, partial2);
260015
259293
  }
260016
259294
  prepareRecord(entityName, record2, partial2 = false) {
260017
- const schema13 = this.schemas.get(this.normalizeName(entityName));
260018
- if (!schema13) {
259295
+ const schema12 = this.schemas.get(this.normalizeName(entityName));
259296
+ if (!schema12) {
260019
259297
  throw new Error(`Entity "${entityName}" not found`);
260020
259298
  }
260021
- const filteredRecord = this.validator.filterFields(record2, schema13);
259299
+ const filteredRecord = this.validator.filterFields(record2, schema12);
260022
259300
  if (partial2) {
260023
259301
  return filteredRecord;
260024
259302
  }
260025
- return this.validator.applyDefaults(filteredRecord, schema13);
259303
+ return this.validator.applyDefaults(filteredRecord, schema12);
260026
259304
  }
260027
259305
  normalizeName(entityName) {
260028
259306
  return entityName.toLowerCase();
@@ -260316,13 +259594,13 @@ function checkRLS(rule, record2, user) {
260316
259594
  return false;
260317
259595
  return evaluateCondition(rule, record2, user);
260318
259596
  }
260319
- function applyFLS(record2, schema13, user, operation) {
259597
+ function applyFLS(record2, schema12, user, operation) {
260320
259598
  if (Array.isArray(record2)) {
260321
- return record2.map((r5) => applyFLS(r5, schema13, user, operation));
259599
+ return record2.map((r5) => applyFLS(r5, schema12, user, operation));
260322
259600
  }
260323
259601
  const result = {};
260324
259602
  for (const [key2, value] of Object.entries(record2)) {
260325
- const rule = schema13.properties[key2]?.rls?.[operation];
259603
+ const rule = schema12.properties[key2]?.rls?.[operation];
260326
259604
  if (rule === undefined || checkRLS(rule, record2, user)) {
260327
259605
  result[key2] = value;
260328
259606
  }
@@ -260550,14 +259828,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260550
259828
  res.status(404).json({ error: `Entity "${entityName}" not found` });
260551
259829
  return;
260552
259830
  }
260553
- const schema13 = db2.getSchema(entityName);
260554
- if (!schema13) {
259831
+ const schema12 = db2.getSchema(entityName);
259832
+ if (!schema12) {
260555
259833
  res.status(404).json({ error: `Schema for "${entityName}" not found` });
260556
259834
  return;
260557
259835
  }
260558
259836
  const currentUserResult = await resolveCurrentUser(db2, req);
260559
259837
  const currentUser = currentUserResult.ok ? currentUserResult.user : undefined;
260560
- await handler(req, res, collection, schema13, currentUser);
259838
+ await handler(req, res, collection, schema12, currentUser);
260561
259839
  };
260562
259840
  }
260563
259841
  function emit(appId, entityName, type, data) {
@@ -260575,19 +259853,19 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260575
259853
  }
260576
259854
  broadcast(appId, entityName, createData(data));
260577
259855
  }
260578
- function prepareCreateRecord(entityName, body, schema13, currentUser, now) {
259856
+ function prepareCreateRecord(entityName, body, schema12, currentUser, now) {
260579
259857
  const { _id, ...recordBody } = body;
260580
259858
  const ownerFields = {
260581
259859
  created_by: currentUser?.email,
260582
259860
  created_by_id: currentUser?.id
260583
259861
  };
260584
- if (!checkRLS(schema13.rls?.create, {
259862
+ if (!checkRLS(schema12.rls?.create, {
260585
259863
  ...recordBody,
260586
259864
  ...ownerFields
260587
259865
  }, currentUser)) {
260588
259866
  return;
260589
259867
  }
260590
- const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema13, currentUser, "write");
259868
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, recordBody), schema12, currentUser, "write");
260591
259869
  db2.validate(entityName, filteredBody);
260592
259870
  return {
260593
259871
  ...filteredBody,
@@ -260599,7 +259877,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260599
259877
  }
260600
259878
  const userRouter = createUserRouter(db2, logger2);
260601
259879
  router.use("/User", userRouter);
260602
- router.get("/:entityName/:id", withCollection(async (req, res, collection, schema13, currentUser) => {
259880
+ router.get("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
260603
259881
  const { entityName, id: id2 } = req.params;
260604
259882
  try {
260605
259883
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -260607,27 +259885,27 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260607
259885
  res.status(404).json({ error: `Record with id "${id2}" not found` });
260608
259886
  return;
260609
259887
  }
260610
- if (!checkRLS(schema13.rls?.read, doc2, currentUser)) {
259888
+ if (!checkRLS(schema12.rls?.read, doc2, currentUser)) {
260611
259889
  res.status(404).json({
260612
259890
  message: `Entity ${entityName} with ID ${id2} not found`
260613
259891
  });
260614
259892
  return;
260615
259893
  }
260616
- const result = applyFLS(stripInternalFields(doc2), schema13, currentUser, "read");
259894
+ const result = applyFLS(stripInternalFields(doc2), schema12, currentUser, "read");
260617
259895
  res.json(result);
260618
259896
  } catch (error48) {
260619
259897
  logger2.error(`Error in GET /${entityName}/${id2}:`, error48);
260620
259898
  res.status(500).json({ error: "Internal server error" });
260621
259899
  }
260622
259900
  }));
260623
- router.get("/:entityName", withCollection(async (req, res, collection, schema13, currentUser) => {
259901
+ router.get("/:entityName", withCollection(async (req, res, collection, schema12, currentUser) => {
260624
259902
  const { entityName } = req.params;
260625
259903
  try {
260626
259904
  let results = stripInternalFields(await queryEntity(collection, req.query));
260627
- if (schema13.rls?.read !== undefined && schema13.rls.read !== true) {
260628
- results = results.filter((doc2) => checkRLS(schema13.rls.read, doc2, currentUser));
259905
+ if (schema12.rls?.read !== undefined && schema12.rls.read !== true) {
259906
+ results = results.filter((doc2) => checkRLS(schema12.rls.read, doc2, currentUser));
260629
259907
  }
260630
- results = results.map((doc2) => applyFLS(doc2, schema13, currentUser, "read"));
259908
+ results = results.map((doc2) => applyFLS(doc2, schema12, currentUser, "read"));
260631
259909
  res.json(results);
260632
259910
  } catch (error48) {
260633
259911
  if (error48 instanceof InvalidInputError) {
@@ -260638,16 +259916,16 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260638
259916
  }
260639
259917
  }
260640
259918
  }));
260641
- router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
259919
+ router.post("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260642
259920
  const { appId, entityName } = req.params;
260643
259921
  try {
260644
259922
  const now = new Date().toISOString();
260645
- const record2 = prepareCreateRecord(entityName, req.body, schema13, currentUser, now);
259923
+ const record2 = prepareCreateRecord(entityName, req.body, schema12, currentUser, now);
260646
259924
  if (!record2) {
260647
259925
  res.status(403).json({ error: "Permission denied" });
260648
259926
  return;
260649
259927
  }
260650
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema13, currentUser, "read");
259928
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(record2)), schema12, currentUser, "read");
260651
259929
  emit(appId, entityName, "create", inserted);
260652
259930
  res.status(201).json(inserted);
260653
259931
  } catch (error48) {
@@ -260659,7 +259937,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260659
259937
  res.status(500).json({ error: "Internal server error" });
260660
259938
  }
260661
259939
  }));
260662
- router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
259940
+ router.post("/:entityName/bulk", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260663
259941
  const { appId, entityName } = req.params;
260664
259942
  if (!Array.isArray(req.body)) {
260665
259943
  res.status(400).json({ error: "Request body must be an array" });
@@ -260669,14 +259947,14 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260669
259947
  const now = new Date().toISOString();
260670
259948
  const records = [];
260671
259949
  for (const body of req.body) {
260672
- const record2 = prepareCreateRecord(entityName, body, schema13, currentUser, now);
259950
+ const record2 = prepareCreateRecord(entityName, body, schema12, currentUser, now);
260673
259951
  if (!record2) {
260674
259952
  res.status(403).json({ error: "Permission denied" });
260675
259953
  return;
260676
259954
  }
260677
259955
  records.push(record2);
260678
259956
  }
260679
- const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema13, currentUser, "read");
259957
+ const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema12, currentUser, "read");
260680
259958
  emit(appId, entityName, "create", inserted);
260681
259959
  res.status(201).json(inserted);
260682
259960
  } catch (error48) {
@@ -260688,24 +259966,24 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260688
259966
  res.status(500).json({ error: "Internal server error" });
260689
259967
  }
260690
259968
  }));
260691
- router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
259969
+ router.put("/:entityName/:id", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260692
259970
  const { appId, entityName, id: id2 } = req.params;
260693
259971
  const { id: _id, created_date: _created_date, ...body } = req.body;
260694
259972
  try {
260695
- if (schema13.rls?.update !== undefined) {
259973
+ if (schema12.rls?.update !== undefined) {
260696
259974
  const existing = await collection.findOneAsync({ id: id2 });
260697
259975
  if (!existing) {
260698
259976
  res.status(404).json({ error: `Record with id "${id2}" not found` });
260699
259977
  return;
260700
259978
  }
260701
- if (!checkRLS(schema13.rls.update, existing, currentUser)) {
259979
+ if (!checkRLS(schema12.rls.update, existing, currentUser)) {
260702
259980
  res.status(404).json({
260703
259981
  message: `Entity ${entityName} with ID ${id2} not found`
260704
259982
  });
260705
259983
  return;
260706
259984
  }
260707
259985
  }
260708
- const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema13, currentUser, "write");
259986
+ const filteredBody = applyFLS(db2.prepareRecord(entityName, body, true), schema12, currentUser, "write");
260709
259987
  db2.validate(entityName, filteredBody, true);
260710
259988
  const updateData = {
260711
259989
  ...filteredBody,
@@ -260716,7 +259994,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260716
259994
  res.status(404).json({ error: `Record with id "${id2}" not found` });
260717
259995
  return;
260718
259996
  }
260719
- const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema13, currentUser, "read");
259997
+ const updated = applyFLS(stripInternalFields(result.affectedDocuments), schema12, currentUser, "read");
260720
259998
  emit(appId, entityName, "update", updated);
260721
259999
  res.json(updated);
260722
260000
  } catch (error48) {
@@ -260728,7 +260006,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260728
260006
  res.status(500).json({ error: "Internal server error" });
260729
260007
  }
260730
260008
  }));
260731
- router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema13, currentUser) => {
260009
+ router.delete("/:entityName/:id", withCollection(async (req, res, collection, schema12, currentUser) => {
260732
260010
  const { appId, entityName, id: id2 } = req.params;
260733
260011
  try {
260734
260012
  const doc2 = await collection.findOneAsync({ id: id2 });
@@ -260736,7 +260014,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260736
260014
  res.status(404).json({ error: `Record with id "${id2}" not found` });
260737
260015
  return;
260738
260016
  }
260739
- if (!checkRLS(schema13.rls?.delete, doc2, currentUser)) {
260017
+ if (!checkRLS(schema12.rls?.delete, doc2, currentUser)) {
260740
260018
  res.status(404).json({
260741
260019
  message: `Entity ${entityName} with ID ${id2} not found`
260742
260020
  });
@@ -260750,11 +260028,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260750
260028
  res.status(500).json({ error: "Internal server error" });
260751
260029
  }
260752
260030
  }));
260753
- router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema13, currentUser) => {
260031
+ router.delete("/:entityName", parseBody, withCollection(async (req, res, collection, schema12, currentUser) => {
260754
260032
  const { entityName } = req.params;
260755
260033
  try {
260756
260034
  const query = req.body || {};
260757
- const rlsDelete = schema13?.rls?.delete;
260035
+ const rlsDelete = schema12?.rls?.delete;
260758
260036
  if (rlsDelete !== undefined && rlsDelete !== true) {
260759
260037
  if (rlsDelete === false && currentUser?.is_service !== true) {
260760
260038
  res.status(403).json({ error: "Permission denied" });
@@ -260781,11 +260059,11 @@ async function createEntityRoutes(db2, logger2, broadcast) {
260781
260059
  // src/cli/dev/dev-server/routes/integrations.ts
260782
260060
  var import_express5 = __toESM(require_express(), 1);
260783
260061
  var import_multer = __toESM(require_multer(), 1);
260784
- import { createHash as createHash2, randomUUID as randomUUID4 } from "node:crypto";
260062
+ import { createHash, randomUUID as randomUUID4 } from "node:crypto";
260785
260063
  import fs28 from "node:fs";
260786
260064
  import path18 from "node:path";
260787
260065
  function createFileToken(fileUri) {
260788
- return createHash2("sha256").update(fileUri).digest("hex");
260066
+ return createHash("sha256").update(fileUri).digest("hex");
260789
260067
  }
260790
260068
  function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger2) {
260791
260069
  const router = import_express5.Router({ mergeParams: true });
@@ -260808,12 +260086,12 @@ function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger2) {
260808
260086
  cb2(null, `${randomUUID4()}${ext}`);
260809
260087
  }
260810
260088
  });
260811
- const upload2 = import_multer.default({ storage, limits: { fileSize: MAX_FILE_SIZE } });
260089
+ const upload = import_multer.default({ storage, limits: { fileSize: MAX_FILE_SIZE } });
260812
260090
  const privateUpload = import_multer.default({
260813
260091
  storage: privateStorage,
260814
260092
  limits: { fileSize: MAX_FILE_SIZE }
260815
260093
  });
260816
- router.post("/Core/UploadFile", upload2.single("file"), (req, res) => {
260094
+ router.post("/Core/UploadFile", upload.single("file"), (req, res) => {
260817
260095
  if (!req.file) {
260818
260096
  res.status(400).json({ error: "No file uploaded" });
260819
260097
  return;
@@ -260870,16 +260148,16 @@ function createCustomIntegrationRoutes(remoteProxy, logger2) {
260870
260148
 
260871
260149
  // src/cli/dev/dev-server/watcher.ts
260872
260150
  import { EventEmitter as EventEmitter4 } from "node:events";
260873
- import { relative as relative7 } from "node:path";
260151
+ import { relative as relative6 } from "node:path";
260874
260152
 
260875
260153
  // ../../node_modules/chokidar/index.js
260876
260154
  import { EventEmitter as EventEmitter3 } from "node:events";
260877
260155
  import { stat as statcb, Stats } from "node:fs";
260878
- import { readdir as readdir4, stat as stat6 } from "node:fs/promises";
260156
+ import { readdir as readdir3, stat as stat4 } from "node:fs/promises";
260879
260157
  import * as sp3 from "node:path";
260880
260158
 
260881
260159
  // ../../node_modules/readdirp/index.js
260882
- import { lstat as lstat2, readdir as readdir3, realpath, stat as stat4 } from "node:fs/promises";
260160
+ import { lstat as lstat2, readdir as readdir2, realpath, stat as stat2 } from "node:fs/promises";
260883
260161
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
260884
260162
  import { Readable as Readable6 } from "node:stream";
260885
260163
  var EntryTypes = {
@@ -260961,7 +260239,7 @@ class ReaddirpStream extends Readable6 {
260961
260239
  const { root: root2, type } = opts;
260962
260240
  this._fileFilter = normalizeFilter(opts.fileFilter);
260963
260241
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
260964
- const statMethod = opts.lstat ? lstat2 : stat4;
260242
+ const statMethod = opts.lstat ? lstat2 : stat2;
260965
260243
  if (wantBigintFsStats) {
260966
260244
  this._stat = (path19) => statMethod(path19, { bigint: true });
260967
260245
  } else {
@@ -261032,7 +260310,7 @@ class ReaddirpStream extends Readable6 {
261032
260310
  async _exploreDir(path19, depth) {
261033
260311
  let files;
261034
260312
  try {
261035
- files = await readdir3(path19, this._rdOptions);
260313
+ files = await readdir2(path19, this._rdOptions);
261036
260314
  } catch (error48) {
261037
260315
  this._onError(error48);
261038
260316
  }
@@ -261114,7 +260392,7 @@ function readdirp(root2, options8 = {}) {
261114
260392
 
261115
260393
  // ../../node_modules/chokidar/handler.js
261116
260394
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
261117
- import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat5 } from "node:fs/promises";
260395
+ import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat3 } from "node:fs/promises";
261118
260396
  import { type as osType } from "node:os";
261119
260397
  import * as sp2 from "node:path";
261120
260398
  var STR_DATA = "data";
@@ -261140,7 +260418,7 @@ var EVENTS = {
261140
260418
  };
261141
260419
  var EV = EVENTS;
261142
260420
  var THROTTLE_MODE_WATCH = "watch";
261143
- var statMethods = { lstat: lstat3, stat: stat5 };
260421
+ var statMethods = { lstat: lstat3, stat: stat3 };
261144
260422
  var KEY_LISTENERS = "listeners";
261145
260423
  var KEY_ERR = "errHandlers";
261146
260424
  var KEY_RAW = "rawEmitters";
@@ -261600,9 +260878,9 @@ class NodeFsHandler {
261600
260878
  if (this.fsw.closed) {
261601
260879
  return;
261602
260880
  }
261603
- const dirname23 = sp2.dirname(file2);
260881
+ const dirname22 = sp2.dirname(file2);
261604
260882
  const basename7 = sp2.basename(file2);
261605
- const parent = this.fsw._getWatchedDir(dirname23);
260883
+ const parent = this.fsw._getWatchedDir(dirname22);
261606
260884
  let prevStats = stats;
261607
260885
  if (parent.has(basename7))
261608
260886
  return;
@@ -261611,7 +260889,7 @@ class NodeFsHandler {
261611
260889
  return;
261612
260890
  if (!newStats || newStats.mtimeMs === 0) {
261613
260891
  try {
261614
- const newStats2 = await stat5(file2);
260892
+ const newStats2 = await stat3(file2);
261615
260893
  if (this.fsw.closed)
261616
260894
  return;
261617
260895
  const at13 = newStats2.atimeMs;
@@ -261629,7 +260907,7 @@ class NodeFsHandler {
261629
260907
  prevStats = newStats2;
261630
260908
  }
261631
260909
  } catch (error48) {
261632
- this.fsw._remove(dirname23, basename7);
260910
+ this.fsw._remove(dirname22, basename7);
261633
260911
  }
261634
260912
  } else if (parent.has(basename7)) {
261635
260913
  const at13 = newStats.atimeMs;
@@ -261718,7 +260996,7 @@ class NodeFsHandler {
261718
260996
  this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
261719
260997
  }
261720
260998
  }).on(EV.ERROR, this._boundHandleError);
261721
- return new Promise((resolve17, reject) => {
260999
+ return new Promise((resolve14, reject) => {
261722
261000
  if (!stream)
261723
261001
  return reject();
261724
261002
  stream.once(STR_END, () => {
@@ -261727,7 +261005,7 @@ class NodeFsHandler {
261727
261005
  return;
261728
261006
  }
261729
261007
  const wasThrottled = throttler ? throttler.clear() : false;
261730
- resolve17(undefined);
261008
+ resolve14(undefined);
261731
261009
  previous.getChildren().filter((item) => {
261732
261010
  return item !== directory && !current.has(item);
261733
261011
  }).forEach((item) => {
@@ -261852,11 +261130,11 @@ function createPattern(matcher) {
261852
261130
  if (matcher.path === string4)
261853
261131
  return true;
261854
261132
  if (matcher.recursive) {
261855
- const relative7 = sp3.relative(matcher.path, string4);
261856
- if (!relative7) {
261133
+ const relative6 = sp3.relative(matcher.path, string4);
261134
+ if (!relative6) {
261857
261135
  return false;
261858
261136
  }
261859
- return !relative7.startsWith("..") && !sp3.isAbsolute(relative7);
261137
+ return !relative6.startsWith("..") && !sp3.isAbsolute(relative6);
261860
261138
  }
261861
261139
  return false;
261862
261140
  };
@@ -261959,7 +261237,7 @@ class DirEntry {
261959
261237
  return;
261960
261238
  const dir = this.path;
261961
261239
  try {
261962
- await readdir4(dir);
261240
+ await readdir3(dir);
261963
261241
  } catch (err) {
261964
261242
  if (this._removeWatcher) {
261965
261243
  this._removeWatcher(sp3.dirname(dir), sp3.basename(dir));
@@ -262283,7 +261561,7 @@ class FSWatcher extends EventEmitter3 {
262283
261561
  const fullPath = opts.cwd ? sp3.join(opts.cwd, path19) : path19;
262284
261562
  let stats2;
262285
261563
  try {
262286
- stats2 = await stat6(fullPath);
261564
+ stats2 = await stat4(fullPath);
262287
261565
  } catch (err) {}
262288
261566
  if (!stats2 || this.closed)
262289
261567
  return;
@@ -262387,8 +261665,8 @@ class FSWatcher extends EventEmitter3 {
262387
261665
  }
262388
261666
  return this._userIgnored(path19, stats);
262389
261667
  }
262390
- _isntIgnored(path19, stat7) {
262391
- return !this._isIgnored(path19, stat7);
261668
+ _isntIgnored(path19, stat5) {
261669
+ return !this._isIgnored(path19, stat5);
262392
261670
  }
262393
261671
  _getWatchHelpers(path19) {
262394
261672
  return new WatchHelper(path19, this.options.followSymlinks, this);
@@ -262555,7 +261833,7 @@ class WatchBase44 extends EventEmitter4 {
262555
261833
  ignoreInitial: true
262556
261834
  });
262557
261835
  watcher.on("all", import_debounce.default(async (_event, path19) => {
262558
- this.emit("change", name2, relative7(targetPath, path19));
261836
+ this.emit("change", name2, relative6(targetPath, path19));
262559
261837
  }, WATCH_DEBOUNCE_MS));
262560
261838
  watcher.on("error", (err) => {
262561
261839
  this.logger.error(`Watch handler failed for ${targetPath}`, err);
@@ -262644,7 +261922,7 @@ async function createDevServer(options8) {
262644
261922
  }
262645
261923
  remoteProxy(req, res, next);
262646
261924
  });
262647
- const server = await new Promise((resolve18, reject) => {
261925
+ const server = await new Promise((resolve15, reject) => {
262648
261926
  const s5 = app.listen(port, "127.0.0.1", (err) => {
262649
261927
  if (err) {
262650
261928
  if ("code" in err && err.code === "EADDRINUSE") {
@@ -262653,7 +261931,7 @@ async function createDevServer(options8) {
262653
261931
  reject(err);
262654
261932
  }
262655
261933
  } else {
262656
- resolve18(s5);
261934
+ resolve15(s5);
262657
261935
  }
262658
261936
  });
262659
261937
  });
@@ -262662,8 +261940,8 @@ async function createDevServer(options8) {
262662
261940
  broadcastEntityEvent(io6, appId, entityName, event);
262663
261941
  };
262664
261942
  const base44ConfigWatcher = new WatchBase44({
262665
- functions: join35(dirname24(project2.configPath), project2.functionsDir),
262666
- entities: join35(dirname24(project2.configPath), project2.entitiesDir)
261943
+ functions: join31(dirname23(project2.configPath), project2.functionsDir),
261944
+ entities: join31(dirname23(project2.configPath), project2.entitiesDir)
262667
261945
  }, devLogger);
262668
261946
  base44ConfigWatcher.on("change", async (name2) => {
262669
261947
  try {
@@ -262703,13 +261981,13 @@ async function createDevServer(options8) {
262703
261981
  if (!server.listening) {
262704
261982
  return;
262705
261983
  }
262706
- await new Promise((resolve18, reject) => {
261984
+ await new Promise((resolve15, reject) => {
262707
261985
  server.close((error48) => {
262708
261986
  if (error48) {
262709
261987
  reject(error48);
262710
261988
  return;
262711
261989
  }
262712
- resolve18();
261990
+ resolve15();
262713
261991
  });
262714
261992
  });
262715
261993
  };
@@ -262780,15 +262058,15 @@ class ServeRunner {
262780
262058
  return;
262781
262059
  }
262782
262060
  this.stopping = true;
262783
- const exited = new Promise((resolve18) => child.once("exit", () => resolve18()));
262061
+ const exited = new Promise((resolve15) => child.once("exit", () => resolve15()));
262784
262062
  if (process23.platform === "win32" && child.pid) {
262785
262063
  const taskkill = spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
262786
262064
  stdio: "ignore",
262787
262065
  windowsHide: true
262788
262066
  });
262789
- await new Promise((resolve18) => {
262790
- taskkill.once("exit", () => resolve18());
262791
- taskkill.once("error", () => resolve18());
262067
+ await new Promise((resolve15) => {
262068
+ taskkill.once("exit", () => resolve15());
262069
+ taskkill.once("error", () => resolve15());
262792
262070
  });
262793
262071
  } else if (child.pid) {
262794
262072
  try {
@@ -262958,13 +262236,13 @@ async function runScript(options8) {
262958
262236
  }
262959
262237
  // src/cli/commands/exec.ts
262960
262238
  function readStdin2() {
262961
- return new Promise((resolve18, reject) => {
262239
+ return new Promise((resolve15, reject) => {
262962
262240
  let data = "";
262963
262241
  process.stdin.setEncoding("utf-8");
262964
262242
  process.stdin.on("data", (chunk) => {
262965
262243
  data += chunk;
262966
262244
  });
262967
- process.stdin.on("end", () => resolve18(data));
262245
+ process.stdin.on("end", () => resolve15(data));
262968
262246
  process.stdin.on("error", reject);
262969
262247
  });
262970
262248
  }
@@ -263035,7 +262313,7 @@ Examples:
263035
262313
  }
263036
262314
 
263037
262315
  // src/cli/commands/project/eject.ts
263038
- import { resolve as resolve18 } from "node:path";
262316
+ import { resolve as resolve15 } from "node:path";
263039
262317
  var import_kebabCase2 = __toESM(require_kebabCase(), 1);
263040
262318
  async function eject(ctx, options8, command2) {
263041
262319
  const { log, runTask: runTask2, isNonInteractive } = ctx;
@@ -263099,7 +262377,7 @@ async function eject(ctx, options8, command2) {
263099
262377
  Ne("Operation cancelled.");
263100
262378
  throw new CLIExitError(0);
263101
262379
  }
263102
- const resolvedPath = resolve18(selectedPath);
262380
+ const resolvedPath = resolve15(selectedPath);
263103
262381
  await runTask2("Downloading your project's code...", async (updateMessage) => {
263104
262382
  await createProjectFilesForExistingProject({
263105
262383
  projectId,
@@ -263161,6 +262439,7 @@ function createProgram(context) {
263161
262439
  program2.addCommand(getCreateCommand());
263162
262440
  program2.addCommand(getScaffoldCommand());
263163
262441
  program2.addCommand(getDashboardCommand());
262442
+ program2.addCommand(getBuildCommand());
263164
262443
  program2.addCommand(getDeployCommand2());
263165
262444
  program2.addCommand(getVisibilityCommand());
263166
262445
  program2.addCommand(getLinkCommand());
@@ -263187,7 +262466,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
263187
262466
  import { release, type } from "node:os";
263188
262467
 
263189
262468
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
263190
- import { dirname as dirname25, posix, sep as sep2 } from "path";
262469
+ import { dirname as dirname24, posix, sep } from "path";
263191
262470
  function createModulerModifier() {
263192
262471
  const getModuleFromFileName = createGetModuleFromFilename();
263193
262472
  return async (frames) => {
@@ -263196,7 +262475,7 @@ function createModulerModifier() {
263196
262475
  return frames;
263197
262476
  };
263198
262477
  }
263199
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname25(process.argv[1]) : process.cwd(), isWindows5 = sep2 === "\\") {
262478
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname24(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
263200
262479
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
263201
262480
  return (filename) => {
263202
262481
  if (!filename)
@@ -265474,14 +264753,14 @@ async function addSourceContext(frames) {
265474
264753
  return frames;
265475
264754
  }
265476
264755
  function getContextLinesFromFile(path19, ranges, output) {
265477
- return new Promise((resolve19) => {
264756
+ return new Promise((resolve16) => {
265478
264757
  const stream = createReadStream2(path19);
265479
264758
  const lineReaded = createInterface2({
265480
264759
  input: stream
265481
264760
  });
265482
264761
  function destroyStreamAndResolve() {
265483
264762
  stream.destroy();
265484
- resolve19();
264763
+ resolve16();
265485
264764
  }
265486
264765
  let lineNumber = 0;
265487
264766
  let currentRangeIndex = 0;
@@ -266593,15 +265872,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
266593
265872
  return true;
266594
265873
  if (this.featureFlagsPoller === undefined)
266595
265874
  return false;
266596
- return new Promise((resolve19) => {
265875
+ return new Promise((resolve16) => {
266597
265876
  const timeout3 = setTimeout(() => {
266598
265877
  cleanup();
266599
- resolve19(false);
265878
+ resolve16(false);
266600
265879
  }, timeoutMs);
266601
265880
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
266602
265881
  clearTimeout(timeout3);
266603
265882
  cleanup();
266604
- resolve19(count2 > 0);
265883
+ resolve16(count2 > 0);
266605
265884
  });
266606
265885
  });
266607
265886
  }
@@ -267385,9 +266664,9 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
267385
266664
  });
267386
266665
  }
267387
266666
  // src/cli/index.ts
267388
- var __dirname4 = dirname26(fileURLToPath6(import.meta.url));
266667
+ var __dirname4 = dirname25(fileURLToPath6(import.meta.url));
267389
266668
  async function runCLI(options8) {
267390
- ensureNpmAssets(join36(__dirname4, "../assets"));
266669
+ ensureNpmAssets(join33(__dirname4, "../assets"));
267391
266670
  const errorReporter = new ErrorReporter;
267392
266671
  errorReporter.registerProcessErrorHandlers();
267393
266672
  const jsonMode = process.argv.includes("--json");
@@ -267426,4 +266705,4 @@ export {
267426
266705
  CLIExitError
267427
266706
  };
267428
266707
 
267429
- //# debugId=FFEEAB2F2B84F55664756E2164756E21
266708
+ //# debugId=0FE91AF90CCD2CC164756E2164756E21