@guren/plugin-vercel 0.5.1 → 0.6.0
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 +2 -0
- package/dist/index.js +5 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ bun run vercel:build
|
|
|
16
16
|
vercel deploy --prebuilt
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Before writing any output, `vercel:build` runs the deploy-runtime checks `guren doctor` reports and warns, without failing, on an in-memory session or OAuth store, a `ScryptHasher`, or filesystem provider discovery — each works locally and breaks across function invocations.
|
|
20
|
+
|
|
19
21
|
## API
|
|
20
22
|
|
|
21
23
|
- **`createVercelHandler(app)`** — boots a Guren `Application` and returns a `fetch` handler for the serverless function.
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { cpSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { basename, extname, resolve } from "node:path";
|
|
3
3
|
import { definePlugin } from "@guren/core";
|
|
4
4
|
import { DOCUMENT_ASSET_EXTENSIONS, DOCUMENT_ASSET_HEADERS, MCP_SDK_SUBPATH_PREFIX, appUsesMcpPlugin, assertOutputDirOutsideRoot, clientManifestJson, removeShadowingIndex, renderDevOnlyStub, resetOutputDir, resolveClientAssetEnv, resolvePathLike, resolveSsrEntryFile, ssrRuntimePaths, stubbableDevOnlyModules, unusedSqlClients } from "@guren/core/internal/deploy-build";
|
|
5
|
+
import { reportDeployRuntimeHazards } from "@guren/core/internal/deploy-check";
|
|
5
6
|
//#region src/index.ts
|
|
6
7
|
/** Prefixes every diagnostic this build emits. */
|
|
7
8
|
const LABEL = "Vercel build";
|
|
@@ -31,6 +32,10 @@ async function buildVercelOutput(options = {}) {
|
|
|
31
32
|
const migrationsDir = resolvePathLike(options.migrationsDir ?? resolve(root, "db/migrations"));
|
|
32
33
|
assertOutputDirOutsideRoot(out, root, LABEL);
|
|
33
34
|
if (!existsSync(entrypoint)) throw new Error(`${LABEL}: entrypoint not found at ${entrypoint}. Run \`bunx guren plugin @guren/plugin-vercel\` to scaffold src/vercel.ts, or pass "entrypoint".`);
|
|
35
|
+
await reportDeployRuntimeHazards({
|
|
36
|
+
root,
|
|
37
|
+
label: LABEL
|
|
38
|
+
});
|
|
34
39
|
const env = buildVercelEnvironment(publicDir, ssrDir);
|
|
35
40
|
resetOutputDir(out, root, LABEL);
|
|
36
41
|
mkdirSync(funcDir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guren/plugin-vercel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"typecheck": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@guren/core": "^1.
|
|
38
|
+
"@guren/core": "^1.15.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^20.14.10",
|