@base44-preview/cli 0.0.49-pr.452.a028d51 → 0.0.49-pr.453.765cc14
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 +60 -175
- package/dist/cli/index.js.map +8 -11
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -16067,7 +16067,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
16067
16067
|
}
|
|
16068
16068
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
16069
16069
|
});
|
|
16070
|
-
function
|
|
16070
|
+
function join12(array2, separator) {
|
|
16071
16071
|
return array2 == null ? "" : nativeJoin.call(array2, separator);
|
|
16072
16072
|
}
|
|
16073
16073
|
function last(array2) {
|
|
@@ -17999,7 +17999,7 @@ __p += '`;
|
|
|
17999
17999
|
lodash.isUndefined = isUndefined;
|
|
18000
18000
|
lodash.isWeakMap = isWeakMap;
|
|
18001
18001
|
lodash.isWeakSet = isWeakSet;
|
|
18002
|
-
lodash.join =
|
|
18002
|
+
lodash.join = join12;
|
|
18003
18003
|
lodash.kebabCase = kebabCase;
|
|
18004
18004
|
lodash.last = last;
|
|
18005
18005
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -27503,7 +27503,7 @@ function cleanDoc(doc2) {
|
|
|
27503
27503
|
return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc));
|
|
27504
27504
|
}
|
|
27505
27505
|
function replaceEndOfLine(doc2, replacement = literalline) {
|
|
27506
|
-
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ?
|
|
27506
|
+
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join18(replacement, currentDoc.split(`
|
|
27507
27507
|
`)) : currentDoc);
|
|
27508
27508
|
}
|
|
27509
27509
|
function canBreakFn(doc2) {
|
|
@@ -27583,7 +27583,7 @@ function indentIfBreak(contents, options) {
|
|
|
27583
27583
|
negate: options.negate
|
|
27584
27584
|
};
|
|
27585
27585
|
}
|
|
27586
|
-
function
|
|
27586
|
+
function join18(separator, docs) {
|
|
27587
27587
|
assertDoc(separator);
|
|
27588
27588
|
assertDocArray(docs);
|
|
27589
27589
|
const parts = [];
|
|
@@ -28294,7 +28294,7 @@ var init_doc = __esm(() => {
|
|
|
28294
28294
|
MODE_FLAT = Symbol("MODE_FLAT");
|
|
28295
28295
|
DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
28296
28296
|
builders = {
|
|
28297
|
-
join:
|
|
28297
|
+
join: join18,
|
|
28298
28298
|
line,
|
|
28299
28299
|
softline,
|
|
28300
28300
|
hardline,
|
|
@@ -133208,7 +133208,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
133208
133208
|
return mapDoc2(doc2, (currentDoc) => cleanDocFn2(currentDoc));
|
|
133209
133209
|
}
|
|
133210
133210
|
function replaceEndOfLine2(doc2, replacement = literalline2) {
|
|
133211
|
-
return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ?
|
|
133211
|
+
return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join20(replacement, currentDoc.split(`
|
|
133212
133212
|
`)) : currentDoc);
|
|
133213
133213
|
}
|
|
133214
133214
|
function canBreakFn2(doc2) {
|
|
@@ -133294,7 +133294,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
133294
133294
|
negate: options8.negate
|
|
133295
133295
|
};
|
|
133296
133296
|
}
|
|
133297
|
-
function
|
|
133297
|
+
function join20(separator, docs) {
|
|
133298
133298
|
assertDoc2(separator);
|
|
133299
133299
|
assertDocArray2(docs);
|
|
133300
133300
|
const parts = [];
|
|
@@ -133959,7 +133959,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
133959
133959
|
}
|
|
133960
133960
|
}
|
|
133961
133961
|
var builders2 = {
|
|
133962
|
-
join:
|
|
133962
|
+
join: join20,
|
|
133963
133963
|
line: line3,
|
|
133964
133964
|
softline: softline2,
|
|
133965
133965
|
hardline: hardline4,
|
|
@@ -160402,7 +160402,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
160402
160402
|
var dirname14 = path18.dirname;
|
|
160403
160403
|
var basename4 = path18.basename;
|
|
160404
160404
|
var extname2 = path18.extname;
|
|
160405
|
-
var
|
|
160405
|
+
var join21 = path18.join;
|
|
160406
160406
|
var resolve6 = path18.resolve;
|
|
160407
160407
|
module.exports = View;
|
|
160408
160408
|
function View(name2, options8) {
|
|
@@ -160464,12 +160464,12 @@ var require_view = __commonJS((exports, module) => {
|
|
|
160464
160464
|
};
|
|
160465
160465
|
View.prototype.resolve = function resolve7(dir, file2) {
|
|
160466
160466
|
var ext = this.ext;
|
|
160467
|
-
var path19 =
|
|
160467
|
+
var path19 = join21(dir, file2);
|
|
160468
160468
|
var stat2 = tryStat(path19);
|
|
160469
160469
|
if (stat2 && stat2.isFile()) {
|
|
160470
160470
|
return path19;
|
|
160471
160471
|
}
|
|
160472
|
-
path19 =
|
|
160472
|
+
path19 = join21(dir, basename4(file2, ext), "index" + ext);
|
|
160473
160473
|
stat2 = tryStat(path19);
|
|
160474
160474
|
if (stat2 && stat2.isFile()) {
|
|
160475
160475
|
return path19;
|
|
@@ -164164,7 +164164,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
164164
164164
|
var Stream2 = __require("stream");
|
|
164165
164165
|
var util2 = __require("util");
|
|
164166
164166
|
var extname2 = path18.extname;
|
|
164167
|
-
var
|
|
164167
|
+
var join21 = path18.join;
|
|
164168
164168
|
var normalize = path18.normalize;
|
|
164169
164169
|
var resolve6 = path18.resolve;
|
|
164170
164170
|
var sep = path18.sep;
|
|
@@ -164336,7 +164336,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
164336
164336
|
return res;
|
|
164337
164337
|
}
|
|
164338
164338
|
parts = path19.split(sep);
|
|
164339
|
-
path19 = normalize(
|
|
164339
|
+
path19 = normalize(join21(root2, path19));
|
|
164340
164340
|
} else {
|
|
164341
164341
|
if (UP_PATH_REGEXP.test(path19)) {
|
|
164342
164342
|
debug('malicious path "%s"', path19);
|
|
@@ -164476,7 +164476,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
164476
164476
|
return self2.onStatError(err);
|
|
164477
164477
|
return self2.error(404);
|
|
164478
164478
|
}
|
|
164479
|
-
var p4 =
|
|
164479
|
+
var p4 = join21(path19, self2._index[i5]);
|
|
164480
164480
|
debug('stat "%s"', p4);
|
|
164481
164481
|
fs28.stat(p4, function(err2, stat2) {
|
|
164482
164482
|
if (err2)
|
|
@@ -214616,7 +214616,7 @@ var require_buffer_list = __commonJS((exports, module) => {
|
|
|
214616
214616
|
}
|
|
214617
214617
|
}, {
|
|
214618
214618
|
key: "join",
|
|
214619
|
-
value: function
|
|
214619
|
+
value: function join21(s5) {
|
|
214620
214620
|
if (this.length === 0)
|
|
214621
214621
|
return "";
|
|
214622
214622
|
var p4 = this.head;
|
|
@@ -218270,7 +218270,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
218270
218270
|
});
|
|
218271
218271
|
|
|
218272
218272
|
// src/cli/index.ts
|
|
218273
|
-
import { dirname as dirname18, join as
|
|
218273
|
+
import { dirname as dirname18, join as join24 } from "node:path";
|
|
218274
218274
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
218275
218275
|
|
|
218276
218276
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
@@ -219422,7 +219422,7 @@ var {
|
|
|
219422
219422
|
} = import__.default;
|
|
219423
219423
|
|
|
219424
219424
|
// src/cli/commands/agents/pull.ts
|
|
219425
|
-
import { dirname as dirname7, join as
|
|
219425
|
+
import { dirname as dirname7, join as join12 } from "node:path";
|
|
219426
219426
|
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
219427
219427
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
219428
219428
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -234683,6 +234683,21 @@ class UserError extends CLIError {
|
|
|
234683
234683
|
|
|
234684
234684
|
class SystemError extends CLIError {
|
|
234685
234685
|
}
|
|
234686
|
+
class AuthExpiredError extends UserError {
|
|
234687
|
+
code = "AUTH_EXPIRED";
|
|
234688
|
+
constructor(message = "Authentication has expired", options) {
|
|
234689
|
+
super(message, {
|
|
234690
|
+
hints: options?.hints ?? [
|
|
234691
|
+
{
|
|
234692
|
+
message: "Run 'base44 login' to re-authenticate",
|
|
234693
|
+
command: "base44 login"
|
|
234694
|
+
}
|
|
234695
|
+
],
|
|
234696
|
+
cause: options?.cause
|
|
234697
|
+
});
|
|
234698
|
+
}
|
|
234699
|
+
}
|
|
234700
|
+
|
|
234686
234701
|
class ConfigNotFoundError extends UserError {
|
|
234687
234702
|
code = "CONFIG_NOT_FOUND";
|
|
234688
234703
|
constructor(message = "No Base44 project found in this directory", options) {
|
|
@@ -243629,12 +243644,12 @@ async function waitForAuthentication(deviceCode, expiresIn, interval) {
|
|
|
243629
243644
|
});
|
|
243630
243645
|
} catch (error48) {
|
|
243631
243646
|
if (error48 instanceof Error && error48.message.includes("timed out")) {
|
|
243632
|
-
throw new
|
|
243647
|
+
throw new AuthExpiredError("Authentication timed out. Please try again.");
|
|
243633
243648
|
}
|
|
243634
243649
|
throw error48;
|
|
243635
243650
|
}
|
|
243636
243651
|
if (tokenResponse === undefined) {
|
|
243637
|
-
throw new
|
|
243652
|
+
throw new InternalError("Failed to retrieve authentication token.");
|
|
243638
243653
|
}
|
|
243639
243654
|
return tokenResponse;
|
|
243640
243655
|
}
|
|
@@ -243677,9 +243692,6 @@ async function ensureAppConfig(ctx) {
|
|
|
243677
243692
|
ctx.errorReporter.setContext({ appId: appConfig.id });
|
|
243678
243693
|
}
|
|
243679
243694
|
|
|
243680
|
-
// src/cli/utils/skill-version-check.ts
|
|
243681
|
-
import { join as join12 } from "node:path";
|
|
243682
|
-
|
|
243683
243695
|
// ../../node_modules/is-plain-obj/index.js
|
|
243684
243696
|
function isPlainObject2(value) {
|
|
243685
243697
|
if (typeof value !== "object" || value === null) {
|
|
@@ -250176,87 +250188,6 @@ var {
|
|
|
250176
250188
|
getCancelSignal: getCancelSignal2
|
|
250177
250189
|
} = getIpcExport();
|
|
250178
250190
|
|
|
250179
|
-
// src/cli/utils/skill-version-check.ts
|
|
250180
|
-
var import_front_matter2 = __toESM(require_front_matter(), 1);
|
|
250181
|
-
var SourcePackageSchema = exports_external.object({
|
|
250182
|
-
name: exports_external.string(),
|
|
250183
|
-
version: exports_external.string()
|
|
250184
|
-
});
|
|
250185
|
-
var SkillFrontmatterSchema = exports_external.object({
|
|
250186
|
-
metadata: exports_external.object({
|
|
250187
|
-
sourcePackage: SourcePackageSchema
|
|
250188
|
-
})
|
|
250189
|
-
});
|
|
250190
|
-
var InstalledSkillSchema = exports_external.object({
|
|
250191
|
-
name: exports_external.string(),
|
|
250192
|
-
path: exports_external.string()
|
|
250193
|
-
});
|
|
250194
|
-
var InstalledSkillsSchema = exports_external.array(InstalledSkillSchema);
|
|
250195
|
-
async function listInstalledSkills(cwd) {
|
|
250196
|
-
const { stdout } = await execa("npx", ["-y", "skills", "list", "--json"], {
|
|
250197
|
-
cwd,
|
|
250198
|
-
timeout: 3000,
|
|
250199
|
-
env: { ...process.env, CI: "1" }
|
|
250200
|
-
});
|
|
250201
|
-
const jsonStart = stdout.indexOf("[");
|
|
250202
|
-
if (jsonStart === -1)
|
|
250203
|
-
return [];
|
|
250204
|
-
const parsed = JSON.parse(stdout.slice(jsonStart));
|
|
250205
|
-
return InstalledSkillsSchema.parse(parsed);
|
|
250206
|
-
}
|
|
250207
|
-
async function readSkillFrontmatter(skillPath) {
|
|
250208
|
-
try {
|
|
250209
|
-
const content = await readTextFile(join12(skillPath, "SKILL.md"));
|
|
250210
|
-
const { attributes } = import_front_matter2.default(content);
|
|
250211
|
-
const result = SkillFrontmatterSchema.safeParse(attributes);
|
|
250212
|
-
return result.success ? result.data : null;
|
|
250213
|
-
} catch {
|
|
250214
|
-
return null;
|
|
250215
|
-
}
|
|
250216
|
-
}
|
|
250217
|
-
async function checkSkillVersions(projectRoot) {
|
|
250218
|
-
const skills = await listInstalledSkills(projectRoot);
|
|
250219
|
-
const results = await Promise.all(skills.map(async (skill) => {
|
|
250220
|
-
const fm = await readSkillFrontmatter(skill.path);
|
|
250221
|
-
if (!fm)
|
|
250222
|
-
return null;
|
|
250223
|
-
if (fm.metadata.sourcePackage.name !== package_default.name)
|
|
250224
|
-
return null;
|
|
250225
|
-
if (fm.metadata.sourcePackage.version === package_default.version)
|
|
250226
|
-
return null;
|
|
250227
|
-
return {
|
|
250228
|
-
skillName: skill.name,
|
|
250229
|
-
installedVersion: fm.metadata.sourcePackage.version,
|
|
250230
|
-
currentVersion: package_default.version
|
|
250231
|
-
};
|
|
250232
|
-
}));
|
|
250233
|
-
return results.filter((r) => r !== null);
|
|
250234
|
-
}
|
|
250235
|
-
function startSkillVersionCheck(projectRoot) {
|
|
250236
|
-
return checkSkillVersions(projectRoot).catch(() => null);
|
|
250237
|
-
}
|
|
250238
|
-
function formatSkillWarning(staleSkills) {
|
|
250239
|
-
const { shinyOrange } = theme.colors;
|
|
250240
|
-
const { bold: bold2 } = theme.styles;
|
|
250241
|
-
const lines = staleSkills.map((s) => shinyOrange(`Skill "${s.skillName}" was built for v${s.installedVersion}, current CLI is v${bold2(s.currentVersion)}`));
|
|
250242
|
-
lines.push(shinyOrange("Run: base44 agent-skills update"));
|
|
250243
|
-
return lines.join(`
|
|
250244
|
-
`);
|
|
250245
|
-
}
|
|
250246
|
-
function formatPlainSkillWarning(staleSkills) {
|
|
250247
|
-
const lines = staleSkills.map((s) => `Skill "${s.skillName}" was built for v${s.installedVersion}, current CLI is v${s.currentVersion}.`);
|
|
250248
|
-
lines.push("Run: base44 agent-skills update");
|
|
250249
|
-
return lines.join(" ");
|
|
250250
|
-
}
|
|
250251
|
-
async function printSkillVersionWarning(promise2) {
|
|
250252
|
-
try {
|
|
250253
|
-
const staleSkills = await promise2;
|
|
250254
|
-
if (staleSkills && staleSkills.length > 0) {
|
|
250255
|
-
Ve(formatSkillWarning(staleSkills));
|
|
250256
|
-
}
|
|
250257
|
-
} catch {}
|
|
250258
|
-
}
|
|
250259
|
-
|
|
250260
250191
|
// src/cli/utils/version-check.ts
|
|
250261
250192
|
async function checkForUpgrade() {
|
|
250262
250193
|
const testLatestVersion = getTestOverrides()?.latestVersion;
|
|
@@ -250343,9 +250274,8 @@ async function showCommandStart(fullBanner) {
|
|
|
250343
250274
|
We(theme.colors.base44OrangeBackground(" Base 44 "));
|
|
250344
250275
|
}
|
|
250345
250276
|
}
|
|
250346
|
-
async function showCommandEnd(result,
|
|
250347
|
-
await printUpgradeNotification(
|
|
250348
|
-
await printSkillVersionWarning(options.skillCheck);
|
|
250277
|
+
async function showCommandEnd(result, upgradeCheckPromise, distribution) {
|
|
250278
|
+
await printUpgradeNotification(upgradeCheckPromise, distribution);
|
|
250349
250279
|
Le(result.outroMessage || "");
|
|
250350
250280
|
if (result.stdout) {
|
|
250351
250281
|
process.stdout.write(result.stdout);
|
|
@@ -250418,22 +250348,16 @@ class Base44Command extends Command {
|
|
|
250418
250348
|
await showCommandStart(this._commandOptions.fullBanner);
|
|
250419
250349
|
}
|
|
250420
250350
|
const upgradeCheckPromise = startUpgradeCheck();
|
|
250421
|
-
let skillCheckPromise = Promise.resolve(null);
|
|
250422
250351
|
try {
|
|
250423
250352
|
if (this._commandOptions.requireAuth) {
|
|
250424
250353
|
await ensureAuth(this.context);
|
|
250425
250354
|
}
|
|
250426
250355
|
if (this._commandOptions.requireAppConfig) {
|
|
250427
250356
|
await ensureAppConfig(this.context);
|
|
250428
|
-
skillCheckPromise = startSkillVersionCheck(getAppConfig().projectRoot);
|
|
250429
250357
|
}
|
|
250430
250358
|
const result = await fn(this.context, ...args) ?? {};
|
|
250431
250359
|
if (!quiet) {
|
|
250432
|
-
await showCommandEnd(result,
|
|
250433
|
-
upgradeCheck: upgradeCheckPromise,
|
|
250434
|
-
skillCheck: skillCheckPromise,
|
|
250435
|
-
distribution: this.context.distribution
|
|
250436
|
-
});
|
|
250360
|
+
await showCommandEnd(result, upgradeCheckPromise, this.context.distribution);
|
|
250437
250361
|
} else {
|
|
250438
250362
|
if (result.outroMessage) {
|
|
250439
250363
|
process.stdout.write(`${result.outroMessage}
|
|
@@ -250445,11 +250369,6 @@ class Base44Command extends Command {
|
|
|
250445
250369
|
const upgradeInfo = await upgradeCheckPromise;
|
|
250446
250370
|
if (upgradeInfo) {
|
|
250447
250371
|
process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
|
|
250448
|
-
`);
|
|
250449
|
-
}
|
|
250450
|
-
const staleSkills = await skillCheckPromise;
|
|
250451
|
-
if (staleSkills && staleSkills.length > 0) {
|
|
250452
|
-
process.stderr.write(`${formatPlainSkillWarning(staleSkills)}
|
|
250453
250372
|
`);
|
|
250454
250373
|
}
|
|
250455
250374
|
}
|
|
@@ -250649,7 +250568,7 @@ async function pullAgentsAction({
|
|
|
250649
250568
|
}) {
|
|
250650
250569
|
const { project: project2 } = await readProjectConfig();
|
|
250651
250570
|
const configDir = dirname7(project2.configPath);
|
|
250652
|
-
const agentsDir =
|
|
250571
|
+
const agentsDir = join12(configDir, project2.agentsDir);
|
|
250653
250572
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
250654
250573
|
return await fetchAgents();
|
|
250655
250574
|
}, {
|
|
@@ -250712,7 +250631,7 @@ function getAgentsCommand() {
|
|
|
250712
250631
|
}
|
|
250713
250632
|
|
|
250714
250633
|
// src/cli/commands/auth/password-login.ts
|
|
250715
|
-
import { dirname as dirname8, join as
|
|
250634
|
+
import { dirname as dirname8, join as join13 } from "node:path";
|
|
250716
250635
|
function validateAction(action) {
|
|
250717
250636
|
if (action !== "enable" && action !== "disable") {
|
|
250718
250637
|
throw new InvalidInputError(`Invalid action "${action}". Must be "enable" or "disable".`, {
|
|
@@ -250734,7 +250653,7 @@ async function passwordLoginAction({ log }, action) {
|
|
|
250734
250653
|
const shouldEnable = action === "enable";
|
|
250735
250654
|
const { project: project2 } = await readProjectConfig();
|
|
250736
250655
|
const configDir = dirname8(project2.configPath);
|
|
250737
|
-
const authDir =
|
|
250656
|
+
const authDir = join13(configDir, project2.authDir);
|
|
250738
250657
|
const updated = await runTask("Updating local auth config", async () => {
|
|
250739
250658
|
const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
|
|
250740
250659
|
const merged = { ...current, enableUsernamePassword: shouldEnable };
|
|
@@ -250754,11 +250673,11 @@ function getPasswordLoginCommand() {
|
|
|
250754
250673
|
}
|
|
250755
250674
|
|
|
250756
250675
|
// src/cli/commands/auth/pull.ts
|
|
250757
|
-
import { dirname as dirname9, join as
|
|
250676
|
+
import { dirname as dirname9, join as join14 } from "node:path";
|
|
250758
250677
|
async function pullAuthAction({ log }) {
|
|
250759
250678
|
const { project: project2 } = await readProjectConfig();
|
|
250760
250679
|
const configDir = dirname9(project2.configPath);
|
|
250761
|
-
const authDir =
|
|
250680
|
+
const authDir = join14(configDir, project2.authDir);
|
|
250762
250681
|
const remoteConfig = await runTask("Fetching auth config from Base44", async () => {
|
|
250763
250682
|
return await pullAuthConfig();
|
|
250764
250683
|
}, {
|
|
@@ -250884,13 +250803,13 @@ function getConnectorsListAvailableCommand() {
|
|
|
250884
250803
|
}
|
|
250885
250804
|
|
|
250886
250805
|
// src/cli/commands/connectors/pull.ts
|
|
250887
|
-
import { dirname as dirname10, join as
|
|
250806
|
+
import { dirname as dirname10, join as join15 } from "node:path";
|
|
250888
250807
|
async function pullConnectorsAction({
|
|
250889
250808
|
log
|
|
250890
250809
|
}) {
|
|
250891
250810
|
const { project: project2 } = await readProjectConfig();
|
|
250892
250811
|
const configDir = dirname10(project2.configPath);
|
|
250893
|
-
const connectorsDir =
|
|
250812
|
+
const connectorsDir = join15(configDir, project2.connectorsDir);
|
|
250894
250813
|
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
250895
250814
|
return await pullAllConnectors();
|
|
250896
250815
|
}, {
|
|
@@ -251942,11 +251861,11 @@ function getListCommand() {
|
|
|
251942
251861
|
}
|
|
251943
251862
|
|
|
251944
251863
|
// src/cli/commands/functions/pull.ts
|
|
251945
|
-
import { dirname as dirname11, join as
|
|
251864
|
+
import { dirname as dirname11, join as join16 } from "node:path";
|
|
251946
251865
|
async function pullFunctionsAction({ log }, name2) {
|
|
251947
251866
|
const { project: project2 } = await readProjectConfig();
|
|
251948
251867
|
const configDir = dirname11(project2.configPath);
|
|
251949
|
-
const functionsDir =
|
|
251868
|
+
const functionsDir = join16(configDir, project2.functionsDir);
|
|
251950
251869
|
const remoteFunctions = await runTask("Fetching functions from Base44", async () => {
|
|
251951
251870
|
const { functions } = await listDeployedFunctions();
|
|
251952
251871
|
return functions;
|
|
@@ -251989,39 +251908,8 @@ function getFunctionsCommand() {
|
|
|
251989
251908
|
}
|
|
251990
251909
|
|
|
251991
251910
|
// src/cli/commands/project/create.ts
|
|
251992
|
-
import { basename as basename3, join as
|
|
251911
|
+
import { basename as basename3, join as join17, resolve as resolve2 } from "node:path";
|
|
251993
251912
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
251994
|
-
|
|
251995
|
-
// src/cli/commands/skills/update.ts
|
|
251996
|
-
var SKILLS_REPO = "base44/skills";
|
|
251997
|
-
async function installAllSkills(cwd) {
|
|
251998
|
-
await execa("npx", ["-y", "skills", "add", SKILLS_REPO, "--all", "-y"], {
|
|
251999
|
-
cwd
|
|
252000
|
-
});
|
|
252001
|
-
}
|
|
252002
|
-
async function updateAction(_ctx) {
|
|
252003
|
-
const projectRoot = await findProjectRoot();
|
|
252004
|
-
if (!projectRoot) {
|
|
252005
|
-
return {
|
|
252006
|
-
outroMessage: "Not in a Base44 project. Run this command from a project directory."
|
|
252007
|
-
};
|
|
252008
|
-
}
|
|
252009
|
-
await runTask("Updating agent skills...", async () => {
|
|
252010
|
-
await installAllSkills(projectRoot.root);
|
|
252011
|
-
}, {
|
|
252012
|
-
successMessage: theme.colors.base44Orange("Agent skills updated successfully"),
|
|
252013
|
-
errorMessage: "Failed to update agent skills"
|
|
252014
|
-
});
|
|
252015
|
-
return { outroMessage: "Agent skills are up to date" };
|
|
252016
|
-
}
|
|
252017
|
-
function getSkillsUpdateCommand() {
|
|
252018
|
-
return new Base44Command("update", {
|
|
252019
|
-
requireAuth: false,
|
|
252020
|
-
requireAppConfig: false
|
|
252021
|
-
}).description("Update locally installed agent skills to the latest version").action(updateAction);
|
|
252022
|
-
}
|
|
252023
|
-
|
|
252024
|
-
// src/cli/commands/project/create.ts
|
|
252025
251913
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
252026
251914
|
async function getTemplateById(templateId) {
|
|
252027
251915
|
const templates = await listTemplates();
|
|
@@ -252157,7 +252045,7 @@ async function executeCreate({
|
|
|
252157
252045
|
updateMessage("Building project...");
|
|
252158
252046
|
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
252159
252047
|
updateMessage("Deploying site...");
|
|
252160
|
-
return await deploySite(
|
|
252048
|
+
return await deploySite(join17(resolvedPath, outputDirectory));
|
|
252161
252049
|
}, {
|
|
252162
252050
|
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
252163
252051
|
errorMessage: "Failed to deploy site"
|
|
@@ -252169,10 +252057,13 @@ async function executeCreate({
|
|
|
252169
252057
|
if (shouldAddSkills) {
|
|
252170
252058
|
try {
|
|
252171
252059
|
await runTask("Installing AI agent skills...", async () => {
|
|
252172
|
-
await
|
|
252060
|
+
await execa("npx", ["-y", "skills", "add", "base44/skills", "-y"], {
|
|
252061
|
+
cwd: resolvedPath,
|
|
252062
|
+
shell: true
|
|
252063
|
+
});
|
|
252173
252064
|
}, {
|
|
252174
252065
|
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
252175
|
-
errorMessage: "Failed to add agent skills - you can add them later with:
|
|
252066
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx skills add base44/skills"
|
|
252176
252067
|
});
|
|
252177
252068
|
} catch {}
|
|
252178
252069
|
}
|
|
@@ -252732,11 +252623,6 @@ function getSiteCommand() {
|
|
|
252732
252623
|
return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteOpenCommand());
|
|
252733
252624
|
}
|
|
252734
252625
|
|
|
252735
|
-
// src/cli/commands/skills/index.ts
|
|
252736
|
-
function getAgentSkillsCommand() {
|
|
252737
|
-
return new Command("agent-skills").description("Manage locally installed agent skills").addCommand(getSkillsUpdateCommand());
|
|
252738
|
-
}
|
|
252739
|
-
|
|
252740
252626
|
// src/core/types/generator.ts
|
|
252741
252627
|
var import_common_tags = __toESM(require_lib2(), 1);
|
|
252742
252628
|
var import_json_schema_to_typescript = __toESM(require_src3(), 1);
|
|
@@ -252823,10 +252709,10 @@ function toPascalCase(name2) {
|
|
|
252823
252709
|
return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
|
|
252824
252710
|
}
|
|
252825
252711
|
// src/core/types/update-project.ts
|
|
252826
|
-
import { join as
|
|
252712
|
+
import { join as join20 } from "node:path";
|
|
252827
252713
|
var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
|
|
252828
252714
|
async function updateProjectConfig(projectRoot) {
|
|
252829
|
-
const tsconfigPath =
|
|
252715
|
+
const tsconfigPath = join20(projectRoot, "tsconfig.json");
|
|
252830
252716
|
if (!await pathExists(tsconfigPath)) {
|
|
252831
252717
|
return false;
|
|
252832
252718
|
}
|
|
@@ -252869,7 +252755,7 @@ function getTypesCommand() {
|
|
|
252869
252755
|
// src/cli/dev/dev-server/main.ts
|
|
252870
252756
|
var import_cors = __toESM(require_lib4(), 1);
|
|
252871
252757
|
var import_express5 = __toESM(require_express(), 1);
|
|
252872
|
-
import { dirname as dirname16, join as
|
|
252758
|
+
import { dirname as dirname16, join as join23 } from "node:path";
|
|
252873
252759
|
|
|
252874
252760
|
// ../../node_modules/get-port/index.js
|
|
252875
252761
|
import net from "node:net";
|
|
@@ -255732,8 +255618,8 @@ async function createDevServer(options8) {
|
|
|
255732
255618
|
broadcastEntityEvent(io6, appId, entityName, event);
|
|
255733
255619
|
};
|
|
255734
255620
|
const base44ConfigWatcher = new WatchBase44({
|
|
255735
|
-
functions:
|
|
255736
|
-
entities:
|
|
255621
|
+
functions: join23(dirname16(project2.configPath), project2.functionsDir),
|
|
255622
|
+
entities: join23(dirname16(project2.configPath), project2.entitiesDir)
|
|
255737
255623
|
}, devLogger);
|
|
255738
255624
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
255739
255625
|
try {
|
|
@@ -256007,7 +255893,6 @@ function createProgram(context) {
|
|
|
256007
255893
|
program2.addCommand(getConnectorsCommand());
|
|
256008
255894
|
program2.addCommand(getFunctionsCommand());
|
|
256009
255895
|
program2.addCommand(getSecretsCommand());
|
|
256010
|
-
program2.addCommand(getAgentSkillsCommand());
|
|
256011
255896
|
program2.addCommand(getAuthCommand());
|
|
256012
255897
|
program2.addCommand(getSiteCommand());
|
|
256013
255898
|
program2.addCommand(getTypesCommand());
|
|
@@ -260222,7 +260107,7 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
|
|
|
260222
260107
|
// src/cli/index.ts
|
|
260223
260108
|
var __dirname4 = dirname18(fileURLToPath6(import.meta.url));
|
|
260224
260109
|
async function runCLI(options8) {
|
|
260225
|
-
ensureNpmAssets(
|
|
260110
|
+
ensureNpmAssets(join24(__dirname4, "../assets"));
|
|
260226
260111
|
const errorReporter = new ErrorReporter;
|
|
260227
260112
|
errorReporter.registerProcessErrorHandlers();
|
|
260228
260113
|
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
@@ -260257,4 +260142,4 @@ export {
|
|
|
260257
260142
|
CLIExitError
|
|
260258
260143
|
};
|
|
260259
260144
|
|
|
260260
|
-
//# debugId=
|
|
260145
|
+
//# debugId=DCFE80A2CD93B81E64756E2164756E21
|