mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: update cordis to 2.6.0
This commit is contained in:
1 parent
afe40ec835
commit
9219bbfc24
7 files changed
+19
-19
No files matched your search
@@ -12,16 +12,16 @@
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.212.0",
|
||||
"@aws-sdk/lib-storage": "^3.212.0",
|
||||
"@aws-sdk/middleware-endpoint": "^3.212.0",
|
||||
"@aws-sdk/s3-presigned-post": "^3.212.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.212.0",
|
||||
"@aws-sdk/client-s3": "^3.215.0",
|
||||
"@aws-sdk/lib-storage": "^3.215.0",
|
||||
"@aws-sdk/middleware-endpoint": "^3.215.0",
|
||||
"@aws-sdk/s3-presigned-post": "^3.215.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.215.0",
|
||||
"@graphql-tools/schema": "^9.0.10",
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"adm-zip": "0.5.5",
|
||||
"cac": "^6.7.14",
|
||||
"cordis": "^2.5.0",
|
||||
"cordis": "^2.6.0",
|
||||
"detect-browser": "^5.3.0",
|
||||
"emoji-regex": "^10.2.1",
|
||||
"emojis-list": "2.1.0",
|
||||
|
||||
@@ -45,9 +45,9 @@ export namespace Context {
|
||||
export interface Config extends cordis.Context.Config { }
|
||||
}
|
||||
|
||||
export type Runtime = cordis.Runtime<Context>;
|
||||
export type State = cordis.State<Context>;
|
||||
export type Fork = cordis.Fork<Context>;
|
||||
export type MainScope = cordis.MainScope<Context>;
|
||||
export type EffectScope = cordis.EffectScope<Context>;
|
||||
export type ForkScope = cordis.ForkScope<Context>;
|
||||
export type Plugin = cordis.Plugin<Context>;
|
||||
export const Service = cordis.Service<Context>;
|
||||
export namespace Plugin {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { relative, resolve } from 'path';
|
||||
import { FSWatcher, watch } from 'chokidar';
|
||||
import { debounce } from 'lodash';
|
||||
import { Context, Runtime, Service } from '../context';
|
||||
import { Context, MainScope, Service } from '../context';
|
||||
import { Logger } from '../logger';
|
||||
import { unwrapExports } from '../utils';
|
||||
|
||||
@@ -142,10 +142,10 @@ export default class Watcher extends Service {
|
||||
this.analyzeChanges();
|
||||
|
||||
/** plugins pending classification */
|
||||
const pending = new Map<string, Runtime>();
|
||||
const pending = new Map<string, MainScope>();
|
||||
|
||||
/** plugins that should be reloaded */
|
||||
const reloads = new Map<Runtime, string>();
|
||||
const reloads = new Map<MainScope, string>();
|
||||
|
||||
// we assume that plugin entry files are "atomic"
|
||||
// that is, reloading them will not cause any other reloads
|
||||
@@ -172,7 +172,7 @@ export default class Watcher extends Service {
|
||||
|
||||
// prepare for reload
|
||||
let isMarked = false;
|
||||
const visited = new Set<Runtime>();
|
||||
const visited = new Set<MainScope>();
|
||||
const queued = [runtime];
|
||||
while (queued.length) {
|
||||
const runtime = queued.shift();
|
||||
|
||||
Reference in new issue
Block a user