@delta-comic/vite 0.0.0-semantically-released → 0.0.1

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/dist/index.js CHANGED
@@ -12,7 +12,8 @@ var extendsDepends = {
12
12
  "@delta-comic/core": "window.$$lib$$.DcCore",
13
13
  "@delta-comic/plugin": "window.$$lib$$.DcPlugin",
14
14
  "@delta-comic/utils": "window.$$lib$$.DcUtils",
15
- "@delta-comic/require": "window.$$lib$$.DcRequire"
15
+ "@delta-comic/require": "window.$$lib$$.DcRequire",
16
+ "@delta-comic/db": "window.$$lib$$.DcDb"
16
17
  };
17
18
  function isPlainObject(e) {
18
19
  if (!e || typeof e != "object") return !1;
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":["import \"axios\";\nconst extendsDepends = {\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}, useGlobalVar = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\nexport { extendsDepends, 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'\n\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport external from 'vite-plugin-external'\nimport monkey from 'vite-plugin-monkey'\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 command == 'build' ? false : external({ externals: extendsDepends }),\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 ]\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: extendsDepends }), 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,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"}
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":["import \"axios\";\nconst extendsDepends = {\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}, useGlobalVar = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\nexport { extendsDepends, 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'\n\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport external from 'vite-plugin-external'\nimport monkey from 'vite-plugin-monkey'\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 command == 'build' ? false : external({ externals: extendsDepends }),\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 ]\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: extendsDepends }), 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":";;AACA,IAAM,iBAAiB;CACtB,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;ACfD,SAAS,cAAc,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;;ACT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,OAAO,EAAE,iBAAiB,KAAW,UAAU,EAAE,GAAG,GAAqB;EACzE,QAAQ;GAAE,YAAY;GAAO,MAAM;GAAO,QAAQ;GAAO;EAC1D,CAAC,CACH;GAIU,kBAAkB,GAAkB,MAyBxC,KAAW,UACb,CAAC,SAAS,EAAE,WAAW,gBAAgB,CAAC,EAzB9B;CACb,MAAM;CACN,OAAO,GAAa;AAClB,SAAO,MAAM,GAAQ,EACnB,OAAO;GACL,KAAK;IACH,OAAO;IACP,UAAU;IACV,aAAa;IACb,MAAM,uBAAuB,EAAK,KAAK,GAAG,QAAQ,KAAK,IAAI,CAAC;IAC5D,SAAS,CAAC,KAAK;IAChB;GACD,eAAe,EAAE;GAClB,EACF,CAAC;;CAEJ,iBAAiB;AACb,OAAa,SAAS;GACtB,MAAM;GACN,UAAU;GACV,QAAQ,KAAK,UAAU,GAAM,MAAM,EAAE;GACtC,CAAC;;CAEL,CAEqD,GAClD,WACE;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,2 +1,2 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vite-plugin-external`),require(`vite-plugin-monkey`)):typeof define==`function`&&define.amd?define([`exports`,`vite-plugin-external`,`vite-plugin-monkey`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.DcVite={},e.vite_plugin_external,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},u=(e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e));t=u(t),n=u(n);var d={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`};function f(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 p(e){return e===`__proto__`}function m(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];if(p(i))continue;let a=t[i],o=e[i];Array.isArray(a)?Array.isArray(o)?e[i]=m(o,a):e[i]=m([],a):f(a)?f(o)?e[i]=m(o,a):e[i]=m({},a):(o===void 0||a!==void 0)&&(e[i]=a)}return e}let h=(e,r,i)=>{let a={...i.dependencies,...i.devDependencies},o=Object.fromEntries(Object.entries(d).filter(([e])=>e in a));return[r==`build`?!1:(0,t.default)({externals:d}),(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}})]};e.deltaComic=h,e.deltaComicPlus=(e,n)=>n==`build`?[(0,t.default)({externals:d}),{name:`delta-comic-helper`,config(t){return m(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:d,devDependencies:d})});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vite-plugin-external`),require(`vite-plugin-monkey`)):typeof define==`function`&&define.amd?define([`exports`,`vite-plugin-external`,`vite-plugin-monkey`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.DcVite={},e.vite_plugin_external,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},u=(e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e));t=u(t),n=u(n);var d={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 f(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 p(e){return e===`__proto__`}function m(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];if(p(i))continue;let a=t[i],o=e[i];Array.isArray(a)?Array.isArray(o)?e[i]=m(o,a):e[i]=m([],a):f(a)?f(o)?e[i]=m(o,a):e[i]=m({},a):(o===void 0||a!==void 0)&&(e[i]=a)}return e}let h=(e,r,i)=>{let a={...i.dependencies,...i.devDependencies},o=Object.fromEntries(Object.entries(d).filter(([e])=>e in a));return[r==`build`?!1:(0,t.default)({externals:d}),(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}})]};e.deltaComic=h,e.deltaComicPlus=(e,n)=>n==`build`?[(0,t.default)({externals:d}),{name:`delta-comic-helper`,config(t){return m(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:d,devDependencies:d})});
2
2
  //# sourceMappingURL=index.umd.cjs.map
