@base44-preview/cli 0.0.37-pr.246.9589e51 → 0.0.37-pr.246.9aaa0fb
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 +16 -7
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -226141,7 +226141,9 @@ import { fileURLToPath } from "node:url";
|
|
|
226141
226141
|
var PROJECT_SUBDIR = "base44";
|
|
226142
226142
|
var CONFIG_FILE_EXTENSION = "jsonc";
|
|
226143
226143
|
var CONFIG_FILE_EXTENSION_GLOB = "{json,jsonc}";
|
|
226144
|
-
var
|
|
226144
|
+
var FUNCTION_CONFIG_GLOB = `**/function.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
226145
|
+
var ENTRY_FILE_GLOB = "**/entry.{js,ts}";
|
|
226146
|
+
var ENTRY_IGNORE_DOT_PATHS = ["**/*.*/**"];
|
|
226145
226147
|
var APP_CONFIG_PATTERN = `**/.app.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
226146
226148
|
var PROJECT_CONFIG_PATTERNS = [
|
|
226147
226149
|
`${PROJECT_SUBDIR}/config.${CONFIG_FILE_EXTENSION_GLOB}`,
|
|
@@ -234009,13 +234011,14 @@ async function readAllFunctions(functionsDir) {
|
|
|
234009
234011
|
if (!await pathExists(functionsDir)) {
|
|
234010
234012
|
return [];
|
|
234011
234013
|
}
|
|
234012
|
-
const configFiles = await globby(
|
|
234014
|
+
const configFiles = await globby(FUNCTION_CONFIG_GLOB, {
|
|
234013
234015
|
cwd: functionsDir,
|
|
234014
234016
|
absolute: true
|
|
234015
234017
|
});
|
|
234016
|
-
const entryFiles = await globby(
|
|
234018
|
+
const entryFiles = await globby(ENTRY_FILE_GLOB, {
|
|
234017
234019
|
cwd: functionsDir,
|
|
234018
|
-
absolute: true
|
|
234020
|
+
absolute: true,
|
|
234021
|
+
ignore: ENTRY_IGNORE_DOT_PATHS
|
|
234019
234022
|
});
|
|
234020
234023
|
const configFilesDirs = new Set(configFiles.map((f) => dirname4(f)));
|
|
234021
234024
|
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname4(entryFile)));
|
|
@@ -234028,7 +234031,7 @@ async function readAllFunctions(functionsDir) {
|
|
|
234028
234031
|
});
|
|
234029
234032
|
const name2 = relative(functionsDir, functionDir).split(/[/\\]/).join("/");
|
|
234030
234033
|
if (!name2) {
|
|
234031
|
-
throw new InvalidInputError("entry.
|
|
234034
|
+
throw new InvalidInputError("entry.ts found directly in the functions directory — it must be inside a named subfolder", {
|
|
234032
234035
|
hints: [
|
|
234033
234036
|
{
|
|
234034
234037
|
message: `Move ${entryFile} into a subfolder (e.g. functions/myFunc/entry.ts)`
|
|
@@ -234043,7 +234046,13 @@ async function readAllFunctions(functionsDir) {
|
|
|
234043
234046
|
const names = new Set;
|
|
234044
234047
|
for (const fn of functions) {
|
|
234045
234048
|
if (names.has(fn.name)) {
|
|
234046
|
-
throw new
|
|
234049
|
+
throw new InvalidInputError(`Duplicate function name "${fn.name}"`, {
|
|
234050
|
+
hints: [
|
|
234051
|
+
{
|
|
234052
|
+
message: "Ensure each function has a unique name (or path for zero-config functions)."
|
|
234053
|
+
}
|
|
234054
|
+
]
|
|
234055
|
+
});
|
|
234047
234056
|
}
|
|
234048
234057
|
names.add(fn.name);
|
|
234049
234058
|
}
|
|
@@ -250817,4 +250826,4 @@ export {
|
|
|
250817
250826
|
CLIExitError
|
|
250818
250827
|
};
|
|
250819
250828
|
|
|
250820
|
-
//# debugId=
|
|
250829
|
+
//# debugId=7BA46BBE7FFD365F64756E2164756E21
|