@base44-preview/cli 0.0.32-pr.166.496e743 → 0.0.32-pr.246.eec21b0

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
@@ -1867,23 +1867,6 @@ var require_commander = __commonJS((exports) => {
1867
1867
  exports.InvalidOptionArgumentError = InvalidArgumentError;
1868
1868
  });
1869
1869
 
1870
- // node_modules/@commander-js/extra-typings/index.js
1871
- var require_extra_typings = __commonJS((exports, module) => {
1872
- var commander = require_commander();
1873
- exports = module.exports = {};
1874
- exports.program = new commander.Command;
1875
- exports.Argument = commander.Argument;
1876
- exports.Command = commander.Command;
1877
- exports.CommanderError = commander.CommanderError;
1878
- exports.Help = commander.Help;
1879
- exports.InvalidArgumentError = commander.InvalidArgumentError;
1880
- exports.InvalidOptionArgumentError = commander.InvalidArgumentError;
1881
- exports.Option = commander.Option;
1882
- exports.createCommand = (name) => new commander.Command(name);
1883
- exports.createOption = (flags, description) => new commander.Option(flags, description);
1884
- exports.createArgument = (name, description) => new commander.Argument(name, description);
1885
- });
1886
-
1887
1870
  // node_modules/sisteransi/src/index.js
