@koishijs/loader
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -1,52 +0,22 @@ | ||
import { Context, Dict, EnvData } from '@koishijs/core'; | ||
declare module '@koishijs/core' { | ||
interface Context { | ||
loader: Loader; | ||
} | ||
interface Events { | ||
'config'(): void; | ||
} | ||
namespace Context { | ||
interface Config { | ||
name?: string; | ||
plugins?: Dict; | ||
} | ||
} | ||
} | ||
declare module 'cordis' { | ||
interface EffectScope<C> { | ||
[Loader.kRecord]?: Dict<ForkScope<C>>; | ||
alias?: string; | ||
} | ||
} | ||
export declare function unwrapExports(module: any): any; | ||
export interface Modifier { | ||
$if?: boolean; | ||
$filter?: Selection; | ||
} | ||
export declare abstract class Loader { | ||
static readonly kRecord: unique symbol; | ||
static readonly exitCode = 51; | ||
envData: EnvData; | ||
ctxData: {}; | ||
app: Context; | ||
/// <reference types="node" /> | ||
import { Context } from '@koishijs/core'; | ||
import { Loader } from './shared'; | ||
import ns from 'ns-require'; | ||
export * from './shared'; | ||
export default class NodeLoader extends Loader { | ||
envData: any; | ||
baseDir: string; | ||
config: Context.Config; | ||
entry: Context; | ||
suspend: boolean; | ||
filename: string; | ||
writable: boolean; | ||
envfile: string; | ||
cache: Dict<string>; | ||
abstract readConfig(): Context.Config; | ||
abstract writeConfig(): void; | ||
abstract resolve(name: string): Promise<string>; | ||
abstract resolvePlugin(name: string): Promise<any>; | ||
abstract fullReload(): void; | ||
interpolate(source: any): any; | ||
private forkPlugin; | ||
isTruthyLike(expr: any): boolean; | ||
reloadPlugin(parent: Context, key: string, source: any): Promise<import("cordis").ForkScope<Context>>; | ||
unloadPlugin(ctx: Context, key: string): void; | ||
createApp(): Promise<Context>; | ||
extname: string; | ||
scope: ns.Scope; | ||
ctxData: { | ||
env: NodeJS.ProcessEnv; | ||
}; | ||
constructor(filename?: string); | ||
private checkWritable; | ||
private findConfig; | ||
readConfig(): Context.Config; | ||
writeConfig(): void; | ||
resolve(name: string): Promise<string>; | ||
resolvePlugin(name: string): Promise<any>; | ||
fullReload(code?: number): void; | ||
} |
{ | ||
"name": "@koishijs/loader", | ||
"description": "Config Loader for Koishi", | ||
"version": "2.6.0", | ||
"main": "lib/node.js", | ||
"module": "lib/index.mjs", | ||
"typings": "lib/node.d.ts", | ||
"version": "2.6.1", | ||
"main": "lib/index.js", | ||
"module": "lib/shared.mjs", | ||
"typings": "lib/index.d.ts", | ||
"files": [ | ||
@@ -9,0 +9,0 @@ "lib" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31634
412