@base44-preview/cli 0.3.6-pr.707.41f83a6 → 0.3.6-pr.708.6264f65
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 +46 -29
- package/dist/cli/index.js.map +10 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -225898,7 +225898,6 @@ var ProjectConfigSchema = object({
|
|
|
225898
225898
|
actorsDir: string2().optional().default("actors"),
|
|
225899
225899
|
agentsDir: string2().optional().default("agents"),
|
|
225900
225900
|
agentSkillsDir: string2().optional().default("agent-skills"),
|
|
225901
|
-
workflowsDir: string2().optional().default("workflows"),
|
|
225902
225901
|
connectorsDir: string2().optional().default("connectors"),
|
|
225903
225902
|
authDir: string2().optional().default("auth"),
|
|
225904
225903
|
plugin: PluginMetadataSchema.optional(),
|
|
@@ -247174,7 +247173,6 @@ async function resolveBuildTarget(projectRoot, overrides = {}) {
|
|
|
247174
247173
|
entitiesDir: project?.entitiesDir ?? "entities",
|
|
247175
247174
|
agentsDir: project?.agentsDir ?? "agents",
|
|
247176
247175
|
agentSkillsDir: project?.agentSkillsDir ?? "agent-skills",
|
|
247177
|
-
workflowsDir: project?.workflowsDir ?? "workflows",
|
|
247178
247176
|
functionsDir: project?.functionsDir ?? "functions",
|
|
247179
247177
|
actorsDir: project?.actorsDir ?? "actors"
|
|
247180
247178
|
};
|
|
@@ -253014,7 +253012,6 @@ async function createVersion(artifacts, options = {}) {
|
|
|
253014
253012
|
agents: artifacts.agents,
|
|
253015
253013
|
mcp_config: artifacts.mcpConfig,
|
|
253016
253014
|
agent_skills: artifacts.agentSkills,
|
|
253017
|
-
workflows: artifacts.workflows,
|
|
253018
253015
|
...artifacts.routes ? { routes: declaredRoutes(artifacts.routes) } : {},
|
|
253019
253016
|
source_commit: options.sourceCommit
|
|
253020
253017
|
}, "declaring a version")).json(), "declare");
|
|
@@ -255324,6 +255321,37 @@ import {
|
|
|
255324
255321
|
workerEnvironment
|
|
255325
255322
|
} from "base44:internal/runtime-context";
|
|
255326
255323
|
|
|
255324
|
+
// src/platform-fetch.ts
|
|
255325
|
+
var PLATFORM_FETCH_BINDING_NAME = "BASE44_PLATFORM_FETCH";
|
|
255326
|
+
var platformFetchInstalled = false;
|
|
255327
|
+
function needsPlatformFetch(input, init) {
|
|
255328
|
+
try {
|
|
255329
|
+
const request = typeof input === "string" || input instanceof URL ? void 0 : input;
|
|
255330
|
+
const method = String(init?.method ?? request?.method ?? "GET");
|
|
255331
|
+
const headers = init?.headers === void 0 ? request?.headers : new Headers(init.headers);
|
|
255332
|
+
return method.toUpperCase() === "HEAD" || headers?.has("range") === true || (init?.cache ?? request?.cache) === "no-store";
|
|
255333
|
+
} catch {
|
|
255334
|
+
return false;
|
|
255335
|
+
}
|
|
255336
|
+
}
|
|
255337
|
+
function createPlatformFetch(originalFetch, readEnvironment) {
|
|
255338
|
+
return (input, init) => {
|
|
255339
|
+
const binding = readEnvironment()[PLATFORM_FETCH_BINDING_NAME];
|
|
255340
|
+
if (typeof binding?.fetch !== "function" || !needsPlatformFetch(input, init)) {
|
|
255341
|
+
return originalFetch(input, init);
|
|
255342
|
+
}
|
|
255343
|
+
return binding.fetch(input, init);
|
|
255344
|
+
};
|
|
255345
|
+
}
|
|
255346
|
+
function installPlatformFetch() {
|
|
255347
|
+
if (platformFetchInstalled) return;
|
|
255348
|
+
globalThis.fetch = createPlatformFetch(
|
|
255349
|
+
globalThis.fetch.bind(globalThis),
|
|
255350
|
+
workerEnvironment
|
|
255351
|
+
);
|
|
255352
|
+
platformFetchInstalled = true;
|
|
255353
|
+
}
|
|
255354
|
+
|
|
255327
255355
|
// src/static-egress-marker.ts
|
|
255328
255356
|
var STATIC_EGRESS_ARTIFACT_MARKER = "base44.static-egress.request-env.v2";
|
|
255329
255357
|
|
|
@@ -255609,6 +255637,7 @@ function resolveHandler(functionName) {
|
|
|
255609
255637
|
}
|
|
255610
255638
|
export {
|
|
255611
255639
|
getRegisteredHandler,
|
|
255640
|
+
installPlatformFetch,
|
|
255612
255641
|
installStaticEgressFetch,
|
|
255613
255642
|
registerLazy,
|
|
255614
255643
|
resolveHandler
|
|
@@ -258871,12 +258900,14 @@ function buildEntrySource(userEntry, telemetry, runtimeSecrets = false) {
|
|
|
258871
258900
|
return `// Auto-generated by the base44 bundler. Do not edit.
|
|
258872
258901
|
|
|
258873
258902
|
import { currentWorkerRuntimeContext as _b44Context, runWithWorkerEnvironment as _b44Run } from ${JSON.stringify(RUNTIME_CONTEXT_SPECIFIER)};
|
|
258874
|
-
import { getRegisteredHandler, installStaticEgressFetch } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
|
|
258903
|
+
import { getRegisteredHandler, installPlatformFetch, installStaticEgressFetch } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
|
|
258875
258904
|
|
|
258876
258905
|
${consolePatch(runtimeSecrets)}
|
|
258877
258906
|
${ERROR_RECORDS_PATCH}
|
|
258878
258907
|
// Static egress reads workerEnv from the active request store. Install it
|
|
258879
|
-
// before telemetry so telemetry remains the outermost fetch wrapper
|
|
258908
|
+
// before telemetry so telemetry remains the outermost fetch wrapper, and after
|
|
258909
|
+
// the platform fetch, which serves the requests it doesn't take.
|
|
258910
|
+
installPlatformFetch();
|
|
258880
258911
|
installStaticEgressFetch();
|
|
258881
258912
|
${telemetry ? TELEMETRY_PATCH : ""}
|
|
258882
258913
|
|
|
@@ -258925,14 +258956,16 @@ function buildAppEntrySource(functionModules, telemetry, runtimeSecrets = false)
|
|
|
258925
258956
|
return `// Auto-generated by the base44 bundler. Do not edit.
|
|
258926
258957
|
|
|
258927
258958
|
import { currentWorkerRuntimeContext as _b44Context, runWithWorkerEnvironment as _b44Run } from ${JSON.stringify(RUNTIME_CONTEXT_SPECIFIER)};
|
|
258928
|
-
import { installStaticEgressFetch, resolveHandler } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
|
|
258959
|
+
import { installPlatformFetch, installStaticEgressFetch, resolveHandler } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
|
|
258929
258960
|
${moduleImports}
|
|
258930
258961
|
|
|
258931
258962
|
${consolePatch(runtimeSecrets)}
|
|
258932
258963
|
${INVOCATION_LOGS_PATCH}
|
|
258933
258964
|
${ERROR_RECORDS_PATCH}
|
|
258934
258965
|
// Static egress reads workerEnv from the active request store. Install it
|
|
258935
|
-
// before telemetry so telemetry remains the outermost fetch wrapper
|
|
258966
|
+
// before telemetry so telemetry remains the outermost fetch wrapper, and after
|
|
258967
|
+
// the platform fetch, which serves the requests it doesn't take.
|
|
258968
|
+
installPlatformFetch();
|
|
258936
258969
|
installStaticEgressFetch();
|
|
258937
258970
|
${telemetry ? TELEMETRY_PATCH : ""}
|
|
258938
258971
|
|
|
@@ -259461,9 +259494,10 @@ export function actorRequestToRoom(request, actorName, room, verified) {
|
|
|
259461
259494
|
function buildPrelude() {
|
|
259462
259495
|
return `// Auto-generated by the base44 bundler. Do not edit.
|
|
259463
259496
|
import { currentWorkerRuntimeContext as _b44Context } from ${JSON.stringify(RUNTIME_CONTEXT_SPECIFIER)};
|
|
259464
|
-
import { installStaticEgressFetch } from "./${SHIM_FILENAME}";
|
|
259497
|
+
import { installPlatformFetch, installStaticEgressFetch } from "./${SHIM_FILENAME}";
|
|
259465
259498
|
|
|
259466
259499
|
${CONSOLE_PATCH}
|
|
259500
|
+
installPlatformFetch();
|
|
259467
259501
|
installStaticEgressFetch();
|
|
259468
259502
|
`;
|
|
259469
259503
|
}
|
|
@@ -265071,22 +265105,6 @@ async function readRawResources(dir) {
|
|
|
265071
265105
|
}
|
|
265072
265106
|
return payloads;
|
|
265073
265107
|
}
|
|
265074
|
-
async function readWorkflowFiles(dir) {
|
|
265075
|
-
if (!await pathExists(dir)) {
|
|
265076
|
-
return {};
|
|
265077
|
-
}
|
|
265078
|
-
const files = await globby(`*.${CONFIG_FILE_EXTENSION}`, {
|
|
265079
|
-
cwd: dir,
|
|
265080
|
-
onlyFiles: true,
|
|
265081
|
-
followSymbolicLinks: false,
|
|
265082
|
-
dot: true
|
|
265083
|
-
});
|
|
265084
|
-
const workflows = {};
|
|
265085
|
-
for (const file of files.sort()) {
|
|
265086
|
-
workflows[file.slice(0, -`.${CONFIG_FILE_EXTENSION}`.length)] = await readJsonFile(join31(dir, file));
|
|
265087
|
-
}
|
|
265088
|
-
return workflows;
|
|
265089
|
-
}
|
|
265090
265108
|
async function readMcpConfig(configDir) {
|
|
265091
265109
|
const path = join31(configDir, "mcp", "config.json");
|
|
265092
265110
|
return await pathExists(path) ? await readTextFile(path) : "";
|
|
@@ -265107,14 +265125,13 @@ async function readAgentSkillFiles(dir) {
|
|
|
265107
265125
|
return skills;
|
|
265108
265126
|
}
|
|
265109
265127
|
async function collectResources(configDir, dirs) {
|
|
265110
|
-
const [entities, agents, mcpConfig, agentSkills
|
|
265128
|
+
const [entities, agents, mcpConfig, agentSkills] = await Promise.all([
|
|
265111
265129
|
readRawResources(join31(configDir, dirs.entitiesDir)),
|
|
265112
265130
|
readRawResources(join31(configDir, dirs.agentsDir)),
|
|
265113
265131
|
readMcpConfig(configDir),
|
|
265114
|
-
readAgentSkillFiles(join31(configDir, dirs.agentSkillsDir))
|
|
265115
|
-
readWorkflowFiles(join31(configDir, dirs.workflowsDir))
|
|
265132
|
+
readAgentSkillFiles(join31(configDir, dirs.agentSkillsDir))
|
|
265116
265133
|
]);
|
|
265117
|
-
return { entities, agents, mcpConfig, agentSkills
|
|
265134
|
+
return { entities, agents, mcpConfig, agentSkills };
|
|
265118
265135
|
}
|
|
265119
265136
|
async function collectArtifacts(target, options = {}) {
|
|
265120
265137
|
const built = await resolveFullStackBuild(target.root);
|
|
@@ -275680,4 +275697,4 @@ export {
|
|
|
275680
275697
|
runCLI
|
|
275681
275698
|
};
|
|
275682
275699
|
|
|
275683
|
-
//# debugId=
|
|
275700
|
+
//# debugId=88AC635692AD00BA64756E2164756E21
|