dinou 7.3.0 → 8.0.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.
Files changed (113) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/cli.js +44 -41
  4. package/dinou/adapters/netlify.js +1 -0
  5. package/dinou/adapters/{node.mjs → node.js} +9 -3
  6. package/dinou/bun/{build.mjs → build.js} +11 -10
  7. package/dinou/cloudflare/{build.mjs → build.js} +14 -10
  8. package/dinou/cloudflare/shims/fs.js +3 -0
  9. package/dinou/constants.js +3 -3
  10. package/dinou/core/asset-extensions.js +5 -5
  11. package/dinou/core/bailout-proxy.js +3 -3
  12. package/dinou/core/build-static-pages.js +21 -17
  13. package/dinou/core/cache-revalidate.js +14 -33
  14. package/dinou/core/cache-slot.js +21 -10
  15. package/dinou/core/config.js +2 -5
  16. package/dinou/core/createScopedName.js +3 -3
  17. package/dinou/core/dinou-paths.js +15 -12
  18. package/dinou/core/generate-route-types.js +8 -3
  19. package/dinou/core/generate-static-page.js +6 -5
  20. package/dinou/core/generate-static-rsc.js +15 -10
  21. package/dinou/core/generate-static.js +11 -10
  22. package/dinou/core/generating-isg.js +12 -11
  23. package/dinou/core/get-abs-path-with-ext.js +8 -6
  24. package/dinou/core/get-asset-from-manifest.js +4 -4
  25. package/dinou/core/get-error-jsx.js +12 -9
  26. package/dinou/core/get-file-path-and-dynamic-params.js +7 -4
  27. package/dinou/core/get-jsx.js +19 -13
  28. package/dinou/core/handler.js +73 -33
  29. package/dinou/core/http-adapter.js +6 -2
  30. package/dinou/core/import-module.js +5 -4
  31. package/dinou/core/layout-functions.js +11 -6
  32. package/dinou/core/load-dinou-config.js +10 -4
  33. package/dinou/core/manifest-provider.js +11 -4
  34. package/dinou/core/parse-exports.js +11 -6
  35. package/dinou/core/path-utils.js +2 -2
  36. package/dinou/core/ppr-context.js +11 -11
  37. package/dinou/core/ppr-runtime.js +10 -6
  38. package/dinou/core/render-jsx-to-client-jsx.js +6 -3
  39. package/dinou/core/request-context.js +11 -7
  40. package/dinou/core/resolve-module-ppr.js +2 -2
  41. package/dinou/core/resolve-setup-files.js +70 -69
  42. package/dinou/core/revalidating.js +14 -25
  43. package/dinou/core/route-generator.js +12 -8
  44. package/dinou/core/rsc-renderer.js +13 -2
  45. package/dinou/core/run-ssg.js +9 -4
  46. package/dinou/core/safe-rename.js +3 -3
  47. package/dinou/core/scan-dependency-components.js +9 -3
  48. package/dinou/core/status-manifest.js +5 -5
  49. package/dinou/core/storage-adapter.js +13 -3
  50. package/dinou/core/url-resolver.js +2 -2
  51. package/dinou/core/vfs.js +7 -7
  52. package/dinou/deno/{build.mjs → build.js} +11 -10
  53. package/dinou/esbuild/{build.mjs → build.js} +4 -4
  54. package/dinou/esbuild/{dev.mjs → dev.js} +6 -6
  55. package/dinou/esbuild/helpers-esbuild/{get-config-esbuild-prod.mjs → get-config-esbuild-prod.js} +7 -7
  56. package/dinou/esbuild/helpers-esbuild/{get-config-esbuild.mjs → get-config-esbuild.js} +8 -8
  57. package/dinou/esbuild/helpers-esbuild/{get-esbuild-entries.mjs → get-esbuild-entries.js} +2 -2
  58. package/dinou/esbuild/plugins-esbuild/{assets-plugin.mjs → assets-plugin.js} +1 -1
  59. package/dinou/esbuild/plugins-esbuild/{stable-chunk-names-and-maps-plugin.mjs → stable-chunk-names-and-maps-plugin.js} +1 -1
  60. package/dinou/esbuild/plugins-esbuild/{write-plugin.mjs → write-plugin.js} +1 -1
  61. package/dinou/esbuild/plugins-postcss/postcss-extract-plugin.js +4 -3
  62. package/dinou/esbuild/react-refresh/babel-config.js +5 -1
  63. package/dinou/esbuild/react-refresh/esm-hmr/server.js +7 -4
  64. package/dinou/esbuild/react-refresh/{esm-hmr-plugin.mjs → esm-hmr-plugin.js} +4 -4
  65. package/dinou/esbuild/react-refresh/{react-refresh-runtime.mjs → react-refresh-runtime.js} +1 -1
  66. package/dinou/index.js +40 -19
  67. package/dinou/node/{build.mjs → build.js} +1 -1
  68. package/dinou/node/{bundle-dual-engine.mjs → bundle-dual-engine.js} +13 -12
  69. package/dinou/node/{dev.mjs → dev.js} +27 -22
  70. package/dinou/package.json +8 -7
  71. package/dinou/rollup/postcss.config.js +1 -1
  72. package/dinou/rollup/react-refresh/esm-hmr/server.js +7 -4
  73. package/dinou/rollup/react-refresh/react-refresh-wrap-modules.js +2 -1
  74. package/dinou/rollup/react-refresh/rollup-plugin-esm-hmr.js +23 -16
  75. package/dinou/rollup/rollup-plugins/dinou-asset-plugin.js +6 -5
  76. package/dinou/rollup/rollup-plugins/manifest-generator-plugin.js +2 -1
  77. package/dinou/rollup/rollup-plugins/rollup-plugin-memory.js +3 -2
  78. package/dinou/rollup/rollup-plugins/rollup-plugin-react-client-manifest.js +16 -13
  79. package/dinou/rollup/rollup-plugins/rollup-plugin-server-functions.js +7 -6
  80. package/dinou/rollup/rollup-plugins/rollup-plugin-swc.js +6 -3
  81. package/dinou/rollup/rollup.config.js +27 -23
  82. package/dinou/server.js +21 -26
  83. package/dinou/webpack/helpers/get-webpack-entries.js +14 -11
  84. package/dinou/webpack/loaders/server-functions-loader.js +5 -6
  85. package/dinou/webpack/loaders/swc-loader.js +4 -2
  86. package/dinou/webpack/plugins/manifest-generator-plugin.js +3 -1
  87. package/dinou/webpack/plugins/server-functions-plugin.js +4 -3
  88. package/dinou/webpack/plugins/webpack-memory-plugin.js +3 -2
  89. package/dinou/webpack/postcss.config.js +1 -1
  90. package/dinou/webpack/webpack.config.js +22 -20
  91. package/eject.js +224 -217
  92. package/package.json +111 -110
  93. package/dinou/config.js +0 -1
  94. package/dinou/config.mjs +0 -2
  95. package/dinou/core/css-require-hook.js +0 -64
  96. package/dinou/index.mjs +0 -43
  97. package/dinou/server.mjs +0 -30
  98. /package/dinou/core/{export-static.mjs → export-static.js} +0 -0
  99. /package/dinou/esbuild/helpers-esbuild/{normalize-path.mjs → normalize-path.js} +0 -0
  100. /package/dinou/esbuild/helpers-esbuild/{strip-namespace.mjs → strip-namespace.js} +0 -0
  101. /package/dinou/esbuild/helpers-esbuild/{swc-disk-cache.mjs → swc-disk-cache.js} +0 -0
  102. /package/dinou/esbuild/helpers-esbuild/{update-manifest-for-module.mjs → update-manifest-for-module.js} +0 -0
  103. /package/dinou/esbuild/helpers-esbuild/{write.mjs → write.js} +0 -0
  104. /package/dinou/esbuild/plugins-esbuild/{babel-react-compiler-plugin.mjs → babel-react-compiler-plugin.js} +0 -0
  105. /package/dinou/esbuild/plugins-esbuild/{css-processor-plugin.mjs → css-processor-plugin.js} +0 -0
  106. /package/dinou/esbuild/plugins-esbuild/{manifest-generator-plugin.mjs → manifest-generator-plugin.js} +0 -0
  107. /package/dinou/esbuild/plugins-esbuild/{react-client-manifest-plugin.mjs → react-client-manifest-plugin.js} +0 -0
  108. /package/dinou/esbuild/plugins-esbuild/{server-functions-plugin.mjs → server-functions-plugin.js} +0 -0
  109. /package/dinou/esbuild/plugins-esbuild/{skip-missing-entry-points-plugin.mjs → skip-missing-entry-points-plugin.js} +0 -0
  110. /package/dinou/esbuild/react-refresh/esm-hmr/{client.mjs → client.js} +0 -0
  111. /package/dinou/esbuild/react-refresh/{is-react-refresh-boundary.mjs → is-react-refresh-boundary.js} +0 -0
  112. /package/dinou/node/{port-selector.mjs → port-selector.js} +0 -0
  113. /package/dinou/node/{terminal-status.mjs → terminal-status.js} +0 -0
