@guren/plugin-vercel 0.7.1 → 0.7.2
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/index.js +7 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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
|
-
import { DEV_ONLY_MODULES, DOCUMENT_ASSET_EXTENSIONS, DOCUMENT_ASSET_HEADERS, assertOutputDirOutsideRoot, bundledRuntimeEnv, removeShadowingIndex, renderDevOnlyStub, resetOutputDir, resolveClientAssetEnv, resolvePathLike, resolveSsrEntryFile, ssrRuntimePaths, unusedSqlClients } from "@guren/core/internal/deploy-build";
|
|
4
|
+
import { BUN_DEPLOY_MINIFY, DEV_ONLY_MODULES, DOCUMENT_ASSET_EXTENSIONS, DOCUMENT_ASSET_HEADERS, assertOutputDirOutsideRoot, bundledRuntimeEnv, removeShadowingIndex, renderDevOnlyStub, reportRenamedNameKeyedClasses, resetOutputDir, resolveClientAssetEnv, resolvePathLike, resolveSsrEntryFile, ssrRuntimePaths, unusedSqlClients } from "@guren/core/internal/deploy-build";
|
|
5
5
|
import { reportDeployRuntimeHazards } from "@guren/core/internal/deploy-check";
|
|
6
6
|
//#region src/index.ts
|
|
7
7
|
/** Prefixes every diagnostic this build emits. */
|
|
@@ -143,11 +143,8 @@ async function bundleFunction(input) {
|
|
|
143
143
|
throw: false,
|
|
144
144
|
outdir: input.funcDir,
|
|
145
145
|
target: "bun",
|
|
146
|
-
minify:
|
|
147
|
-
|
|
148
|
-
syntax: true,
|
|
149
|
-
identifiers: false
|
|
150
|
-
},
|
|
146
|
+
minify: BUN_DEPLOY_MINIFY,
|
|
147
|
+
metafile: true,
|
|
151
148
|
define: {
|
|
152
149
|
"process.env.NODE_ENV": "\"production\"",
|
|
153
150
|
...Object.fromEntries(Object.entries(input.bundledEnv).map(([key, value]) => [`process.env.${key}`, JSON.stringify(value)]))
|
|
@@ -170,6 +167,10 @@ async function bundleFunction(input) {
|
|
|
170
167
|
}]
|
|
171
168
|
});
|
|
172
169
|
if (!result.success) throw new Error(`${LABEL}: bun build failed.\n${result.logs.map((log) => String(log)).join("\n")}`);
|
|
170
|
+
await reportRenamedNameKeyedClasses(result, {
|
|
171
|
+
root: input.root,
|
|
172
|
+
label: LABEL
|
|
173
|
+
});
|
|
173
174
|
}
|
|
174
175
|
function buildVercelEnvironment(publicDir, ssrDir) {
|
|
175
176
|
const env = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guren/plugin-vercel",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Deploy a Guren SSR application to Vercel through the Build Output API, on Vercel's Bun runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"guren",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typecheck": "tsc --noEmit"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@guren/core": "^1.
|
|
49
|
+
"@guren/core": "^1.21.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^20.14.10",
|