dinou 7.0.0 → 7.2.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/CHANGELOG.md +23 -0
- package/README.md +77 -187
- package/cli.js +429 -344
- package/dinou/adapters/netlify.js +3 -15
- package/dinou/cloudflare/build.mjs +1 -0
- package/dinou/core/build-static-pages.js +22 -17
- package/dinou/core/get-jsx.js +4 -2
- package/dinou/core/handler.js +19 -12
- package/dinou/core/layout-functions.js +13 -11
- package/dinou/core/load-dinou-config.js +35 -3
- package/dinou/core/parse-exports.js +46 -1
- package/dinou/core/render-jsx-to-client-jsx.js +0 -114
- package/dinou/core/resolve-module-ppr.js +2 -0
- package/dinou/core/server-function-proxy-webpack.js +20 -1
- package/dinou/core/server-function-proxy.js +20 -1
- package/dinou/esbuild/helpers-esbuild/strip-namespace.mjs +9 -9
- package/dinou/index.d.ts +21 -0
- package/dinou/node/build.mjs +45 -2
- package/dinou/node/dev.mjs +48 -1
- package/dinou/package.json +1 -1
- package/eject.js +217 -173
- package/package.json +110 -110
- package/dinou/core/babel-esm-loader.js +0 -267
package/eject.js
CHANGED
|
@@ -1,173 +1,217 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const { execSync } = require("child_process");
|
|
4
|
-
|
|
5
|
-
const dinouPath = path.resolve(__dirname, "dinou");
|
|
6
|
-
const projectRoot = process.cwd();
|
|
7
|
-
|
|
8
|
-
console.log("🚀 Starting Dinou ejecting process...");
|
|
9
|
-
|
|
10
|
-
fs.cpSync(dinouPath, path.join(projectRoot, "dinou"), {
|
|
11
|
-
recursive: true,
|
|
12
|
-
});
|
|
13
|
-
console.log("✅ Files copied to ./dinou");
|
|
14
|
-
|
|
15
|
-
const pkgPath = path.join(projectRoot, "package.json");
|
|
16
|
-
const pkg = require(pkgPath);
|
|
17
|
-
|
|
18
|
-
pkg.scripts = pkg.scripts || {};
|
|
19
|
-
|
|
20
|
-
const ejectedScripts = {
|
|
21
|
-
dev: "npm run dev:esbuild",
|
|
22
|
-
build: "npm run build:node",
|
|
23
|
-
start: "npm run start:node",
|
|
24
|
-
"dev:esbuild": "cross-env DINOU_BUILD_TOOL=esbuild node dinou/node/dev.mjs",
|
|
25
|
-
"dev:rollup": "cross-env DINOU_BUILD_TOOL=rollup node dinou/node/dev.mjs",
|
|
26
|
-
"dev:webpack": "cross-env DINOU_BUILD_TOOL=webpack node dinou/node/dev.mjs",
|
|
27
|
-
"build:node": "npm run build:client:esbuild && node ./dinou/node/build.mjs",
|
|
28
|
-
"build:node:esbuild": "npm run build:node",
|
|
29
|
-
"build:node:rollup": "npm run build:client:rollup && node ./dinou/node/build.mjs",
|
|
30
|
-
"build:node:webpack": "npm run build:client:webpack && cross-env DINOU_BUILD_TOOL=webpack node ./dinou/node/build.mjs",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"build:
|
|
36
|
-
"build:
|
|
37
|
-
"build:
|
|
38
|
-
"build:
|
|
39
|
-
"build:
|
|
40
|
-
"build:
|
|
41
|
-
"build:
|
|
42
|
-
"build:
|
|
43
|
-
"build:
|
|
44
|
-
"build:
|
|
45
|
-
"build:
|
|
46
|
-
"build:
|
|
47
|
-
"build:
|
|
48
|
-
"build:
|
|
49
|
-
"build:
|
|
50
|
-
"build:
|
|
51
|
-
"build:
|
|
52
|
-
"build:
|
|
53
|
-
"build:
|
|
54
|
-
"build:
|
|
55
|
-
"build:
|
|
56
|
-
"build:
|
|
57
|
-
"build:
|
|
58
|
-
"build:
|
|
59
|
-
"build:
|
|
60
|
-
"build:
|
|
61
|
-
"build:
|
|
62
|
-
"build:
|
|
63
|
-
"
|
|
64
|
-
"build:
|
|
65
|
-
"build:
|
|
66
|
-
"build:
|
|
67
|
-
"build:
|
|
68
|
-
"build:
|
|
69
|
-
"build:
|
|
70
|
-
"build:
|
|
71
|
-
"build:
|
|
72
|
-
"build:
|
|
73
|
-
"build:
|
|
74
|
-
"build:
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"build:
|
|
80
|
-
"build:
|
|
81
|
-
"build:
|
|
82
|
-
"build:
|
|
83
|
-
"build:
|
|
84
|
-
"build:
|
|
85
|
-
"build:
|
|
86
|
-
"build:
|
|
87
|
-
"build:
|
|
88
|
-
"build:
|
|
89
|
-
"build:
|
|
90
|
-
"build:
|
|
91
|
-
"build:
|
|
92
|
-
"build:
|
|
93
|
-
"build:
|
|
94
|
-
"build:
|
|
95
|
-
"build:
|
|
96
|
-
"build:
|
|
97
|
-
"build:
|
|
98
|
-
"build:
|
|
99
|
-
"build:
|
|
100
|
-
"build:
|
|
101
|
-
"build:
|
|
102
|
-
"build:
|
|
103
|
-
"build:
|
|
104
|
-
"build:
|
|
105
|
-
"build:
|
|
106
|
-
"build:
|
|
107
|
-
"
|
|
108
|
-
"build:bun
|
|
109
|
-
"build:bun:
|
|
110
|
-
"build:bun:
|
|
111
|
-
"build:bun:
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"build:
|
|
121
|
-
"build:
|
|
122
|
-
"build:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
)
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const { execSync } = require("child_process");
|
|
4
|
+
|
|
5
|
+
const dinouPath = path.resolve(__dirname, "dinou");
|
|
6
|
+
const projectRoot = process.cwd();
|
|
7
|
+
|
|
8
|
+
console.log("🚀 Starting Dinou ejecting process...");
|
|
9
|
+
|
|
10
|
+
fs.cpSync(dinouPath, path.join(projectRoot, "dinou"), {
|
|
11
|
+
recursive: true,
|
|
12
|
+
});
|
|
13
|
+
console.log("✅ Files copied to ./dinou");
|
|
14
|
+
|
|
15
|
+
const pkgPath = path.join(projectRoot, "package.json");
|
|
16
|
+
const pkg = require(pkgPath);
|
|
17
|
+
|
|
18
|
+
pkg.scripts = pkg.scripts || {};
|
|
19
|
+
|
|
20
|
+
const ejectedScripts = {
|
|
21
|
+
dev: "npm run dev:esbuild",
|
|
22
|
+
build: "npm run build:node",
|
|
23
|
+
start: "npm run start:node",
|
|
24
|
+
"dev:esbuild": "cross-env DINOU_BUILD_TOOL=esbuild node dinou/node/dev.mjs",
|
|
25
|
+
"dev:rollup": "cross-env DINOU_BUILD_TOOL=rollup node dinou/node/dev.mjs",
|
|
26
|
+
"dev:webpack": "cross-env DINOU_BUILD_TOOL=webpack node dinou/node/dev.mjs",
|
|
27
|
+
"build:node": "npm run build:client:esbuild && node ./dinou/node/build.mjs",
|
|
28
|
+
"build:node:esbuild": "npm run build:node",
|
|
29
|
+
"build:node:rollup": "npm run build:client:rollup && node ./dinou/node/build.mjs",
|
|
30
|
+
"build:node:webpack": "npm run build:client:webpack && cross-env DINOU_BUILD_TOOL=webpack node ./dinou/node/build.mjs",
|
|
31
|
+
"build:node:compile": "npm run build:node:compile:esbuild",
|
|
32
|
+
"build:node:compile:esbuild": "npm run build:node:esbuild && bun build --compile .dinou/node/server.mjs --outfile dist/server",
|
|
33
|
+
"build:node:compile:rollup": "npm run build:node:rollup && bun build --compile .dinou/node/server.mjs --outfile dist/server",
|
|
34
|
+
"build:node:compile:webpack": "npm run build:node:webpack && bun build --compile .dinou/node/server.mjs --outfile dist/server",
|
|
35
|
+
"build:node:compile:linux": "npm run build:node:compile:linux:esbuild",
|
|
36
|
+
"build:node:compile:linux:esbuild": "npm run build:node:esbuild && bun build --compile --target=bun-linux-x64 .dinou/node/server.mjs --outfile dist/server-linux",
|
|
37
|
+
"build:node:compile:linux:rollup": "npm run build:node:rollup && bun build --compile --target=bun-linux-x64 .dinou/node/server.mjs --outfile dist/server-linux",
|
|
38
|
+
"build:node:compile:linux:webpack": "npm run build:node:webpack && bun build --compile --target=bun-linux-x64 .dinou/node/server.mjs --outfile dist/server-linux",
|
|
39
|
+
"build:node:compile:linux_arm": "npm run build:node:compile:linux_arm:esbuild",
|
|
40
|
+
"build:node:compile:linux_arm:esbuild": "npm run build:node:esbuild && bun build --compile --target=bun-linux-arm64 .dinou/node/server.mjs --outfile dist/server-linux-arm",
|
|
41
|
+
"build:node:compile:linux_arm:rollup": "npm run build:node:rollup && bun build --compile --target=bun-linux-arm64 .dinou/node/server.mjs --outfile dist/server-linux-arm",
|
|
42
|
+
"build:node:compile:linux_arm:webpack": "npm run build:node:webpack && bun build --compile --target=bun-linux-arm64 .dinou/node/server.mjs --outfile dist/server-linux-arm",
|
|
43
|
+
"build:node:compile:mac": "npm run build:node:compile:mac:esbuild",
|
|
44
|
+
"build:node:compile:mac:esbuild": "npm run build:node:esbuild && bun build --compile --target=bun-darwin-arm64 .dinou/node/server.mjs --outfile dist/server-mac",
|
|
45
|
+
"build:node:compile:mac:rollup": "npm run build:node:rollup && bun build --compile --target=bun-darwin-arm64 .dinou/node/server.mjs --outfile dist/server-mac",
|
|
46
|
+
"build:node:compile:mac:webpack": "npm run build:node:webpack && bun build --compile --target=bun-darwin-arm64 .dinou/node/server.mjs --outfile dist/server-mac",
|
|
47
|
+
"build:node:compile:win": "npm run build:node:compile:win:esbuild",
|
|
48
|
+
"build:node:compile:win:esbuild": "npm run build:node:esbuild && bun build --compile --target=bun-windows-x64 .dinou/node/server.mjs --outfile dist/server-win",
|
|
49
|
+
"build:node:compile:win:rollup": "npm run build:node:rollup && bun build --compile --target=bun-windows-x64 .dinou/node/server.mjs --outfile dist/server-win",
|
|
50
|
+
"build:node:compile:win:webpack": "npm run build:node:webpack && bun build --compile --target=bun-windows-x64 .dinou/node/server.mjs --outfile dist/server-win",
|
|
51
|
+
"build:node:pure": "npm run build:node:pure:esbuild",
|
|
52
|
+
"build:node:pure:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/node/build.mjs",
|
|
53
|
+
"build:node:pure:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/node/build.mjs",
|
|
54
|
+
"build:node:pure:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/node/build.mjs",
|
|
55
|
+
"build:node:pure:compile": "npm run build:node:pure:compile:esbuild",
|
|
56
|
+
"build:node:pure:compile:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/node/build.mjs && bun build --compile .dinou/node/server.mjs --outfile dist/server",
|
|
57
|
+
"build:node:pure:compile:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/node/build.mjs && bun build --compile .dinou/node/server.mjs --outfile dist/server",
|
|
58
|
+
"build:node:pure:compile:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/node/build.mjs && bun build --compile .dinou/node/server.mjs --outfile dist/server",
|
|
59
|
+
"build:node:pure:compile:linux": "npm run build:node:pure:compile:linux:esbuild",
|
|
60
|
+
"build:node:pure:compile:linux:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/node/build.mjs && bun build --compile --target=bun-linux-x64 .dinou/node/server.mjs --outfile dist/server-linux",
|
|
61
|
+
"build:node:pure:compile:linux:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/node/build.mjs && bun build --compile --target=bun-linux-x64 .dinou/node/server.mjs --outfile dist/server-linux",
|
|
62
|
+
"build:node:pure:compile:linux:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/node/build.mjs && bun build --compile --target=bun-linux-x64 .dinou/node/server.mjs --outfile dist/server-linux",
|
|
63
|
+
"build:node:pure:compile:linux_arm": "npm run build:node:pure:compile:linux_arm:esbuild",
|
|
64
|
+
"build:node:pure:compile:linux_arm:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/node/build.mjs && bun build --compile --target=bun-linux-arm64 .dinou/node/server.mjs --outfile dist/server-linux-arm",
|
|
65
|
+
"build:node:pure:compile:linux_arm:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/node/build.mjs && bun build --compile --target=bun-linux-arm64 .dinou/node/server.mjs --outfile dist/server-linux-arm",
|
|
66
|
+
"build:node:pure:compile:linux_arm:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/node/build.mjs && bun build --compile --target=bun-linux-arm64 .dinou/node/server.mjs --outfile dist/server-linux-arm",
|
|
67
|
+
"build:node:pure:compile:mac": "npm run build:node:pure:compile:mac:esbuild",
|
|
68
|
+
"build:node:pure:compile:mac:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/node/build.mjs && bun build --compile --target=bun-darwin-arm64 .dinou/node/server.mjs --outfile dist/server-mac",
|
|
69
|
+
"build:node:pure:compile:mac:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/node/build.mjs && bun build --compile --target=bun-darwin-arm64 .dinou/node/server.mjs --outfile dist/server-mac",
|
|
70
|
+
"build:node:pure:compile:mac:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/node/build.mjs && bun build --compile --target=bun-darwin-arm64 .dinou/node/server.mjs --outfile dist/server-mac",
|
|
71
|
+
"build:node:pure:compile:win": "npm run build:node:pure:compile:win:esbuild",
|
|
72
|
+
"build:node:pure:compile:win:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/node/build.mjs && bun build --compile --target=bun-windows-x64 .dinou/node/server.mjs --outfile dist/server-win",
|
|
73
|
+
"build:node:pure:compile:win:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/node/build.mjs && bun build --compile --target=bun-windows-x64 .dinou/node/server.mjs --outfile dist/server-win",
|
|
74
|
+
"build:node:pure:compile:win:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/node/build.mjs && bun build --compile --target=bun-windows-x64 .dinou/node/server.mjs --outfile dist/server-win",
|
|
75
|
+
"start:node": "cross-env NODE_ENV=production node dinou/adapters/node.mjs",
|
|
76
|
+
"start:node:esbuild": "npm run start:node",
|
|
77
|
+
"start:node:rollup": "npm run start:node",
|
|
78
|
+
"start:node:webpack": "cross-env NODE_ENV=production DINOU_BUILD_TOOL=webpack node dinou/adapters/node.mjs",
|
|
79
|
+
"build:cloudflare": "npm run build:client:esbuild && node ./dinou/cloudflare/build.mjs",
|
|
80
|
+
"build:cloudflare:esbuild": "npm run build:cloudflare",
|
|
81
|
+
"build:cloudflare:rollup": "npm run build:client:rollup && node ./dinou/cloudflare/build.mjs",
|
|
82
|
+
"build:cloudflare:webpack": "npm run build:client:webpack && cross-env DINOU_BUILD_TOOL=webpack node ./dinou/cloudflare/build.mjs",
|
|
83
|
+
"build:deno": "npm run build:client:esbuild && node ./dinou/deno/build.mjs && deno run --unstable-kv --allow-net --allow-read --allow-write --allow-env dinou/deno/seed-kv.js",
|
|
84
|
+
"build:deno:esbuild": "npm run build:deno",
|
|
85
|
+
"build:deno:rollup": "npm run build:client:rollup && node ./dinou/deno/build.mjs && deno run --unstable-kv --allow-net --allow-read --allow-write --allow-env dinou/deno/seed-kv.js",
|
|
86
|
+
"build:deno:webpack": "npm run build:client:webpack && cross-env DINOU_BUILD_TOOL=webpack node ./dinou/deno/build.mjs && deno run --unstable-kv --allow-net --allow-read --allow-write --allow-env dinou/deno/seed-kv.js",
|
|
87
|
+
"build:deno:compile": "npm run build:deno:compile:esbuild",
|
|
88
|
+
"build:deno:compile:esbuild": "npm run build:deno:esbuild && deno compile --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server .dinou/deno/main.js",
|
|
89
|
+
"build:deno:compile:rollup": "npm run build:deno:rollup && deno compile --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server .dinou/deno/main.js",
|
|
90
|
+
"build:deno:compile:webpack": "npm run build:deno:webpack && deno compile --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server .dinou/deno/main.js",
|
|
91
|
+
"build:deno:compile:linux": "npm run build:deno:compile:linux:esbuild",
|
|
92
|
+
"build:deno:compile:linux:esbuild": "npm run build:deno:esbuild && deno compile --target x86_64-unknown-linux-gnu --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-linux .dinou/deno/main.js",
|
|
93
|
+
"build:deno:compile:linux:rollup": "npm run build:deno:rollup && deno compile --target x86_64-unknown-linux-gnu --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-linux .dinou/deno/main.js",
|
|
94
|
+
"build:deno:compile:linux:webpack": "npm run build:deno:webpack && deno compile --target x86_64-unknown-linux-gnu --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-linux .dinou/deno/main.js",
|
|
95
|
+
"build:deno:compile:linux_arm": "npm run build:deno:compile:linux_arm:esbuild",
|
|
96
|
+
"build:deno:compile:linux_arm:esbuild": "npm run build:deno:esbuild && deno compile --target aarch64-unknown-linux-gnu --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-linux-arm .dinou/deno/main.js",
|
|
97
|
+
"build:deno:compile:linux_arm:rollup": "npm run build:deno:rollup && deno compile --target aarch64-unknown-linux-gnu --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-linux-arm .dinou/deno/main.js",
|
|
98
|
+
"build:deno:compile:linux_arm:webpack": "npm run build:deno:webpack && deno compile --target aarch64-unknown-linux-gnu --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-linux-arm .dinou/deno/main.js",
|
|
99
|
+
"build:deno:compile:mac": "npm run build:deno:compile:mac:esbuild",
|
|
100
|
+
"build:deno:compile:mac:esbuild": "npm run build:deno:esbuild && deno compile --target aarch64-apple-darwin --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-mac .dinou/deno/main.js",
|
|
101
|
+
"build:deno:compile:mac:rollup": "npm run build:deno:rollup && deno compile --target aarch64-apple-darwin --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-mac .dinou/deno/main.js",
|
|
102
|
+
"build:deno:compile:mac:webpack": "npm run build:deno:webpack && deno compile --target aarch64-apple-darwin --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-mac .dinou/deno/main.js",
|
|
103
|
+
"build:deno:compile:win": "npm run build:deno:compile:win:esbuild",
|
|
104
|
+
"build:deno:compile:win:esbuild": "npm run build:deno:esbuild && deno compile --target x86_64-pc-windows-msvc --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-win .dinou/deno/main.js",
|
|
105
|
+
"build:deno:compile:win:rollup": "npm run build:deno:rollup && deno compile --target x86_64-pc-windows-msvc --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-win .dinou/deno/main.js",
|
|
106
|
+
"build:deno:compile:win:webpack": "npm run build:deno:webpack && deno compile --target x86_64-pc-windows-msvc --no-check --no-config --allow-net --allow-read --allow-write --allow-env --allow-sys --output dist/deno-server-win .dinou/deno/main.js",
|
|
107
|
+
"start:deno": "deno run --unstable-kv --allow-net --allow-read --allow-write --allow-env --allow-sys dinou/adapters/deno.js",
|
|
108
|
+
"build:bun": "npm run build:client:esbuild && node ./dinou/bun/build.mjs",
|
|
109
|
+
"build:bun:esbuild": "npm run build:bun",
|
|
110
|
+
"build:bun:rollup": "npm run build:client:rollup && node ./dinou/bun/build.mjs",
|
|
111
|
+
"build:bun:webpack": "npm run build:client:webpack && cross-env DINOU_BUILD_TOOL=webpack node ./dinou/bun/build.mjs",
|
|
112
|
+
"build:bun:compile": "npm run build:bun:compile:esbuild",
|
|
113
|
+
"build:bun:compile:esbuild": "npm run build:bun:esbuild && bun build --compile .dinou/bun/server.js --outfile dist/server",
|
|
114
|
+
"build:bun:compile:rollup": "npm run build:bun:rollup && bun build --compile .dinou/bun/server.js --outfile dist/server",
|
|
115
|
+
"build:bun:compile:webpack": "npm run build:bun:webpack && bun build --compile .dinou/bun/server.js --outfile dist/server",
|
|
116
|
+
"build:bun:compile:linux": "npm run build:bun:compile:linux:esbuild",
|
|
117
|
+
"build:bun:compile:linux:esbuild": "npm run build:bun:esbuild && bun build --compile --target=bun-linux-x64 .dinou/bun/server.js --outfile dist/server-linux",
|
|
118
|
+
"build:bun:compile:linux:rollup": "npm run build:bun:rollup && bun build --compile --target=bun-linux-x64 .dinou/bun/server.js --outfile dist/server-linux",
|
|
119
|
+
"build:bun:compile:linux:webpack": "npm run build:bun:webpack && bun build --compile --target=bun-linux-x64 .dinou/bun/server.js --outfile dist/server-linux",
|
|
120
|
+
"build:bun:compile:linux_arm": "npm run build:bun:compile:linux_arm:esbuild",
|
|
121
|
+
"build:bun:compile:linux_arm:esbuild": "npm run build:bun:esbuild && bun build --compile --target=bun-linux-arm64 .dinou/bun/server.js --outfile dist/server-linux-arm",
|
|
122
|
+
"build:bun:compile:linux_arm:rollup": "npm run build:bun:rollup && bun build --compile --target=bun-linux-arm64 .dinou/bun/server.js --outfile dist/server-linux-arm",
|
|
123
|
+
"build:bun:compile:linux_arm:webpack": "npm run build:bun:webpack && bun build --compile --target=bun-linux-arm64 .dinou/bun/server.js --outfile dist/server-linux-arm",
|
|
124
|
+
"build:bun:compile:mac": "npm run build:bun:compile:mac:esbuild",
|
|
125
|
+
"build:bun:compile:mac:esbuild": "npm run build:bun:esbuild && bun build --compile --target=bun-darwin-arm64 .dinou/bun/server.js --outfile dist/server-mac",
|
|
126
|
+
"build:bun:compile:mac:rollup": "npm run build:bun:rollup && bun build --compile --target=bun-darwin-arm64 .dinou/bun/server.js --outfile dist/server-mac",
|
|
127
|
+
"build:bun:compile:mac:webpack": "npm run build:bun:webpack && bun build --compile --target=bun-darwin-arm64 .dinou/bun/server.js --outfile dist/server-mac",
|
|
128
|
+
"build:bun:compile:win": "npm run build:bun:compile:win:esbuild",
|
|
129
|
+
"build:bun:compile:win:esbuild": "npm run build:bun:esbuild && bun build --compile --target=bun-windows-x64 .dinou/bun/server.js --outfile dist/server-win",
|
|
130
|
+
"build:bun:compile:win:rollup": "npm run build:bun:rollup && bun build --compile --target=bun-windows-x64 .dinou/bun/server.js --outfile dist/server-win",
|
|
131
|
+
"build:bun:compile:win:webpack": "npm run build:bun:webpack && bun build --compile --target=bun-windows-x64 .dinou/bun/server.js --outfile dist/server-win",
|
|
132
|
+
"build:bun:pure": "npm run build:bun:pure:esbuild",
|
|
133
|
+
"build:bun:pure:esbuild": "cross-env NODE_ENV=production bun dinou/esbuild/build.mjs && bun ./dinou/bun/build.mjs",
|
|
134
|
+
"build:bun:pure:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js && bun ./dinou/bun/build.mjs",
|
|
135
|
+
"build:bun:pure:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js && cross-env DINOU_BUILD_TOOL=webpack bun ./dinou/bun/build.mjs",
|
|
136
|
+
"build:bun:pure:compile": "npm run build:bun:pure:compile:esbuild",
|
|
137
|
+
"build:bun:pure:compile:esbuild": "npm run build:bun:pure:esbuild && bun build --compile .dinou/bun/server.js --outfile dist/server",
|
|
138
|
+
"build:bun:pure:compile:rollup": "npm run build:bun:pure:rollup && bun build --compile .dinou/bun/server.js --outfile dist/server",
|
|
139
|
+
"build:bun:pure:compile:webpack": "npm run build:bun:pure:webpack && bun build --compile .dinou/bun/server.js --outfile dist/server",
|
|
140
|
+
"build:bun:pure:compile:linux": "npm run build:bun:pure:compile:linux:esbuild",
|
|
141
|
+
"build:bun:pure:compile:linux:esbuild": "npm run build:bun:pure:esbuild && bun build --compile --target=bun-linux-x64 .dinou/bun/server.js --outfile dist/server-linux",
|
|
142
|
+
"build:bun:pure:compile:linux:rollup": "npm run build:bun:pure:rollup && bun build --compile --target=bun-linux-x64 .dinou/bun/server.js --outfile dist/server-linux",
|
|
143
|
+
"build:bun:pure:compile:linux:webpack": "npm run build:bun:pure:webpack && bun build --compile --target=bun-linux-x64 .dinou/bun/server.js --outfile dist/server-linux",
|
|
144
|
+
"build:bun:pure:compile:linux_arm": "npm run build:bun:pure:compile:linux_arm:esbuild",
|
|
145
|
+
"build:bun:pure:compile:linux_arm:esbuild": "npm run build:bun:pure:esbuild && bun build --compile --target=bun-linux-arm64 .dinou/bun/server.js --outfile dist/server-linux-arm",
|
|
146
|
+
"build:bun:pure:compile:linux_arm:rollup": "npm run build:bun:pure:rollup && bun build --compile --target=bun-linux-arm64 .dinou/bun/server.js --outfile dist/server-linux-arm",
|
|
147
|
+
"build:bun:pure:compile:linux_arm:webpack": "npm run build:bun:pure:webpack && bun build --compile --target=bun-linux-arm64 .dinou/bun/server.js --outfile dist/server-linux-arm",
|
|
148
|
+
"build:bun:pure:compile:mac": "npm run build:bun:pure:compile:mac:esbuild",
|
|
149
|
+
"build:bun:pure:compile:mac:esbuild": "npm run build:bun:pure:esbuild && bun build --compile --target=bun-darwin-arm64 .dinou/bun/server.js --outfile dist/server-mac",
|
|
150
|
+
"build:bun:pure:compile:mac:rollup": "npm run build:bun:pure:rollup && bun build --compile --target=bun-darwin-arm64 .dinou/bun/server.js --outfile dist/server-mac",
|
|
151
|
+
"build:bun:pure:compile:mac:webpack": "npm run build:bun:pure:webpack && bun build --compile --target=bun-darwin-arm64 .dinou/bun/server.js --outfile dist/server-mac",
|
|
152
|
+
"build:bun:pure:compile:win": "npm run build:bun:pure:compile:win:esbuild",
|
|
153
|
+
"build:bun:pure:compile:win:esbuild": "npm run build:bun:pure:esbuild && bun build --compile --target=bun-windows-x64 .dinou/bun/server.js --outfile dist/server-win",
|
|
154
|
+
"build:bun:pure:compile:win:rollup": "npm run build:bun:pure:rollup && bun build --compile --target=bun-windows-x64 .dinou/bun/server.js --outfile dist/server-win",
|
|
155
|
+
"build:bun:pure:compile:win:webpack": "npm run build:bun:pure:webpack && bun build --compile --target=bun-windows-x64 .dinou/bun/server.js --outfile dist/server-win",
|
|
156
|
+
"start:bun": "cross-env NODE_ENV=production bun dinou/adapters/bun.js",
|
|
157
|
+
"start:bun:esbuild": "npm run start:bun",
|
|
158
|
+
"start:bun:rollup": "npm run start:bun",
|
|
159
|
+
"start:bun:webpack": "cross-env NODE_ENV=production DINOU_BUILD_TOOL=webpack bun dinou/adapters/bun.js",
|
|
160
|
+
"export-static": "npm run export-static:esbuild",
|
|
161
|
+
"export-static:esbuild": "npm run build:client:esbuild && node ./dinou/core/export-static.mjs",
|
|
162
|
+
"export-static:rollup": "npm run build:client:rollup && node ./dinou/core/export-static.mjs",
|
|
163
|
+
"export-static:webpack": "npm run build:client:webpack && node ./dinou/core/export-static.mjs",
|
|
164
|
+
"build:client:esbuild": "cross-env NODE_ENV=production node dinou/esbuild/build.mjs",
|
|
165
|
+
"build:client:rollup": "cross-env NODE_ENV=production rollup -c ./dinou/rollup/rollup.config.js",
|
|
166
|
+
"build:client:webpack": "cross-env NODE_ENV=production webpack --config dinou/webpack/webpack.config.js",
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
Object.assign(pkg.scripts, ejectedScripts);
|
|
170
|
+
|
|
171
|
+
delete pkg.scripts.eject;
|
|
172
|
+
|
|
173
|
+
if (!pkg.dependencies) {
|
|
174
|
+
pkg.dependencies = {};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
pkg.dependencies["dinou"] = "file:./dinou";
|
|
178
|
+
|
|
179
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
180
|
+
|
|
181
|
+
function detectPackageManager() {
|
|
182
|
+
const userAgent = process.env.npm_config_user_agent;
|
|
183
|
+
|
|
184
|
+
if (userAgent) {
|
|
185
|
+
if (userAgent.startsWith("yarn")) return "yarn";
|
|
186
|
+
if (userAgent.startsWith("pnpm")) return "pnpm";
|
|
187
|
+
if (userAgent.startsWith("bun")) return "bun";
|
|
188
|
+
if (userAgent.startsWith("npm")) return "npm";
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (fs.existsSync(path.join(projectRoot, "yarn.lock"))) return "yarn";
|
|
192
|
+
if (fs.existsSync(path.join(projectRoot, "pnpm-lock.yaml"))) return "pnpm";
|
|
193
|
+
if (fs.existsSync(path.join(projectRoot, "bun.lockb")) || fs.existsSync(path.join(projectRoot, "bun.lock"))) return "bun";
|
|
194
|
+
if (fs.existsSync(path.join(projectRoot, "package-lock.json"))) return "npm";
|
|
195
|
+
|
|
196
|
+
return "npm";
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const pm = detectPackageManager();
|
|
200
|
+
console.log(`📦 Package manager detected: ${pm}`);
|
|
201
|
+
|
|
202
|
+
const installCommand = `${pm} install`;
|
|
203
|
+
|
|
204
|
+
console.log(`🔄 Executing '${installCommand}' to link dependencies...`);
|
|
205
|
+
|
|
206
|
+
try {
|
|
207
|
+
execSync(installCommand, { stdio: "inherit", cwd: projectRoot });
|
|
208
|
+
console.log("✅ Dependencies updated successfully");
|
|
209
|
+
} catch (error) {
|
|
210
|
+
console.error(
|
|
211
|
+
`❌ Error on executing ${installCommand}. Please, install dependencies manually`,
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
console.log(
|
|
216
|
+
"🎉 Eject completed successfully! Dinou is now running from local source.",
|
|
217
|
+
);
|