webstudio 0.0.0-588fe22 → 0.0.0-c1d6247
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/lib/cli.js +15 -8
- package/package.json +15 -14
- package/templates/defaults/package.json +8 -8
- package/templates/react-router/package.json +34 -0
- package/templates/react-router-docker/package.json +4 -32
- package/templates/react-router-netlify/app/constants.mjs +29 -0
- package/templates/react-router-netlify/netlify.toml +6 -0
- package/templates/react-router-netlify/package.json +10 -0
- package/templates/react-router-netlify/vite.config.ts +7 -0
- package/templates/ssg/package.json +7 -7
- /package/templates/{react-router-docker → react-router}/app/extension.ts +0 -0
- /package/templates/{react-router-docker → react-router}/app/root.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/default-sitemap.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/html.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/redirect.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/xml.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/routes/[robots.txt].tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/routes.ts +0 -0
- /package/templates/{react-router-docker → react-router}/public/favicon.ico +0 -0
- /package/templates/{react-router-docker → react-router}/tsconfig.json +0 -0
- /package/templates/{react-router-docker → react-router}/vite.config.ts +0 -0
package/lib/cli.js
CHANGED
|
@@ -79,13 +79,18 @@ const PROJECT_TEMPLATES = [
|
|
|
79
79
|
{
|
|
80
80
|
value: "docker",
|
|
81
81
|
label: "Docker",
|
|
82
|
-
expand: ["react-router-docker"]
|
|
82
|
+
expand: ["react-router", "react-router-docker"]
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
value: "vercel",
|
|
86
86
|
label: "Vercel",
|
|
87
87
|
expand: ["defaults", "vercel"]
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
value: "netlify",
|
|
91
|
+
label: "Netlify",
|
|
92
|
+
expand: ["react-router", "react-router-netlify"]
|
|
93
|
+
},
|
|
89
94
|
{
|
|
90
95
|
value: "netlify-functions",
|
|
91
96
|
label: "Netlify Functions",
|
|
@@ -5876,7 +5881,7 @@ Please check webstudio --help for more details`
|
|
|
5876
5881
|
let framework;
|
|
5877
5882
|
if (options.template.includes("ssg")) {
|
|
5878
5883
|
framework = await createFramework();
|
|
5879
|
-
} else if (options.template.includes("react-router
|
|
5884
|
+
} else if (options.template.includes("react-router")) {
|
|
5880
5885
|
framework = await createFramework$1();
|
|
5881
5886
|
} else {
|
|
5882
5887
|
framework = await createFramework$2();
|
|
@@ -5995,7 +6000,7 @@ Please check webstudio --help for more details`
|
|
|
5995
6000
|
assetsToDownload.push(
|
|
5996
6001
|
limit(
|
|
5997
6002
|
() => downloadAsset(
|
|
5998
|
-
`${assetOrigin}/cgi/image/${asset.name}?format=
|
|
6003
|
+
`${assetOrigin}/cgi/image/${asset.name}?format=raw`,
|
|
5999
6004
|
asset.name,
|
|
6000
6005
|
assetBaseUrl
|
|
6001
6006
|
)
|
|
@@ -6412,6 +6417,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6412
6417
|
switch (deployTarget) {
|
|
6413
6418
|
case "vercel":
|
|
6414
6419
|
return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
|
|
6420
|
+
case "netlify":
|
|
6415
6421
|
case "netlify-functions":
|
|
6416
6422
|
case "netlify-edge-functions":
|
|
6417
6423
|
return [
|
|
@@ -6426,7 +6432,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6426
6432
|
}
|
|
6427
6433
|
};
|
|
6428
6434
|
const name = "webstudio";
|
|
6429
|
-
const version = "0.0.0-
|
|
6435
|
+
const version = "0.0.0-c1d6247";
|
|
6430
6436
|
const description = "Webstudio CLI";
|
|
6431
6437
|
const author = "Webstudio <github@webstudio.is>";
|
|
6432
6438
|
const homepage = "https://webstudio.is";
|
|
@@ -6476,8 +6482,9 @@ const dependencies = {
|
|
|
6476
6482
|
const devDependencies = {
|
|
6477
6483
|
"@netlify/remix-adapter": "^2.5.1",
|
|
6478
6484
|
"@netlify/remix-edge-adapter": "3.4.2",
|
|
6479
|
-
"@react-router
|
|
6480
|
-
"@react-router/
|
|
6485
|
+
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
6486
|
+
"@react-router/dev": "^7.1.5",
|
|
6487
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
6481
6488
|
"@remix-run/cloudflare": "^2.15.2",
|
|
6482
6489
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
6483
6490
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -6503,9 +6510,9 @@ const devDependencies = {
|
|
|
6503
6510
|
prettier: "3.4.2",
|
|
6504
6511
|
react: "18.3.0-canary-14898b6a9-20240318",
|
|
6505
6512
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
6506
|
-
"react-router": "^7.1.
|
|
6513
|
+
"react-router": "^7.1.5",
|
|
6507
6514
|
"ts-expect": "^1.3.0",
|
|
6508
|
-
vike: "^0.4.
|
|
6515
|
+
vike: "^0.4.220",
|
|
6509
6516
|
vite: "^5.4.11",
|
|
6510
6517
|
vitest: "^3.0.2",
|
|
6511
6518
|
wrangler: "^3.63.2"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-c1d6247",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -45,8 +45,9 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@netlify/remix-adapter": "^2.5.1",
|
|
47
47
|
"@netlify/remix-edge-adapter": "3.4.2",
|
|
48
|
-
"@react-router
|
|
49
|
-
"@react-router/
|
|
48
|
+
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
49
|
+
"@react-router/dev": "^7.1.5",
|
|
50
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
50
51
|
"@remix-run/cloudflare": "^2.15.2",
|
|
51
52
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
52
53
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -62,21 +63,21 @@
|
|
|
62
63
|
"prettier": "3.4.2",
|
|
63
64
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
64
65
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
65
|
-
"react-router": "^7.1.
|
|
66
|
+
"react-router": "^7.1.5",
|
|
66
67
|
"ts-expect": "^1.3.0",
|
|
67
|
-
"vike": "^0.4.
|
|
68
|
+
"vike": "^0.4.220",
|
|
68
69
|
"vite": "^5.4.11",
|
|
69
70
|
"vitest": "^3.0.2",
|
|
70
71
|
"wrangler": "^3.63.2",
|
|
71
|
-
"@webstudio-is/http-client": "0.0.0-
|
|
72
|
-
"@webstudio-is/
|
|
73
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
74
|
-
"@webstudio-is/
|
|
75
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-
|
|
76
|
-
"@webstudio-is/sdk-components-react": "0.0.0-
|
|
77
|
-
"@webstudio-is/sdk-components-react-
|
|
78
|
-
"@webstudio-is/sdk-components-react-
|
|
79
|
-
"@webstudio-is/sdk-components-react-router": "0.0.0-
|
|
72
|
+
"@webstudio-is/http-client": "0.0.0-c1d6247",
|
|
73
|
+
"@webstudio-is/image": "0.0.0-c1d6247",
|
|
74
|
+
"@webstudio-is/react-sdk": "0.0.0-c1d6247",
|
|
75
|
+
"@webstudio-is/sdk": "0.0.0-c1d6247",
|
|
76
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
|
|
77
|
+
"@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
|
|
78
|
+
"@webstudio-is/sdk-components-react-remix": "0.0.0-c1d6247",
|
|
79
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
|
|
80
|
+
"@webstudio-is/sdk-components-react-router": "0.0.0-c1d6247",
|
|
80
81
|
"@webstudio-is/tsconfig": "1.0.7"
|
|
81
82
|
},
|
|
82
83
|
"scripts": {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"@remix-run/node": "2.15.2",
|
|
12
12
|
"@remix-run/react": "2.15.2",
|
|
13
13
|
"@remix-run/server-runtime": "2.15.2",
|
|
14
|
-
"@webstudio-is/image": "0.0.0-
|
|
15
|
-
"@webstudio-is/react-sdk": "0.0.0-
|
|
16
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.0.0-
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-
|
|
20
|
-
"@webstudio-is/sdk-components-react-remix": "0.0.0-
|
|
21
|
-
"isbot": "^5.1.
|
|
14
|
+
"@webstudio-is/image": "0.0.0-c1d6247",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.0.0-c1d6247",
|
|
16
|
+
"@webstudio-is/sdk": "0.0.0-c1d6247",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.0.0-c1d6247",
|
|
21
|
+
"isbot": "^5.1.22",
|
|
22
22
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
23
23
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
24
24
|
},
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"private": true,
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "react-router build",
|
|
7
|
+
"dev": "react-router dev",
|
|
8
|
+
"typecheck": "tsc"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@react-router/dev": "^7.1.5",
|
|
12
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
13
|
+
"@webstudio-is/image": "0.0.0-c1d6247",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.0.0-c1d6247",
|
|
15
|
+
"@webstudio-is/sdk": "0.0.0-c1d6247",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.0.0-c1d6247",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
|
|
20
|
+
"isbot": "^5.1.22",
|
|
21
|
+
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
22
|
+
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
23
|
+
"react-router": "^7.1.5",
|
|
24
|
+
"vite": "^5.4.11"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/react": "^18.2.70",
|
|
28
|
+
"@types/react-dom": "^18.2.25",
|
|
29
|
+
"typescript": "5.7.3"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,39 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"type": "module",
|
|
3
|
-
"private": true,
|
|
4
|
-
"sideEffects": false,
|
|
5
2
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"dev": "react-router dev",
|
|
8
|
-
"start": "react-router-serve ./build/server/index.js",
|
|
9
|
-
"typecheck": "tsc"
|
|
3
|
+
"start": "react-router-serve ./build/server/index.js"
|
|
10
4
|
},
|
|
11
5
|
"dependencies": {
|
|
12
|
-
"@react-router/
|
|
13
|
-
"@react-router/
|
|
14
|
-
"@react-router/node": "^7.1.3",
|
|
15
|
-
"@react-router/serve": "^7.1.3",
|
|
16
|
-
"@webstudio-is/image": "0.0.0-588fe22",
|
|
17
|
-
"@webstudio-is/react-sdk": "0.0.0-588fe22",
|
|
18
|
-
"@webstudio-is/sdk": "0.0.0-588fe22",
|
|
19
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-588fe22",
|
|
20
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-588fe22",
|
|
21
|
-
"@webstudio-is/sdk-components-react-router": "0.0.0-588fe22",
|
|
22
|
-
"@webstudio-is/sdk-components-react": "0.0.0-588fe22",
|
|
6
|
+
"@react-router/node": "^7.1.5",
|
|
7
|
+
"@react-router/serve": "^7.1.5",
|
|
23
8
|
"h3": "^1.14.0",
|
|
24
|
-
"ipx": "^3.0.1"
|
|
25
|
-
"isbot": "^5.1.21",
|
|
26
|
-
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
27
|
-
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
28
|
-
"react-router": "^7.1.3",
|
|
29
|
-
"vite": "^5.4.11"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/react": "^18.2.70",
|
|
33
|
-
"@types/react-dom": "^18.2.25",
|
|
34
|
-
"typescript": "5.7.3"
|
|
35
|
-
},
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=20.0.0"
|
|
9
|
+
"ipx": "^3.0.1"
|
|
38
10
|
}
|
|
39
11
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We use mjs extension as constants in this file is shared with the build script
|
|
3
|
+
* and we use `node --eval` to extract the constants.
|
|
4
|
+
*/
|
|
5
|
+
export const assetBaseUrl = "/assets/";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @type {import("@webstudio-is/image").ImageLoader}
|
|
9
|
+
*/
|
|
10
|
+
export const imageLoader = (props) => {
|
|
11
|
+
if (import.meta.env.DEV) {
|
|
12
|
+
return props.src;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (props.format === "raw") {
|
|
16
|
+
return props.src;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// https://docs.netlify.com/image-cdn/overview/
|
|
20
|
+
const searchParams = new URLSearchParams();
|
|
21
|
+
searchParams.set("url", props.src);
|
|
22
|
+
searchParams.set("w", props.width.toString());
|
|
23
|
+
if (props.height) {
|
|
24
|
+
searchParams.set("h", props.height.toString());
|
|
25
|
+
}
|
|
26
|
+
searchParams.set("q", props.quality.toString());
|
|
27
|
+
// fit=contain by default
|
|
28
|
+
return `/.netlify/images?${searchParams}`;
|
|
29
|
+
};
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@webstudio-is/image": "0.0.0-
|
|
12
|
-
"@webstudio-is/react-sdk": "0.0.0-
|
|
13
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
14
|
-
"@webstudio-is/sdk-components-react": "0.0.0-
|
|
15
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-
|
|
16
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-
|
|
11
|
+
"@webstudio-is/image": "0.0.0-c1d6247",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.0.0-c1d6247",
|
|
13
|
+
"@webstudio-is/sdk": "0.0.0-c1d6247",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
|
|
17
17
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
18
18
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
19
|
-
"vike": "^0.4.
|
|
19
|
+
"vike": "^0.4.220"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^18.2.70",
|
|
File without changes
|
|
File without changes
|
/package/templates/{react-router-docker → react-router}/app/route-templates/default-sitemap.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|