@base44-preview/cli 0.0.50-pr.452.1245eb5 → 0.0.50-pr.471.246cbbe
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 +65 -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,29 @@ 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().nullable().optional()
|
|
242601
|
+
});
|
|
242602
|
+
var TriggerLogicSchema = exports_external.enum(["and", "or"]);
|
|
242603
|
+
var TriggerConditionGroupSchema = exports_external.lazy(() => exports_external.object({
|
|
242604
|
+
logic: TriggerLogicSchema.optional(),
|
|
242605
|
+
conditions: exports_external.array(exports_external.union([TriggerConditionSchema, TriggerConditionGroupSchema])).min(1)
|
|
242606
|
+
}));
|
|
242607
|
+
var ConnectorAutomationSchema = AutomationBaseSchema.extend({
|
|
242608
|
+
type: exports_external.literal("connector"),
|
|
242609
|
+
integration_type: IntegrationTypeSchema,
|
|
242610
|
+
events: exports_external.array(exports_external.string()),
|
|
242611
|
+
resource_id: exports_external.string().nullable().optional(),
|
|
242612
|
+
trigger_conditions: TriggerConditionGroupSchema.nullable().optional()
|
|
242613
|
+
});
|
|
242597
242614
|
var AutomationSchema = exports_external.union([
|
|
242598
242615
|
ScheduledOneTimeSchema,
|
|
242599
242616
|
ScheduledCronSchema,
|
|
242600
242617
|
ScheduledSimpleSchema,
|
|
242601
|
-
EntityAutomationSchema
|
|
242618
|
+
EntityAutomationSchema,
|
|
242619
|
+
ConnectorAutomationSchema
|
|
242602
242620
|
]);
|
|
242603
242621
|
var FunctionConfigSchema = exports_external.object({
|
|
242604
242622
|
name: FunctionNameSchema,
|
|
@@ -243695,9 +243713,6 @@ async function ensureAppConfig(ctx) {
|
|
|
243695
243713
|
ctx.errorReporter.setContext({ appId: appConfig.id });
|
|
243696
243714
|
}
|
|
243697
243715
|
|
|
243698
|
-
// src/cli/utils/command/skill-version-check.ts
|
|
243699
|
-
import { join as join12 } from "node:path";
|
|
243700
|
-
|
|
243701
243716
|
// ../../node_modules/is-plain-obj/index.js
|
|
243702
243717
|
function isPlainObject2(value) {
|
|
243703
243718
|
if (typeof value !== "object" || value === null) {
|
|
@@ -250194,88 +250209,7 @@ var {
|
|
|
250194
250209
|
getCancelSignal: getCancelSignal2
|
|
250195
250210
|
} = getIpcExport();
|
|
250196
250211
|
|
|
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
|
|
250212
|
+
// src/cli/utils/version-check.ts
|
|
250279
250213
|
async function checkForUpgrade() {
|
|
250280
250214
|
const testLatestVersion = getTestOverrides()?.latestVersion;
|
|
250281
250215
|
if (testLatestVersion !== undefined) {
|
|
@@ -250305,7 +250239,7 @@ async function checkForUpgrade() {
|
|
|
250305
250239
|
}
|
|
250306
250240
|
}
|
|
250307
250241
|
|
|
250308
|
-
// src/cli/utils/
|
|
250242
|
+
// src/cli/utils/upgradeNotification.ts
|
|
250309
250243
|
function detectInstallMethod(distribution) {
|
|
250310
250244
|
if (distribution !== "binary") {
|
|
250311
250245
|
return "npm";
|
|
@@ -250361,11 +250295,8 @@ async function showCommandStart(fullBanner) {
|
|
|
250361
250295
|
We(theme.colors.base44OrangeBackground(" Base 44 "));
|
|
250362
250296
|
}
|
|
250363
250297
|
}
|
|
250364
|
-
async function showCommandEnd(result,
|
|
250365
|
-
await
|
|
250366
|
-
printUpgradeNotification(options.upgradeCheck, options.distribution),
|
|
250367
|
-
printSkillVersionWarning(options.skillCheck)
|
|
250368
|
-
]);
|
|
250298
|
+
async function showCommandEnd(result, upgradeCheckPromise, distribution) {
|
|
250299
|
+
await printUpgradeNotification(upgradeCheckPromise, distribution);
|
|
250369
250300
|
Le(result.outroMessage || "");
|
|
250370
250301
|
if (result.stdout) {
|
|
250371
250302
|
process.stdout.write(result.stdout);
|
|
@@ -250438,26 +250369,16 @@ class Base44Command extends Command {
|
|
|
250438
250369
|
await showCommandStart(this._commandOptions.fullBanner);
|
|
250439
250370
|
}
|
|
250440
250371
|
const upgradeCheckPromise = startUpgradeCheck();
|
|
250441
|
-
let skillCheckPromise = Promise.resolve(null);
|
|
250442
250372
|
try {
|
|
250443
250373
|
if (this._commandOptions.requireAuth) {
|
|
250444
250374
|
await ensureAuth(this.context);
|
|
250445
250375
|
}
|
|
250446
250376
|
if (this._commandOptions.requireAppConfig) {
|
|
250447
250377
|
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
250378
|
}
|
|
250454
250379
|
const result = await fn(this.context, ...args) ?? {};
|
|
250455
250380
|
if (!quiet) {
|
|
250456
|
-
await showCommandEnd(result,
|
|
250457
|
-
upgradeCheck: upgradeCheckPromise,
|
|
250458
|
-
skillCheck: skillCheckPromise,
|
|
250459
|
-
distribution: this.context.distribution
|
|
250460
|
-
});
|
|
250381
|
+
await showCommandEnd(result, upgradeCheckPromise, this.context.distribution);
|
|
250461
250382
|
} else {
|
|
250462
250383
|
if (result.outroMessage) {
|
|
250463
250384
|
process.stdout.write(`${result.outroMessage}
|
|
@@ -250466,16 +250387,9 @@ class Base44Command extends Command {
|
|
|
250466
250387
|
if (result.stdout) {
|
|
250467
250388
|
process.stdout.write(result.stdout);
|
|
250468
250389
|
}
|
|
250469
|
-
const
|
|
250470
|
-
upgradeCheckPromise,
|
|
250471
|
-
skillCheckPromise
|
|
250472
|
-
]);
|
|
250390
|
+
const upgradeInfo = await upgradeCheckPromise;
|
|
250473
250391
|
if (upgradeInfo) {
|
|
250474
250392
|
process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
|
|
250475
|
-
`);
|
|
250476
|
-
}
|
|
250477
|
-
if (staleSkills && staleSkills.length > 0) {
|
|
250478
|
-
process.stderr.write(`${formatPlainSkillWarning(staleSkills)}
|
|
250479
250393
|
`);
|
|
250480
250394
|
}
|
|
250481
250395
|
}
|
|
@@ -250662,7 +250576,7 @@ async function pullAgentsAction({
|
|
|
250662
250576
|
}) {
|
|
250663
250577
|
const { project: project2 } = await readProjectConfig();
|
|
250664
250578
|
const configDir = dirname7(project2.configPath);
|
|
250665
|
-
const agentsDir =
|
|
250579
|
+
const agentsDir = join12(configDir, project2.agentsDir);
|
|
250666
250580
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
250667
250581
|
return await fetchAgents();
|
|
250668
250582
|
}, {
|
|
@@ -250726,7 +250640,7 @@ function getAgentsCommand() {
|
|
|
250726
250640
|
}
|
|
250727
250641
|
|
|
250728
250642
|
// src/cli/commands/auth/password-login.ts
|
|
250729
|
-
import { dirname as dirname8, join as
|
|
250643
|
+
import { dirname as dirname8, join as join13 } from "node:path";
|
|
250730
250644
|
function validateAction(action) {
|
|
250731
250645
|
if (action !== "enable" && action !== "disable") {
|
|
250732
250646
|
throw new InvalidInputError(`Invalid action "${action}". Must be "enable" or "disable".`, {
|
|
@@ -250748,7 +250662,7 @@ async function passwordLoginAction({ log, runTask }, action) {
|
|
|
250748
250662
|
const shouldEnable = action === "enable";
|
|
250749
250663
|
const { project: project2 } = await readProjectConfig();
|
|
250750
250664
|
const configDir = dirname8(project2.configPath);
|
|
250751
|
-
const authDir =
|
|
250665
|
+
const authDir = join13(configDir, project2.authDir);
|
|
250752
250666
|
const updated = await runTask("Updating local auth config", async () => {
|
|
250753
250667
|
const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
|
|
250754
250668
|
const merged = { ...current, enableUsernamePassword: shouldEnable };
|
|
@@ -250768,14 +250682,14 @@ function getPasswordLoginCommand() {
|
|
|
250768
250682
|
}
|
|
250769
250683
|
|
|
250770
250684
|
// src/cli/commands/auth/pull.ts
|
|
250771
|
-
import { dirname as dirname9, join as
|
|
250685
|
+
import { dirname as dirname9, join as join14 } from "node:path";
|
|
250772
250686
|
async function pullAuthAction({
|
|
250773
250687
|
log,
|
|
250774
250688
|
runTask
|
|
250775
250689
|
}) {
|
|
250776
250690
|
const { project: project2 } = await readProjectConfig();
|
|
250777
250691
|
const configDir = dirname9(project2.configPath);
|
|
250778
|
-
const authDir =
|
|
250692
|
+
const authDir = join14(configDir, project2.authDir);
|
|
250779
250693
|
const remoteConfig = await runTask("Fetching auth config from Base44", async () => {
|
|
250780
250694
|
return await pullAuthConfig();
|
|
250781
250695
|
}, {
|
|
@@ -250902,14 +250816,14 @@ function getConnectorsListAvailableCommand() {
|
|
|
250902
250816
|
}
|
|
250903
250817
|
|
|
250904
250818
|
// src/cli/commands/connectors/pull.ts
|
|
250905
|
-
import { dirname as dirname10, join as
|
|
250819
|
+
import { dirname as dirname10, join as join15 } from "node:path";
|
|
250906
250820
|
async function pullConnectorsAction({
|
|
250907
250821
|
log,
|
|
250908
250822
|
runTask
|
|
250909
250823
|
}) {
|
|
250910
250824
|
const { project: project2 } = await readProjectConfig();
|
|
250911
250825
|
const configDir = dirname10(project2.configPath);
|
|
250912
|
-
const connectorsDir =
|
|
250826
|
+
const connectorsDir = join15(configDir, project2.connectorsDir);
|
|
250913
250827
|
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
250914
250828
|
return await pullAllConnectors();
|
|
250915
250829
|
}, {
|
|
@@ -251964,11 +251878,11 @@ function getListCommand() {
|
|
|
251964
251878
|
}
|
|
251965
251879
|
|
|
251966
251880
|
// src/cli/commands/functions/pull.ts
|
|
251967
|
-
import { dirname as dirname11, join as
|
|
251881
|
+
import { dirname as dirname11, join as join16 } from "node:path";
|
|
251968
251882
|
async function pullFunctionsAction({ log, runTask }, name2) {
|
|
251969
251883
|
const { project: project2 } = await readProjectConfig();
|
|
251970
251884
|
const configDir = dirname11(project2.configPath);
|
|
251971
|
-
const functionsDir =
|
|
251885
|
+
const functionsDir = join16(configDir, project2.functionsDir);
|
|
251972
251886
|
const remoteFunctions = await runTask("Fetching functions from Base44", async () => {
|
|
251973
251887
|
const { functions } = await listDeployedFunctions();
|
|
251974
251888
|
return functions;
|
|
@@ -252011,41 +251925,8 @@ function getFunctionsCommand() {
|
|
|
252011
251925
|
}
|
|
252012
251926
|
|
|
252013
251927
|
// src/cli/commands/project/create.ts
|
|
252014
|
-
import { basename as basename3, join as
|
|
251928
|
+
import { basename as basename3, join as join17, resolve as resolve2 } from "node:path";
|
|
252015
251929
|
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
251930
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
252050
251931
|
async function getTemplateById(templateId) {
|
|
252051
251932
|
const templates = await listTemplates();
|
|
@@ -252181,7 +252062,7 @@ async function executeCreate({
|
|
|
252181
252062
|
updateMessage("Building project...");
|
|
252182
252063
|
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
252183
252064
|
updateMessage("Deploying site...");
|
|
252184
|
-
return await deploySite(
|
|
252065
|
+
return await deploySite(join17(resolvedPath, outputDirectory));
|
|
252185
252066
|
}, {
|
|
252186
252067
|
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
252187
252068
|
errorMessage: "Failed to deploy site"
|
|
@@ -252193,10 +252074,13 @@ async function executeCreate({
|
|
|
252193
252074
|
if (shouldAddSkills) {
|
|
252194
252075
|
try {
|
|
252195
252076
|
await runTask("Installing AI agent skills...", async () => {
|
|
252196
|
-
await
|
|
252077
|
+
await execa("npx", ["-y", "skills", "add", "base44/skills", "-y"], {
|
|
252078
|
+
cwd: resolvedPath,
|
|
252079
|
+
shell: true
|
|
252080
|
+
});
|
|
252197
252081
|
}, {
|
|
252198
252082
|
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
252199
|
-
errorMessage: "Failed to add agent skills - you can add them later with:
|
|
252083
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx skills add base44/skills"
|
|
252200
252084
|
});
|
|
252201
252085
|
} catch {}
|
|
252202
252086
|
}
|
|
@@ -252758,11 +252642,6 @@ function getSiteCommand() {
|
|
|
252758
252642
|
return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteOpenCommand());
|
|
252759
252643
|
}
|
|
252760
252644
|
|
|
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
252645
|
// src/core/types/generator.ts
|
|
252767
252646
|
var import_common_tags = __toESM(require_lib2(), 1);
|
|
252768
252647
|
var import_json_schema_to_typescript = __toESM(require_src3(), 1);
|
|
@@ -252849,10 +252728,10 @@ function toPascalCase(name2) {
|
|
|
252849
252728
|
return name2.split(/[-_\s]+/).map((w8) => w8.charAt(0).toUpperCase() + w8.slice(1)).join("");
|
|
252850
252729
|
}
|
|
252851
252730
|
// src/core/types/update-project.ts
|
|
252852
|
-
import { join as
|
|
252731
|
+
import { join as join20 } from "node:path";
|
|
252853
252732
|
var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
|
|
252854
252733
|
async function updateProjectConfig(projectRoot) {
|
|
252855
|
-
const tsconfigPath =
|
|
252734
|
+
const tsconfigPath = join20(projectRoot, "tsconfig.json");
|
|
252856
252735
|
if (!await pathExists(tsconfigPath)) {
|
|
252857
252736
|
return false;
|
|
252858
252737
|
}
|
|
@@ -252897,7 +252776,7 @@ function getTypesCommand() {
|
|
|
252897
252776
|
// src/cli/dev/dev-server/main.ts
|
|
252898
252777
|
var import_cors = __toESM(require_lib4(), 1);
|
|
252899
252778
|
var import_express5 = __toESM(require_express(), 1);
|
|
252900
|
-
import { dirname as dirname16, join as
|
|
252779
|
+
import { dirname as dirname16, join as join23 } from "node:path";
|
|
252901
252780
|
|
|
252902
252781
|
// ../../node_modules/get-port/index.js
|
|
252903
252782
|
import net from "node:net";
|
|
@@ -255775,8 +255654,8 @@ async function createDevServer(options8) {
|
|
|
255775
255654
|
broadcastEntityEvent(io6, appId, entityName, event);
|
|
255776
255655
|
};
|
|
255777
255656
|
const base44ConfigWatcher = new WatchBase44({
|
|
255778
|
-
functions:
|
|
255779
|
-
entities:
|
|
255657
|
+
functions: join23(dirname16(project2.configPath), project2.functionsDir),
|
|
255658
|
+
entities: join23(dirname16(project2.configPath), project2.entitiesDir)
|
|
255780
255659
|
}, devLogger);
|
|
255781
255660
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
255782
255661
|
try {
|
|
@@ -256050,7 +255929,6 @@ function createProgram(context) {
|
|
|
256050
255929
|
program2.addCommand(getConnectorsCommand());
|
|
256051
255930
|
program2.addCommand(getFunctionsCommand());
|
|
256052
255931
|
program2.addCommand(getSecretsCommand());
|
|
256053
|
-
program2.addCommand(getAgentSkillsCommand());
|
|
256054
255932
|
program2.addCommand(getAuthCommand());
|
|
256055
255933
|
program2.addCommand(getSiteCommand());
|
|
256056
255934
|
program2.addCommand(getTypesCommand());
|
|
@@ -260296,7 +260174,7 @@ function createSimpleRunTask(log) {
|
|
|
260296
260174
|
// src/cli/index.ts
|
|
260297
260175
|
var __dirname4 = dirname18(fileURLToPath6(import.meta.url));
|
|
260298
260176
|
async function runCLI(options8) {
|
|
260299
|
-
ensureNpmAssets(
|
|
260177
|
+
ensureNpmAssets(join24(__dirname4, "../assets"));
|
|
260300
260178
|
const errorReporter = new ErrorReporter;
|
|
260301
260179
|
errorReporter.registerProcessErrorHandlers();
|
|
260302
260180
|
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
@@ -260333,4 +260211,4 @@ export {
|
|
|
260333
260211
|
CLIExitError
|
|
260334
260212
|
};
|
|
260335
260213
|
|
|
260336
|
-
//# debugId=
|
|
260214
|
+
//# debugId=D2A5F47A93B0EA4164756E2164756E21
|