@@ -1 +1 @@
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":["import \"axios\";\nconst extendsDepends = {\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}, useGlobalVar = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\nexport { extendsDepends, 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'\n\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport external from 'vite-plugin-external'\nimport monkey from 'vite-plugin-monkey'\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 command == 'build' ? false : external({ externals: extendsDepends }),\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 ]\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: extendsDepends }), 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":"o5BACA,IAAM,EAAiB,CACtB,IAAK,qBACL,KAAM,sBACN,WAAY,uBACZ,MAAO,uBACP,MAAO,uBACP,aAAc,oBACd,kBAAmB,sBACnB,qBAAsB,yBACtB,oBAAqB,wBACrB,sBAAuB,0BACvB,qBAAsB,yBACtB,uBAAwB,2BACxB,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,EA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G,GAAG,EAAE,UAAY,KACnC,CACH,CACD,MAAO,CAAE,gBAAiB,GAAW,QAAU,EAAE,CAAG,EAAqB,CACzE,OAAQ,CAAE,WAAY,GAAO,KAAM,GAAO,OAAQ,GAAO,CAC1D,CAAC,CACH,mCAI4B,EAAkB,IAyBxC,GAAW,QACb,EAAA,EAAA,EAAA,SAAU,CAAE,UAAW,EAAgB,CAAC,CAzB9B,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,CAEqD,CAClD,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
+ {"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":["import \"axios\";\nconst extendsDepends = {\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}, useGlobalVar = (e, t) => (window.$api.__core_lib__ ??= {})[t] ??= e;\nexport { extendsDepends, 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'\n\nimport { extendsDepends } from '@delta-comic/utils'\nimport { merge } from 'es-toolkit'\nimport external from 'vite-plugin-external'\nimport monkey from 'vite-plugin-monkey'\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 command == 'build' ? false : external({ externals: extendsDepends }),\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 ]\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: extendsDepends }), 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":"o5BACA,IAAM,EAAiB,CACtB,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,CCfD,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,SAEJ,IAAM,EAAc,EAAO,GACrB,EAAc,EAAO,GACvB,MAAM,QAAQ,EAAY,CACtB,MAAM,QAAQ,EAAY,CAC1B,EAAO,GAAO,EAAM,EAAa,EAAY,CAG7C,EA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AAK,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,CAEqD,CAClD,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"}
package/dist/pack.tgz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delta-comic/vite",
3
- "version": "0.0.0-semantically-released",
3
+ "version": "0.0.1",
4
4
  "description": "空阙虱楼",
5
5
  "homepage": "https://github.com/delta-comic/delta-comic-core",
6
6
  "license": "AGPL-3.0-only",
@@ -29,19 +29,16 @@
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "dependencies": {
33
- "@delta-comic/plugin": "0.0.0-semantically-released",
34
- "@delta-comic/utils": "0.0.0-semantically-released"
35
- },
36
32
  "devDependencies": {
37
33
  "lightningcss": "^1.30.2"
38
34
  },
39
35
  "peerDependencies": {
40
36
  "vite-plugin-external": "^6.2.2",
41
- "vite-plugin-monkey": "^7.1.8"
37
+ "vite-plugin-monkey": "^7.1.8",
38
+ "@delta-comic/plugin": "0.0.1",
39
+ "@delta-comic/utils": "0.0.1"
42
40
  },
43
41
  "release": {
44
- "extends": "../../release.config.js",
45
42
  "tagFormat": "vite-${version}"
46
43
  },
47
44
  "dist": {
@@ -49,6 +46,9 @@
49
46
  },
50
47
  "readme": "./README.md",
51
48
  "scripts": {
52
- "build": "vite build && pnpm pack --out ./dist/pack.tgz"
49
+ "build": "vite build && pnpm pack --out ./dist/pack.tgz",
50
+ "version:major": "pnpm version major --no-git-tag-version",
51
+ "version:minor": "pnpm version minor --no-git-tag-version",
52
+ "version:patch": "pnpm version patch --no-git-tag-version"
53
53
  }
54
54
  }