@base44-preview/cli 0.0.33-pr.261.cbb005c → 0.0.33-pr.278.36f4324
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/README.md +1 -2
- package/dist/cli/index.js +169 -159
- package/dist/cli/index.js.map +14 -14
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -46,7 +46,6 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
|
|
|
46
46
|
| [`create`](https://docs.base44.com/developers/references/cli/commands/create) | Create a new Base44 project from a template |
|
|
47
47
|
| [`deploy`](https://docs.base44.com/developers/references/cli/commands/deploy) | Deploy resources and site to Base44 |
|
|
48
48
|
| [`link`](https://docs.base44.com/developers/references/cli/commands/link) | Link a local project to a project on Base44 |
|
|
49
|
-
| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Download the code for an existing Base44 project |
|
|
50
49
|
| [`dashboard open`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
|
|
51
50
|
| [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
|
|
52
51
|
| [`logout`](https://docs.base44.com/developers/references/cli/commands/logout) | Sign out and clear stored credentials |
|
|
@@ -55,6 +54,7 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
|
|
|
55
54
|
| [`agents push`](https://docs.base44.com/developers/references/cli/commands/agents-push) | Push local agents to Base44 |
|
|
56
55
|
| [`connectors pull`](https://docs.base44.com/developers/references/cli/commands/connectors-pull) | Pull connectors from Base44 to local files |
|
|
57
56
|
| [`connectors push`](https://docs.base44.com/developers/references/cli/commands/connectors-push) | Push local connectors to Base44 |
|
|
57
|
+
| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Download the code for an existing Base44 project |
|
|
58
58
|
| [`entities push`](https://docs.base44.com/developers/references/cli/commands/entities-push) | Push local entity schemas to Base44 |
|
|
59
59
|
| [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
|
|
60
60
|
| [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
|
|
@@ -93,4 +93,3 @@ Found a bug? [Open an issue](https://github.com/base44/cli/issues).
|
|
|
93
93
|
## License
|
|
94
94
|
|
|
95
95
|
ISC
|
|
96
|
-
|
package/dist/cli/index.js
CHANGED
|
@@ -14757,8 +14757,8 @@ var require_lodash2 = __commonJS((exports, module) => {
|
|
|
14757
14757
|
return object2[key];
|
|
14758
14758
|
});
|
|
14759
14759
|
}
|
|
14760
|
-
function cacheHas(
|
|
14761
|
-
return
|
|
14760
|
+
function cacheHas(cache2, key) {
|
|
14761
|
+
return cache2.has(key);
|
|
14762
14762
|
}
|
|
14763
14763
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
14764
14764
|
var index = -1, length = strSymbols.length;
|
|
@@ -15525,8 +15525,8 @@ var require_lodash2 = __commonJS((exports, module) => {
|
|
|
15525
15525
|
if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
|
|
15526
15526
|
othIndex = othLength;
|
|
15527
15527
|
while (--othIndex) {
|
|
15528
|
-
var
|
|
15529
|
-
if (!(
|
|
15528
|
+
var cache2 = caches[othIndex];
|
|
15529
|
+
if (!(cache2 ? cacheHas(cache2, computed) : includes2(arrays[othIndex], computed, comparator))) {
|
|
15530
15530
|
continue outer;
|
|
15531
15531
|
}
|
|
15532
15532
|
}
|
|
@@ -17098,12 +17098,12 @@ var require_lodash2 = __commonJS((exports, module) => {
|
|
|
17098
17098
|
}
|
|
17099
17099
|
function memoizeCapped(func) {
|
|
17100
17100
|
var result2 = memoize(func, function(key) {
|
|
17101
|
-
if (
|
|
17102
|
-
|
|
17101
|
+
if (cache2.size === MAX_MEMOIZE_SIZE) {
|
|
17102
|
+
cache2.clear();
|
|
17103
17103
|
}
|
|
17104
17104
|
return key;
|
|
17105
17105
|
});
|
|
17106
|
-
var
|
|
17106
|
+
var cache2 = result2.cache;
|
|
17107
17107
|
return result2;
|
|
17108
17108
|
}
|
|
17109
17109
|
function mergeData(data, source) {
|
|
@@ -18055,12 +18055,12 @@ var require_lodash2 = __commonJS((exports, module) => {
|
|
|
18055
18055
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
18056
18056
|
}
|
|
18057
18057
|
var memoized = function() {
|
|
18058
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0],
|
|
18059
|
-
if (
|
|
18060
|
-
return
|
|
18058
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache;
|
|
18059
|
+
if (cache2.has(key)) {
|
|
18060
|
+
return cache2.get(key);
|
|
18061
18061
|
}
|
|
18062
18062
|
var result2 = func.apply(this, args);
|
|
18063
|
-
memoized.cache =
|
|
18063
|
+
memoized.cache = cache2.set(key, result2) || cache2;
|
|
18064
18064
|
return result2;
|
|
18065
18065
|
};
|
|
18066
18066
|
memoized.cache = new (memoize.Cache || MapCache);
|
|
@@ -109913,7 +109913,7 @@ function determineSpecificType(value) {
|
|
|
109913
109913
|
return `type ${typeof value} (${inspected})`;
|
|
109914
109914
|
}
|
|
109915
109915
|
function read2(jsonPath, { base, specifier }) {
|
|
109916
|
-
const existing =
|
|
109916
|
+
const existing = cache2.get(jsonPath);
|
|
109917
109917
|
if (existing) {
|
|
109918
109918
|
return existing;
|
|
109919
109919
|
}
|
|
@@ -109962,7 +109962,7 @@ function read2(jsonPath, { base, specifier }) {
|
|
|
109962
109962
|
result.type = parsed.type;
|
|
109963
109963
|
}
|
|
109964
109964
|
}
|
|
109965
|
-
|
|
109965
|
+
cache2.set(jsonPath, result);
|
|
109966
109966
|
return result;
|
|
109967
109967
|
}
|
|
109968
109968
|
function getPackageScopeConfig(resolved) {
|
|
@@ -112135,7 +112135,7 @@ async function printAstToDoc(ast, options8) {
|
|
|
112135
112135
|
({
|
|
112136
112136
|
ast
|
|
112137
112137
|
} = await prepareToPrint(ast, options8));
|
|
112138
|
-
const
|
|
112138
|
+
const cache3 = /* @__PURE__ */ new Map;
|
|
112139
112139
|
const path152 = new ast_path_default(ast);
|
|
112140
112140
|
const ensurePrintingNode = create_print_pre_check_function_default(options8);
|
|
112141
112141
|
const embeds = /* @__PURE__ */ new Map;
|
|
@@ -112167,12 +112167,12 @@ async function printAstToDoc(ast, options8) {
|
|
|
112167
112167
|
return "";
|
|
112168
112168
|
}
|
|
112169
112169
|
const shouldCache = is_object_default(value) && args === undefined;
|
|
112170
|
-
if (shouldCache &&
|
|
112171
|
-
return
|
|
112170
|
+
if (shouldCache && cache3.has(value)) {
|
|
112171
|
+
return cache3.get(value);
|
|
112172
112172
|
}
|
|
112173
112173
|
const doc3 = callPluginPrintFunction(path152, options8, mainPrint, args, embeds);
|
|
112174
112174
|
if (shouldCache) {
|
|
112175
|
-
|
|
112175
|
+
cache3.set(value, doc3);
|
|
112176
112176
|
}
|
|
112177
112177
|
return doc3;
|
|
112178
112178
|
}
|
|
@@ -113547,7 +113547,7 @@ var require2, __filename2, __dirname4, __create2, __defProp3, __getOwnPropDesc,
|
|
|
113547
113547
|
return { line: Number(line3), column: Number(column2) };
|
|
113548
113548
|
}
|
|
113549
113549
|
return indexToPosition(string4, Number(index), { oneBased: true });
|
|
113550
|
-
}, addCodePointToUnexpectedToken = (message) => message.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/, (_10, _quote, token2) => `"${token2}"(${getCodePoint(token2)})`), TomlError, DATE_TIME_RE, TomlDate, INT_REGEX, FLOAT_REGEX, LEADING_ZERO, ESCAPE_REGEX, ESC_MAP, KEY_PART_RE, read_file_default, loadConfigFromPackageJson, parseYaml, loaders, loaders_default, CONFIG_FILE_NAMES, config_searcher_default, own, classRegExp, kTypes, codes, messages, nodeInternalPrefix = "__node_internal_", userStackTraceLimit, captureLargerStackTrace, hasOwnProperty, ERR_INVALID_PACKAGE_CONFIG,
|
|
113550
|
+
}, addCodePointToUnexpectedToken = (message) => message.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/, (_10, _quote, token2) => `"${token2}"(${getCodePoint(token2)})`), TomlError, DATE_TIME_RE, TomlDate, INT_REGEX, FLOAT_REGEX, LEADING_ZERO, ESCAPE_REGEX, ESC_MAP, KEY_PART_RE, read_file_default, loadConfigFromPackageJson, parseYaml, loaders, loaders_default, CONFIG_FILE_NAMES, config_searcher_default, own, classRegExp, kTypes, codes, messages, nodeInternalPrefix = "__node_internal_", userStackTraceLimit, captureLargerStackTrace, hasOwnProperty, ERR_INVALID_PACKAGE_CONFIG, cache2, ERR_UNKNOWN_FILE_EXTENSION, hasOwnProperty2, extensionFormatMap, protocolHandlers, ERR_INVALID_ARG_VALUE, DEFAULT_CONDITIONS, DEFAULT_CONDITIONS_SET, RegExpPrototypeSymbolReplace, ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG2, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST, own2, invalidSegmentRegEx, deprecatedInvalidSegmentRegEx, invalidPackageNameRegEx, patternRegEx, encodedSeparatorRegEx, emittedPackageWarnings, doubleSlashRegEx, import_from_file_default, require_from_file_default, requireErrorCodesShouldBeIgnored, load_external_config_default, load_config_default, loadCache, searchCache, OPTIONAL_OBJECT2 = 1, createMethodShim2 = (methodName, getImplementation) => (flags, object2, ...arguments_) => {
|
|
113551
113551
|
if (flags | OPTIONAL_OBJECT2 && (object2 === undefined || object2 === null)) {
|
|
113552
113552
|
return;
|
|
113553
113553
|
}
|
|
@@ -123690,7 +123690,7 @@ ${codeblock}`, options8);
|
|
|
123690
123690
|
});
|
|
123691
123691
|
hasOwnProperty = {}.hasOwnProperty;
|
|
123692
123692
|
({ ERR_INVALID_PACKAGE_CONFIG } = codes);
|
|
123693
|
-
|
|
123693
|
+
cache2 = /* @__PURE__ */ new Map;
|
|
123694
123694
|
({ ERR_UNKNOWN_FILE_EXTENSION } = codes);
|
|
123695
123695
|
hasOwnProperty2 = {}.hasOwnProperty;
|
|
123696
123696
|
extensionFormatMap = {
|
|
@@ -136448,22 +136448,22 @@ var require_dereference = __commonJS((exports) => {
|
|
|
136448
136448
|
const isExternalRef = ref_js_1.default.isExternal$Ref($ref);
|
|
136449
136449
|
const shouldResolveOnCwd = isExternalRef && options8?.dereference?.externalReferenceResolution === "root";
|
|
136450
136450
|
const $refPath = url3.resolve(shouldResolveOnCwd ? url3.cwd() : path18, $ref.$ref);
|
|
136451
|
-
const
|
|
136452
|
-
if (
|
|
136451
|
+
const cache3 = dereferencedCache.get($refPath);
|
|
136452
|
+
if (cache3 && !cache3.circular) {
|
|
136453
136453
|
const refKeys = Object.keys($ref);
|
|
136454
136454
|
if (refKeys.length > 1) {
|
|
136455
136455
|
const extraKeys = {};
|
|
136456
136456
|
for (const key2 of refKeys) {
|
|
136457
|
-
if (key2 !== "$ref" && !(key2 in
|
|
136457
|
+
if (key2 !== "$ref" && !(key2 in cache3.value)) {
|
|
136458
136458
|
extraKeys[key2] = $ref[key2];
|
|
136459
136459
|
}
|
|
136460
136460
|
}
|
|
136461
136461
|
return {
|
|
136462
|
-
circular:
|
|
136463
|
-
value: Object.assign({},
|
|
136462
|
+
circular: cache3.circular,
|
|
136463
|
+
value: Object.assign({}, cache3.value, extraKeys)
|
|
136464
136464
|
};
|
|
136465
136465
|
}
|
|
136466
|
-
return
|
|
136466
|
+
return cache3;
|
|
136467
136467
|
}
|
|
136468
136468
|
const pointer = $refs._resolve($refPath, path18, options8);
|
|
136469
136469
|
if (pointer === null) {
|
|
@@ -158092,7 +158092,7 @@ var require_application = __commonJS((exports, module) => {
|
|
|
158092
158092
|
return this;
|
|
158093
158093
|
};
|
|
158094
158094
|
app.render = function render(name2, options8, callback) {
|
|
158095
|
-
var
|
|
158095
|
+
var cache3 = this.cache;
|
|
158096
158096
|
var done = callback;
|
|
158097
158097
|
var engines = this.engines;
|
|
158098
158098
|
var opts = options8;
|
|
@@ -158106,7 +158106,7 @@ var require_application = __commonJS((exports, module) => {
|
|
|
158106
158106
|
renderOptions.cache = this.enabled("view cache");
|
|
158107
158107
|
}
|
|
158108
158108
|
if (renderOptions.cache) {
|
|
158109
|
-
view =
|
|
158109
|
+
view = cache3[name2];
|
|
158110
158110
|
}
|
|
158111
158111
|
if (!view) {
|
|
158112
158112
|
var View2 = this.get("view");
|
|
@@ -158122,7 +158122,7 @@ var require_application = __commonJS((exports, module) => {
|
|
|
158122
158122
|
return done(err);
|
|
158123
158123
|
}
|
|
158124
158124
|
if (renderOptions.cache) {
|
|
158125
|
-
|
|
158125
|
+
cache3[name2] = view;
|
|
158126
158126
|
}
|
|
158127
158127
|
}
|
|
158128
158128
|
tryRender(view, renderOptions, done);
|
|
@@ -178341,7 +178341,7 @@ var ProjectConfigSchema = exports_external.object({
|
|
|
178341
178341
|
agentsDir: exports_external.string().optional().default("agents"),
|
|
178342
178342
|
connectorsDir: exports_external.string().optional().default("connectors")
|
|
178343
178343
|
});
|
|
178344
|
-
var
|
|
178344
|
+
var AppConfigFileSchema = exports_external.object({
|
|
178345
178345
|
id: exports_external.string().min(1, "id cannot be empty")
|
|
178346
178346
|
});
|
|
178347
178347
|
var CreateProjectResponseSchema = exports_external.looseObject({
|
|
@@ -178370,7 +178370,8 @@ var TestOverridesSchema = exports_external.object({
|
|
|
178370
178370
|
// src/core/config.ts
|
|
178371
178371
|
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
178372
178372
|
function getBase44GlobalDir() {
|
|
178373
|
-
|
|
178373
|
+
const home = process.env.HOME || homedir();
|
|
178374
|
+
return join(home, ".base44");
|
|
178374
178375
|
}
|
|
178375
178376
|
function getAuthFilePath() {
|
|
178376
178377
|
return join(getBase44GlobalDir(), "auth", "auth.json");
|
|
@@ -184399,9 +184400,9 @@ async function downloadProject(projectId, projectPath) {
|
|
|
184399
184400
|
} catch (error48) {
|
|
184400
184401
|
throw await ApiError.fromHttpError(error48, "downloading project");
|
|
184401
184402
|
}
|
|
184402
|
-
const
|
|
184403
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
184403
184404
|
await makeDirectory(projectPath);
|
|
184404
|
-
await pipeline(
|
|
184405
|
+
await pipeline(Readable.from(buffer), extract({ cwd: projectPath }));
|
|
184405
184406
|
}
|
|
184406
184407
|
// node_modules/globby/index.js
|
|
184407
184408
|
import process4 from "node:process";
|
|
@@ -186159,21 +186160,20 @@ async function readProjectConfig(projectRoot) {
|
|
|
186159
186160
|
}
|
|
186160
186161
|
|
|
186161
186162
|
// src/core/project/app-config.ts
|
|
186162
|
-
var
|
|
186163
|
-
function
|
|
186164
|
-
const
|
|
186165
|
-
|
|
186166
|
-
|
|
186167
|
-
return
|
|
186163
|
+
var _current = null;
|
|
186164
|
+
async function withAppConfig(config6, fn) {
|
|
186165
|
+
const prev = _current;
|
|
186166
|
+
_current = config6;
|
|
186167
|
+
try {
|
|
186168
|
+
return await fn();
|
|
186169
|
+
} finally {
|
|
186170
|
+
_current = prev;
|
|
186168
186171
|
}
|
|
186169
|
-
return false;
|
|
186170
186172
|
}
|
|
186171
|
-
async function
|
|
186172
|
-
|
|
186173
|
-
|
|
186174
|
-
|
|
186175
|
-
if (cache2) {
|
|
186176
|
-
return cache2;
|
|
186173
|
+
async function resolveAppConfig() {
|
|
186174
|
+
const testOverride = getTestOverrides()?.appConfig;
|
|
186175
|
+
if (testOverride?.id && testOverride.projectRoot) {
|
|
186176
|
+
return { id: testOverride.id, projectRoot: testOverride.projectRoot };
|
|
186177
186177
|
}
|
|
186178
186178
|
const projectRoot = await findProjectRoot();
|
|
186179
186179
|
if (!projectRoot) {
|
|
@@ -186191,17 +186191,13 @@ async function initAppConfig() {
|
|
|
186191
186191
|
]
|
|
186192
186192
|
});
|
|
186193
186193
|
}
|
|
186194
|
-
|
|
186195
|
-
return cache2;
|
|
186194
|
+
return { projectRoot: projectRoot.root, id: config6.id };
|
|
186196
186195
|
}
|
|
186197
186196
|
function getAppConfig() {
|
|
186198
|
-
if (!
|
|
186197
|
+
if (!_current) {
|
|
186199
186198
|
throw new ConfigInvalidError("App config not initialized. Ensure the command uses requireAppConfig option.");
|
|
186200
186199
|
}
|
|
186201
|
-
return
|
|
186202
|
-
}
|
|
186203
|
-
function setAppConfig(config6) {
|
|
186204
|
-
cache2 = config6;
|
|
186200
|
+
return _current;
|
|
186205
186201
|
}
|
|
186206
186202
|
function generateAppConfigContent(id) {
|
|
186207
186203
|
return `// Base44 App Configuration
|
|
@@ -186235,7 +186231,7 @@ async function readAppConfig(projectRoot) {
|
|
|
186235
186231
|
return null;
|
|
186236
186232
|
}
|
|
186237
186233
|
const parsed = await readJsonFile(configPath);
|
|
186238
|
-
const result =
|
|
186234
|
+
const result = AppConfigFileSchema.safeParse(parsed);
|
|
186239
186235
|
if (!result.success) {
|
|
186240
186236
|
throw new SchemaValidationError("Invalid app configuration", result.error, configPath);
|
|
186241
186237
|
}
|
|
@@ -193894,8 +193890,8 @@ var package_default = {
|
|
|
193894
193890
|
clean: "rm -rf dist && mkdir -p dist",
|
|
193895
193891
|
lint: "biome check src tests",
|
|
193896
193892
|
"lint:fix": "biome check --write src tests",
|
|
193897
|
-
test: "
|
|
193898
|
-
"test:watch": "
|
|
193893
|
+
test: "bun test",
|
|
193894
|
+
"test:watch": "bun test --watch",
|
|
193899
193895
|
knip: "knip",
|
|
193900
193896
|
"knip:fix": "knip --fix"
|
|
193901
193897
|
},
|
|
@@ -193948,7 +193944,6 @@ var package_default = {
|
|
|
193948
193944
|
tar: "^7.5.4",
|
|
193949
193945
|
"tmp-promise": "^3.0.3",
|
|
193950
193946
|
typescript: "^5.7.2",
|
|
193951
|
-
vitest: "^4.0.16",
|
|
193952
193947
|
zod: "^4.3.5"
|
|
193953
193948
|
},
|
|
193954
193949
|
engines: {
|
|
@@ -194025,11 +194020,15 @@ async function runCommand(commandFn, options, context) {
|
|
|
194025
194020
|
});
|
|
194026
194021
|
} catch {}
|
|
194027
194022
|
}
|
|
194023
|
+
let outroMessage;
|
|
194028
194024
|
if (options?.requireAppConfig !== false) {
|
|
194029
|
-
const appConfig = await
|
|
194025
|
+
const appConfig = await resolveAppConfig();
|
|
194026
|
+
context.appConfig = appConfig;
|
|
194030
194027
|
context.errorReporter.setContext({ appId: appConfig.id });
|
|
194028
|
+
({ outroMessage } = await withAppConfig(appConfig, commandFn));
|
|
194029
|
+
} else {
|
|
194030
|
+
({ outroMessage } = await commandFn());
|
|
194031
194031
|
}
|
|
194032
|
-
const { outroMessage } = await commandFn();
|
|
194033
194032
|
Le(outroMessage || "");
|
|
194034
194033
|
} catch (error48) {
|
|
194035
194034
|
const errorMessage = error48 instanceof Error ? error48.message : String(error48);
|
|
@@ -194064,8 +194063,7 @@ async function runTask(startMessage, operation, options) {
|
|
|
194064
194063
|
}
|
|
194065
194064
|
// src/cli/utils/urls.ts
|
|
194066
194065
|
function getDashboardUrl(projectId) {
|
|
194067
|
-
|
|
194068
|
-
return `${getBase44ApiUrl()}/apps/${id}/editor/workspace/overview`;
|
|
194066
|
+
return `${getBase44ApiUrl()}/apps/${projectId}/editor/workspace/overview`;
|
|
194069
194067
|
}
|
|
194070
194068
|
// src/cli/commands/agents/pull.ts
|
|
194071
194069
|
async function pullAgentsAction() {
|
|
@@ -194968,8 +194966,8 @@ function getConnectorsCommand(context) {
|
|
|
194968
194966
|
}
|
|
194969
194967
|
|
|
194970
194968
|
// src/cli/commands/dashboard/open.ts
|
|
194971
|
-
async function openDashboard(isNonInteractive) {
|
|
194972
|
-
const dashboardUrl = getDashboardUrl();
|
|
194969
|
+
async function openDashboard(isNonInteractive, appId) {
|
|
194970
|
+
const dashboardUrl = getDashboardUrl(appId);
|
|
194973
194971
|
if (!isNonInteractive) {
|
|
194974
194972
|
await open_default(dashboardUrl);
|
|
194975
194973
|
}
|
|
@@ -194977,7 +194975,7 @@ async function openDashboard(isNonInteractive) {
|
|
|
194977
194975
|
}
|
|
194978
194976
|
function getDashboardOpenCommand(context) {
|
|
194979
194977
|
return new Command("open").description("Open the app dashboard in your browser").action(async () => {
|
|
194980
|
-
await runCommand(() => openDashboard(context.isNonInteractive), { requireAuth: true }, context);
|
|
194978
|
+
await runCommand(() => openDashboard(context.isNonInteractive, context.appConfig.id), { requireAuth: true }, context);
|
|
194981
194979
|
});
|
|
194982
194980
|
}
|
|
194983
194981
|
|
|
@@ -195155,73 +195153,77 @@ async function executeCreate({
|
|
|
195155
195153
|
successMessage: theme.colors.base44Orange("Project created successfully"),
|
|
195156
195154
|
errorMessage: "Failed to create project"
|
|
195157
195155
|
});
|
|
195158
|
-
|
|
195159
|
-
|
|
195160
|
-
|
|
195161
|
-
|
|
195162
|
-
|
|
195163
|
-
|
|
195164
|
-
|
|
195165
|
-
|
|
195166
|
-
|
|
195167
|
-
|
|
195168
|
-
|
|
195169
|
-
|
|
195170
|
-
|
|
195171
|
-
|
|
195172
|
-
|
|
195173
|
-
|
|
195174
|
-
|
|
195175
|
-
|
|
195176
|
-
|
|
195177
|
-
|
|
195156
|
+
return await withAppConfig({ id: projectId, projectRoot: resolvedPath }, async () => {
|
|
195157
|
+
const { project: project2, entities } = await readProjectConfig(resolvedPath);
|
|
195158
|
+
let finalAppUrl;
|
|
195159
|
+
if (entities.length > 0) {
|
|
195160
|
+
let shouldPushEntities;
|
|
195161
|
+
if (isInteractive) {
|
|
195162
|
+
const result = await Re({
|
|
195163
|
+
message: "Set up the backend data now? (This pushes the data models used by the template to Base44)"
|
|
195164
|
+
});
|
|
195165
|
+
shouldPushEntities = !Ct(result) && result;
|
|
195166
|
+
} else {
|
|
195167
|
+
shouldPushEntities = !!deploy5;
|
|
195168
|
+
}
|
|
195169
|
+
if (shouldPushEntities) {
|
|
195170
|
+
await runTask(`Pushing ${entities.length} data models to Base44...`, async () => {
|
|
195171
|
+
await pushEntities(entities);
|
|
195172
|
+
}, {
|
|
195173
|
+
successMessage: theme.colors.base44Orange("Data models pushed successfully"),
|
|
195174
|
+
errorMessage: "Failed to push data models"
|
|
195175
|
+
});
|
|
195176
|
+
}
|
|
195178
195177
|
}
|
|
195179
|
-
|
|
195180
|
-
|
|
195181
|
-
|
|
195182
|
-
|
|
195183
|
-
|
|
195184
|
-
|
|
195185
|
-
|
|
195186
|
-
|
|
195187
|
-
|
|
195188
|
-
|
|
195189
|
-
|
|
195190
|
-
|
|
195191
|
-
|
|
195192
|
-
|
|
195193
|
-
|
|
195194
|
-
|
|
195195
|
-
|
|
195196
|
-
|
|
195197
|
-
|
|
195198
|
-
|
|
195199
|
-
|
|
195200
|
-
|
|
195201
|
-
|
|
195202
|
-
|
|
195178
|
+
if (project2.site) {
|
|
195179
|
+
const { installCommand, buildCommand, outputDirectory } = project2.site;
|
|
195180
|
+
let shouldDeploy;
|
|
195181
|
+
if (isInteractive) {
|
|
195182
|
+
const result = await Re({
|
|
195183
|
+
message: "Would you like to deploy the site now? (Hosted on Base44)"
|
|
195184
|
+
});
|
|
195185
|
+
shouldDeploy = !Ct(result) && result;
|
|
195186
|
+
} else {
|
|
195187
|
+
shouldDeploy = !!deploy5;
|
|
195188
|
+
}
|
|
195189
|
+
if (shouldDeploy && installCommand && buildCommand && outputDirectory) {
|
|
195190
|
+
const { appUrl } = await runTask("Installing dependencies...", async (updateMessage) => {
|
|
195191
|
+
await execa({
|
|
195192
|
+
cwd: resolvedPath,
|
|
195193
|
+
shell: true
|
|
195194
|
+
})`${installCommand}`;
|
|
195195
|
+
updateMessage("Building project...");
|
|
195196
|
+
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
195197
|
+
updateMessage("Deploying site...");
|
|
195198
|
+
return await deploySite(join11(resolvedPath, outputDirectory));
|
|
195199
|
+
}, {
|
|
195200
|
+
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
195201
|
+
errorMessage: "Failed to deploy site"
|
|
195202
|
+
});
|
|
195203
|
+
finalAppUrl = appUrl;
|
|
195204
|
+
}
|
|
195203
195205
|
}
|
|
195204
|
-
|
|
195205
|
-
|
|
195206
|
-
|
|
195207
|
-
|
|
195208
|
-
|
|
195209
|
-
|
|
195210
|
-
|
|
195211
|
-
|
|
195206
|
+
const shouldAddSkills = skills;
|
|
195207
|
+
if (shouldAddSkills) {
|
|
195208
|
+
try {
|
|
195209
|
+
await runTask("Installing AI agent skills...", async () => {
|
|
195210
|
+
await execa("npx", ["-y", "skills", "add", "base44/skills", "-y"], {
|
|
195211
|
+
cwd: resolvedPath,
|
|
195212
|
+
shell: true
|
|
195213
|
+
});
|
|
195214
|
+
}, {
|
|
195215
|
+
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
195216
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx skills add base44/skills"
|
|
195212
195217
|
});
|
|
195213
|
-
}
|
|
195214
|
-
|
|
195215
|
-
|
|
195216
|
-
|
|
195217
|
-
|
|
195218
|
-
|
|
195219
|
-
|
|
195220
|
-
|
|
195221
|
-
|
|
195222
|
-
R2.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
195223
|
-
}
|
|
195224
|
-
return { outroMessage: "Your project is set up and ready to use" };
|
|
195218
|
+
} catch {}
|
|
195219
|
+
}
|
|
195220
|
+
R2.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name2)}`);
|
|
195221
|
+
R2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
|
|
195222
|
+
if (finalAppUrl) {
|
|
195223
|
+
R2.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
195224
|
+
}
|
|
195225
|
+
return { outroMessage: "Your project is set up and ready to use" };
|
|
195226
|
+
});
|
|
195225
195227
|
}
|
|
195226
195228
|
function getCreateCommand(context) {
|
|
195227
195229
|
return new Command("create").description("Create a new Base44 project").addArgument(new Argument("name", "Project name").argOptional()).option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--no-skills", "Skip AI agent skills installation").hook("preAction", validateNonInteractiveFlags).action(async (name2, options) => {
|
|
@@ -195290,7 +195292,7 @@ ${summaryLines.join(`
|
|
|
195290
195292
|
R2.info("Some connectors still require authorization. Run 'base44 connectors push' or open the links above in your browser.");
|
|
195291
195293
|
}
|
|
195292
195294
|
}
|
|
195293
|
-
R2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
|
|
195295
|
+
R2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(options.appId))}`);
|
|
195294
195296
|
if (result.appUrl) {
|
|
195295
195297
|
R2.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
|
|
195296
195298
|
}
|
|
@@ -195300,7 +195302,8 @@ function getDeployCommand(context) {
|
|
|
195300
195302
|
return new Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
195301
195303
|
await runCommand(() => deployAction({
|
|
195302
195304
|
...options,
|
|
195303
|
-
isNonInteractive: context.isNonInteractive
|
|
195305
|
+
isNonInteractive: context.isNonInteractive,
|
|
195306
|
+
appId: context.appConfig.id
|
|
195304
195307
|
}), { requireAuth: true }, context);
|
|
195305
195308
|
});
|
|
195306
195309
|
}
|
|
@@ -195423,7 +195426,6 @@ async function link(options) {
|
|
|
195423
195426
|
}
|
|
195424
195427
|
await runTask("Linking project...", async () => {
|
|
195425
195428
|
await writeAppConfig(projectRoot.root, projectId);
|
|
195426
|
-
setAppConfig({ id: projectId, projectRoot: projectRoot.root });
|
|
195427
195429
|
}, {
|
|
195428
195430
|
successMessage: "Project linked successfully",
|
|
195429
195431
|
errorMessage: "Failed to link project"
|
|
@@ -195439,7 +195441,6 @@ async function link(options) {
|
|
|
195439
195441
|
errorMessage: "Failed to create project"
|
|
195440
195442
|
});
|
|
195441
195443
|
await writeAppConfig(projectRoot.root, projectId);
|
|
195442
|
-
setAppConfig({ id: projectId, projectRoot: projectRoot.root });
|
|
195443
195444
|
finalProjectId = projectId;
|
|
195444
195445
|
}
|
|
195445
195446
|
R2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(finalProjectId))}`);
|
|
@@ -196107,42 +196108,51 @@ async function eject(options8) {
|
|
|
196107
196108
|
throw new CLIExitError(0);
|
|
196108
196109
|
}
|
|
196109
196110
|
const resolvedPath = resolve5(selectedPath);
|
|
196110
|
-
await runTask("Downloading your project's code...", async (updateMessage) => {
|
|
196111
|
+
const newProjectId = await runTask("Downloading your project's code...", async (updateMessage) => {
|
|
196111
196112
|
await createProjectFilesForExistingProject({
|
|
196112
196113
|
projectId,
|
|
196113
196114
|
projectPath: resolvedPath
|
|
196114
196115
|
});
|
|
196115
196116
|
updateMessage("Creating a new project...");
|
|
196116
196117
|
const newProjectName = `${selectedProject.name} Copy`;
|
|
196117
|
-
const { projectId:
|
|
196118
|
+
const { projectId: createdId } = await createProject(newProjectName, selectedProject.userDescription ?? undefined);
|
|
196118
196119
|
updateMessage("Linking the project...");
|
|
196119
|
-
await writeAppConfig(resolvedPath,
|
|
196120
|
-
await writeFile(`${resolvedPath}/.env.local`, `VITE_BASE44_APP_ID=${
|
|
196121
|
-
|
|
196120
|
+
await writeAppConfig(resolvedPath, createdId);
|
|
196121
|
+
await writeFile(`${resolvedPath}/.env.local`, `VITE_BASE44_APP_ID=${createdId}`);
|
|
196122
|
+
return createdId;
|
|
196122
196123
|
}, {
|
|
196123
196124
|
successMessage: theme.colors.base44Orange("Project pulled successfully"),
|
|
196124
196125
|
errorMessage: "Failed to pull project"
|
|
196125
196126
|
});
|
|
196126
|
-
|
|
196127
|
-
|
|
196128
|
-
|
|
196129
|
-
|
|
196130
|
-
|
|
196131
|
-
|
|
196132
|
-
|
|
196133
|
-
if (!Ct(shouldDeploy) && shouldDeploy) {
|
|
196134
|
-
await runTask("Installing dependencies...", async (updateMessage) => {
|
|
196135
|
-
await execa({ cwd: resolvedPath, shell: true })`${installCommand}`;
|
|
196136
|
-
updateMessage("Building project...");
|
|
196137
|
-
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
196138
|
-
}, {
|
|
196139
|
-
successMessage: theme.colors.base44Orange("Project built successfully"),
|
|
196140
|
-
errorMessage: "Failed to build project"
|
|
196127
|
+
return await withAppConfig({ id: newProjectId, projectRoot: resolvedPath }, async () => {
|
|
196128
|
+
const { project: project2 } = await readProjectConfig(resolvedPath);
|
|
196129
|
+
const installCommand = project2.site?.installCommand;
|
|
196130
|
+
const buildCommand = project2.site?.buildCommand;
|
|
196131
|
+
if (installCommand && buildCommand) {
|
|
196132
|
+
const shouldDeploy = options8.yes ? true : await Re({
|
|
196133
|
+
message: "Would you like to deploy your project now?"
|
|
196141
196134
|
});
|
|
196142
|
-
|
|
196135
|
+
if (!Ct(shouldDeploy) && shouldDeploy) {
|
|
196136
|
+
await runTask("Installing dependencies...", async (updateMessage) => {
|
|
196137
|
+
await execa({
|
|
196138
|
+
cwd: resolvedPath,
|
|
196139
|
+
shell: true
|
|
196140
|
+
})`${installCommand}`;
|
|
196141
|
+
updateMessage("Building project...");
|
|
196142
|
+
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
196143
|
+
}, {
|
|
196144
|
+
successMessage: theme.colors.base44Orange("Project built successfully"),
|
|
196145
|
+
errorMessage: "Failed to build project"
|
|
196146
|
+
});
|
|
196147
|
+
await deployAction({
|
|
196148
|
+
yes: true,
|
|
196149
|
+
projectRoot: resolvedPath,
|
|
196150
|
+
appId: newProjectId
|
|
196151
|
+
});
|
|
196152
|
+
}
|
|
196143
196153
|
}
|
|
196144
|
-
|
|
196145
|
-
|
|
196154
|
+
return { outroMessage: "Your new project is set and ready to use" };
|
|
196155
|
+
});
|
|
196146
196156
|
}
|
|
196147
196157
|
function getEjectCommand(context) {
|
|
196148
196158
|
return new Command("eject").description("Download the code for an existing Base44 project").option("-p, --path <path>", "Path where to write the project").option("--project-id <id>", "Project ID to eject (skips interactive selection)").option("-y, --yes", "Skip confirmation prompts").action(async (options8) => {
|
|
@@ -198487,8 +198497,8 @@ async function addSourceContext(frames) {
|
|
|
198487
198497
|
const ranges = makeLineReaderRanges(filesToLineRanges);
|
|
198488
198498
|
if (ranges.every((r5) => rangeExistsInContentCache(file2, r5)))
|
|
198489
198499
|
continue;
|
|
198490
|
-
const
|
|
198491
|
-
readlinePromises.push(getContextLinesFromFile(file2, ranges,
|
|
198500
|
+
const cache3 = emplace(LRU_FILE_CONTENTS_CACHE, file2, {});
|
|
198501
|
+
readlinePromises.push(getContextLinesFromFile(file2, ranges, cache3));
|
|
198492
198502
|
}
|
|
198493
198503
|
await Promise.all(readlinePromises).catch(() => {});
|
|
198494
198504
|
if (frames && frames.length > 0)
|
|
@@ -198546,10 +198556,10 @@ function getContextLinesFromFile(path18, ranges, output) {
|
|
|
198546
198556
|
});
|
|
198547
198557
|
});
|
|
198548
198558
|
}
|
|
198549
|
-
function addSourceContextToFrames(frames,
|
|
198559
|
+
function addSourceContextToFrames(frames, cache3) {
|
|
198550
198560
|
for (const frame of frames)
|
|
198551
198561
|
if (frame.filename && frame.context_line === undefined && typeof frame.lineno == "number") {
|
|
198552
|
-
const contents =
|
|
198562
|
+
const contents = cache3.get(frame.filename);
|
|
198553
198563
|
if (contents === undefined)
|
|
198554
198564
|
continue;
|
|
198555
198565
|
addContextToFrame(frame.lineno, frame, contents);
|
|
@@ -200436,4 +200446,4 @@ export {
|
|
|
200436
200446
|
CLIExitError
|
|
200437
200447
|
};
|
|
200438
200448
|
|
|
200439
|
-
//# debugId=
|
|
200449
|
+
//# debugId=4720A2778B079F1264756E2164756E21
|