@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.
Files changed (314) hide show
  1. package/ASSET_LICENSE +238 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +1 -0
  4. package/README.md +29 -0
  5. package/assets/catalog.json +1 -0
  6. package/assets/electron-app/main.cjs +1 -0
  7. package/assets/electron-app/package.json +8 -0
  8. package/assets/electron.cjs +42 -0
  9. package/assets/index.html +93 -0
  10. package/assets/originals/account.svg +1 -0
  11. package/assets/originals/add.svg +1 -0
  12. package/assets/originals/app.logo.svg +10 -0
  13. package/assets/originals/chart.svg +1 -0
  14. package/assets/originals/close.svg +1 -0
  15. package/assets/originals/cloud.svg +1 -0
  16. package/assets/originals/download.svg +1 -0
  17. package/assets/originals/heart.svg +1 -0
  18. package/assets/originals/import.svg +1 -0
  19. package/assets/originals/info.svg +1 -0
  20. package/assets/originals/library.svg +1 -0
  21. package/assets/originals/music-note.svg +1 -0
  22. package/assets/originals/pause.svg +1 -0
  23. package/assets/originals/placeholder.avatar.webp +0 -0
  24. package/assets/originals/placeholder.cover.png +0 -0
  25. package/assets/originals/platform.all.svg +1 -0
  26. package/assets/originals/platform.kg.svg +1 -0
  27. package/assets/originals/platform.kw.svg +1 -0
  28. package/assets/originals/platform.local.svg +1 -0
  29. package/assets/originals/platform.mg.svg +1 -0
  30. package/assets/originals/platform.tx.svg +1 -0
  31. package/assets/originals/platform.wy.svg +1 -0
  32. package/assets/originals/play.svg +1 -0
  33. package/assets/originals/refresh.svg +1 -0
  34. package/assets/originals/search.svg +1 -0
  35. package/assets/originals/server.svg +1 -0
  36. package/assets/originals/settings.svg +1 -0
  37. package/assets/originals/share.svg +1 -0
  38. package/assets/playground.js +446 -0
  39. package/assets/sandbox.js +36 -0
  40. package/assets/shared-react.js +77 -0
  41. package/assets/shared-vue.js +44 -0
  42. package/assets/style.css +264 -0
  43. package/assets/vendor-licenses/lodash-es.txt +47 -0
  44. package/assets/vendor-licenses/react-dom.txt +21 -0
  45. package/assets/vendor-licenses/react.txt +21 -0
  46. package/assets/vendor-licenses/scheduler.txt +21 -0
  47. package/assets/vendor-licenses/vue.txt +21 -0
  48. package/assets/vendor-licenses/vue_reactivity.txt +21 -0
  49. package/assets/vendor-licenses/vue_runtime-core.txt +21 -0
  50. package/assets/vendor-licenses/vue_runtime-dom.txt +21 -0
  51. package/assets/vendor-licenses/vue_shared.txt +21 -0
  52. package/dist/bin.d.ts +2 -0
  53. package/dist/bin.js +6 -0
  54. package/dist/dev.d.ts +7 -0
  55. package/dist/dev.js +507 -0
  56. package/dist/frameworks.d.ts +9 -0
  57. package/dist/frameworks.js +310 -0
  58. package/dist/index.d.ts +2 -0
  59. package/dist/index.js +206 -0
  60. package/dist/project.d.ts +34 -0
  61. package/dist/project.js +342 -0
  62. package/package.json +67 -0
  63. package/schemas/config.schema.json +610 -0
  64. package/templates/connected-library/js/.prettierrc.json +5 -0
  65. package/templates/connected-library/js/.vscode/ceru.code-snippets +27 -0
  66. package/templates/connected-library/js/.vscode/extensions.json +3 -0
  67. package/templates/connected-library/js/.vscode/launch.json +30 -0
  68. package/templates/connected-library/js/.vscode/settings.json +20 -0
  69. package/templates/connected-library/js/.vscode/tasks.json +36 -0
  70. package/templates/connected-library/js/README.md +38 -0
  71. package/templates/connected-library/js/_gitignore +6 -0
  72. package/templates/connected-library/js/ceru.plugin.json +76 -0
  73. package/templates/connected-library/js/package.json +21 -0
  74. package/templates/connected-library/js/src/index.js +38 -0
  75. package/templates/connected-library/js/tsconfig.json +16 -0
  76. package/templates/connected-library/js/ui/settings.json +24 -0
  77. package/templates/connected-library/ts/.prettierrc.json +5 -0
  78. package/templates/connected-library/ts/.vscode/ceru.code-snippets +27 -0
  79. package/templates/connected-library/ts/.vscode/extensions.json +3 -0
  80. package/templates/connected-library/ts/.vscode/launch.json +30 -0
  81. package/templates/connected-library/ts/.vscode/settings.json +20 -0
  82. package/templates/connected-library/ts/.vscode/tasks.json +36 -0
  83. package/templates/connected-library/ts/README.md +38 -0
  84. package/templates/connected-library/ts/_gitignore +6 -0
  85. package/templates/connected-library/ts/ceru.plugin.json +76 -0
  86. package/templates/connected-library/ts/package.json +21 -0
  87. package/templates/connected-library/ts/src/index.ts +38 -0
  88. package/templates/connected-library/ts/tsconfig.json +16 -0
  89. package/templates/connected-library/ts/ui/settings.json +24 -0
  90. package/templates/guest-adapter/js/.prettierrc.json +5 -0
  91. package/templates/guest-adapter/js/.vscode/ceru.code-snippets +27 -0
  92. package/templates/guest-adapter/js/.vscode/extensions.json +3 -0
  93. package/templates/guest-adapter/js/.vscode/launch.json +30 -0
  94. package/templates/guest-adapter/js/.vscode/settings.json +20 -0
  95. package/templates/guest-adapter/js/.vscode/tasks.json +36 -0
  96. package/templates/guest-adapter/js/README.md +38 -0
  97. package/templates/guest-adapter/js/_gitignore +6 -0
  98. package/templates/guest-adapter/js/ceru.plugin.json +95 -0
  99. package/templates/guest-adapter/js/package.json +21 -0
  100. package/templates/guest-adapter/js/src/guest.js +6 -0
  101. package/templates/guest-adapter/js/src/index.js +8 -0
  102. package/templates/guest-adapter/js/tsconfig.json +16 -0
  103. package/templates/guest-adapter/js/ui/settings.json +14 -0
  104. package/templates/guest-adapter/ts/.prettierrc.json +5 -0
  105. package/templates/guest-adapter/ts/.vscode/ceru.code-snippets +27 -0
  106. package/templates/guest-adapter/ts/.vscode/extensions.json +3 -0
  107. package/templates/guest-adapter/ts/.vscode/launch.json +30 -0
  108. package/templates/guest-adapter/ts/.vscode/settings.json +20 -0
  109. package/templates/guest-adapter/ts/.vscode/tasks.json +36 -0
  110. package/templates/guest-adapter/ts/README.md +38 -0
  111. package/templates/guest-adapter/ts/_gitignore +6 -0
  112. package/templates/guest-adapter/ts/ceru.plugin.json +95 -0
  113. package/templates/guest-adapter/ts/package.json +21 -0
  114. package/templates/guest-adapter/ts/src/guest.ts +6 -0
  115. package/templates/guest-adapter/ts/src/index.ts +8 -0
  116. package/templates/guest-adapter/ts/tsconfig.json +16 -0
  117. package/templates/guest-adapter/ts/ui/settings.json +14 -0
  118. package/templates/importer/js/.prettierrc.json +5 -0
  119. package/templates/importer/js/.vscode/ceru.code-snippets +27 -0
  120. package/templates/importer/js/.vscode/extensions.json +3 -0
  121. package/templates/importer/js/.vscode/launch.json +30 -0
  122. package/templates/importer/js/.vscode/settings.json +20 -0
  123. package/templates/importer/js/.vscode/tasks.json +36 -0
  124. package/templates/importer/js/README.md +38 -0
  125. package/templates/importer/js/_gitignore +6 -0
  126. package/templates/importer/js/ceru.plugin.json +63 -0
  127. package/templates/importer/js/package.json +21 -0
  128. package/templates/importer/js/src/index.js +37 -0
  129. package/templates/importer/js/tsconfig.json +16 -0
  130. package/templates/importer/js/ui/settings.json +24 -0
  131. package/templates/importer/ts/.prettierrc.json +5 -0
  132. package/templates/importer/ts/.vscode/ceru.code-snippets +27 -0
  133. package/templates/importer/ts/.vscode/extensions.json +3 -0
  134. package/templates/importer/ts/.vscode/launch.json +30 -0
  135. package/templates/importer/ts/.vscode/settings.json +20 -0
  136. package/templates/importer/ts/.vscode/tasks.json +36 -0
  137. package/templates/importer/ts/README.md +38 -0
  138. package/templates/importer/ts/_gitignore +6 -0
  139. package/templates/importer/ts/ceru.plugin.json +63 -0
  140. package/templates/importer/ts/package.json +21 -0
  141. package/templates/importer/ts/src/index.ts +37 -0
  142. package/templates/importer/ts/tsconfig.json +16 -0
  143. package/templates/importer/ts/ui/settings.json +24 -0
  144. package/templates/react/js/.prettierrc.json +5 -0
  145. package/templates/react/js/.vscode/ceru.code-snippets +27 -0
  146. package/templates/react/js/.vscode/extensions.json +3 -0
  147. package/templates/react/js/.vscode/launch.json +30 -0
  148. package/templates/react/js/.vscode/settings.json +20 -0
  149. package/templates/react/js/.vscode/tasks.json +36 -0
  150. package/templates/react/js/README.md +36 -0
  151. package/templates/react/js/_gitignore +6 -0
  152. package/templates/react/js/ceru.plugin.json +60 -0
  153. package/templates/react/js/package.json +25 -0
  154. package/templates/react/js/src/App.jsx +22 -0
  155. package/templates/react/js/src/index.js +7 -0
  156. package/templates/react/js/src/view.jsx +8 -0
  157. package/templates/react/js/tsconfig.json +16 -0
  158. package/templates/react/ts/.prettierrc.json +5 -0
  159. package/templates/react/ts/.vscode/ceru.code-snippets +27 -0
  160. package/templates/react/ts/.vscode/extensions.json +3 -0
  161. package/templates/react/ts/.vscode/launch.json +30 -0
  162. package/templates/react/ts/.vscode/settings.json +20 -0
  163. package/templates/react/ts/.vscode/tasks.json +36 -0
  164. package/templates/react/ts/README.md +36 -0
  165. package/templates/react/ts/_gitignore +6 -0
  166. package/templates/react/ts/ceru.plugin.json +60 -0
  167. package/templates/react/ts/package.json +25 -0
  168. package/templates/react/ts/src/App.tsx +23 -0
  169. package/templates/react/ts/src/index.ts +7 -0
  170. package/templates/react/ts/src/view.tsx +8 -0
  171. package/templates/react/ts/tsconfig.json +16 -0
  172. package/templates/snapshot.json +257 -0
  173. package/templates/source/js/.prettierrc.json +5 -0
  174. package/templates/source/js/.vscode/ceru.code-snippets +27 -0
  175. package/templates/source/js/.vscode/extensions.json +3 -0
  176. package/templates/source/js/.vscode/launch.json +30 -0
  177. package/templates/source/js/.vscode/settings.json +20 -0
  178. package/templates/source/js/.vscode/tasks.json +36 -0
  179. package/templates/source/js/README.md +38 -0
  180. package/templates/source/js/_gitignore +6 -0
  181. package/templates/source/js/ceru.plugin.json +51 -0
  182. package/templates/source/js/package.json +21 -0
  183. package/templates/source/js/src/index.js +50 -0
  184. package/templates/source/js/tsconfig.json +16 -0
  185. package/templates/source/ts/.prettierrc.json +5 -0
  186. package/templates/source/ts/.vscode/ceru.code-snippets +27 -0
  187. package/templates/source/ts/.vscode/extensions.json +3 -0
  188. package/templates/source/ts/.vscode/launch.json +30 -0
  189. package/templates/source/ts/.vscode/settings.json +20 -0
  190. package/templates/source/ts/.vscode/tasks.json +36 -0
  191. package/templates/source/ts/README.md +38 -0
  192. package/templates/source/ts/_gitignore +6 -0
  193. package/templates/source/ts/ceru.plugin.json +51 -0
  194. package/templates/source/ts/package.json +21 -0
  195. package/templates/source/ts/src/index.ts +50 -0
  196. package/templates/source/ts/tsconfig.json +16 -0
  197. package/templates/vue/js/.prettierrc.json +5 -0
  198. package/templates/vue/js/.vscode/ceru.code-snippets +27 -0
  199. package/templates/vue/js/.vscode/extensions.json +3 -0
  200. package/templates/vue/js/.vscode/launch.json +30 -0
  201. package/templates/vue/js/.vscode/settings.json +20 -0
  202. package/templates/vue/js/.vscode/tasks.json +36 -0
  203. package/templates/vue/js/README.md +36 -0
  204. package/templates/vue/js/_gitignore +6 -0
  205. package/templates/vue/js/ceru.plugin.json +59 -0
  206. package/templates/vue/js/package.json +22 -0
  207. package/templates/vue/js/src/App.vue +31 -0
  208. package/templates/vue/js/src/env.d.ts +5 -0
  209. package/templates/vue/js/src/index.js +7 -0
  210. package/templates/vue/js/src/view.js +8 -0
  211. package/templates/vue/js/tsconfig.json +17 -0
  212. package/templates/vue/ts/.prettierrc.json +5 -0
  213. package/templates/vue/ts/.vscode/ceru.code-snippets +27 -0
  214. package/templates/vue/ts/.vscode/extensions.json +3 -0
  215. package/templates/vue/ts/.vscode/launch.json +30 -0
  216. package/templates/vue/ts/.vscode/settings.json +20 -0
  217. package/templates/vue/ts/.vscode/tasks.json +36 -0
  218. package/templates/vue/ts/README.md +36 -0
  219. package/templates/vue/ts/_gitignore +6 -0
  220. package/templates/vue/ts/ceru.plugin.json +59 -0
  221. package/templates/vue/ts/package.json +22 -0
  222. package/templates/vue/ts/src/App.vue +32 -0
  223. package/templates/vue/ts/src/env.d.ts +5 -0
  224. package/templates/vue/ts/src/index.ts +7 -0
  225. package/templates/vue/ts/src/view.ts +8 -0
  226. package/templates/vue/ts/tsconfig.json +17 -0
  227. package/templates/vue-tsx/js/.prettierrc.json +5 -0
  228. package/templates/vue-tsx/js/.vscode/ceru.code-snippets +27 -0
  229. package/templates/vue-tsx/js/.vscode/extensions.json +3 -0
  230. package/templates/vue-tsx/js/.vscode/launch.json +30 -0
  231. package/templates/vue-tsx/js/.vscode/settings.json +20 -0
  232. package/templates/vue-tsx/js/.vscode/tasks.json +36 -0
  233. package/templates/vue-tsx/js/README.md +36 -0
  234. package/templates/vue-tsx/js/_gitignore +6 -0
  235. package/templates/vue-tsx/js/ceru.plugin.json +59 -0
  236. package/templates/vue-tsx/js/package.json +22 -0
  237. package/templates/vue-tsx/js/src/App.jsx +14 -0
  238. package/templates/vue-tsx/js/src/env.d.ts +5 -0
  239. package/templates/vue-tsx/js/src/index.js +7 -0
  240. package/templates/vue-tsx/js/src/view.js +8 -0
  241. package/templates/vue-tsx/js/tsconfig.json +17 -0
  242. package/templates/vue-tsx/ts/.prettierrc.json +5 -0
  243. package/templates/vue-tsx/ts/.vscode/ceru.code-snippets +27 -0
  244. package/templates/vue-tsx/ts/.vscode/extensions.json +3 -0
  245. package/templates/vue-tsx/ts/.vscode/launch.json +30 -0
  246. package/templates/vue-tsx/ts/.vscode/settings.json +20 -0
  247. package/templates/vue-tsx/ts/.vscode/tasks.json +36 -0
  248. package/templates/vue-tsx/ts/README.md +36 -0
  249. package/templates/vue-tsx/ts/_gitignore +6 -0
  250. package/templates/vue-tsx/ts/ceru.plugin.json +59 -0
  251. package/templates/vue-tsx/ts/package.json +22 -0
  252. package/templates/vue-tsx/ts/src/App.tsx +15 -0
  253. package/templates/vue-tsx/ts/src/env.d.ts +5 -0
  254. package/templates/vue-tsx/ts/src/index.ts +7 -0
  255. package/templates/vue-tsx/ts/src/view.ts +8 -0
  256. package/templates/vue-tsx/ts/tsconfig.json +17 -0
  257. package/templates/web-dist/js/.prettierrc.json +5 -0
  258. package/templates/web-dist/js/.vscode/ceru.code-snippets +27 -0
  259. package/templates/web-dist/js/.vscode/extensions.json +3 -0
  260. package/templates/web-dist/js/.vscode/launch.json +30 -0
  261. package/templates/web-dist/js/.vscode/settings.json +20 -0
  262. package/templates/web-dist/js/.vscode/tasks.json +36 -0
  263. package/templates/web-dist/js/README.md +38 -0
  264. package/templates/web-dist/js/_gitignore +6 -0
  265. package/templates/web-dist/js/ceru.plugin.json +57 -0
  266. package/templates/web-dist/js/package.json +21 -0
  267. package/templates/web-dist/js/src/index.js +7 -0
  268. package/templates/web-dist/js/tsconfig.json +16 -0
  269. package/templates/web-dist/js/web-dist/index.html +14 -0
  270. package/templates/web-dist/js/web-dist/main.js +4 -0
  271. package/templates/web-dist/js/web-dist/sample.png +0 -0
  272. package/templates/web-dist/js/web-dist/style.css +11 -0
  273. package/templates/web-dist/ts/.prettierrc.json +5 -0
  274. package/templates/web-dist/ts/.vscode/ceru.code-snippets +27 -0
  275. package/templates/web-dist/ts/.vscode/extensions.json +3 -0
  276. package/templates/web-dist/ts/.vscode/launch.json +30 -0
  277. package/templates/web-dist/ts/.vscode/settings.json +20 -0
  278. package/templates/web-dist/ts/.vscode/tasks.json +36 -0
  279. package/templates/web-dist/ts/README.md +38 -0
  280. package/templates/web-dist/ts/_gitignore +6 -0
  281. package/templates/web-dist/ts/ceru.plugin.json +57 -0
  282. package/templates/web-dist/ts/package.json +21 -0
  283. package/templates/web-dist/ts/src/index.ts +7 -0
  284. package/templates/web-dist/ts/tsconfig.json +16 -0
  285. package/templates/web-dist/ts/web-dist/index.html +14 -0
  286. package/templates/web-dist/ts/web-dist/main.js +4 -0
  287. package/templates/web-dist/ts/web-dist/sample.png +0 -0
  288. package/templates/web-dist/ts/web-dist/style.css +11 -0
  289. package/templates/web-surface/js/.prettierrc.json +5 -0
  290. package/templates/web-surface/js/.vscode/ceru.code-snippets +27 -0
  291. package/templates/web-surface/js/.vscode/extensions.json +3 -0
  292. package/templates/web-surface/js/.vscode/launch.json +30 -0
  293. package/templates/web-surface/js/.vscode/settings.json +20 -0
  294. package/templates/web-surface/js/.vscode/tasks.json +36 -0
  295. package/templates/web-surface/js/README.md +36 -0
  296. package/templates/web-surface/js/_gitignore +6 -0
  297. package/templates/web-surface/js/ceru.plugin.json +55 -0
  298. package/templates/web-surface/js/package.json +21 -0
  299. package/templates/web-surface/js/src/index.js +7 -0
  300. package/templates/web-surface/js/src/view.js +8 -0
  301. package/templates/web-surface/js/tsconfig.json +16 -0
  302. package/templates/web-surface/ts/.prettierrc.json +5 -0
  303. package/templates/web-surface/ts/.vscode/ceru.code-snippets +27 -0
  304. package/templates/web-surface/ts/.vscode/extensions.json +3 -0
  305. package/templates/web-surface/ts/.vscode/launch.json +30 -0
  306. package/templates/web-surface/ts/.vscode/settings.json +20 -0
  307. package/templates/web-surface/ts/.vscode/tasks.json +36 -0
  308. package/templates/web-surface/ts/README.md +36 -0
  309. package/templates/web-surface/ts/_gitignore +6 -0
  310. package/templates/web-surface/ts/ceru.plugin.json +55 -0
  311. package/templates/web-surface/ts/package.json +21 -0
  312. package/templates/web-surface/ts/src/index.ts +7 -0
  313. package/templates/web-surface/ts/src/view.ts +8 -0
  314. package/templates/web-surface/ts/tsconfig.json +16 -0
