*Don't bundle cfg types

This commit is contained in:
Derrick Hammer 2022-12-21 15:18:48 -05:00
parent b5b1a8bbb9
commit c476a94b0e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 3 additions and 44 deletions

View File

@ -4,6 +4,7 @@
"main": "dist",
"type": "module",
"devDependencies": {
"@lumeweb/cfg": "https://git.lumeweb.com/LumeWeb/cfg.git",
"@types/node": "^18.11.17",
"express": "^4.18.1",
"node-cache": "^5.1.2",

View File

@ -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;

View File

@ -3,7 +3,7 @@ import { RPCMethod, RPCServer } from "./rpc.js";
import { Logger } from "pino";
import SSLManager from "./ssl.js";
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>;
@ -28,6 +28,7 @@ export declare class PluginAPI extends EventEmitter2 {
});
get swarm(): any;
get config(): Config;
get pluginConfig(): Config;
get logger(): Logger;
get rpcServer(): RPCServer;
get seed(): Uint8Array;