1888
1871
  var require_src = __commonJS((exports, module) => {
1889
1872
  var ESC = "\x1B";
@@ -9313,10 +9296,10 @@ var require_ejs = __commonJS((exports) => {
9313
9296
  };
9314
9297
  if (opts.filename && typeof Object.defineProperty === "function") {
9315
9298
  var filename = opts.filename;
9316
- var basename3 = path11.basename(filename, path11.extname(filename));
9299
+ var basename4 = path11.basename(filename, path11.extname(filename));
9317
9300
  try {
9318
9301
  Object.defineProperty(returnedFn, "name", {
9319
- value: basename3,
9302
+ value: basename4,
9320
9303
  writable: false,
9321
9304
  enumerable: false,
9322
9305
  configurable: true
@@ -111584,12 +111567,12 @@ function getLanguageByFileName(languages2, file2) {
111584
111567
  if (!file2) {
111585
111568
  return;
111586
111569
  }
111587
- const basename4 = getFileBasename(file2).toLowerCase();
111570
+ const basename5 = getFileBasename(file2).toLowerCase();
111588
111571
  return languages2.find(({
111589
111572
  filenames
111590
- }) => filenames?.some((name2) => name2.toLowerCase() === basename4)) ?? languages2.find(({
111573
+ }) => filenames?.some((name2) => name2.toLowerCase() === basename5)) ?? languages2.find(({
111591
111574
  extensions
111592
- }) => extensions?.some((extension) => basename4.endsWith(extension)));
111575
+ }) => extensions?.some((extension) => basename5.endsWith(extension)));
111593
111576
  }
111594
111577
  function getLanguageByLanguageName(languages2, languageName) {
111595
111578
  if (!languageName) {
@@ -116811,8 +116794,8 @@ var init_prettier = __esm(() => {
116811
116794
  }
116812
116795
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
116813
116796
  function isAffectDepthOfReadingPattern(pattern) {
116814
- const basename4 = path152.basename(pattern);
116815
- return endsWithSlashGlobStar(pattern) || isStaticPattern(basename4);
116797
+ const basename5 = path152.basename(pattern);
116798
+ return endsWithSlashGlobStar(pattern) || isStaticPattern(basename5);
116816
116799
  }
116817
116800
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
116818
116801
  function expandPatternsWithBraceExpansion(patterns) {
@@ -155696,7 +155679,7 @@ var require_view = __commonJS((exports, module) => {
155696
155679
  var path18 = __require("node:path");
155697
155680
  var fs28 = __require("node:fs");
155698
155681
  var dirname11 = path18.dirname;
155699
- var basename4 = path18.basename;
155682
+ var basename5 = path18.basename;
155700
155683
  var extname2 = path18.extname;
155701
155684
  var join15 = path18.join;
155702
155685
  var resolve5 = path18.resolve;
@@ -155735,7 +155718,7 @@ var require_view = __commonJS((exports, module) => {
155735
155718
  var root2 = roots[i5];
155736
155719
  var loc = resolve5(root2, name2);
155737
155720
  var dir = dirname11(loc);
155738
- var file2 = basename4(loc);
155721
+ var file2 = basename5(loc);
155739
155722
  path19 = this.resolve(dir, file2);
155740
155723
  }
155741
155724
  return path19;
@@ -155765,7 +155748,7 @@ var require_view = __commonJS((exports, module) => {
155765
155748
  if (stat2 && stat2.isFile()) {
155766
155749
  return path19;
155767
155750
  }
155768
- path19 = join15(dir, basename4(file2, ext), "index" + ext);
155751
+ path19 = join15(dir, basename5(file2, ext), "index" + ext);
155769
155752
  stat2 = tryStat(path19);
155770
155753
  if (stat2 && stat2.isFile()) {
155771
155754
  return path19;
@@ -159086,7 +159069,7 @@ var require_content_disposition = __commonJS((exports, module) => {
159086
159069
  */
159087
159070
  module.exports = contentDisposition;
159088
159071
  module.exports.parse = parse10;
159089
- var basename4 = __require("path").basename;
159072
+ var basename5 = __require("path").basename;
159090
159073
  var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
159091
159074
  var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
159092
159075
  var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g;
@@ -159121,9 +159104,9 @@ var require_content_disposition = __commonJS((exports, module) => {
159121
159104
  if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) {
159122
159105
  throw new TypeError("fallback must be ISO-8859-1 string");
159123
159106
  }
159124
- var name2 = basename4(filename);
159107
+ var name2 = basename5(filename);
159125
159108
  var isQuotedString = TEXT_REGEXP.test(name2);
159126
- var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) : basename4(fallback);
159109
+ var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) : basename5(fallback);
159127
159110
  var hasFallback = typeof fallbackName === "string" && fallbackName !== name2;
159128
159111
  if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name2)) {
159129
159112
  params["filename*"] = name2;
@@ -162834,8 +162817,8 @@ var require_dist3 = __commonJS((exports, module) => {
162834
162817
  }
162835
162818
  });
162836
162819
 
162837
- // node_modules/@commander-js/extra-typings/esm.mjs
162838
- var import__ = __toESM(require_extra_typings(), 1);
162820
+ // node_modules/commander/esm.mjs
162821
+ var import__ = __toESM(require_commander(), 1);
162839
162822
  var {
162840
162823
  program,
162841
162824
  createCommand,
@@ -185623,7 +185606,7 @@ async function deployFunctions(functions) {
185623
185606
  return result.data;
185624
185607
  }
185625
185608
  // src/core/resources/function/config.ts
185626
- import { dirname as dirname4, join as join5 } from "node:path";
185609
+ import { basename as basename2, dirname as dirname4, join as join5 } from "node:path";
185627
185610
  async function readFunctionConfig(configPath) {
185628
185611
  const parsed = await readJsonFile(configPath);
185629
185612
  const result = FunctionConfigSchema.safeParse(parsed);
@@ -185654,7 +185637,24 @@ async function readAllFunctions(functionsDir) {
185654
185637
  cwd: functionsDir,
185655
185638
  absolute: true
185656
185639
  });
185657
- const functions = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
185640
+ const indexFiles = await globby(`*/index.{js,ts}`, {
185641
+ cwd: functionsDir,
185642
+ absolute: true
185643
+ });
185644
+ const configFilesDirs = new Set(configFiles.map((f) => dirname4(f)));
185645
+ const indexFilesDirs = indexFiles.filter((indexFile) => !configFilesDirs.has(dirname4(indexFile)));
185646
+ const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
185647
+ const functionsWithoutConfig = await Promise.all(indexFilesDirs.map(async (functionFile) => {
185648
+ const functionDir = dirname4(functionFile);
185649
+ const filePaths = await globby("*.{js,ts,json}", {
185650
+ cwd: functionDir,
185651
+ absolute: true
185652
+ });
185653
+ const name2 = basename2(functionDir);
185654
+ const entry = basename2(functionFile);
185655
+ return { name: name2, entry, entryPath: functionFile, filePaths };
185656
+ }));
185657
+ const functions = [...functionsFromConfig, ...functionsWithoutConfig];
185658
185658
  const names = new Set;
185659
185659
  for (const fn of functions) {
185660
185660
  if (names.has(fn.name)) {
@@ -185665,11 +185665,11 @@ async function readAllFunctions(functionsDir) {
185665
185665
  return functions;
185666
185666
  }
185667
185667
  // src/core/resources/function/deploy.ts
185668
- import { basename as basename2 } from "node:path";
185668
+ import { basename as basename3 } from "node:path";
185669
185669
  async function loadFunctionCode(fn) {
185670
185670
  const loadedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
185671
185671
  const content = await readTextFile(filePath);
185672
- return { path: basename2(filePath), content };
185672
+ return { path: basename3(filePath), content };
185673
185673
  }));
185674
185674
  return { ...fn, files: loadedFiles };
185675
185675
  }
@@ -193491,7 +193491,6 @@ var package_default = {
193491
193491
  devDependencies: {
193492
193492
  "@biomejs/biome": "^2.0.0",
193493
193493
  "@clack/prompts": "^0.11.0",
193494
- "@commander-js/extra-typings": "^12.1.0",
193495
193494
  "@types/bun": "^1.2.15",
193496
193495
  "@types/common-tags": "^1.8.4",
193497
193496
  "@types/cors": "^2.8.19",
@@ -194638,7 +194637,7 @@ function getFunctionsDeployCommand(context) {
194638
194637
  }
194639
194638
 
194640
194639
  // src/cli/commands/project/create.ts
194641
- import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
194640
+ import { basename as basename4, join as join11, resolve as resolve2 } from "node:path";
194642
194641
  var import_lodash = __toESM(require_lodash(), 1);
194643
194642
  var DEFAULT_TEMPLATE_ID = "backend-only";
194644
194643
  async function getTemplateById(templateId) {
@@ -194673,8 +194672,8 @@ async function createInteractive(options) {
194673
194672
  name: () => {
194674
194673
  return options.name ? Promise.resolve(options.name) : he({
194675
194674
  message: "What is the name of your project?",
194676
- placeholder: basename3(process.cwd()),
194677
- initialValue: basename3(process.cwd()),
194675
+ placeholder: basename4(process.cwd()),
194676
+ initialValue: basename4(process.cwd()),
194678
194677
  validate: (value) => {
194679
194678
  if (!value || value.trim().length === 0) {
194680
194679
  return "Every project deserves a name";
@@ -199769,4 +199768,4 @@ export {
199769
199768
  CLIExitError
199770
199769
  };
199771
199770
 
199772
- //# debugId=83DE11188CBE46DA64756E2164756E21
199771
+ //# debugId=96D36CCA48392A0764756E2164756E21