*Don't bundle cfg types
This commit is contained in:
parent
b5b1a8bbb9
commit
c476a94b0e
|
@ -4,6 +4,7 @@
|
||||||
"main": "dist",
|
"main": "dist",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@lumeweb/cfg": "https://git.lumeweb.com/LumeWeb/cfg.git",
|
||||||
"@types/node": "^18.11.17",
|
"@types/node": "^18.11.17",
|
||||||
"express": "^4.18.1",
|
"express": "^4.18.1",
|
||||||
"node-cache": "^5.1.2",
|
"node-cache": "^5.1.2",
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
import type arg from "arg";
|
|
||||||
declare class Config {
|
|
||||||
private module;
|
|
||||||
private data;
|
|
||||||
constructor(module: string);
|
|
||||||
inject(options: object): void;
|
|
||||||
load(): void;
|
|
||||||
openDir(dir: string): void;
|
|
||||||
open(file: string): void;
|
|
||||||
save(file: string, data: object): void;
|
|
||||||
set(key: string, value: any): void;
|
|
||||||
has(key: string): any;
|
|
||||||
private normalize;
|
|
||||||
get(key: string, fallback?: any): any;
|
|
||||||
typeOf(
|
|
||||||
key: string
|
|
||||||
):
|
|
||||||
| "string"
|
|
||||||
| "number"
|
|
||||||
| "bigint"
|
|
||||||
| "boolean"
|
|
||||||
| "symbol"
|
|
||||||
| "undefined"
|
|
||||||
| "object"
|
|
||||||
| "function"
|
|
||||||
| "null";
|
|
||||||
str(key: string, fallback?: any): any;
|
|
||||||
int(key: any, fallback?: any): any;
|
|
||||||
uint(key: any, fallback?: any): any;
|
|
||||||
float(key: any, fallback?: any): any;
|
|
||||||
ufloat(key: any, fallback?: any): any;
|
|
||||||
fixed(key: any, exp: any, fallback?: any): any;
|
|
||||||
ufixed(key: any, exp: any, fallback?: any): any;
|
|
||||||
bool(key: any, fallback?: any): any;
|
|
||||||
buf(key: string, fallback?: any, enc?: BufferEncoding): any;
|
|
||||||
array(key: string, fallback?: any): any;
|
|
||||||
obj(key: string, fallback?: any): any;
|
|
||||||
func(key: string, fallback?: any): any;
|
|
||||||
mb(key: string, fallback?: any): any;
|
|
||||||
parseArg(args: arg.Result<any>): void;
|
|
||||||
parseEnv(env?: object): void;
|
|
||||||
}
|
|
||||||
export default Config;
|
|
|
@ -3,7 +3,7 @@ import { RPCMethod, RPCServer } from "./rpc.js";
|
||||||
import { Logger } from "pino";
|
import { Logger } from "pino";
|
||||||
import SSLManager from "./ssl.js";
|
import SSLManager from "./ssl.js";
|
||||||
import type { HDKey } from "micro-ed25519-hdkey";
|
import type { HDKey } from "micro-ed25519-hdkey";
|
||||||
import Config from "./config.js";
|
import type Config from "@lumeweb/cfg";
|
||||||
|
|
||||||
export type PluginFunction = (api: PluginAPI) => Promise<void>;
|
export type PluginFunction = (api: PluginAPI) => Promise<void>;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ export declare class PluginAPI extends EventEmitter2 {
|
||||||
});
|
});
|
||||||
get swarm(): any;
|
get swarm(): any;
|
||||||
get config(): Config;
|
get config(): Config;
|
||||||
|
get pluginConfig(): Config;
|
||||||
get logger(): Logger;
|
get logger(): Logger;
|
||||||
get rpcServer(): RPCServer;
|
get rpcServer(): RPCServer;
|
||||||
get seed(): Uint8Array;
|
get seed(): Uint8Array;
|
||||||
|
|
Loading…
Reference in New Issue