@base44-preview/cli 0.1.2-pr.563.728cad8 → 0.1.2-pr.563.7cff4d1

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
@@ -243424,14 +243424,9 @@ var FunctionConfigSchema = exports_external.object({
243424
243424
  entry: exports_external.string().min(1, "Entry point cannot be empty"),
243425
243425
  automations: exports_external.array(AutomationSchema).optional()
243426
243426
  });
243427
- var OutOfBoundsImportSchema = exports_external.object({
243428
- importer: exports_external.string(),
243429
- specifier: exports_external.string()
243430
- });
243431
243427
  var BackendFunctionSchema = FunctionConfigSchema.extend({
243432
243428
  entryPath: exports_external.string().min(1, "Entry path cannot be empty"),
243433
243429
  filePaths: exports_external.array(exports_external.string()).min(1, "Function must have at least one file"),
243434
- outOfBoundsImports: exports_external.array(OutOfBoundsImportSchema).optional().default([]),
243435
243430
  source: ResourceSourceSchema
243436
243431
  });
243437
243432
  var DeploySingleFunctionResponseSchema = exports_external.object({
@@ -243575,7 +243570,6 @@ async function collectReachableBackendFiles(_entryPath, functionFilePaths, backe
243575
243570
  const visited = new Set(functionFilePaths);
243576
243571
  const queue = [...functionFilePaths];
243577
243572
  const extra = [];
243578
- const outOfBounds = [];
243579
243573
  while (queue.length > 0) {
243580
243574
  const filePath = queue.shift();
243581
243575
  let content;
@@ -243591,10 +243585,8 @@ async function collectReachableBackendFiles(_entryPath, functionFilePaths, backe
243591
243585
  if (!resolved)
243592
243586
  continue;
243593
243587
  const rel = relative(backendRoot, resolved);
243594
- if (rel.startsWith("..")) {
243595
- outOfBounds.push({ importer: filePath, specifier });
243588
+ if (rel.startsWith(".."))
243596
243589
  continue;
243597
- }
243598
243590
  if (!visited.has(resolved)) {
243599
243591
  visited.add(resolved);
243600
243592
  queue.push(resolved);
@@ -243603,10 +243595,7 @@ async function collectReachableBackendFiles(_entryPath, functionFilePaths, backe
243603
243595
  }
243604
243596
  }
243605
243597
  const functionSet = new Set(functionFilePaths);
243606
- return {
243607
- extra: extra.filter((p) => !functionSet.has(p)),
243608
- outOfBounds
243609
- };
243598
+ return extra.filter((p) => !functionSet.has(p));
243610
243599
  }
243611
243600
 
243612
243601
  // src/core/resources/function/config.ts
@@ -243631,13 +243620,12 @@ async function readFunction(configPath, backendRoot) {
243631
243620
  cwd: functionDir,
243632
243621
  absolute: true
243633
243622
  });
243634
- const { extra, outOfBounds } = await collectReachableBackendFiles(entryPath, filePaths, backendRoot);
243635
- const allFilePaths = [...new Set([...filePaths, ...extra])];
243623
+ const extraFiles = await collectReachableBackendFiles(entryPath, filePaths, backendRoot);
243624
+ const allFilePaths = [...new Set([...filePaths, ...extraFiles])];
243636
243625
  const functionData = {
243637
243626
  ...config7,
243638
243627
  entryPath,
243639
243628
  filePaths: allFilePaths,
243640
- outOfBoundsImports: outOfBounds,
243641
243629
  source: { type: "project" }
243642
243630
  };
243643
243631
  return functionData;
@@ -243665,8 +243653,8 @@ async function readAllFunctions(functionsDir) {
243665
243653
  cwd: functionDir,
243666
243654
  absolute: true
243667
243655
  });
243668
- const { extra, outOfBounds } = await collectReachableBackendFiles(entryFile, filePaths, backendRoot);
243669
- const allFilePaths = [...new Set([...filePaths, ...extra])];
243656
+ const extraFiles = await collectReachableBackendFiles(entryFile, filePaths, backendRoot);
243657
+ const allFilePaths = [...new Set([...filePaths, ...extraFiles])];
243670
243658
  const name2 = relative2(functionsDir, functionDir).split(/[/\\]/).join("/");
243671
243659
  if (!name2) {
243672
243660
  throw new InvalidInputError("entry.ts found directly in the functions directory — it must be inside a named subfolder", {
@@ -243683,7 +243671,6 @@ async function readAllFunctions(functionsDir) {
243683
243671
  entry,
243684
243672
  entryPath: entryFile,
243685
243673
  filePaths: allFilePaths,
243686
- outOfBoundsImports: outOfBounds,
243687
243674
  source: { type: "project" }
243688
243675
  };
243689
243676
  return functionData;
@@ -253110,15 +253097,6 @@ async function deployFunctionsAction({ log }, names, options) {
253110
253097
  };
253111
253098
  }
253112
253099
  log.info(`Found ${toDeploy.length} ${toDeploy.length === 1 ? "function" : "functions"} to deploy`);
253113
- for (const fn of toDeploy) {
253114
- if (fn.outOfBoundsImports && fn.outOfBoundsImports.length > 0) {
253115
- for (const { importer, specifier } of fn.outOfBoundsImports) {
253116
- const rel = importer.includes(fn.name) ? importer.slice(importer.lastIndexOf(fn.name)) : importer;
253117
- log.error(`[${fn.name}] Cannot import "${specifier}" in ${rel}: the file is outside base44/ and cannot be uploaded. Move it to base44/shared/ to share it across functions. Functions run on Deno — use npm: or jsr: specifiers (not package.json) for external packages.`);
253118
- }
253119
- throw new CLIExitError(1);
253120
- }
253121
- }
253122
253100
  let completed = 0;
253123
253101
  const total = toDeploy.length;
253124
253102
  const results = await deployFunctionsSequentially(toDeploy, {
@@ -262620,4 +262598,4 @@ export {
262620
262598
  CLIExitError
262621
262599
  };
262622
262600
 
262623
- //# debugId=B8C7F17D9436926E64756E2164756E21
262601
+ //# debugId=57BD6A8806A9B3BA64756E2164756E21