@base44-preview/cli 0.0.37-pr.246.26b1479 → 0.0.37-pr.246.3c6cb91

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
@@ -8933,10 +8933,10 @@ var require_ejs = __commonJS((exports) => {
8933
8933
  exports.localsName = _DEFAULT_LOCALS_NAME;
8934
8934
  exports.promiseImpl = new Function("return this;")().Promise;
8935
8935
  exports.resolveInclude = function(name2, filename, isDir) {
8936
- var dirname6 = path11.dirname;
8936
+ var dirname7 = path11.dirname;
8937
8937
  var extname = path11.extname;
8938
8938
  var resolve = path11.resolve;
8939
- var includePath = resolve(isDir ? filename : dirname6(filename), name2);
8939
+ var includePath = resolve(isDir ? filename : dirname7(filename), name2);
8940
8940
  var ext = extname(name2);
8941
8941
  if (!ext) {
8942
8942
  includePath += ".ejs";
@@ -9314,10 +9314,10 @@ var require_ejs = __commonJS((exports) => {
9314
9314
  };
9315
9315
  if (opts.filename && typeof Object.defineProperty === "function") {
9316
9316
  var filename = opts.filename;
9317
- var basename4 = path11.basename(filename, path11.extname(filename));
9317
+ var basename3 = path11.basename(filename, path11.extname(filename));
9318
9318
  try {
9319
9319
  Object.defineProperty(returnedFn, "name", {
9320
- value: basename4,
9320
+ value: basename3,
9321
9321
  writable: false,
9322
9322
  enumerable: false,
9323
9323
  configurable: true
@@ -12652,8 +12652,8 @@ var require_main = __commonJS((exports, module) => {
12652
12652
  const shortPaths = [];
12653
12653
  for (const filePath of optionPaths) {
12654
12654
  try {
12655
- const relative = path11.relative(process.cwd(), filePath);
12656
- shortPaths.push(relative);
12655
+ const relative3 = path11.relative(process.cwd(), filePath);
12656
+ shortPaths.push(relative3);
12657
12657
  } catch (e2) {
12658
12658
  if (debug) {
12659
12659
  _debug(`Failed to load ${filePath} ${e2.message}`);
@@ -112161,12 +112161,12 @@ function getLanguageByFileName(languages2, file2) {
112161
112161
  if (!file2) {
112162
112162
  return;
112163
112163
  }
112164
- const basename5 = getFileBasename(file2).toLowerCase();
112164
+ const basename4 = getFileBasename(file2).toLowerCase();
112165
112165
  return languages2.find(({
112166
112166
  filenames
112167
- }) => filenames?.some((name2) => name2.toLowerCase() === basename5)) ?? languages2.find(({
112167
+ }) => filenames?.some((name2) => name2.toLowerCase() === basename4)) ?? languages2.find(({
112168
112168
  extensions
112169
- }) => extensions?.some((extension) => basename5.endsWith(extension)));
112169
+ }) => extensions?.some((extension) => basename4.endsWith(extension)));
112170
112170
  }
112171
112171
  function getLanguageByLanguageName(languages2, languageName) {
112172
112172
  if (!languageName) {
@@ -117388,8 +117388,8 @@ var init_prettier = __esm(() => {
117388
117388
  }
117389
117389
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
117390
117390
  function isAffectDepthOfReadingPattern(pattern) {
117391
- const basename5 = path152.basename(pattern);
117392
- return endsWithSlashGlobStar(pattern) || isStaticPattern(basename5);
117391
+ const basename4 = path152.basename(pattern);
117392
+ return endsWithSlashGlobStar(pattern) || isStaticPattern(basename4);
117393
117393
  }
117394
117394
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
117395
117395
  function expandPatternsWithBraceExpansion(patterns) {
@@ -117434,15 +117434,15 @@ var init_prettier = __esm(() => {
117434
117434
  exports.removeDuplicateSlashes = removeDuplicateSlashes;
117435
117435
  function partitionAbsoluteAndRelative(patterns) {
117436
117436
  const absolute = [];
117437
- const relative2 = [];
117437
+ const relative22 = [];
117438
117438
  for (const pattern of patterns) {
117439
117439
  if (isAbsolute2(pattern)) {
117440
117440
  absolute.push(pattern);
117441
117441
  } else {
117442
- relative2.push(pattern);
117442
+ relative22.push(pattern);
117443
117443
  }
117444
117444
  }
117445
- return [absolute, relative2];
117445
+ return [absolute, relative22];
117446
117446
  }
117447
117447
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
117448
117448
  function isAbsolute2(pattern) {
@@ -132397,7 +132397,7 @@ var require_url = __commonJS((exports) => {
132397
132397
  exports.fromFileSystemPath = fromFileSystemPath;
132398
132398
  exports.toFileSystemPath = toFileSystemPath;
132399
132399
  exports.safePointerToPath = safePointerToPath;
132400
- exports.relative = relative2;
132400
+ exports.relative = relative4;
132401
132401
  var convert_path_to_posix_1 = __importDefault(require_convert_path_to_posix());
132402
132402
  var path_1 = __importStar(__require("path"));
132403
132403
  var forwardSlashPattern = /\//g;
@@ -132547,7 +132547,7 @@ var require_url = __commonJS((exports) => {
132547
132547
  return decodeURIComponent(value).replace(jsonPointerSlash, "/").replace(jsonPointerTilde, "~");
132548
132548
  });
132549
132549
  }
132550
- function relative2(from, to5) {
132550
+ function relative4(from, to5) {
132551
132551
  if (!isFileSystemPath(from) || !isFileSystemPath(to5)) {
132552
132552
  return resolve6(from, to5);
132553
132553
  }
@@ -138614,7 +138614,7 @@ var require_depd = __commonJS((exports, module) => {
138614
138614
  * Copyright(c) 2014-2018 Douglas Christopher Wilson
138615
138615
  * MIT Licensed
138616
138616
  */
138617
- var relative2 = __require("path").relative;
138617
+ var relative4 = __require("path").relative;
138618
138618
  module.exports = depd;
138619
138619
  var basePath = process.cwd();
138620
138620
  function containsNamespace(str, namespace) {
@@ -138810,7 +138810,7 @@ var require_depd = __commonJS((exports, module) => {
138810
138810
  return formatted;
138811
138811
  }
138812
138812
  function formatLocation(callSite) {
138813
- return relative2(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
138813
+ return relative4(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
138814
138814
  }
138815
138815
  function getStack() {
138816
138816
  var limit = Error.stackTraceLimit;
@@ -156272,8 +156272,8 @@ var require_view = __commonJS((exports, module) => {
156272
156272
  var debug = require_src4()("express:view");
156273
156273
  var path18 = __require("node:path");
156274
156274
  var fs28 = __require("node:fs");
156275
- var dirname11 = path18.dirname;
156276
- var basename5 = path18.basename;
156275
+ var dirname12 = path18.dirname;
156276
+ var basename4 = path18.basename;
156277
156277
  var extname2 = path18.extname;
156278
156278
  var join15 = path18.join;
156279
156279
  var resolve6 = path18.resolve;
@@ -156311,8 +156311,8 @@ var require_view = __commonJS((exports, module) => {
156311
156311
  for (var i5 = 0;i5 < roots.length && !path19; i5++) {
156312
156312
  var root2 = roots[i5];
156313
156313
  var loc = resolve6(root2, name2);
156314
- var dir = dirname11(loc);
156315
- var file2 = basename5(loc);
156314
+ var dir = dirname12(loc);
156315
+ var file2 = basename4(loc);
156316
156316
  path19 = this.resolve(dir, file2);
156317
156317
  }
156318
156318
  return path19;
@@ -156342,7 +156342,7 @@ var require_view = __commonJS((exports, module) => {
156342
156342
  if (stat2 && stat2.isFile()) {
156343
156343
  return path19;
156344
156344
  }
156345
- path19 = join15(dir, basename5(file2, ext), "index" + ext);
156345
+ path19 = join15(dir, basename4(file2, ext), "index" + ext);
156346
156346
  stat2 = tryStat(path19);
156347
156347
  if (stat2 && stat2.isFile()) {
156348
156348
  return path19;
@@ -159663,7 +159663,7 @@ var require_content_disposition = __commonJS((exports, module) => {
159663
159663
  */
159664
159664
  module.exports = contentDisposition;
159665
159665
  module.exports.parse = parse11;
159666
- var basename5 = __require("path").basename;
159666
+ var basename4 = __require("path").basename;
159667
159667
  var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
159668
159668
  var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
159669
159669
  var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g;
@@ -159698,9 +159698,9 @@ var require_content_disposition = __commonJS((exports, module) => {
159698
159698
  if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) {
159699
159699
  throw new TypeError("fallback must be ISO-8859-1 string");
159700
159700
  }
159701
- var name2 = basename5(filename);
159701
+ var name2 = basename4(filename);
159702
159702
  var isQuotedString = TEXT_REGEXP.test(name2);
159703
- var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) : basename5(fallback);
159703
+ var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) : basename4(fallback);
159704
159704
  var hasFallback = typeof fallbackName === "string" && fallbackName !== name2;
159705
159705
  if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name2)) {
159706
159706
  params["filename*"] = name2;
@@ -161958,8 +161958,8 @@ var require_follow_redirects = __commonJS((exports, module) => {
161958
161958
  }
161959
161959
  return parsed;
161960
161960
  }
161961
- function resolveUrl(relative2, base) {
161962
- return useNativeURL ? new URL2(relative2, base) : parseUrl(url3.resolve(base, relative2));
161961
+ function resolveUrl(relative4, base) {
161962
+ return useNativeURL ? new URL2(relative4, base) : parseUrl(url3.resolve(base, relative4));
161963
161963
  }
161964
161964
  function validateUrl(input) {
161965
161965
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -163597,8 +163597,8 @@ var require_tmp = __commonJS((exports, module) => {
163597
163597
  const name2 = options8.name;
163598
163598
  if (path18.isAbsolute(name2))
163599
163599
  throw new Error(`name option must not contain an absolute path, found "${name2}".`);
163600
- const basename5 = path18.basename(name2);
163601
- if (basename5 === ".." || basename5 === "." || basename5 !== name2)
163600
+ const basename4 = path18.basename(name2);
163601
+ if (basename4 === ".." || basename4 === "." || basename4 !== name2)
163602
163602
  throw new Error(`name option must not contain a path, found "${name2}".`);
163603
163603
  }
163604
163604
  if (!_isUndefined(options8.template) && !options8.template.match(TEMPLATE_PATTERN)) {
@@ -202878,7 +202878,7 @@ var require_utils12 = __commonJS((exports, module) => {
202878
202878
  if (decode4)
202879
202879
  return decode4(data, hint);
202880
202880
  }
202881
- function basename5(path18) {
202881
+ function basename4(path18) {
202882
202882
  if (typeof path18 !== "string")
202883
202883
  return "";
202884
202884
  for (let i5 = path18.length - 1;i5 >= 0; --i5) {
@@ -204182,7 +204182,7 @@ var require_utils12 = __commonJS((exports, module) => {
204182
204182
  -1
204183
204183
  ];
204184
204184
  module.exports = {
204185
- basename: basename5,
204185
+ basename: basename4,
204186
204186
  convertToUTF8,
204187
204187
  getDecoder,
204188
204188
  parseContentType,
@@ -204590,7 +204590,7 @@ var require_multipart = __commonJS((exports, module) => {
204590
204590
  var { Readable: Readable6, Writable: Writable4 } = __require("stream");
204591
204591
  var StreamSearch = require_sbmh();
204592
204592
  var {
204593
- basename: basename5,
204593
+ basename: basename4,
204594
204594
  convertToUTF8,
204595
204595
  getDecoder,
204596
204596
  parseContentType,
@@ -204852,7 +204852,7 @@ var require_multipart = __commonJS((exports, module) => {
204852
204852
  else if (disp.params.filename)
204853
204853
  filename = disp.params.filename;
204854
204854
  if (filename !== undefined && !preservePath)
204855
- filename = basename5(filename);
204855
+ filename = basename4(filename);
204856
204856
  }
204857
204857
  if (header2["content-type"]) {
204858
204858
  const conType = parseContentType(header2["content-type"][0]);
@@ -210671,7 +210671,7 @@ var {
210671
210671
  } = import__.default;
210672
210672
 
210673
210673
  // src/cli/commands/agents/pull.ts
210674
- import { dirname as dirname7, join as join9 } from "node:path";
210674
+ import { dirname as dirname8, join as join9 } from "node:path";
210675
210675
 
210676
210676
  // node_modules/@clack/core/dist/index.mjs
210677
210677
  var import_picocolors = __toESM(require_picocolors(), 1);
@@ -226142,6 +226142,9 @@ var PROJECT_SUBDIR = "base44";
226142
226142
  var CONFIG_FILE_EXTENSION = "jsonc";
226143
226143
  var CONFIG_FILE_EXTENSION_GLOB = "{json,jsonc}";
226144
226144
  var FUNCTION_CONFIG_FILE = `function.${CONFIG_FILE_EXTENSION_GLOB}`;
226145
+ var FUNCTION_CONFIG_GLOB = `**/${FUNCTION_CONFIG_FILE}`;
226146
+ var ENTRY_FILE_GLOB = "**/entry.{js,ts}";
226147
+ var ENTRY_IGNORE_DOT_PATHS = ["**/*.*/**"];
226145
226148
  var APP_CONFIG_PATTERN = `**/.app.${CONFIG_FILE_EXTENSION_GLOB}`;
226146
226149
  var PROJECT_CONFIG_PATTERNS = [
226147
226150
  `${PROJECT_SUBDIR}/config.${CONFIG_FILE_EXTENSION_GLOB}`,
@@ -233170,7 +233173,7 @@ var generateGlobTasks = normalizeArguments(generateTasks);
233170
233173
  var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
233171
233174
 
233172
233175
  // src/core/project/config.ts
233173
- import { dirname as dirname5, join as join6 } from "node:path";
233176
+ import { dirname as dirname6, join as join6 } from "node:path";
233174
233177
 
233175
233178
  // src/core/resources/agent/schema.ts
233176
233179
  var EntityOperationSchema = exports_external.enum(["create", "update", "delete", "read"]);
@@ -233980,7 +233983,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
233980
233983
  return result.data;
233981
233984
  }
233982
233985
  // src/core/resources/function/config.ts
233983
- import { basename as basename2, dirname as dirname4, join as join5 } from "node:path";
233986
+ import { basename as basename2, dirname as dirname4, join as join5, relative } from "node:path";
233984
233987
  async function readFunctionConfig(configPath) {
233985
233988
  const parsed = await readJsonFile(configPath);
233986
233989
  const result = FunctionConfigSchema.safeParse(parsed);
@@ -233998,7 +234001,7 @@ async function readFunction(configPath) {
233998
234001
  hints: [{ message: "Check the 'entry' field in your function config" }]
233999
234002
  });
234000
234003
  }
234001
- const filePaths = await globby("*.{js,ts,json}", {
234004
+ const filePaths = await globby("**/*.{js,ts,json}", {
234002
234005
  cwd: functionDir,
234003
234006
  absolute: true
234004
234007
  });
@@ -234009,43 +234012,61 @@ async function readAllFunctions(functionsDir) {
234009
234012
  if (!await pathExists(functionsDir)) {
234010
234013
  return [];
234011
234014
  }
234012
- const configFiles = await globby(`*/${FUNCTION_CONFIG_FILE}`, {
234015
+ const configFiles = await globby(FUNCTION_CONFIG_GLOB, {
234013
234016
  cwd: functionsDir,
234014
234017
  absolute: true
234015
234018
  });
234016
- const indexFiles = await globby(`*/index.{js,ts}`, {
234019
+ const entryFiles = await globby(ENTRY_FILE_GLOB, {
234017
234020
  cwd: functionsDir,
234018
- absolute: true
234021
+ absolute: true,
234022
+ ignore: ENTRY_IGNORE_DOT_PATHS
234019
234023
  });
234020
234024
  const configFilesDirs = new Set(configFiles.map((f) => dirname4(f)));
234021
- const indexFilesDirs = indexFiles.filter((indexFile) => !configFilesDirs.has(dirname4(indexFile)));
234025
+ const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname4(entryFile)));
234022
234026
  const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
234023
- const functionsWithoutConfig = await Promise.all(indexFilesDirs.map(async (functionFile) => {
234024
- const functionDir = dirname4(functionFile);
234025
- const filePaths = await globby("*.{js,ts,json}", {
234027
+ const functionsWithoutConfig = await Promise.all(entryFilesWithoutConfig.map(async (entryFile) => {
234028
+ const functionDir = dirname4(entryFile);
234029
+ const filePaths = await globby("**/*.{js,ts,json}", {
234026
234030
  cwd: functionDir,
234027
234031
  absolute: true
234028
234032
  });
234029
- const name2 = basename2(functionDir);
234030
- const entry = basename2(functionFile);
234031
- return { name: name2, entry, entryPath: functionFile, filePaths };
234033
+ const name2 = relative(functionsDir, functionDir).split(/[/\\]/).join("/");
234034
+ if (!name2) {
234035
+ throw new InvalidInputError("entry.ts found directly in the functions directory — it must be inside a named subfolder", {
234036
+ hints: [
234037
+ {
234038
+ message: `Move ${entryFile} into a subfolder (e.g. functions/myFunc/entry.ts)`
234039
+ }
234040
+ ]
234041
+ });
234042
+ }
234043
+ const entry = basename2(entryFile);
234044
+ return { name: name2, entry, entryPath: entryFile, filePaths };
234032
234045
  }));
234033
234046
  const functions = [...functionsFromConfig, ...functionsWithoutConfig];
234034
234047
  const names = new Set;
234035
234048
  for (const fn of functions) {
234036
234049
  if (names.has(fn.name)) {
234037
- throw new Error(`Duplicate function name "${fn.name}"`);
234050
+ throw new InvalidInputError(`Duplicate function name "${fn.name}"`, {
234051
+ hints: [
234052
+ {
234053
+ message: "Ensure each function has a unique name (or path for zero-config functions)."
234054
+ }
234055
+ ]
234056
+ });
234038
234057
  }
234039
234058
  names.add(fn.name);
234040
234059
  }
234041
234060
  return functions;
234042
234061
  }
234043
234062
  // src/core/resources/function/deploy.ts
234044
- import { basename as basename3 } from "node:path";
234063
+ import { dirname as dirname5, relative as relative2 } from "node:path";
234045
234064
  async function loadFunctionCode(fn) {
234065
+ const functionDir = dirname5(fn.entryPath);
234046
234066
  const loadedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
234047
234067
  const content = await readTextFile(filePath);
234048
- return { path: basename3(filePath), content };
234068
+ const path11 = relative2(functionDir, filePath).split(/[/\\]/).join("/");
234069
+ return { path: path11, content };
234049
234070
  }));
234050
234071
  return { ...fn, files: loadedFiles };
234051
234072
  }
@@ -234071,12 +234092,12 @@ async function findConfigInDir(dir) {
234071
234092
  }
234072
234093
  async function findProjectRoot(startPath) {
234073
234094
  let current = startPath || process.cwd();
234074
- while (current !== dirname5(current)) {
234095
+ while (current !== dirname6(current)) {
234075
234096
  const configPath = await findConfigInDir(current);
234076
234097
  if (configPath) {
234077
234098
  return { root: current, configPath };
234078
234099
  }
234079
- current = dirname5(current);
234100
+ current = dirname6(current);
234080
234101
  }
234081
234102
  return null;
234082
234103
  }
@@ -234098,7 +234119,7 @@ async function readProjectConfig(projectRoot) {
234098
234119
  throw new SchemaValidationError("Invalid project configuration", result.error, configPath);
234099
234120
  }
234100
234121
  const project = result.data;
234101
- const configDir = dirname5(configPath);
234122
+ const configDir = dirname6(configPath);
234102
234123
  const [entities, functions, agents, connectors] = await Promise.all([
234103
234124
  entityResource.readAll(join6(configDir, project.entitiesDir)),
234104
234125
  functionResource.readAll(join6(configDir, project.functionsDir)),
@@ -234200,7 +234221,7 @@ async function readAppConfig(projectRoot) {
234200
234221
  // src/core/project/template.ts
234201
234222
  var import_ejs = __toESM(require_ejs(), 1);
234202
234223
  var import_front_matter = __toESM(require_front_matter(), 1);
234203
- import { dirname as dirname6, join as join7 } from "node:path";
234224
+ import { dirname as dirname7, join as join7 } from "node:path";
234204
234225
  async function listTemplates() {
234205
234226
  const parsed = await readJsonFile(getTemplatesIndexPath());
234206
234227
  const result = TemplatesConfigSchema.safeParse(parsed);
@@ -234222,7 +234243,7 @@ async function renderTemplate(template, destPath, data) {
234222
234243
  if (file2.endsWith(".ejs")) {
234223
234244
  const rendered = await import_ejs.default.renderFile(srcPath, data);
234224
234245
  const { attributes, body } = import_front_matter.default(rendered);
234225
- const destFile = attributes.outputFileName ? join7(dirname6(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
234246
+ const destFile = attributes.outputFileName ? join7(dirname7(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
234226
234247
  const destFilePath = join7(destPath, destFile);
234227
234248
  await writeFile(destFilePath, body);
234228
234249
  } else {
@@ -242107,7 +242128,7 @@ function getDashboardUrl(projectId) {
242107
242128
  // src/cli/commands/agents/pull.ts
242108
242129
  async function pullAgentsAction() {
242109
242130
  const { project: project2 } = await readProjectConfig();
242110
- const configDir = dirname7(project2.configPath);
242131
+ const configDir = dirname8(project2.configPath);
242111
242132
  const agentsDir = join9(configDir, project2.agentsDir);
242112
242133
  const remoteAgents = await runTask("Fetching agents from Base44", async () => {
242113
242134
  return await fetchAgents();
@@ -242202,10 +242223,10 @@ function getWhoamiCommand(context) {
242202
242223
  }
242203
242224
 
242204
242225
  // src/cli/commands/connectors/pull.ts
242205
- import { dirname as dirname8, join as join10 } from "node:path";
242226
+ import { dirname as dirname9, join as join10 } from "node:path";
242206
242227
  async function pullConnectorsAction() {
242207
242228
  const { project: project2 } = await readProjectConfig();
242208
- const configDir = dirname8(project2.configPath);
242229
+ const configDir = dirname9(project2.configPath);
242209
242230
  const connectorsDir = join10(configDir, project2.connectorsDir);
242210
242231
  const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
242211
242232
  return await listConnectors();
@@ -243093,7 +243114,7 @@ function getFunctionsDeployCommand(context) {
243093
243114
  }
243094
243115
 
243095
243116
  // src/cli/commands/project/create.ts
243096
- import { basename as basename4, join as join11, resolve as resolve2 } from "node:path";
243117
+ import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
243097
243118
  var import_kebabCase = __toESM(require_kebabCase(), 1);
243098
243119
  var DEFAULT_TEMPLATE_ID = "backend-only";
243099
243120
  async function getTemplateById(templateId) {
@@ -243128,8 +243149,8 @@ async function createInteractive(options) {
243128
243149
  name: () => {
243129
243150
  return options.name ? Promise.resolve(options.name) : Ze({
243130
243151
  message: "What is the name of your project?",
243131
- placeholder: basename4(process.cwd()),
243132
- initialValue: basename4(process.cwd()),
243152
+ placeholder: basename3(process.cwd()),
243153
+ initialValue: basename3(process.cwd()),
243133
243154
  validate: (value) => {
243134
243155
  if (!value || value.trim().length === 0) {
243135
243156
  return "Every project deserves a name";
@@ -243901,7 +243922,7 @@ function getTypesCommand(context) {
243901
243922
  }
243902
243923
 
243903
243924
  // src/cli/dev/dev-server/main.ts
243904
- import { dirname as dirname14, join as join18 } from "node:path";
243925
+ import { dirname as dirname15, join as join18 } from "node:path";
243905
243926
  var import_cors = __toESM(require_lib4(), 1);
243906
243927
  var import_express4 = __toESM(require_express(), 1);
243907
243928
 
@@ -244060,9 +244081,9 @@ function createDevLogger() {
244060
244081
 
244061
244082
  // src/cli/dev/dev-server/function-manager.ts
244062
244083
  import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
244063
- import { dirname as dirname11, join as join15 } from "node:path";
244084
+ import { dirname as dirname12, join as join15 } from "node:path";
244064
244085
  import { fileURLToPath as fileURLToPath7 } from "node:url";
244065
- var __dirname5 = dirname11(fileURLToPath7(import.meta.url));
244086
+ var __dirname5 = dirname12(fileURLToPath7(import.meta.url));
244066
244087
  var WRAPPER_PATH = join15(__dirname5, "../deno-runtime/main.js");
244067
244088
  var READY_TIMEOUT = 30000;
244068
244089
 
@@ -244632,7 +244653,7 @@ function createCustomIntegrationRoutes(remoteProxy, logger) {
244632
244653
 
244633
244654
  // src/cli/dev/dev-server/watcher.ts
244634
244655
  import { EventEmitter as EventEmitter4 } from "node:events";
244635
- import { relative as relative4 } from "node:path";
244656
+ import { relative as relative6 } from "node:path";
244636
244657
 
244637
244658
  // node_modules/chokidar/index.js
244638
244659
  import { EventEmitter as EventEmitter3 } from "node:events";
@@ -244802,10 +244823,10 @@ class ReaddirpStream extends Readable6 {
244802
244823
  }
244803
244824
  async _formatEntry(dirent, path19) {
244804
244825
  let entry;
244805
- const basename5 = this._isDirent ? dirent.name : dirent;
244826
+ const basename4 = this._isDirent ? dirent.name : dirent;
244806
244827
  try {
244807
- const fullPath = presolve(pjoin(path19, basename5));
244808
- entry = { path: prelative(this._root, fullPath), fullPath, basename: basename5 };
244828
+ const fullPath = presolve(pjoin(path19, basename4));
244829
+ entry = { path: prelative(this._root, fullPath), fullPath, basename: basename4 };
244809
244830
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
244810
244831
  } catch (err) {
244811
244832
  this._onError(err);
@@ -245332,9 +245353,9 @@ class NodeFsHandler {
245332
245353
  _watchWithNodeFs(path19, listener) {
245333
245354
  const opts = this.fsw.options;
245334
245355
  const directory = sp2.dirname(path19);
245335
- const basename6 = sp2.basename(path19);
245356
+ const basename5 = sp2.basename(path19);
245336
245357
  const parent = this.fsw._getWatchedDir(directory);
245337
- parent.add(basename6);
245358
+ parent.add(basename5);
245338
245359
  const absolutePath = sp2.resolve(path19);
245339
245360
  const options8 = {
245340
245361
  persistent: opts.persistent
@@ -245344,7 +245365,7 @@ class NodeFsHandler {
245344
245365
  let closer;
245345
245366
  if (opts.usePolling) {
245346
245367
  const enableBin = opts.interval !== opts.binaryInterval;
245347
- options8.interval = enableBin && isBinaryPath(basename6) ? opts.binaryInterval : opts.interval;
245368
+ options8.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
245348
245369
  closer = setFsWatchFileListener(path19, absolutePath, options8, {
245349
245370
  listener,
245350
245371
  rawEmitter: this.fsw._emitRaw
@@ -245362,11 +245383,11 @@ class NodeFsHandler {
245362
245383
  if (this.fsw.closed) {
245363
245384
  return;
245364
245385
  }
245365
- const dirname13 = sp2.dirname(file2);
245366
- const basename6 = sp2.basename(file2);
245367
- const parent = this.fsw._getWatchedDir(dirname13);
245386
+ const dirname14 = sp2.dirname(file2);
245387
+ const basename5 = sp2.basename(file2);
245388
+ const parent = this.fsw._getWatchedDir(dirname14);
245368
245389
  let prevStats = stats;
245369
- if (parent.has(basename6))
245390
+ if (parent.has(basename5))
245370
245391
  return;
245371
245392
  const listener = async (path19, newStats) => {
245372
245393
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5))
@@ -245391,9 +245412,9 @@ class NodeFsHandler {
245391
245412
  prevStats = newStats2;
245392
245413
  }
245393
245414
  } catch (error48) {
245394
- this.fsw._remove(dirname13, basename6);
245415
+ this.fsw._remove(dirname14, basename5);
245395
245416
  }
245396
- } else if (parent.has(basename6)) {
245417
+ } else if (parent.has(basename5)) {
245397
245418
  const at13 = newStats.atimeMs;
245398
245419
  const mt12 = newStats.mtimeMs;
245399
245420
  if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
@@ -245614,11 +245635,11 @@ function createPattern(matcher) {
245614
245635
  if (matcher.path === string4)
245615
245636
  return true;
245616
245637
  if (matcher.recursive) {
245617
- const relative4 = sp3.relative(matcher.path, string4);
245618
- if (!relative4) {
245638
+ const relative6 = sp3.relative(matcher.path, string4);
245639
+ if (!relative6) {
245619
245640
  return false;
245620
245641
  }
245621
- return !relative4.startsWith("..") && !sp3.isAbsolute(relative4);
245642
+ return !relative6.startsWith("..") && !sp3.isAbsolute(relative6);
245622
245643
  }
245623
245644
  return false;
245624
245645
  };
@@ -246307,7 +246328,7 @@ class WatchBase44 extends EventEmitter4 {
246307
246328
  }
246308
246329
  watchTarget(item) {
246309
246330
  const handler = import_debounce.default(async (_event, path19) => {
246310
- this.emit("change", item.name, relative4(item.path, path19));
246331
+ this.emit("change", item.name, relative6(item.path, path19));
246311
246332
  }, WATCH_DEBOUNCE_MS);
246312
246333
  const watcher = watch(item.path, {
246313
246334
  ignoreInitial: true
@@ -246400,7 +246421,7 @@ async function createDevServer(options8) {
246400
246421
  const base44ConfigWatcher = new WatchBase44([
246401
246422
  {
246402
246423
  name: "functions",
246403
- path: join18(dirname14(project2.configPath), project2.functionsDir)
246424
+ path: join18(dirname15(project2.configPath), project2.functionsDir)
246404
246425
  }
246405
246426
  ], devLogger);
246406
246427
  base44ConfigWatcher.on("change", async (name2) => {
@@ -246579,7 +246600,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
246579
246600
  import { release, type } from "node:os";
246580
246601
 
246581
246602
  // node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
246582
- import { dirname as dirname15, posix, sep } from "path";
246603
+ import { dirname as dirname16, posix, sep } from "path";
246583
246604
  function createModulerModifier() {
246584
246605
  const getModuleFromFileName = createGetModuleFromFilename();
246585
246606
  return async (frames) => {
@@ -246588,7 +246609,7 @@ function createModulerModifier() {
246588
246609
  return frames;
246589
246610
  };
246590
246611
  }
246591
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname15(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
246612
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname16(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
246592
246613
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
246593
246614
  return (filename) => {
246594
246615
  if (!filename)
@@ -250806,4 +250827,4 @@ export {
250806
250827
  CLIExitError
250807
250828
  };
250808
250829
 
250809
- //# debugId=CF0F55B99A93F97864756E2164756E21
250830
+ //# debugId=C5F38CF0EABECFE464756E2164756E21