upgrade to cordis v3 (#733)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2024-03-07 01:32:58 +08:00
1 parent 498cd57016
commit a56b1650be
33 files changed
+301 -262

No files matched your search

+2 -3
View File
@@ -34,7 +34,6 @@ export function resolveConfig(plugin: any, config: any) {
if (schema && plugin['schema'] !== false) config = schema(config);
return config;
}
Context.service('loader');
const timeout = Symbol.for('loader.timeout');
const showLoadTime = argv.options.showLoadTime;
@@ -43,7 +42,7 @@ export class Loader {
static readonly Record = Symbol.for('loader.record');
public app: Context;
public config: Context.Config;
public config: {};
public suspend = false;
public cache: Record<string, string> = Object.create(null);
@@ -147,8 +146,8 @@ export function addScript(name: string, description: string) {
};
}
Context.service('loader');
const loader = new Loader();
app.provide('loader');
app.loader = loader;
loader.app = app;
app.state[Loader.Record] = Object.create(null);