@shiqianjiang/ceru-plugin-cli 0.3.16 → 3.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.
Files changed (302) hide show
  1. package/README.md +26 -7
  2. package/assets/compatibility.json +18 -0
  3. package/dist/compatibility.d.ts +24 -0
  4. package/dist/compatibility.js +119 -0
  5. package/dist/component.d.ts +6 -0
  6. package/dist/component.js +60 -0
  7. package/dist/dev-music.d.ts +19 -0
  8. package/dist/dev-music.js +81 -0
  9. package/dist/dev-plugin-services.d.ts +10 -0
  10. package/dist/dev-plugin-services.js +67 -0
  11. package/dist/dev.d.ts +1 -9
  12. package/dist/dev.js +53 -713
  13. package/dist/frameworks.d.ts +5 -2
  14. package/dist/frameworks.js +43 -6
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +54 -23
  17. package/dist/init.js +3 -3
  18. package/dist/migrate.d.ts +3 -0
  19. package/dist/migrate.js +109 -0
  20. package/dist/project.d.ts +5 -2
  21. package/dist/project.js +131 -43
  22. package/dist/test-hooks.d.ts +1 -0
  23. package/dist/test-hooks.js +209 -0
  24. package/dist/test-services.d.ts +4 -0
  25. package/dist/test-services.js +54 -0
  26. package/dist/watch-vue-types.d.ts +17 -0
  27. package/dist/watch-vue-types.js +145 -0
  28. package/package.json +10 -6
  29. package/schemas/config.schema.json +954 -452
  30. package/templates/account-qrcode/js/.vscode/extensions.json +3 -0
  31. package/templates/account-qrcode/js/.vscode/launch.json +19 -0
  32. package/templates/account-qrcode/js/.vscode/settings.json +20 -0
  33. package/templates/account-qrcode/js/.vscode/tasks.json +43 -0
  34. package/templates/account-qrcode/js/README.md +15 -0
  35. package/templates/account-qrcode/js/_gitignore +6 -0
  36. package/templates/account-qrcode/js/ceru-plugin.code-workspace +8 -0
  37. package/templates/account-qrcode/js/ceru.plugin.json +62 -0
  38. package/templates/account-qrcode/js/package.json +24 -0
  39. package/templates/account-qrcode/js/src/Login.vue +25 -0
  40. package/templates/account-qrcode/js/src/index.js +25 -0
  41. package/templates/account-qrcode/js/src/login-html.js +23 -0
  42. package/templates/account-qrcode/js/tsconfig.json +17 -0
  43. package/templates/account-qrcode/ts/.vscode/extensions.json +3 -0
  44. package/templates/account-qrcode/ts/.vscode/launch.json +19 -0
  45. package/templates/account-qrcode/ts/.vscode/settings.json +20 -0
  46. package/templates/account-qrcode/ts/.vscode/tasks.json +43 -0
  47. package/templates/account-qrcode/ts/README.md +15 -0
  48. package/templates/account-qrcode/ts/_gitignore +6 -0
  49. package/templates/account-qrcode/ts/ceru-plugin.code-workspace +8 -0
  50. package/templates/account-qrcode/ts/ceru.plugin.json +62 -0
  51. package/templates/account-qrcode/ts/package.json +24 -0
  52. package/templates/account-qrcode/ts/src/Login.vue +25 -0
  53. package/templates/account-qrcode/ts/src/index.ts +25 -0
  54. package/templates/account-qrcode/ts/src/login-html.ts +23 -0
  55. package/templates/account-qrcode/ts/tsconfig.json +17 -0
  56. package/templates/connected-library/js/.vscode/launch.json +12 -29
  57. package/templates/connected-library/js/.vscode/tasks.json +2 -3
  58. package/templates/connected-library/js/README.md +26 -12
  59. package/templates/connected-library/js/ceru.plugin.json +122 -50
  60. package/templates/connected-library/js/package.json +5 -5
  61. package/templates/connected-library/js/src/index.js +46 -5
  62. package/templates/connected-library/js/src/settings.js +28 -0
  63. package/templates/connected-library/ts/.vscode/launch.json +12 -29
  64. package/templates/connected-library/ts/.vscode/tasks.json +2 -3
  65. package/templates/connected-library/ts/README.md +26 -12
  66. package/templates/connected-library/ts/ceru.plugin.json +122 -50
  67. package/templates/connected-library/ts/package.json +5 -5
  68. package/templates/connected-library/ts/src/index.ts +46 -5
  69. package/templates/connected-library/ts/src/settings.ts +28 -0
  70. package/templates/encrypted-source/README.md +86 -0
  71. package/templates/encrypted-source/js/.prettierrc.json +5 -0
  72. package/templates/encrypted-source/js/.vscode/ceru.code-snippets +55 -0
  73. package/templates/encrypted-source/js/.vscode/extensions.json +3 -0
  74. package/templates/encrypted-source/js/.vscode/launch.json +15 -0
  75. package/templates/encrypted-source/js/.vscode/settings.json +20 -0
  76. package/templates/encrypted-source/js/.vscode/tasks.json +40 -0
  77. package/templates/encrypted-source/js/DEMO.md +77 -0
  78. package/templates/encrypted-source/js/README.md +13 -0
  79. package/templates/encrypted-source/js/_gitignore +6 -0
  80. package/templates/encrypted-source/js/ceru-plugin.code-workspace +8 -0
  81. package/templates/encrypted-source/js/ceru.plugin.json +95 -0
  82. package/templates/encrypted-source/js/package.json +26 -0
  83. package/templates/encrypted-source/js/resources/xor-byte.wasm +0 -0
  84. package/templates/encrypted-source/js/resources/xor-byte.wat +5 -0
  85. package/templates/encrypted-source/js/src/demo.js +200 -0
  86. package/templates/encrypted-source/js/src/fixtures.js +118 -0
  87. package/templates/encrypted-source/js/src/index.js +4 -0
  88. package/templates/encrypted-source/js/tests/demo.test.mjs +357 -0
  89. package/templates/encrypted-source/js/tsconfig.json +16 -0
  90. package/templates/encrypted-source/ts/.prettierrc.json +5 -0
  91. package/templates/encrypted-source/ts/.vscode/ceru.code-snippets +55 -0
  92. package/templates/encrypted-source/ts/.vscode/extensions.json +3 -0
  93. package/templates/encrypted-source/ts/.vscode/launch.json +15 -0
  94. package/templates/encrypted-source/ts/.vscode/settings.json +20 -0
  95. package/templates/encrypted-source/ts/.vscode/tasks.json +40 -0
  96. package/templates/encrypted-source/ts/DEMO.md +77 -0
  97. package/templates/encrypted-source/ts/README.md +13 -0
  98. package/templates/encrypted-source/ts/_gitignore +6 -0
  99. package/templates/encrypted-source/ts/ceru-plugin.code-workspace +8 -0
  100. package/templates/encrypted-source/ts/ceru.plugin.json +95 -0
  101. package/templates/encrypted-source/ts/package.json +26 -0
  102. package/templates/encrypted-source/ts/resources/xor-byte.wasm +0 -0
  103. package/templates/encrypted-source/ts/resources/xor-byte.wat +5 -0
  104. package/templates/encrypted-source/ts/src/demo.ts +212 -0
  105. package/templates/encrypted-source/ts/src/fixtures.ts +125 -0
  106. package/templates/encrypted-source/ts/src/index.ts +4 -0
  107. package/templates/encrypted-source/ts/tests/demo.test.mjs +357 -0
  108. package/templates/encrypted-source/ts/tsconfig.json +17 -0
  109. package/templates/guest-adapter/js/.vscode/launch.json +12 -29
  110. package/templates/guest-adapter/js/.vscode/tasks.json +2 -3
  111. package/templates/guest-adapter/js/README.md +10 -10
  112. package/templates/guest-adapter/js/ceru.plugin.json +67 -62
  113. package/templates/guest-adapter/js/package.json +5 -5
  114. package/templates/guest-adapter/js/src/index.js +1 -1
  115. package/templates/guest-adapter/js/src/settings.js +8 -0
  116. package/templates/guest-adapter/ts/.vscode/launch.json +12 -29
  117. package/templates/guest-adapter/ts/.vscode/tasks.json +2 -3
  118. package/templates/guest-adapter/ts/README.md +10 -10
  119. package/templates/guest-adapter/ts/ceru.plugin.json +67 -62
  120. package/templates/guest-adapter/ts/package.json +5 -5
  121. package/templates/guest-adapter/ts/src/index.ts +1 -1
  122. package/templates/guest-adapter/ts/src/settings.ts +8 -0
  123. package/templates/importer/js/.vscode/launch.json +12 -29
  124. package/templates/importer/js/.vscode/tasks.json +2 -3
  125. package/templates/importer/js/README.md +10 -10
  126. package/templates/importer/js/ceru.plugin.json +23 -21
  127. package/templates/importer/js/package.json +5 -5
  128. package/templates/importer/ts/.vscode/launch.json +12 -29
  129. package/templates/importer/ts/.vscode/tasks.json +2 -3
  130. package/templates/importer/ts/README.md +10 -10
  131. package/templates/importer/ts/ceru.plugin.json +23 -21
  132. package/templates/importer/ts/package.json +5 -5
  133. package/templates/page-extension/js/.vscode/extensions.json +3 -0
  134. package/templates/page-extension/js/.vscode/launch.json +19 -0
  135. package/templates/page-extension/js/.vscode/settings.json +20 -0
  136. package/templates/page-extension/js/.vscode/tasks.json +43 -0
  137. package/templates/page-extension/js/README.md +9 -0
  138. package/templates/page-extension/js/_gitignore +6 -0
  139. package/templates/page-extension/js/ceru-plugin.code-workspace +8 -0
  140. package/templates/page-extension/js/ceru.plugin.json +94 -0
  141. package/templates/page-extension/js/package.json +24 -0
  142. package/templates/page-extension/js/src/Open.vue +6 -0
  143. package/templates/page-extension/js/src/Search.vue +62 -0
  144. package/templates/page-extension/js/src/index.js +54 -0
  145. package/templates/page-extension/js/tsconfig.json +17 -0
  146. package/templates/page-extension/ts/.vscode/extensions.json +3 -0
  147. package/templates/page-extension/ts/.vscode/launch.json +19 -0
  148. package/templates/page-extension/ts/.vscode/settings.json +20 -0
  149. package/templates/page-extension/ts/.vscode/tasks.json +43 -0
  150. package/templates/page-extension/ts/README.md +9 -0
  151. package/templates/page-extension/ts/_gitignore +6 -0
  152. package/templates/page-extension/ts/ceru-plugin.code-workspace +8 -0
  153. package/templates/page-extension/ts/ceru.plugin.json +94 -0
  154. package/templates/page-extension/ts/package.json +24 -0
  155. package/templates/page-extension/ts/src/Open.vue +6 -0
  156. package/templates/page-extension/ts/src/Search.vue +62 -0
  157. package/templates/page-extension/ts/src/index.ts +54 -0
  158. package/templates/page-extension/ts/tsconfig.json +17 -0
  159. package/templates/playback-hook/js/.prettierrc.json +5 -0
  160. package/templates/playback-hook/js/.vscode/extensions.json +3 -0
  161. package/templates/playback-hook/js/.vscode/launch.json +19 -0
  162. package/templates/playback-hook/js/.vscode/settings.json +20 -0
  163. package/templates/playback-hook/js/.vscode/tasks.json +50 -0
  164. package/templates/playback-hook/js/README.md +24 -0
  165. package/templates/playback-hook/js/_gitignore +6 -0
  166. package/templates/playback-hook/js/ceru-plugin.code-workspace +8 -0
  167. package/templates/playback-hook/js/ceru.plugin.json +36 -0
  168. package/templates/playback-hook/js/package.json +23 -0
  169. package/templates/playback-hook/js/src/index.js +25 -0
  170. package/templates/playback-hook/js/tests/hooks.json +316 -0
  171. package/templates/playback-hook/js/tsconfig.json +16 -0
  172. package/templates/playback-hook/ts/.prettierrc.json +5 -0
  173. package/templates/playback-hook/ts/.vscode/extensions.json +3 -0
  174. package/templates/playback-hook/ts/.vscode/launch.json +19 -0
  175. package/templates/playback-hook/ts/.vscode/settings.json +20 -0
  176. package/templates/playback-hook/ts/.vscode/tasks.json +50 -0
  177. package/templates/playback-hook/ts/README.md +24 -0
  178. package/templates/playback-hook/ts/_gitignore +6 -0
  179. package/templates/playback-hook/ts/ceru-plugin.code-workspace +8 -0
  180. package/templates/playback-hook/ts/ceru.plugin.json +36 -0
  181. package/templates/playback-hook/ts/package.json +23 -0
  182. package/templates/playback-hook/ts/src/index.ts +25 -0
  183. package/templates/playback-hook/ts/tests/hooks.json +316 -0
  184. package/templates/playback-hook/ts/tsconfig.json +16 -0
  185. package/templates/player-skin/js/.vscode/extensions.json +3 -0
  186. package/templates/player-skin/js/.vscode/launch.json +19 -0
  187. package/templates/player-skin/js/.vscode/settings.json +20 -0
  188. package/templates/player-skin/js/.vscode/tasks.json +43 -0
  189. package/templates/player-skin/js/README.md +11 -0
  190. package/templates/player-skin/js/_gitignore +6 -0
  191. package/templates/player-skin/js/assets/studio-preview.svg +15 -0
  192. package/templates/player-skin/js/ceru-plugin.code-workspace +8 -0
  193. package/templates/player-skin/js/ceru.plugin.json +77 -0
  194. package/templates/player-skin/js/package.json +24 -0
  195. package/templates/player-skin/js/src/Artwork.vue +9 -0
  196. package/templates/player-skin/js/src/Background.vue +15 -0
  197. package/templates/player-skin/js/src/BuiltinLyrics.vue +15 -0
  198. package/templates/player-skin/js/src/Lyrics.vue +28 -0
  199. package/templates/player-skin/js/tsconfig.json +17 -0
  200. package/templates/player-skin/ts/.vscode/extensions.json +3 -0
  201. package/templates/player-skin/ts/.vscode/launch.json +19 -0
  202. package/templates/player-skin/ts/.vscode/settings.json +20 -0
  203. package/templates/player-skin/ts/.vscode/tasks.json +43 -0
  204. package/templates/player-skin/ts/README.md +11 -0
  205. package/templates/player-skin/ts/_gitignore +6 -0
  206. package/templates/player-skin/ts/assets/studio-preview.svg +15 -0
  207. package/templates/player-skin/ts/ceru-plugin.code-workspace +8 -0
  208. package/templates/player-skin/ts/ceru.plugin.json +77 -0
  209. package/templates/player-skin/ts/package.json +24 -0
  210. package/templates/player-skin/ts/src/Artwork.vue +9 -0
  211. package/templates/player-skin/ts/src/Background.vue +15 -0
  212. package/templates/player-skin/ts/src/BuiltinLyrics.vue +15 -0
  213. package/templates/player-skin/ts/src/Lyrics.vue +28 -0
  214. package/templates/player-skin/ts/tsconfig.json +17 -0
  215. package/templates/react/js/.vscode/launch.json +12 -29
  216. package/templates/react/js/.vscode/tasks.json +2 -3
  217. package/templates/react/js/README.md +10 -10
  218. package/templates/react/js/ceru.plugin.json +27 -22
  219. package/templates/react/js/package.json +5 -5
  220. package/templates/react/js/src/index.js +1 -1
  221. package/templates/react/ts/.vscode/launch.json +12 -29
  222. package/templates/react/ts/.vscode/tasks.json +2 -3
  223. package/templates/react/ts/README.md +10 -10
  224. package/templates/react/ts/ceru.plugin.json +27 -22
  225. package/templates/react/ts/package.json +5 -5
  226. package/templates/react/ts/src/index.ts +1 -1
  227. package/templates/snapshot.json +152 -6
  228. package/templates/source/js/.vscode/launch.json +12 -29
  229. package/templates/source/js/.vscode/tasks.json +2 -3
  230. package/templates/source/js/README.md +12 -10
  231. package/templates/source/js/ceru.plugin.json +44 -26
  232. package/templates/source/js/package.json +5 -5
  233. package/templates/source/js/src/index.js +10 -8
  234. package/templates/source/ts/.vscode/launch.json +12 -29
  235. package/templates/source/ts/.vscode/tasks.json +2 -3
  236. package/templates/source/ts/README.md +12 -10
  237. package/templates/source/ts/ceru.plugin.json +44 -26
  238. package/templates/source/ts/package.json +5 -5
  239. package/templates/source/ts/src/index.ts +10 -8
  240. package/templates/vue/js/.vscode/launch.json +12 -29
  241. package/templates/vue/js/.vscode/tasks.json +2 -3
  242. package/templates/vue/js/README.md +10 -10
  243. package/templates/vue/js/ceru.plugin.json +27 -22
  244. package/templates/vue/js/package.json +5 -5
  245. package/templates/vue/js/src/index.js +1 -1
  246. package/templates/vue/ts/.vscode/launch.json +12 -29
  247. package/templates/vue/ts/.vscode/tasks.json +2 -3
  248. package/templates/vue/ts/README.md +10 -10
  249. package/templates/vue/ts/ceru.plugin.json +27 -22
  250. package/templates/vue/ts/package.json +5 -5
  251. package/templates/vue/ts/src/index.ts +1 -1
  252. package/templates/vue-tsx/js/.vscode/launch.json +12 -29
  253. package/templates/vue-tsx/js/.vscode/tasks.json +2 -3
  254. package/templates/vue-tsx/js/README.md +10 -10
  255. package/templates/vue-tsx/js/ceru.plugin.json +27 -22
  256. package/templates/vue-tsx/js/package.json +5 -5
  257. package/templates/vue-tsx/js/src/index.js +1 -1
  258. package/templates/vue-tsx/ts/.vscode/launch.json +12 -29
  259. package/templates/vue-tsx/ts/.vscode/tasks.json +2 -3
  260. package/templates/vue-tsx/ts/README.md +10 -10
  261. package/templates/vue-tsx/ts/ceru.plugin.json +27 -22
  262. package/templates/vue-tsx/ts/package.json +5 -5
  263. package/templates/vue-tsx/ts/src/index.ts +1 -1
  264. package/templates/web-dist/js/.vscode/launch.json +12 -29
  265. package/templates/web-dist/js/.vscode/tasks.json +2 -3
  266. package/templates/web-dist/js/README.md +10 -10
  267. package/templates/web-dist/js/ceru.plugin.json +27 -22
  268. package/templates/web-dist/js/package.json +5 -5
  269. package/templates/web-dist/js/src/index.js +1 -1
  270. package/templates/web-dist/ts/.vscode/launch.json +12 -29
  271. package/templates/web-dist/ts/.vscode/tasks.json +2 -3
  272. package/templates/web-dist/ts/README.md +10 -10
  273. package/templates/web-dist/ts/ceru.plugin.json +27 -22
  274. package/templates/web-dist/ts/package.json +5 -5
  275. package/templates/web-dist/ts/src/index.ts +1 -1
  276. package/templates/web-surface/js/.vscode/launch.json +12 -29
  277. package/templates/web-surface/js/.vscode/tasks.json +2 -3
  278. package/templates/web-surface/js/README.md +10 -10
  279. package/templates/web-surface/js/ceru.plugin.json +35 -35
  280. package/templates/web-surface/js/package.json +5 -5
  281. package/templates/web-surface/js/src/index.js +1 -1
  282. package/templates/web-surface/ts/.vscode/launch.json +12 -29
  283. package/templates/web-surface/ts/.vscode/tasks.json +2 -3
  284. package/templates/web-surface/ts/README.md +10 -10
  285. package/templates/web-surface/ts/ceru.plugin.json +35 -35
  286. package/templates/web-surface/ts/package.json +5 -5
  287. package/templates/web-surface/ts/src/index.ts +1 -1
  288. package/assets/core-contracts.js +0 -1
  289. package/assets/electron-app/main.cjs +0 -1
  290. package/assets/electron-app/package.json +0 -8
  291. package/assets/electron.cjs +0 -42
  292. package/assets/index.html +0 -94
  293. package/assets/native-view.js +0 -197
  294. package/assets/playground.js +0 -883
  295. package/assets/sandbox.js +0 -67
  296. package/assets/style.css +0 -337
  297. package/dist/socket-broker.d.ts +0 -23
  298. package/dist/socket-broker.js +0 -229
  299. package/templates/connected-library/js/ui/settings.json +0 -24
  300. package/templates/connected-library/ts/ui/settings.json +0 -24
  301. package/templates/guest-adapter/js/ui/settings.json +0 -14
  302. package/templates/guest-adapter/ts/ui/settings.json +0 -14
