@delta-comic/vite 0.1.3 → 1.3.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/LICENSE CHANGED
@@ -658,4 +658,4 @@ specific requirements.
658
658
  You should also get your employer (if you work as a programmer) or school,
659
659
  if any, to sign a "copyright disclaimer" for the program, if necessary.
660
660
  For more information on this, and how to apply and follow the GNU AGPL, see
661
- <https://www.gnu.org/licenses/>.
661
+ <https://www.gnu.org/licenses/>.
package/dist/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { viteExternalsPlugin as e } from "vite-plugin-externals";
2
2
  import t from "vite-plugin-monkey";
3
+ //#region ../utils/dist/index.js
3
4
  var n = {
4
5
  vue: "window.$$lib$$.Vue",
5
6
  vant: "window.$$lib$$.Vant",
6
7
  "naive-ui": "window.$$lib$$.Naive",
7
- axios: "window.$$lib$$.Axios",
8
8
  pinia: "window.$$lib$$.Pinia",
9
9
  "vue-router": "window.$$lib$$.VR",
10
+ "@pinia/colada": "window.$$lib$$.Pc",
10
11
  "@delta-comic/ui": "window.$$lib$$.DcUi",
11
12
  "@delta-comic/model": "window.$$lib$$.DcModel",
12
13
  "@delta-comic/core": "window.$$lib$$.DcCore",
@@ -15,31 +16,40 @@ var n = {
15
16
  "@delta-comic/require": "window.$$lib$$.DcRequire",
16
17
  "@delta-comic/db": "window.$$lib$$.DcDb"
17
18
  };
19
+ //#endregion
20
+ //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
18
21
  function r(e) {
19
22
  if (!e || typeof e != "object") return !1;
20
23
  let t = Object.getPrototypeOf(e);
21
24
  return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
22
25
  }
26
+ //#endregion
27
+ //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
23
28
  function i(e) {
24
29
  return e === "__proto__";
25
30
  }
31
+ //#endregion
32
+ //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs
26
33
  function a(e, t) {
27
34
  let n = Object.keys(t);
28
- for (let o = 0; o < n.length; o++) {
29
- let s = n[o];
30
- if (i(s)) continue;
31
- let c = t[s], l = e[s];
32
- Array.isArray(c) ? Array.isArray(l) ? e[s] = a(l, c) : e[s] = a([], c) : r(c) ? r(l) ? e[s] = a(l, c) : e[s] = a({}, c) : (l === void 0 || c !== void 0) && (e[s] = c);
35
+ for (let s = 0; s < n.length; s++) {
36
+ let c = n[s];
37
+ if (i(c)) continue;
38
+ let l = t[c], u = e[c];
39
+ o(l) && o(u) ? e[c] = a(u, l) : Array.isArray(l) ? e[c] = a([], l) : r(l) ? e[c] = a({}, l) : (u === void 0 || l !== void 0) && (e[c] = l);
33
40
  }
34
41
  return e;
35
42
  }
36
- var o = Object.fromEntries(Object.entries(n).map(([e, t]) => [e, t.split(".").slice(1)]));
37
- /** vite插件,自动配置了库的外部化与脚本头 */
38
- const s = (r, i, a) => {
39
- let s = {
43
+ function o(e) {
44
+ return r(e) || Array.isArray(e);
45
+ }
46
+ //#endregion
47
+ //#region lib/index.ts
48
+ var s = Object.fromEntries(Object.entries(n).map(([e, t]) => [e, t.split(".").slice(1)])), c = (r, i, a) => {
49
+ let o = {
40
50
  ...a.dependencies,
41
51
  ...a.devDependencies
42
- }, c = Object.fromEntries(Object.entries(n).filter(([e]) => e in s));
52
+ }, c = Object.fromEntries(Object.entries(n).filter(([e]) => e in o));
43
53
  return [t({
44
54
  entry: r.entry ?? "src/main.ts",
45
55
  userscript: {
@@ -58,8 +68,8 @@ const s = (r, i, a) => {
58
68
  open: !1,
59
69
  prefix: !1
60
70
  }
61
- }), e(o, { disableInServe: !1 })];
62
- }, c = (t, r) => r == "build" ? [e(o, { disableInServe: !1 }), {
71
+ }), e(s, { disableInServe: !1 })];
72
+ }, l = (t, r) => r == "build" ? [e(s, { disableInServe: !1 }), {
63
73
  name: "delta-comic-helper",
64
74
  config(e) {
65
75
  return a(e, { build: {
@@ -70,7 +80,7 @@ const s = (r, i, a) => {
70
80
  name: `$$lib$$.__DcPlugin__${t.name.id.replace("-", "_")}__`,
71
81
  formats: ["es"]
72
82
  },
73
- rollupOptions: {}
83
+ rolldownOptions: {}
74
84
  } });
75
85
  },
76
86
  generateBundle() {
@@ -80,7 +90,7 @@ const s = (r, i, a) => {
80
90
  source: JSON.stringify(t, null, 2)
81
91
  });
82
92
  }
83
- }] : s({
93
+ }] : c({
84
94
  description: t.description,
85
95
  displayName: t.name.display,
86
96
  name: t.name.id,
@@ -93,6 +103,7 @@ const s = (r, i, a) => {
93
103
  dependencies: n,
94
104
  devDependencies: n
95
105
  });
96
- export { s as deltaComic, c as deltaComicPlus };
106
+ //#endregion
107
+ export { c as deltaComic, l as deltaComicPlus };
97
108
 
98
109
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../utils/dist/index.js","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/object/merge.mjs","../lib/index.ts"],"sourcesContent":["const e = {\n\tvue: \"window.$$lib$$.Vue\",\n\tvant: \"window.$$lib$$.Vant\",\n\t\"naive-ui\": \"window.$$lib$$.Naive\",\n\taxios: \"window.$$lib$$.Axios\",\n\tpinia: \"window.$$lib$$.Pinia\",\n\t\"vue-router\": \"window.$$lib$$.VR\",\n\t\"@delta-comic/ui\": \"window.$$lib$$.DcUi\",\n\t\"@delta-comic/model\": \"window.$$lib$$.DcModel\",\n\t\"@delta-comic/core\": \"window.$$lib$$.DcCore\",\n\t\"@delta-comic/plugin\": \"window.$$lib$$.DcPlugin\",\n\t\"@delta-comic/utils\": \"window.$$lib$$.DcUtils\",\n\t\"@delta-comic/require\": \"window.$$lib$$.DcRequire\",\n\t\"@delta-comic/db\": \"window.$$lib$$.DcDb\"\n}, t = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\nexport { e as extendsDepends, t as useGlobalVar };\n\n//# sourceMappingURL=index.js.map","function isPlainObject(value) {\n if (!value || typeof value !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n const hasObjectPrototype = proto === null ||\n proto === Object.prototype ||\n Object.getPrototypeOf(proto) === null;\n if (!hasObjectPrototype) {\n return false;\n }\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n\nexport { isPlainObject };\n","function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\n\nfunction merge(target, source) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n if (Array.isArray(sourceValue)) {\n if (Array.isArray(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else {\n target[key] = merge([], sourceValue);\n }\n }\n else if (isPlainObject(sourceValue)) {\n if (isPlainObject(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else {\n target[key] = merge({}, sourceValue);\n }\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { merge };\n","import type { PluginMeta } from '@delta-comic/plugin'\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport { viteExternalsPlugin as external } from 'vite-plugin-externals'\nimport monkey from 'vite-plugin-monkey'\n\nconst externals = Object.fromEntries(\n Object.entries(extendsDepends).map(([key, val]) => [key, val.split('.').slice(1)])\n)\n\n/** vite插件,自动配置了库的外部化与脚本头 */\nexport const deltaComic = (\n config: {\n name: string\n displayName: string\n version: string\n author?: string\n description: string\n /** 通过语义化版本号描述core支持版本,通过`semver.satisfies`判定,所有的`>=`会替换为`^`,除非`lockCoreVersion为`true` */\n supportCoreVersion: string\n /** 如果为`true`,则`supportCoreVersion`的`>=`不会替换为`^` */\n lockCoreVersion?: boolean\n /** @default ['core'] */\n require?: ({ id: string; download?: string } | string)[]\n /** @default 'src/main.ts' */\n entry?: string\n },\n command: 'build' | 'serve',\n packageJson: { dependencies: Record<string, string>; devDependencies: Record<string, string> }\n): any => {\n const allDependencies = { ...packageJson.dependencies, ...packageJson.devDependencies }\n const needExternalDepends = Object.fromEntries(\n Object.entries(extendsDepends).filter(([key]) => key in allDependencies)\n )\n\n const result = [\n monkey({\n entry: config.entry ?? 'src/main.ts',\n userscript: {\n name: { display: config.displayName, id: config.name },\n version: `${config.version}/${config.supportCoreVersion}/${!!config.lockCoreVersion}`,\n author: config.author,\n description: config.description,\n require: ['core', ...(config.require ?? [])].map(v => {\n if (typeof v == 'string') return `dc|${v}:`\n return `dc|${v.id}:${v.download ?? ''}`\n })\n },\n build: { externalGlobals: command == 'serve' ? {} : needExternalDepends },\n server: { mountGmApi: false, open: false, prefix: false }\n }),\n external(externals, { disableInServe: false })\n ]\n return result\n}\n\nexport const deltaComicPlus = (meta: PluginMeta, command: 'build' | 'serve'): any => {\n const plugin = {\n name: 'delta-comic-helper',\n config(config: any) {\n return merge(config, {\n build: {\n lib: {\n entry: './src/main.ts',\n fileName: 'index',\n cssFileName: 'index',\n name: `$$lib$$.__DcPlugin__${meta.name.id.replace('-', '_')}__`,\n formats: ['es']\n },\n rollupOptions: {}\n }\n })\n },\n generateBundle() {\n ;(this as any).emitFile({\n type: 'asset', // 指定类型为资源文件\n fileName: 'manifest.json', // 输出的文件名\n source: JSON.stringify(meta, null, 2) // 将 meta 对象转换为格式化的 JSON 字符串\n })\n }\n }\n return command == 'build'\n ? ([external(externals, { disableInServe: false }), plugin] as any)\n : deltaComic(\n {\n description: meta.description,\n displayName: meta.name.display,\n name: meta.name.id,\n supportCoreVersion: meta.version.supportCore,\n version: meta.version.plugin,\n author: meta.author,\n entry: 'src/main.ts',\n require: meta.require\n },\n command,\n { dependencies: extendsDepends, devDependencies: extendsDepends }\n )\n}"],"x_google_ignoreList":[1,2,3],"mappings":";;AAAA,IAAM,IAAI;CACT,KAAK;CACL,MAAM;CACN,YAAY;CACZ,OAAO;CACP,OAAO;CACP,cAAc;CACd,mBAAmB;CACnB,sBAAsB;CACtB,qBAAqB;CACrB,uBAAuB;CACvB,sBAAsB;CACtB,wBAAwB;CACxB,mBAAmB;CACnB;ACdD,SAAS,EAAc,GAAO;AAC1B,KAAI,CAAC,KAAS,OAAO,KAAU,SAC3B,QAAO;CAEX,IAAM,IAAQ,OAAO,eAAe,EAAM;AAO1C,QAN2B,MAAU,QACjC,MAAU,OAAO,aACjB,OAAO,eAAe,EAAM,KAAK,OAI9B,OAAO,UAAU,SAAS,KAAK,EAAM,KAAK,oBAFtC;;ACTf,SAAS,EAAiB,GAAK;AAC3B,QAAO,MAAQ;;ACEnB,SAAS,EAAM,GAAQ,GAAQ;CAC3B,IAAM,IAAa,OAAO,KAAK,EAAO;AACtC,MAAK,IAAI,IAAI,GAAG,IAAI,EAAW,QAAQ,KAAK;EACxC,IAAM,IAAM,EAAW;AACvB,MAAI,EAAiB,EAAI,CACrB;EAEJ,IAAM,IAAc,EAAO,IACrB,IAAc,EAAO;AAC3B,EAAI,MAAM,QAAQ,EAAY,GACtB,MAAM,QAAQ,EAAY,GAC1B,EAAO,KAAO,EAAM,GAAa,EAAY,GAG7C,EAAO,KAAO,EAAM,EAAE,EAAE,EAAY,GAGnC,EAAc,EAAY,GAC3B,EAAc,EAAY,GAC1B,EAAO,KAAO,EAAM,GAAa,EAAY,GAG7C,EAAO,KAAO,EAAM,EAAE,EAAE,EAAY,IAGnC,MAAgB,KAAA,KAAa,MAAgB,KA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Ae,EAAE;GAClB,EACF,CAAC;;CAEJ,iBAAiB;AACb,OAAa,SAAS;GACtB,MAAM;GACN,UAAU;GACV,QAAQ,KAAK,UAAU,GAAM,MAAM,EAAE;GACtC,CAAC;;CAEL,CAE4D,GACzD,EACE;CACE,aAAa,EAAK;CAClB,aAAa,EAAK,KAAK;CACvB,MAAM,EAAK,KAAK;CAChB,oBAAoB,EAAK,QAAQ;CACjC,SAAS,EAAK,QAAQ;CACtB,QAAQ,EAAK;CACb,OAAO;CACP,SAAS,EAAK;CACf,EACD,GACA;CAAE,cAAc;CAAgB,iBAAiB;CAAgB,CAClE"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../utils/dist/index.js","../../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs","../../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs","../lib/index.ts"],"sourcesContent":["//#region lib/index.ts\nvar e = {\n\tvue: \"window.$$lib$$.Vue\",\n\tvant: \"window.$$lib$$.Vant\",\n\t\"naive-ui\": \"window.$$lib$$.Naive\",\n\tpinia: \"window.$$lib$$.Pinia\",\n\t\"vue-router\": \"window.$$lib$$.VR\",\n\t\"@pinia/colada\": \"window.$$lib$$.Pc\",\n\t\"@delta-comic/ui\": \"window.$$lib$$.DcUi\",\n\t\"@delta-comic/model\": \"window.$$lib$$.DcModel\",\n\t\"@delta-comic/core\": \"window.$$lib$$.DcCore\",\n\t\"@delta-comic/plugin\": \"window.$$lib$$.DcPlugin\",\n\t\"@delta-comic/utils\": \"window.$$lib$$.DcUtils\",\n\t\"@delta-comic/require\": \"window.$$lib$$.DcRequire\",\n\t\"@delta-comic/db\": \"window.$$lib$$.DcDb\"\n}, t = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\n//#endregion\nexport { e as extendsDepends, t as useGlobalVar };\n\n//# sourceMappingURL=index.js.map","function isPlainObject(value) {\n if (!value || typeof value !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n const hasObjectPrototype = proto === null ||\n proto === Object.prototype ||\n Object.getPrototypeOf(proto) === null;\n if (!hasObjectPrototype) {\n return false;\n }\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n\nexport { isPlainObject };\n","function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\n\nfunction merge(target, source) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n if (isMergeableValue(sourceValue) && isMergeableValue(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = merge([], sourceValue);\n }\n else if (isPlainObject(sourceValue)) {\n target[key] = merge({}, sourceValue);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\nfunction isMergeableValue(value) {\n return isPlainObject(value) || Array.isArray(value);\n}\n\nexport { merge };\n","import type { PluginArchiveDB } from '@delta-comic/db'\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport { viteExternalsPlugin as external } from 'vite-plugin-externals'\nimport monkey from 'vite-plugin-monkey'\n\nconst externals = Object.fromEntries(\n Object.entries(extendsDepends).map(([key, val]) => [key, val.split('.').slice(1)])\n)\n\n/** vite插件,自动配置了库的外部化与脚本头 */\nexport const deltaComic = (\n config: {\n name: string\n displayName: string\n version: string\n author?: string\n description: string\n /** 通过语义化版本号描述core支持版本,通过`semver.satisfies`判定,所有的`>=`会替换为`^`,除非`lockCoreVersion为`true` */\n supportCoreVersion: string\n /** 如果为`true`,则`supportCoreVersion`的`>=`不会替换为`^` */\n lockCoreVersion?: boolean\n /** @default ['core'] */\n require?: ({ id: string; download?: string } | string)[]\n /** @default 'src/main.ts' */\n entry?: string\n },\n command: 'build' | 'serve',\n packageJson: { dependencies: Record<string, string>; devDependencies: Record<string, string> }\n): any => {\n const allDependencies = { ...packageJson.dependencies, ...packageJson.devDependencies }\n const needExternalDepends = Object.fromEntries(\n Object.entries(extendsDepends).filter(([key]) => key in allDependencies)\n )\n\n const result = [\n monkey({\n entry: config.entry ?? 'src/main.ts',\n userscript: {\n name: { display: config.displayName, id: config.name },\n version: `${config.version}/${config.supportCoreVersion}/${!!config.lockCoreVersion}`,\n author: config.author,\n description: config.description,\n require: ['core', ...(config.require ?? [])].map(v => {\n if (typeof v == 'string') return `dc|${v}:`\n return `dc|${v.id}:${v.download ?? ''}`\n })\n },\n build: { externalGlobals: command == 'serve' ? {} : needExternalDepends },\n server: { mountGmApi: false, open: false, prefix: false }\n }),\n external(externals, { disableInServe: false })\n ]\n return result\n}\n\nexport const deltaComicPlus = (meta: PluginArchiveDB.Meta, command: 'build' | 'serve'): any => {\n const plugin = {\n name: 'delta-comic-helper',\n config(config: any) {\n return merge(config, {\n build: {\n lib: {\n entry: './src/main.ts',\n fileName: 'index',\n cssFileName: 'index',\n name: `$$lib$$.__DcPlugin__${meta.name.id.replace('-', '_')}__`,\n formats: ['es']\n },\n rolldownOptions: {}\n }\n })\n },\n generateBundle() {\n ;(this as any).emitFile({\n type: 'asset', // 指定类型为资源文件\n fileName: 'manifest.json', // 输出的文件名\n source: JSON.stringify(meta, null, 2) // 将 meta 对象转换为格式化的 JSON 字符串\n })\n }\n }\n return command == 'build'\n ? ([external(externals, { disableInServe: false }), plugin] as any)\n : deltaComic(\n {\n description: meta.description,\n displayName: meta.name.display,\n name: meta.name.id,\n supportCoreVersion: meta.version.supportCore,\n version: meta.version.plugin,\n author: meta.author,\n entry: 'src/main.ts',\n require: meta.require\n },\n command,\n { dependencies: extendsDepends,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CAE4D,GACzD,EACE;CACE,aAAa,EAAK;CAClB,aAAa,EAAK,KAAK;CACvB,MAAM,EAAK,KAAK;CAChB,oBAAoB,EAAK,QAAQ;CACjC,SAAS,EAAK,QAAQ;CACtB,QAAQ,EAAK;CACb,OAAO;CACP,SAAS,EAAK;CACf,EACD,GACA;CAAE,cAAc;CAAgB,iBAAiB;CAAgB,CAClE"}
package/dist/pack.tgz CHANGED
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@delta-comic/vite",
3
- "version": "0.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "空阙虱楼",
5
- "homepage": "https://github.com/delta-comic/delta-comic-core",
5
+ "homepage": "https://github.com/delta-comic/delta-comic",
6
6
  "license": "AGPL-3.0-only",
7
7
  "author": {
8
8
  "name": "wenxig",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/delta-comic/delta-comic-core.git"
13
+ "url": "https://github.com/delta-comic/delta-comic.git"
14
14
  },
15
15
  "files": [
16
16
  "dist"
@@ -22,22 +22,21 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/lib/index.d.ts",
25
- "import": "./dist/index.js",
26
- "require": "./dist/index.cjs"
25
+ "import": "./dist/index.js"
27
26
  }
28
27
  },
29
28
  "publishConfig": {
30
29
  "access": "public"
31
30
  },
32
31
  "devDependencies": {
33
- "lightningcss": "^1.30.2",
34
- "vite": "8.0.0-beta.15"
32
+ "vite": "npm:@voidzero-dev/vite-plus-core@latest",
33
+ "vite-plus": "latest"
35
34
  },
36
35
  "peerDependencies": {
37
36
  "vite-plugin-externals": "^0.6.2",
38
- "vite-plugin-monkey": "^7.1.8",
39
- "@delta-comic/plugin": "0.3.4",
40
- "@delta-comic/utils": "0.0.6"
37
+ "vite-plugin-monkey": "^7.1.9",
38
+ "@delta-comic/db": "1.3.0",
39
+ "@delta-comic/utils": "1.3.0"
41
40
  },
42
41
  "release": {
43
42
  "tagFormat": "vite-${version}"
@@ -47,9 +46,6 @@
47
46
  },
48
47
  "readme": "./README.md",
49
48
  "scripts": {
50
- "build": "vite build && pnpm pack --out ./dist/pack.tgz",
51
- "version:major": "pnpm version major --no-git-tag-version || true",
52
- "version:minor": "pnpm version minor --no-git-tag-version || true",
53
- "version:patch": "pnpm version patch --no-git-tag-version || true"
49
+ "build": "vp build && pnpm pack --out ./dist/pack.tgz"
54
50
  }
55
51
  }
