@base44-preview/cli 0.3.6-pr.708.6264f65 → 0.3.6-pr.709.8b5341c

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 CHANGED
@@ -253012,6 +253012,7 @@ async function createVersion(artifacts, options = {}) {
253012
253012
  agents: artifacts.agents,
253013
253013
  mcp_config: artifacts.mcpConfig,
253014
253014
  agent_skills: artifacts.agentSkills,
253015
+ emails: artifacts.emails,
253015
253016
  ...artifacts.routes ? { routes: declaredRoutes(artifacts.routes) } : {},
253016
253017
  source_commit: options.sourceCommit
253017
253018
  }, "declaring a version")).json(), "declare");
@@ -255321,37 +255322,6 @@ import {
255321
255322
  workerEnvironment
255322
255323
  } from "base44:internal/runtime-context";
255323
255324
 
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
-
255355
255325
  // src/static-egress-marker.ts
255356
255326
  var STATIC_EGRESS_ARTIFACT_MARKER = "base44.static-egress.request-env.v2";
255357
255327
 
@@ -255637,7 +255607,6 @@ function resolveHandler(functionName) {
255637
255607
  }
255638
255608
  export {
255639
255609
  getRegisteredHandler,
255640
- installPlatformFetch,
255641
255610
  installStaticEgressFetch,
255642
255611
  registerLazy,
255643
255612
  resolveHandler
@@ -258900,14 +258869,12 @@ function buildEntrySource(userEntry, telemetry, runtimeSecrets = false) {
258900
258869
  return `// Auto-generated by the base44 bundler. Do not edit.
258901
258870
 
258902
258871
  import { currentWorkerRuntimeContext as _b44Context, runWithWorkerEnvironment as _b44Run } from ${JSON.stringify(RUNTIME_CONTEXT_SPECIFIER)};
258903
- import { getRegisteredHandler, installPlatformFetch, installStaticEgressFetch } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
258872
+ import { getRegisteredHandler, installStaticEgressFetch } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
258904
258873
 
258905
258874
  ${consolePatch(runtimeSecrets)}
258906
258875
  ${ERROR_RECORDS_PATCH}
258907
258876
  // Static egress reads workerEnv from the active request store. Install it
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();
258877
+ // before telemetry so telemetry remains the outermost fetch wrapper.
258911
258878
  installStaticEgressFetch();
258912
258879
  ${telemetry ? TELEMETRY_PATCH : ""}
258913
258880
 
@@ -258956,16 +258923,14 @@ function buildAppEntrySource(functionModules, telemetry, runtimeSecrets = false)
258956
258923
  return `// Auto-generated by the base44 bundler. Do not edit.
258957
258924
 
258958
258925
  import { currentWorkerRuntimeContext as _b44Context, runWithWorkerEnvironment as _b44Run } from ${JSON.stringify(RUNTIME_CONTEXT_SPECIFIER)};
258959
- import { installPlatformFetch, installStaticEgressFetch, resolveHandler } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
258926
+ import { installStaticEgressFetch, resolveHandler } from "./${SHIM_FILENAME}";${activationImport(runtimeSecrets)}
258960
258927
  ${moduleImports}
258961
258928
 
258962
258929
  ${consolePatch(runtimeSecrets)}
258963
258930
  ${INVOCATION_LOGS_PATCH}
258964
258931
  ${ERROR_RECORDS_PATCH}
258965
258932
  // Static egress reads workerEnv from the active request store. Install it
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();
258933
+ // before telemetry so telemetry remains the outermost fetch wrapper.
258969
258934
  installStaticEgressFetch();
258970
258935
  ${telemetry ? TELEMETRY_PATCH : ""}
258971
258936
 
@@ -259494,10 +259459,9 @@ export function actorRequestToRoom(request, actorName, room, verified) {
259494
259459
  function buildPrelude() {
259495
259460
  return `// Auto-generated by the base44 bundler. Do not edit.
259496
259461
  import { currentWorkerRuntimeContext as _b44Context } from ${JSON.stringify(RUNTIME_CONTEXT_SPECIFIER)};
259497
- import { installPlatformFetch, installStaticEgressFetch } from "./${SHIM_FILENAME}";
259462
+ import { installStaticEgressFetch } from "./${SHIM_FILENAME}";
259498
259463
 
259499
259464
  ${CONSOLE_PATCH}
259500
- installPlatformFetch();
259501
259465
  installStaticEgressFetch();
259502
259466
  `;
259503
259467
  }
@@ -265124,14 +265088,31 @@ async function readAgentSkillFiles(dir) {
265124
265088
  }
265125
265089
  return skills;
265126
265090
  }
265091
+ async function readEmailFiles(configDir) {
265092
+ const dir = join31(configDir, "emails");
265093
+ if (!await pathExists(dir)) {
265094
+ return {};
265095
+ }
265096
+ const files = await globby("*.html", {
265097
+ cwd: dir,
265098
+ onlyFiles: true,
265099
+ followSymbolicLinks: false
265100
+ });
265101
+ const emails = {};
265102
+ for (const file of files.sort()) {
265103
+ emails[file.replace(/\.html$/, "")] = await readTextFile(join31(dir, file));
265104
+ }
265105
+ return emails;
265106
+ }
265127
265107
  async function collectResources(configDir, dirs) {
265128
- const [entities, agents, mcpConfig, agentSkills] = await Promise.all([
265108
+ const [entities, agents, mcpConfig, agentSkills, emails] = await Promise.all([
265129
265109
  readRawResources(join31(configDir, dirs.entitiesDir)),
265130
265110
  readRawResources(join31(configDir, dirs.agentsDir)),
265131
265111
  readMcpConfig(configDir),
265132
- readAgentSkillFiles(join31(configDir, dirs.agentSkillsDir))
265112
+ readAgentSkillFiles(join31(configDir, dirs.agentSkillsDir)),
265113
+ readEmailFiles(configDir)
265133
265114
  ]);
265134
- return { entities, agents, mcpConfig, agentSkills };
265115
+ return { entities, agents, mcpConfig, agentSkills, emails };
265135
265116
  }
265136
265117
  async function collectArtifacts(target, options = {}) {
265137
265118
  const built = await resolveFullStackBuild(target.root);
@@ -275697,4 +275678,4 @@ export {
275697
275678
  runCLI
275698
275679
  };
275699
275680
 
275700
- //# debugId=88AC635692AD00BA64756E2164756E21
275681
+ //# debugId=951FDAFF7670E9ED64756E2164756E21