package/package.json CHANGED
@@ -1,110 +1,111 @@
1
- {
2
- "name": "dinou",
3
- "version": "7.3.0",
4
- "description": "Full-stack React 19 framework with native RSC, Server Functions, progressive streaming, and zero vendor lock-in.",
5
- "main": "index.js",
6
- "bin": {
7
- "dinou": "./cli.js"
8
- },
9
- "exports": {
10
- ".": {
11
- "types": "./dinou/index.d.ts",
12
- "import": "./dinou/index.mjs",
13
- "require": "./dinou/index.js"
14
- },
15
- "./env": {
16
- "types": "./dinou/env.d.ts"
17
- },
18
- "./server": {
19
- "types": "./dinou/server.d.ts",
20
- "import": "./dinou/server.mjs",
21
- "require": "./dinou/server.js"
22
- },
23
- "./config": {
24
- "types": "./dinou/index.d.ts",
25
- "import": "./dinou/core/config.js",
26
- "require": "./dinou/core/config.js"
27
- },
28
- "./adapters/node": "./dinou/adapters/node.mjs",
29
- "./adapters/bun": "./dinou/adapters/bun.js",
30
- "./adapters/deno": "./dinou/adapters/deno.js",
31
- "./adapters/cloudflare": "./dinou/adapters/cloudflare.js",
32
- "./adapters/netlify": "./dinou/adapters/netlify.js"
33
- },
34
- "types": "./dinou/index.d.ts",
35
- "scripts": {
36
- "test": "echo \"Error: no test specified\" && exit 1"
37
- },
38
- "keywords": [
39
- "react",
40
- "react-19",
41
- "react-server-components",
42
- "rsc",
43
- "react-server-functions",
44
- "framework",
45
- "react-framework",
46
- "esbuild",
47
- "rollup",
48
- "webpack",
49
- "ssr",
50
- "streaming",
51
- "dinou"
52
- ],
53
- "author": "Roger Gomez Castells (https://github.com/roggc)",
54
- "license": "MIT",
55
- "repository": {
56
- "type": "git",
57
- "url": "https://github.com/roggc/dinou.git"
58
- },
59
- "dependencies": {
60
- "@babel/core": "^7.27.4",
61
- "@babel/parser": "^7.28.3",
62
- "@babel/plugin-syntax-import-meta": "^7.10.4",
63
- "@babel/preset-react": "^7.27.1",
64
- "@babel/preset-typescript": "^7.27.1",
65
- "@babel/traverse": "^7.28.3",
66
- "@esbuild-plugins/tsconfig-paths": "^0.1.2",
67
- "@roggc/react-server-dom-esm": "^19.3.0",
68
- "@rollup/plugin-babel": "^6.0.4",
69
- "@rollup/plugin-commonjs": "^28.0.6",
70
- "@rollup/plugin-json": "^6.1.0",
71
- "@rollup/plugin-node-resolve": "^16.0.1",
72
- "@rollup/plugin-replace": "^6.0.2",
73
- "@swc/core": "^1.15.10",
74
- "@tailwindcss/postcss": "^4.1.10",
75
- "autoprefixer": "^10.4.21",
76
- "babel-loader": "^10.0.0",
77
- "babel-plugin-react-compiler": "^1.0.0",
78
- "chokidar": "^4.0.3",
79
- "commander": "^14.0.0",
80
- "copy-webpack-plugin": "^14.0.0",
81
- "cross-env": "^7.0.3",
82
- "css-loader": "^7.1.2",
83
- "dotenv": "^16.5.0",
84
- "esbuild": "^0.27.0",
85
- "esbuild-copy-static-files": "^0.1.0",
86
- "generic-names": "^4.0.0",
87
- "mini-css-extract-plugin": "^2.9.4",
88
- "postcss": "^8.5.5",
89
- "postcss-import": "^16.1.1",
90
- "postcss-loader": "^8.2.0",
91
- "postcss-modules": "^6.0.1",
92
- "react-refresh": "^0.17.0",
93
- "react-server-dom-webpack": "^19.3.0",
94
- "rollup": "^4.46.2",
95
- "rollup-plugin-copy": "^3.5.0",
96
- "rollup-plugin-delete": "^3.0.1",
97
- "rollup-plugin-postcss": "^4.0.2",
98
- "rollup-plugin-tsconfig-paths": "^1.5.2",
99
- "tailwindcss": "^4.1.10",
100
- "tsconfig-paths-webpack-plugin": "^4.2.0",
101
- "webpack": "^5.103.0",
102
- "webpack-cli": "^6.0.1",
103
- "webpack-dev-server": "^5.2.2",
104
- "ws": "^8.18.3"
105
- },
106
- "peerDependencies": {
107
- "react": ">=19.3.0",
108
- "react-dom": ">=19.3.0"
109
- }
110
- }
1
+ {
2
+ "name": "dinou",
3
+ "version": "8.0.0",
4
+ "description": "Full-stack React 19 framework with native RSC, Server Functions, progressive streaming, and zero vendor lock-in.",
5
+ "type": "module",
6
+ "main": "./dinou/index.js",
7
+ "bin": {
8
+ "dinou": "./cli.js"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dinou/index.d.ts",
13
+ "import": "./dinou/index.js",
14
+ "default": "./dinou/index.js"
15
+ },
16
+ "./env": {
17
+ "types": "./dinou/env.d.ts"
18
+ },
19
+ "./server": {
20
+ "types": "./dinou/server.d.ts",
21
+ "import": "./dinou/server.js",
22
+ "default": "./dinou/server.js"
23
+ },
24
+ "./config": {
25
+ "types": "./dinou/index.d.ts",
26
+ "import": "./dinou/core/config.js",
27
+ "default": "./dinou/core/config.js"
28
+ },
29
+ "./adapters/node": "./dinou/adapters/node.js",
30
+ "./adapters/bun": "./dinou/adapters/bun.js",
31
+ "./adapters/deno": "./dinou/adapters/deno.js",
32
+ "./adapters/cloudflare": "./dinou/adapters/cloudflare.js",
33
+ "./adapters/netlify": "./dinou/adapters/netlify.js"
34
+ },
35
+ "types": "./dinou/index.d.ts",
36
+ "scripts": {
37
+ "test": "echo \"Error: no test specified\" && exit 1"
38
+ },
39
+ "keywords": [
40
+ "react",
41
+ "react-19",
42
+ "react-server-components",
43
+ "rsc",
44
+ "react-server-functions",
45
+ "framework",
46
+ "react-framework",
47
+ "esbuild",
48
+ "rollup",
49
+ "webpack",
50
+ "ssr",
51
+ "streaming",
52
+ "dinou"
53
+ ],
54
+ "author": "Roger Gomez Castells (https://github.com/roggc)",
55
+ "license": "MIT",
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "https://github.com/roggc/dinou.git"
59
+ },
60
+ "dependencies": {
61
+ "@babel/core": "^7.27.4",
62
+ "@babel/parser": "^7.28.3",
63
+ "@babel/plugin-syntax-import-meta": "^7.10.4",
64
+ "@babel/preset-react": "^7.27.1",
65
+ "@babel/preset-typescript": "^7.27.1",
66
+ "@babel/traverse": "^7.28.3",
67
+ "@esbuild-plugins/tsconfig-paths": "^0.1.2",
68
+ "@roggc/react-server-dom-esm": "^19.3.0",
69
+ "@rollup/plugin-babel": "^6.0.4",
70
+ "@rollup/plugin-commonjs": "^28.0.6",
71
+ "@rollup/plugin-json": "^6.1.0",
72
+ "@rollup/plugin-node-resolve": "^16.0.1",
73
+ "@rollup/plugin-replace": "^6.0.2",
74
+ "@swc/core": "^1.15.10",
75
+ "@tailwindcss/postcss": "^4.1.10",
76
+ "autoprefixer": "^10.4.21",
77
+ "babel-loader": "^10.0.0",
78
+ "babel-plugin-react-compiler": "^1.0.0",
79
+ "chokidar": "^4.0.3",
80
+ "commander": "^14.0.0",
81
+ "copy-webpack-plugin": "^14.0.0",
82
+ "cross-env": "^7.0.3",
83
+ "css-loader": "^7.1.2",
84
+ "dotenv": "^16.5.0",
85
+ "esbuild": "^0.27.0",
86
+ "esbuild-copy-static-files": "^0.1.0",
87
+ "generic-names": "^4.0.0",
88
+ "mini-css-extract-plugin": "^2.9.4",
89
+ "postcss": "^8.5.5",
90
+ "postcss-import": "^16.1.1",
91
+ "postcss-loader": "^8.2.0",
92
+ "postcss-modules": "^6.0.1",
93
+ "react-refresh": "^0.17.0",
94
+ "react-server-dom-webpack": "^19.3.0",
95
+ "rollup": "^4.46.2",
96
+ "rollup-plugin-copy": "^3.5.0",
97
+ "rollup-plugin-delete": "^3.0.1",
98
+ "rollup-plugin-postcss": "^4.0.2",
99
+ "rollup-plugin-tsconfig-paths": "^1.5.2",
100
+ "tailwindcss": "^4.1.10",
101
+ "tsconfig-paths-webpack-plugin": "^4.2.0",
102
+ "webpack": "^5.103.0",
103
+ "webpack-cli": "^6.0.1",
104
+ "webpack-dev-server": "^5.2.2",
105
+ "ws": "^8.18.3"
106
+ },
107
+ "peerDependencies": {
108
+ "react": ">=19.3.0",
109
+ "react-dom": ">=19.3.0"
110
+ }
111
+ }
package/dinou/config.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./core/config.js");
package/dinou/config.mjs DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/config.js";
2
- export { default } from "./core/config.js";
@@ -1,64 +0,0 @@
1
- const fs = require("fs");
2
- const postcss = require("postcss");
3
- const createScopedName = require("./createScopedName");
4
-
5
- function registerCSSRequireHook() {
6
- require.extensions[".css"] = function (module, filename) {
7
- const cssContent = fs.readFileSync(filename, "utf8");
8
- const jsonResult = {};
9
-
10
- const plugin = {
11
- postcssPlugin: "extract-classes",
12
- Rule(rule) {
13
- // Ignore classes inside animations (@keyframes)
14
- if (rule.parent && rule.parent.name === "keyframes") {
15
- return;
16
- }
17
-
18
- const selector = rule.selector;
19
- // Regex to capture valid class names
20
- const classRegex = /\.([_a-zA-Z0-9-]+)/g;
21
- let match;
22
-
23
- while ((match = classRegex.exec(selector)) !== null) {
24
- const className = match[1];
25
-
26
- // Handle :global and :local selectors
27
- const index = match.index;
28
- const before = selector.slice(0, index);
29
- const lastGlobal = before.lastIndexOf(":global");
30
- const lastLocal = before.lastIndexOf(":local");
31
-
32
- // If the class is under an active :global scope, do not hash it
33
- if (lastGlobal > lastLocal) {
34
- const afterGlobal = before.slice(lastGlobal);
35
- if (afterGlobal.includes("(")) {
36
- const openParens = afterGlobal.split("(").length - 1;
37
- const closeParens = afterGlobal.split(")").length - 1;
38
- if (openParens > closeParens) {
39
- jsonResult[className] = className;
40
- continue;
41
- }
42
- } else {
43
- // Example: :global .my-class (without parentheses)
44
- jsonResult[className] = className;
45
- continue;
46
- }
47
- }
48
-
49
- // If it is a local class, generate the corresponding deterministic hash
50
- if (!jsonResult[className]) {
51
- jsonResult[className] = createScopedName(className, filename);
52
- }
53
- }
54
- }
55
- };
56
-
57
- // Process strictly synchronously (PostCSS is synchronous if its plugins are)
58
- postcss([plugin]).process(cssContent, { from: filename }).css;
59
-
60
- module.exports = jsonResult;
61
- };
62
- }
63
-
64
- module.exports = registerCSSRequireHook;
package/dinou/index.mjs DELETED
@@ -1,43 +0,0 @@
1
- import { getContext } from "./core/request-context.js";
2
- import {
3
- usePathname,
4
- useSearchParams,
5
- useRouter,
6
- refreshSlot,
7
- useNavigationLoading,
8
- } from "./core/navigation.js";
9
- import { redirect } from "./core/redirect.jsx";
10
- import { ClientRedirect } from "./core/client-redirect.jsx";
11
- import { Link } from "./core/link.jsx";
12
-
13
- function defineConfig(config) {
14
- return config;
15
- }
16
-
17
- const dinou = {
18
- defineConfig,
19
- getContext,
20
- usePathname,
21
- useSearchParams,
22
- useRouter,
23
- refreshSlot,
24
- useNavigationLoading,
25
- redirect,
26
- ClientRedirect,
27
- Link,
28
- };
29
-
30
- export {
31
- defineConfig,
32
- getContext,
33
- usePathname,
34
- useSearchParams,
35
- useRouter,
36
- refreshSlot,
37
- useNavigationLoading,
38
- redirect,
39
- ClientRedirect,
40
- Link,
41
- };
42
-
43
- export default dinou;
package/dinou/server.mjs DELETED
@@ -1,30 +0,0 @@
1
- export async function revalidatePath(path, options) {
2
- const { revalidatePath: fn } = await import("./core/cache-revalidate.js");
3
- return fn(path, options);
4
- }
5
-
6
- export async function revalidatePage(path) {
7
- const { revalidatePage: fn } = await import("./core/cache-revalidate.js");
8
- return fn(path);
9
- }
10
-
11
- export async function revalidateTag(tag, options) {
12
- const { revalidateTag: fn } = await import("./core/cache-revalidate.js");
13
- return fn(tag, options);
14
- }
15
-
16
- export async function DinouCacheSlot(props) {
17
- const { DinouCacheSlot: fn } = await import("./core/cache-slot.js");
18
- return fn(props);
19
- }
20
-
21
- export {
22
- StorageAdapter,
23
- FileSystemStorage,
24
- CloudflareKVStorage,
25
- DenoKVStorage,
26
- MemoryStorage,
27
- RedisStorage,
28
- getStorageAdapter,
29
- setStorageAdapter,
30
- } from "./core/storage-adapter.js";