package/README.md DELETED
@@ -1,42 +0,0 @@
1
- ```python
2
- r"""
3
- ___________________________
4
- / ______\ | __ | | ____|
5
- | | _____ | |__| | | |__
6
- | | / _ \| __ \ | __|
7
- | |___| |_| || | \ \| |____
8
- \__________/|_| \________|
9
- ==============================
10
- 空阙虱楼 Copyright © Wenxig
11
- """
12
- ```
13
-
14
- [![GitHub](https://img.shields.io/github/license/delta-comic/delta-comic-core)](https://raw.githubusercontent.com/delta-comic/delta-comic-core/main/LICENSE)
15
- [![NPM Downloads](https://img.shields.io/npm/dm/delta-comic-core)](https://www.npmjs.com/package/delta-comic-core)
16
-
17
- - 工具库
18
-
19
- ## 功能
20
-
21
- - 辅助编写插件
22
- - 提供通用数据结构与默认样式
23
-
24
- ## 如何使用
25
-
26
- ```sh
27
- pnpm add delta-comic-core
28
- ```
29
-
30
- ## 为谁编写插件?
31
-
32
- [![Readme Card](https://wenxig-grs.vercel.app/api/pin/?username=delta-comic&repo=delta-comic&user&theme=transparent)](https://github.com/delta-comic/delta-comic)
33
-
34
- ## 辅助的插件
35
-
36
- ### Layout
37
-
38
- [![Readme Card](https://wenxig-grs.vercel.app/api/pin/?username=delta-comic&repo=delta-comic-plugin-layout&user&theme=transparent)](https://github.com/delta-comic/delta-comic-plugin-bika)
39
-
40
- ## Star History
41
-
42
- [![Star History Chart](https://api.star-history.com/svg?repos=delta-comic/delta-comic-core&type=Date)](https://www.star-history.com/#delta-comic/delta-comic-core&Date)
@@ -1,2 +0,0 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vite-plugin-externals`),require(`vite-plugin-monkey`)):typeof define==`function`&&define.amd?define([`exports`,`vite-plugin-externals`,`vite-plugin-monkey`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.DcVite={},e.vite_plugin_externals,e.vite_plugin_monkey))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(n);var u={vue:`window.$$lib$$.Vue`,vant:`window.$$lib$$.Vant`,"naive-ui":`window.$$lib$$.Naive`,axios:`window.$$lib$$.Axios`,pinia:`window.$$lib$$.Pinia`,"vue-router":`window.$$lib$$.VR`,"@delta-comic/ui":`window.$$lib$$.DcUi`,"@delta-comic/model":`window.$$lib$$.DcModel`,"@delta-comic/core":`window.$$lib$$.DcCore`,"@delta-comic/plugin":`window.$$lib$$.DcPlugin`,"@delta-comic/utils":`window.$$lib$$.DcUtils`,"@delta-comic/require":`window.$$lib$$.DcRequire`,"@delta-comic/db":`window.$$lib$$.DcDb`};function d(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function f(e){return e===`__proto__`}function p(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];if(f(i))continue;let a=t[i],o=e[i];Array.isArray(a)?Array.isArray(o)?e[i]=p(o,a):e[i]=p([],a):d(a)?d(o)?e[i]=p(o,a):e[i]=p({},a):(o===void 0||a!==void 0)&&(e[i]=a)}return e}var m=Object.fromEntries(Object.entries(u).map(([e,t])=>[e,t.split(`.`).slice(1)]));let h=(e,r,i)=>{let a={...i.dependencies,...i.devDependencies},o=Object.fromEntries(Object.entries(u).filter(([e])=>e in a));return[(0,n.default)({entry:e.entry??`src/main.ts`,userscript:{name:{display:e.displayName,id:e.name},version:`${e.version}/${e.supportCoreVersion}/${!!e.lockCoreVersion}`,author:e.author,description:e.description,require:[`core`,...e.require??[]].map(e=>typeof e==`string`?`dc|${e}:`:`dc|${e.id}:${e.download??``}`)},build:{externalGlobals:r==`serve`?{}:o},server:{mountGmApi:!1,open:!1,prefix:!1}}),(0,t.viteExternalsPlugin)(m,{disableInServe:!1})]};e.deltaComic=h,e.deltaComicPlus=(e,n)=>n==`build`?[(0,t.viteExternalsPlugin)(m,{disableInServe:!1}),{name:`delta-comic-helper`,config(t){return p(t,{build:{lib:{entry:`./src/main.ts`,fileName:`index`,cssFileName:`index`,name:`$$lib$$.__DcPlugin__${e.name.id.replace(`-`,`_`)}__`,formats:[`es`]},rollupOptions:{}}})},generateBundle(){this.emitFile({type:`asset`,fileName:`manifest.json`,source:JSON.stringify(e,null,2)})}}]:h({description:e.description,displayName:e.name.display,name:e.name.id,supportCoreVersion:e.version.supportCore,version:e.version.plugin,author:e.author,entry:`src/main.ts`,require:e.require},n,{dependencies:u,devDependencies:u})});
2
- //# sourceMappingURL=index.umd.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.cjs","names":[],"sources":["../../utils/dist/index.js","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../../../node_modules/.pnpm/es-toolkit@1.40.0/node_modules/es-toolkit/dist/object/merge.mjs","../lib/index.ts"],"sourcesContent":["const e = {\n\tvue: \"window.$$lib$$.Vue\",\n\tvant: \"window.$$lib$$.Vant\",\n\t\"naive-ui\": \"window.$$lib$$.Naive\",\n\taxios: \"window.$$lib$$.Axios\",\n\tpinia: \"window.$$lib$$.Pinia\",\n\t\"vue-router\": \"window.$$lib$$.VR\",\n\t\"@delta-comic/ui\": \"window.$$lib$$.DcUi\",\n\t\"@delta-comic/model\": \"window.$$lib$$.DcModel\",\n\t\"@delta-comic/core\": \"window.$$lib$$.DcCore\",\n\t\"@delta-comic/plugin\": \"window.$$lib$$.DcPlugin\",\n\t\"@delta-comic/utils\": \"window.$$lib$$.DcUtils\",\n\t\"@delta-comic/require\": \"window.$$lib$$.DcRequire\",\n\t\"@delta-comic/db\": \"window.$$lib$$.DcDb\"\n}, t = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\nexport { e as extendsDepends, t as useGlobalVar };\n\n//# sourceMappingURL=index.js.map","function isPlainObject(value) {\n if (!value || typeof value !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n const hasObjectPrototype = proto === null ||\n proto === Object.prototype ||\n Object.getPrototypeOf(proto) === null;\n if (!hasObjectPrototype) {\n return false;\n }\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n\nexport { isPlainObject };\n","function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\n\nfunction merge(target, source) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n if (Array.isArray(sourceValue)) {\n if (Array.isArray(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else {\n target[key] = merge([], sourceValue);\n }\n }\n else if (isPlainObject(sourceValue)) {\n if (isPlainObject(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else {\n target[key] = merge({}, sourceValue);\n }\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { merge };\n","import type { PluginMeta } from '@delta-comic/plugin'\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport { viteExternalsPlugin as external } from 'vite-plugin-externals'\nimport monkey from 'vite-plugin-monkey'\n\nconst externals = Object.fromEntries(\n Object.entries(extendsDepends).map(([key, val]) => [key, val.split('.').slice(1)])\n)\n\n/** vite插件,自动配置了库的外部化与脚本头 */\nexport const deltaComic = (\n config: {\n name: string\n displayName: string\n version: string\n author?: string\n description: string\n /** 通过语义化版本号描述core支持版本,通过`semver.satisfies`判定,所有的`>=`会替换为`^`,除非`lockCoreVersion为`true` */\n supportCoreVersion: string\n /** 如果为`true`,则`supportCoreVersion`的`>=`不会替换为`^` */\n lockCoreVersion?: boolean\n /** @default ['core'] */\n require?: ({ id: string; download?: string } | string)[]\n /** @default 'src/main.ts' */\n entry?: string\n },\n command: 'build' | 'serve',\n packageJson: { dependencies: Record<string, string>; devDependencies: Record<string, string> }\n): any => {\n const allDependencies = { ...packageJson.dependencies, ...packageJson.devDependencies }\n const needExternalDepends = Object.fromEntries(\n Object.entries(extendsDepends).filter(([key]) => key in allDependencies)\n )\n\n const result = [\n monkey({\n entry: config.entry ?? 'src/main.ts',\n userscript: {\n name: { display: config.displayName, id: config.name },\n version: `${config.version}/${config.supportCoreVersion}/${!!config.lockCoreVersion}`,\n author: config.author,\n description: config.description,\n require: ['core', ...(config.require ?? [])].map(v => {\n if (typeof v == 'string') return `dc|${v}:`\n return `dc|${v.id}:${v.download ?? ''}`\n })\n },\n build: { externalGlobals: command == 'serve' ? {} : needExternalDepends },\n server: { mountGmApi: false, open: false, prefix: false }\n }),\n external(externals, { disableInServe: false })\n ]\n return result\n}\n\nexport const deltaComicPlus = (meta: PluginMeta, command: 'build' | 'serve'): any => {\n const plugin = {\n name: 'delta-comic-helper',\n config(config: any) {\n return merge(config, {\n build: {\n lib: {\n entry: './src/main.ts',\n fileName: 'index',\n cssFileName: 'index',\n name: `$$lib$$.__DcPlugin__${meta.name.id.replace('-', '_')}__`,\n formats: ['es']\n },\n rollupOptions: {}\n }\n })\n },\n generateBundle() {\n ;(this as any).emitFile({\n type: 'asset', // 指定类型为资源文件\n fileName: 'manifest.json', // 输出的文件名\n source: JSON.stringify(meta, null, 2) // 将 meta 对象转换为格式化的 JSON 字符串\n })\n }\n }\n return command == 'build'\n ? ([external(externals, { disableInServe: false }), plugin] as any)\n : deltaComic(\n {\n description: meta.description,\n displayName: meta.name.display,\n name: meta.name.id,\n supportCoreVersion: meta.version.supportCore,\n version: meta.version.plugin,\n author: meta.author,\n entry: 'src/main.ts',\n require: meta.require\n },\n command,\n { dependencies: extendsDepends, devDependencies: extendsDepends }\n )\n}"],"x_google_ignoreList":[1,2,3],"mappings":"84BAAA,IAAM,EAAI,CACT,IAAK,qBACL,KAAM,sBACN,WAAY,uBACZ,MAAO,uBACP,MAAO,uBACP,aAAc,oBACd,kBAAmB,sBACnB,qBAAsB,yBACtB,oBAAqB,wBACrB,sBAAuB,0BACvB,qBAAsB,yBACtB,uBAAwB,2BACxB,kBAAmB,sBACnB,CCdD,SAAS,EAAc,EAAO,CAC1B,GAAI,CAAC,GAAS,OAAO,GAAU,SAC3B,MAAO,GAEX,IAAM,EAAQ,OAAO,eAAe,EAAM,CAO1C,OAN2B,IAAU,MACjC,IAAU,OAAO,WACjB,OAAO,eAAe,EAAM,GAAK,KAI9B,OAAO,UAAU,SAAS,KAAK,EAAM,GAAK,kBAFtC,GCTf,SAAS,EAAiB,EAAK,CAC3B,OAAO,IAAQ,YCEnB,SAAS,EAAM,EAAQ,EAAQ,CAC3B,IAAM,EAAa,OAAO,KAAK,EAAO,CACtC,IAAK,IAAI,EAAI,EAAG,EAAI,EAAW,OAAQ,IAAK,CACxC,IAAM,EAAM,EAAW,GACvB,GAAI,EAAiB,EAAI,CACrB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,EAAA,qBACO,EAAW,CAAE,eAAgB,GAAO,CAAC,CAC/C,mCAI4B,EAAkB,IAyBxC,GAAW,QACb,EAAA,EAAA,EAAA,qBAAU,EAAW,CAAE,eAAgB,GAAO,CAAC,CAzBrC,CACb,KAAM,qBACN,OAAO,EAAa,CAClB,OAAO,EAAM,EAAQ,CACnB,MAAO,CACL,IAAK,CACH,MAAO,gBACP,SAAU,QACV,YAAa,QACb,KAAM,uBAAuB,EAAK,KAAK,GAAG,QAAQ,IAAK,IAAI,CAAC,IAC5D,QAAS,CAAC,KAAK,CAChB,CACD,cAAe,EAAE,CAClB,CACF,CAAC,EAEJ,gBAAiB,CACb,KAAa,SAAS,CACtB,KAAM,QACN,SAAU,gBACV,OAAQ,KAAK,UAAU,EAAM,KAAM,EAAE,CACtC,CAAC,EAEL,CAE4D,CACzD,EACE,CACE,YAAa,EAAK,YAClB,YAAa,EAAK,KAAK,QACvB,KAAM,EAAK,KAAK,GAChB,mBAAoB,EAAK,QAAQ,YACjC,QAAS,EAAK,QAAQ,OACtB,OAAQ,EAAK,OACb,MAAO,cACP,QAAS,EAAK,QACf,CACD,EACA,CAAE,aAAc,EAAgB,gBAAiB,EAAgB,CAClE"}
@@ -1,24 +0,0 @@
1
- import { PluginMeta } from '@delta-comic/plugin';
2
- /** vite插件,自动配置了库的外部化与脚本头 */
3
- export declare const deltaComic: (config: {
4
- name: string;
5
- displayName: string;
6
- version: string;
7
- author?: string;
8
- description: string;
9
- /** 通过语义化版本号描述core支持版本,通过`semver.satisfies`判定,所有的`>=`会替换为`^`,除非`lockCoreVersion为`true` */
10
- supportCoreVersion: string;
11
- /** 如果为`true`,则`supportCoreVersion`的`>=`不会替换为`^` */
12
- lockCoreVersion?: boolean;
13
- /** @default ['core'] */
14
- require?: ({
15
- id: string;
16
- download?: string;
17
- } | string)[];
18
- /** @default 'src/main.ts' */
19
- entry?: string;
20
- }, command: "build" | "serve", packageJson: {
21
- dependencies: Record<string, string>;
22
- devDependencies: Record<string, string>;
23
- }) => any;
24
- export declare const deltaComicPlus: (meta: PluginMeta, command: "build" | "serve") => any;