@shiqianjiang/ceru-plugin-cli 0.1.1 → 0.1.2
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 +4 -0
- package/assets/catalog.json +1 -1
- package/assets/sandbox.js +1 -1
- package/dist/dev.d.ts +2 -0
- package/dist/dev.js +87 -29
- package/dist/frameworks.d.ts +2 -2
- package/dist/frameworks.js +11 -29
- package/dist/index.js +8 -2
- package/dist/project.d.ts +1 -0
- package/dist/project.js +8 -6
- package/package.json +1 -1
- package/schemas/config.schema.json +2 -0
- package/templates/connected-library/js/.vscode/launch.json +36 -46
- package/templates/connected-library/js/.vscode/tasks.json +11 -3
- package/templates/connected-library/js/README.md +7 -2
- package/templates/connected-library/js/ceru-plugin.code-workspace +8 -0
- package/templates/connected-library/js/package.json +3 -2
- package/templates/connected-library/ts/.vscode/launch.json +36 -46
- package/templates/connected-library/ts/.vscode/tasks.json +11 -3
- package/templates/connected-library/ts/README.md +7 -2
- package/templates/connected-library/ts/ceru-plugin.code-workspace +8 -0
- package/templates/connected-library/ts/package.json +3 -2
- package/templates/guest-adapter/js/.vscode/launch.json +36 -46
- package/templates/guest-adapter/js/.vscode/tasks.json +11 -3
- package/templates/guest-adapter/js/README.md +7 -2
- package/templates/guest-adapter/js/ceru-plugin.code-workspace +8 -0
- package/templates/guest-adapter/js/package.json +3 -2
- package/templates/guest-adapter/ts/.vscode/launch.json +36 -46
- package/templates/guest-adapter/ts/.vscode/tasks.json +11 -3
- package/templates/guest-adapter/ts/README.md +7 -2
- package/templates/guest-adapter/ts/ceru-plugin.code-workspace +8 -0
- package/templates/guest-adapter/ts/package.json +3 -2
- package/templates/importer/js/.vscode/launch.json +36 -46
- package/templates/importer/js/.vscode/tasks.json +11 -3
- package/templates/importer/js/README.md +7 -2
- package/templates/importer/js/ceru-plugin.code-workspace +8 -0
- package/templates/importer/js/package.json +3 -2
- package/templates/importer/ts/.vscode/launch.json +36 -46
- package/templates/importer/ts/.vscode/tasks.json +11 -3
- package/templates/importer/ts/README.md +7 -2
- package/templates/importer/ts/ceru-plugin.code-workspace +8 -0
- package/templates/importer/ts/package.json +3 -2
- package/templates/react/js/.vscode/launch.json +36 -46
- package/templates/react/js/.vscode/tasks.json +11 -3
- package/templates/react/js/README.md +7 -2
- package/templates/react/js/ceru-plugin.code-workspace +8 -0
- package/templates/react/js/ceru.plugin.json +1 -5
- package/templates/react/js/package.json +3 -2
- package/templates/react/ts/.vscode/launch.json +36 -46
- package/templates/react/ts/.vscode/tasks.json +11 -3
- package/templates/react/ts/README.md +7 -2
- package/templates/react/ts/ceru-plugin.code-workspace +8 -0
- package/templates/react/ts/ceru.plugin.json +1 -5
- package/templates/react/ts/package.json +3 -2
- package/templates/snapshot.json +19 -1
- package/templates/source/js/.vscode/launch.json +36 -46
- package/templates/source/js/.vscode/tasks.json +11 -3
- package/templates/source/js/README.md +7 -2
- package/templates/source/js/ceru-plugin.code-workspace +8 -0
- package/templates/source/js/package.json +3 -2
- package/templates/source/ts/.vscode/launch.json +36 -46
- package/templates/source/ts/.vscode/tasks.json +11 -3
- package/templates/source/ts/README.md +7 -2
- package/templates/source/ts/ceru-plugin.code-workspace +8 -0
- package/templates/source/ts/package.json +3 -2
- package/templates/vue/js/.vscode/launch.json +36 -46
- package/templates/vue/js/.vscode/tasks.json +11 -3
- package/templates/vue/js/README.md +7 -2
- package/templates/vue/js/ceru-plugin.code-workspace +8 -0
- package/templates/vue/js/ceru.plugin.json +1 -4
- package/templates/vue/js/package.json +3 -2
- package/templates/vue/ts/.vscode/launch.json +36 -46
- package/templates/vue/ts/.vscode/tasks.json +11 -3
- package/templates/vue/ts/README.md +7 -2
- package/templates/vue/ts/ceru-plugin.code-workspace +8 -0
- package/templates/vue/ts/ceru.plugin.json +1 -4
- package/templates/vue/ts/package.json +3 -2
- package/templates/vue-tsx/js/.vscode/launch.json +36 -46
- package/templates/vue-tsx/js/.vscode/tasks.json +11 -3
- package/templates/vue-tsx/js/README.md +7 -2
- package/templates/vue-tsx/js/ceru-plugin.code-workspace +8 -0
- package/templates/vue-tsx/js/ceru.plugin.json +1 -4
- package/templates/vue-tsx/js/package.json +3 -2
- package/templates/vue-tsx/ts/.vscode/launch.json +36 -46
- package/templates/vue-tsx/ts/.vscode/tasks.json +11 -3
- package/templates/vue-tsx/ts/README.md +7 -2
- package/templates/vue-tsx/ts/ceru-plugin.code-workspace +8 -0
- package/templates/vue-tsx/ts/ceru.plugin.json +1 -4
- package/templates/vue-tsx/ts/package.json +3 -2
- package/templates/web-dist/js/.vscode/launch.json +36 -46
- package/templates/web-dist/js/.vscode/tasks.json +11 -3
- package/templates/web-dist/js/README.md +7 -2
- package/templates/web-dist/js/ceru-plugin.code-workspace +8 -0
- package/templates/web-dist/js/package.json +3 -2
- package/templates/web-dist/ts/.vscode/launch.json +36 -46
- package/templates/web-dist/ts/.vscode/tasks.json +11 -3
- package/templates/web-dist/ts/README.md +7 -2
- package/templates/web-dist/ts/ceru-plugin.code-workspace +8 -0
- package/templates/web-dist/ts/package.json +3 -2
- package/templates/web-surface/js/.vscode/launch.json +36 -46
- package/templates/web-surface/js/.vscode/tasks.json +11 -3
- package/templates/web-surface/js/README.md +7 -2
- package/templates/web-surface/js/ceru-plugin.code-workspace +8 -0
- package/templates/web-surface/js/package.json +3 -2
- package/templates/web-surface/ts/.vscode/launch.json +36 -46
- package/templates/web-surface/ts/.vscode/tasks.json +11 -3
- package/templates/web-surface/ts/README.md +7 -2
- package/templates/web-surface/ts/ceru-plugin.code-workspace +8 -0
- package/templates/web-surface/ts/package.json +3 -2
- package/assets/shared-react.js +0 -77
- package/assets/shared-vue.js +0 -44
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
"dev": "ceru-plugin dev",
|
|
8
8
|
"build": "ceru-plugin build",
|
|
9
9
|
"typecheck": "tsc --noEmit",
|
|
10
|
-
"validate": "ceru-plugin validate dist/plugin.js"
|
|
10
|
+
"validate": "ceru-plugin validate dist/plugin.js",
|
|
11
|
+
"preview": "ceru-plugin preview dist/plugin.js"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"@shiqianjiang/ceru-plugin-sdk": "^0.1.0"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
|
-
"@shiqianjiang/ceru-plugin-cli": "^0.1.
|
|
17
|
+
"@shiqianjiang/ceru-plugin-cli": "^0.1.2",
|
|
17
18
|
"typescript": "~5.9.3",
|
|
18
19
|
"electron": "^44.4.2",
|
|
19
20
|
"prettier": "^3.6.2"
|
|
@@ -1,46 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.2.0",
|
|
3
|
-
"configurations": [
|
|
4
|
-
{
|
|
5
|
-
"name": "Launch Ceru plugin",
|
|
6
|
-
"type": "pwa-chrome",
|
|
7
|
-
"request": "attach",
|
|
8
|
-
"port": 9223,
|
|
9
|
-
"preLaunchTask": "Ceru: dev",
|
|
10
|
-
"webRoot": "${workspaceFolder}",
|
|
11
|
-
"sourceMaps": true,
|
|
12
|
-
"sourceMapPathOverrides": {
|
|
13
|
-
"ceru:///*": "${workspaceFolder}/*"
|
|
14
|
-
},
|
|
15
|
-
"skipFiles": [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
],
|
|
38
|
-
"address": "127.0.0.1",
|
|
39
|
-
"urlFilter": "http://127.0.0.1:4179/*",
|
|
40
|
-
"targetTypes": [
|
|
41
|
-
"page",
|
|
42
|
-
"iframe"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Launch Ceru plugin",
|
|
6
|
+
"type": "pwa-chrome",
|
|
7
|
+
"request": "attach",
|
|
8
|
+
"port": 9223,
|
|
9
|
+
"preLaunchTask": "Ceru: dev",
|
|
10
|
+
"webRoot": "${workspaceFolder}",
|
|
11
|
+
"sourceMaps": true,
|
|
12
|
+
"sourceMapPathOverrides": {
|
|
13
|
+
"ceru:///*": "${workspaceFolder}/*"
|
|
14
|
+
},
|
|
15
|
+
"skipFiles": ["**/node_modules/**"],
|
|
16
|
+
"address": "127.0.0.1",
|
|
17
|
+
"urlFilter": "http://127.0.0.1:4179/",
|
|
18
|
+
"timeout": 30000
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Attach to Ceru plugin",
|
|
22
|
+
"type": "pwa-chrome",
|
|
23
|
+
"request": "attach",
|
|
24
|
+
"port": 9223,
|
|
25
|
+
"webRoot": "${workspaceFolder}",
|
|
26
|
+
"sourceMaps": true,
|
|
27
|
+
"sourceMapPathOverrides": {
|
|
28
|
+
"ceru:///*": "${workspaceFolder}/*"
|
|
29
|
+
},
|
|
30
|
+
"skipFiles": ["**/node_modules/**"],
|
|
31
|
+
"address": "127.0.0.1",
|
|
32
|
+
"urlFilter": "http://127.0.0.1:4179/",
|
|
33
|
+
"timeout": 30000
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
"tasks": [
|
|
4
4
|
{
|
|
5
5
|
"label": "Ceru: dev",
|
|
6
|
-
"type": "
|
|
7
|
-
"script": "dev",
|
|
6
|
+
"type": "process",
|
|
8
7
|
"isBackground": true,
|
|
9
8
|
"problemMatcher": {
|
|
10
9
|
"owner": "ceru",
|
|
@@ -15,8 +14,17 @@
|
|
|
15
14
|
"background": {
|
|
16
15
|
"activeOnStart": true,
|
|
17
16
|
"beginsPattern": "^.*$",
|
|
18
|
-
"endsPattern": "^
|
|
17
|
+
"endsPattern": "^CERU_DEBUG_READY "
|
|
19
18
|
}
|
|
19
|
+
},
|
|
20
|
+
"command": "node",
|
|
21
|
+
"args": [
|
|
22
|
+
"${workspaceFolder}/node_modules/@shiqianjiang/ceru-plugin-cli/dist/bin.js",
|
|
23
|
+
"dev",
|
|
24
|
+
"--ensure-running"
|
|
25
|
+
],
|
|
26
|
+
"options": {
|
|
27
|
+
"cwd": "${workspaceFolder}"
|
|
20
28
|
}
|
|
21
29
|
},
|
|
22
30
|
{
|
|
@@ -26,8 +26,13 @@ VS Code 按 F5 选择 Launch Ceru plugin;已有调试窗口时选择 Attach to
|
|
|
26
26
|
- 默认封面:await ctx.assets.url('placeholder.cover')。
|
|
27
27
|
- 共享工具:ctx.utils.lodash。
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
Vue/React 的生产运行代码、页面和样式直接编入发行 JS,宿主不提供框架。
|
|
30
|
+
TypeScript、Vue 编译器、构建工具与开发服务器不会进入产物。
|
|
31
|
+
运行 npm run preview 可只加载 dist/plugin.js 检查发布后的行为。
|
|
32
|
+
|
|
33
|
+
若 VS Code 打开的是父目录,请打开本工程的 ceru-plugin.code-workspace,
|
|
34
|
+
再在“运行和调试”中选择 Launch Ceru plugin;已经运行 npm/pnpm dev 时选择 Attach to Ceru plugin。
|
|
35
|
+
F5 执行当前下拉框中的配置,不会自动选择终端所在的子工程。
|
|
31
36
|
|
|
32
37
|
## 边界
|
|
33
38
|
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
"dev": "ceru-plugin dev",
|
|
8
8
|
"build": "ceru-plugin build",
|
|
9
9
|
"typecheck": "tsc --noEmit",
|
|
10
|
-
"validate": "ceru-plugin validate dist/plugin.js"
|
|
10
|
+
"validate": "ceru-plugin validate dist/plugin.js",
|
|
11
|
+
"preview": "ceru-plugin preview dist/plugin.js"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"@shiqianjiang/ceru-plugin-sdk": "^0.1.0"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
|
-
"@shiqianjiang/ceru-plugin-cli": "^0.1.
|
|
17
|
+
"@shiqianjiang/ceru-plugin-cli": "^0.1.2",
|
|
17
18
|
"typescript": "~5.9.3",
|
|
18
19
|
"electron": "^44.4.2",
|
|
19
20
|
"prettier": "^3.6.2"
|
|
@@ -1,46 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.2.0",
|
|
3
|
-
"configurations": [
|
|
4
|
-
{
|
|
5
|
-
"name": "Launch Ceru plugin",
|
|
6
|
-
"type": "pwa-chrome",
|
|
7
|
-
"request": "attach",
|
|
8
|
-
"port": 9223,
|
|
9
|
-
"preLaunchTask": "Ceru: dev",
|
|
10
|
-
"webRoot": "${workspaceFolder}",
|
|
11
|
-
"sourceMaps": true,
|
|
12
|
-
"sourceMapPathOverrides": {
|
|
13
|
-
"ceru:///*": "${workspaceFolder}/*"
|
|
14
|
-
},
|
|
15
|
-
"skipFiles": [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
],
|
|
38
|
-
"address": "127.0.0.1",
|
|
39
|
-
"urlFilter": "http://127.0.0.1:4179/*",
|
|
40
|
-
"targetTypes": [
|
|
41
|
-
"page",
|
|
42
|
-
"iframe"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Launch Ceru plugin",
|
|
6
|
+
"type": "pwa-chrome",
|
|
7
|
+
"request": "attach",
|
|
8
|
+
"port": 9223,
|
|
9
|
+
"preLaunchTask": "Ceru: dev",
|
|
10
|
+
"webRoot": "${workspaceFolder}",
|
|
11
|
+
"sourceMaps": true,
|
|
12
|
+
"sourceMapPathOverrides": {
|
|
13
|
+
"ceru:///*": "${workspaceFolder}/*"
|
|
14
|
+
},
|
|
15
|
+
"skipFiles": ["**/node_modules/**"],
|
|
16
|
+
"address": "127.0.0.1",
|
|
17
|
+
"urlFilter": "http://127.0.0.1:4179/",
|
|
18
|
+
"timeout": 30000
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Attach to Ceru plugin",
|
|
22
|
+
"type": "pwa-chrome",
|
|
23
|
+
"request": "attach",
|
|
24
|
+
"port": 9223,
|
|
25
|
+
"webRoot": "${workspaceFolder}",
|
|
26
|
+
"sourceMaps": true,
|
|
27
|
+
"sourceMapPathOverrides": {
|
|
28
|
+
"ceru:///*": "${workspaceFolder}/*"
|
|
29
|
+
},
|
|
30
|
+
"skipFiles": ["**/node_modules/**"],
|
|
31
|
+
"address": "127.0.0.1",
|
|
32
|
+
"urlFilter": "http://127.0.0.1:4179/",
|
|
33
|
+
"timeout": 30000
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
"tasks": [
|
|
4
4
|
{
|
|
5
5
|
"label": "Ceru: dev",
|
|
6
|
-
"type": "
|
|
7
|
-
"script": "dev",
|
|
6
|
+
"type": "process",
|
|
8
7
|
"isBackground": true,
|
|
9
8
|
"problemMatcher": {
|
|
10
9
|
"owner": "ceru",
|
|
@@ -15,8 +14,17 @@
|
|
|
15
14
|
"background": {
|
|
16
15
|
"activeOnStart": true,
|
|
17
16
|
"beginsPattern": "^.*$",
|
|
18
|
-
"endsPattern": "^
|
|
17
|
+
"endsPattern": "^CERU_DEBUG_READY "
|
|
19
18
|
}
|
|
19
|
+
},
|
|
20
|
+
"command": "node",
|
|
21
|
+
"args": [
|
|
22
|
+
"${workspaceFolder}/node_modules/@shiqianjiang/ceru-plugin-cli/dist/bin.js",
|
|
23
|
+
"dev",
|
|
24
|
+
"--ensure-running"
|
|
25
|
+
],
|
|
26
|
+
"options": {
|
|
27
|
+
"cwd": "${workspaceFolder}"
|
|
20
28
|
}
|
|
21
29
|
},
|
|
22
30
|
{
|
|
@@ -26,8 +26,13 @@ VS Code 按 F5 选择 Launch Ceru plugin;已有调试窗口时选择 Attach to
|
|
|
26
26
|
- 默认封面:await ctx.assets.url('placeholder.cover')。
|
|
27
27
|
- 共享工具:ctx.utils.lodash。
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
Vue/React 的生产运行代码、页面和样式直接编入发行 JS,宿主不提供框架。
|
|
30
|
+
TypeScript、Vue 编译器、构建工具与开发服务器不会进入产物。
|
|
31
|
+
运行 npm run preview 可只加载 dist/plugin.js 检查发布后的行为。
|
|
32
|
+
|
|
33
|
+
若 VS Code 打开的是父目录,请打开本工程的 ceru-plugin.code-workspace,
|
|
34
|
+
再在“运行和调试”中选择 Launch Ceru plugin;已经运行 npm/pnpm dev 时选择 Attach to Ceru plugin。
|
|
35
|
+
F5 执行当前下拉框中的配置,不会自动选择终端所在的子工程。
|
|
31
36
|
|
|
32
37
|
## 边界
|
|
33
38
|
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
"dev": "ceru-plugin dev",
|
|
8
8
|
"build": "ceru-plugin build",
|
|
9
9
|
"typecheck": "tsc --noEmit",
|
|
10
|
-
"validate": "ceru-plugin validate dist/plugin.js"
|
|
10
|
+
"validate": "ceru-plugin validate dist/plugin.js",
|
|
11
|
+
"preview": "ceru-plugin preview dist/plugin.js"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"@shiqianjiang/ceru-plugin-sdk": "^0.1.0"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
|
-
"@shiqianjiang/ceru-plugin-cli": "^0.1.
|
|
17
|
+
"@shiqianjiang/ceru-plugin-cli": "^0.1.2",
|
|
17
18
|
"typescript": "~5.9.3",
|
|
18
19
|
"electron": "^44.4.2",
|
|
19
20
|
"prettier": "^3.6.2"
|