webstudio 0.0.0-4f7bf18 → 0.0.0-5844e28
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 +1 -7
- package/lib/cli.js +48 -89
- package/package.json +21 -22
- package/templates/defaults/package.json +8 -8
- package/templates/react-router/package.json +34 -0
- package/templates/react-router-docker/Dockerfile +6 -11
- package/templates/react-router-docker/package.json +5 -33
- package/templates/{netlify-edge-functions → react-router-netlify}/app/constants.mjs +1 -1
- 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/{netlify-functions → react-router-vercel}/app/constants.mjs +3 -7
- package/templates/react-router-vercel/package.json +9 -0
- package/templates/react-router-vercel/react-router.config.ts +6 -0
- package/templates/react-router-vercel/vercel.json +12 -0
- package/templates/ssg/package.json +7 -7
- package/templates/netlify-edge-functions/app/entry.server.tsx +0 -21
- package/templates/netlify-edge-functions/netlify.toml +0 -16
- package/templates/netlify-edge-functions/package.json +0 -9
- package/templates/netlify-edge-functions/vite.config.ts +0 -18
- package/templates/netlify-functions/app/entry.server.tsx +0 -1
- package/templates/netlify-functions/netlify.toml +0 -16
- package/templates/netlify-functions/package.json +0 -9
- package/templates/netlify-functions/vite.config.ts +0 -18
- /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/README.md
CHANGED
|
@@ -129,13 +129,7 @@ You can configure the project to support netlify serverless/edge-functions respe
|
|
|
129
129
|
You can manually change it using the `build` command. For serverless functions:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
webstudio build --template netlify
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
and for edge functions:
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
webstudio build --template netlify-edge-functions
|
|
132
|
+
webstudio build --template netlify
|
|
139
133
|
```
|
|
140
134
|
|
|
141
135
|
## Important Notes
|
package/lib/cli.js
CHANGED
|
@@ -28,7 +28,6 @@ import { kebabCase, camelCase } from "change-case";
|
|
|
28
28
|
import "nanoid";
|
|
29
29
|
import { parseExpressionAt } from "acorn";
|
|
30
30
|
import { simple } from "acorn-walk";
|
|
31
|
-
import warnOnce from "warn-once";
|
|
32
31
|
import reservedIdentifiers from "reserved-identifiers";
|
|
33
32
|
import hash from "@emotion/hash";
|
|
34
33
|
import { x } from "tinyexec";
|
|
@@ -77,18 +76,30 @@ const PROJECT_TEMPLATES = [
|
|
|
77
76
|
label: "Vanilla",
|
|
78
77
|
expand: ["defaults"]
|
|
79
78
|
},
|
|
80
|
-
{ value: "vercel", label: "Vercel", expand: ["defaults", "vercel"] },
|
|
81
79
|
{
|
|
82
|
-
value: "
|
|
83
|
-
label: "
|
|
84
|
-
expand: ["
|
|
80
|
+
value: "docker",
|
|
81
|
+
label: "Docker",
|
|
82
|
+
expand: ["react-router", "react-router-docker"]
|
|
85
83
|
},
|
|
86
84
|
{
|
|
87
|
-
value: "
|
|
88
|
-
label: "
|
|
89
|
-
expand: ["
|
|
85
|
+
value: "vercel",
|
|
86
|
+
label: "Vercel",
|
|
87
|
+
expand: ["react-router", "react-router-vercel"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: "vercel-legacy",
|
|
91
|
+
label: "Vercel (legacy)",
|
|
92
|
+
expand: ["defaults", "vercel"]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: "netlify",
|
|
96
|
+
label: "Netlify",
|
|
97
|
+
expand: ["react-router", "react-router-netlify"]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
value: "ssg",
|
|
101
|
+
label: "Static Site Generation (SSG)"
|
|
90
102
|
},
|
|
91
|
-
{ value: "ssg", label: "Static Site Generation (SSG)" },
|
|
92
103
|
{
|
|
93
104
|
value: "ssg-netlify",
|
|
94
105
|
label: "Static Site Generation (SSG) Netlify",
|
|
@@ -105,11 +116,6 @@ const INTERNAL_TEMPLATES = [
|
|
|
105
116
|
value: "cloudflare",
|
|
106
117
|
label: "Cloudflare",
|
|
107
118
|
expand: ["defaults", "cloudflare"]
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
value: "react-router-docker",
|
|
111
|
-
label: "Dokcer",
|
|
112
|
-
expand: ["react-router-docker"]
|
|
113
119
|
}
|
|
114
120
|
];
|
|
115
121
|
const isFileExists = async (filePath) => {
|
|
@@ -735,19 +741,13 @@ const prefixStyles = (styleMap) => {
|
|
|
735
741
|
if (property === "backdrop-filter") {
|
|
736
742
|
newStyleMap.set("-webkit-backdrop-filter", value);
|
|
737
743
|
}
|
|
744
|
+
if (property === "view-timeline-name" || property === "scroll-timeline-name") {
|
|
745
|
+
newStyleMap.set(`--${property}`, value);
|
|
746
|
+
}
|
|
738
747
|
newStyleMap.set(property, value);
|
|
739
748
|
}
|
|
740
749
|
return newStyleMap;
|
|
741
750
|
};
|
|
742
|
-
const captureError = (error, value) => {
|
|
743
|
-
if (process.env.NODE_ENV === "development") {
|
|
744
|
-
throw error;
|
|
745
|
-
}
|
|
746
|
-
setTimeout(() => {
|
|
747
|
-
throw error;
|
|
748
|
-
});
|
|
749
|
-
return value;
|
|
750
|
-
};
|
|
751
751
|
const fallbackTransform = (styleValue) => {
|
|
752
752
|
var _a;
|
|
753
753
|
if (styleValue.type !== "fontFamily") {
|
|
@@ -839,7 +839,7 @@ const toValue = (styleValue, transformValue) => {
|
|
|
839
839
|
if (value.type === "guaranteedInvalid") {
|
|
840
840
|
return "";
|
|
841
841
|
}
|
|
842
|
-
return
|
|
842
|
+
return "";
|
|
843
843
|
};
|
|
844
844
|
const Unit = z.string();
|
|
845
845
|
const UnitValue = z.object({
|
|
@@ -2490,6 +2490,7 @@ const generateExpression = ({
|
|
|
2490
2490
|
usedDataSources == null ? void 0 : usedDataSources.set(dep.id, dep);
|
|
2491
2491
|
return scope.getName(dep.id, dep.name);
|
|
2492
2492
|
}
|
|
2493
|
+
return "undefined";
|
|
2493
2494
|
}
|
|
2494
2495
|
});
|
|
2495
2496
|
};
|
|
@@ -3439,7 +3440,7 @@ ${prop.name}={${propValue}}`;
|
|
|
3439
3440
|
return "";
|
|
3440
3441
|
}
|
|
3441
3442
|
const indexVariable = scope.getName(`${instance.id}-index`, "index");
|
|
3442
|
-
generatedElement += `{${collectionDataValue}?.map((${collectionItemValue}: any, ${indexVariable}: number) =>
|
|
3443
|
+
generatedElement += `{${collectionDataValue}?.map?.((${collectionItemValue}: any, ${indexVariable}: number) =>
|
|
3443
3444
|
`;
|
|
3444
3445
|
generatedElement += `<Fragment key={${indexVariable}}>
|
|
3445
3446
|
`;
|
|
@@ -3637,47 +3638,6 @@ const generateWebstudioComponent = ({
|
|
|
3637
3638
|
`;
|
|
3638
3639
|
return generatedComponent;
|
|
3639
3640
|
};
|
|
3640
|
-
const imageSizes = [16, 32, 48, 64, 96, 128, 256, 384];
|
|
3641
|
-
const deviceSizes = [640, 750, 828, 1080, 1200, 1920, 2048, 3840];
|
|
3642
|
-
const allSizes = [...imageSizes, ...deviceSizes];
|
|
3643
|
-
const NON_EXISTING_DOMAIN = "https://a3cbcbec-cdb1-4ea4-ad60-43c795308ddc.ddc";
|
|
3644
|
-
const joinPath = (...segments) => {
|
|
3645
|
-
return segments.filter((segment) => segment !== "").map((segment) => segment.replace(/(^\/+|\/+$)/g, "")).join("/");
|
|
3646
|
-
};
|
|
3647
|
-
const encodePathFragment = (fragment) => {
|
|
3648
|
-
return encodeURIComponent(fragment).replace(/%2F/g, "/");
|
|
3649
|
-
};
|
|
3650
|
-
const wsImageLoader = (props2) => {
|
|
3651
|
-
const width = props2.format === "raw" ? 16 : props2.width;
|
|
3652
|
-
const quality = props2.format === "raw" ? 100 : props2.quality;
|
|
3653
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3654
|
-
warnOnce(
|
|
3655
|
-
allSizes.includes(width) === false,
|
|
3656
|
-
"Width must be only from allowed values"
|
|
3657
|
-
);
|
|
3658
|
-
}
|
|
3659
|
-
let src = props2.src;
|
|
3660
|
-
if (src.startsWith("/cgi/asset")) {
|
|
3661
|
-
src = src.slice("/cgi/asset".length);
|
|
3662
|
-
}
|
|
3663
|
-
const resultUrl = new URL("/cgi/image/", NON_EXISTING_DOMAIN);
|
|
3664
|
-
if (props2.format !== "raw") {
|
|
3665
|
-
resultUrl.searchParams.set("width", width.toString());
|
|
3666
|
-
resultUrl.searchParams.set("quality", quality.toString());
|
|
3667
|
-
if (props2.height != null) {
|
|
3668
|
-
resultUrl.searchParams.set("height", props2.height.toString());
|
|
3669
|
-
}
|
|
3670
|
-
if (props2.fit != null) {
|
|
3671
|
-
resultUrl.searchParams.set("fit", props2.fit);
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
resultUrl.searchParams.set("format", props2.format ?? "auto");
|
|
3675
|
-
resultUrl.pathname = joinPath(resultUrl.pathname, encodePathFragment(src));
|
|
3676
|
-
if (resultUrl.href.startsWith(NON_EXISTING_DOMAIN)) {
|
|
3677
|
-
return `${resultUrl.pathname}?${resultUrl.searchParams.toString()}`;
|
|
3678
|
-
}
|
|
3679
|
-
return resultUrl.href;
|
|
3680
|
-
};
|
|
3681
3641
|
const BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
3682
3642
|
"async",
|
|
3683
3643
|
"autofocus",
|
|
@@ -4640,7 +4600,7 @@ const meta$4 = {
|
|
|
4640
4600
|
const meta$3 = {
|
|
4641
4601
|
category: "hidden",
|
|
4642
4602
|
icon: ResourceIcon,
|
|
4643
|
-
type: "
|
|
4603
|
+
type: "embed",
|
|
4644
4604
|
constraints: {
|
|
4645
4605
|
relation: "parent",
|
|
4646
4606
|
component: { $eq: "HeadSlot" }
|
|
@@ -4649,7 +4609,7 @@ const meta$3 = {
|
|
|
4649
4609
|
const meta$2 = {
|
|
4650
4610
|
category: "hidden",
|
|
4651
4611
|
icon: WindowInfoIcon,
|
|
4652
|
-
type: "
|
|
4612
|
+
type: "embed",
|
|
4653
4613
|
constraints: {
|
|
4654
4614
|
relation: "parent",
|
|
4655
4615
|
component: { $eq: "HeadSlot" }
|
|
@@ -5871,6 +5831,11 @@ const copyTemplates = async (template) => {
|
|
|
5871
5831
|
const importFrom = (importee, importer) => {
|
|
5872
5832
|
return relative(dirname(importer), importee).replaceAll("\\", "/");
|
|
5873
5833
|
};
|
|
5834
|
+
const npmrc = `force=true
|
|
5835
|
+
loglevel=error
|
|
5836
|
+
audit=false
|
|
5837
|
+
fund=false
|
|
5838
|
+
`;
|
|
5874
5839
|
const prebuild = async (options) => {
|
|
5875
5840
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
5876
5841
|
if (options.template.length === 0) {
|
|
@@ -5898,14 +5863,14 @@ Please check webstudio --help for more details`
|
|
|
5898
5863
|
await rm(generatedDir, { recursive: true, force: true });
|
|
5899
5864
|
const routesDir = join(appRoot, "routes");
|
|
5900
5865
|
await rm(routesDir, { recursive: true, force: true });
|
|
5901
|
-
await writeFile(join(cwd(), ".npmrc"),
|
|
5866
|
+
await writeFile(join(cwd(), ".npmrc"), npmrc);
|
|
5902
5867
|
for (const template of options.template) {
|
|
5903
5868
|
await copyTemplates(template);
|
|
5904
5869
|
}
|
|
5905
5870
|
let framework;
|
|
5906
5871
|
if (options.template.includes("ssg")) {
|
|
5907
5872
|
framework = await createFramework();
|
|
5908
|
-
} else if (options.template.includes("react-router
|
|
5873
|
+
} else if (options.template.includes("react-router")) {
|
|
5909
5874
|
framework = await createFramework$1();
|
|
5910
5875
|
} else {
|
|
5911
5876
|
framework = await createFramework$2();
|
|
@@ -6021,14 +5986,10 @@ Please check webstudio --help for more details`
|
|
|
6021
5986
|
const assetOrigin = siteData.origin;
|
|
6022
5987
|
for (const asset of siteData.assets) {
|
|
6023
5988
|
if (asset.type === "image") {
|
|
6024
|
-
const imagePath = wsImageLoader({
|
|
6025
|
-
src: asset.name,
|
|
6026
|
-
format: "raw"
|
|
6027
|
-
});
|
|
6028
5989
|
assetsToDownload.push(
|
|
6029
5990
|
limit(
|
|
6030
5991
|
() => downloadAsset(
|
|
6031
|
-
`${assetOrigin}
|
|
5992
|
+
`${assetOrigin}/cgi/image/${asset.name}?format=raw`,
|
|
6032
5993
|
asset.name,
|
|
6033
5994
|
assetBaseUrl
|
|
6034
5995
|
)
|
|
@@ -6445,8 +6406,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6445
6406
|
switch (deployTarget) {
|
|
6446
6407
|
case "vercel":
|
|
6447
6408
|
return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
|
|
6448
|
-
case "netlify
|
|
6449
|
-
case "netlify-edge-functions":
|
|
6409
|
+
case "netlify":
|
|
6450
6410
|
return [
|
|
6451
6411
|
`To deploy to Netlify, run the following commands: `,
|
|
6452
6412
|
`Run ${pc.dim("npx netlify-cli login")} to login to Netlify.`,
|
|
@@ -6459,7 +6419,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6459
6419
|
}
|
|
6460
6420
|
};
|
|
6461
6421
|
const name = "webstudio";
|
|
6462
|
-
const version = "0.0.0-
|
|
6422
|
+
const version = "0.0.0-5844e28";
|
|
6463
6423
|
const description = "Webstudio CLI";
|
|
6464
6424
|
const author = "Webstudio <github@webstudio.is>";
|
|
6465
6425
|
const homepage = "https://webstudio.is";
|
|
@@ -6490,7 +6450,7 @@ const engines = {
|
|
|
6490
6450
|
node: ">=20.12"
|
|
6491
6451
|
};
|
|
6492
6452
|
const dependencies = {
|
|
6493
|
-
"@clack/prompts": "^0.
|
|
6453
|
+
"@clack/prompts": "^0.10.0",
|
|
6494
6454
|
"@emotion/hash": "^0.9.2",
|
|
6495
6455
|
acorn: "^8.14.0",
|
|
6496
6456
|
"acorn-walk": "^8.3.4",
|
|
@@ -6501,18 +6461,15 @@ const dependencies = {
|
|
|
6501
6461
|
"p-limit": "^6.2.0",
|
|
6502
6462
|
parse5: "7.2.1",
|
|
6503
6463
|
picocolors: "^1.1.1",
|
|
6504
|
-
react: "18.3.0-canary-14898b6a9-20240318",
|
|
6505
6464
|
"reserved-identifiers": "^1.0.0",
|
|
6506
6465
|
tinyexec: "^0.3.2",
|
|
6507
|
-
"warn-once": "^0.1.1",
|
|
6508
6466
|
yargs: "^17.7.2",
|
|
6509
6467
|
zod: "^3.22.4"
|
|
6510
6468
|
};
|
|
6511
6469
|
const devDependencies = {
|
|
6512
|
-
"@netlify/
|
|
6513
|
-
"@
|
|
6514
|
-
"@react-router/
|
|
6515
|
-
"@react-router/fs-routes": "^7.1.3",
|
|
6470
|
+
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
6471
|
+
"@react-router/dev": "^7.1.5",
|
|
6472
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
6516
6473
|
"@remix-run/cloudflare": "^2.15.2",
|
|
6517
6474
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
6518
6475
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -6522,6 +6479,7 @@ const devDependencies = {
|
|
|
6522
6479
|
"@types/react": "^18.2.70",
|
|
6523
6480
|
"@types/react-dom": "^18.2.25",
|
|
6524
6481
|
"@types/yargs": "^17.0.33",
|
|
6482
|
+
"@vercel/react-router": "^1.0.2",
|
|
6525
6483
|
"@vitejs/plugin-react": "^4.3.4",
|
|
6526
6484
|
"@webstudio-is/http-client": "workspace:*",
|
|
6527
6485
|
"@webstudio-is/image": "workspace:*",
|
|
@@ -6533,15 +6491,16 @@ const devDependencies = {
|
|
|
6533
6491
|
"@webstudio-is/sdk-components-react-remix": "workspace:*",
|
|
6534
6492
|
"@webstudio-is/sdk-components-react-router": "workspace:*",
|
|
6535
6493
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
6536
|
-
h3: "^1.
|
|
6494
|
+
h3: "^1.15.0",
|
|
6537
6495
|
ipx: "^3.0.1",
|
|
6538
6496
|
prettier: "3.4.2",
|
|
6497
|
+
react: "18.3.0-canary-14898b6a9-20240318",
|
|
6539
6498
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
6540
|
-
"react-router": "^7.1.
|
|
6499
|
+
"react-router": "^7.1.5",
|
|
6541
6500
|
"ts-expect": "^1.3.0",
|
|
6542
|
-
vike: "^0.4.
|
|
6501
|
+
vike: "^0.4.222",
|
|
6543
6502
|
vite: "^5.4.11",
|
|
6544
|
-
vitest: "^3.0.
|
|
6503
|
+
vitest: "^3.0.4",
|
|
6545
6504
|
wrangler: "^3.63.2"
|
|
6546
6505
|
};
|
|
6547
6506
|
const packageJson = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5844e28",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=20.12"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@clack/prompts": "^0.
|
|
29
|
+
"@clack/prompts": "^0.10.0",
|
|
30
30
|
"@emotion/hash": "^0.9.2",
|
|
31
31
|
"acorn": "^8.14.0",
|
|
32
32
|
"acorn-walk": "^8.3.4",
|
|
@@ -37,18 +37,15 @@
|
|
|
37
37
|
"p-limit": "^6.2.0",
|
|
38
38
|
"parse5": "7.2.1",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
|
-
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
41
40
|
"reserved-identifiers": "^1.0.0",
|
|
42
41
|
"tinyexec": "^0.3.2",
|
|
43
|
-
"warn-once": "^0.1.1",
|
|
44
42
|
"yargs": "^17.7.2",
|
|
45
43
|
"zod": "^3.22.4"
|
|
46
44
|
},
|
|
47
45
|
"devDependencies": {
|
|
48
|
-
"@netlify/
|
|
49
|
-
"@
|
|
50
|
-
"@react-router/
|
|
51
|
-
"@react-router/fs-routes": "^7.1.3",
|
|
46
|
+
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
47
|
+
"@react-router/dev": "^7.1.5",
|
|
48
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
52
49
|
"@remix-run/cloudflare": "^2.15.2",
|
|
53
50
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
54
51
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -58,27 +55,29 @@
|
|
|
58
55
|
"@types/react": "^18.2.70",
|
|
59
56
|
"@types/react-dom": "^18.2.25",
|
|
60
57
|
"@types/yargs": "^17.0.33",
|
|
58
|
+
"@vercel/react-router": "^1.0.2",
|
|
61
59
|
"@vitejs/plugin-react": "^4.3.4",
|
|
62
|
-
"h3": "^1.
|
|
60
|
+
"h3": "^1.15.0",
|
|
63
61
|
"ipx": "^3.0.1",
|
|
64
62
|
"prettier": "3.4.2",
|
|
63
|
+
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
65
64
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
66
|
-
"react-router": "^7.1.
|
|
65
|
+
"react-router": "^7.1.5",
|
|
67
66
|
"ts-expect": "^1.3.0",
|
|
68
|
-
"vike": "^0.4.
|
|
67
|
+
"vike": "^0.4.222",
|
|
69
68
|
"vite": "^5.4.11",
|
|
70
|
-
"vitest": "^3.0.
|
|
69
|
+
"vitest": "^3.0.4",
|
|
71
70
|
"wrangler": "^3.63.2",
|
|
72
|
-
"@webstudio-is/http-client": "0.0.0-
|
|
73
|
-
"@webstudio-is/image": "0.0.0-
|
|
74
|
-
"@webstudio-is/
|
|
75
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
76
|
-
"@webstudio-is/sdk-components-
|
|
77
|
-
"@webstudio-is/sdk
|
|
78
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-
|
|
79
|
-
"@webstudio-is/sdk-components-react-remix": "0.0.0-
|
|
80
|
-
"@webstudio-is/
|
|
81
|
-
"@webstudio-is/
|
|
71
|
+
"@webstudio-is/http-client": "0.0.0-5844e28",
|
|
72
|
+
"@webstudio-is/image": "0.0.0-5844e28",
|
|
73
|
+
"@webstudio-is/sdk": "0.0.0-5844e28",
|
|
74
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-5844e28",
|
|
75
|
+
"@webstudio-is/sdk-components-react": "0.0.0-5844e28",
|
|
76
|
+
"@webstudio-is/react-sdk": "0.0.0-5844e28",
|
|
77
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-5844e28",
|
|
78
|
+
"@webstudio-is/sdk-components-react-remix": "0.0.0-5844e28",
|
|
79
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
80
|
+
"@webstudio-is/sdk-components-react-router": "0.0.0-5844e28"
|
|
82
81
|
},
|
|
83
82
|
"scripts": {
|
|
84
83
|
"typecheck": "tsc",
|
|
@@ -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-5844e28",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.0.0-5844e28",
|
|
16
|
+
"@webstudio-is/sdk": "0.0.0-5844e28",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.0.0-5844e28",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-5844e28",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-5844e28",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.0.0-5844e28",
|
|
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-5844e28",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.0.0-5844e28",
|
|
15
|
+
"@webstudio-is/sdk": "0.0.0-5844e28",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-5844e28",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-5844e28",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.0.0-5844e28",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.0.0-5844e28",
|
|
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,22 +1,17 @@
|
|
|
1
|
-
FROM node:22-alpine AS
|
|
2
|
-
COPY . /app
|
|
3
|
-
WORKDIR /app
|
|
4
|
-
RUN npm install
|
|
5
|
-
|
|
6
|
-
FROM node:22-alpine AS production-dependencies-env
|
|
7
|
-
COPY .npmrc ./package.json /app/
|
|
1
|
+
FROM node:22-alpine AS dependencies-env
|
|
2
|
+
COPY .npmrc package.json /app/
|
|
8
3
|
WORKDIR /app
|
|
9
4
|
RUN npm install --omit=dev
|
|
10
5
|
|
|
11
|
-
FROM
|
|
6
|
+
FROM dependencies-env AS build-env
|
|
12
7
|
COPY . /app/
|
|
13
|
-
COPY --from=development-dependencies-env /app/node_modules /app/node_modules
|
|
14
8
|
WORKDIR /app
|
|
9
|
+
RUN npm install
|
|
15
10
|
RUN npm run build
|
|
16
11
|
|
|
17
12
|
FROM node:22-alpine
|
|
18
|
-
COPY .npmrc
|
|
19
|
-
COPY --from=
|
|
13
|
+
COPY .npmrc package.json /app/
|
|
14
|
+
COPY --from=dependencies-env /app/node_modules /app/node_modules
|
|
20
15
|
COPY --from=build-env /app/build /app/build
|
|
21
16
|
COPY --from=build-env /app/public /app/public
|
|
22
17
|
WORKDIR /app
|
|
@@ -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
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"@webstudio-is/image": "0.0.0-4f7bf18",
|
|
17
|
-
"@webstudio-is/react-sdk": "0.0.0-4f7bf18",
|
|
18
|
-
"@webstudio-is/sdk": "0.0.0-4f7bf18",
|
|
19
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-4f7bf18",
|
|
20
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-4f7bf18",
|
|
21
|
-
"@webstudio-is/sdk-components-react-router": "0.0.0-4f7bf18",
|
|
22
|
-
"@webstudio-is/sdk-components-react": "0.0.0-4f7bf18",
|
|
23
|
-
"h3": "^1.14.0",
|
|
24
|
-
"ipx": "^3.0.1",
|
|
25
|
-
"isbot": "^5.1.19",
|
|
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"
|
|
6
|
+
"@react-router/node": "^7.1.5",
|
|
7
|
+
"@react-router/serve": "^7.1.5",
|
|
8
|
+
"h3": "^1.15.0",
|
|
9
|
+
"ipx": "^3.0.1"
|
|
38
10
|
}
|
|
39
11
|
}
|
|
@@ -8,7 +8,7 @@ export const assetBaseUrl = "/assets/";
|
|
|
8
8
|
* @type {import("@webstudio-is/image").ImageLoader}
|
|
9
9
|
*/
|
|
10
10
|
export const imageLoader = (props) => {
|
|
11
|
-
if (
|
|
11
|
+
if (import.meta.env.DEV) {
|
|
12
12
|
return props.src;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -16,14 +16,10 @@ export const imageLoader = (props) => {
|
|
|
16
16
|
return props.src;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
// https://
|
|
19
|
+
// https://vercel.com/blog/build-your-own-web-framework#automatic-image-optimization
|
|
20
20
|
const searchParams = new URLSearchParams();
|
|
21
21
|
searchParams.set("url", props.src);
|
|
22
22
|
searchParams.set("w", props.width.toString());
|
|
23
|
-
if (props.height) {
|
|
24
|
-
searchParams.set("h", props.height.toString());
|
|
25
|
-
}
|
|
26
23
|
searchParams.set("q", props.quality.toString());
|
|
27
|
-
|
|
28
|
-
return `/.netlify/images?${searchParams}`;
|
|
24
|
+
return `/_vercel/image?${searchParams}`;
|
|
29
25
|
};
|
|
@@ -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-5844e28",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.0.0-5844e28",
|
|
13
|
+
"@webstudio-is/sdk": "0.0.0-5844e28",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.0.0-5844e28",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-5844e28",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-5844e28",
|
|
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.222"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^18.2.70",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { EntryContext } from "@remix-run/node";
|
|
2
|
-
import { RemixServer } from "@remix-run/react";
|
|
3
|
-
import { renderToString } from "react-dom/server";
|
|
4
|
-
|
|
5
|
-
export default function handleRequest(
|
|
6
|
-
request: Request,
|
|
7
|
-
responseStatusCode: number,
|
|
8
|
-
responseHeaders: Headers,
|
|
9
|
-
remixContext: EntryContext
|
|
10
|
-
) {
|
|
11
|
-
const markup = renderToString(
|
|
12
|
-
<RemixServer context={remixContext} url={request.url} />
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
responseHeaders.set("Content-Type", "text/html");
|
|
16
|
-
|
|
17
|
-
return new Response("<!DOCTYPE html>" + markup, {
|
|
18
|
-
headers: responseHeaders,
|
|
19
|
-
status: responseStatusCode,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[build]
|
|
2
|
-
command = "npm run build"
|
|
3
|
-
publish = "build/client"
|
|
4
|
-
|
|
5
|
-
[dev]
|
|
6
|
-
command = "npm run dev"
|
|
7
|
-
framework = "vite"
|
|
8
|
-
|
|
9
|
-
# Set immutable caching for static files, because they have fingerprinted filenames
|
|
10
|
-
|
|
11
|
-
[[headers]]
|
|
12
|
-
for = "/build/*"
|
|
13
|
-
|
|
14
|
-
[headers.values]
|
|
15
|
-
|
|
16
|
-
"Cache-Control" = "public, max-age=31560000, immutable"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vitePlugin as remix } from "@remix-run/dev";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import { netlifyPlugin } from "@netlify/remix-edge-adapter/plugin";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
remix({
|
|
8
|
-
future: {
|
|
9
|
-
v3_lazyRouteDiscovery: false,
|
|
10
|
-
v3_relativeSplatPath: false,
|
|
11
|
-
v3_singleFetch: false,
|
|
12
|
-
v3_fetcherPersist: false,
|
|
13
|
-
v3_throwAbortReason: false,
|
|
14
|
-
},
|
|
15
|
-
}),
|
|
16
|
-
netlifyPlugin(),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { handleRequest as default } from "@netlify/remix-adapter";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[build]
|
|
2
|
-
command = "npm run build"
|
|
3
|
-
publish = "build/client"
|
|
4
|
-
|
|
5
|
-
[dev]
|
|
6
|
-
command = "npm run dev"
|
|
7
|
-
framework = "vite"
|
|
8
|
-
|
|
9
|
-
# Set immutable caching for static files, because they have fingerprinted filenames
|
|
10
|
-
|
|
11
|
-
[[headers]]
|
|
12
|
-
for = "/build/*"
|
|
13
|
-
|
|
14
|
-
[headers.values]
|
|
15
|
-
|
|
16
|
-
"Cache-Control" = "public, max-age=31560000, immutable"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vitePlugin as remix } from "@remix-run/dev";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import { netlifyPlugin } from "@netlify/remix-adapter/plugin";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
remix({
|
|
8
|
-
future: {
|
|
9
|
-
v3_lazyRouteDiscovery: false,
|
|
10
|
-
v3_relativeSplatPath: false,
|
|
11
|
-
v3_singleFetch: false,
|
|
12
|
-
v3_fetcherPersist: false,
|
|
13
|
-
v3_throwAbortReason: false,
|
|
14
|
-
},
|
|
15
|
-
}),
|
|
16
|
-
netlifyPlugin(),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
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
|