@evjs/webpack-plugin 0.0.1-alpha.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 ADDED
@@ -0,0 +1,41 @@
1
+ # @evjs/webpack-plugin
2
+
3
+ Build-time integration for React Server Functions in the **ev** framework.
4
+
5
+ ## Features
6
+
7
+ - **`EvWebpackPlugin`**: Zero-config plugin that:
8
+ - Auto-discovers `"use server"` files on server builds (`target: "node"`).
9
+ - Emits a versioned `manifest.json` mapping function IDs to source locations.
10
+ - **`server-fn-loader`**: Transforms files marked with `"use server"`.
11
+ - On the **server**: Keeps source code and registers the function.
12
+ - On the **client**: Replaces the implementation with an RPC stub.
13
+
14
+ ## Usage
15
+
16
+ ```js
17
+ const { EvWebpackPlugin } = require("@evjs/webpack-plugin");
18
+
19
+ module.exports = {
20
+ plugins: [
21
+ new EvWebpackPlugin()
22
+ ],
23
+ module: {
24
+ rules: [
25
+ {
26
+ test: /\.tsx?$/,
27
+ exclude: /node_modules/,
28
+ use: [
29
+ { loader: "swc-loader", /* ... */ },
30
+ {
31
+ loader: "@evjs/webpack-plugin/server-fn-loader",
32
+ options: { isServer: false }
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+ };
39
+ ```
40
+
41
+ On server builds, `EvWebpackPlugin` automatically discovers all `"use server"` files under `./src/` and injects them as Webpack entries — no manual imports needed.
package/esm/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import type { Compiler } from "webpack";
2
+ /**
3
+ * Webpack plugin for the ev framework.
4
+ *
5
+ * On server builds (target: "node"), automatically discovers files with
6
+ * the "use server" directive and adds them as entries.
7
+ * On all builds, emits the `manifest.json` mapping function IDs to assets.
8
+ */
9
+ export declare class EvWebpackPlugin {
10
+ apply(compiler: Compiler): void;
11
+ }
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA+BxC;;;;;;GAMG;AACH,qBAAa,eAAe;IAC1B,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAqEzB"}
package/esm/index.js ADDED
@@ -0,0 +1,94 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { glob } from "node:fs";
4
+ class ManifestCollector {
5
+ serverFunctions = {};
6
+ addServerFn(id, meta) {
7
+ this.serverFunctions[id] = meta;
8
+ }
9
+ getManifest() {
10
+ return {
11
+ version: 1,
12
+ serverFunctions: this.serverFunctions,
13
+ };
14
+ }
15
+ }
16
+ /**
17
+ * Check if a file starts with the "use server" directive.
18
+ */
19
+ function hasUseServerDirective(filePath) {
20
+ try {
21
+ const content = fs.readFileSync(filePath, "utf-8");
22
+ const firstLine = content.trimStart().split("\n")[0];
23
+ return /^["']use server["'];?\s*$/.test(firstLine.trim());
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }
29
+ /**
30
+ * Webpack plugin for the ev framework.
31
+ *
32
+ * On server builds (target: "node"), automatically discovers files with
33
+ * the "use server" directive and adds them as entries.
34
+ * On all builds, emits the `manifest.json` mapping function IDs to assets.
35
+ */
36
+ export class EvWebpackPlugin {
37
+ apply(compiler) {
38
+ const collector = new ManifestCollector();
39
+ // Attach collector to compiler so the loader can access it
40
+ compiler._ev_manifest_collector = collector;
41
+ // Auto-discover server function files on server builds
42
+ const isServer = compiler.options.target === "node" ||
43
+ (Array.isArray(compiler.options.target) &&
44
+ compiler.options.target.includes("node"));
45
+ if (isServer) {
46
+ const context = compiler.context;
47
+ compiler.hooks.make.tapAsync("EvWebpackPlugin", (compilation, callback) => {
48
+ // Scan all .ts/.tsx files under src/ for "use server" directive
49
+ glob("./src/**/*.{ts,tsx}", { cwd: context }, (err, files) => {
50
+ if (err) {
51
+ callback(err);
52
+ return;
53
+ }
54
+ const serverFiles = files.filter((f) => hasUseServerDirective(path.resolve(context, f)));
55
+ if (serverFiles.length === 0) {
56
+ callback();
57
+ return;
58
+ }
59
+ const webpack = compiler.webpack;
60
+ let pending = serverFiles.length;
61
+ for (const file of serverFiles) {
62
+ const absolutePath = path.resolve(context, file);
63
+ const dep = webpack.EntryPlugin.createDependency(absolutePath, {
64
+ name: undefined,
65
+ });
66
+ compilation.addEntry(context, dep, { name: undefined }, (addErr) => {
67
+ if (addErr) {
68
+ callback(addErr);
69
+ return;
70
+ }
71
+ pending--;
72
+ if (pending === 0) {
73
+ callback();
74
+ }
75
+ });
76
+ }
77
+ });
78
+ });
79
+ }
80
+ // Emit manifest
81
+ compiler.hooks.emit.tap("EvWebpackPlugin", (compilation) => {
82
+ const manifest = collector.getManifest();
83
+ if (Object.keys(manifest.serverFunctions).length === 0) {
84
+ return;
85
+ }
86
+ const content = JSON.stringify(manifest, null, 2);
87
+ compilation.assets["manifest.json"] = {
88
+ source: () => content,
89
+ size: () => content.length,
90
+ };
91
+ });
92
+ }
93
+ }
94
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,iBAAiB;IACrB,eAAe,GAAkC,EAAE,CAAC;IAEpD,WAAW,CAAC,EAAU,EAAE,IAAmB;QACzC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAClC,CAAC;IAED,WAAW;QACT,OAAO;YACL,OAAO,EAAE,CAAC;YACV,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OA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I,EAAE,CAAC,CAAC,CAAC;YAElD,WAAW,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG;gBACpC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO;gBACrB,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM;aACpB,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ interface LoaderContext {
2
+ getOptions(): {
3
+ isServer?: boolean;
4
+ };
5
+ resourcePath: string;
6
+ rootContext: string;
7
+ }
8
+ export default function serverFnLoader(this: LoaderContext, source: string): Promise<string>;
9
+ export {};
10
+ //# sourceMappingURL=server-fn-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-fn-loader.d.ts","sourceRoot":"","sources":["../src/server-fn-loader.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,UAAU,IAAI;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAuBD,wBAA8B,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiFjG"}
@@ -0,0 +1,97 @@
1
+ import { createHash } from "node:crypto";
2
+ import { parse } from "@swc/core";
3
+ import path from "node:path";
4
+ /**
5
+ * Derive a stable function ID from the file path and export name.
6
+ */
7
+ function makeFnId(rootContext, resourcePath, exportName) {
8
+ const relativePath = path.relative(rootContext, resourcePath);
9
+ return createHash("sha256")
10
+ .update(`${relativePath}:${exportName}`)
11
+ .digest("hex")
12
+ .slice(0, 16);
13
+ }
14
+ /**
15
+ * Check whether the source starts with the "use server" directive.
16
+ */
17
+ function hasUseServerDirective(source) {
18
+ const trimmed = source.replace(/^(\s|\/\/[^\n]*\n|\/\*[\s\S]*?\*\/)*/, "");
19
+ return /^["']use server["'];?\s/.test(trimmed);
20
+ }
21
+ export default async function serverFnLoader(source) {
22
+ if (!hasUseServerDirective(source)) {
23
+ return source;
24
+ }
25
+ const { isServer = false } = this.getOptions();
26
+ // Parse the source into an AST
27
+ const program = await parse(source, {
28
+ syntax: "typescript",
29
+ tsx: true,
30
+ comments: false,
31
+ script: false,
32
+ });
33
+ const exportNames = [];
34
+ // Iterate through module items to find exports
35
+ for (const item of program.body) {
36
+ if (item.type === "ExportDeclaration") {
37
+ const decl = item.declaration;
38
+ if (decl.type === "FunctionDeclaration") {
39
+ if (decl.identifier.value)
40
+ exportNames.push(decl.identifier.value);
41
+ }
42
+ else if (decl.type === "VariableDeclaration") {
43
+ for (const v of decl.declarations) {
44
+ if (v.id.type === "Identifier") {
45
+ exportNames.push(v.id.value);
46
+ }
47
+ }
48
+ }
49
+ }
50
+ else if (item.type === "ExportNamedDeclaration") {
51
+ for (const specifier of item.specifiers) {
52
+ if (specifier.type === "ExportSpecifier") {
53
+ if (specifier.exported?.type === "Identifier") {
54
+ exportNames.push(specifier.exported.value);
55
+ }
56
+ else if (specifier.orig.type === "Identifier") {
57
+ exportNames.push(specifier.orig.value);
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ if (exportNames.length === 0) {
64
+ return source;
65
+ }
66
+ const manifestCollector = this._compiler?._ev_manifest_collector;
67
+ if (isServer) {
68
+ // Server build: keep original + register
69
+ const registrations = exportNames
70
+ .map((name) => {
71
+ const fnId = makeFnId(this.rootContext, this.resourcePath, name);
72
+ if (manifestCollector) {
73
+ const relativePath = path.relative(this.rootContext, this.resourcePath);
74
+ const moduleId = createHash("sha256")
75
+ .update(relativePath)
76
+ .digest("hex")
77
+ .slice(0, 16);
78
+ manifestCollector.addServerFn(fnId, {
79
+ moduleId,
80
+ export: name,
81
+ });
82
+ }
83
+ return `registerServerFn("${fnId}", ${name});`;
84
+ })
85
+ .join("\n");
86
+ return `import { registerServerFn } from "@evjs/runtime/server";\n${source}\n${registrations}\n`;
87
+ }
88
+ // Client build: replace with RPC stubs
89
+ const stubCode = exportNames
90
+ .map((name) => {
91
+ const fnId = makeFnId(this.rootContext, this.resourcePath, name);
92
+ return `export function ${name}(...args) {\n return __ev_rpc("${fnId}", args);\n}`;
93
+ })
94
+ .join("\n\n");
95
+ return `import { __ev_rpc } from "@evjs/runtime/client";\n\n${stubCode}\n`;
96
+ }
97
+ //# sourceMappingURL=server-fn-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-fn-loader.js","sourceRoot":"","sources":["../src/server-fn-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAQlC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;GAEG;AACH,SAAS,QAAQ,CAAC,WAAmB,EAAE,YAAoB,EAAE,UAAkB;IAC7E,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAC9D,OAAO,UAAU,CAAC,QAAQ,CAAC;SACxB,MAAM,CAAC,GAAG,YAAY,IAAI,UAAU,EAAE,CAAC;SACvC,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,MAAc;IAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,sCAAsC,EAAE,EAAE,CAAC,CAAC;IAC3E,OAAO,yBAAyB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,cAAc,CAAsB,MAAc;IAC9E,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAE/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;QACZ,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QACjE,OAAO,mBAAmB,IAAI,mCAAmC,IAAI,cAAc,CAAC;IACtF,CAAC,CAAC;SACD,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhB,OAAO,uDAAuD,QAAQ,IAAI,CAAC;AAC7E,CAAC"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@evjs/webpack-plugin",
3
+ "version": "0.0.1-alpha.1",
4
+ "description": "Webpack plugin and loaders for the ev framework",
5
+ "type": "module",
6
+ "main": "./esm/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./esm/index.d.ts",
10
+ "import": "./esm/index.js",
11
+ "require": "./esm/index.js"
12
+ },
13
+ "./server-fn-loader": {
14
+ "types": "./esm/server-fn-loader.d.ts",
15
+ "default": "./esm/server-fn-loader.js"
16
+ }
17
+ },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "check-types": "tsc --noEmit",
21
+ "prepublishOnly": "npm run build"
22
+ },
23
+ "files": [
24
+ "esm"
25
+ ],
26
+ "keywords": [
27
+ "ev",
28
+ "webpack",
29
+ "plugin",
30
+ "loader"
31
+ ],
32
+ "author": "xusd320",
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "@evjs/manifest": "0.0.1-alpha.1",
36
+ "@swc/core": "^1.15.18"
37
+ },
38
+ "devDependencies": {
39
+ "typescript": "^5.7.3",
40
+ "webpack": "^5.105.4"
41
+ }
42
+ }