@webflow/webflow-cli 1.22.0 → 2.0.0-next.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 +6 -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 +130 -143
- package/dist/index.js.map +1 -1
- package/package.json +6 -10
- package/dist/extension-scaffolds/default/.eslintrc +0 -25
- package/dist/extension-scaffolds/react/.eslintrc +0 -25
- package/dist/extension-scaffolds/typescript-alt/.eslintrc +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -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) {
|