@@ -1,86 +1,158 @@
1
1
  {
2
2
  "manifest": {
3
- "manifestVersion": 2,
3
+ "manifestVersion": 3,
4
4
  "id": "local.ts",
5
5
  "name": "ts",
6
6
  "version": "0.1.0",
7
- "description": "A Ceru Music v2 connected-library plugin",
7
+ "description": "A Ceru Music v3 connected-library plugin",
8
+ "dataSchemas": {
9
+ "config": 1,
10
+ "state": 1
11
+ },
8
12
  "engines": {
9
- "hostApi": "^2.0.0",
10
- "logicRuntime": "ceru-js@1",
11
- "uiSchema": "^1.0.0"
13
+ "hostApi": "^3.0.0",
14
+ "logicRuntime": "ceru-js@1"
12
15
  },
13
- "modules": {
16
+ "entry": {
14
17
  "logic": {
15
- "entry": "logic.main",
16
- "activation": ["onCommand:hello", "onProvider:catalog"]
18
+ "activation": [
19
+ "onCommand:hello",
20
+ "onProvider:catalog"
21
+ ],
22
+ "module": "logic.main"
17
23
  },
18
- "surfaces": [
19
- { "id": "library", "kind": "native", "entry": "render.library" },
24
+ "views": [
25
+ {
26
+ "id": "library",
27
+ "kind": "native",
28
+ "module": "render.library"
29
+ },
20
30
  {
21
31
  "id": "settings",
22
- "kind": "schema",
23
- "entry": "schema.settings"
32
+ "kind": "web",
33
+ "module": "view.settings"
24
34
  }
25
35
  ]
26
36
  },
27
- "contributes": {
28
- "commands": [
29
- { "id": "account.summary", "title": "账号状态", "action": "account.summary" },
30
- { "id": "render.library", "title": "渲染音乐库", "action": "render.library" },
31
- { "id": "library.open", "title": "打开原生歌单页", "action": "library.open" },
32
- { "id": "playlist.open", "title": "打开歌单", "action": "playlist.open" },
33
- { "id": "playlist.import", "title": "导入歌单", "action": "playlist.import" },
34
- { "id": "track.play", "title": "播放", "action": "track.play" },
37
+ "provides": {
38
+ "providers": [
39
+ {
40
+ "id": "catalog",
41
+ "name": "ts",
42
+ "protocols": [
43
+ "music.search@1",
44
+ "music.resolve@1",
45
+ "music.playlists@1"
46
+ ],
47
+ "icon": {
48
+ "kind": "host",
49
+ "name": "music-note"
50
+ },
51
+ "connectionMode": "multiple",
52
+ "beforeSelect": "catalog.enter"
53
+ }
54
+ ],
55
+ "importers": [
56
+ {
57
+ "id": "catalog",
58
+ "title": "演示歌单",
59
+ "providerId": "catalog"
60
+ }
61
+ ],
62
+ "actions": [
63
+ { "id": "catalog.enter", "title": "切入音乐库" },
64
+ {
65
+ "id": "account.summary",
66
+ "title": "账号状态"
67
+ },
68
+ {
69
+ "id": "render.library",
70
+ "title": "渲染音乐库"
71
+ },
72
+ {
73
+ "id": "library.open",
74
+ "title": "打开原生歌单页"
75
+ },
76
+ {
77
+ "id": "playlist.open",
78
+ "title": "打开歌单"
79
+ },
80
+ {
81
+ "id": "playlist.import",
82
+ "title": "导入歌单"
83
+ },
84
+ {
85
+ "id": "track.play",
86
+ "title": "播放"
87
+ },
35
88
  {
36
89
  "id": "hello",
37
- "title": "Hello",
38
- "action": "hello"
90
+ "title": "Hello"
91
+ },
92
+ {
93
+ "id": "connection.visible",
94
+ "title": "判断演示连接状态"
39
95
  },
40
96
  {
41
- "id": "connect",
97
+ "id": "connection.connect",
42
98
  "title": "演示连接",
43
- "action": "connection.connect",
44
99
  "view": "settings"
45
100
  }
46
101
  ],
47
- "providers": [
102
+ "accounts": [
48
103
  {
49
104
  "id": "catalog",
50
- "name": "ts",
51
- "protocols": ["music.search@1", "music.resolve@1", "music.playlists@1"],
52
- "icon": {
53
- "kind": "host",
54
- "name": "music-note"
55
- },
56
- "connectionMode": "multiple"
105
+ "title": "音乐库账号",
106
+ "multiple": true,
107
+ "capabilities": ["profile", "likes", "playlists", "history", "recommend"],
108
+ "loginMethods": [
109
+ "form"
110
+ ],
111
+ "providers": [
112
+ "catalog"
113
+ ],
114
+ "view": "settings"
57
115
  }
58
- ],
59
- "playlistSections": [{ "id": "library", "title": "我的音乐库", "view": "library", "order": 0 }],
60
- "accountItems": [{ "id": "catalog", "title": "音乐库账号", "view": "settings", "action": "account.summary" }],
61
- "playlistImporters": [{ "id": "catalog", "title": "演示歌单", "providerId": "catalog" }],
62
- "settingsPages": [
116
+ ]
117
+ },
118
+ "uses": {
119
+ "permissions": [
120
+ {
121
+ "key": "playback",
122
+ "name": "player.control",
123
+ "reason": "使用 Host 的播放器和队列播放音乐库歌曲"
124
+ }
125
+ ]
126
+ },
127
+ "ui": {
128
+ "pages": [
129
+ {
130
+ "id": "connected",
131
+ "title": "已连接的音乐库",
132
+ "view": "library",
133
+ "mount": "home-tab",
134
+ "when": { "selectedSource": "catalog", "predicate": "connection.visible" }
135
+ },
63
136
  {
64
137
  "id": "settings",
65
138
  "title": "插件设置",
66
- "view": "settings"
139
+ "view": "settings",
140
+ "mount": "settings"
141
+ },
142
+ {
143
+ "id": "library",
144
+ "title": "我的音乐库",
145
+ "view": "library",
146
+ "order": 0,
147
+ "mount": "playlist-section"
67
148
  }
68
149
  ]
69
- },
70
- "permissions": [{ "key": "playback", "name": "player.control", "reason": "使用 Host 的播放器和队列播放音乐库歌曲" }],
71
- "dataSchemas": {
72
- "config": 1,
73
- "state": 1
74
150
  }
75
151
  },
76
152
  "entries": {
77
- "logic.main": "src/index.ts"
78
- },
79
- "resources": {
80
- "schema.settings": {
81
- "path": "ui/settings.json",
82
- "type": "json"
83
- }
153
+ "logic.main": "src/index.ts",
154
+ "view.settings": "src/settings.ts"
84
155
  },
156
+ "resources": {},
85
157
  "output": "dist/plugin.js"
86
158
  }
@@ -6,17 +6,17 @@
6
6
  "scripts": {
7
7
  "dev": "ceru-plugin dev",
8
8
  "build": "ceru-plugin build",
9
- "typecheck": "tsc --noEmit",
9
+ "typecheck": "ceru-plugin typecheck",
10
10
  "validate": "ceru-plugin validate dist/plugin.js",
11
- "preview": "ceru-plugin preview dist/plugin.js"
11
+ "preview": "ceru-plugin preview dist/plugin.js",
12
+ "check:compat": "ceru-plugin check-compat"
12
13
  },
13
14
  "dependencies": {
14
- "@shiqianjiang/ceru-plugin-sdk": "^0.3.16"
15
+ "@shiqianjiang/ceru-plugin-sdk": "^3.0.0"
15
16
  },
16
17
  "devDependencies": {
17
- "@shiqianjiang/ceru-plugin-cli": "^0.3.16",
18
+ "@shiqianjiang/ceru-plugin-cli": "^3.0.0",
18
19
  "typescript": "~5.9.3",
19
- "electron": "^44.4.2",
20
20
  "prettier": "^3.6.2"
21
21
  }
22
22
  }
@@ -2,6 +2,46 @@ import { assertResourceRef, defineNativeView, definePlugin } from '@shiqianjiang
2
2
 
3
3
  export default definePlugin(async (ctx) => {
4
4
  let connected = false
5
+ ctx.actions.register('catalog.enter', async () => {
6
+ const current = await ctx.accounts.current('catalog')
7
+ if (current && !current.expired) return true
8
+ const login = { accountId: 'catalog' }
9
+ if (current?.expired) Object.assign(login, { connectionId: current.connectionId })
10
+ return { login }
11
+ })
12
+ const accountVisible = async () => {
13
+ const current = await ctx.accounts.current('catalog')
14
+ return current !== null && !current.expired
15
+ }
16
+ ctx.actions.register('connection.visible', accountVisible)
17
+ let pendingName = ''
18
+ const accountTrack=async (connection: string,label: string)=>({
19
+ ref:{pluginId:ctx.plugin.id,providerId:'catalog',kind:'track' as const,id:'demo-track',connectionId:connection},
20
+ title:String(await ctx.storage.get('demo.account.'+connection))+' · '+label,
21
+ metadata:{artists:['演示歌手']},capabilities:['play'],
22
+ })
23
+ ctx.accounts.register('catalog', {
24
+ likes:{
25
+ async list(account){const hidden=await ctx.storage.get('demo.unliked.'+account.id);return {items:hidden?[]:[await accountTrack(account.id,'喜欢的歌曲')]}},
26
+ async set(account,{ref,liked}){if(ref.id!=='demo-track')throw Error('未知演示歌曲');await ctx.storage.set('demo.unliked.'+account.id,!liked)},
27
+ },
28
+ history:{async list(account){return {items:[await accountTrack(account.id,'最近播放')]}}},
29
+ recommend:{async list(account){return {items:[await accountTrack(account.id,'今日推荐')]}}},
30
+ playlists:{async list(account){return {items:[{ref:{pluginId:ctx.plugin.id,providerId:'catalog',connectionId:account.id,kind:'playlist',id:'demo'},title:String(await ctx.storage.get('demo.account.'+account.id))+' · 我的歌单',playlist:{trackCount:1},capabilities:['open']}]}}},
31
+ async login({ auth }) {
32
+ const values = await auth.form({ fields: [{ key: 'name', label: '演示昵称', type: 'text' }] })
33
+ pendingName = values?.name.trim().slice(0, 80) || ''
34
+ if (!pendingName) return null
35
+ return { credential: 'local-demo:' + pendingName }
36
+ },
37
+ async profile(account) {
38
+ const key = 'demo.account.' + account.id
39
+ if (pendingName) { await ctx.storage.set(key, pendingName); pendingName = '' }
40
+ const name = String(await ctx.storage.get(key) || '演示用户')
41
+ return { id: name, displayName: name }
42
+ },
43
+ async logout(account) { await ctx.storage.delete('demo.account.' + account.id);await ctx.storage.delete('demo.unliked.'+account.id) }
44
+ })
5
45
  const playlist = {
6
46
  ref: { pluginId: ctx.plugin.id, providerId: 'catalog', connectionId: 'demo', kind: 'playlist', id: 'demo' },
7
47
  title: '演示歌单',
@@ -20,10 +60,10 @@ export default definePlugin(async (ctx) => {
20
60
  })
21
61
  ctx.actions.register('hello', () => ctx.ui.openView('settings'))
22
62
  ctx.actions.register('library.open', () => ctx.ui.navigation.open({ page: 'playlist', sectionId: 'library' }))
23
- ctx.actions.register('account.summary', () => ({
24
- signedIn: connected,
25
- displayName: connected ? '演示音乐库' : '连接你的音乐库',
26
- }))
63
+ ctx.actions.register('account.summary', async () => {
64
+ const signedIn = await accountVisible()
65
+ return { signedIn, displayName: signedIn ? '演示音乐库' : '连接你的音乐库' }
66
+ })
27
67
  ctx.actions.register('render.library', defineNativeView(() => ({
28
68
  type: 'page',
29
69
  description: connected ? '演示连接已建立' : '可先浏览演示内容,再接入自己的音乐库 API。',
@@ -67,6 +107,7 @@ export default definePlugin(async (ctx) => {
67
107
  if (!['http:', 'https:'].includes(server.protocol)) throw new Error('只支持 HTTP(S) 地址')
68
108
 
69
109
  connected = true
110
+ await ctx.entries.invalidate()
70
111
  await ctx.ui.setState('library', { connected })
71
112
  // 本地 demo 不联网,也不收集密码。真实连接应使用 Host 的凭据与网络 API。
72
113
  await ctx.ui.setState('settings', {
@@ -79,7 +120,7 @@ export default definePlugin(async (ctx) => {
79
120
 
80
121
  ctx.providers.register('catalog', {
81
122
  playlists: {
82
- async get() { return { name: playlist.title, playlist: playlist.playlist, items: tracks } },
123
+ async get(_resource,_cursor,operation) { return { name: playlist.title, playlist: playlist.playlist, items: operation.connectionId ? [await accountTrack(operation.connectionId,'歌单歌曲')] : tracks } },
83
124
  },
84
125
  tracks: {
85
126
  async search() {
@@ -0,0 +1,28 @@
1
+ import { defineSurface } from '@shiqianjiang/ceru-plugin-sdk'
2
+
3
+ export default defineSurface(ctx => {
4
+ const form = document.createElement('form')
5
+ const label = document.createElement('label')
6
+ const address = document.createElement('input')
7
+ const connect = document.createElement('button')
8
+ const status = document.createElement('p')
9
+ label.textContent = '服务器地址'
10
+ address.type = 'url'
11
+ address.required = true
12
+ label.append(address)
13
+ connect.textContent = '演示连接'
14
+ form.append(label, connect, status)
15
+ form.onsubmit = async event => {
16
+ event.preventDefault()
17
+ connect.disabled = true
18
+ try { await ctx.invoke('connection.connect', {serverUrl:address.value}) }
19
+ catch (error) { status.textContent = String(error) }
20
+ finally { connect.disabled = false }
21
+ }
22
+ ctx.root.replaceChildren(form)
23
+ const off = ctx.subscribe(state => {
24
+ if (typeof state.serverUrl === 'string') address.value = state.serverUrl
25
+ if (typeof state.status === 'string') status.textContent = state.status
26
+ })
27
+ return () => { off(); ctx.root.replaceChildren() }
28
+ })
@@ -0,0 +1,86 @@
1
+ # encrypted-source
2
+
3
+ Three self-contained v3 music providers, in equivalent [JavaScript](js/README.md) and [TypeScript](ts/README.md) projects. Each generates the same quiet three-second 440 Hz PCM WAV, implements search / resolve / lyrics, and needs no external URL, account, paid API, or media download.
4
+
5
+ | Provider ID | Resolve result | Where bytes become audio | Permission |
6
+ | ----------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------------------------------- |
7
+ | `builtin-decrypt` | Encrypted URL plus `stream.decrypt` with AES-128-CTR key/IV | Host's built-in media decryption | `network.serve` for the fixture server |
8
+ | `wasm-transform` | XOR-encoded URL plus `stream.transform: 'xor-byte'` | Registered transform in the plugin worker, calling embedded WASM | `network.serve` and `streams.transform` |
9
+ | `own-service` | Plain HTTP audio URL, without `stream` | Plugin decrypts its fixture through `ctx.crypto.createDecipher`, then serves WAV | `network.serve` |
10
+
11
+ The WASM export is only `decode(byte, mask) = byte XOR mask`. XOR is reversible obfuscation, **not secure encryption**, DRM, a codec, or a commercial music-service implementation. The AES key and IV are intentionally public, fixed demo values. Do not reuse them for real content.
12
+
13
+ `src/fixtures.*` generates WAV bytes, encrypts them with `ctx.crypto.createCipher`, and roundtrips through `createDecipher`; both crypto methods return Web `TransformStream`s. The tiny plaintext fixture is cached for random-access serving. `src/demo.*` registers providers, manages permissions/listener lifetime, and registers one WASM instance per stream. `resources/xor-byte.wat` is the readable source for the checked-in 44-byte `xor-byte.wasm`.
14
+
15
+ ## Current integration contract
16
+
17
+ This template targets the in-progress v3 SDK/Host contract. It has not been synced into the CLI template catalogue. The parent task owns listing, snapshot sync, toolchain integration and desktop validation. Do not use published npm `latest` as a substitute for that matching toolchain.
18
+
19
+ - `ctx.server.serve(handler, options?)` accepts Web `Request` and returns a Web `Response` from the handler. It resolves to `{ url, port, close() }`. The template passes only `{ permissionKey: 'demo-server' }`, leaving the port random and binding to loopback by default. It never requests LAN serving.
20
+ - `ctx.permissions.query` and `requestGroup` use the declaration keys `demo-server` / `demo-transform`, groups `localServer` / `audioTransform`, and forward the operation's user intent. No prompt or socket is opened during activation, search, or lyrics. Starting or resolving audio may request a missing grant. Denial returns `PERMISSION_DENIED` with a recovery command.
21
+ - The Host requests/enforces `streams.transform` for a custom stream transform. Built-in `stream.decrypt` does **not** need that grant. The template explicitly requests it on WASM resolve so denial is explained before playback.
22
+ - `ctx.streams.registerTransform('xor-byte', { seekable, create })` accepts per-request `{ offset, signal }`; `transform(chunk)` returns a fresh `Uint8Array` created in the plugin worker. Bytewise XOR is independent of offset and preserves length, so this particular transform is seekable.
23
+ - `ctx.wasm.instantiate('xor-byte')` looks up an embedded resource and returns `{ module, instance }`. The config declares a binary `.wasm` file as `type: 'base64', mime: 'application/wasm'`; the CLI performs the base64 embedding. Do not put a base64 text file at that binary path.
24
+ - Resolve metadata's `contentLength: 96044` is the **plaintext** WAV byte count. The fixture happens to have equal plaintext/ciphertext lengths. The Host's owned-loopback-server exception allows these URLs through media preparation. Remote hosts still undergo the normal DNS/network checks.
25
+ - `ctx.effects.add` releases the registered transform and closes the owned listener, including when unload races a pending start. The Host also owns ultimate runtime cleanup. Cached URLs expire when the plugin stops; resolve again after a reload.
26
+
27
+ ## Exact offline verification, before SDK sync
28
+
29
+ From this repository root, with Node **22.18 or newer**:
30
+
31
+ ```powershell
32
+ node --test templates/encrypted-source/js/tests/demo.test.mjs templates/encrypted-source/ts/tests/demo.test.mjs
33
+ ```
34
+
35
+ This runs 16 checks in total, eight per language. No npm installation, CLI build, template sync, network credentials, or desktop launch is needed. Tests use Node's native TypeScript support for the TS variant.
36
+
37
+ The harness uses real Node crypto, Web streams, the checked-in WASM binary, and an ephemeral loopback HTTP listener behind small SDK adapters. It verifies WAV headers and exact byte equality, all 256 XOR inputs, split/offset transforms, cancellation, HTTP ranges/HEAD, search/lyrics without prompts, provider/ref isolation, denied grants, shared startup, retry, and unload races. It verifies plugin behavior, **not** the real SDK bridge, worker realm transfer, Host DNS exception, or audible playback.
38
+
39
+ ## Desktop demo, after the parent integrates the matching toolchain
40
+
41
+ Copy one variant into its own project. For example, from this repository root:
42
+
43
+ ```powershell
44
+ Copy-Item -Recurse templates/encrypted-source/ts ../encrypted-source-demo-ts
45
+ Set-Location ../encrypted-source-demo-ts
46
+ Rename-Item _gitignore .gitignore
47
+ node --test tests/demo.test.mjs
48
+ ```
49
+
50
+ Use `js` / `encrypted-source-demo-js` for JavaScript. Install the matching local v3 SDK and CLI development packages using the parent task's local-package instructions; `package.json` keeps the same `^3.0.0` dependency convention as the other templates. Once those packages are available in this copied project:
51
+
52
+ ```powershell
53
+ npm run typecheck
54
+ npm run dev
55
+ ```
56
+
57
+ In the v3 desktop app, enable **设置 → 插件管理 → 管理设置 → 插件开发者模式**, then add the JS file printed by `dev`. Open this project's `ceru-plugin.code-workspace` for VS Code F5 support. No second Electron app is launched.
58
+
59
+ 1. Search **Encrypted Demo** in each of **Encrypted Demo / AES-CTR**, **Encrypted Demo / WASM XOR**, and **Encrypted Demo / Own Service**. Each source returns one three-second track. Opening lyrics shows the provider name and two explanatory lines; the tone contains no voice.
60
+ 2. Select **启动本地音频 Demo** from the plugin commands, or play a track directly. Allow the local-server permission. The notification/log prints the actual random `http://127.0.0.1:<port>` origin. No fixed port is expected.
61
+ 3. Play AES-CTR and Own Service. Both should play the same quiet tone without asking for audio-transform permission. Play WASM XOR and allow that additional grant; its audio should match.
62
+ 4. Seek within each track and repeat playback. To see HTTP headers, paste the printed origin into the commands below. `plain.wav` returns `audio/wav`; the encrypted routes return `application/octet-stream` and are only playable through their provider's resolve processing.
63
+
64
+ ```powershell
65
+ $DemoOrigin = 'http://127.0.0.1:REPLACE_WITH_PRINTED_PORT'
66
+ curl.exe -i "$DemoOrigin/health"
67
+ curl.exe -I "$DemoOrigin/plain.wav"
68
+ curl.exe -s -D - -H 'Range: bytes=44-75' "$DemoOrigin/plain.wav" -o NUL
69
+ curl.exe -s -D - -H 'Range: bytes=32-63' "$DemoOrigin/aes.wav.enc" -o NUL
70
+ curl.exe -s -D - -H 'Range: bytes=32-63' "$DemoOrigin/xor.wav.enc" -o NUL
71
+ ```
72
+
73
+ Expected: health is `200` with `encrypted-source ready`; HEAD has length `96044`; the three range requests return `206`, length `32`, and the requested `Content-Range`. The handler also supports open-ended and suffix ranges, rejects invalid/multipart ranges with `416`, and accepts only GET/HEAD.
74
+
75
+ 5. Revoke/deny audio-transform permission in the Host. WASM playback must fail with the permission status and recovery action; AES-CTR and Own Service must still work. Deny local-server permission and all three must fail informatively; search/lyrics must remain available. Regrant and retry. Depending on Host grant persistence, clear grants/reload to exercise the initial prompt again.
76
+ 6. Disable/unload the plugin. The printed URL must stop responding; re-enable and resolve again to obtain the new origin. Test quick reload during startup as well.
77
+
78
+ Record actual desktop results separately from the offline tests. The template authoring task deliberately does not run SDK sync, build, publish or commit. Once integration is ready, normal release verification is `npm run build`, `npm run validate`, and `npm run preview`; distribute `dist/plugin.js` only.
79
+
80
+ ## Adapting an actual integration
81
+
82
+ - **Built-in decrypt:** replace the generated fixture URL/key/IV with values from your authorized media API. Return `stream.decrypt` with a supported algorithm and actual key/IV encoding; include the decoded content type and exact decoded length when known. Get fresh URLs on resolve if signed links expire. Authenticate API calls through the Host network/credential APIs and declare the actual domains/scopes. Never log or commit production keys.
83
+ - **WASM transform:** replace the tiny module and decoder with your own legitimate format handler. Keep mutable decode state per `create` call, handle cancellation and bounded chunks, and return worker-owned typed arrays. Set `seekable: false` until you can map nonzero byte offsets correctly; XOR's simple offset behavior does not generalize to block encryption, compression, or containers. Native built-in decryption is preferable for supported algorithms.
84
+ - **Own service:** replace `createFixtures`/`createHandler` with your upstream-fetch/decrypt/serve pipeline. This demo buffers only 96 KB; real tracks should stream with backpressure/cancellation, correct content headers and byte-range semantics. One plugin owns one listener, so add routes to that server instead of opening one listener per track. Keep loopback binding unless LAN access is explicitly intended and separately declared/granted.
85
+ - Keep search metadata and `ResourceRef`s stable, map unknown tracks and upstream errors to structured playback faults, and implement real lyrics. The sample text is intentionally labeled as a demonstration.
86
+ - The local fixture server itself does not fetch the network and needs no `network.request` / `network.private` grant. Adding remote API/CDN access requires those declarations and normal Host URL/DNS authorization as applicable. The owned-loopback exception is not a general bypass for arbitrary private-network URLs.
@@ -0,0 +1,5 @@
1
+ {
2
+ "singleQuote": true,
3
+ "semi": false,
4
+ "printWidth": 100
5
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "Host platform icon": {
3
+ "prefix": "ceru-icon",
4
+ "body": ["{ kind: 'host', name: 'platform.${1:tx}' }"],
5
+ "description": "使用宿主平台图标,无需打入插件",
6
+ },
7
+ "Host lodash": {
8
+ "prefix": "ceru-lodash",
9
+ "body": ["ctx.utils.lodash.${1:uniqBy}(${2:items}, ${3:key})"],
10
+ "description": "调用宿主的带类型 Lodash 工具",
11
+ },
12
+ "Host HTTP client": {
13
+ "prefix": "ceru-http",
14
+ "body": [
15
+ "const http = ctx.http.create({",
16
+ " baseURL: '${1:https://example.com}',",
17
+ " permissionKey: '${2:api}',",
18
+ " requestPermission: true,",
19
+ "})",
20
+ ],
21
+ "description": "使用宿主 Axios 代理;无需将请求库打入插件",
22
+ },
23
+ "Permission group": {
24
+ "prefix": "ceru-permission-group",
25
+ "body": [
26
+ "const permission = await ctx.permissions.requestGroup({",
27
+ " group: '${1:libraryRead}',",
28
+ " intent: operation.userIntent,",
29
+ "})",
30
+ ],
31
+ "description": "一次申请一组用户可理解的能力",
32
+ },
33
+ "Grouped music provider": {
34
+ "prefix": "ceru-provider",
35
+ "body": [
36
+ "ctx.providers.register('${1:catalog}', {",
37
+ " tracks: { search: ${2:searchTracks}, resolve: ${3:resolveTrack}, lyrics: ${4:getLyrics} },",
38
+ " playlists: { search: ${5:searchPlaylists}, categories: ${6:getCategories}, list: ${7:listPlaylists}, get: ${8:getPlaylist} },",
39
+ " charts: { list: ${9:listCharts}, getTracks: ${10:getChartTracks} },",
40
+ "})",
41
+ ],
42
+ "description": "注册分组 Provider,返回标准歌曲/歌单/歌词 JSON",
43
+ },
44
+ "Source rate limit": {
45
+ "prefix": "ceru-rate-limit",
46
+ "body": [
47
+ "return ctx.playback.failure({",
48
+ " code: 'RATE_LIMITED',",
49
+ " message: '${1:请稍后重试}',",
50
+ " recovery: { mode: 'await-user', maxWaitMs: 60000 }",
51
+ "})",
52
+ ],
53
+ "description": "返回结构化限流结果,由 Host 决定换源与交互",
54
+ },
55
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["esbenp.prettier-vscode"]
3
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Watch Ceru plugin",
6
+ "type": "node",
7
+ "request": "launch",
8
+ "program": "${workspaceFolder}/node_modules/@shiqianjiang/ceru-plugin-cli/dist/bin.js",
9
+ "args": ["dev"],
10
+ "cwd": "${workspaceFolder}",
11
+ "console": "integratedTerminal",
12
+ "skipFiles": ["<node_internals>/**"]
13
+ }
14
+ ]
15
+ }
@@ -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
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "Ceru: dev",
6
+ "type": "process",
7
+ "isBackground": true,
8
+ "problemMatcher": {
9
+ "owner": "ceru",
10
+ "pattern": {
11
+ "regexp": "^CERU_ERROR (.*)$",
12
+ "message": 1
13
+ },
14
+ "background": {
15
+ "activeOnStart": true,
16
+ "beginsPattern": "^.*$",
17
+ "endsPattern": "^CERU_BUILD_READY "
18
+ }
19
+ },
20
+ "command": "node",
21
+ "args": ["${workspaceFolder}/node_modules/@shiqianjiang/ceru-plugin-cli/dist/bin.js", "dev"],
22
+ "options": {
23
+ "cwd": "${workspaceFolder}"
24
+ }
25
+ },
26
+ {
27
+ "label": "Ceru: typecheck",
28
+ "type": "npm",
29
+ "script": "typecheck",
30
+ "problemMatcher": "$tsc",
31
+ "group": "build"
32
+ },
33
+ {
34
+ "label": "Ceru: build",
35
+ "type": "npm",
36
+ "script": "build",
37
+ "problemMatcher": []
38
+ }
39
+ ]
40
+ }