@@ -0,0 +1,257 @@
1
+ {
2
+ "version": 1,
3
+ "source": "https://github.com/CeruMusic/CeruMusic-Plugin-Template",
4
+ "digest": "sha256:b0681cc778d9f9e7ed66772456aa312cdaa2c7e976582100f42e322cacc9f516",
5
+ "files": [
6
+ "connected-library/js/_gitignore",
7
+ "connected-library/js/.prettierrc.json",
8
+ "connected-library/js/.vscode/ceru.code-snippets",
9
+ "connected-library/js/.vscode/extensions.json",
10
+ "connected-library/js/.vscode/launch.json",
11
+ "connected-library/js/.vscode/settings.json",
12
+ "connected-library/js/.vscode/tasks.json",
13
+ "connected-library/js/ceru.plugin.json",
14
+ "connected-library/js/package.json",
15
+ "connected-library/js/README.md",
16
+ "connected-library/js/src/index.js",
17
+ "connected-library/js/tsconfig.json",
18
+ "connected-library/js/ui/settings.json",
19
+ "connected-library/ts/_gitignore",
20
+ "connected-library/ts/.prettierrc.json",
21
+ "connected-library/ts/.vscode/ceru.code-snippets",
22
+ "connected-library/ts/.vscode/extensions.json",
23
+ "connected-library/ts/.vscode/launch.json",
24
+ "connected-library/ts/.vscode/settings.json",
25
+ "connected-library/ts/.vscode/tasks.json",
26
+ "connected-library/ts/ceru.plugin.json",
27
+ "connected-library/ts/package.json",
28
+ "connected-library/ts/README.md",
29
+ "connected-library/ts/src/index.ts",
30
+ "connected-library/ts/tsconfig.json",
31
+ "connected-library/ts/ui/settings.json",
32
+ "guest-adapter/js/_gitignore",
33
+ "guest-adapter/js/.prettierrc.json",
34
+ "guest-adapter/js/.vscode/ceru.code-snippets",
35
+ "guest-adapter/js/.vscode/extensions.json",
36
+ "guest-adapter/js/.vscode/launch.json",
37
+ "guest-adapter/js/.vscode/settings.json",
38
+ "guest-adapter/js/.vscode/tasks.json",
39
+ "guest-adapter/js/ceru.plugin.json",
40
+ "guest-adapter/js/package.json",
41
+ "guest-adapter/js/README.md",
42
+ "guest-adapter/js/src/guest.js",
43
+ "guest-adapter/js/src/index.js",
44
+ "guest-adapter/js/tsconfig.json",
45
+ "guest-adapter/js/ui/settings.json",
46
+ "guest-adapter/ts/_gitignore",
47
+ "guest-adapter/ts/.prettierrc.json",
48
+ "guest-adapter/ts/.vscode/ceru.code-snippets",
49
+ "guest-adapter/ts/.vscode/extensions.json",
50
+ "guest-adapter/ts/.vscode/launch.json",
51
+ "guest-adapter/ts/.vscode/settings.json",
52
+ "guest-adapter/ts/.vscode/tasks.json",
53
+ "guest-adapter/ts/ceru.plugin.json",
54
+ "guest-adapter/ts/package.json",
55
+ "guest-adapter/ts/README.md",
56
+ "guest-adapter/ts/src/guest.ts",
57
+ "guest-adapter/ts/src/index.ts",
58
+ "guest-adapter/ts/tsconfig.json",
59
+ "guest-adapter/ts/ui/settings.json",
60
+ "importer/js/_gitignore",
61
+ "importer/js/.prettierrc.json",
62
+ "importer/js/.vscode/ceru.code-snippets",
63
+ "importer/js/.vscode/extensions.json",
64
+ "importer/js/.vscode/launch.json",
65
+ "importer/js/.vscode/settings.json",
66
+ "importer/js/.vscode/tasks.json",
67
+ "importer/js/ceru.plugin.json",
68
+ "importer/js/package.json",
69
+ "importer/js/README.md",
70
+ "importer/js/src/index.js",
71
+ "importer/js/tsconfig.json",
72
+ "importer/js/ui/settings.json",
73
+ "importer/ts/_gitignore",
74
+ "importer/ts/.prettierrc.json",
75
+ "importer/ts/.vscode/ceru.code-snippets",
76
+ "importer/ts/.vscode/extensions.json",
77
+ "importer/ts/.vscode/launch.json",
78
+ "importer/ts/.vscode/settings.json",
79
+ "importer/ts/.vscode/tasks.json",
80
+ "importer/ts/ceru.plugin.json",
81
+ "importer/ts/package.json",
82
+ "importer/ts/README.md",
83
+ "importer/ts/src/index.ts",
84
+ "importer/ts/tsconfig.json",
85
+ "importer/ts/ui/settings.json",
86
+ "react/js/_gitignore",
87
+ "react/js/.prettierrc.json",
88
+ "react/js/.vscode/ceru.code-snippets",
89
+ "react/js/.vscode/extensions.json",
90
+ "react/js/.vscode/launch.json",
91
+ "react/js/.vscode/settings.json",
92
+ "react/js/.vscode/tasks.json",
93
+ "react/js/ceru.plugin.json",
94
+ "react/js/package.json",
95
+ "react/js/README.md",
96
+ "react/js/src/App.jsx",
97
+ "react/js/src/index.js",
98
+ "react/js/src/view.jsx",
99
+ "react/js/tsconfig.json",
100
+ "react/ts/_gitignore",
101
+ "react/ts/.prettierrc.json",
102
+ "react/ts/.vscode/ceru.code-snippets",
103
+ "react/ts/.vscode/extensions.json",
104
+ "react/ts/.vscode/launch.json",
105
+ "react/ts/.vscode/settings.json",
106
+ "react/ts/.vscode/tasks.json",
107
+ "react/ts/ceru.plugin.json",
108
+ "react/ts/package.json",
109
+ "react/ts/README.md",
110
+ "react/ts/src/App.tsx",
111
+ "react/ts/src/index.ts",
112
+ "react/ts/src/view.tsx",
113
+ "react/ts/tsconfig.json",
114
+ "source/js/_gitignore",
115
+ "source/js/.prettierrc.json",
116
+ "source/js/.vscode/ceru.code-snippets",
117
+ "source/js/.vscode/extensions.json",
118
+ "source/js/.vscode/launch.json",
119
+ "source/js/.vscode/settings.json",
120
+ "source/js/.vscode/tasks.json",
121
+ "source/js/ceru.plugin.json",
122
+ "source/js/package.json",
123
+ "source/js/README.md",
124
+ "source/js/src/index.js",
125
+ "source/js/tsconfig.json",
126
+ "source/ts/_gitignore",
127
+ "source/ts/.prettierrc.json",
128
+ "source/ts/.vscode/ceru.code-snippets",
129
+ "source/ts/.vscode/extensions.json",
130
+ "source/ts/.vscode/launch.json",
131
+ "source/ts/.vscode/settings.json",
132
+ "source/ts/.vscode/tasks.json",
133
+ "source/ts/ceru.plugin.json",
134
+ "source/ts/package.json",
135
+ "source/ts/README.md",
136
+ "source/ts/src/index.ts",
137
+ "source/ts/tsconfig.json",
138
+ "vue-tsx/js/_gitignore",
139
+ "vue-tsx/js/.prettierrc.json",
140
+ "vue-tsx/js/.vscode/ceru.code-snippets",
141
+ "vue-tsx/js/.vscode/extensions.json",
142
+ "vue-tsx/js/.vscode/launch.json",
143
+ "vue-tsx/js/.vscode/settings.json",
144
+ "vue-tsx/js/.vscode/tasks.json",
145
+ "vue-tsx/js/ceru.plugin.json",
146
+ "vue-tsx/js/package.json",
147
+ "vue-tsx/js/README.md",
148
+ "vue-tsx/js/src/App.jsx",
149
+ "vue-tsx/js/src/env.d.ts",
150
+ "vue-tsx/js/src/index.js",
151
+ "vue-tsx/js/src/view.js",
152
+ "vue-tsx/js/tsconfig.json",
153
+ "vue-tsx/ts/_gitignore",
154
+ "vue-tsx/ts/.prettierrc.json",
155
+ "vue-tsx/ts/.vscode/ceru.code-snippets",
156
+ "vue-tsx/ts/.vscode/extensions.json",
157
+ "vue-tsx/ts/.vscode/launch.json",
158
+ "vue-tsx/ts/.vscode/settings.json",
159
+ "vue-tsx/ts/.vscode/tasks.json",
160
+ "vue-tsx/ts/ceru.plugin.json",
161
+ "vue-tsx/ts/package.json",
162
+ "vue-tsx/ts/README.md",
163
+ "vue-tsx/ts/src/App.tsx",
164
+ "vue-tsx/ts/src/env.d.ts",
165
+ "vue-tsx/ts/src/index.ts",
166
+ "vue-tsx/ts/src/view.ts",
167
+ "vue-tsx/ts/tsconfig.json",
168
+ "vue/js/_gitignore",
169
+ "vue/js/.prettierrc.json",
170
+ "vue/js/.vscode/ceru.code-snippets",
171
+ "vue/js/.vscode/extensions.json",
172
+ "vue/js/.vscode/launch.json",
173
+ "vue/js/.vscode/settings.json",
174
+ "vue/js/.vscode/tasks.json",
175
+ "vue/js/ceru.plugin.json",
176
+ "vue/js/package.json",
177
+ "vue/js/README.md",
178
+ "vue/js/src/App.vue",
179
+ "vue/js/src/env.d.ts",
180
+ "vue/js/src/index.js",
181
+ "vue/js/src/view.js",
182
+ "vue/js/tsconfig.json",
183
+ "vue/ts/_gitignore",
184
+ "vue/ts/.prettierrc.json",
185
+ "vue/ts/.vscode/ceru.code-snippets",
186
+ "vue/ts/.vscode/extensions.json",
187
+ "vue/ts/.vscode/launch.json",
188
+ "vue/ts/.vscode/settings.json",
189
+ "vue/ts/.vscode/tasks.json",
190
+ "vue/ts/ceru.plugin.json",
191
+ "vue/ts/package.json",
192
+ "vue/ts/README.md",
193
+ "vue/ts/src/App.vue",
194
+ "vue/ts/src/env.d.ts",
195
+ "vue/ts/src/index.ts",
196
+ "vue/ts/src/view.ts",
197
+ "vue/ts/tsconfig.json",
198
+ "web-dist/js/_gitignore",
199
+ "web-dist/js/.prettierrc.json",
200
+ "web-dist/js/.vscode/ceru.code-snippets",
201
+ "web-dist/js/.vscode/extensions.json",
202
+ "web-dist/js/.vscode/launch.json",
203
+ "web-dist/js/.vscode/settings.json",
204
+ "web-dist/js/.vscode/tasks.json",
205
+ "web-dist/js/ceru.plugin.json",
206
+ "web-dist/js/package.json",
207
+ "web-dist/js/README.md",
208
+ "web-dist/js/src/index.js",
209
+ "web-dist/js/tsconfig.json",
210
+ "web-dist/js/web-dist/index.html",
211
+ "web-dist/js/web-dist/main.js",
212
+ "web-dist/js/web-dist/sample.png",
213
+ "web-dist/js/web-dist/style.css",
214
+ "web-dist/ts/_gitignore",
215
+ "web-dist/ts/.prettierrc.json",
216
+ "web-dist/ts/.vscode/ceru.code-snippets",
217
+ "web-dist/ts/.vscode/extensions.json",
218
+ "web-dist/ts/.vscode/launch.json",
219
+ "web-dist/ts/.vscode/settings.json",
220
+ "web-dist/ts/.vscode/tasks.json",
221
+ "web-dist/ts/ceru.plugin.json",
222
+ "web-dist/ts/package.json",
223
+ "web-dist/ts/README.md",
224
+ "web-dist/ts/src/index.ts",
225
+ "web-dist/ts/tsconfig.json",
226
+ "web-dist/ts/web-dist/index.html",
227
+ "web-dist/ts/web-dist/main.js",
228
+ "web-dist/ts/web-dist/sample.png",
229
+ "web-dist/ts/web-dist/style.css",
230
+ "web-surface/js/_gitignore",
231
+ "web-surface/js/.prettierrc.json",
232
+ "web-surface/js/.vscode/ceru.code-snippets",
233
+ "web-surface/js/.vscode/extensions.json",
234
+ "web-surface/js/.vscode/launch.json",
235
+ "web-surface/js/.vscode/settings.json",
236
+ "web-surface/js/.vscode/tasks.json",
237
+ "web-surface/js/ceru.plugin.json",
238
+ "web-surface/js/package.json",
239
+ "web-surface/js/README.md",
240
+ "web-surface/js/src/index.js",
241
+ "web-surface/js/src/view.js",
242
+ "web-surface/js/tsconfig.json",
243
+ "web-surface/ts/_gitignore",
244
+ "web-surface/ts/.prettierrc.json",
245
+ "web-surface/ts/.vscode/ceru.code-snippets",
246
+ "web-surface/ts/.vscode/extensions.json",
247
+ "web-surface/ts/.vscode/launch.json",
248
+ "web-surface/ts/.vscode/settings.json",
249
+ "web-surface/ts/.vscode/tasks.json",
250
+ "web-surface/ts/ceru.plugin.json",
251
+ "web-surface/ts/package.json",
252
+ "web-surface/ts/README.md",
253
+ "web-surface/ts/src/index.ts",
254
+ "web-surface/ts/src/view.ts",
255
+ "web-surface/ts/tsconfig.json"
256
+ ]
257
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "singleQuote": true,
3
+ "semi": false,
4
+ "printWidth": 100
5
+ }
@@ -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,3 @@
1
+ {
2
+ "recommendations": ["esbenp.prettier-vscode"]
3
+ }
@@ -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
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "Ceru: dev",
6
+ "type": "npm",
7
+ "script": "dev",
8
+ "isBackground": true,
9
+ "problemMatcher": {
10
+ "owner": "ceru",
11
+ "pattern": {
12
+ "regexp": "^CERU_ERROR (.*)$",
13
+ "message": 1
14
+ },
15
+ "background": {
16
+ "activeOnStart": true,
17
+ "beginsPattern": "^.*$",
18
+ "endsPattern": "^Electron debugger:"
19
+ }
20
+ }
21
+ },
22
+ {
23
+ "label": "Ceru: typecheck",
24
+ "type": "npm",
25
+ "script": "typecheck",
26
+ "problemMatcher": "$tsc",
27
+ "group": "build"
28
+ },
29
+ {
30
+ "label": "Ceru: build",
31
+ "type": "npm",
32
+ "script": "build",
33
+ "problemMatcher": []
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,38 @@
1
+ # source / js
2
+
3
+ Ceru Music v2 插件开发模板。此目录是源码,不是安装包。
4
+
5
+ ## 运行 demo
6
+
7
+ 1. 使用脚手架创建工程:
8
+
9
+ npm create ceru-plugin@latest my-plugin -- --template source --lang js
10
+
11
+ 2. 进入目录,运行 npm install。
12
+ 3. 运行 npm run dev,打开独立 Electron 调试工作台。
13
+ 4. 修改 src 中的代码;保存后自动类型检查并重载。
14
+ 5. 运行 npm run build,只分发 dist/plugin.js。
15
+
16
+ ## 编辑器
17
+
18
+ VS Code 按 F5 选择 Launch Ceru plugin;已有调试窗口时选择 Attach to Ceru plugin。
19
+ 激活代码已经执行时,可点击“重新运行”再次命中断点。
20
+ 配置文件有 JSON Schema 提示,SDK 提供参数类型、图标名称与 Lodash 方法补全。
21
+
22
+ ## 宿主资源
23
+
24
+ - 平台图标:icon: { kind: 'host', name: 'platform.tx' }。
25
+ - 代码取图标:await ctx.icons.url('platform.tx')。
26
+ - 默认封面:await ctx.assets.url('placeholder.cover')。
27
+ - 共享工具:ctx.utils.lodash。
28
+
29
+ 框架模板默认使用声明过版本的宿主 Vue/React 生产运行时;开发编译器不进入插件。
30
+ 若需要把生产运行时一起打包,可将 ceru.plugin.json 的 sharedLibraries 改为 {}。
31
+
32
+ ## 边界
33
+
34
+ 本模板面向 v2 协议。开发工作台不是当前 v1 桌面 Host 的兼容层。
35
+ 凭据保险箱、完整音乐业务和 Guest 安装需要正式 Host;不支持的调试调用会明确报错。
36
+ 不要把私人 API Key、卡密或发行私钥提交到仓库。
37
+
38
+ 此 demo 搜索三条本地元数据,不连接真实音乐服务,也不伪造可播放地址。
@@ -0,0 +1,6 @@
1
+ node_modules/
2
+ dist/
3
+ .keys/
4
+ .ceru-dev/
5
+ *.private.pem
6
+ *.tsbuildinfo
@@ -0,0 +1,51 @@
1
+ {
2
+ "manifest": {
3
+ "manifestVersion": 2,
4
+ "id": "local.js",
5
+ "name": "js",
6
+ "version": "0.1.0",
7
+ "description": "A Ceru Music v2 source plugin",
8
+ "engines": {
9
+ "hostApi": "^2.0.0",
10
+ "logicRuntime": "ceru-js@1",
11
+ "uiSchema": "^1.0.0"
12
+ },
13
+ "modules": {
14
+ "logic": {
15
+ "entry": "logic.main",
16
+ "activation": ["onCommand:hello", "onProvider:catalog"]
17
+ }
18
+ },
19
+ "contributes": {
20
+ "commands": [
21
+ {
22
+ "id": "hello",
23
+ "title": "Hello",
24
+ "action": "hello"
25
+ }
26
+ ],
27
+ "providers": [
28
+ {
29
+ "id": "catalog",
30
+ "name": "js",
31
+ "protocols": ["music.search@1", "music.resolve@1"],
32
+ "icon": {
33
+ "kind": "host",
34
+ "name": "music-note"
35
+ },
36
+ "connectionMode": "none"
37
+ }
38
+ ]
39
+ },
40
+ "permissions": [],
41
+ "dataSchemas": {
42
+ "config": 1,
43
+ "state": 1
44
+ }
45
+ },
46
+ "entries": {
47
+ "logic.main": "src/index.js"
48
+ },
49
+ "resources": {},
50
+ "output": "dist/plugin.js"
51
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "js",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "ceru-plugin dev",
8
+ "build": "ceru-plugin build",
9
+ "typecheck": "tsc --noEmit",
10
+ "validate": "ceru-plugin validate dist/plugin.js"
11
+ },
12
+ "dependencies": {
13
+ "@shiqianjiang/ceru-plugin-sdk": "^0.1.0"
14
+ },
15
+ "devDependencies": {
16
+ "@shiqianjiang/ceru-plugin-cli": "^0.1.0",
17
+ "typescript": "~5.9.3",
18
+ "electron": "^44.4.2",
19
+ "prettier": "^3.6.2"
20
+ }
21
+ }
@@ -0,0 +1,50 @@
1
+ import { definePlugin } from '@shiqianjiang/ceru-plugin-sdk'
2
+
3
+ // 本地演示数据。请在接入真实音源时声明所需的网络权限。
4
+ const tracks = [
5
+ { id: 'morning', title: 'Morning Light', artist: 'Ceru Demo' },
6
+ { id: 'rain', title: 'Rainy Afternoon', artist: 'Ceru Demo' },
7
+ { id: 'night', title: 'Night Walk', artist: 'Ceru Demo' },
8
+ ]
9
+
10
+ export default definePlugin((ctx) => {
11
+ ctx.actions.register('hello', async () => {
12
+ await ctx.ui.notify({
13
+ key: 'welcome',
14
+ level: 'info',
15
+ message: '演示插件已就绪。试试搜索 Morning、Rain 或 Night。',
16
+ })
17
+ })
18
+
19
+ ctx.providers.register('catalog', {
20
+ async search(request) {
21
+ const query = ctx.utils.lodash.trim(request.query).toLowerCase()
22
+ const matches = tracks.filter((track) =>
23
+ (track.title + ' ' + track.artist).toLowerCase().includes(query),
24
+ )
25
+
26
+ return {
27
+ items: matches.slice(0, Math.max(1, Math.min(request.limit, 100))).map((track) => ({
28
+ ref: {
29
+ pluginId: ctx.plugin.id,
30
+ providerId: 'catalog',
31
+ kind: 'track',
32
+ id: track.id,
33
+ },
34
+ title: track.title,
35
+ subtitle: track.artist,
36
+ playable: false,
37
+ capabilities: [],
38
+ })),
39
+ }
40
+ },
41
+
42
+ async resolve() {
43
+ // 演示不会伪造播放地址。真实解析器应返回 Host 发放的 MediaLease。
44
+ return ctx.playback.failure({
45
+ code: 'UNSUPPORTED',
46
+ message: '这是本地搜索 demo,尚未连接真实的音源服务。',
47
+ })
48
+ },
49
+ })
50
+ })
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "strict": true,
7
+ "noEmit": true,
8
+ "skipLibCheck": true,
9
+ "allowJs": true,
10
+ "checkJs": false,
11
+ "lib": ["ES2022", "DOM"],
12
+ "types": [],
13
+ "jsx": "react-jsx"
14
+ },
15
+ "include": ["src"]
16
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "singleQuote": true,
3
+ "semi": false,
4
+ "printWidth": 100
5
+ }
@@ -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,3 @@
1
+ {
2
+ "recommendations": ["esbenp.prettier-vscode"]
3
+ }
@@ -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
+ }