@netrojs/fnetro 0.1.2 → 0.1.5
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/LICENSE +1 -1
- package/README.md +1194 -179
- package/client.ts +307 -307
- package/core.ts +734 -734
- package/dist/server.js +17 -4
- package/package.json +91 -91
- package/server.ts +433 -415
package/dist/server.js
CHANGED
|
@@ -630,13 +630,24 @@ function fnetroVitePlugin(opts = {}) {
|
|
|
630
630
|
serverExternal = []
|
|
631
631
|
} = opts;
|
|
632
632
|
let isServerBuild = true;
|
|
633
|
-
const
|
|
633
|
+
const jsxTransform = {
|
|
634
634
|
jsx: "automatic",
|
|
635
635
|
jsxImportSource: "hono/jsx"
|
|
636
636
|
};
|
|
637
637
|
const jsxPlugin = {
|
|
638
638
|
name: "fnetro:jsx",
|
|
639
|
-
config: () => ({
|
|
639
|
+
config: () => ({
|
|
640
|
+
// Vite ≤7 (esbuild transform)
|
|
641
|
+
esbuild: jsxTransform,
|
|
642
|
+
// Vite 8+ (oxc / rolldown transform) — jsx property uses JsxOptions object shape
|
|
643
|
+
oxc: {
|
|
644
|
+
jsx: {
|
|
645
|
+
runtime: "automatic",
|
|
646
|
+
importSource: "hono/jsx"
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
// `as any` because JsxOptions typing varies across Vite 8 patch releases
|
|
650
|
+
})
|
|
640
651
|
};
|
|
641
652
|
const serverPlugin = {
|
|
642
653
|
name: "fnetro:server",
|
|
@@ -657,7 +668,8 @@ function fnetroVitePlugin(opts = {}) {
|
|
|
657
668
|
external: (id) => NODE_BUILTINS.test(id) || id === "@hono/node-server" || serverExternal.includes(id)
|
|
658
669
|
}
|
|
659
670
|
},
|
|
660
|
-
|
|
671
|
+
// Vite ≤7 fallback (oxc is set by jsxPlugin for Vite 8+)
|
|
672
|
+
esbuild: jsxTransform
|
|
661
673
|
};
|
|
662
674
|
},
|
|
663
675
|
async closeBundle() {
|
|
@@ -665,7 +677,8 @@ function fnetroVitePlugin(opts = {}) {
|
|
|
665
677
|
const { build } = await import("vite");
|
|
666
678
|
await build({
|
|
667
679
|
configFile: false,
|
|
668
|
-
|
|
680
|
+
// Vite ≤7 fallback (oxc is set by jsxPlugin for Vite 8+)
|
|
681
|
+
esbuild: jsxTransform,
|
|
669
682
|
build: {
|
|
670
683
|
outDir: clientOutDir,
|
|
671
684
|
lib: {
|
package/package.json
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@netrojs/fnetro",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Full-stack Hono framework — SSR, SPA, Vue-like reactivity, route groups, middleware and API routes",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"author": "
|
|
8
|
-
"homepage": "https://github.com/netrosolutions/fnetro",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/netrosolutions/fnetro.git",
|
|
12
|
-
"directory": "packages/fnetro"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/netrosolutions/fnetro/issues"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"fnetro",
|
|
19
|
-
"hono",
|
|
20
|
-
"framework",
|
|
21
|
-
"fullstack",
|
|
22
|
-
"ssr",
|
|
23
|
-
"spa",
|
|
24
|
-
"reactivity",
|
|
25
|
-
"signals",
|
|
26
|
-
"jsx",
|
|
27
|
-
"tsx",
|
|
28
|
-
"node",
|
|
29
|
-
"bun",
|
|
30
|
-
"deno",
|
|
31
|
-
"cloudflare-workers",
|
|
32
|
-
"edge"
|
|
33
|
-
],
|
|
34
|
-
"exports": {
|
|
35
|
-
".": {
|
|
36
|
-
"types": "./dist/core.d.ts",
|
|
37
|
-
"import": "./dist/core.js"
|
|
38
|
-
},
|
|
39
|
-
"./core": {
|
|
40
|
-
"types": "./dist/core.d.ts",
|
|
41
|
-
"import": "./dist/core.js"
|
|
42
|
-
},
|
|
43
|
-
"./server": {
|
|
44
|
-
"types": "./dist/server.d.ts",
|
|
45
|
-
"import": "./dist/server.js"
|
|
46
|
-
},
|
|
47
|
-
"./client": {
|
|
48
|
-
"types": "./dist/client.d.ts",
|
|
49
|
-
"import": "./dist/client.js"
|
|
50
|
-
},
|
|
51
|
-
"./vite": {
|
|
52
|
-
"types": "./dist/server.d.ts",
|
|
53
|
-
"import": "./dist/server.js"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"main": "./dist/core.js",
|
|
57
|
-
"types": "./dist/core.d.ts",
|
|
58
|
-
"files": [
|
|
59
|
-
"dist",
|
|
60
|
-
"core.ts",
|
|
61
|
-
"server.ts",
|
|
62
|
-
"client.ts",
|
|
63
|
-
"README.md",
|
|
64
|
-
"LICENSE"
|
|
65
|
-
],
|
|
66
|
-
"scripts": {
|
|
67
|
-
"build": "tsup",
|
|
68
|
-
"build:watch": "tsup --watch",
|
|
69
|
-
"typecheck": "tsc --noEmit",
|
|
70
|
-
"clean": "rimraf dist",
|
|
71
|
-
"prepublishOnly": "npm run clean && npm run build && npm run typecheck"
|
|
72
|
-
},
|
|
73
|
-
"peerDependencies": {
|
|
74
|
-
"hono": ">=4.0.0",
|
|
75
|
-
"vite": ">=5.0.0"
|
|
76
|
-
},
|
|
77
|
-
"peerDependenciesMeta": {
|
|
78
|
-
"vite": {
|
|
79
|
-
"optional": true
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"devDependencies": {
|
|
83
|
-
"@hono/node-server": "^1.19.11",
|
|
84
|
-
"@types/node": "^25.5.0",
|
|
85
|
-
"hono": "^4.12.8",
|
|
86
|
-
"rimraf": "^6.1.3",
|
|
87
|
-
"tsup": "^8.5.1",
|
|
88
|
-
"typescript": "^5.9.3",
|
|
89
|
-
"vite": "^8.0.0"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@netrojs/fnetro",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Full-stack Hono framework — SSR, SPA, Vue-like reactivity, route groups, middleware and API routes",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Netro Solutions<info@netrosolutions.com>",
|
|
8
|
+
"homepage": "https://github.com/netrosolutions/fnetro",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/netrosolutions/fnetro.git",
|
|
12
|
+
"directory": "packages/fnetro"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/netrosolutions/fnetro/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"fnetro",
|
|
19
|
+
"hono",
|
|
20
|
+
"framework",
|
|
21
|
+
"fullstack",
|
|
22
|
+
"ssr",
|
|
23
|
+
"spa",
|
|
24
|
+
"reactivity",
|
|
25
|
+
"signals",
|
|
26
|
+
"jsx",
|
|
27
|
+
"tsx",
|
|
28
|
+
"node",
|
|
29
|
+
"bun",
|
|
30
|
+
"deno",
|
|
31
|
+
"cloudflare-workers",
|
|
32
|
+
"edge"
|
|
33
|
+
],
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/core.d.ts",
|
|
37
|
+
"import": "./dist/core.js"
|
|
38
|
+
},
|
|
39
|
+
"./core": {
|
|
40
|
+
"types": "./dist/core.d.ts",
|
|
41
|
+
"import": "./dist/core.js"
|
|
42
|
+
},
|
|
43
|
+
"./server": {
|
|
44
|
+
"types": "./dist/server.d.ts",
|
|
45
|
+
"import": "./dist/server.js"
|
|
46
|
+
},
|
|
47
|
+
"./client": {
|
|
48
|
+
"types": "./dist/client.d.ts",
|
|
49
|
+
"import": "./dist/client.js"
|
|
50
|
+
},
|
|
51
|
+
"./vite": {
|
|
52
|
+
"types": "./dist/server.d.ts",
|
|
53
|
+
"import": "./dist/server.js"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"main": "./dist/core.js",
|
|
57
|
+
"types": "./dist/core.d.ts",
|
|
58
|
+
"files": [
|
|
59
|
+
"dist",
|
|
60
|
+
"core.ts",
|
|
61
|
+
"server.ts",
|
|
62
|
+
"client.ts",
|
|
63
|
+
"README.md",
|
|
64
|
+
"LICENSE"
|
|
65
|
+
],
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsup",
|
|
68
|
+
"build:watch": "tsup --watch",
|
|
69
|
+
"typecheck": "tsc --noEmit",
|
|
70
|
+
"clean": "rimraf dist",
|
|
71
|
+
"prepublishOnly": "npm run clean && npm run build && npm run typecheck"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"hono": ">=4.0.0",
|
|
75
|
+
"vite": ">=5.0.0"
|
|
76
|
+
},
|
|
77
|
+
"peerDependenciesMeta": {
|
|
78
|
+
"vite": {
|
|
79
|
+
"optional": true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@hono/node-server": "^1.19.11",
|
|
84
|
+
"@types/node": "^25.5.0",
|
|
85
|
+
"hono": "^4.12.8",
|
|
86
|
+
"rimraf": "^6.1.3",
|
|
87
|
+
"tsup": "^8.5.1",
|
|
88
|
+
"typescript": "^5.9.3",
|
|
89
|
+
"vite": "^8.0.0"
|
|
90
|
+
}
|
|
91
|
+
}
|