@base44-preview/cli 0.2.6-pr.684.c1fb02f → 0.2.6-pr.685.56bddb0
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 +12 -23
- package/dist/cli/index.js.map +6 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -238778,8 +238778,11 @@ async function fetchFunctionLogs(functionName, filters = {}) {
|
|
|
238778
238778
|
}
|
|
238779
238779
|
// src/core/resources/function/config.ts
|
|
238780
238780
|
import { basename as basename4, dirname as dirname8, join as join10, relative as relative3, resolve as resolve2 } from "node:path";
|
|
238781
|
+
function getSharedDir(functionsDir) {
|
|
238782
|
+
return resolve2(functionsDir, "..", "shared");
|
|
238783
|
+
}
|
|
238781
238784
|
async function readSharedFiles(functionsDir) {
|
|
238782
|
-
const sharedDir =
|
|
238785
|
+
const sharedDir = getSharedDir(functionsDir);
|
|
238783
238786
|
if (!await pathExists(sharedDir)) {
|
|
238784
238787
|
return [];
|
|
238785
238788
|
}
|
|
@@ -265017,8 +265020,7 @@ var SessionImportResponseSchema = object({
|
|
|
265017
265020
|
turn_count: number2(),
|
|
265018
265021
|
branch_url: string2(),
|
|
265019
265022
|
continued: boolean2(),
|
|
265020
|
-
source_ref: string2()
|
|
265021
|
-
reimported: boolean2().default(false)
|
|
265023
|
+
source_ref: string2()
|
|
265022
265024
|
}).transform((data) => ({
|
|
265023
265025
|
branchId: data.branch_id,
|
|
265024
265026
|
branchName: data.branch_name,
|
|
@@ -265026,8 +265028,7 @@ var SessionImportResponseSchema = object({
|
|
|
265026
265028
|
turnCount: data.turn_count,
|
|
265027
265029
|
branchUrl: data.branch_url,
|
|
265028
265030
|
continued: data.continued,
|
|
265029
|
-
sourceRef: data.source_ref
|
|
265030
|
-
reimported: data.reimported
|
|
265031
|
+
sourceRef: data.source_ref
|
|
265031
265032
|
}));
|
|
265032
265033
|
var ErrorEnvelopeSchema = object({
|
|
265033
265034
|
error: object({
|
|
@@ -265040,12 +265041,6 @@ function messageFor(status, code, details, viaToken) {
|
|
|
265040
265041
|
if (code === "branch_exists" && details?.branch_url) {
|
|
265041
265042
|
return `Base Code already has ${details.branch_name ?? "a branch for this session"}. Open it: ${new URL(details.branch_url, getBase44ApiUrl())}`;
|
|
265042
265043
|
}
|
|
265043
|
-
if (code === "session_changed" && details?.branch_url) {
|
|
265044
|
-
return `This session changed since it was imported into ${details.branch_name ?? "its branch"}, so its newer messages can't be added there. In Base Code, open Import session and choose Import into a new branch: ${new URL(details.branch_url, getBase44ApiUrl())}`;
|
|
265045
|
-
}
|
|
265046
|
-
if (code === "branch_busy") {
|
|
265047
|
-
return `${details?.branch_name ?? "The session's branch"} is still working in Base Code. Wait for it to finish, then import again.`;
|
|
265048
|
-
}
|
|
265049
265044
|
if (code === "idempotency_key_in_use") {
|
|
265050
265045
|
return "An import of this session is still running. Wait a moment and try again.";
|
|
265051
265046
|
}
|
|
@@ -265545,7 +265540,7 @@ async function importAction(ctx, link, options, command) {
|
|
|
265545
265540
|
const url = `${getBase44ApiUrl()}${imported.branchUrl}`;
|
|
265546
265541
|
return {
|
|
265547
265542
|
outroMessage: [
|
|
265548
|
-
|
|
265543
|
+
imported.continued ? `✓ Imported ${imported.turnCount} messages from ${TOOL_LABELS[imported.source]}. Continued on "${imported.branchName}".` : `✓ Imported ${imported.turnCount} messages from ${TOOL_LABELS[imported.source]} into branch "${imported.branchName}".`,
|
|
265549
265544
|
...note ? [note] : [],
|
|
265550
265545
|
`Open it: ${url}`
|
|
265551
265546
|
].join(`
|
|
@@ -265553,14 +265548,6 @@ async function importAction(ctx, link, options, command) {
|
|
|
265553
265548
|
stdout: ctx.jsonMode ? toJsonStdout({ ...imported, url, ...note ? { note } : {} }) : undefined
|
|
265554
265549
|
};
|
|
265555
265550
|
}
|
|
265556
|
-
function outcome(imported) {
|
|
265557
|
-
const { turnCount, branchName } = imported;
|
|
265558
|
-
const tool = TOOL_LABELS[imported.source];
|
|
265559
|
-
if (imported.reimported) {
|
|
265560
|
-
return turnCount ? `✓ Added ${turnCount} new messages from ${tool} to "${branchName}".` : `✓ Nothing new to import. "${branchName}" already has every message.`;
|
|
265561
|
-
}
|
|
265562
|
-
return imported.continued ? `✓ Imported ${turnCount} messages from ${tool}. Continued on "${branchName}".` : `✓ Imported ${turnCount} messages from ${tool} into branch "${branchName}".`;
|
|
265563
|
-
}
|
|
265564
265551
|
function getSessionsImportCommand() {
|
|
265565
265552
|
return new Base44Command("import", { requireAuth: false }).description("Continue a Claude Code or Codex session in Base Code").argument("[session-link]", "A claude.ai session address (https://claude.ai/code/session_…)").option("--current", "Import the session this command runs inside").option("--file <path>", "Import this session file as is").option("--skip-push-check", "Import even though local changes aren't on GitHub (they won't be included)").option("--token <key>", "One-time import key from Base Code (no login needed)").action(importAction);
|
|
265566
265553
|
}
|
|
@@ -270224,14 +270211,16 @@ async function createDevServer(options) {
|
|
|
270224
270211
|
emitEntityEvent = (appId, entityName, event) => {
|
|
270225
270212
|
broadcastEntityEvent(io, appId, entityName, event);
|
|
270226
270213
|
};
|
|
270214
|
+
const functionsDir = join40(dirname29(project.configPath), project.functionsDir);
|
|
270227
270215
|
const base44ConfigWatcher = new WatchBase44({
|
|
270228
|
-
functions:
|
|
270216
|
+
functions: functionsDir,
|
|
270217
|
+
shared: getSharedDir(functionsDir),
|
|
270229
270218
|
entities: join40(dirname29(project.configPath), project.entitiesDir)
|
|
270230
270219
|
}, devLogger);
|
|
270231
270220
|
base44ConfigWatcher.on("change", async (name) => {
|
|
270232
270221
|
try {
|
|
270233
270222
|
const { functions, entities } = await options.loadResources();
|
|
270234
|
-
if (name === "functions") {
|
|
270223
|
+
if (name === "functions" || name === "shared") {
|
|
270235
270224
|
const previousFunctionCount = functionManager.getFunctionNames().length;
|
|
270236
270225
|
await functionManager.reload(functions);
|
|
270237
270226
|
const names = functionManager.getFunctionNames();
|
|
@@ -274796,4 +274785,4 @@ export {
|
|
|
274796
274785
|
runCLI
|
|
274797
274786
|
};
|
|
274798
274787
|
|
|
274799
|
-
//# debugId=
|
|
274788
|
+
//# debugId=354DCF351C3C362C64756E2164756E21
|