@base44-preview/cli 0.0.50-pr.452.1245eb5 → 0.0.50-pr.471.086f7c9
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 +63 -187
- package/dist/cli/index.js.map +10 -13
- 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 normalize2 = 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 = normalize2(
|
|
164339
|
+
path19 = normalize2(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`;
|
|
@@ -242594,11 +242594,27 @@ var EntityAutomationSchema = AutomationBaseSchema.extend({
|
|
|
242594
242594
|
entity_name: exports_external.string().min(1, "Entity name cannot be empty"),
|
|
242595
242595
|
event_types: exports_external.array(exports_external.enum(["create", "update", "delete"])).min(1, "At least one event type is required")
|
|
242596
242596
|
});
|
|
242597
|
+
var TriggerConditionSchema = exports_external.object({
|
|
242598
|
+
field: exports_external.string().min(1),
|
|
242599
|
+
operator: exports_external.string().min(1),
|
|
242600
|
+
value: exports_external.unknown()
|
|
242601
|
+
});
|
|
242602
|
+
var TriggerConditionsSchema = exports_external.object({
|
|
242603
|
+
conditions: exports_external.array(TriggerConditionSchema).min(1)
|
|
242604
|
+
});
|
|
242605
|
+
var ConnectorAutomationSchema = AutomationBaseSchema.extend({
|
|
242606
|
+
type: exports_external.literal("connector"),
|
|
242607
|
+
integration_type: exports_external.string().min(1, "Integration type cannot be empty"),
|
|
242608
|
+
events: exports_external.array(exports_external.string()).min(1, "At least one event is required"),
|
|
242609
|
+
resource_id: exports_external.string().nullable().optional(),
|
|
242610
|
+
trigger_conditions: TriggerConditionsSchema.nullable().optional()
|
|
242611
|
+
});
|
|
242597
242612
|
var AutomationSchema = exports_external.union([
|
|
242598
242613
|
ScheduledOneTimeSchema,
|
|
242599
242614
|
ScheduledCronSchema,
|
|
242600
242615
|
ScheduledSimpleSchema,
|
|
242601
|
-
EntityAutomationSchema
|
|
242616
|
+
EntityAutomationSchema,
|
|
242617
|
+
ConnectorAutomationSchema
|
|
242602
242618
|
]);
|
|
242603
242619
|
var FunctionConfigSchema = exports_external.object({
|
|
242604
242620
|
name: FunctionNameSchema,
|
|
@@ -243695,9 +243711,6 @@ async function ensureAppConfig(ctx) {
|
|
|
243695
243711
|
ctx.errorReporter.setContext({ appId: appConfig.id });
|
|
243696
243712
|
}
|
|
243697
243713
|
|
|
243698
|
-
// src/cli/utils/command/skill-version-check.ts
|
|
243699
|
-
import { join as join12 } from "node:path";
|
|
243700
|
-
|
|
243701
243714
|
// ../../node_modules/is-plain-obj/index.js
|
|
243702
243715
|
function isPlainObject2(value) {
|
|
243703
243716
|
if (typeof value !== "object" || value === null) {
|
|
@@ -250194,88 +250207,7 @@ var {
|
|
|
250194
250207
|
getCancelSignal: getCancelSignal2
|
|
250195
250208
|
} = getIpcExport();
|
|
250196
250209
|
|
|
250197
|
-
// src/cli/utils/
|
|
250198
|
-
var import_front_matter2 = __toESM(require_front_matter(), 1);
|
|
250199
|
-
var SourcePackageSchema = exports_external.object({
|
|
250200
|
-
name: exports_external.string(),
|
|
250201
|
-
version: exports_external.string()
|
|
250202
|
-
});
|
|
250203
|
-
var SkillFrontmatterSchema = exports_external.object({
|
|
250204
|
-
metadata: exports_external.object({
|
|
250205
|
-
sourcePackage: SourcePackageSchema
|
|
250206
|
-
})
|
|
250207
|
-
});
|
|
250208
|
-
var InstalledSkillSchema = exports_external.object({
|
|
250209
|
-
name: exports_external.string(),
|
|
250210
|
-
path: exports_external.string()
|
|
250211
|
-
});
|
|
250212
|
-
var InstalledSkillsSchema = exports_external.array(InstalledSkillSchema);
|
|
250213
|
-
async function listInstalledSkills(cwd) {
|
|
250214
|
-
const { stdout } = await execa("npx", ["-y", "skills", "list", "--json"], {
|
|
250215
|
-
cwd,
|
|
250216
|
-
timeout: 3000,
|
|
250217
|
-
env: { ...process.env, CI: "1" }
|
|
250218
|
-
});
|
|
250219
|
-
const jsonStart = stdout.indexOf("[");
|
|
250220
|
-
if (jsonStart === -1)
|
|
250221
|
-
return [];
|
|
250222
|
-
const parsed = JSON.parse(stdout.slice(jsonStart));
|
|
250223
|
-
return InstalledSkillsSchema.parse(parsed);
|
|
250224
|
-
}
|
|
250225
|
-
async function readSkillFrontmatter(skillPath) {
|
|
250226
|
-
try {
|
|
250227
|
-
const content = await readTextFile(join12(skillPath, "SKILL.md"));
|
|
250228
|
-
const { attributes } = import_front_matter2.default(content);
|
|
250229
|
-
const result = SkillFrontmatterSchema.safeParse(attributes);
|
|
250230
|
-
return result.success ? result.data : null;
|
|
250231
|
-
} catch {
|
|
250232
|
-
return null;
|
|
250233
|
-
}
|
|
250234
|
-
}
|
|
250235
|
-
async function checkSkillVersions(projectRoot) {
|
|
250236
|
-
const skills = await listInstalledSkills(projectRoot);
|
|
250237
|
-
const results = await Promise.all(skills.map(async (skill) => {
|
|
250238
|
-
const fm = await readSkillFrontmatter(skill.path);
|
|
250239
|
-
if (!fm)
|
|
250240
|
-
return null;
|
|
250241
|
-
if (fm.metadata.sourcePackage.name !== package_default.name)
|
|
250242
|
-
return null;
|
|
250243
|
-
if (fm.metadata.sourcePackage.version === package_default.version)
|
|
250244
|
-
return null;
|
|
250245
|
-
return {
|
|
250246
|
-
skillName: skill.name,
|
|
250247
|
-
installedVersion: fm.metadata.sourcePackage.version,
|
|
250248
|
-
currentVersion: package_default.version
|
|
250249
|
-
};
|
|
250250
|
-
}));
|
|
250251
|
-
return results.filter((r) => r !== null);
|
|
250252
|
-
}
|
|
250253
|
-
function startSkillVersionCheck(projectRoot) {
|
|
250254
|
-
return checkSkillVersions(projectRoot);
|
|
250255
|
-
}
|
|
250256
|
-
function formatSkillWarning(staleSkills) {
|
|
250257
|
-
const { shinyOrange } = theme.colors;
|
|
250258
|
-
const { bold: bold2 } = theme.styles;
|
|
250259
|
-
const lines = staleSkills.map((s) => shinyOrange(`Skill "${s.skillName}" was built for v${s.installedVersion}, current CLI is v${bold2(s.currentVersion)}`));
|
|
250260
|
-
lines.push(shinyOrange("Run: base44 agent-skills update"));
|
|
250261
|
-
return lines.join(`
|
|
250262
|
-
`);
|
|
250263
|
-
}
|
|
250264
|
-
function formatPlainSkillWarning(staleSkills) {
|
|
250265
|
-
const lines = staleSkills.map((s) => `Skill "${s.skillName}" was built for v${s.installedVersion}, current CLI is v${s.currentVersion}.`);
|
|
250266
|
-
lines.push("Run: base44 agent-skills update");
|
|
250267
|
-
return lines.join(" ");
|
|
250268
|
-
}
|
|
250269
|
-
async function printSkillVersionWarning(promise2) {
|
|
250270
|
-
try {
|
|
250271
|
-
const staleSkills = await promise2;
|
|
250272
|
-
if (staleSkills && staleSkills.length > 0) {
|
|
250273
|
-
Ve(formatSkillWarning(staleSkills));
|
|
250274
|
-
}
|
|
250275
|
-
} catch {}
|
|
250276
|
-
}
|
|
250277
|
-
|
|
250278
|
-
// src/cli/utils/command/version-check.ts
|
|
250210
|
+
// src/cli/utils/version-check.ts
|
|
250279
250211
|
async function checkForUpgrade() {
|
|
250280
250212
|
const testLatestVersion = getTestOverrides()?.latestVersion;
|
|
250281
250213
|
if (testLatestVersion !== undefined) {
|
|
@@ -250305,7 +250237,7 @@ async function checkForUpgrade() {
|
|
|
250305
250237
|
}
|
|
250306
250238
|
}
|
|
250307
250239
|
|
|
250308
|
-
// src/cli/utils/
|
|
250240
|
+
// src/cli/utils/upgradeNotification.ts
|
|
250309
250241
|
function detectInstallMethod(distribution) {
|
|
250310
250242
|
if (distribution !== "binary") {
|
|
250311
250243
|
return "npm";
|
|
@@ -250361,11 +250293,8 @@ async function showCommandStart(fullBanner) {
|
|
|
250361
250293
|
We(theme.colors.base44OrangeBackground(" Base 44 "));
|
|
250362
250294
|
}
|
|
250363
250295
|
}
|
|
250364
|
-
async function showCommandEnd(result,
|
|
250365
|
-
await
|
|
250366
|
-
printUpgradeNotification(options.upgradeCheck, options.distribution),
|
|
250367
|
-
printSkillVersionWarning(options.skillCheck)
|
|
250368
|
-
]);
|
|
250296
|
+
async function showCommandEnd(result, upgradeCheckPromise, distribution) {
|
|
250297
|
+
await printUpgradeNotification(upgradeCheckPromise, distribution);
|
|
250369
250298
|
Le(result.outroMessage || "");
|
|
250370
250299
|
if (result.stdout) {
|
|
250371
250300
|
process.stdout.write(result.stdout);
|
|
@@ -250438,26 +250367,16 @@ class Base44Command extends Command {
|
|
|
250438
250367
|
await showCommandStart(this._commandOptions.fullBanner);
|
|
250439
250368
|
}
|
|
250440
250369
|
const upgradeCheckPromise = startUpgradeCheck();
|
|
250441
|
-
let skillCheckPromise = Promise.resolve(null);
|
|
250442
250370
|
try {
|
|
250443
250371
|
if (this._commandOptions.requireAuth) {
|
|
250444
250372
|
await ensureAuth(this.context);
|
|
250445
250373
|
}
|
|
250446
250374
|
if (this._commandOptions.requireAppConfig) {
|
|
250447
250375
|
await ensureAppConfig(this.context);
|
|
250448
|
-
const errorReporter = this.context.errorReporter;
|
|
250449
|
-
skillCheckPromise = startSkillVersionCheck(getAppConfig().projectRoot).catch((error48) => {
|
|
250450
|
-
errorReporter.captureException(error48 instanceof Error ? error48 : new Error(String(error48)));
|
|
250451
|
-
return null;
|
|
250452
|
-
});
|
|
250453
250376
|
}
|
|
250454
250377
|
const result = await fn(this.context, ...args) ?? {};
|
|
250455
250378
|
if (!quiet) {
|
|
250456
|
-
await showCommandEnd(result,
|
|
250457
|
-
upgradeCheck: upgradeCheckPromise,
|
|
250458
|
-
skillCheck: skillCheckPromise,
|
|
250459
|
-
distribution: this.context.distribution
|
|
250460
|
-
});
|
|
250379
|
+
await showCommandEnd(result, upgradeCheckPromise, this.context.distribution);
|
|
250461
250380
|
} else {
|
|
250462
250381
|
if (result.outroMessage) {
|
|
250463
250382
|
process.stdout.write(`${result.outroMessage}
|
|
@@ -250466,16 +250385,9 @@ class Base44Command extends Command {
|
|
|
250466
250385
|
if (result.stdout) {
|
|
250467
250386
|
process.stdout.write(result.stdout);
|
|
250468
250387
|
}
|
|
250469
|
-
const
|
|
250470
|
-
upgradeCheckPromise,
|
|
250471
|
-
skillCheckPromise
|
|
250472
|
-
]);
|
|
250388
|
+
const upgradeInfo = await upgradeCheckPromise;
|
|
250473
250389
|
if (upgradeInfo) {
|
|
250474
250390
|
process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
|
|
250475
|
-
`);
|
|
250476
|
-
}
|
|
250477
|
-
if (staleSkills && staleSkills.length > 0) {
|
|
250478
|
-
process.stderr.write(`${formatPlainSkillWarning(staleSkills)}
|
|
250479
250391
|
`);
|
|
250480
250392
|
}
|
|
250481
250393
|
}
|
|
@@ -250662,7 +250574,7 @@ async function pullAgentsAction({
|
|
|
250662
250574
|
}) {
|
|
250663
250575
|
const { project: project2 } = await readProjectConfig();
|
|
250664
250576
|
const configDir = dirname7(project2.configPath);
|
|
250665
|
-
const agentsDir =
|
|
250577
|
+
const agentsDir = join12(configDir, project2.agentsDir);
|
|
250666
250578
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
250667
250579
|
return await fetchAgents();
|
|
250668
250580
|
}, {
|
|
@@ -250726,7 +250638,7 @@ function getAgentsCommand() {
|
|
|
250726
250638
|
}
|
|
250727
250639
|
|
|
250728
250640
|
// src/cli/commands/auth/password-login.ts
|
|
250729
|
-
import { dirname as dirname8, join as
|
|
250641
|
+
import { dirname as dirname8, join as join13 } from "node:path";
|
|
250730
250642
|
function validateAction(action) {
|
|
250731
250643
|
if (action !== "enable" && action !== "disable") {
|
|
250732
250644
|
throw new InvalidInputError(`Invalid action "${action}". Must be "enable" or "disable".`, {
|
|
@@ -250748,7 +250660,7 @@ async function passwordLoginAction({ log, runTask }, action) {
|
|
|
250748
250660
|
const shouldEnable = action === "enable";
|
|
250749
250661
|
const { project: project2 } = await readProjectConfig();
|
|
250750
250662
|
const configDir = dirname8(project2.configPath);
|
|
250751
|
-
const authDir =
|
|
250663
|
+
const authDir = join13(configDir, project2.authDir);
|
|
250752
250664
|
const updated = await runTask("Updating local auth config", async () => {
|
|
250753
250665
|
const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
|
|
250754
250666
|
const merged = { ...current, enableUsernamePassword: shouldEnable };
|
|
@@ -250768,14 +250680,14 @@ function getPasswordLoginCommand() {
|
|
|
250768
250680
|
}
|
|
250769
250681
|
|
|
250770
250682
|
// src/cli/commands/auth/pull.ts
|
|
250771
|
-
import { dirname as dirname9, join as
|
|
250683
|
+
import { dirname as dirname9, join as join14 } from "node:path";
|
|
250772
250684
|
async function pullAuthAction({
|
|
250773
250685
|
log,
|
|
250774
250686
|
runTask
|
|
250775
250687
|
}) {
|
|
250776
250688
|
const { project: project2 } = await readProjectConfig();
|
|
250777
250689
|
const configDir = dirname9(project2.configPath);
|
|
250778
|
-
const authDir =
|
|
250690
|
+
const authDir = join14(configDir, project2.authDir);
|
|
250779
250691
|
const remoteConfig = await runTask("Fetching auth config from Base44", async () => {
|
|
250780
250692
|
return await pullAuthConfig();
|
|
250781
250693
|
}, {
|
|
@@ -250902,14 +250814,14 @@ function getConnectorsListAvailableCommand() {
|
|
|
250902
250814
|
}
|
|
250903
250815
|
|
|
250904
250816
|
// src/cli/commands/connectors/pull.ts
|
|
250905
|
-
import { dirname as dirname10, join as
|
|
250817
|
+
import { dirname as dirname10, join as join15 } from "node:path";
|
|
250906
250818
|
async function pullConnectorsAction({
|
|
250907
250819
|
log,
|
|
250908
250820
|
runTask
|
|
250909
250821
|
}) {
|
|
250910
250822
|
const { project: project2 } = await readProjectConfig();
|
|
250911
250823
|
const configDir = dirname10(project2.configPath);
|
|
250912
|
-
const connectorsDir =
|
|
250824
|
+
const connectorsDir = join15(configDir, project2.connectorsDir);
|
|
250913
250825
|
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
250914
250826
|
return await pullAllConnectors();
|
|
250915
250827
|
}, {
|
|
@@ -251964,11 +251876,11 @@ function getListCommand() {
|
|
|
251964
251876
|
}
|
|
251965
251877
|
|
|
251966
251878
|
// src/cli/commands/functions/pull.ts
|
|
251967
|
-
import { dirname as dirname11, join as
|
|
251879
|
+
import { dirname as dirname11, join as join16 } from "node:path";
|
|
251968
251880
|
async function pullFunctionsAction({ log, runTask }, name2) {
|
|
251969
251881
|
const { project: project2 } = await readProjectConfig();
|
|
251970
251882
|
const configDir = dirname11(project2.configPath);
|
|
251971
|
-
const functionsDir =
|
|
251883
|
+
const functionsDir = join16(configDir, project2.functionsDir);
|
|
251972
251884
|
const remoteFunctions = await runTask("Fetching functions from Base44", async () => {
|
|
251973
251885
|
const { functions } = await listDeployedFunctions();
|
|
251974
251886
|
return functions;
|
|
@@ -252011,41 +251923,8 @@ function getFunctionsCommand() {
|
|
|
252011
251923
|
}
|
|
252012
251924
|
|
|
252013
251925
|
// src/cli/commands/project/create.ts
|
|
252014
|
-
import { basename as basename3, join as
|
|
251926
|
+
import { basename as basename3, join as join17, resolve as resolve2 } from "node:path";
|
|
252015
251927
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
252016
|
-
|
|
252017
|
-
// src/cli/commands/skills/update.ts
|
|
252018
|
-
var SKILLS_REPO = "base44/skills";
|
|
252019
|
-
async function installAllSkills(cwd) {
|
|
252020
|
-
await execa("npx", ["-y", "skills", "add", SKILLS_REPO, "--all", "-y"], {
|
|
252021
|
-
cwd
|
|
252022
|
-
});
|
|
252023
|
-
}
|
|
252024
|
-
async function updateAction({
|
|
252025
|
-
runTask
|
|
252026
|
-
}) {
|
|
252027
|
-
const projectRoot = await findProjectRoot();
|
|
252028
|
-
if (!projectRoot) {
|
|
252029
|
-
return {
|
|
252030
|
-
outroMessage: "Not in a Base44 project. Run this command from a project directory."
|
|
252031
|
-
};
|
|
252032
|
-
}
|
|
252033
|
-
await runTask("Updating agent skills...", async () => {
|
|
252034
|
-
await installAllSkills(projectRoot.root);
|
|
252035
|
-
}, {
|
|
252036
|
-
successMessage: theme.colors.base44Orange("Agent skills updated successfully"),
|
|
252037
|
-
errorMessage: "Failed to update agent skills"
|
|
252038
|
-
});
|
|
252039
|
-
return { outroMessage: "Agent skills are up to date" };
|
|
252040
|
-
}
|
|
252041
|
-
function getSkillsUpdateCommand() {
|
|
252042
|
-
return new Base44Command("update", {
|
|
252043
|
-
requireAuth: false,
|
|
252044
|
-
requireAppConfig: false
|
|
252045
|
-
}).description("Update locally installed agent skills to the latest version").action(updateAction);
|
|
252046
|
-
}
|
|
252047
|
-
|
|
252048
|
-
// src/cli/commands/project/create.ts
|
|
252049
251928
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
252050
251929
|
async function getTemplateById(templateId) {
|
|
252051
251930
|
const templates = await listTemplates();
|
|
@@ -252181,7 +252060,7 @@ async function executeCreate({
|
|
|
252181
252060
|
updateMessage("Building project...");
|
|
252182
252061
|
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
252183
252062
|
updateMessage("Deploying site...");
|
|
252184
|
-
return await deploySite(
|
|
252063
|
+
return await deploySite(join17(resolvedPath, outputDirectory));
|
|
252185
252064
|
}, {
|
|
252186
252065
|
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
252187
252066
|
errorMessage: "Failed to deploy site"
|
|
@@ -252193,10 +252072,13 @@ async function executeCreate({
|
|
|
252193
252072
|
if (shouldAddSkills) {
|
|
252194
252073
|
try {
|
|
252195
252074
|
await runTask("Installing AI agent skills...", async () => {
|
|
252196
|
-
await
|
|
252075
|
+
await execa("npx", ["-y", "skills", "add", "base44/skills", "-y"], {
|
|
252076
|
+
cwd: resolvedPath,
|
|
252077
|
+
shell: true
|
|
252078
|
+
});
|
|
252197
252079
|
}, {
|
|
252198
252080
|
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
252199
|
-
errorMessage: "Failed to add agent skills - you can add them later with:
|
|
252081
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx skills add base44/skills"
|
|
252200
252082
|
});
|
|
252201
252083
|
} catch {}
|
|
252202
252084
|
}
|
|
@@ -252758,11 +252640,6 @@ function getSiteCommand() {
|
|
|
252758
252640
|
return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteOpenCommand());
|
|
252759
252641
|
}
|
|
252760
252642
|
|
|
252761
|
-
// src/cli/commands/skills/index.ts
|
|
252762
|
-
function getAgentSkillsCommand() {
|
|
252763
|
-
return new Command("agent-skills").description("Manage locally installed agent skills").addCommand(getSkillsUpdateCommand());
|
|
252764
|
-
}
|
|
252765
|
-
|
|
252766
252643
|
// src/core/types/generator.ts
|
|
252767
252644
|
var import_common_tags = __toESM(require_lib2(), 1);
|
|
252768
252645
|
var import_json_schema_to_typescript = __toESM(require_src3(), 1);
|
|
@@ -252849,10 +252726,10 @@ function toPascalCase(name2) {
|
|
|
252849
252726
|
return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
|
|
252850
252727
|
}
|
|
252851
252728
|
// src/core/types/update-project.ts
|
|
252852
|
-
import { join as
|
|
252729
|
+
import { join as join20 } from "node:path";
|
|
252853
252730
|
var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
|
|
252854
252731
|
async function updateProjectConfig(projectRoot) {
|
|
252855
|
-
const tsconfigPath =
|
|
252732
|
+
const tsconfigPath = join20(projectRoot, "tsconfig.json");
|
|
252856
252733
|
if (!await pathExists(tsconfigPath)) {
|
|
252857
252734
|
return false;
|
|
252858
252735
|
}
|
|
@@ -252897,7 +252774,7 @@ function getTypesCommand() {
|
|
|
252897
252774
|
// src/cli/dev/dev-server/main.ts
|
|
252898
252775
|
var import_cors = __toESM(require_lib4(), 1);
|
|
252899
252776
|
var import_express5 = __toESM(require_express(), 1);
|
|
252900
|
-
import { dirname as dirname16, join as
|
|
252777
|
+
import { dirname as dirname16, join as join23 } from "node:path";
|
|
252901
252778
|
|
|
252902
252779
|
// ../../node_modules/get-port/index.js
|
|
252903
252780
|
import net from "node:net";
|
|
@@ -255775,8 +255652,8 @@ async function createDevServer(options8) {
|
|
|
255775
255652
|
broadcastEntityEvent(io6, appId, entityName, event);
|
|
255776
255653
|
};
|
|
255777
255654
|
const base44ConfigWatcher = new WatchBase44({
|
|
255778
|
-
functions:
|
|
255779
|
-
entities:
|
|
255655
|
+
functions: join23(dirname16(project2.configPath), project2.functionsDir),
|
|
255656
|
+
entities: join23(dirname16(project2.configPath), project2.entitiesDir)
|
|
255780
255657
|
}, devLogger);
|
|
255781
255658
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
255782
255659
|
try {
|
|
@@ -256050,7 +255927,6 @@ function createProgram(context) {
|
|
|
256050
255927
|
program2.addCommand(getConnectorsCommand());
|
|
256051
255928
|
program2.addCommand(getFunctionsCommand());
|
|
256052
255929
|
program2.addCommand(getSecretsCommand());
|
|
256053
|
-
program2.addCommand(getAgentSkillsCommand());
|
|
256054
255930
|
program2.addCommand(getAuthCommand());
|
|
256055
255931
|
program2.addCommand(getSiteCommand());
|
|
256056
255932
|
program2.addCommand(getTypesCommand());
|
|
@@ -260296,7 +260172,7 @@ function createSimpleRunTask(log) {
|
|
|
260296
260172
|
// src/cli/index.ts
|
|
260297
260173
|
var __dirname4 = dirname18(fileURLToPath6(import.meta.url));
|
|
260298
260174
|
async function runCLI(options8) {
|
|
260299
|
-
ensureNpmAssets(
|
|
260175
|
+
ensureNpmAssets(join24(__dirname4, "../assets"));
|
|
260300
260176
|
const errorReporter = new ErrorReporter;
|
|
260301
260177
|
errorReporter.registerProcessErrorHandlers();
|
|
260302
260178
|
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
@@ -260333,4 +260209,4 @@ export {
|
|
|
260333
260209
|
CLIExitError
|
|
260334
260210
|
};
|
|
260335
260211
|
|
|
260336
|
-
//# debugId=
|
|
260212
|
+
//# debugId=7DD396B284C982D564756E2164756E21
|