@shiqianjiang/ceru-plugin-cli 0.1.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/ASSET_LICENSE +238 -0
- package/LICENSE +21 -0
- package/NOTICE +1 -0
- package/README.md +29 -0
- package/assets/catalog.json +1 -0
- package/assets/electron-app/main.cjs +1 -0
- package/assets/electron-app/package.json +8 -0
- package/assets/electron.cjs +42 -0
- package/assets/index.html +93 -0
- package/assets/originals/account.svg +1 -0
- package/assets/originals/add.svg +1 -0
- package/assets/originals/app.logo.svg +10 -0
- package/assets/originals/chart.svg +1 -0
- package/assets/originals/close.svg +1 -0
- package/assets/originals/cloud.svg +1 -0
- package/assets/originals/download.svg +1 -0
- package/assets/originals/heart.svg +1 -0
- package/assets/originals/import.svg +1 -0
- package/assets/originals/info.svg +1 -0
- package/assets/originals/library.svg +1 -0
- package/assets/originals/music-note.svg +1 -0
- package/assets/originals/pause.svg +1 -0
- package/assets/originals/placeholder.avatar.webp +0 -0
- package/assets/originals/placeholder.cover.png +0 -0
- package/assets/originals/platform.all.svg +1 -0
- package/assets/originals/platform.kg.svg +1 -0
- package/assets/originals/platform.kw.svg +1 -0
- package/assets/originals/platform.local.svg +1 -0
- package/assets/originals/platform.mg.svg +1 -0
- package/assets/originals/platform.tx.svg +1 -0
- package/assets/originals/platform.wy.svg +1 -0
- package/assets/originals/play.svg +1 -0
- package/assets/originals/refresh.svg +1 -0
- package/assets/originals/search.svg +1 -0
- package/assets/originals/server.svg +1 -0
- package/assets/originals/settings.svg +1 -0
- package/assets/originals/share.svg +1 -0
- package/assets/playground.js +446 -0
- package/assets/sandbox.js +36 -0
- package/assets/shared-react.js +77 -0
- package/assets/shared-vue.js +44 -0
- package/assets/style.css +264 -0
- package/assets/vendor-licenses/lodash-es.txt +47 -0
- package/assets/vendor-licenses/react-dom.txt +21 -0
- package/assets/vendor-licenses/react.txt +21 -0
- package/assets/vendor-licenses/scheduler.txt +21 -0
- package/assets/vendor-licenses/vue.txt +21 -0
- package/assets/vendor-licenses/vue_reactivity.txt +21 -0
- package/assets/vendor-licenses/vue_runtime-core.txt +21 -0
- package/assets/vendor-licenses/vue_runtime-dom.txt +21 -0
- package/assets/vendor-licenses/vue_shared.txt +21 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +6 -0
- package/dist/dev.d.ts +7 -0
- package/dist/dev.js +507 -0
- package/dist/frameworks.d.ts +9 -0
- package/dist/frameworks.js +310 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +206 -0
- package/dist/project.d.ts +34 -0
- package/dist/project.js +342 -0
- package/package.json +67 -0
- package/schemas/config.schema.json +610 -0
- package/templates/connected-library/js/.prettierrc.json +5 -0
- package/templates/connected-library/js/.vscode/ceru.code-snippets +27 -0
- package/templates/connected-library/js/.vscode/extensions.json +3 -0
- package/templates/connected-library/js/.vscode/launch.json +30 -0
- package/templates/connected-library/js/.vscode/settings.json +20 -0
- package/templates/connected-library/js/.vscode/tasks.json +36 -0
- package/templates/connected-library/js/README.md +38 -0
- package/templates/connected-library/js/_gitignore +6 -0
- package/templates/connected-library/js/ceru.plugin.json +76 -0
- package/templates/connected-library/js/package.json +21 -0
- package/templates/connected-library/js/src/index.js +38 -0
- package/templates/connected-library/js/tsconfig.json +16 -0
- package/templates/connected-library/js/ui/settings.json +24 -0
- package/templates/connected-library/ts/.prettierrc.json +5 -0
- package/templates/connected-library/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/connected-library/ts/.vscode/extensions.json +3 -0
- package/templates/connected-library/ts/.vscode/launch.json +30 -0
- package/templates/connected-library/ts/.vscode/settings.json +20 -0
- package/templates/connected-library/ts/.vscode/tasks.json +36 -0
- package/templates/connected-library/ts/README.md +38 -0
- package/templates/connected-library/ts/_gitignore +6 -0
- package/templates/connected-library/ts/ceru.plugin.json +76 -0
- package/templates/connected-library/ts/package.json +21 -0
- package/templates/connected-library/ts/src/index.ts +38 -0
- package/templates/connected-library/ts/tsconfig.json +16 -0
- package/templates/connected-library/ts/ui/settings.json +24 -0
- package/templates/guest-adapter/js/.prettierrc.json +5 -0
- package/templates/guest-adapter/js/.vscode/ceru.code-snippets +27 -0
- package/templates/guest-adapter/js/.vscode/extensions.json +3 -0
- package/templates/guest-adapter/js/.vscode/launch.json +30 -0
- package/templates/guest-adapter/js/.vscode/settings.json +20 -0
- package/templates/guest-adapter/js/.vscode/tasks.json +36 -0
- package/templates/guest-adapter/js/README.md +38 -0
- package/templates/guest-adapter/js/_gitignore +6 -0
- package/templates/guest-adapter/js/ceru.plugin.json +95 -0
- package/templates/guest-adapter/js/package.json +21 -0
- package/templates/guest-adapter/js/src/guest.js +6 -0
- package/templates/guest-adapter/js/src/index.js +8 -0
- package/templates/guest-adapter/js/tsconfig.json +16 -0
- package/templates/guest-adapter/js/ui/settings.json +14 -0
- package/templates/guest-adapter/ts/.prettierrc.json +5 -0
- package/templates/guest-adapter/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/guest-adapter/ts/.vscode/extensions.json +3 -0
- package/templates/guest-adapter/ts/.vscode/launch.json +30 -0
- package/templates/guest-adapter/ts/.vscode/settings.json +20 -0
- package/templates/guest-adapter/ts/.vscode/tasks.json +36 -0
- package/templates/guest-adapter/ts/README.md +38 -0
- package/templates/guest-adapter/ts/_gitignore +6 -0
- package/templates/guest-adapter/ts/ceru.plugin.json +95 -0
- package/templates/guest-adapter/ts/package.json +21 -0
- package/templates/guest-adapter/ts/src/guest.ts +6 -0
- package/templates/guest-adapter/ts/src/index.ts +8 -0
- package/templates/guest-adapter/ts/tsconfig.json +16 -0
- package/templates/guest-adapter/ts/ui/settings.json +14 -0
- package/templates/importer/js/.prettierrc.json +5 -0
- package/templates/importer/js/.vscode/ceru.code-snippets +27 -0
- package/templates/importer/js/.vscode/extensions.json +3 -0
- package/templates/importer/js/.vscode/launch.json +30 -0
- package/templates/importer/js/.vscode/settings.json +20 -0
- package/templates/importer/js/.vscode/tasks.json +36 -0
- package/templates/importer/js/README.md +38 -0
- package/templates/importer/js/_gitignore +6 -0
- package/templates/importer/js/ceru.plugin.json +63 -0
- package/templates/importer/js/package.json +21 -0
- package/templates/importer/js/src/index.js +37 -0
- package/templates/importer/js/tsconfig.json +16 -0
- package/templates/importer/js/ui/settings.json +24 -0
- package/templates/importer/ts/.prettierrc.json +5 -0
- package/templates/importer/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/importer/ts/.vscode/extensions.json +3 -0
- package/templates/importer/ts/.vscode/launch.json +30 -0
- package/templates/importer/ts/.vscode/settings.json +20 -0
- package/templates/importer/ts/.vscode/tasks.json +36 -0
- package/templates/importer/ts/README.md +38 -0
- package/templates/importer/ts/_gitignore +6 -0
- package/templates/importer/ts/ceru.plugin.json +63 -0
- package/templates/importer/ts/package.json +21 -0
- package/templates/importer/ts/src/index.ts +37 -0
- package/templates/importer/ts/tsconfig.json +16 -0
- package/templates/importer/ts/ui/settings.json +24 -0
- package/templates/react/js/.prettierrc.json +5 -0
- package/templates/react/js/.vscode/ceru.code-snippets +27 -0
- package/templates/react/js/.vscode/extensions.json +3 -0
- package/templates/react/js/.vscode/launch.json +30 -0
- package/templates/react/js/.vscode/settings.json +20 -0
- package/templates/react/js/.vscode/tasks.json +36 -0
- package/templates/react/js/README.md +36 -0
- package/templates/react/js/_gitignore +6 -0
- package/templates/react/js/ceru.plugin.json +60 -0
- package/templates/react/js/package.json +25 -0
- package/templates/react/js/src/App.jsx +22 -0
- package/templates/react/js/src/index.js +7 -0
- package/templates/react/js/src/view.jsx +8 -0
- package/templates/react/js/tsconfig.json +16 -0
- package/templates/react/ts/.prettierrc.json +5 -0
- package/templates/react/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/react/ts/.vscode/extensions.json +3 -0
- package/templates/react/ts/.vscode/launch.json +30 -0
- package/templates/react/ts/.vscode/settings.json +20 -0
- package/templates/react/ts/.vscode/tasks.json +36 -0
- package/templates/react/ts/README.md +36 -0
- package/templates/react/ts/_gitignore +6 -0
- package/templates/react/ts/ceru.plugin.json +60 -0
- package/templates/react/ts/package.json +25 -0
- package/templates/react/ts/src/App.tsx +23 -0
- package/templates/react/ts/src/index.ts +7 -0
- package/templates/react/ts/src/view.tsx +8 -0
- package/templates/react/ts/tsconfig.json +16 -0
- package/templates/snapshot.json +257 -0
- package/templates/source/js/.prettierrc.json +5 -0
- package/templates/source/js/.vscode/ceru.code-snippets +27 -0
- package/templates/source/js/.vscode/extensions.json +3 -0
- package/templates/source/js/.vscode/launch.json +30 -0
- package/templates/source/js/.vscode/settings.json +20 -0
- package/templates/source/js/.vscode/tasks.json +36 -0
- package/templates/source/js/README.md +38 -0
- package/templates/source/js/_gitignore +6 -0
- package/templates/source/js/ceru.plugin.json +51 -0
- package/templates/source/js/package.json +21 -0
- package/templates/source/js/src/index.js +50 -0
- package/templates/source/js/tsconfig.json +16 -0
- package/templates/source/ts/.prettierrc.json +5 -0
- package/templates/source/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/source/ts/.vscode/extensions.json +3 -0
- package/templates/source/ts/.vscode/launch.json +30 -0
- package/templates/source/ts/.vscode/settings.json +20 -0
- package/templates/source/ts/.vscode/tasks.json +36 -0
- package/templates/source/ts/README.md +38 -0
- package/templates/source/ts/_gitignore +6 -0
- package/templates/source/ts/ceru.plugin.json +51 -0
- package/templates/source/ts/package.json +21 -0
- package/templates/source/ts/src/index.ts +50 -0
- package/templates/source/ts/tsconfig.json +16 -0
- package/templates/vue/js/.prettierrc.json +5 -0
- package/templates/vue/js/.vscode/ceru.code-snippets +27 -0
- package/templates/vue/js/.vscode/extensions.json +3 -0
- package/templates/vue/js/.vscode/launch.json +30 -0
- package/templates/vue/js/.vscode/settings.json +20 -0
- package/templates/vue/js/.vscode/tasks.json +36 -0
- package/templates/vue/js/README.md +36 -0
- package/templates/vue/js/_gitignore +6 -0
- package/templates/vue/js/ceru.plugin.json +59 -0
- package/templates/vue/js/package.json +22 -0
- package/templates/vue/js/src/App.vue +31 -0
- package/templates/vue/js/src/env.d.ts +5 -0
- package/templates/vue/js/src/index.js +7 -0
- package/templates/vue/js/src/view.js +8 -0
- package/templates/vue/js/tsconfig.json +17 -0
- package/templates/vue/ts/.prettierrc.json +5 -0
- package/templates/vue/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/vue/ts/.vscode/extensions.json +3 -0
- package/templates/vue/ts/.vscode/launch.json +30 -0
- package/templates/vue/ts/.vscode/settings.json +20 -0
- package/templates/vue/ts/.vscode/tasks.json +36 -0
- package/templates/vue/ts/README.md +36 -0
- package/templates/vue/ts/_gitignore +6 -0
- package/templates/vue/ts/ceru.plugin.json +59 -0
- package/templates/vue/ts/package.json +22 -0
- package/templates/vue/ts/src/App.vue +32 -0
- package/templates/vue/ts/src/env.d.ts +5 -0
- package/templates/vue/ts/src/index.ts +7 -0
- package/templates/vue/ts/src/view.ts +8 -0
- package/templates/vue/ts/tsconfig.json +17 -0
- package/templates/vue-tsx/js/.prettierrc.json +5 -0
- package/templates/vue-tsx/js/.vscode/ceru.code-snippets +27 -0
- package/templates/vue-tsx/js/.vscode/extensions.json +3 -0
- package/templates/vue-tsx/js/.vscode/launch.json +30 -0
- package/templates/vue-tsx/js/.vscode/settings.json +20 -0
- package/templates/vue-tsx/js/.vscode/tasks.json +36 -0
- package/templates/vue-tsx/js/README.md +36 -0
- package/templates/vue-tsx/js/_gitignore +6 -0
- package/templates/vue-tsx/js/ceru.plugin.json +59 -0
- package/templates/vue-tsx/js/package.json +22 -0
- package/templates/vue-tsx/js/src/App.jsx +14 -0
- package/templates/vue-tsx/js/src/env.d.ts +5 -0
- package/templates/vue-tsx/js/src/index.js +7 -0
- package/templates/vue-tsx/js/src/view.js +8 -0
- package/templates/vue-tsx/js/tsconfig.json +17 -0
- package/templates/vue-tsx/ts/.prettierrc.json +5 -0
- package/templates/vue-tsx/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/vue-tsx/ts/.vscode/extensions.json +3 -0
- package/templates/vue-tsx/ts/.vscode/launch.json +30 -0
- package/templates/vue-tsx/ts/.vscode/settings.json +20 -0
- package/templates/vue-tsx/ts/.vscode/tasks.json +36 -0
- package/templates/vue-tsx/ts/README.md +36 -0
- package/templates/vue-tsx/ts/_gitignore +6 -0
- package/templates/vue-tsx/ts/ceru.plugin.json +59 -0
- package/templates/vue-tsx/ts/package.json +22 -0
- package/templates/vue-tsx/ts/src/App.tsx +15 -0
- package/templates/vue-tsx/ts/src/env.d.ts +5 -0
- package/templates/vue-tsx/ts/src/index.ts +7 -0
- package/templates/vue-tsx/ts/src/view.ts +8 -0
- package/templates/vue-tsx/ts/tsconfig.json +17 -0
- package/templates/web-dist/js/.prettierrc.json +5 -0
- package/templates/web-dist/js/.vscode/ceru.code-snippets +27 -0
- package/templates/web-dist/js/.vscode/extensions.json +3 -0
- package/templates/web-dist/js/.vscode/launch.json +30 -0
- package/templates/web-dist/js/.vscode/settings.json +20 -0
- package/templates/web-dist/js/.vscode/tasks.json +36 -0
- package/templates/web-dist/js/README.md +38 -0
- package/templates/web-dist/js/_gitignore +6 -0
- package/templates/web-dist/js/ceru.plugin.json +57 -0
- package/templates/web-dist/js/package.json +21 -0
- package/templates/web-dist/js/src/index.js +7 -0
- package/templates/web-dist/js/tsconfig.json +16 -0
- package/templates/web-dist/js/web-dist/index.html +14 -0
- package/templates/web-dist/js/web-dist/main.js +4 -0
- package/templates/web-dist/js/web-dist/sample.png +0 -0
- package/templates/web-dist/js/web-dist/style.css +11 -0
- package/templates/web-dist/ts/.prettierrc.json +5 -0
- package/templates/web-dist/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/web-dist/ts/.vscode/extensions.json +3 -0
- package/templates/web-dist/ts/.vscode/launch.json +30 -0
- package/templates/web-dist/ts/.vscode/settings.json +20 -0
- package/templates/web-dist/ts/.vscode/tasks.json +36 -0
- package/templates/web-dist/ts/README.md +38 -0
- package/templates/web-dist/ts/_gitignore +6 -0
- package/templates/web-dist/ts/ceru.plugin.json +57 -0
- package/templates/web-dist/ts/package.json +21 -0
- package/templates/web-dist/ts/src/index.ts +7 -0
- package/templates/web-dist/ts/tsconfig.json +16 -0
- package/templates/web-dist/ts/web-dist/index.html +14 -0
- package/templates/web-dist/ts/web-dist/main.js +4 -0
- package/templates/web-dist/ts/web-dist/sample.png +0 -0
- package/templates/web-dist/ts/web-dist/style.css +11 -0
- package/templates/web-surface/js/.prettierrc.json +5 -0
- package/templates/web-surface/js/.vscode/ceru.code-snippets +27 -0
- package/templates/web-surface/js/.vscode/extensions.json +3 -0
- package/templates/web-surface/js/.vscode/launch.json +30 -0
- package/templates/web-surface/js/.vscode/settings.json +20 -0
- package/templates/web-surface/js/.vscode/tasks.json +36 -0
- package/templates/web-surface/js/README.md +36 -0
- package/templates/web-surface/js/_gitignore +6 -0
- package/templates/web-surface/js/ceru.plugin.json +55 -0
- package/templates/web-surface/js/package.json +21 -0
- package/templates/web-surface/js/src/index.js +7 -0
- package/templates/web-surface/js/src/view.js +8 -0
- package/templates/web-surface/js/tsconfig.json +16 -0
- package/templates/web-surface/ts/.prettierrc.json +5 -0
- package/templates/web-surface/ts/.vscode/ceru.code-snippets +27 -0
- package/templates/web-surface/ts/.vscode/extensions.json +3 -0
- package/templates/web-surface/ts/.vscode/launch.json +30 -0
- package/templates/web-surface/ts/.vscode/settings.json +20 -0
- package/templates/web-surface/ts/.vscode/tasks.json +36 -0
- package/templates/web-surface/ts/README.md +36 -0
- package/templates/web-surface/ts/_gitignore +6 -0
- package/templates/web-surface/ts/ceru.plugin.json +55 -0
- package/templates/web-surface/ts/package.json +21 -0
- package/templates/web-surface/ts/src/index.ts +7 -0
- package/templates/web-surface/ts/src/view.ts +8 -0
- package/templates/web-surface/ts/tsconfig.json +16 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Ceru Plugin Build Configuration",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"manifest": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"manifestVersion": {
|
|
10
|
+
"const": 2
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-z0-9][a-z0-9._-]{2,127}$"
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1,
|
|
19
|
+
"maxLength": 120
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
|
|
24
|
+
},
|
|
25
|
+
"description": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 4096
|
|
29
|
+
},
|
|
30
|
+
"author": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 4096
|
|
34
|
+
},
|
|
35
|
+
"publisher": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"maxLength": 4096
|
|
39
|
+
},
|
|
40
|
+
"license": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 4096
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"hostApi": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1,
|
|
51
|
+
"maxLength": 4096
|
|
52
|
+
},
|
|
53
|
+
"logicRuntime": {
|
|
54
|
+
"const": "ceru-js@1"
|
|
55
|
+
},
|
|
56
|
+
"uiSchema": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"maxLength": 4096
|
|
60
|
+
},
|
|
61
|
+
"libraries": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"vue": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"maxLength": 4096
|
|
68
|
+
},
|
|
69
|
+
"react": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"maxLength": 4096
|
|
73
|
+
},
|
|
74
|
+
"react-dom": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1,
|
|
77
|
+
"maxLength": 4096
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [],
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"hostApi",
|
|
86
|
+
"logicRuntime"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
},
|
|
90
|
+
"modules": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"logic": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"entry": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
99
|
+
},
|
|
100
|
+
"activation": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1,
|
|
105
|
+
"maxLength": 4096
|
|
106
|
+
},
|
|
107
|
+
"maxItems": 128,
|
|
108
|
+
"uniqueItems": true
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"entry"
|
|
113
|
+
],
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
},
|
|
116
|
+
"surfaces": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"maxItems": 64,
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"id": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
125
|
+
},
|
|
126
|
+
"kind": {
|
|
127
|
+
"enum": [
|
|
128
|
+
"schema",
|
|
129
|
+
"web"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"entry": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"required": [
|
|
138
|
+
"id",
|
|
139
|
+
"kind",
|
|
140
|
+
"entry"
|
|
141
|
+
],
|
|
142
|
+
"additionalProperties": false
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": [],
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
},
|
|
149
|
+
"contributes": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"providers": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"maxItems": 64,
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"id": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
161
|
+
},
|
|
162
|
+
"name": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1,
|
|
165
|
+
"maxLength": 4096
|
|
166
|
+
},
|
|
167
|
+
"protocols": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"items": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"minLength": 1,
|
|
172
|
+
"maxLength": 4096
|
|
173
|
+
},
|
|
174
|
+
"maxItems": 128,
|
|
175
|
+
"uniqueItems": true
|
|
176
|
+
},
|
|
177
|
+
"connectionMode": {
|
|
178
|
+
"enum": [
|
|
179
|
+
"none",
|
|
180
|
+
"single",
|
|
181
|
+
"multiple"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"icon": {
|
|
185
|
+
"oneOf": [
|
|
186
|
+
{
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"kind": {
|
|
190
|
+
"const": "host"
|
|
191
|
+
},
|
|
192
|
+
"name": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"examples": [
|
|
195
|
+
"platform.tx",
|
|
196
|
+
"platform.kg",
|
|
197
|
+
"platform.kw",
|
|
198
|
+
"platform.wy",
|
|
199
|
+
"platform.mg",
|
|
200
|
+
"platform.local",
|
|
201
|
+
"platform.all",
|
|
202
|
+
"search",
|
|
203
|
+
"music-note",
|
|
204
|
+
"library",
|
|
205
|
+
"cloud",
|
|
206
|
+
"server",
|
|
207
|
+
"import",
|
|
208
|
+
"chart",
|
|
209
|
+
"settings",
|
|
210
|
+
"play",
|
|
211
|
+
"pause",
|
|
212
|
+
"download",
|
|
213
|
+
"share",
|
|
214
|
+
"account",
|
|
215
|
+
"heart",
|
|
216
|
+
"refresh",
|
|
217
|
+
"close",
|
|
218
|
+
"add",
|
|
219
|
+
"info"
|
|
220
|
+
],
|
|
221
|
+
"description": "Host built-in icon name; no icon file is embedded into the plugin."
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"required": [
|
|
225
|
+
"kind",
|
|
226
|
+
"name"
|
|
227
|
+
],
|
|
228
|
+
"additionalProperties": false
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "object",
|
|
232
|
+
"properties": {
|
|
233
|
+
"kind": {
|
|
234
|
+
"const": "asset"
|
|
235
|
+
},
|
|
236
|
+
"resource": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": [
|
|
242
|
+
"kind",
|
|
243
|
+
"resource"
|
|
244
|
+
],
|
|
245
|
+
"additionalProperties": false
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"id",
|
|
252
|
+
"name",
|
|
253
|
+
"protocols"
|
|
254
|
+
],
|
|
255
|
+
"additionalProperties": false
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"commands": {
|
|
259
|
+
"type": "array",
|
|
260
|
+
"maxItems": 128,
|
|
261
|
+
"items": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"properties": {
|
|
264
|
+
"id": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
267
|
+
},
|
|
268
|
+
"title": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"minLength": 1,
|
|
271
|
+
"maxLength": 4096
|
|
272
|
+
},
|
|
273
|
+
"action": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
276
|
+
},
|
|
277
|
+
"view": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"id",
|
|
284
|
+
"title",
|
|
285
|
+
"action"
|
|
286
|
+
],
|
|
287
|
+
"additionalProperties": false
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"sidebarItems": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"maxItems": 64,
|
|
293
|
+
"items": {
|
|
294
|
+
"type": "object",
|
|
295
|
+
"properties": {
|
|
296
|
+
"id": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
299
|
+
},
|
|
300
|
+
"group": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
303
|
+
},
|
|
304
|
+
"title": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"minLength": 1,
|
|
307
|
+
"maxLength": 4096
|
|
308
|
+
},
|
|
309
|
+
"view": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"required": [
|
|
315
|
+
"id",
|
|
316
|
+
"group",
|
|
317
|
+
"title",
|
|
318
|
+
"view"
|
|
319
|
+
],
|
|
320
|
+
"additionalProperties": false
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"settingsPages": {
|
|
324
|
+
"type": "array",
|
|
325
|
+
"maxItems": 64,
|
|
326
|
+
"items": {
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"id": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
332
|
+
},
|
|
333
|
+
"title": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"minLength": 1,
|
|
336
|
+
"maxLength": 4096
|
|
337
|
+
},
|
|
338
|
+
"view": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"required": [
|
|
344
|
+
"id",
|
|
345
|
+
"title",
|
|
346
|
+
"view"
|
|
347
|
+
],
|
|
348
|
+
"additionalProperties": false
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"guestAdapters": {
|
|
352
|
+
"type": "array",
|
|
353
|
+
"maxItems": 16,
|
|
354
|
+
"items": {
|
|
355
|
+
"type": "object",
|
|
356
|
+
"properties": {
|
|
357
|
+
"id": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
360
|
+
},
|
|
361
|
+
"format": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"minLength": 1,
|
|
364
|
+
"maxLength": 4096
|
|
365
|
+
},
|
|
366
|
+
"compatibilityProfile": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"minLength": 1,
|
|
369
|
+
"maxLength": 4096
|
|
370
|
+
},
|
|
371
|
+
"bootstrap": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
374
|
+
},
|
|
375
|
+
"runtime": {
|
|
376
|
+
"const": "ceru-js@1"
|
|
377
|
+
},
|
|
378
|
+
"projectableProtocols": {
|
|
379
|
+
"type": "array",
|
|
380
|
+
"items": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"minLength": 1,
|
|
383
|
+
"maxLength": 4096
|
|
384
|
+
},
|
|
385
|
+
"maxItems": 128,
|
|
386
|
+
"uniqueItems": true
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": [
|
|
390
|
+
"id",
|
|
391
|
+
"format",
|
|
392
|
+
"compatibilityProfile",
|
|
393
|
+
"bootstrap",
|
|
394
|
+
"runtime",
|
|
395
|
+
"projectableProtocols"
|
|
396
|
+
],
|
|
397
|
+
"additionalProperties": false
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": [],
|
|
402
|
+
"additionalProperties": false
|
|
403
|
+
},
|
|
404
|
+
"permissions": {
|
|
405
|
+
"type": "array",
|
|
406
|
+
"maxItems": 64,
|
|
407
|
+
"items": {
|
|
408
|
+
"type": "object",
|
|
409
|
+
"properties": {
|
|
410
|
+
"key": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
|
|
413
|
+
},
|
|
414
|
+
"name": {
|
|
415
|
+
"enum": [
|
|
416
|
+
"network.request",
|
|
417
|
+
"network.private",
|
|
418
|
+
"network.discovery",
|
|
419
|
+
"credentials.use",
|
|
420
|
+
"credentials.read",
|
|
421
|
+
"library.read",
|
|
422
|
+
"library.write",
|
|
423
|
+
"library.delete",
|
|
424
|
+
"player.read",
|
|
425
|
+
"player.control",
|
|
426
|
+
"playback.fallback.hold",
|
|
427
|
+
"files.read",
|
|
428
|
+
"files.write",
|
|
429
|
+
"downloads.create",
|
|
430
|
+
"clipboard.read",
|
|
431
|
+
"clipboard.write",
|
|
432
|
+
"notifications.system",
|
|
433
|
+
"external.open",
|
|
434
|
+
"background.run",
|
|
435
|
+
"services.consume",
|
|
436
|
+
"sharing.publish",
|
|
437
|
+
"sharing.revoke",
|
|
438
|
+
"guests.manage",
|
|
439
|
+
"guests.run"
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
"scope": {
|
|
443
|
+
"type": "object"
|
|
444
|
+
},
|
|
445
|
+
"reason": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"minLength": 1,
|
|
448
|
+
"maxLength": 4096
|
|
449
|
+
},
|
|
450
|
+
"optional": {
|
|
451
|
+
"type": "boolean"
|
|
452
|
+
},
|
|
453
|
+
"requiredFor": {
|
|
454
|
+
"type": "array",
|
|
455
|
+
"items": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"minLength": 1,
|
|
458
|
+
"maxLength": 4096
|
|
459
|
+
},
|
|
460
|
+
"maxItems": 128,
|
|
461
|
+
"uniqueItems": true
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"required": [
|
|
465
|
+
"key",
|
|
466
|
+
"name",
|
|
467
|
+
"reason"
|
|
468
|
+
],
|
|
469
|
+
"additionalProperties": false
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"guestPolicy": {
|
|
473
|
+
"type": "object",
|
|
474
|
+
"properties": {
|
|
475
|
+
"maxDepth": {
|
|
476
|
+
"const": 1
|
|
477
|
+
},
|
|
478
|
+
"allowedCapabilities": {
|
|
479
|
+
"type": "array",
|
|
480
|
+
"items": {
|
|
481
|
+
"type": "string",
|
|
482
|
+
"minLength": 1,
|
|
483
|
+
"maxLength": 4096
|
|
484
|
+
},
|
|
485
|
+
"maxItems": 128,
|
|
486
|
+
"uniqueItems": true
|
|
487
|
+
},
|
|
488
|
+
"networkScopeMode": {
|
|
489
|
+
"const": "per-guest-user-approved"
|
|
490
|
+
},
|
|
491
|
+
"allowNativeCode": {
|
|
492
|
+
"const": false
|
|
493
|
+
},
|
|
494
|
+
"allowRemoteCodeExecution": {
|
|
495
|
+
"const": false
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"required": [
|
|
499
|
+
"maxDepth",
|
|
500
|
+
"allowedCapabilities",
|
|
501
|
+
"networkScopeMode",
|
|
502
|
+
"allowNativeCode",
|
|
503
|
+
"allowRemoteCodeExecution"
|
|
504
|
+
],
|
|
505
|
+
"additionalProperties": false
|
|
506
|
+
},
|
|
507
|
+
"dataSchemas": {
|
|
508
|
+
"type": "object",
|
|
509
|
+
"properties": {
|
|
510
|
+
"config": {
|
|
511
|
+
"type": "integer",
|
|
512
|
+
"minimum": 1
|
|
513
|
+
},
|
|
514
|
+
"state": {
|
|
515
|
+
"type": "integer",
|
|
516
|
+
"minimum": 1
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"required": [
|
|
520
|
+
"config",
|
|
521
|
+
"state"
|
|
522
|
+
],
|
|
523
|
+
"additionalProperties": false
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"required": [
|
|
527
|
+
"manifestVersion",
|
|
528
|
+
"id",
|
|
529
|
+
"name",
|
|
530
|
+
"version",
|
|
531
|
+
"engines",
|
|
532
|
+
"modules"
|
|
533
|
+
],
|
|
534
|
+
"additionalProperties": false
|
|
535
|
+
},
|
|
536
|
+
"entries": {
|
|
537
|
+
"type": "object",
|
|
538
|
+
"description": "Map stable module IDs to TS/TSX/JS source files",
|
|
539
|
+
"additionalProperties": {
|
|
540
|
+
"type": "string"
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
"resources": {
|
|
544
|
+
"type": "object",
|
|
545
|
+
"additionalProperties": {
|
|
546
|
+
"type": "object",
|
|
547
|
+
"properties": {
|
|
548
|
+
"path": {
|
|
549
|
+
"type": "string"
|
|
550
|
+
},
|
|
551
|
+
"type": {
|
|
552
|
+
"enum": [
|
|
553
|
+
"json",
|
|
554
|
+
"text",
|
|
555
|
+
"base64"
|
|
556
|
+
]
|
|
557
|
+
},
|
|
558
|
+
"mime": {
|
|
559
|
+
"type": "string"
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"required": [
|
|
563
|
+
"path",
|
|
564
|
+
"type"
|
|
565
|
+
],
|
|
566
|
+
"additionalProperties": false
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"output": {
|
|
570
|
+
"type": "string",
|
|
571
|
+
"default": "dist/plugin.js",
|
|
572
|
+
"pattern": "\\.(?:js|jsx)$"
|
|
573
|
+
},
|
|
574
|
+
"framework": {
|
|
575
|
+
"enum": [
|
|
576
|
+
"vanilla",
|
|
577
|
+
"vue",
|
|
578
|
+
"react"
|
|
579
|
+
],
|
|
580
|
+
"default": "vanilla"
|
|
581
|
+
},
|
|
582
|
+
"sharedLibraries": {
|
|
583
|
+
"type": "object",
|
|
584
|
+
"properties": {
|
|
585
|
+
"vue": {
|
|
586
|
+
"type": "string"
|
|
587
|
+
},
|
|
588
|
+
"react": {
|
|
589
|
+
"type": "string"
|
|
590
|
+
},
|
|
591
|
+
"react-dom": {
|
|
592
|
+
"type": "string"
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"additionalProperties": false
|
|
596
|
+
},
|
|
597
|
+
"webDist": {
|
|
598
|
+
"type": "object",
|
|
599
|
+
"description": "Map a Surface entry ID to an already-built local HTML directory",
|
|
600
|
+
"additionalProperties": {
|
|
601
|
+
"type": "string"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"required": [
|
|
606
|
+
"manifest",
|
|
607
|
+
"entries"
|
|
608
|
+
],
|
|
609
|
+
"additionalProperties": false
|
|
610
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Host platform icon": {
|
|
3
|
+
"prefix": "ceru-icon",
|
|
4
|
+
"body": [
|
|
5
|
+
"{ kind: 'host', name: 'platform.${1:tx}' }"
|
|
6
|
+
],
|
|
7
|
+
"description": "使用宿主平台图标,无需打入插件"
|
|
8
|
+
},
|
|
9
|
+
"Host lodash": {
|
|
10
|
+
"prefix": "ceru-lodash",
|
|
11
|
+
"body": [
|
|
12
|
+
"ctx.utils.lodash.${1:uniqBy}(${2:items}, ${3:key})"
|
|
13
|
+
],
|
|
14
|
+
"description": "调用宿主的带类型 Lodash 工具"
|
|
15
|
+
},
|
|
16
|
+
"Source rate limit": {
|
|
17
|
+
"prefix": "ceru-rate-limit",
|
|
18
|
+
"body": [
|
|
19
|
+
"return ctx.playback.failure({",
|
|
20
|
+
" code: 'RATE_LIMITED',",
|
|
21
|
+
" message: '${1:请稍后重试}',",
|
|
22
|
+
" recovery: { mode: 'await-user', maxWaitMs: 60000 }",
|
|
23
|
+
"})"
|
|
24
|
+
],
|
|
25
|
+
"description": "返回结构化限流结果,由 Host 决定换源与交互"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Attach to Ceru plugin",
|
|
19
|
+
"type": "pwa-chrome",
|
|
20
|
+
"request": "attach",
|
|
21
|
+
"port": 9223,
|
|
22
|
+
"webRoot": "${workspaceFolder}",
|
|
23
|
+
"sourceMaps": true,
|
|
24
|
+
"sourceMapPathOverrides": {
|
|
25
|
+
"ceru:///*": "${workspaceFolder}/*"
|
|
26
|
+
},
|
|
27
|
+
"skipFiles": ["**/node_modules/**"]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
+
"typescript.enablePromptUseWorkspaceTsdk": true,
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"[typescript]": {
|
|
6
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
7
|
+
},
|
|
8
|
+
"[javascript]": {
|
|
9
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
10
|
+
},
|
|
11
|
+
"json.schemas": [
|
|
12
|
+
{
|
|
13
|
+
"fileMatch": ["/ceru.plugin.json"],
|
|
14
|
+
"url": "./node_modules/@shiqianjiang/ceru-plugin-cli/schemas/config.schema.json"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"files.exclude": {
|
|
18
|
+
"**/*.tsbuildinfo": true
|
|
19
|
+
}
|
|
20
|
+
}
|