@base44-preview/cli 0.0.37-pr.364.7a8fa09 → 0.0.37-pr.365.290ff33

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
@@ -110477,9 +110477,9 @@ function getMessage2(key2, parameters, self2) {
110477
110477
  assert22.ok(message.length <= parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
110478
110478
  return Reflect.apply(message, self2, parameters);
110479
110479
  }
110480
- const regex = /%[dfijoOs]/g;
110480
+ const regex2 = /%[dfijoOs]/g;
110481
110481
  let expectedLength = 0;
110482
- while (regex.exec(message) !== null)
110482
+ while (regex2.exec(message) !== null)
110483
110483
  expectedLength++;
110484
110484
  assert22.ok(expectedLength === parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
110485
110485
  if (parameters.length === 0)
@@ -111380,9 +111380,9 @@ function convertEndOfLineOptionToCharacter2(endOfLineOption) {
111380
111380
  return endOfLineOption === OPTION_CR2 ? CHARACTER_CR2 : endOfLineOption === OPTION_CRLF2 ? CHARACTER_CRLF2 : DEFAULT_EOL2;
111381
111381
  }
111382
111382
  function countEndOfLineCharacters(text, endOfLineCharacter) {
111383
- const regex = regexps.get(endOfLineCharacter);
111383
+ const regex2 = regexps.get(endOfLineCharacter);
111384
111384
  if (false) {}
111385
- return text.match(regex)?.length ?? 0;
111385
+ return text.match(regex2)?.length ?? 0;
111386
111386
  }
111387
111387
  function normalizeEndOfLine(text) {
111388
111388
  return method_replace_all_default2(0, text, END_OF_LINE_REGEXP, CHARACTER_LF2);
@@ -113584,8 +113584,8 @@ function legacyIsNextLineEmpty(text, node, locEnd) {
113584
113584
  }
113585
113585
  function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
113586
113586
  const otherQuote = enclosingQuote === '"' ? "'" : '"';
113587
- const regex = /\\(.)|(["'])/gsu;
113588
- const raw2 = method_replace_all_default2(0, rawText, regex, (match, escaped, quote) => {
113587
+ const regex2 = /\\(.)|(["'])/gsu;
113588
+ const raw2 = method_replace_all_default2(0, rawText, regex2, (match, escaped, quote) => {
113589
113589
  if (escaped === otherQuote) {
113590
113590
  return escaped;
113591
113591
  }
@@ -117006,17 +117006,17 @@ var init_prettier = __esm(() => {
117006
117006
  }
117007
117007
  const opts = options8 || {};
117008
117008
  const posix = utils3.isWindows(options8);
117009
- const regex = isState ? picomatch.compileRe(glob, options8) : picomatch.makeRe(glob, options8, false, true);
117010
- const state = regex.state;
117011
- delete regex.state;
117009
+ const regex2 = isState ? picomatch.compileRe(glob, options8) : picomatch.makeRe(glob, options8, false, true);
117010
+ const state = regex2.state;
117011
+ delete regex2.state;
117012
117012
  let isIgnored2 = () => false;
117013
117013
  if (opts.ignore) {
117014
117014
  const ignoreOpts = { ...options8, ignore: null, onMatch: null, onResult: null };
117015
117015
  isIgnored2 = picomatch(opts.ignore, ignoreOpts, returnState);
117016
117016
  }
117017
117017
  const matcher = (input, returnObject = false) => {
117018
- const { isMatch, match, output } = picomatch.test(input, regex, options8, { glob, posix });
117019
- const result = { glob, state, regex, posix, input, output, match, isMatch };
117018
+ const { isMatch, match, output } = picomatch.test(input, regex2, options8, { glob, posix });
117019
+ const result = { glob, state, regex: regex2, posix, input, output, match, isMatch };
117020
117020
  if (typeof opts.onResult === "function") {
117021
117021
  opts.onResult(result);
117022
117022
  }
@@ -117041,7 +117041,7 @@ var init_prettier = __esm(() => {
117041
117041
  }
117042
117042
  return matcher;
117043
117043
  };
117044
- picomatch.test = (input, regex, options8, { glob, posix } = {}) => {
117044
+ picomatch.test = (input, regex2, options8, { glob, posix } = {}) => {
117045
117045
  if (typeof input !== "string") {
117046
117046
  throw new TypeError("Expected input to be a string");
117047
117047
  }
@@ -117058,16 +117058,16 @@ var init_prettier = __esm(() => {
117058
117058
  }
117059
117059
  if (match === false || opts.capture === true) {
117060
117060
  if (opts.matchBase === true || opts.basename === true) {
117061
- match = picomatch.matchBase(input, regex, options8, posix);
117061
+ match = picomatch.matchBase(input, regex2, options8, posix);
117062
117062
  } else {
117063
- match = regex.exec(output);
117063
+ match = regex2.exec(output);
117064
117064
  }
117065
117065
  }
117066
117066
  return { isMatch: Boolean(match), match, output };
117067
117067
  };
117068
117068
  picomatch.matchBase = (input, glob, options8, posix = utils3.isWindows(options8)) => {
117069
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8);
117070
- return regex.test(path152.basename(input));
117069
+ const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8);
117070
+ return regex2.test(path152.basename(input));
117071
117071
  };
117072
117072
  picomatch.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str);
117073
117073
  picomatch.parse = (pattern, options8) => {
@@ -117087,11 +117087,11 @@ var init_prettier = __esm(() => {
117087
117087
  if (state && state.negated === true) {
117088
117088
  source2 = `^(?!${source2}).*$`;
117089
117089
  }
117090
- const regex = picomatch.toRegex(source2, options8);
117090
+ const regex2 = picomatch.toRegex(source2, options8);
117091
117091
  if (returnState === true) {
117092
- regex.state = state;
117092
+ regex2.state = state;
117093
117093
  }
117094
- return regex;
117094
+ return regex2;
117095
117095
  };
117096
117096
  picomatch.makeRe = (input, options8 = {}, returnOutput = false, returnState = false) => {
117097
117097
  if (!input || typeof input !== "string") {
@@ -117255,8 +117255,8 @@ var init_prettier = __esm(() => {
117255
117255
  };
117256
117256
  micromatch2.capture = (glob, input, options8) => {
117257
117257
  let posix = utils3.isWindows(options8);
117258
- let regex = picomatch.makeRe(String(glob), { ...options8, capture: true });
117259
- let match = regex.exec(posix ? utils3.toPosixSlashes(input) : input);
117258
+ let regex2 = picomatch.makeRe(String(glob), { ...options8, capture: true });
117259
+ let match = regex2.exec(posix ? utils3.toPosixSlashes(input) : input);
117260
117260
  if (match) {
117261
117261
  return match.slice(1).map((v10) => v10 === undefined ? "" : v10);
117262
117262
  }
@@ -121695,7 +121695,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
121695
121695
  };
121696
121696
  Object.defineProperty(exports, "__esModule", { value: true });
121697
121697
  var fs42 = __importStar(__require2("fs"));
121698
- var regex = {
121698
+ var regex2 = {
121699
121699
  section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/,
121700
121700
  param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/,
121701
121701
  comment: /^\s*[#;].*$/
@@ -121727,14 +121727,14 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
121727
121727
  var lines = data.split(/\r\n|\r|\n/);
121728
121728
  lines.forEach(function(line3) {
121729
121729
  var match;
121730
- if (regex.comment.test(line3)) {
121730
+ if (regex2.comment.test(line3)) {
121731
121731
  return;
121732
121732
  }
121733
- if (regex.param.test(line3)) {
121734
- match = line3.match(regex.param);
121733
+ if (regex2.param.test(line3)) {
121734
+ match = line3.match(regex2.param);
121735
121735
  sectionBody[match[1]] = match[2];
121736
- } else if (regex.section.test(line3)) {
121737
- match = line3.match(regex.section);
121736
+ } else if (regex2.section.test(line3)) {
121737
+ match = line3.match(regex2.section);
121738
121738
  sectionName = match[1];
121739
121739
  sectionBody = {};
121740
121740
  value.push([sectionName, sectionBody]);
@@ -122820,8 +122820,8 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
122820
122820
  }
122821
122821
  _make(mode, key2) {
122822
122822
  const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]);
122823
- const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
122824
- return define2(this, key2, regex);
122823
+ const regex2 = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
122824
+ return define2(this, key2, regex2);
122825
122825
  }
122826
122826
  };
122827
122827
  var createRule = ({
@@ -127617,8 +127617,8 @@ var require_prettier = __commonJS((exports, module) => {
127617
127617
  }
127618
127618
  function makeString2(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
127619
127619
  const otherQuote = enclosingQuote === '"' ? "'" : '"';
127620
- const regex = /\\(.)|(["'])/gsu;
127621
- const raw2 = method_replace_all_default3(0, rawText, regex, (match, escaped, quote) => {
127620
+ const regex2 = /\\(.)|(["'])/gsu;
127621
+ const raw2 = method_replace_all_default3(0, rawText, regex2, (match, escaped, quote) => {
127622
127622
  if (escaped === otherQuote) {
127623
127623
  return escaped;
127624
127624
  }
@@ -156661,12 +156661,12 @@ var require_ipaddr = __commonJS((exports, module) => {
156661
156661
  return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, "::");
156662
156662
  };
156663
156663
  IPv6.prototype.toRFC5952String = function() {
156664
- var bestMatchIndex, bestMatchLength, match, regex, string4;
156665
- regex = /((^|:)(0(:|$)){2,})/g;
156664
+ var bestMatchIndex, bestMatchLength, match, regex2, string4;
156665
+ regex2 = /((^|:)(0(:|$)){2,})/g;
156666
156666
  string4 = this.toNormalizedString();
156667
156667
  bestMatchIndex = 0;
156668
156668
  bestMatchLength = -1;
156669
- while (match = regex.exec(string4)) {
156669
+ while (match = regex2.exec(string4)) {
156670
156670
  if (match[0].length > bestMatchLength) {
156671
156671
  bestMatchIndex = match.index;
156672
156672
  bestMatchLength = match[0].length;
@@ -161984,10 +161984,10 @@ var require_follow_redirects = __commonJS((exports, module) => {
161984
161984
  spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
161985
161985
  return spread;
161986
161986
  }
161987
- function removeMatchingHeaders(regex, headers) {
161987
+ function removeMatchingHeaders(regex2, headers) {
161988
161988
  var lastValue;
161989
161989
  for (var header2 in headers) {
161990
- if (regex.test(header2)) {
161990
+ if (regex2.test(header2)) {
161991
161991
  lastValue = headers[header2];
161992
161992
  delete headers[header2];
161993
161993
  }
@@ -193547,9 +193547,9 @@ var require_dist4 = __commonJS((exports, module) => {
193547
193547
  name2 = "/" + name2;
193548
193548
  let nsp = this._nsps.get(name2);
193549
193549
  if (!nsp) {
193550
- for (const [regex, parentNamespace] of this.parentNamespacesFromRegExp) {
193551
- if (regex.test(name2)) {
193552
- debug("attaching namespace %s to parent namespace %s", name2, regex);
193550
+ for (const [regex2, parentNamespace] of this.parentNamespacesFromRegExp) {
193551
+ if (regex2.test(name2)) {
193552
+ debug("attaching namespace %s to parent namespace %s", name2, regex2);
193553
193553
  return parentNamespace.createChild(name2);
193554
193554
  }
193555
193555
  }
@@ -235383,6 +235383,24 @@ async function login() {
235383
235383
  };
235384
235384
  }
235385
235385
 
235386
+ // node_modules/ansi-regex/index.js
235387
+ function ansiRegex({ onlyFirst = false } = {}) {
235388
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
235389
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
235390
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
235391
+ const pattern = `${osc}|${csi}`;
235392
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
235393
+ }
235394
+
235395
+ // node_modules/strip-ansi/index.js
235396
+ var regex = ansiRegex();
235397
+ function stripAnsi(string4) {
235398
+ if (typeof string4 !== "string") {
235399
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
235400
+ }
235401
+ return string4.replace(regex, "");
235402
+ }
235403
+
235386
235404
  // node_modules/is-plain-obj/index.js
235387
235405
  function isPlainObject2(value) {
235388
235406
  if (typeof value !== "object" || value === null) {
@@ -241999,16 +242017,38 @@ async function checkForUpgrade() {
241999
242017
  }
242000
242018
 
242001
242019
  // src/cli/utils/upgradeNotification.ts
242002
- function formatUpgradeMessage(info) {
242020
+ var UPGRADE_COMMAND = "npm install -g base44@latest";
242021
+ function formatUpgradeBox(info) {
242003
242022
  const { shinyOrange } = theme.colors;
242004
242023
  const { bold: bold2 } = theme.styles;
242005
- return `${shinyOrange("Update available!")} ${shinyOrange(`${info.currentVersion} → ${info.latestVersion}`)} ${shinyOrange("Run:")} ${bold2(shinyOrange("npm install -g base44@latest"))}`;
242024
+ const lines = [
242025
+ shinyOrange(`Update available! ${info.currentVersion} → ${bold2(info.latestVersion)}`),
242026
+ shinyOrange(`Run: ${bold2(UPGRADE_COMMAND)}`),
242027
+ "",
242028
+ "[Agent Hints]",
242029
+ ` Run: ${UPGRADE_COMMAND}`
242030
+ ];
242031
+ const maxVisualWidth = Math.max(...lines.map((l) => stripAnsi(l).length));
242032
+ const pad = (line) => {
242033
+ const visual = stripAnsi(line).length;
242034
+ return `${line}${" ".repeat(maxVisualWidth - visual)}`;
242035
+ };
242036
+ const top = `┌${"─".repeat(maxVisualWidth + 2)}┐`;
242037
+ const bottom = `└${"─".repeat(maxVisualWidth + 2)}┘`;
242038
+ const body = lines.map((l) => `│ ${pad(l)} │`).join(`
242039
+ `);
242040
+ return `${top}
242041
+ ${body}
242042
+ ${bottom}`;
242006
242043
  }
242007
- async function printUpgradeNotificationIfAvailable() {
242044
+ function startUpgradeCheck() {
242045
+ return checkForUpgrade().catch(() => null);
242046
+ }
242047
+ async function printUpgradeNotification(upgradeCheckPromise) {
242008
242048
  try {
242009
- const upgradeInfo = await checkForUpgrade();
242049
+ const upgradeInfo = await upgradeCheckPromise;
242010
242050
  if (upgradeInfo) {
242011
- R2.message(formatUpgradeMessage(upgradeInfo));
242051
+ R2.warn(formatUpgradeBox(upgradeInfo));
242012
242052
  }
242013
242053
  } catch {}
242014
242054
  }
@@ -242021,7 +242061,7 @@ async function runCommand(commandFn, options, context) {
242021
242061
  } else {
242022
242062
  We(theme.colors.base44OrangeBackground(" Base 44 "));
242023
242063
  }
242024
- await printUpgradeNotificationIfAvailable();
242064
+ const upgradeCheckPromise = startUpgradeCheck();
242025
242065
  try {
242026
242066
  if (options?.requireAuth) {
242027
242067
  const loggedIn = await isLoggedIn();
@@ -242041,12 +242081,14 @@ async function runCommand(commandFn, options, context) {
242041
242081
  context.errorReporter.setContext({ appId: appConfig.id });
242042
242082
  }
242043
242083
  const result = await commandFn();
242084
+ await printUpgradeNotification(upgradeCheckPromise);
242044
242085
  Le(result.outroMessage || "");
242045
242086
  if (result.stdout) {
242046
242087
  process.stdout.write(result.stdout);
242047
242088
  }
242048
242089
  } catch (error48) {
242049
242090
  displayError(error48);
242091
+ await printUpgradeNotification(upgradeCheckPromise);
242050
242092
  const errorContext = context.errorReporter.getErrorContext();
242051
242093
  Le(theme.format.errorContext(errorContext));
242052
242094
  throw error48;
@@ -244247,8 +244289,9 @@ function createFunctionRouter(manager, logger) {
244247
244289
  var import_nedb = __toESM(require_nedb(), 1);
244248
244290
 
244249
244291
  class Database {
244250
- collections = new Map;
244251
- load(entities) {
244292
+ collections;
244293
+ constructor(entities) {
244294
+ this.collections = new Map;
244252
244295
  for (const entity2 of entities) {
244253
244296
  this.collections.set(entity2.name, new import_nedb.default);
244254
244297
  }
@@ -244259,12 +244302,6 @@ class Database {
244259
244302
  getCollectionNames() {
244260
244303
  return Array.from(this.collections.keys());
244261
244304
  }
244262
- dropAll() {
244263
- for (const collection of this.collections.values()) {
244264
- collection.remove({}, { multi: true });
244265
- }
244266
- this.collections.clear();
244267
- }
244268
244305
  }
244269
244306
 
244270
244307
  // node_modules/socket.io/wrapper.mjs
@@ -246241,7 +246278,8 @@ var WATCH_QUEUE_DELAY_MS = 500;
246241
246278
  class WatchBase44 extends EventEmitter4 {
246242
246279
  itemsToWatch;
246243
246280
  logger;
246244
- watchers = new Map;
246281
+ watchers = [];
246282
+ queueWaitForCreation = [];
246245
246283
  queueWaitForCreationTimeout = null;
246246
246284
  constructor(itemsToWatch, logger) {
246247
246285
  super();
@@ -246249,62 +246287,70 @@ class WatchBase44 extends EventEmitter4 {
246249
246287
  this.logger = logger;
246250
246288
  }
246251
246289
  async start() {
246252
- if (this.watchers.size > 0) {
246290
+ if (this.watchers.length > 0 || this.queueWaitForCreation.length > 0) {
246253
246291
  return;
246254
246292
  }
246255
- for (const item of Object.values(this.itemsToWatch)) {
246293
+ for (const item of this.itemsToWatch) {
246256
246294
  if (await pathExists(item.path)) {
246257
- this.watchers.set(item.name, this.watchTarget(item));
246295
+ this.watchers.push(this.watchTarget(item));
246296
+ } else {
246297
+ this.queueWaitForCreation.push(item);
246258
246298
  }
246259
246299
  }
246260
- this.watchEntries();
246300
+ this.watchCreationQueue();
246261
246301
  }
246262
246302
  async close() {
246263
246303
  if (this.queueWaitForCreationTimeout) {
246264
246304
  clearTimeout(this.queueWaitForCreationTimeout);
246265
246305
  this.queueWaitForCreationTimeout = null;
246266
246306
  }
246267
- for (const watcher of this.watchers.values()) {
246307
+ for (const watcher of this.watchers) {
246268
246308
  await watcher.close();
246269
246309
  }
246270
- this.watchers.clear();
246310
+ this.watchers = [];
246311
+ this.queueWaitForCreation = [];
246271
246312
  }
246272
- watchEntries() {
246313
+ watchCreationQueue() {
246273
246314
  if (this.queueWaitForCreationTimeout) {
246274
246315
  clearTimeout(this.queueWaitForCreationTimeout);
246275
246316
  }
246276
246317
  this.queueWaitForCreationTimeout = setTimeout(async () => {
246277
- for (const item of Object.values(this.itemsToWatch)) {
246278
- const watchItem = this.watchers.get(item.name);
246279
- const exists = await pathExists(item.path);
246280
- if (!watchItem && exists) {
246281
- this.emit("change", item.name, item.path);
246282
- this.watchers.set(item.name, this.watchTarget(item));
246283
- } else if (watchItem && !exists) {
246284
- await watchItem.close();
246285
- this.emit("change", item.name, item.path);
246286
- setTimeout(() => {
246287
- this.watchers.forEach((watcher, name2) => {
246288
- if (watcher.closed) {
246289
- this.watchers.delete(name2);
246290
- }
246291
- });
246292
- });
246318
+ const toRemove = [];
246319
+ for (const entry of this.queueWaitForCreation) {
246320
+ if (await pathExists(entry.path)) {
246321
+ this.watchers.push(this.watchTarget(entry));
246322
+ toRemove.push(entry);
246293
246323
  }
246294
246324
  }
246295
- this.queueWaitForCreationTimeout = null;
246296
- this.watchEntries();
246325
+ this.queueWaitForCreation = this.queueWaitForCreation.filter((entry) => !toRemove.includes(entry));
246326
+ if (this.queueWaitForCreation.length > 0) {
246327
+ this.watchCreationQueue();
246328
+ } else {
246329
+ this.queueWaitForCreationTimeout = null;
246330
+ }
246297
246331
  }, WATCH_QUEUE_DELAY_MS);
246298
246332
  }
246299
246333
  watchTarget(item) {
246334
+ const handler = import_debounce.default(async (_event, path19) => {
246335
+ this.emit("change", item.name, relative4(item.path, path19));
246336
+ }, WATCH_DEBOUNCE_MS);
246300
246337
  const watcher = watch(item.path, {
246301
246338
  ignoreInitial: true
246302
246339
  });
246303
- watcher.on("all", import_debounce.default(async (_event, path19) => {
246304
- this.emit("change", item.name, relative4(item.path, path19));
246305
- }, WATCH_DEBOUNCE_MS));
246340
+ watcher.on("all", handler);
246341
+ watcher.on("unlinkDir", async (deletedPath) => {
246342
+ if (deletedPath !== item.path) {
246343
+ return;
246344
+ }
246345
+ await watcher.close();
246346
+ this.queueWaitForCreation.push(item);
246347
+ this.watchCreationQueue();
246348
+ setTimeout(() => {
246349
+ this.watchers = this.watchers.filter((watcher2) => !watcher2.closed);
246350
+ });
246351
+ });
246306
246352
  watcher.on("error", (err) => {
246307
- this.logger.error(`[dev-server] Watch handler failed for ${item.path}`, err instanceof Error ? err : undefined);
246353
+ this.logger.error(`Watch handler failed for ${item.path}`, err instanceof Error ? err : undefined);
246308
246354
  });
246309
246355
  return watcher;
246310
246356
  }
@@ -246342,8 +246388,7 @@ async function createDevServer(options8) {
246342
246388
  if (functionManager.getFunctionNames().length > 0) {
246343
246389
  R2.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
246344
246390
  }
246345
- const db2 = new Database;
246346
- db2.load(entities);
246391
+ const db2 = new Database(entities);
246347
246392
  if (db2.getCollectionNames().length > 0) {
246348
246393
  R2.info(`Loaded entities: ${db2.getCollectionNames().join(", ")}`);
246349
246394
  }
@@ -246377,16 +246422,12 @@ async function createDevServer(options8) {
246377
246422
  emitEntityEvent = (appId, entityName, event) => {
246378
246423
  broadcastEntityEvent(io6, appId, entityName, event);
246379
246424
  };
246380
- const base44ConfigWatcher = new WatchBase44({
246381
- functions: {
246425
+ const base44ConfigWatcher = new WatchBase44([
246426
+ {
246382
246427
  name: "functions",
246383
246428
  path: join18(dirname14(project2.configPath), project2.functionsDir)
246384
- },
246385
- entities: {
246386
- name: "entities",
246387
- path: join18(dirname14(project2.configPath), project2.entitiesDir)
246388
246429
  }
246389
- }, devLogger);
246430
+ ], devLogger);
246390
246431
  base44ConfigWatcher.on("change", async (name2) => {
246391
246432
  try {
246392
246433
  if (name2 === "functions") {
@@ -246400,18 +246441,6 @@ async function createDevServer(options8) {
246400
246441
  devLogger.log("All functions removed");
246401
246442
  }
246402
246443
  }
246403
- if (name2 === "entities") {
246404
- const previousEntityCount = db2.getCollectionNames().length;
246405
- const { entities: entities2 } = await options8.loadResources();
246406
- db2.dropAll();
246407
- if (previousEntityCount > 0) {
246408
- devLogger.log("Entities directory changed, clearing data...");
246409
- }
246410
- db2.load(entities2);
246411
- if (db2.getCollectionNames().length > 0) {
246412
- devLogger.log(`Loaded entities: ${db2.getCollectionNames().join(", ")}`);
246413
- }
246414
- }
246415
246444
  } catch (error48) {
246416
246445
  const errorMessage = error48 instanceof Error ? error48.message : String(error48);
246417
246446
  devLogger.error(errorMessage);
@@ -249788,9 +249817,9 @@ function matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, deb
249788
249817
  throw new InconclusiveMatchError("can't match cohort without a given cohort property value");
249789
249818
  return propertyGroupType === "AND";
249790
249819
  }
249791
- function isValidRegex(regex) {
249820
+ function isValidRegex(regex2) {
249792
249821
  try {
249793
- new RegExp(regex);
249822
+ new RegExp(regex2);
249794
249823
  return true;
249795
249824
  } catch (err) {
249796
249825
  return false;
@@ -249808,8 +249837,8 @@ function convertToDateTime(value) {
249808
249837
  throw new InconclusiveMatchError(`The date provided ${value} must be a string, number, or date object`);
249809
249838
  }
249810
249839
  function relativeDateParseForFeatureFlagMatching(value) {
249811
- const regex = /^-?(?<number>[0-9]+)(?<interval>[a-z])$/;
249812
- const match = value.match(regex);
249840
+ const regex2 = /^-?(?<number>[0-9]+)(?<interval>[a-z])$/;
249841
+ const match = value.match(regex2);
249813
249842
  const parsedDt = new Date(new Date().toISOString());
249814
249843
  if (!match)
249815
249844
  return null;
@@ -250802,4 +250831,4 @@ export {
250802
250831
  CLIExitError
250803
250832
  };
250804
250833
 
250805
- //# debugId=8709F28AC0FAB59064756E2164756E21
250834
+ //# debugId=5F70B466281996DE64756E2164756E21