@base44-preview/cli 0.0.37-pr.246.abd2ac0 → 0.0.37-pr.246.ff9a596
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 +95 -84
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
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
|
|
8936
|
+
var dirname7 = path11.dirname;
|
|
8937
8937
|
var extname = path11.extname;
|
|
8938
8938
|
var resolve = path11.resolve;
|
|
8939
|
-
var includePath = resolve(isDir ? filename :
|
|
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
|
|
9317
|
+
var basename3 = path11.basename(filename, path11.extname(filename));
|
|
9318
9318
|
try {
|
|
9319
9319
|
Object.defineProperty(returnedFn, "name", {
|
|
9320
|
-
value:
|
|
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
|
|
12656
|
-
shortPaths.push(
|
|
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
|
|
112164
|
+
const basename4 = getFileBasename(file2).toLowerCase();
|
|
112165
112165
|
return languages2.find(({
|
|
112166
112166
|
filenames
|
|
112167
|
-
}) => filenames?.some((name2) => name2.toLowerCase() ===
|
|
112167
|
+
}) => filenames?.some((name2) => name2.toLowerCase() === basename4)) ?? languages2.find(({
|
|
112168
112168
|
extensions
|
|
112169
|
-
}) => extensions?.some((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
|
|
117392
|
-
return endsWithSlashGlobStar(pattern) || isStaticPattern(
|
|
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
|
|
117437
|
+
const relative22 = [];
|
|
117438
117438
|
for (const pattern of patterns) {
|
|
117439
117439
|
if (isAbsolute2(pattern)) {
|
|
117440
117440
|
absolute.push(pattern);
|
|
117441
117441
|
} else {
|
|
117442
|
-
|
|
117442
|
+
relative22.push(pattern);
|
|
117443
117443
|
}
|
|
117444
117444
|
}
|
|
117445
|
-
return [absolute,
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
156276
|
-
var
|
|
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 =
|
|
156315
|
-
var file2 =
|
|
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,
|
|
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
|
|
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 =
|
|
159701
|
+
var name2 = basename4(filename);
|
|
159702
159702
|
var isQuotedString = TEXT_REGEXP.test(name2);
|
|
159703
|
-
var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) :
|
|
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(
|
|
161962
|
-
return useNativeURL ? new URL2(
|
|
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
|
|
163601
|
-
if (
|
|
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
|
|
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:
|
|
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:
|
|
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 =
|
|
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
|
|
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);
|
|
@@ -233170,7 +233170,7 @@ var generateGlobTasks = normalizeArguments(generateTasks);
|
|
|
233170
233170
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
233171
233171
|
|
|
233172
233172
|
// src/core/project/config.ts
|
|
233173
|
-
import { dirname as
|
|
233173
|
+
import { dirname as dirname6, join as join6 } from "node:path";
|
|
233174
233174
|
|
|
233175
233175
|
// src/core/resources/agent/schema.ts
|
|
233176
233176
|
var EntityOperationSchema = exports_external.enum(["create", "update", "delete", "read"]);
|
|
@@ -233980,7 +233980,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
|
|
|
233980
233980
|
return result.data;
|
|
233981
233981
|
}
|
|
233982
233982
|
// src/core/resources/function/config.ts
|
|
233983
|
-
import { basename as basename2, dirname as dirname4, join as join5 } from "node:path";
|
|
233983
|
+
import { basename as basename2, dirname as dirname4, join as join5, relative } from "node:path";
|
|
233984
233984
|
async function readFunctionConfig(configPath) {
|
|
233985
233985
|
const parsed = await readJsonFile(configPath);
|
|
233986
233986
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -233998,7 +233998,7 @@ async function readFunction(configPath) {
|
|
|
233998
233998
|
hints: [{ message: "Check the 'entry' field in your function config" }]
|
|
233999
233999
|
});
|
|
234000
234000
|
}
|
|
234001
|
-
const filePaths = await globby("
|
|
234001
|
+
const filePaths = await globby("**/*.{js,ts,json}", {
|
|
234002
234002
|
cwd: functionDir,
|
|
234003
234003
|
absolute: true
|
|
234004
234004
|
});
|
|
@@ -234009,26 +234009,35 @@ async function readAllFunctions(functionsDir) {
|
|
|
234009
234009
|
if (!await pathExists(functionsDir)) {
|
|
234010
234010
|
return [];
|
|
234011
234011
|
}
|
|
234012
|
-
const configFiles = await globby(
|
|
234012
|
+
const configFiles = await globby(`**/${FUNCTION_CONFIG_FILE}`, {
|
|
234013
234013
|
cwd: functionsDir,
|
|
234014
234014
|
absolute: true
|
|
234015
234015
|
});
|
|
234016
|
-
const
|
|
234016
|
+
const entryFiles = await globby(`**/entry.{js,ts}`, {
|
|
234017
234017
|
cwd: functionsDir,
|
|
234018
234018
|
absolute: true
|
|
234019
234019
|
});
|
|
234020
234020
|
const configFilesDirs = new Set(configFiles.map((f) => dirname4(f)));
|
|
234021
|
-
const
|
|
234021
|
+
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname4(entryFile)));
|
|
234022
234022
|
const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
234023
|
-
const functionsWithoutConfig = await Promise.all(
|
|
234024
|
-
const functionDir = dirname4(
|
|
234025
|
-
const filePaths = await globby("
|
|
234023
|
+
const functionsWithoutConfig = await Promise.all(entryFilesWithoutConfig.map(async (entryFile) => {
|
|
234024
|
+
const functionDir = dirname4(entryFile);
|
|
234025
|
+
const filePaths = await globby("**/*.{js,ts,json}", {
|
|
234026
234026
|
cwd: functionDir,
|
|
234027
234027
|
absolute: true
|
|
234028
234028
|
});
|
|
234029
|
-
const name2 =
|
|
234030
|
-
|
|
234031
|
-
|
|
234029
|
+
const name2 = relative(functionsDir, functionDir).split(/[/\\]/).join("/");
|
|
234030
|
+
if (!name2) {
|
|
234031
|
+
throw new InvalidInputError("entry.js/entry.ts must be inside a subfolder of the functions directory", {
|
|
234032
|
+
hints: [
|
|
234033
|
+
{
|
|
234034
|
+
message: `Move ${entryFile} into a subfolder (e.g. functions/myFunc/entry.ts)`
|
|
234035
|
+
}
|
|
234036
|
+
]
|
|
234037
|
+
});
|
|
234038
|
+
}
|
|
234039
|
+
const entry = basename2(entryFile);
|
|
234040
|
+
return { name: name2, entry, entryPath: entryFile, filePaths };
|
|
234032
234041
|
}));
|
|
234033
234042
|
const functions = [...functionsFromConfig, ...functionsWithoutConfig];
|
|
234034
234043
|
const names = new Set;
|
|
@@ -234041,11 +234050,13 @@ async function readAllFunctions(functionsDir) {
|
|
|
234041
234050
|
return functions;
|
|
234042
234051
|
}
|
|
234043
234052
|
// src/core/resources/function/deploy.ts
|
|
234044
|
-
import {
|
|
234053
|
+
import { dirname as dirname5, relative as relative2 } from "node:path";
|
|
234045
234054
|
async function loadFunctionCode(fn) {
|
|
234055
|
+
const functionDir = dirname5(fn.entryPath);
|
|
234046
234056
|
const loadedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
|
|
234047
234057
|
const content = await readTextFile(filePath);
|
|
234048
|
-
|
|
234058
|
+
const path11 = relative2(functionDir, filePath).split(/[/\\]/).join("/");
|
|
234059
|
+
return { path: path11, content };
|
|
234049
234060
|
}));
|
|
234050
234061
|
return { ...fn, files: loadedFiles };
|
|
234051
234062
|
}
|
|
@@ -234071,12 +234082,12 @@ async function findConfigInDir(dir) {
|
|
|
234071
234082
|
}
|
|
234072
234083
|
async function findProjectRoot(startPath) {
|
|
234073
234084
|
let current = startPath || process.cwd();
|
|
234074
|
-
while (current !==
|
|
234085
|
+
while (current !== dirname6(current)) {
|
|
234075
234086
|
const configPath = await findConfigInDir(current);
|
|
234076
234087
|
if (configPath) {
|
|
234077
234088
|
return { root: current, configPath };
|
|
234078
234089
|
}
|
|
234079
|
-
current =
|
|
234090
|
+
current = dirname6(current);
|
|
234080
234091
|
}
|
|
234081
234092
|
return null;
|
|
234082
234093
|
}
|
|
@@ -234098,7 +234109,7 @@ async function readProjectConfig(projectRoot) {
|
|
|
234098
234109
|
throw new SchemaValidationError("Invalid project configuration", result.error, configPath);
|
|
234099
234110
|
}
|
|
234100
234111
|
const project = result.data;
|
|
234101
|
-
const configDir =
|
|
234112
|
+
const configDir = dirname6(configPath);
|
|
234102
234113
|
const [entities, functions, agents, connectors] = await Promise.all([
|
|
234103
234114
|
entityResource.readAll(join6(configDir, project.entitiesDir)),
|
|
234104
234115
|
functionResource.readAll(join6(configDir, project.functionsDir)),
|
|
@@ -234200,7 +234211,7 @@ async function readAppConfig(projectRoot) {
|
|
|
234200
234211
|
// src/core/project/template.ts
|
|
234201
234212
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
234202
234213
|
var import_front_matter = __toESM(require_front_matter(), 1);
|
|
234203
|
-
import { dirname as
|
|
234214
|
+
import { dirname as dirname7, join as join7 } from "node:path";
|
|
234204
234215
|
async function listTemplates() {
|
|
234205
234216
|
const parsed = await readJsonFile(getTemplatesIndexPath());
|
|
234206
234217
|
const result = TemplatesConfigSchema.safeParse(parsed);
|
|
@@ -234222,7 +234233,7 @@ async function renderTemplate(template, destPath, data) {
|
|
|
234222
234233
|
if (file2.endsWith(".ejs")) {
|
|
234223
234234
|
const rendered = await import_ejs.default.renderFile(srcPath, data);
|
|
234224
234235
|
const { attributes, body } = import_front_matter.default(rendered);
|
|
234225
|
-
const destFile = attributes.outputFileName ? join7(
|
|
234236
|
+
const destFile = attributes.outputFileName ? join7(dirname7(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
|
|
234226
234237
|
const destFilePath = join7(destPath, destFile);
|
|
234227
234238
|
await writeFile(destFilePath, body);
|
|
234228
234239
|
} else {
|
|
@@ -242107,7 +242118,7 @@ function getDashboardUrl(projectId) {
|
|
|
242107
242118
|
// src/cli/commands/agents/pull.ts
|
|
242108
242119
|
async function pullAgentsAction() {
|
|
242109
242120
|
const { project: project2 } = await readProjectConfig();
|
|
242110
|
-
const configDir =
|
|
242121
|
+
const configDir = dirname8(project2.configPath);
|
|
242111
242122
|
const agentsDir = join9(configDir, project2.agentsDir);
|
|
242112
242123
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
242113
242124
|
return await fetchAgents();
|
|
@@ -242202,10 +242213,10 @@ function getWhoamiCommand(context) {
|
|
|
242202
242213
|
}
|
|
242203
242214
|
|
|
242204
242215
|
// src/cli/commands/connectors/pull.ts
|
|
242205
|
-
import { dirname as
|
|
242216
|
+
import { dirname as dirname9, join as join10 } from "node:path";
|
|
242206
242217
|
async function pullConnectorsAction() {
|
|
242207
242218
|
const { project: project2 } = await readProjectConfig();
|
|
242208
|
-
const configDir =
|
|
242219
|
+
const configDir = dirname9(project2.configPath);
|
|
242209
242220
|
const connectorsDir = join10(configDir, project2.connectorsDir);
|
|
242210
242221
|
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
242211
242222
|
return await listConnectors();
|
|
@@ -243093,7 +243104,7 @@ function getFunctionsDeployCommand(context) {
|
|
|
243093
243104
|
}
|
|
243094
243105
|
|
|
243095
243106
|
// src/cli/commands/project/create.ts
|
|
243096
|
-
import { basename as
|
|
243107
|
+
import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
|
|
243097
243108
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
243098
243109
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
243099
243110
|
async function getTemplateById(templateId) {
|
|
@@ -243128,8 +243139,8 @@ async function createInteractive(options) {
|
|
|
243128
243139
|
name: () => {
|
|
243129
243140
|
return options.name ? Promise.resolve(options.name) : Ze({
|
|
243130
243141
|
message: "What is the name of your project?",
|
|
243131
|
-
placeholder:
|
|
243132
|
-
initialValue:
|
|
243142
|
+
placeholder: basename3(process.cwd()),
|
|
243143
|
+
initialValue: basename3(process.cwd()),
|
|
243133
243144
|
validate: (value) => {
|
|
243134
243145
|
if (!value || value.trim().length === 0) {
|
|
243135
243146
|
return "Every project deserves a name";
|
|
@@ -243901,7 +243912,7 @@ function getTypesCommand(context) {
|
|
|
243901
243912
|
}
|
|
243902
243913
|
|
|
243903
243914
|
// src/cli/dev/dev-server/main.ts
|
|
243904
|
-
import { dirname as
|
|
243915
|
+
import { dirname as dirname15, join as join18 } from "node:path";
|
|
243905
243916
|
var import_cors = __toESM(require_lib4(), 1);
|
|
243906
243917
|
var import_express4 = __toESM(require_express(), 1);
|
|
243907
243918
|
|
|
@@ -244060,9 +244071,9 @@ function createDevLogger() {
|
|
|
244060
244071
|
|
|
244061
244072
|
// src/cli/dev/dev-server/function-manager.ts
|
|
244062
244073
|
import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
|
|
244063
|
-
import { dirname as
|
|
244074
|
+
import { dirname as dirname12, join as join15 } from "node:path";
|
|
244064
244075
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
244065
|
-
var __dirname5 =
|
|
244076
|
+
var __dirname5 = dirname12(fileURLToPath7(import.meta.url));
|
|
244066
244077
|
var WRAPPER_PATH = join15(__dirname5, "../deno-runtime/main.js");
|
|
244067
244078
|
var READY_TIMEOUT = 30000;
|
|
244068
244079
|
|
|
@@ -244632,7 +244643,7 @@ function createCustomIntegrationRoutes(remoteProxy, logger) {
|
|
|
244632
244643
|
|
|
244633
244644
|
// src/cli/dev/dev-server/watcher.ts
|
|
244634
244645
|
import { EventEmitter as EventEmitter4 } from "node:events";
|
|
244635
|
-
import { relative as
|
|
244646
|
+
import { relative as relative6 } from "node:path";
|
|
244636
244647
|
|
|
244637
244648
|
// node_modules/chokidar/index.js
|
|
244638
244649
|
import { EventEmitter as EventEmitter3 } from "node:events";
|
|
@@ -244802,10 +244813,10 @@ class ReaddirpStream extends Readable6 {
|
|
|
244802
244813
|
}
|
|
244803
244814
|
async _formatEntry(dirent, path19) {
|
|
244804
244815
|
let entry;
|
|
244805
|
-
const
|
|
244816
|
+
const basename4 = this._isDirent ? dirent.name : dirent;
|
|
244806
244817
|
try {
|
|
244807
|
-
const fullPath = presolve(pjoin(path19,
|
|
244808
|
-
entry = { path: prelative(this._root, fullPath), fullPath, basename:
|
|
244818
|
+
const fullPath = presolve(pjoin(path19, basename4));
|
|
244819
|
+
entry = { path: prelative(this._root, fullPath), fullPath, basename: basename4 };
|
|
244809
244820
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
244810
244821
|
} catch (err) {
|
|
244811
244822
|
this._onError(err);
|
|
@@ -245332,9 +245343,9 @@ class NodeFsHandler {
|
|
|
245332
245343
|
_watchWithNodeFs(path19, listener) {
|
|
245333
245344
|
const opts = this.fsw.options;
|
|
245334
245345
|
const directory = sp2.dirname(path19);
|
|
245335
|
-
const
|
|
245346
|
+
const basename5 = sp2.basename(path19);
|
|
245336
245347
|
const parent = this.fsw._getWatchedDir(directory);
|
|
245337
|
-
parent.add(
|
|
245348
|
+
parent.add(basename5);
|
|
245338
245349
|
const absolutePath = sp2.resolve(path19);
|
|
245339
245350
|
const options8 = {
|
|
245340
245351
|
persistent: opts.persistent
|
|
@@ -245344,7 +245355,7 @@ class NodeFsHandler {
|
|
|
245344
245355
|
let closer;
|
|
245345
245356
|
if (opts.usePolling) {
|
|
245346
245357
|
const enableBin = opts.interval !== opts.binaryInterval;
|
|
245347
|
-
options8.interval = enableBin && isBinaryPath(
|
|
245358
|
+
options8.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
|
|
245348
245359
|
closer = setFsWatchFileListener(path19, absolutePath, options8, {
|
|
245349
245360
|
listener,
|
|
245350
245361
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -245362,11 +245373,11 @@ class NodeFsHandler {
|
|
|
245362
245373
|
if (this.fsw.closed) {
|
|
245363
245374
|
return;
|
|
245364
245375
|
}
|
|
245365
|
-
const
|
|
245366
|
-
const
|
|
245367
|
-
const parent = this.fsw._getWatchedDir(
|
|
245376
|
+
const dirname14 = sp2.dirname(file2);
|
|
245377
|
+
const basename5 = sp2.basename(file2);
|
|
245378
|
+
const parent = this.fsw._getWatchedDir(dirname14);
|
|
245368
245379
|
let prevStats = stats;
|
|
245369
|
-
if (parent.has(
|
|
245380
|
+
if (parent.has(basename5))
|
|
245370
245381
|
return;
|
|
245371
245382
|
const listener = async (path19, newStats) => {
|
|
245372
245383
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5))
|
|
@@ -245391,9 +245402,9 @@ class NodeFsHandler {
|
|
|
245391
245402
|
prevStats = newStats2;
|
|
245392
245403
|
}
|
|
245393
245404
|
} catch (error48) {
|
|
245394
|
-
this.fsw._remove(
|
|
245405
|
+
this.fsw._remove(dirname14, basename5);
|
|
245395
245406
|
}
|
|
245396
|
-
} else if (parent.has(
|
|
245407
|
+
} else if (parent.has(basename5)) {
|
|
245397
245408
|
const at13 = newStats.atimeMs;
|
|
245398
245409
|
const mt12 = newStats.mtimeMs;
|
|
245399
245410
|
if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
|
|
@@ -245614,11 +245625,11 @@ function createPattern(matcher) {
|
|
|
245614
245625
|
if (matcher.path === string4)
|
|
245615
245626
|
return true;
|
|
245616
245627
|
if (matcher.recursive) {
|
|
245617
|
-
const
|
|
245618
|
-
if (!
|
|
245628
|
+
const relative6 = sp3.relative(matcher.path, string4);
|
|
245629
|
+
if (!relative6) {
|
|
245619
245630
|
return false;
|
|
245620
245631
|
}
|
|
245621
|
-
return !
|
|
245632
|
+
return !relative6.startsWith("..") && !sp3.isAbsolute(relative6);
|
|
245622
245633
|
}
|
|
245623
245634
|
return false;
|
|
245624
245635
|
};
|
|
@@ -246307,7 +246318,7 @@ class WatchBase44 extends EventEmitter4 {
|
|
|
246307
246318
|
}
|
|
246308
246319
|
watchTarget(item) {
|
|
246309
246320
|
const handler = import_debounce.default(async (_event, path19) => {
|
|
246310
|
-
this.emit("change", item.name,
|
|
246321
|
+
this.emit("change", item.name, relative6(item.path, path19));
|
|
246311
246322
|
}, WATCH_DEBOUNCE_MS);
|
|
246312
246323
|
const watcher = watch(item.path, {
|
|
246313
246324
|
ignoreInitial: true
|
|
@@ -246400,7 +246411,7 @@ async function createDevServer(options8) {
|
|
|
246400
246411
|
const base44ConfigWatcher = new WatchBase44([
|
|
246401
246412
|
{
|
|
246402
246413
|
name: "functions",
|
|
246403
|
-
path: join18(
|
|
246414
|
+
path: join18(dirname15(project2.configPath), project2.functionsDir)
|
|
246404
246415
|
}
|
|
246405
246416
|
], devLogger);
|
|
246406
246417
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
@@ -246579,7 +246590,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
|
|
|
246579
246590
|
import { release, type } from "node:os";
|
|
246580
246591
|
|
|
246581
246592
|
// node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
246582
|
-
import { dirname as
|
|
246593
|
+
import { dirname as dirname16, posix, sep } from "path";
|
|
246583
246594
|
function createModulerModifier() {
|
|
246584
246595
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
246585
246596
|
return async (frames) => {
|
|
@@ -246588,7 +246599,7 @@ function createModulerModifier() {
|
|
|
246588
246599
|
return frames;
|
|
246589
246600
|
};
|
|
246590
246601
|
}
|
|
246591
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
246602
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname16(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
|
|
246592
246603
|
const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
|
|
246593
246604
|
return (filename) => {
|
|
246594
246605
|
if (!filename)
|
|
@@ -250806,4 +250817,4 @@ export {
|
|
|
250806
250817
|
CLIExitError
|
|
250807
250818
|
};
|
|
250808
250819
|
|
|
250809
|
-
//# debugId=
|
|
250820
|
+
//# debugId=C45EABCE4926B36664756E2164756E21
|