@guren/plugin-cloudflare 0.10.0 → 0.10.1
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/README.md
CHANGED
|
@@ -18,7 +18,7 @@ bunx wrangler deploy
|
|
|
18
18
|
|
|
19
19
|
`cloudflare:build` runs your app's `build` script, then assembles a `.cloudflare/` directory containing the worker entry, static assets for Workers Static Assets, and flattened D1 migrations. It is generated output — add it to `.gitignore` and rebuild before every deploy.
|
|
20
20
|
|
|
21
|
-
Before the app build it runs the deploy-runtime checks `guren doctor` reports and warns, without failing, when sessions or OAuth state would sit in process memory, a `
|
|
21
|
+
Before the app build it runs the deploy-runtime checks `guren doctor` reports and warns, without failing, when sessions or OAuth state would sit in process memory, a Bun-only password hasher (`Argon2Hasher`, `hasher: 'argon2'`, or `new Hash({ algorithm: 'argon2' })`) is selected, or providers are discovered from the filesystem. Each works locally and breaks on Workers, and the warning prints where you are still reading rather than after the Vite output.
|
|
22
22
|
|
|
23
23
|
`bunx guren cloudflare:size` (or `cloudflare:build --report-size`) measures the bundle a deploy would upload through wrangler's dry run and lists its largest sources by package. The platform limit is 64 MiB uncompressed on every plan; the report warns from half of it.
|
|
24
24
|
|
|
@@ -668,9 +668,11 @@ function renderWorkerModule(input) {
|
|
|
668
668
|
lines.push(input.mcpOAuth ? "import { createWorkersHandler, sweepOAuthStorage } from '@guren/plugin-cloudflare'" : "import { createWorkersHandler } from '@guren/plugin-cloudflare'");
|
|
669
669
|
if (hasAgents) lines.push(`import { configureAgentRuntime } from ${JSON.stringify(AGENTS_RUNTIME_SPECIFIER)}`, `import { routeGuardedAgentRequest } from ${JSON.stringify(AGENTS_ROUTER_SPECIFIER)}`, `import agentsConfig from ${quotedImport(input.out, resolve(input.root, AGENTS_CONFIG_FILE))}`);
|
|
670
670
|
if (input.mcpOAuth) lines.push(`import { OAuthProvider } from ${JSON.stringify(OAUTH_PROVIDER_PACKAGE)}`, `import { mcpOAuthPropsToAuth, presentExternalMcpAuth } from ${JSON.stringify(MCP_OAUTH_SEAM_SPECIFIER)}`);
|
|
671
|
-
if (input.ssrImport) lines.push(
|
|
671
|
+
if (input.ssrImport) lines.push(`import * as ssrModule from ${quotedImport(input.out, input.ssrImport.file)}`);
|
|
672
672
|
lines.push(`import app from ${quotedImport(input.out, input.appEntry)}`, "");
|
|
673
|
-
if (input.ssrImport) lines.push(`
|
|
673
|
+
if (input.ssrImport) lines.push(`if (!app.container.has('inertia.ssrRenderer')) {
|
|
674
|
+
app.container.instance('inertia.ssrRenderer', ssrModule.${input.ssrImport.rendererExport})
|
|
675
|
+
}`, "");
|
|
674
676
|
lines.push("const handler = createWorkersHandler(app)", "");
|
|
675
677
|
if (hasAgents) lines.push(renderAgentWiring(input.out, input.root, input.agents, input.agentBindings), "");
|
|
676
678
|
if (input.mcpOAuth) lines.push(renderOAuthProvider(input.mcpPath, hasAgents ? "agentEntry" : "handler"), "");
|
package/dist/commands.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as printBundleReport, c as buildCloudflareOutput, s as reportBundleSize } from "./bundle-size-
|
|
1
|
+
import { a as printBundleReport, c as buildCloudflareOutput, s as reportBundleSize } from "./bundle-size-CRMs5aKL.js";
|
|
2
2
|
import { defineCommand } from "citty";
|
|
3
3
|
//#region src/commands.ts
|
|
4
4
|
const rootArg = {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { captureWorkersEnv, getWorkersEnv, isWorkersRuntime, resetWorkersEnv } from "./env.js";
|
|
2
|
-
import { a as printBundleReport, c as buildCloudflareOutput, i as parseWranglerSize, l as flattenD1Migrations, n as WORKER_SIZE_WARN_SHARE, o as renderBundleReport, r as attributeBundle, s as reportBundleSize, t as WORKER_SIZE_LIMIT } from "./bundle-size-
|
|
2
|
+
import { a as printBundleReport, c as buildCloudflareOutput, i as parseWranglerSize, l as flattenD1Migrations, n as WORKER_SIZE_WARN_SHARE, o as renderBundleReport, r as attributeBundle, s as reportBundleSize, t as WORKER_SIZE_LIMIT } from "./bundle-size-CRMs5aKL.js";
|
|
3
3
|
import { definePlugin } from "@guren/core";
|
|
4
4
|
//#region src/boot.ts
|
|
5
5
|
const latches = /* @__PURE__ */ new WeakMap();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guren/plugin-cloudflare",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@guren/core": "^1.
|
|
50
|
+
"@guren/core": "^1.18.0",
|
|
51
51
|
"citty": "^0.1.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|