@webflow/webflow-cli 1.12.7 → 1.13.1

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.
@@ -1,6 +1,6 @@
1
- import config from './next.config';
1
+ import config from "./next.config";
2
2
 
3
- const basePath = config.basePath || '';
3
+ const basePath = config.basePath || "";
4
4
  const assetPrefix = config.assetPrefix || basePath;
5
5
 
6
6
  function normalizeSrc(src: string) {
@@ -9,20 +9,31 @@ function normalizeSrc(src: string) {
9
9
  return `${basePath}${src.slice(assetPrefix.length)}`.slice(1);
10
10
  } else if (basePath && src.startsWith(basePath)) {
11
11
  return src.slice(1);
12
- } else if (src.startsWith('/')) {
12
+ } else if (src.startsWith("/")) {
13
13
  return `${basePath}${src}`.slice(1);
14
14
  }
15
15
  return src;
16
16
  }
17
17
 
18
- export default function cloudflareLoader({ src, width, quality }: { src: string; width: number; quality?: number }) {
18
+ export default function cloudflareLoader({
19
+ src,
20
+ width,
21
+ quality,
22
+ }: {
23
+ src: string;
24
+ width: number;
25
+ quality?: number;
26
+ }) {
19
27
  const normalizedSrc = normalizeSrc(src);
20
28
 
21
29
  // Our cloudflare zone doesn't allow optimizing external images for security reasons, so just load the original image
22
30
  // For now, also skip optimization for images hosted on regular webflow sites (cdn.website-files.com)
23
31
  // because optimizing them would result in two bandwidth charges: one from the website-files zone (for the full image)
24
32
  // and one from the cosmic.webflow.services zone (for the resized image)
25
- if (normalizedSrc.startsWith('http://') || normalizedSrc.startsWith('https://')) {
33
+ if (
34
+ normalizedSrc.startsWith("http://") ||
35
+ normalizedSrc.startsWith("https://")
36
+ ) {
26
37
  return normalizedSrc;
27
38
  }
28
39
 
@@ -30,7 +41,7 @@ export default function cloudflareLoader({ src, width, quality }: { src: string;
30
41
  if (quality) {
31
42
  params.push(`quality=${quality}`);
32
43
  }
33
- const paramsString = params.join(',');
44
+ const paramsString = params.join(",");
34
45
  const workerUrl = `${assetPrefix.slice(0, -basePath.length)}`;
35
46
  return `${workerUrl}/cdn-cgi/image/${paramsString}/${normalizedSrc}`;
36
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webflow/webflow-cli",
3
- "version": "1.12.7",
3
+ "version": "1.13.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "webflow": "./dist/index.js"
@@ -28,6 +28,7 @@
28
28
  "@dotenvx/dotenvx": "^1.44.1",
29
29
  "@inquirer/prompts": "^7.9.0",
30
30
  "@module-federation/enhanced": "0.20.0",
31
+ "@rspack/core": "^1.7.8",
31
32
  "@webflow/data-types": "^1.2.2",
32
33
  "ajv": "^8.17.1",
33
34
  "archiver": "^5.3.1",
@@ -59,6 +60,7 @@
59
60
  "serve-handler": "^6.1.5",
60
61
  "source-map-support": "^0.5.21",
61
62
  "tar": "^7.4.3",
63
+ "ts-checker-rspack-plugin": "^1.0.0",
62
64
  "tsconfig-paths": "^4.2.0",
63
65
  "tsconfig-paths-webpack-plugin": "^4.2.0",
64
66
  "unionfs": "^4.5.4",