@delta-comic/plugin 0.0.0-semantically-released → 0.0.2
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 +106 -4358
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +8 -1
- package/dist/lib/depends.d.ts +7 -0
- package/dist/lib/driver/core.d.ts +68 -0
- package/dist/lib/driver/icon.d.ts +3 -0
- package/dist/lib/driver/index.d.ts +2 -0
- package/dist/lib/driver/init/booter/0_configSetter.d.ts +8 -0
- package/dist/lib/driver/init/booter/10_apiTest.d.ts +9 -0
- package/dist/lib/driver/init/booter/20_resourceTest.d.ts +8 -0
- package/dist/lib/driver/init/booter/30_boot.d.ts +8 -0
- package/dist/lib/driver/init/booter/40_auth.d.ts +8 -0
- package/dist/lib/driver/init/booter/50_otherProcess.d.ts +8 -0
- package/dist/lib/driver/init/booter/utils.d.ts +3 -0
- package/dist/lib/driver/init/index.d.ts +19 -0
- package/dist/lib/driver/init/installer/10_normalUrl.d.ts +12 -0
- package/dist/lib/driver/init/installer/20_local.d.ts +12 -0
- package/dist/lib/driver/init/installer/30_dev.d.ts +12 -0
- package/dist/lib/driver/init/installer/40_github.d.ts +12 -0
- package/dist/lib/driver/init/loader/1_userscript.d.ts +11 -0
- package/dist/lib/driver/init/loader/2_zip.d.ts +11 -0
- package/dist/lib/driver/init/utils.d.ts +28 -0
- package/dist/lib/driver/store.d.ts +37 -0
- package/dist/lib/global.d.ts +24 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/plugin/index.d.ts +3 -3
- package/dist/pack.tgz +0 -0
- package/package.json +18 -7
- package/dist/index.umd.cjs +0 -18
- package/dist/index.umd.cjs.map +0 -1
package/dist/lib/config.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export type ConfigDescription = Record<string, Required<Pick<FormType.SingleConf
|
|
|
4
4
|
export declare class ConfigPointer<T extends ConfigDescription = ConfigDescription> {
|
|
5
5
|
pluginName: string;
|
|
6
6
|
config: T;
|
|
7
|
-
|
|
7
|
+
configName: string;
|
|
8
|
+
constructor(pluginName: string, config: T, configName: string);
|
|
8
9
|
readonly key: symbol;
|
|
9
10
|
}
|
|
10
11
|
export declare const appConfig: ConfigPointer<{
|
|
@@ -33,6 +34,12 @@ export declare const appConfig: ConfigPointer<{
|
|
|
33
34
|
defaultValue: false;
|
|
34
35
|
info: string;
|
|
35
36
|
};
|
|
37
|
+
githubToken: {
|
|
38
|
+
type: "string";
|
|
39
|
+
defaultValue: string;
|
|
40
|
+
info: string;
|
|
41
|
+
placeholder: string;
|
|
42
|
+
};
|
|
36
43
|
}>;
|
|
37
44
|
export declare const useConfig: import('pinia').StoreDefinition<"config", Pick<{
|
|
38
45
|
isDark: import('vue').ComputedRef<boolean>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface DependDefineConstraint<_T> {
|
|
2
|
+
}
|
|
3
|
+
export type DependDefine<T> = symbol & DependDefineConstraint<T>;
|
|
4
|
+
export declare const declareDepType: <T>(name: string) => DependDefine<T>;
|
|
5
|
+
export declare const require: <T>(define: DependDefine<T>) => T;
|
|
6
|
+
export declare const pluginExposes: Map<symbol, any>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { uni } from '@delta-comic/model';
|
|
2
|
+
export declare const $initCore: () => Promise<{
|
|
3
|
+
name: string;
|
|
4
|
+
config: import('../config').ConfigPointer<{
|
|
5
|
+
recordHistory: {
|
|
6
|
+
type: "switch";
|
|
7
|
+
defaultValue: true;
|
|
8
|
+
info: string;
|
|
9
|
+
};
|
|
10
|
+
showAIProject: {
|
|
11
|
+
type: "switch";
|
|
12
|
+
defaultValue: true;
|
|
13
|
+
info: string;
|
|
14
|
+
};
|
|
15
|
+
darkMode: {
|
|
16
|
+
type: "radio";
|
|
17
|
+
defaultValue: string;
|
|
18
|
+
info: string;
|
|
19
|
+
comp: "select";
|
|
20
|
+
selects: {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
easilyTitle: {
|
|
26
|
+
type: "switch";
|
|
27
|
+
defaultValue: false;
|
|
28
|
+
info: string;
|
|
29
|
+
};
|
|
30
|
+
githubToken: {
|
|
31
|
+
type: "string";
|
|
32
|
+
defaultValue: string;
|
|
33
|
+
info: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
};
|
|
36
|
+
}>[];
|
|
37
|
+
onBooted: () => void;
|
|
38
|
+
share: {
|
|
39
|
+
initiative: {
|
|
40
|
+
filter: () => true;
|
|
41
|
+
icon: import('vue').FunctionalComponent<{}, {}, any, {}>;
|
|
42
|
+
key: string;
|
|
43
|
+
name: string;
|
|
44
|
+
call(page: uni.content.ContentPage<any>): Promise<void>;
|
|
45
|
+
}[];
|
|
46
|
+
tokenListen: {
|
|
47
|
+
key: string;
|
|
48
|
+
name: string;
|
|
49
|
+
patten(chipboard: string): boolean;
|
|
50
|
+
show(chipboard: string): {
|
|
51
|
+
title: string;
|
|
52
|
+
detail: string;
|
|
53
|
+
onNegative(): void;
|
|
54
|
+
onPositive(): {
|
|
55
|
+
fn: import('@delta-comic/core').SharedFunctions[keyof import('@delta-comic/core').SharedFunctions];
|
|
56
|
+
plugin: string;
|
|
57
|
+
result: PromiseLike<any>;
|
|
58
|
+
}[] & Promise<{
|
|
59
|
+
result: any;
|
|
60
|
+
fn: import('@delta-comic/core').SharedFunctions[keyof import('@delta-comic/core').SharedFunctions];
|
|
61
|
+
plugin: string;
|
|
62
|
+
}[]>;
|
|
63
|
+
};
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
67
|
+
export declare const coreName = "core";
|
|
68
|
+
export declare const core: import('../depends').DependDefine<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginConfig } from '../../../plugin';
|
|
2
|
+
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
+
declare class _ConfigSetter extends PluginBooter {
|
|
4
|
+
name: string;
|
|
5
|
+
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _ConfigSetter;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PluginConfig } from '../../../plugin';
|
|
2
|
+
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
+
export type _TestPluginApiResult = Record<string, string | false | undefined>;
|
|
4
|
+
declare class _TestPluginApi extends PluginBooter {
|
|
5
|
+
name: string;
|
|
6
|
+
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta, env: Record<any, any>): Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: _TestPluginApi;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginConfig } from '../../../plugin';
|
|
2
|
+
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
+
declare class _TestPluginResource extends PluginBooter {
|
|
4
|
+
name: string;
|
|
5
|
+
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _TestPluginResource;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginConfig } from '../../../plugin';
|
|
2
|
+
import { PluginBooter } from '../utils';
|
|
3
|
+
declare class _ExposeBootPlugin extends PluginBooter {
|
|
4
|
+
name: string;
|
|
5
|
+
call(cfg: PluginConfig, _: any, env: Record<any, any>): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _ExposeBootPlugin;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
2
|
+
import { PluginConfig } from '../../../plugin';
|
|
3
|
+
declare class _PluginAuth extends PluginBooter {
|
|
4
|
+
name: string;
|
|
5
|
+
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _PluginAuth;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginConfig } from '../../../plugin';
|
|
2
|
+
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
+
declare class _TestPluginResource extends PluginBooter {
|
|
4
|
+
name: string;
|
|
5
|
+
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _TestPluginResource;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PluginConfig } from '../../../plugin';
|
|
2
|
+
export declare const testApi: (cfg: NonNullable<PluginConfig["api"]>[string]) => Promise<[url: string, result: number | false]>;
|
|
3
|
+
export declare const testResourceApi: (cfg: NonNullable<NonNullable<PluginConfig["resource"]>["types"]>[number]) => Promise<[url: string, result: number | false]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
+
import { DownloadMessageBind } from '@delta-comic/ui';
|
|
3
|
+
import { PluginConfig, PluginMeta } from '../../plugin';
|
|
4
|
+
import { PluginInstaller, PluginLoader } from './utils';
|
|
5
|
+
export declare const bootPlugin: (cfg: PluginConfig) => Promise<void>;
|
|
6
|
+
declare const installers: PluginInstaller[];
|
|
7
|
+
export interface SourceOverrideConfig {
|
|
8
|
+
id: string;
|
|
9
|
+
install: string;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const usePluginConfig: () => import('@vueuse/core').RemovableRef<SourceOverrideConfig[]> & Promise<import('@vueuse/core').RemovableRef<SourceOverrideConfig[]>>;
|
|
13
|
+
export declare const installDepends: (m: DownloadMessageBind, meta: PluginMeta, installedPlugins?: Set<string>) => Promise<void>;
|
|
14
|
+
export declare const installPlugin: (input: string, __installedPlugins?: Set<string>) => Promise<void>;
|
|
15
|
+
export declare const installFilePlugin: (file: File, __installedPlugins?: Set<string>) => Promise<void>;
|
|
16
|
+
export declare const updatePlugin: (pluginMeta: PluginArchiveDB.Meta, __installedPlugins?: Set<string>) => Promise<void>;
|
|
17
|
+
declare const loaders: PluginLoader[];
|
|
18
|
+
export declare const loadPlugin: (meta: PluginArchiveDB.Meta) => Promise<void>;
|
|
19
|
+
export { loaders as pluginLoaders, installers as pluginInstallers };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
+
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
+
export declare class _PluginInstallByFallbackUrl extends PluginInstaller {
|
|
4
|
+
description: PluginInstallerDescription;
|
|
5
|
+
name: string;
|
|
6
|
+
private installer;
|
|
7
|
+
install(input: string): Promise<File>;
|
|
8
|
+
update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
|
|
9
|
+
isMatched(input: string): boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: _PluginInstallByFallbackUrl;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
2
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
3
|
+
export declare class _PluginInstallByLocal extends PluginInstaller {
|
|
4
|
+
description: PluginInstallerDescription;
|
|
5
|
+
name: string;
|
|
6
|
+
private installer;
|
|
7
|
+
install(input: string): Promise<File>;
|
|
8
|
+
update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
|
|
9
|
+
isMatched(input: string): boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: _PluginInstallByLocal;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
2
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
3
|
+
export declare class _PluginInstallByDev extends PluginInstaller {
|
|
4
|
+
description: PluginInstallerDescription;
|
|
5
|
+
name: string;
|
|
6
|
+
private installer;
|
|
7
|
+
install(input: string): Promise<File>;
|
|
8
|
+
update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
|
|
9
|
+
isMatched(input: string): boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: _PluginInstallByDev;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
+
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
+
export declare class _PluginInstallByNormalUrl extends PluginInstaller {
|
|
4
|
+
description: PluginInstallerDescription;
|
|
5
|
+
name: string;
|
|
6
|
+
private installer;
|
|
7
|
+
install(input: string): Promise<File>;
|
|
8
|
+
update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
|
|
9
|
+
isMatched(input: string): boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: _PluginInstallByNormalUrl;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
+
import { PluginMeta } from '../../../plugin';
|
|
3
|
+
import { PluginLoader } from '../utils';
|
|
4
|
+
declare class _PluginUserscriptLoader extends PluginLoader {
|
|
5
|
+
name: string;
|
|
6
|
+
installDownload(file: File): Promise<PluginMeta>;
|
|
7
|
+
canInstall(file: File): boolean;
|
|
8
|
+
load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: _PluginUserscriptLoader;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PluginLoader } from '../utils';
|
|
2
|
+
import { PluginMeta } from '../../../plugin';
|
|
3
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
4
|
+
declare class _PluginUserscriptLoader extends PluginLoader {
|
|
5
|
+
name: string;
|
|
6
|
+
installDownload(file: File): Promise<PluginMeta>;
|
|
7
|
+
canInstall(file: File): boolean;
|
|
8
|
+
load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: _PluginUserscriptLoader;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
+
import { PluginConfig, PluginMeta } from '../../plugin';
|
|
3
|
+
export declare const getPluginFsPath: (pluginName: string) => Promise<string>;
|
|
4
|
+
export interface PluginInstallerDescription {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export declare abstract class PluginInstaller {
|
|
9
|
+
abstract install(input: string): Promise<File>;
|
|
10
|
+
abstract update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
|
|
11
|
+
abstract isMatched(input: string): boolean;
|
|
12
|
+
abstract name: string;
|
|
13
|
+
abstract description: PluginInstallerDescription;
|
|
14
|
+
}
|
|
15
|
+
export declare abstract class PluginLoader {
|
|
16
|
+
abstract name: string;
|
|
17
|
+
abstract load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
|
|
18
|
+
abstract installDownload(file: File): Promise<PluginMeta>;
|
|
19
|
+
abstract canInstall(file: File): boolean;
|
|
20
|
+
}
|
|
21
|
+
export type PluginBooterSetMeta = (meta: Partial<{
|
|
22
|
+
description: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}> | string) => void;
|
|
25
|
+
export declare abstract class PluginBooter {
|
|
26
|
+
abstract name: string;
|
|
27
|
+
abstract call(cfg: PluginConfig, setMeta: PluginBooterSetMeta, env: Record<any, any>): Promise<any>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Raw } from 'vue';
|
|
2
|
+
import { PluginConfig, Search } from '../plugin';
|
|
3
|
+
export interface SavePluginBlob {
|
|
4
|
+
key: string;
|
|
5
|
+
blob: Blob;
|
|
6
|
+
}
|
|
7
|
+
export interface PluginData {
|
|
8
|
+
key: string;
|
|
9
|
+
value: any;
|
|
10
|
+
}
|
|
11
|
+
export type PluginLoadingMicroSteps = {
|
|
12
|
+
steps: {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
}[];
|
|
16
|
+
now: {
|
|
17
|
+
stepsIndex: number;
|
|
18
|
+
status: 'process' | 'error' | 'finish' | 'wait';
|
|
19
|
+
error?: Error;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const usePluginStore: import('pinia').StoreDefinition<"plugin", Pick<{
|
|
23
|
+
$getPluginDisplayName: (key: string) => string;
|
|
24
|
+
plugins: import('vue').ShallowReactive<Map<string, Raw<PluginConfig>>>;
|
|
25
|
+
allSearchSource: import('vue').ComputedRef<[plugin: string, sources: [name: string, method: Search.SearchMethod][]][]>;
|
|
26
|
+
pluginSteps: Record<string, PluginLoadingMicroSteps>;
|
|
27
|
+
}, "plugins" | "pluginSteps">, Pick<{
|
|
28
|
+
$getPluginDisplayName: (key: string) => string;
|
|
29
|
+
plugins: import('vue').ShallowReactive<Map<string, Raw<PluginConfig>>>;
|
|
30
|
+
allSearchSource: import('vue').ComputedRef<[plugin: string, sources: [name: string, method: Search.SearchMethod][]][]>;
|
|
31
|
+
pluginSteps: Record<string, PluginLoadingMicroSteps>;
|
|
32
|
+
}, "allSearchSource">, Pick<{
|
|
33
|
+
$getPluginDisplayName: (key: string) => string;
|
|
34
|
+
plugins: import('vue').ShallowReactive<Map<string, Raw<PluginConfig>>>;
|
|
35
|
+
allSearchSource: import('vue').ComputedRef<[plugin: string, sources: [name: string, method: Search.SearchMethod][]][]>;
|
|
36
|
+
pluginSteps: Record<string, PluginLoadingMicroSteps>;
|
|
37
|
+
}, "$getPluginDisplayName">>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SourcedKeyMap } from '@delta-comic/model';
|
|
2
|
+
import { Component, Raw } from 'vue';
|
|
3
|
+
import { Search, Share, Subscribe, User } from './plugin';
|
|
4
|
+
declare class _Global {
|
|
5
|
+
share: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], Share.InitiativeItem>>>;
|
|
6
|
+
shareToken: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], Share.ShareToken>>>;
|
|
7
|
+
userActions: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], User.UserAction>>>;
|
|
8
|
+
subscribes: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], Subscribe.Config>>>;
|
|
9
|
+
globalNodes: import('vue').ShallowReactive<Raw<Component>[]>;
|
|
10
|
+
tabbar: import('vue').ShallowReactive<Map<string, Search.Tabbar[]>>;
|
|
11
|
+
addTabbar(plugin: string, ...tabbar: Search.Tabbar[]): void;
|
|
12
|
+
categories: import('vue').ShallowReactive<Map<string, Search.Category[]>>;
|
|
13
|
+
addCategories(plugin: string, ...categories: Search.Category[]): void;
|
|
14
|
+
barcode: import('vue').ShallowReactive<Map<string, Search.Barcode[]>>;
|
|
15
|
+
addBarcode(plugin: string, ...barcode: Search.Barcode[]): void;
|
|
16
|
+
levelboard: import('vue').ShallowReactive<Map<string, Search.HotLevelboard[]>>;
|
|
17
|
+
addLevelboard(plugin: string, ...levelboard: Search.HotLevelboard[]): void;
|
|
18
|
+
topButton: import('vue').ShallowReactive<Map<string, Search.HotTopButton[]>>;
|
|
19
|
+
addTopButton(plugin: string, ...topButton: Search.HotTopButton[]): void;
|
|
20
|
+
mainLists: import('vue').ShallowReactive<Map<string, Search.HotMainList[]>>;
|
|
21
|
+
addMainList(plugin: string, ...mainLists: Search.HotMainList[]): void;
|
|
22
|
+
}
|
|
23
|
+
export declare const Global: _Global;
|
|
24
|
+
export {};
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import type * as Auth from './auth';
|
|
|
17
17
|
export type * as Auth from './auth';
|
|
18
18
|
import type * as Resource from './resource';
|
|
19
19
|
export type * as Resource from './resource';
|
|
20
|
-
export interface
|
|
20
|
+
export interface PluginConfig {
|
|
21
21
|
name: string;
|
|
22
22
|
content?: Content.Config;
|
|
23
23
|
resource?: Resource.Content;
|
|
@@ -41,8 +41,8 @@ export interface DefineConfig {
|
|
|
41
41
|
export type DefineResult = {
|
|
42
42
|
api?: Record<string, string | undefined | false>;
|
|
43
43
|
};
|
|
44
|
-
export declare const definePlugin: <T extends
|
|
45
|
-
export type PluginExpose<T extends
|
|
44
|
+
export declare const definePlugin: <T extends PluginConfig>(config: T | ((safe: boolean) => T)) => Promise<T>;
|
|
45
|
+
export type PluginExpose<T extends () => Promise<PluginConfig>> = Awaited<ReturnType<NonNullable<Awaited<ReturnType<T>>['onBooted']>>>;
|
|
46
46
|
export interface RawPluginMeta {
|
|
47
47
|
'name:display': string;
|
|
48
48
|
'name:id': string;
|
package/dist/pack.tgz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delta-comic/plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "空阙虱楼",
|
|
5
5
|
"homepage": "https://github.com/delta-comic/delta-comic-core",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -30,20 +30,28 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@octokit/rest": "^22.0.1",
|
|
34
|
+
"@tauri-apps/api": "^2.10.1",
|
|
35
|
+
"@tauri-apps/plugin-fs": "^2.4.5",
|
|
33
36
|
"@vueuse/core": "^14.2.1",
|
|
37
|
+
"jszip": "^3.10.1",
|
|
38
|
+
"lz-string": "^1.5.0",
|
|
34
39
|
"mitt": "^3.0.1",
|
|
35
|
-
"
|
|
36
|
-
"@delta-comic/
|
|
37
|
-
"@delta-comic/
|
|
38
|
-
"@delta-comic/
|
|
40
|
+
"userscript-meta": "^1.0.1",
|
|
41
|
+
"@delta-comic/db": "0.0.1",
|
|
42
|
+
"@delta-comic/utils": "0.0.1",
|
|
43
|
+
"@delta-comic/ui": "0.0.1",
|
|
44
|
+
"@delta-comic/core": "0.0.1",
|
|
45
|
+
"@delta-comic/model": "0.0.1"
|
|
39
46
|
},
|
|
40
47
|
"peerDependencies": {
|
|
48
|
+
"axios": "^1.13",
|
|
49
|
+
"kysely": "^0.28",
|
|
41
50
|
"pinia": "^3.0",
|
|
42
51
|
"vue": "^3.5",
|
|
43
52
|
"vue-router": "^5.0"
|
|
44
53
|
},
|
|
45
54
|
"release": {
|
|
46
|
-
"extends": "../../release.config.js",
|
|
47
55
|
"tagFormat": "plugin-${version}"
|
|
48
56
|
},
|
|
49
57
|
"dist": {
|
|
@@ -51,6 +59,9 @@
|
|
|
51
59
|
},
|
|
52
60
|
"readme": "./README.md",
|
|
53
61
|
"scripts": {
|
|
54
|
-
"build": "vite build && pnpm pack --out ./dist/pack.tgz"
|
|
62
|
+
"build": "vite build && pnpm pack --out ./dist/pack.tgz",
|
|
63
|
+
"version:major": "pnpm version major --no-git-tag-version",
|
|
64
|
+
"version:minor": "pnpm version minor --no-git-tag-version",
|
|
65
|
+
"version:patch": "pnpm version patch --no-git-tag-version"
|
|
55
66
|
}
|
|
56
67
|
}
|