@webflow/webflow-cli 1.23.0 → 2.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.
- package/CHANGELOG.md +25 -0
- package/dist/cloud-scaffolds/registry.ts +2 -2
- package/dist/extension-scaffolds/default/eslint.config.mjs +39 -0
- package/dist/extension-scaffolds/default/package.json +6 -6
- package/dist/extension-scaffolds/default/src/index.ts +3 -3
- package/dist/extension-scaffolds/default/tsconfig.json +3 -1
- package/dist/extension-scaffolds/react/eslint.config.mjs +39 -0
- package/dist/extension-scaffolds/react/package.json +7 -7
- package/dist/extension-scaffolds/react/src/index.tsx +5 -3
- package/dist/extension-scaffolds/typescript-alt/eslint.config.mjs +39 -0
- package/dist/extension-scaffolds/typescript-alt/package.json +6 -6
- package/dist/extension-scaffolds/typescript-alt/src/index.ts +6 -1
- package/dist/extension-scaffolds/typescript-alt/tsconfig.json +3 -1
- package/dist/index.js +115 -98
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @webflow/webflow-cli
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b0c1916: Raise the supported Node.js baseline to 22.13.0 for the CLI and repository tooling, and update CI coverage to Node 22, 24, and 25.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 07650b5: - `cloud init --framework astro` now scaffolds **Astro 6** projects, sourced from the new `v2` branches on the existing [`Webflow-Examples/hello-world-astro`](https://github.com/Webflow-Examples/hello-world-astro/tree/v2) and [`hello-world-astro-devlink`](https://github.com/Webflow-Examples/hello-world-astro-devlink/tree/v2) repos. No version picker — users starting fresh always get the latest supported version. The Astro 5 scaffolds (`v1` branches on the same repos) remain frozen so older CLI installs continue to scaffold Astro 5.
|
|
12
|
+
- `WEBFLOW_SITE_ID` env var is now uniformly **read-only**: the CLI uses it for the current command but never auto-persists it into `webflow.json`. To persist a site ID, run `webflow cloud init` or pass `--site-id` explicitly.
|
|
13
|
+
- `webflow cloud init` prompts "New domain vs Existing site" in interactive mode (skipped only when `--new` is passed explicitly), and defaults to `New` in no-input mode (v1.x used to default to `Existing` here).
|
|
14
|
+
- `webflow cloud create` now emits a deprecation warning for every install and will be removed in a future major release. Use `webflow cloud init` instead.
|
|
15
|
+
- Deploy preflight always shows the "Pass --site-id explicitly or unset to see the deploy mode picker" hint when falling back to `WEBFLOW_SITE_ID`, and the no-identity error always lists both `--site-id` and `--workspace-id`.
|
|
16
|
+
- c4fee62: Use `@webflow/react/server` as the server renderer for Code Components.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- b72178a: Refresh `webflow cloud` copy: command descriptions, option help, prompts, and error messages now consistently use "app" instead of "project" in favor of clearer language. No flag, command, or manifest field names changed — this is a copy-only update.
|
|
21
|
+
- 2fd0d33: Migrate extension scaffolds to ESLint 9 with flat config (`eslint.config.mjs`), `typescript-eslint` v8, and updated lint scripts.
|
|
22
|
+
- d91f805: Polish CLI formatting across commands
|
|
23
|
+
- 953172d: Show deprecation warnings when using `webflow library share`, `webflow library bundle`, or `webflow library log`, including `[Deprecated]` hints in help text. Prefer `webflow devlink import`, `webflow devlink bundle`, and `webflow log`; the `library` command group will be removed in the next major release.
|
|
24
|
+
- 8728f7c: Add deprecation note to "webflow devlink sync" command in help.
|
|
25
|
+
- Updated dependencies [14c2ebc]
|
|
26
|
+
- @webflow/data-types@2.0.0
|
|
27
|
+
|
|
3
28
|
## 1.23.0
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -32,7 +32,7 @@ export const FRAMEWORK_REGISTRY: Record<string, FrameworkDefinition> = {
|
|
|
32
32
|
source: {
|
|
33
33
|
type: "github",
|
|
34
34
|
repo: "Webflow-Examples/hello-world-astro",
|
|
35
|
-
ref: "
|
|
35
|
+
ref: "v2",
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
"nextjs-minimal": {
|
|
@@ -50,7 +50,7 @@ export const FRAMEWORK_REGISTRY: Record<string, FrameworkDefinition> = {
|
|
|
50
50
|
source: {
|
|
51
51
|
type: "github",
|
|
52
52
|
repo: "Webflow-Examples/hello-world-astro-devlink",
|
|
53
|
-
ref: "
|
|
53
|
+
ref: "v2",
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
nextjs: {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import promise from "eslint-plugin-promise";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
/** Type-aware rules only run for sources included in tsconfig.json (see include). */
|
|
6
|
+
const typeCheckedFiles = ["src/**/*.ts", "src/**/*.tsx"];
|
|
7
|
+
|
|
8
|
+
export default tseslint.config(
|
|
9
|
+
eslint.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
|
|
11
|
+
...config,
|
|
12
|
+
files: typeCheckedFiles,
|
|
13
|
+
})),
|
|
14
|
+
{
|
|
15
|
+
files: typeCheckedFiles,
|
|
16
|
+
plugins: {
|
|
17
|
+
promise,
|
|
18
|
+
},
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parserOptions: {
|
|
21
|
+
projectService: true,
|
|
22
|
+
tsconfigRootDir: import.meta.dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
27
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
28
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
29
|
+
"@typescript-eslint/no-misused-promises": [
|
|
30
|
+
"error",
|
|
31
|
+
{ checksVoidReturn: false },
|
|
32
|
+
],
|
|
33
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
34
|
+
"no-async-promise-executor": "error",
|
|
35
|
+
"require-await": "error",
|
|
36
|
+
"promise/catch-or-return": "error",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
);
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npm install && tsc -p tsconfig.json && webflow extension bundle",
|
|
8
8
|
"dev": "npm install && concurrently -r \"webflow extension serve\" \"tsc -p tsconfig.json --watch --preserveWatchOutput\"",
|
|
9
|
-
"lint": "eslint .
|
|
9
|
+
"lint": "eslint ."
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
+
"@eslint/js": "^9.21.0",
|
|
12
13
|
"@webflow/designer-extension-typings": "^2.0.2",
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
14
|
-
"@typescript-eslint/parser": "^7.7.0",
|
|
15
|
-
"eslint": "^8.5.7",
|
|
16
14
|
"concurrently": "^8.2.2",
|
|
17
|
-
"
|
|
18
|
-
"eslint-plugin-promise": "^
|
|
15
|
+
"eslint": "^9.21.0",
|
|
16
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
17
|
+
"typescript": "^5.9.3",
|
|
18
|
+
"typescript-eslint": "^8.24.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@ const emojiMap = {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// default to smile
|
|
9
|
-
let selectedEmoji = emojiMap.smile;
|
|
9
|
+
let selectedEmoji: string = emojiMap.smile;
|
|
10
10
|
addButtonListeners();
|
|
11
11
|
|
|
12
12
|
document.getElementById("extension-form").onsubmit = async (event) => {
|
|
@@ -33,7 +33,7 @@ document.getElementById("extension-form").onsubmit = async (event) => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// Check if specified style exists. If not, create a new style
|
|
36
|
-
async function createOrUseStyle(styleName) {
|
|
36
|
+
async function createOrUseStyle(styleName: string) {
|
|
37
37
|
// Check if this style exists to avoid duplicate styles
|
|
38
38
|
const style = await webflow.getStyleByName(styleName);
|
|
39
39
|
if (style) {
|
|
@@ -47,7 +47,7 @@ async function createOrUseStyle(styleName) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
function handleEmojiClick(emoji) {
|
|
50
|
+
function handleEmojiClick(emoji: string) {
|
|
51
51
|
selectedEmoji = emoji;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import promise from "eslint-plugin-promise";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
/** Type-aware rules only run for sources included in tsconfig.json (see include). */
|
|
6
|
+
const typeCheckedFiles = ["src/**/*.ts", "src/**/*.tsx"];
|
|
7
|
+
|
|
8
|
+
export default tseslint.config(
|
|
9
|
+
eslint.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
|
|
11
|
+
...config,
|
|
12
|
+
files: typeCheckedFiles,
|
|
13
|
+
})),
|
|
14
|
+
{
|
|
15
|
+
files: typeCheckedFiles,
|
|
16
|
+
plugins: {
|
|
17
|
+
promise,
|
|
18
|
+
},
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parserOptions: {
|
|
21
|
+
projectService: true,
|
|
22
|
+
tsconfigRootDir: import.meta.dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
27
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
28
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
29
|
+
"@typescript-eslint/no-misused-promises": [
|
|
30
|
+
"error",
|
|
31
|
+
{ checksVoidReturn: false },
|
|
32
|
+
],
|
|
33
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
34
|
+
"no-async-promise-executor": "error",
|
|
35
|
+
"require-await": "error",
|
|
36
|
+
"promise/catch-or-return": "error",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
);
|
|
@@ -6,16 +6,17 @@
|
|
|
6
6
|
"build": "npm run build-webpack && webflow extension bundle",
|
|
7
7
|
"watch-webpack": "webpack --config webpack.config.mjs --mode development --watch",
|
|
8
8
|
"build-webpack": "webpack --config webpack.config.mjs --mode production",
|
|
9
|
-
"lint": "eslint .
|
|
9
|
+
"lint": "eslint ."
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
+
"@eslint/js": "^9.21.0",
|
|
12
13
|
"@webflow/designer-extension-typings": "^2.0.2",
|
|
13
14
|
"concurrently": "^8.2.2",
|
|
14
15
|
"css-loader": "^7.1.2",
|
|
15
|
-
"eslint": "^
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"typescript": "^
|
|
16
|
+
"eslint": "^9.21.0",
|
|
17
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
18
|
+
"typescript": "^5.9.3",
|
|
19
|
+
"typescript-eslint": "^8.24.0",
|
|
19
20
|
"react-dom": "^18.2.0",
|
|
20
21
|
"react": "^18.2.0",
|
|
21
22
|
"@types/react": "^18.2.79",
|
|
@@ -26,8 +27,7 @@
|
|
|
26
27
|
"style-loader": "^4.0.0",
|
|
27
28
|
"ts-loader": "^9.5.1",
|
|
28
29
|
"webpack": "^5.89.0",
|
|
29
|
-
"webpack-cli": "^5.1.4"
|
|
30
|
-
"eslint-plugin-promise": "^6.1.1"
|
|
30
|
+
"webpack-cli": "^5.1.4"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"react-dom": "^18.2.0"
|
|
@@ -23,7 +23,9 @@ const App: React.FC = () => {
|
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
);
|
|
26
|
+
const rootEl = document.getElementById("root");
|
|
27
|
+
if (!rootEl) {
|
|
28
|
+
throw new Error('Could not find element with id "root"');
|
|
29
|
+
}
|
|
30
|
+
const root = ReactDOM.createRoot(rootEl);
|
|
29
31
|
root.render(<App />);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import promise from "eslint-plugin-promise";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
/** Type-aware rules only run for sources included in tsconfig.json (see include). */
|
|
6
|
+
const typeCheckedFiles = ["src/**/*.ts", "src/**/*.tsx"];
|
|
7
|
+
|
|
8
|
+
export default tseslint.config(
|
|
9
|
+
eslint.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
|
|
11
|
+
...config,
|
|
12
|
+
files: typeCheckedFiles,
|
|
13
|
+
})),
|
|
14
|
+
{
|
|
15
|
+
files: typeCheckedFiles,
|
|
16
|
+
plugins: {
|
|
17
|
+
promise,
|
|
18
|
+
},
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parserOptions: {
|
|
21
|
+
projectService: true,
|
|
22
|
+
tsconfigRootDir: import.meta.dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
27
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
28
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
29
|
+
"@typescript-eslint/no-misused-promises": [
|
|
30
|
+
"error",
|
|
31
|
+
{ checksVoidReturn: false },
|
|
32
|
+
],
|
|
33
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
34
|
+
"no-async-promise-executor": "error",
|
|
35
|
+
"require-await": "error",
|
|
36
|
+
"promise/catch-or-return": "error",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
);
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npm install && tsc -p tsconfig.json && webflow extension bundle",
|
|
8
8
|
"dev": "npm install && concurrently -r \"webflow extension serve\" \"tsc -p tsconfig.json --watch --preserveWatchOutput\"",
|
|
9
|
-
"lint": "eslint .
|
|
9
|
+
"lint": "eslint ."
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
+
"@eslint/js": "^9.21.0",
|
|
12
13
|
"@webflow/designer-extension-typings": "^2.0.2",
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
14
|
-
"@typescript-eslint/parser": "^7.7.0",
|
|
15
|
-
"eslint": "^8.5.7",
|
|
16
14
|
"concurrently": "^8.2.2",
|
|
17
|
-
"
|
|
18
|
-
"eslint-plugin-promise": "^
|
|
15
|
+
"eslint": "^9.21.0",
|
|
16
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
17
|
+
"typescript": "^5.9.3",
|
|
18
|
+
"typescript-eslint": "^8.24.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
document.getElementById("lorem")
|
|
1
|
+
const form = document.getElementById("lorem");
|
|
2
|
+
if (!form) {
|
|
3
|
+
throw new Error('Could not find element with id "lorem"');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
form.onsubmit = async (event) => {
|
|
2
7
|
event.preventDefault();
|
|
3
8
|
const el = await webflow.getSelectedElement();
|
|
4
9
|
if (el && el.textContent) {
|