@base44-preview/cli 0.0.38-pr.362.72930b8 → 0.0.38-pr.362.78ec358
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/bin/binary-entry.ts +40 -0
- package/dist/{deno-runtime → assets/deno-runtime}/main.js.map +1 -1
- package/dist/cli/index.js +217 -202
- package/dist/cli/index.js.map +12 -12
- package/package.json +4 -3
- /package/dist/{deno-runtime → assets/deno-runtime}/main.js +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/.nvmrc +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/README.md +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/base44/agents/task_manager.jsonc +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/base44/entities/task.jsonc +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/components.json +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/gitignore.ejs +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/index.html +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/jsconfig.json +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/package.json +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/postcss.config.js +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/App.jsx +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/components/ui/button.jsx +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/components/ui/input.jsx +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/index.css +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/src/main.jsx +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/tailwind.config.js +0 -0
- /package/dist/{templates → assets/templates}/backend-and-client/vite.config.js +0 -0
- /package/dist/{templates → assets/templates}/backend-only/base44/app.jsonc.ejs +0 -0
- /package/dist/{templates → assets/templates}/backend-only/base44/config.jsonc.ejs +0 -0
- /package/dist/{templates → assets/templates}/backend-only/base44/gitignore.ejs +0 -0
- /package/dist/{templates → assets/templates}/templates.json +0 -0
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 dirname6 = 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 : dirname6(filename), name2);
|
|
8940
8940
|
var ext = extname(name2);
|
|
8941
8941
|
if (!ext) {
|
|
8942
8942
|
includePath += ".ejs";
|
|
@@ -18040,7 +18040,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
18040
18040
|
}
|
|
18041
18041
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
18042
18042
|
});
|
|
18043
|
-
function
|
|
18043
|
+
function join13(array2, separator) {
|
|
18044
18044
|
return array2 == null ? "" : nativeJoin.call(array2, separator);
|
|
18045
18045
|
}
|
|
18046
18046
|
function last(array2) {
|
|
@@ -19972,7 +19972,7 @@ __p += '`;
|
|
|
19972
19972
|
lodash.isUndefined = isUndefined;
|
|
19973
19973
|
lodash.isWeakMap = isWeakMap;
|
|
19974
19974
|
lodash.isWeakSet = isWeakSet;
|
|
19975
|
-
lodash.join =
|
|
19975
|
+
lodash.join = join13;
|
|
19976
19976
|
lodash.kebabCase = kebabCase2;
|
|
19977
19977
|
lodash.last = last;
|
|
19978
19978
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -20601,7 +20601,7 @@ function cleanDoc(doc2) {
|
|
|
20601
20601
|
return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc));
|
|
20602
20602
|
}
|
|
20603
20603
|
function replaceEndOfLine(doc2, replacement = literalline) {
|
|
20604
|
-
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ?
|
|
20604
|
+
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join13(replacement, currentDoc.split(`
|
|
20605
20605
|
`)) : currentDoc);
|
|
20606
20606
|
}
|
|
20607
20607
|
function canBreakFn(doc2) {
|
|
@@ -20681,7 +20681,7 @@ function indentIfBreak(contents, options) {
|
|
|
20681
20681
|
negate: options.negate
|
|
20682
20682
|
};
|
|
20683
20683
|
}
|
|
20684
|
-
function
|
|
20684
|
+
function join13(separator, docs) {
|
|
20685
20685
|
assertDoc(separator);
|
|
20686
20686
|
assertDocArray(docs);
|
|
20687
20687
|
const parts = [];
|
|
@@ -21392,7 +21392,7 @@ var init_doc = __esm(() => {
|
|
|
21392
21392
|
MODE_FLAT = Symbol("MODE_FLAT");
|
|
21393
21393
|
DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
21394
21394
|
builders = {
|
|
21395
|
-
join:
|
|
21395
|
+
join: join13,
|
|
21396
21396
|
line,
|
|
21397
21397
|
softline,
|
|
21398
21398
|
hardline,
|
|
@@ -113630,7 +113630,7 @@ async function clearCache3() {
|
|
|
113630
113630
|
clearCache();
|
|
113631
113631
|
clearCache2();
|
|
113632
113632
|
}
|
|
113633
|
-
var require2, __filename2,
|
|
113633
|
+
var require2, __filename2, __dirname3, __create2, __defProp3, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __require2, __commonJS2 = (cb2, mod) => function __require22() {
|
|
113634
113634
|
return mod || (0, cb2[__getOwnPropNames2(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
113635
113635
|
}, __export3 = (target, all) => {
|
|
113636
113636
|
for (var name2 in all)
|
|
@@ -114373,7 +114373,7 @@ var init_prettier = __esm(() => {
|
|
|
114373
114373
|
init_doc();
|
|
114374
114374
|
require2 = __prettierCreateRequire(import.meta.url);
|
|
114375
114375
|
__filename2 = __prettierFileUrlToPath(import.meta.url);
|
|
114376
|
-
|
|
114376
|
+
__dirname3 = __prettierDirname(__filename2);
|
|
114377
114377
|
__create2 = Object.create;
|
|
114378
114378
|
__defProp3 = Object.defineProperty;
|
|
114379
114379
|
__getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -126306,7 +126306,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
126306
126306
|
return mapDoc2(doc2, (currentDoc) => cleanDocFn2(currentDoc));
|
|
126307
126307
|
}
|
|
126308
126308
|
function replaceEndOfLine2(doc2, replacement = literalline2) {
|
|
126309
|
-
return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ?
|
|
126309
|
+
return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join15(replacement, currentDoc.split(`
|
|
126310
126310
|
`)) : currentDoc);
|
|
126311
126311
|
}
|
|
126312
126312
|
function canBreakFn2(doc2) {
|
|
@@ -126392,7 +126392,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
126392
126392
|
negate: options8.negate
|
|
126393
126393
|
};
|
|
126394
126394
|
}
|
|
126395
|
-
function
|
|
126395
|
+
function join15(separator, docs) {
|
|
126396
126396
|
assertDoc2(separator);
|
|
126397
126397
|
assertDocArray2(docs);
|
|
126398
126398
|
const parts = [];
|
|
@@ -127057,7 +127057,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
127057
127057
|
}
|
|
127058
127058
|
}
|
|
127059
127059
|
var builders2 = {
|
|
127060
|
-
join:
|
|
127060
|
+
join: join15,
|
|
127061
127061
|
line: line3,
|
|
127062
127062
|
softline: softline2,
|
|
127063
127063
|
hardline: hardline4,
|
|
@@ -156272,10 +156272,10 @@ 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
|
|
156275
|
+
var dirname11 = path18.dirname;
|
|
156276
156276
|
var basename4 = path18.basename;
|
|
156277
156277
|
var extname2 = path18.extname;
|
|
156278
|
-
var
|
|
156278
|
+
var join16 = path18.join;
|
|
156279
156279
|
var resolve6 = path18.resolve;
|
|
156280
156280
|
module.exports = View;
|
|
156281
156281
|
function View(name2, options8) {
|
|
@@ -156311,7 +156311,7 @@ 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 =
|
|
156314
|
+
var dir = dirname11(loc);
|
|
156315
156315
|
var file2 = basename4(loc);
|
|
156316
156316
|
path19 = this.resolve(dir, file2);
|
|
156317
156317
|
}
|
|
@@ -156337,12 +156337,12 @@ var require_view = __commonJS((exports, module) => {
|
|
|
156337
156337
|
};
|
|
156338
156338
|
View.prototype.resolve = function resolve7(dir, file2) {
|
|
156339
156339
|
var ext = this.ext;
|
|
156340
|
-
var path19 =
|
|
156340
|
+
var path19 = join16(dir, file2);
|
|
156341
156341
|
var stat2 = tryStat(path19);
|
|
156342
156342
|
if (stat2 && stat2.isFile()) {
|
|
156343
156343
|
return path19;
|
|
156344
156344
|
}
|
|
156345
|
-
path19 =
|
|
156345
|
+
path19 = join16(dir, basename4(file2, ext), "index" + ext);
|
|
156346
156346
|
stat2 = tryStat(path19);
|
|
156347
156347
|
if (stat2 && stat2.isFile()) {
|
|
156348
156348
|
return path19;
|
|
@@ -160037,7 +160037,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
160037
160037
|
var Stream2 = __require("stream");
|
|
160038
160038
|
var util2 = __require("util");
|
|
160039
160039
|
var extname2 = path18.extname;
|
|
160040
|
-
var
|
|
160040
|
+
var join16 = path18.join;
|
|
160041
160041
|
var normalize = path18.normalize;
|
|
160042
160042
|
var resolve6 = path18.resolve;
|
|
160043
160043
|
var sep = path18.sep;
|
|
@@ -160209,7 +160209,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
160209
160209
|
return res;
|
|
160210
160210
|
}
|
|
160211
160211
|
parts = path19.split(sep);
|
|
160212
|
-
path19 = normalize(
|
|
160212
|
+
path19 = normalize(join16(root2, path19));
|
|
160213
160213
|
} else {
|
|
160214
160214
|
if (UP_PATH_REGEXP.test(path19)) {
|
|
160215
160215
|
debug('malicious path "%s"', path19);
|
|
@@ -160349,7 +160349,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
160349
160349
|
return self2.onStatError(err);
|
|
160350
160350
|
return self2.error(404);
|
|
160351
160351
|
}
|
|
160352
|
-
var p4 =
|
|
160352
|
+
var p4 = join16(path19, self2._index[i5]);
|
|
160353
160353
|
debug('stat "%s"', p4);
|
|
160354
160354
|
fs28.stat(p4, function(err2, stat2) {
|
|
160355
160355
|
if (err2)
|
|
@@ -210590,7 +210590,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
210590
210590
|
});
|
|
210591
210591
|
module.exports = __toCommonJS(src_exports);
|
|
210592
210592
|
var import_promises22 = __require("node:fs/promises");
|
|
210593
|
-
var
|
|
210593
|
+
var import_node_fs22 = __require("node:fs");
|
|
210594
210594
|
var DEVIN_LOCAL_PATH = "/opt/.devin";
|
|
210595
210595
|
var CURSOR2 = "cursor";
|
|
210596
210596
|
var CURSOR_CLI = "cursor-cli";
|
|
@@ -210647,13 +210647,17 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
210647
210647
|
return { isAgent: true, agent: { name: REPLIT } };
|
|
210648
210648
|
}
|
|
210649
210649
|
try {
|
|
210650
|
-
await (0, import_promises22.access)(DEVIN_LOCAL_PATH,
|
|
210650
|
+
await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs22.constants.F_OK);
|
|
210651
210651
|
return { isAgent: true, agent: { name: DEVIN } };
|
|
210652
210652
|
} catch (error48) {}
|
|
210653
210653
|
return { isAgent: false, agent: undefined };
|
|
210654
210654
|
}
|
|
210655
210655
|
});
|
|
210656
210656
|
|
|
210657
|
+
// src/cli/index.ts
|
|
210658
|
+
import { dirname as dirname15, join as join19 } from "node:path";
|
|
210659
|
+
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
210660
|
+
|
|
210657
210661
|
// node_modules/commander/esm.mjs
|
|
210658
210662
|
var import__ = __toESM(require_commander(), 1);
|
|
210659
210663
|
var {
|
|
@@ -210671,7 +210675,7 @@ var {
|
|
|
210671
210675
|
} = import__.default;
|
|
210672
210676
|
|
|
210673
210677
|
// src/cli/commands/agents/pull.ts
|
|
210674
|
-
import { dirname as
|
|
210678
|
+
import { dirname as dirname7, join as join10 } from "node:path";
|
|
210675
210679
|
|
|
210676
210680
|
// node_modules/@clack/core/dist/index.mjs
|
|
210677
210681
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -226137,14 +226141,7 @@ var distribution_default = ky;
|
|
|
226137
226141
|
|
|
226138
226142
|
// src/core/config.ts
|
|
226139
226143
|
import { homedir } from "node:os";
|
|
226140
|
-
import {
|
|
226141
|
-
import { fileURLToPath } from "node:url";
|
|
226142
|
-
|
|
226143
|
-
// src/core/assets.ts
|
|
226144
|
-
var assetsDir;
|
|
226145
|
-
function getAssetsDir() {
|
|
226146
|
-
return assetsDir;
|
|
226147
|
-
}
|
|
226144
|
+
import { join } from "node:path";
|
|
226148
226145
|
|
|
226149
226146
|
// src/core/consts.ts
|
|
226150
226147
|
var PROJECT_SUBDIR = "base44";
|
|
@@ -226216,22 +226213,12 @@ var TestOverridesSchema = exports_external.object({
|
|
|
226216
226213
|
});
|
|
226217
226214
|
|
|
226218
226215
|
// src/core/config.ts
|
|
226219
|
-
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
226220
226216
|
function getBase44GlobalDir() {
|
|
226221
226217
|
return join(homedir(), ".base44");
|
|
226222
226218
|
}
|
|
226223
226219
|
function getAuthFilePath() {
|
|
226224
226220
|
return join(getBase44GlobalDir(), "auth", "auth.json");
|
|
226225
226221
|
}
|
|
226226
|
-
function getTemplatesDir() {
|
|
226227
|
-
const assets = getAssetsDir();
|
|
226228
|
-
if (assets)
|
|
226229
|
-
return join(assets, "templates");
|
|
226230
|
-
return join(__dirname2, "../templates");
|
|
226231
|
-
}
|
|
226232
|
-
function getTemplatesIndexPath() {
|
|
226233
|
-
return join(getTemplatesDir(), "templates.json");
|
|
226234
|
-
}
|
|
226235
226222
|
function getAppConfigPath(projectRoot) {
|
|
226236
226223
|
return join(projectRoot, PROJECT_SUBDIR, ".app.jsonc");
|
|
226237
226224
|
}
|
|
@@ -226562,7 +226549,7 @@ import {
|
|
|
226562
226549
|
readdir,
|
|
226563
226550
|
unlink
|
|
226564
226551
|
} from "node:fs/promises";
|
|
226565
|
-
import { dirname
|
|
226552
|
+
import { dirname } from "node:path";
|
|
226566
226553
|
async function pathExists(path) {
|
|
226567
226554
|
try {
|
|
226568
226555
|
await access(path);
|
|
@@ -226572,14 +226559,14 @@ async function pathExists(path) {
|
|
|
226572
226559
|
}
|
|
226573
226560
|
}
|
|
226574
226561
|
async function writeFile(filePath, content) {
|
|
226575
|
-
const dir =
|
|
226562
|
+
const dir = dirname(filePath);
|
|
226576
226563
|
if (!await pathExists(dir)) {
|
|
226577
226564
|
await mkdir(dir, { recursive: true });
|
|
226578
226565
|
}
|
|
226579
226566
|
await fsWriteFile(filePath, content, "utf-8");
|
|
226580
226567
|
}
|
|
226581
226568
|
async function copyFile(src, dest) {
|
|
226582
|
-
const dir =
|
|
226569
|
+
const dir = dirname(dest);
|
|
226583
226570
|
if (!await pathExists(dir)) {
|
|
226584
226571
|
await mkdir(dir, { recursive: true });
|
|
226585
226572
|
}
|
|
@@ -226620,7 +226607,7 @@ async function readJsonFile(filePath) {
|
|
|
226620
226607
|
}
|
|
226621
226608
|
}
|
|
226622
226609
|
async function writeJsonFile(filePath, data) {
|
|
226623
|
-
const dir =
|
|
226610
|
+
const dir = dirname(filePath);
|
|
226624
226611
|
if (!await pathExists(dir)) {
|
|
226625
226612
|
await mkdir(dir, { recursive: true });
|
|
226626
226613
|
}
|
|
@@ -227770,7 +227757,7 @@ import path3 from "node:path";
|
|
|
227770
227757
|
|
|
227771
227758
|
// node_modules/tar/dist/esm/list.js
|
|
227772
227759
|
import fs2 from "node:fs";
|
|
227773
|
-
import { dirname as
|
|
227760
|
+
import { dirname as dirname2, parse as parse6 } from "path";
|
|
227774
227761
|
|
|
227775
227762
|
// node_modules/tar/dist/esm/options.js
|
|
227776
227763
|
var argmap = new Map([
|
|
@@ -229346,7 +229333,7 @@ var filesFilter = (opt, files) => {
|
|
|
229346
229333
|
if (m !== undefined) {
|
|
229347
229334
|
ret = m;
|
|
229348
229335
|
} else {
|
|
229349
|
-
ret = mapHas(
|
|
229336
|
+
ret = mapHas(dirname2(file2), root);
|
|
229350
229337
|
}
|
|
229351
229338
|
}
|
|
229352
229339
|
map2.set(file2, ret);
|
|
@@ -232507,10 +232494,10 @@ var import_fast_glob2 = __toESM(require_out4(), 1);
|
|
|
232507
232494
|
// node_modules/unicorn-magic/node.js
|
|
232508
232495
|
import { promisify } from "node:util";
|
|
232509
232496
|
import { execFile as execFileCallback, execFileSync as execFileSyncOriginal } from "node:child_process";
|
|
232510
|
-
import { fileURLToPath
|
|
232497
|
+
import { fileURLToPath } from "node:url";
|
|
232511
232498
|
var execFileOriginal = promisify(execFileCallback);
|
|
232512
232499
|
function toPath(urlOrPath) {
|
|
232513
|
-
return urlOrPath instanceof URL ?
|
|
232500
|
+
return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
232514
232501
|
}
|
|
232515
232502
|
var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
232516
232503
|
|
|
@@ -232925,9 +232912,9 @@ var shouldExpandGlobstarDirectory = (pattern) => {
|
|
|
232925
232912
|
if (!match) {
|
|
232926
232913
|
return false;
|
|
232927
232914
|
}
|
|
232928
|
-
const
|
|
232929
|
-
const hasWildcards = /[*?[\]{}]/.test(
|
|
232930
|
-
const hasExtension = nodePath.extname(
|
|
232915
|
+
const dirname3 = match[1];
|
|
232916
|
+
const hasWildcards = /[*?[\]{}]/.test(dirname3);
|
|
232917
|
+
const hasExtension = nodePath.extname(dirname3) && !dirname3.startsWith(".");
|
|
232931
232918
|
return !hasWildcards && !hasExtension;
|
|
232932
232919
|
};
|
|
232933
232920
|
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
@@ -233184,7 +233171,7 @@ var generateGlobTasks = normalizeArguments(generateTasks);
|
|
|
233184
233171
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
233185
233172
|
|
|
233186
233173
|
// src/core/project/config.ts
|
|
233187
|
-
import { dirname as
|
|
233174
|
+
import { dirname as dirname5, join as join6 } from "node:path";
|
|
233188
233175
|
|
|
233189
233176
|
// src/core/resources/agent/schema.ts
|
|
233190
233177
|
var EntityOperationSchema = exports_external.enum(["create", "update", "delete", "read"]);
|
|
@@ -233994,7 +233981,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
|
|
|
233994
233981
|
return result.data;
|
|
233995
233982
|
}
|
|
233996
233983
|
// src/core/resources/function/config.ts
|
|
233997
|
-
import { basename as basename2, dirname as
|
|
233984
|
+
import { basename as basename2, dirname as dirname3, join as join5, relative } from "node:path";
|
|
233998
233985
|
async function readFunctionConfig(configPath) {
|
|
233999
233986
|
const parsed = await readJsonFile(configPath);
|
|
234000
233987
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -234005,7 +233992,7 @@ async function readFunctionConfig(configPath) {
|
|
|
234005
233992
|
}
|
|
234006
233993
|
async function readFunction(configPath) {
|
|
234007
233994
|
const config5 = await readFunctionConfig(configPath);
|
|
234008
|
-
const functionDir =
|
|
233995
|
+
const functionDir = dirname3(configPath);
|
|
234009
233996
|
const entryPath = join5(functionDir, config5.entry);
|
|
234010
233997
|
if (!await pathExists(entryPath)) {
|
|
234011
233998
|
throw new InvalidInputError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`, {
|
|
@@ -234032,11 +234019,11 @@ async function readAllFunctions(functionsDir) {
|
|
|
234032
234019
|
absolute: true,
|
|
234033
234020
|
ignore: ENTRY_IGNORE_DOT_PATHS
|
|
234034
234021
|
});
|
|
234035
|
-
const configFilesDirs = new Set(configFiles.map((f) =>
|
|
234036
|
-
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(
|
|
234022
|
+
const configFilesDirs = new Set(configFiles.map((f) => dirname3(f)));
|
|
234023
|
+
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname3(entryFile)));
|
|
234037
234024
|
const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
234038
234025
|
const functionsWithoutConfig = await Promise.all(entryFilesWithoutConfig.map(async (entryFile) => {
|
|
234039
|
-
const functionDir =
|
|
234026
|
+
const functionDir = dirname3(entryFile);
|
|
234040
234027
|
const filePaths = await globby("**/*.{js,ts,json}", {
|
|
234041
234028
|
cwd: functionDir,
|
|
234042
234029
|
absolute: true
|
|
@@ -234071,9 +234058,9 @@ async function readAllFunctions(functionsDir) {
|
|
|
234071
234058
|
return functions;
|
|
234072
234059
|
}
|
|
234073
234060
|
// src/core/resources/function/deploy.ts
|
|
234074
|
-
import { dirname as
|
|
234061
|
+
import { dirname as dirname4, relative as relative2 } from "node:path";
|
|
234075
234062
|
async function loadFunctionCode(fn) {
|
|
234076
|
-
const functionDir =
|
|
234063
|
+
const functionDir = dirname4(fn.entryPath);
|
|
234077
234064
|
const loadedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
|
|
234078
234065
|
const content = await readTextFile(filePath);
|
|
234079
234066
|
const path11 = relative2(functionDir, filePath).split(/[/\\]/).join("/");
|
|
@@ -234103,12 +234090,12 @@ async function findConfigInDir(dir) {
|
|
|
234103
234090
|
}
|
|
234104
234091
|
async function findProjectRoot(startPath) {
|
|
234105
234092
|
let current = startPath || process.cwd();
|
|
234106
|
-
while (current !==
|
|
234093
|
+
while (current !== dirname5(current)) {
|
|
234107
234094
|
const configPath = await findConfigInDir(current);
|
|
234108
234095
|
if (configPath) {
|
|
234109
234096
|
return { root: current, configPath };
|
|
234110
234097
|
}
|
|
234111
|
-
current =
|
|
234098
|
+
current = dirname5(current);
|
|
234112
234099
|
}
|
|
234113
234100
|
return null;
|
|
234114
234101
|
}
|
|
@@ -234130,7 +234117,7 @@ async function readProjectConfig(projectRoot) {
|
|
|
234130
234117
|
throw new SchemaValidationError("Invalid project configuration", result.error, configPath);
|
|
234131
234118
|
}
|
|
234132
234119
|
const project = result.data;
|
|
234133
|
-
const configDir =
|
|
234120
|
+
const configDir = dirname5(configPath);
|
|
234134
234121
|
const [entities, functions, agents, connectors] = await Promise.all([
|
|
234135
234122
|
entityResource.readAll(join6(configDir, project.entitiesDir)),
|
|
234136
234123
|
functionResource.readAll(join6(configDir, project.functionsDir)),
|
|
@@ -234232,33 +234219,151 @@ async function readAppConfig(projectRoot) {
|
|
|
234232
234219
|
// src/core/project/template.ts
|
|
234233
234220
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
234234
234221
|
var import_front_matter = __toESM(require_front_matter(), 1);
|
|
234235
|
-
import { dirname as
|
|
234222
|
+
import { dirname as dirname6, join as join8 } from "node:path";
|
|
234223
|
+
|
|
234224
|
+
// src/core/assets.ts
|
|
234225
|
+
import { cpSync, existsSync } from "node:fs";
|
|
234226
|
+
import { homedir as homedir2 } from "node:os";
|
|
234227
|
+
import { join as join7 } from "node:path";
|
|
234228
|
+
// package.json
|
|
234229
|
+
var package_default = {
|
|
234230
|
+
name: "base44",
|
|
234231
|
+
version: "0.0.38",
|
|
234232
|
+
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
234233
|
+
type: "module",
|
|
234234
|
+
bin: {
|
|
234235
|
+
base44: "./bin/run.js"
|
|
234236
|
+
},
|
|
234237
|
+
files: [
|
|
234238
|
+
"dist",
|
|
234239
|
+
"bin"
|
|
234240
|
+
],
|
|
234241
|
+
scripts: {
|
|
234242
|
+
build: "bun run clean && mkdir -p dist/assets && cp -r templates dist/assets/ && bun run infra/build.ts",
|
|
234243
|
+
"build:watch": "bun run clean && mkdir -p dist/assets && cp -r templates dist/assets/ && bun run infra/build.ts --watch",
|
|
234244
|
+
typecheck: "tsc --noEmit",
|
|
234245
|
+
dev: "./bin/dev.ts",
|
|
234246
|
+
start: "./bin/run.js",
|
|
234247
|
+
clean: "rm -rf dist && mkdir -p dist",
|
|
234248
|
+
lint: "biome check src tests",
|
|
234249
|
+
"lint:fix": "biome check --write src tests",
|
|
234250
|
+
test: "vitest run",
|
|
234251
|
+
"test:watch": "vitest",
|
|
234252
|
+
"build:binaries": "bun run infra/build-binaries.ts",
|
|
234253
|
+
"package:binaries": "bun run infra/package-binaries.ts",
|
|
234254
|
+
knip: "knip",
|
|
234255
|
+
"knip:fix": "knip --fix"
|
|
234256
|
+
},
|
|
234257
|
+
keywords: [
|
|
234258
|
+
"base44",
|
|
234259
|
+
"cli",
|
|
234260
|
+
"command-line"
|
|
234261
|
+
],
|
|
234262
|
+
author: "",
|
|
234263
|
+
license: "MIT",
|
|
234264
|
+
repository: {
|
|
234265
|
+
type: "git",
|
|
234266
|
+
url: "https://github.com/base44/cli"
|
|
234267
|
+
},
|
|
234268
|
+
devDependencies: {
|
|
234269
|
+
"@biomejs/biome": "^2.0.0",
|
|
234270
|
+
"@clack/prompts": "^1.0.1",
|
|
234271
|
+
"@seald-io/nedb": "^4.1.2",
|
|
234272
|
+
"@types/bun": "^1.2.15",
|
|
234273
|
+
"@types/common-tags": "^1.8.4",
|
|
234274
|
+
"@types/cors": "^2.8.19",
|
|
234275
|
+
"@types/deno": "^2.5.0",
|
|
234276
|
+
"@types/ejs": "^3.1.5",
|
|
234277
|
+
"@types/express": "^5.0.6",
|
|
234278
|
+
"@types/json-schema": "^7.0.15",
|
|
234279
|
+
"@types/lodash": "^4.17.24",
|
|
234280
|
+
"@types/multer": "^2.0.0",
|
|
234281
|
+
"@types/node": "^22.10.5",
|
|
234282
|
+
"@vercel/detect-agent": "^1.1.0",
|
|
234283
|
+
chalk: "^5.6.2",
|
|
234284
|
+
chokidar: "^5.0.0",
|
|
234285
|
+
commander: "^12.1.0",
|
|
234286
|
+
"common-tags": "^1.8.2",
|
|
234287
|
+
cors: "^2.8.5",
|
|
234288
|
+
dotenv: "17.3.1",
|
|
234289
|
+
ejs: "^3.1.10",
|
|
234290
|
+
execa: "^9.6.1",
|
|
234291
|
+
express: "^5.0.1",
|
|
234292
|
+
"front-matter": "^4.0.2",
|
|
234293
|
+
"get-port": "^7.1.0",
|
|
234294
|
+
globby: "^16.1.0",
|
|
234295
|
+
"http-proxy-middleware": "^3.0.5",
|
|
234296
|
+
"json-schema-to-typescript": "^15.0.4",
|
|
234297
|
+
json5: "^2.2.3",
|
|
234298
|
+
knip: "^5.83.1",
|
|
234299
|
+
ky: "^1.14.2",
|
|
234300
|
+
lodash: "^4.17.23",
|
|
234301
|
+
msw: "^2.12.10",
|
|
234302
|
+
multer: "^2.0.0",
|
|
234303
|
+
nanoid: "^5.1.6",
|
|
234304
|
+
open: "^11.0.0",
|
|
234305
|
+
"p-wait-for": "^6.0.0",
|
|
234306
|
+
"posthog-node": "5.21.2",
|
|
234307
|
+
"socket.io": "^4.8.3",
|
|
234308
|
+
"strip-ansi": "^7.1.2",
|
|
234309
|
+
tar: "^7.5.4",
|
|
234310
|
+
"tmp-promise": "^3.0.3",
|
|
234311
|
+
typescript: "^5.7.2",
|
|
234312
|
+
vitest: "^4.0.16",
|
|
234313
|
+
zod: "^4.3.5"
|
|
234314
|
+
},
|
|
234315
|
+
engines: {
|
|
234316
|
+
node: ">=20.19.0"
|
|
234317
|
+
}
|
|
234318
|
+
};
|
|
234319
|
+
|
|
234320
|
+
// src/core/assets.ts
|
|
234321
|
+
var ASSETS_DIR = join7(homedir2(), ".base44", "assets", package_default.version);
|
|
234322
|
+
function getTemplatesDir() {
|
|
234323
|
+
return join7(ASSETS_DIR, "templates");
|
|
234324
|
+
}
|
|
234325
|
+
function getTemplatesIndexPath() {
|
|
234326
|
+
return join7(ASSETS_DIR, "templates", "templates.json");
|
|
234327
|
+
}
|
|
234328
|
+
function getDenoWrapperPath() {
|
|
234329
|
+
return join7(ASSETS_DIR, "deno-runtime", "main.js");
|
|
234330
|
+
}
|
|
234331
|
+
function ensureNpmAssets(sourceDir) {
|
|
234332
|
+
if (existsSync(ASSETS_DIR))
|
|
234333
|
+
return;
|
|
234334
|
+
if (!existsSync(sourceDir))
|
|
234335
|
+
return;
|
|
234336
|
+
cpSync(sourceDir, ASSETS_DIR, { recursive: true });
|
|
234337
|
+
}
|
|
234338
|
+
|
|
234339
|
+
// src/core/project/template.ts
|
|
234236
234340
|
async function listTemplates() {
|
|
234237
|
-
const
|
|
234341
|
+
const indexPath = getTemplatesIndexPath();
|
|
234342
|
+
const parsed = await readJsonFile(indexPath);
|
|
234238
234343
|
const result = TemplatesConfigSchema.safeParse(parsed);
|
|
234239
234344
|
if (!result.success) {
|
|
234240
|
-
throw new SchemaValidationError("Invalid templates configuration", result.error,
|
|
234345
|
+
throw new SchemaValidationError("Invalid templates configuration", result.error, indexPath);
|
|
234241
234346
|
}
|
|
234242
234347
|
return result.data.templates;
|
|
234243
234348
|
}
|
|
234244
234349
|
async function renderTemplate(template, destPath, data) {
|
|
234245
|
-
const templateDir =
|
|
234350
|
+
const templateDir = join8(getTemplatesDir(), template.path);
|
|
234246
234351
|
const files = await globby("**/*", {
|
|
234247
234352
|
cwd: templateDir,
|
|
234248
234353
|
dot: true,
|
|
234249
234354
|
onlyFiles: true
|
|
234250
234355
|
});
|
|
234251
234356
|
for (const file2 of files) {
|
|
234252
|
-
const srcPath =
|
|
234357
|
+
const srcPath = join8(templateDir, file2);
|
|
234253
234358
|
try {
|
|
234254
234359
|
if (file2.endsWith(".ejs")) {
|
|
234255
234360
|
const rendered = await import_ejs.default.renderFile(srcPath, data);
|
|
234256
234361
|
const { attributes, body } = import_front_matter.default(rendered);
|
|
234257
|
-
const destFile = attributes.outputFileName ?
|
|
234258
|
-
const destFilePath =
|
|
234362
|
+
const destFile = attributes.outputFileName ? join8(dirname6(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
|
|
234363
|
+
const destFilePath = join8(destPath, destFile);
|
|
234259
234364
|
await writeFile(destFilePath, body);
|
|
234260
234365
|
} else {
|
|
234261
|
-
const destFilePath =
|
|
234366
|
+
const destFilePath = join8(destPath, file2);
|
|
234262
234367
|
await copyFile(srcPath, destFilePath);
|
|
234263
234368
|
}
|
|
234264
234369
|
} catch (error48) {
|
|
@@ -234282,11 +234387,7 @@ async function createProjectFiles(options) {
|
|
|
234282
234387
|
const { name: name2, description, path: basePath, template } = options;
|
|
234283
234388
|
await assertProjectNotExists(basePath);
|
|
234284
234389
|
const { projectId } = await createProject(name2, description);
|
|
234285
|
-
await renderTemplate(template, basePath, {
|
|
234286
|
-
name: name2,
|
|
234287
|
-
description,
|
|
234288
|
-
projectId
|
|
234289
|
-
});
|
|
234390
|
+
await renderTemplate(template, basePath, { name: name2, description, projectId });
|
|
234290
234391
|
return {
|
|
234291
234392
|
projectId,
|
|
234292
234393
|
projectDir: basePath
|
|
@@ -234361,7 +234462,7 @@ async function getSiteFilePaths(outputDir) {
|
|
|
234361
234462
|
// src/core/site/deploy.ts
|
|
234362
234463
|
import { randomUUID } from "node:crypto";
|
|
234363
234464
|
import { tmpdir } from "node:os";
|
|
234364
|
-
import { join as
|
|
234465
|
+
import { join as join9 } from "node:path";
|
|
234365
234466
|
async function deploySite(siteOutputDir) {
|
|
234366
234467
|
if (!await pathExists(siteOutputDir)) {
|
|
234367
234468
|
throw new InvalidInputError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
|
|
@@ -234378,7 +234479,7 @@ async function deploySite(siteOutputDir) {
|
|
|
234378
234479
|
]
|
|
234379
234480
|
});
|
|
234380
234481
|
}
|
|
234381
|
-
const archivePath =
|
|
234482
|
+
const archivePath = join9(tmpdir(), `base44-site-${randomUUID()}.tar.gz`);
|
|
234382
234483
|
try {
|
|
234383
234484
|
await createArchive(siteOutputDir, archivePath);
|
|
234384
234485
|
return await uploadSite(archivePath);
|
|
@@ -235458,7 +235559,7 @@ function isPlainObject2(value) {
|
|
|
235458
235559
|
}
|
|
235459
235560
|
|
|
235460
235561
|
// node_modules/execa/lib/arguments/file-url.js
|
|
235461
|
-
import { fileURLToPath as
|
|
235562
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
235462
235563
|
var safeNormalizeFileUrl = (file2, name2) => {
|
|
235463
235564
|
const fileString = normalizeFileUrl(normalizeDenoExecPath(file2));
|
|
235464
235565
|
if (typeof fileString !== "string") {
|
|
@@ -235468,7 +235569,7 @@ var safeNormalizeFileUrl = (file2, name2) => {
|
|
|
235468
235569
|
};
|
|
235469
235570
|
var normalizeDenoExecPath = (file2) => isDenoExecPath(file2) ? file2.toString() : file2;
|
|
235470
235571
|
var isDenoExecPath = (file2) => typeof file2 !== "string" && file2 && Object.getPrototypeOf(file2) === String.prototype;
|
|
235471
|
-
var normalizeFileUrl = (file2) => file2 instanceof URL ?
|
|
235572
|
+
var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath2(file2) : file2;
|
|
235472
235573
|
|
|
235473
235574
|
// node_modules/execa/lib/methods/parameters.js
|
|
235474
235575
|
var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -236322,10 +236423,10 @@ function pathKey(options = {}) {
|
|
|
236322
236423
|
import { promisify as promisify3 } from "node:util";
|
|
236323
236424
|
import { execFile as execFileCallback2, execFileSync as execFileSyncOriginal2 } from "node:child_process";
|
|
236324
236425
|
import path11 from "node:path";
|
|
236325
|
-
import { fileURLToPath as
|
|
236426
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
236326
236427
|
var execFileOriginal2 = promisify3(execFileCallback2);
|
|
236327
236428
|
function toPath2(urlOrPath) {
|
|
236328
|
-
return urlOrPath instanceof URL ?
|
|
236429
|
+
return urlOrPath instanceof URL ? fileURLToPath3(urlOrPath) : urlOrPath;
|
|
236329
236430
|
}
|
|
236330
236431
|
function traversePathUp(startPath) {
|
|
236331
236432
|
return {
|
|
@@ -241943,96 +242044,6 @@ var {
|
|
|
241943
242044
|
getEachMessage: getEachMessage2,
|
|
241944
242045
|
getCancelSignal: getCancelSignal2
|
|
241945
242046
|
} = getIpcExport();
|
|
241946
|
-
// package.json
|
|
241947
|
-
var package_default = {
|
|
241948
|
-
name: "base44",
|
|
241949
|
-
version: "0.0.38",
|
|
241950
|
-
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
241951
|
-
type: "module",
|
|
241952
|
-
bin: {
|
|
241953
|
-
base44: "./bin/run.js"
|
|
241954
|
-
},
|
|
241955
|
-
files: [
|
|
241956
|
-
"dist",
|
|
241957
|
-
"bin"
|
|
241958
|
-
],
|
|
241959
|
-
scripts: {
|
|
241960
|
-
build: "bun run clean && cp -r templates dist/ && bun run infra/build.ts",
|
|
241961
|
-
"build:watch": "bun run clean && cp -r templates dist/ && bun run infra/build.ts --watch",
|
|
241962
|
-
typecheck: "tsc --noEmit",
|
|
241963
|
-
dev: "./bin/dev.ts",
|
|
241964
|
-
start: "./bin/run.js",
|
|
241965
|
-
clean: "rm -rf dist && mkdir -p dist",
|
|
241966
|
-
lint: "biome check src tests",
|
|
241967
|
-
"lint:fix": "biome check --write src tests",
|
|
241968
|
-
test: "vitest run",
|
|
241969
|
-
"test:watch": "vitest",
|
|
241970
|
-
"build:binaries": "bun run infra/build-binaries.ts",
|
|
241971
|
-
knip: "knip",
|
|
241972
|
-
"knip:fix": "knip --fix"
|
|
241973
|
-
},
|
|
241974
|
-
keywords: [
|
|
241975
|
-
"base44",
|
|
241976
|
-
"cli",
|
|
241977
|
-
"command-line"
|
|
241978
|
-
],
|
|
241979
|
-
author: "",
|
|
241980
|
-
license: "MIT",
|
|
241981
|
-
repository: {
|
|
241982
|
-
type: "git",
|
|
241983
|
-
url: "https://github.com/base44/cli"
|
|
241984
|
-
},
|
|
241985
|
-
devDependencies: {
|
|
241986
|
-
"@biomejs/biome": "^2.0.0",
|
|
241987
|
-
"@clack/prompts": "^1.0.1",
|
|
241988
|
-
"@seald-io/nedb": "^4.1.2",
|
|
241989
|
-
"@types/bun": "^1.2.15",
|
|
241990
|
-
"@types/common-tags": "^1.8.4",
|
|
241991
|
-
"@types/cors": "^2.8.19",
|
|
241992
|
-
"@types/deno": "^2.5.0",
|
|
241993
|
-
"@types/ejs": "^3.1.5",
|
|
241994
|
-
"@types/express": "^5.0.6",
|
|
241995
|
-
"@types/json-schema": "^7.0.15",
|
|
241996
|
-
"@types/lodash": "^4.17.24",
|
|
241997
|
-
"@types/multer": "^2.0.0",
|
|
241998
|
-
"@types/node": "^22.10.5",
|
|
241999
|
-
"@vercel/detect-agent": "^1.1.0",
|
|
242000
|
-
chalk: "^5.6.2",
|
|
242001
|
-
chokidar: "^5.0.0",
|
|
242002
|
-
commander: "^12.1.0",
|
|
242003
|
-
"common-tags": "^1.8.2",
|
|
242004
|
-
cors: "^2.8.5",
|
|
242005
|
-
dotenv: "17.3.1",
|
|
242006
|
-
ejs: "^3.1.10",
|
|
242007
|
-
execa: "^9.6.1",
|
|
242008
|
-
express: "^5.0.1",
|
|
242009
|
-
"front-matter": "^4.0.2",
|
|
242010
|
-
"get-port": "^7.1.0",
|
|
242011
|
-
globby: "^16.1.0",
|
|
242012
|
-
"http-proxy-middleware": "^3.0.5",
|
|
242013
|
-
"json-schema-to-typescript": "^15.0.4",
|
|
242014
|
-
json5: "^2.2.3",
|
|
242015
|
-
knip: "^5.83.1",
|
|
242016
|
-
ky: "^1.14.2",
|
|
242017
|
-
lodash: "^4.17.23",
|
|
242018
|
-
msw: "^2.12.10",
|
|
242019
|
-
multer: "^2.0.0",
|
|
242020
|
-
nanoid: "^5.1.6",
|
|
242021
|
-
open: "^11.0.0",
|
|
242022
|
-
"p-wait-for": "^6.0.0",
|
|
242023
|
-
"posthog-node": "5.21.2",
|
|
242024
|
-
"socket.io": "^4.8.3",
|
|
242025
|
-
"strip-ansi": "^7.1.2",
|
|
242026
|
-
tar: "^7.5.4",
|
|
242027
|
-
"tmp-promise": "^3.0.3",
|
|
242028
|
-
typescript: "^5.7.2",
|
|
242029
|
-
vitest: "^4.0.16",
|
|
242030
|
-
zod: "^4.3.5"
|
|
242031
|
-
},
|
|
242032
|
-
engines: {
|
|
242033
|
-
node: ">=20.19.0"
|
|
242034
|
-
}
|
|
242035
|
-
};
|
|
242036
242047
|
|
|
242037
242048
|
// src/cli/utils/version-check.ts
|
|
242038
242049
|
async function checkForUpgrade() {
|
|
@@ -242156,8 +242167,8 @@ function getDashboardUrl(projectId) {
|
|
|
242156
242167
|
// src/cli/commands/agents/pull.ts
|
|
242157
242168
|
async function pullAgentsAction() {
|
|
242158
242169
|
const { project: project2 } = await readProjectConfig();
|
|
242159
|
-
const configDir =
|
|
242160
|
-
const agentsDir =
|
|
242170
|
+
const configDir = dirname7(project2.configPath);
|
|
242171
|
+
const agentsDir = join10(configDir, project2.agentsDir);
|
|
242161
242172
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
242162
242173
|
return await fetchAgents();
|
|
242163
242174
|
}, {
|
|
@@ -242251,11 +242262,11 @@ function getWhoamiCommand(context) {
|
|
|
242251
242262
|
}
|
|
242252
242263
|
|
|
242253
242264
|
// src/cli/commands/connectors/pull.ts
|
|
242254
|
-
import { dirname as
|
|
242265
|
+
import { dirname as dirname8, join as join11 } from "node:path";
|
|
242255
242266
|
async function pullConnectorsAction() {
|
|
242256
242267
|
const { project: project2 } = await readProjectConfig();
|
|
242257
|
-
const configDir =
|
|
242258
|
-
const connectorsDir =
|
|
242268
|
+
const configDir = dirname8(project2.configPath);
|
|
242269
|
+
const connectorsDir = join11(configDir, project2.connectorsDir);
|
|
242259
242270
|
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
242260
242271
|
return await listConnectors();
|
|
242261
242272
|
}, {
|
|
@@ -242290,7 +242301,7 @@ function getConnectorsPullCommand(context) {
|
|
|
242290
242301
|
// node_modules/open/index.js
|
|
242291
242302
|
import process20 from "node:process";
|
|
242292
242303
|
import path16 from "node:path";
|
|
242293
|
-
import { fileURLToPath as
|
|
242304
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
242294
242305
|
import childProcess3 from "node:child_process";
|
|
242295
242306
|
import fs19, { constants as fsConstants2 } from "node:fs/promises";
|
|
242296
242307
|
|
|
@@ -242616,8 +242627,8 @@ var is_in_ssh_default = isInSsh;
|
|
|
242616
242627
|
|
|
242617
242628
|
// node_modules/open/index.js
|
|
242618
242629
|
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
242619
|
-
var
|
|
242620
|
-
var localXdgOpenPath = path16.join(
|
|
242630
|
+
var __dirname2 = import.meta.url ? path16.dirname(fileURLToPath4(import.meta.url)) : "";
|
|
242631
|
+
var localXdgOpenPath = path16.join(__dirname2, "xdg-open");
|
|
242621
242632
|
var { platform: platform6, arch } = process20;
|
|
242622
242633
|
var tryEachApp = async (apps, opener) => {
|
|
242623
242634
|
if (apps.length === 0) {
|
|
@@ -242761,7 +242772,7 @@ var baseOpen = async (options) => {
|
|
|
242761
242772
|
if (app) {
|
|
242762
242773
|
command = app;
|
|
242763
242774
|
} else {
|
|
242764
|
-
const isBundled = !
|
|
242775
|
+
const isBundled = !__dirname2 || __dirname2 === "/";
|
|
242765
242776
|
let exeLocalXdgOpen = false;
|
|
242766
242777
|
try {
|
|
242767
242778
|
await fs19.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
@@ -243142,7 +243153,7 @@ function getFunctionsDeployCommand(context) {
|
|
|
243142
243153
|
}
|
|
243143
243154
|
|
|
243144
243155
|
// src/cli/commands/project/create.ts
|
|
243145
|
-
import { basename as basename3, join as
|
|
243156
|
+
import { basename as basename3, join as join12, resolve as resolve2 } from "node:path";
|
|
243146
243157
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
243147
243158
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
243148
243159
|
async function getTemplateById(templateId) {
|
|
@@ -243278,7 +243289,7 @@ async function executeCreate({
|
|
|
243278
243289
|
updateMessage("Building project...");
|
|
243279
243290
|
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
243280
243291
|
updateMessage("Deploying site...");
|
|
243281
|
-
return await deploySite(
|
|
243292
|
+
return await deploySite(join12(resolvedPath, outputDirectory));
|
|
243282
243293
|
}, {
|
|
243283
243294
|
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
243284
243295
|
errorMessage: "Failed to deploy site"
|
|
@@ -243904,10 +243915,10 @@ function toPascalCase(name2) {
|
|
|
243904
243915
|
return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
|
|
243905
243916
|
}
|
|
243906
243917
|
// src/core/types/update-project.ts
|
|
243907
|
-
import { join as
|
|
243918
|
+
import { join as join15 } from "node:path";
|
|
243908
243919
|
var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
|
|
243909
243920
|
async function updateProjectConfig(projectRoot) {
|
|
243910
|
-
const tsconfigPath =
|
|
243921
|
+
const tsconfigPath = join15(projectRoot, "tsconfig.json");
|
|
243911
243922
|
if (!await pathExists(tsconfigPath)) {
|
|
243912
243923
|
return false;
|
|
243913
243924
|
}
|
|
@@ -243950,7 +243961,7 @@ function getTypesCommand(context) {
|
|
|
243950
243961
|
}
|
|
243951
243962
|
|
|
243952
243963
|
// src/cli/dev/dev-server/main.ts
|
|
243953
|
-
import { dirname as
|
|
243964
|
+
import { dirname as dirname13, join as join18 } from "node:path";
|
|
243954
243965
|
var import_cors = __toESM(require_lib4(), 1);
|
|
243955
243966
|
var import_express4 = __toESM(require_express(), 1);
|
|
243956
243967
|
|
|
@@ -244109,10 +244120,6 @@ function createDevLogger() {
|
|
|
244109
244120
|
|
|
244110
244121
|
// src/cli/dev/dev-server/function-manager.ts
|
|
244111
244122
|
import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
|
|
244112
|
-
import { dirname as dirname12, join as join15 } from "node:path";
|
|
244113
|
-
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
244114
|
-
var __dirname5 = dirname12(fileURLToPath7(import.meta.url));
|
|
244115
|
-
var WRAPPER_PATH = getAssetsDir() ? join15(getAssetsDir(), "deno-runtime", "main.js") : join15(__dirname5, "../deno-runtime/main.js");
|
|
244116
244123
|
var READY_TIMEOUT = 30000;
|
|
244117
244124
|
|
|
244118
244125
|
class FunctionManager {
|
|
@@ -244120,9 +244127,11 @@ class FunctionManager {
|
|
|
244120
244127
|
running = new Map;
|
|
244121
244128
|
starting = new Map;
|
|
244122
244129
|
logger;
|
|
244123
|
-
|
|
244130
|
+
wrapperPath;
|
|
244131
|
+
constructor(functions, logger, wrapperPath) {
|
|
244124
244132
|
this.functions = new Map(functions.map((f7) => [f7.name, f7]));
|
|
244125
244133
|
this.logger = logger;
|
|
244134
|
+
this.wrapperPath = wrapperPath;
|
|
244126
244135
|
if (functions.length > 0) {
|
|
244127
244136
|
this.verifyDenoIsInstalled();
|
|
244128
244137
|
}
|
|
@@ -244195,7 +244204,7 @@ class FunctionManager {
|
|
|
244195
244204
|
}
|
|
244196
244205
|
spawnFunction(func, port) {
|
|
244197
244206
|
this.logger.log(`Spawning function "${func.name}" on port ${port}`);
|
|
244198
|
-
const process21 = spawn2("deno", ["run", "--allow-all",
|
|
244207
|
+
const process21 = spawn2("deno", ["run", "--allow-all", this.wrapperPath], {
|
|
244199
244208
|
env: {
|
|
244200
244209
|
...globalThis.process.env,
|
|
244201
244210
|
FUNCTION_PATH: func.entryPath,
|
|
@@ -245416,9 +245425,9 @@ class NodeFsHandler {
|
|
|
245416
245425
|
if (this.fsw.closed) {
|
|
245417
245426
|
return;
|
|
245418
245427
|
}
|
|
245419
|
-
const
|
|
245428
|
+
const dirname12 = sp2.dirname(file2);
|
|
245420
245429
|
const basename5 = sp2.basename(file2);
|
|
245421
|
-
const parent = this.fsw._getWatchedDir(
|
|
245430
|
+
const parent = this.fsw._getWatchedDir(dirname12);
|
|
245422
245431
|
let prevStats = stats;
|
|
245423
245432
|
if (parent.has(basename5))
|
|
245424
245433
|
return;
|
|
@@ -245445,7 +245454,7 @@ class NodeFsHandler {
|
|
|
245445
245454
|
prevStats = newStats2;
|
|
245446
245455
|
}
|
|
245447
245456
|
} catch (error48) {
|
|
245448
|
-
this.fsw._remove(
|
|
245457
|
+
this.fsw._remove(dirname12, basename5);
|
|
245449
245458
|
}
|
|
245450
245459
|
} else if (parent.has(basename5)) {
|
|
245451
245460
|
const at13 = newStats.atimeMs;
|
|
@@ -246406,7 +246415,7 @@ async function createDevServer(options8) {
|
|
|
246406
246415
|
next();
|
|
246407
246416
|
});
|
|
246408
246417
|
const devLogger = createDevLogger();
|
|
246409
|
-
const functionManager = new FunctionManager(functions, devLogger);
|
|
246418
|
+
const functionManager = new FunctionManager(functions, devLogger, options8.denoWrapperPath);
|
|
246410
246419
|
const functionRoutes = createFunctionRouter(functionManager, devLogger);
|
|
246411
246420
|
app.use("/api/apps/:appId/functions", functionRoutes);
|
|
246412
246421
|
if (functionManager.getFunctionNames().length > 0) {
|
|
@@ -246448,8 +246457,8 @@ async function createDevServer(options8) {
|
|
|
246448
246457
|
broadcastEntityEvent(io6, appId, entityName, event);
|
|
246449
246458
|
};
|
|
246450
246459
|
const base44ConfigWatcher = new WatchBase44({
|
|
246451
|
-
functions: join18(
|
|
246452
|
-
entities: join18(
|
|
246460
|
+
functions: join18(dirname13(project2.configPath), project2.functionsDir),
|
|
246461
|
+
entities: join18(dirname13(project2.configPath), project2.entitiesDir)
|
|
246453
246462
|
}, devLogger);
|
|
246454
246463
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
246455
246464
|
try {
|
|
@@ -246497,6 +246506,7 @@ async function devAction(options8) {
|
|
|
246497
246506
|
const port = options8.port ? Number(options8.port) : undefined;
|
|
246498
246507
|
const { port: resolvedPort } = await createDevServer({
|
|
246499
246508
|
port,
|
|
246509
|
+
denoWrapperPath: getDenoWrapperPath(),
|
|
246500
246510
|
loadResources: async () => {
|
|
246501
246511
|
const { functions, entities, project: project2 } = await readProjectConfig();
|
|
246502
246512
|
return { functions, entities, project: project2 };
|
|
@@ -246638,7 +246648,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
|
|
|
246638
246648
|
import { release, type } from "node:os";
|
|
246639
246649
|
|
|
246640
246650
|
// node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
246641
|
-
import { dirname as
|
|
246651
|
+
import { dirname as dirname14, posix, sep } from "path";
|
|
246642
246652
|
function createModulerModifier() {
|
|
246643
246653
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
246644
246654
|
return async (frames) => {
|
|
@@ -246647,7 +246657,7 @@ function createModulerModifier() {
|
|
|
246647
246657
|
return frames;
|
|
246648
246658
|
};
|
|
246649
246659
|
}
|
|
246650
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
246660
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname14(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
|
|
246651
246661
|
const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
|
|
246652
246662
|
return (filename) => {
|
|
246653
246663
|
if (!filename)
|
|
@@ -250836,11 +250846,16 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
|
|
|
250836
250846
|
});
|
|
250837
250847
|
}
|
|
250838
250848
|
// src/cli/index.ts
|
|
250849
|
+
var __dirname4 = dirname15(fileURLToPath6(import.meta.url));
|
|
250839
250850
|
async function runCLI() {
|
|
250851
|
+
ensureNpmAssets(join19(__dirname4, "../assets"));
|
|
250840
250852
|
const errorReporter = new ErrorReporter;
|
|
250841
250853
|
errorReporter.registerProcessErrorHandlers();
|
|
250842
250854
|
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
250843
|
-
const context = {
|
|
250855
|
+
const context = {
|
|
250856
|
+
errorReporter,
|
|
250857
|
+
isNonInteractive
|
|
250858
|
+
};
|
|
250844
250859
|
const program2 = createProgram(context);
|
|
250845
250860
|
try {
|
|
250846
250861
|
const userInfo = await readAuth();
|
|
@@ -250865,4 +250880,4 @@ export {
|
|
|
250865
250880
|
CLIExitError
|
|
250866
250881
|
};
|
|
250867
250882
|
|
|
250868
|
-
//# debugId=
|
|
250883
|
+
//# debugId=BC56C5152ADC37FB64756E2164756E21
|