@cenk1cenk2/oclif-common 6.3.29 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/base.command.d.ts +43 -0
- package/dist/commands/base.command.js +156 -0
- package/dist/commands/index.js +1 -0
- package/dist/constants/file.constants.d.ts +6 -0
- package/dist/constants/file.constants.js +8 -0
- package/dist/constants/help-groups.constants.d.ts +6 -0
- package/dist/constants/help-groups.constants.js +8 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/not-found.hook.d.ts +6 -0
- package/dist/hooks/not-found.hook.js +18 -0
- package/dist/hooks/update-notifier.hook.d.ts +6 -0
- package/dist/hooks/update-notifier.hook.js +11 -0
- package/dist/index.d.ts +51 -413
- package/dist/index.js +44 -1881
- package/dist/interfaces/class.interface.d.ts +4 -0
- package/dist/interfaces/hooks.interface.d.ts +16 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/oclif.interface.d.ts +9 -0
- package/dist/interfaces/oclif.interface.js +3 -0
- package/dist/interfaces/type-helper.interface.d.ts +7 -0
- package/dist/lib/cli.interface.d.ts +8 -0
- package/dist/lib/cli.module.d.ts +11 -0
- package/dist/lib/cli.module.js +57 -0
- package/dist/lib/config/config.constants.js +12 -0
- package/dist/lib/config/config.interface.d.ts +21 -0
- package/dist/lib/config/config.module.d.ts +4 -0
- package/dist/lib/config/config.module.js +15 -0
- package/dist/lib/config/config.service.d.ts +32 -0
- package/dist/lib/config/config.service.js +152 -0
- package/dist/lib/config/index.js +2 -0
- package/dist/lib/fs/filesystem.interface.d.ts +2 -0
- package/dist/lib/fs/filesystem.module.d.ts +4 -0
- package/dist/lib/fs/filesystem.module.js +13 -0
- package/dist/lib/fs/filesystem.service.d.ts +31 -0
- package/dist/lib/fs/filesystem.service.js +141 -0
- package/dist/lib/fs/index.js +2 -0
- package/dist/lib/index.js +32 -0
- package/dist/lib/locker/index.js +2 -0
- package/dist/lib/locker/locker.interface.d.ts +28 -0
- package/dist/lib/locker/locker.module.d.ts +9 -0
- package/dist/lib/locker/locker.module.js +33 -0
- package/dist/lib/locker/locker.service.d.ts +41 -0
- package/dist/lib/locker/locker.service.js +170 -0
- package/dist/lib/logger/index.js +6 -0
- package/dist/lib/logger/logger.constants.d.ts +21 -0
- package/dist/lib/logger/logger.constants.js +24 -0
- package/dist/lib/logger/logger.interface.d.ts +13 -0
- package/dist/lib/logger/logger.module.d.ts +4 -0
- package/dist/lib/logger/logger.module.js +17 -0
- package/dist/lib/logger/logger.service.d.ts +31 -0
- package/dist/lib/logger/logger.service.js +70 -0
- package/dist/lib/logger/pipe/pipe-process-to-listr.d.ts +7 -0
- package/dist/lib/logger/pipe/pipe-process-to-listr.js +9 -0
- package/dist/lib/logger/pipe/pipe-process-to-logger.d.ts +12 -0
- package/dist/lib/logger/pipe/pipe-process-to-logger.interface.d.ts +19 -0
- package/dist/lib/logger/pipe/pipe-process-to-logger.js +54 -0
- package/dist/lib/logger/winston.service.d.ts +15 -0
- package/dist/lib/logger/winston.service.js +91 -0
- package/dist/lib/logo/index.js +3 -0
- package/dist/lib/logo/logo.constants.d.ts +6 -0
- package/dist/lib/logo/logo.constants.js +5 -0
- package/dist/lib/logo/logo.interface.d.ts +6 -0
- package/dist/lib/logo/logo.module.d.ts +4 -0
- package/dist/lib/logo/logo.module.js +13 -0
- package/dist/lib/logo/logo.service.d.ts +17 -0
- package/dist/lib/logo/logo.service.js +42 -0
- package/dist/lib/parser/fts/env-parser.service.d.ts +16 -0
- package/dist/lib/parser/fts/env-parser.service.js +42 -0
- package/dist/lib/parser/fts/index.js +3 -0
- package/dist/lib/parser/fts/json-parser.service.d.ts +15 -0
- package/dist/lib/parser/fts/json-parser.service.js +32 -0
- package/dist/lib/parser/fts/yaml-parser.service.d.ts +15 -0
- package/dist/lib/parser/fts/yaml-parser.service.js +33 -0
- package/dist/lib/parser/index.js +6 -0
- package/dist/lib/parser/parser.interface.d.ts +8 -0
- package/dist/lib/parser/parser.module.d.ts +4 -0
- package/dist/lib/parser/parser.module.js +16 -0
- package/dist/lib/parser/parser.service.d.ts +29 -0
- package/dist/lib/parser/parser.service.js +76 -0
- package/dist/lib/setup.d.ts +4 -0
- package/dist/lib/setup.js +16 -0
- package/dist/lib/validator/index.js +3 -0
- package/dist/lib/validator/validator.constants.d.ts +6 -0
- package/dist/lib/validator/validator.constants.js +5 -0
- package/dist/lib/validator/validator.interface.d.ts +10 -0
- package/dist/lib/validator/validator.module.d.ts +4 -0
- package/dist/lib/validator/validator.module.js +13 -0
- package/dist/lib/validator/validator.service.d.ts +19 -0
- package/dist/lib/validator/validator.service.js +76 -0
- package/dist/utils/defaults.d.ts +12 -0
- package/dist/utils/defaults.js +16 -0
- package/dist/utils/environment.d.ts +8 -0
- package/dist/utils/environment.js +16 -0
- package/dist/utils/guards.d.ts +9 -0
- package/dist/utils/guards.js +13 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/merge.constants.d.ts +7 -0
- package/dist/utils/merge.constants.js +9 -0
- package/dist/utils/merge.d.ts +9 -0
- package/dist/utils/merge.js +15 -0
- package/package.json +31 -27
package/dist/index.d.ts
CHANGED
|
@@ -1,413 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
VERBOSE = "VERBOSE",
|
|
53
|
-
DEBUG = "DEBUG",
|
|
54
|
-
TRACE = "TRACE"
|
|
55
|
-
}
|
|
56
|
-
declare enum LogFieldStatus {
|
|
57
|
-
RUN = "run",
|
|
58
|
-
END = "end",
|
|
59
|
-
STAGE = "stage",
|
|
60
|
-
EXIT = "exit",
|
|
61
|
-
TERMINATE = "terminate"
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
interface PipeProcessToLoggerOptions {
|
|
65
|
-
/** Will log the command when the process starts. */
|
|
66
|
-
start?: LogLevels;
|
|
67
|
-
/** Will log the command when the process ends. */
|
|
68
|
-
end?: LogLevels;
|
|
69
|
-
/** enable/disable stdout */
|
|
70
|
-
stdout?: LogLevels;
|
|
71
|
-
/** enable/disable stderrr */
|
|
72
|
-
stderr?: LogLevels;
|
|
73
|
-
/** will callback on error in the instance */
|
|
74
|
-
callback?: (error?: Error) => void;
|
|
75
|
-
/** context for logger */
|
|
76
|
-
context?: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface LoggerFormat {
|
|
80
|
-
level: LogLevels;
|
|
81
|
-
message: string;
|
|
82
|
-
context: string;
|
|
83
|
-
status: string;
|
|
84
|
-
}
|
|
85
|
-
type Winston = Logger & Record<keyof typeof LogLevels, LeveledLogMethod>;
|
|
86
|
-
|
|
87
|
-
declare class WinstonService {
|
|
88
|
-
private readonly options;
|
|
89
|
-
readonly instance: Winston;
|
|
90
|
-
constructor(options: ConfigModuleOptions);
|
|
91
|
-
private initiateLogger;
|
|
92
|
-
private logColoring;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* A general logger for the the CLI applications.
|
|
97
|
-
*/
|
|
98
|
-
declare class LoggerService {
|
|
99
|
-
private readonly winston;
|
|
100
|
-
context: string;
|
|
101
|
-
constructor(winston: WinstonService);
|
|
102
|
-
setup(context: string): LoggerService;
|
|
103
|
-
log(level: LogLevels, data: string | Buffer, ...args: any): void;
|
|
104
|
-
direct(data: string | Buffer, ...args: any): void;
|
|
105
|
-
fatal(data: string | Buffer, ...args: any): void;
|
|
106
|
-
error(data: string | Buffer, ...args: any): void;
|
|
107
|
-
warn(data: string | Buffer, ...args: any): void;
|
|
108
|
-
info(data: string | Buffer, ...args: any): void;
|
|
109
|
-
verbose(data: string | Buffer, ...args: any): void;
|
|
110
|
-
debug(data: string | Buffer, ...args: any): void;
|
|
111
|
-
trace(data: string | Buffer, ...args: any): void;
|
|
112
|
-
run(data: string | Buffer, ...args: any): void;
|
|
113
|
-
end(data: string | Buffer, ...args: any): void;
|
|
114
|
-
stage(data: string | Buffer, ...args: any): void;
|
|
115
|
-
splat(...args: Parameters<typeof splat>): ReturnType<typeof splat>;
|
|
116
|
-
private parseMessage;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Given the instance it will pipe process output through the logger to append prefixes such as the application name.
|
|
121
|
-
*/
|
|
122
|
-
declare function pipeProcessToLogger(logger: LoggerService, instance: ChildProcess, options?: PipeProcessToLoggerOptions): ChildProcess;
|
|
123
|
-
|
|
124
|
-
declare class LoggerModule {
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
declare class EnvironmentVariableParser implements GenericParser {
|
|
128
|
-
private readonly logger;
|
|
129
|
-
readonly extensions: string[];
|
|
130
|
-
private readonly LINE;
|
|
131
|
-
constructor(logger: LoggerService);
|
|
132
|
-
parse<T = unknown>(data: string | Buffer): T;
|
|
133
|
-
stringify<T = any>(data: T): string;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
declare class JsonParser implements GenericParser {
|
|
137
|
-
private readonly logger;
|
|
138
|
-
readonly extensions: string[];
|
|
139
|
-
constructor(logger: LoggerService);
|
|
140
|
-
parse<T = unknown>(data: string | Buffer): T;
|
|
141
|
-
stringify<T = any>(data: T): string;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
declare class YamlParser implements GenericParser {
|
|
145
|
-
private readonly logger;
|
|
146
|
-
readonly extensions: string[];
|
|
147
|
-
constructor(logger: LoggerService);
|
|
148
|
-
parse<T = unknown>(data: string | Buffer): T;
|
|
149
|
-
stringify<T = any>(data: T): string;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
declare class ParserModule {
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
declare class FileSystemService {
|
|
156
|
-
private readonly logger;
|
|
157
|
-
readonly extra: typeof fs;
|
|
158
|
-
constructor(logger: LoggerService);
|
|
159
|
-
exists(path: string): boolean;
|
|
160
|
-
stats(path: string): fs.Stats;
|
|
161
|
-
dirname(path: string): string;
|
|
162
|
-
extname(path: string): string;
|
|
163
|
-
read(file: string): Promise<string>;
|
|
164
|
-
readSync(file: string): string;
|
|
165
|
-
write(file: string, data: string | Buffer, options?: fs.WriteFileOptions): Promise<void>;
|
|
166
|
-
writeSync(file: string, data: string | Buffer, options?: fs.WriteFileOptions): void;
|
|
167
|
-
append(file: string, data: string | Buffer, options?: fs.WriteFileOptions): Promise<void>;
|
|
168
|
-
appendSync(file: string, data: string | Buffer): void;
|
|
169
|
-
remove(file: string, options?: fs.RmOptions): Promise<void>;
|
|
170
|
-
removeSync(file: string, options?: fs.RmOptions): void;
|
|
171
|
-
emptyDir(directory: string): Promise<void>;
|
|
172
|
-
emptyDirSync(directory: string): void;
|
|
173
|
-
removeDir(directory: string): Promise<void>;
|
|
174
|
-
removeDirSync(directory: string): void;
|
|
175
|
-
mkdir(directory: string): Promise<void>;
|
|
176
|
-
mkdirSync(directory: string): void;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
declare class FilesystemModule {
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
declare class ParserService {
|
|
183
|
-
private moduleRef;
|
|
184
|
-
private fs;
|
|
185
|
-
private readonly logger;
|
|
186
|
-
private readonly instances;
|
|
187
|
-
constructor(moduleRef: ModuleRef, fs: FileSystemService, logger: LoggerService);
|
|
188
|
-
byFt(file: string): GenericParser;
|
|
189
|
-
fetch<T extends GenericParser>(Parser: ClassType<T>): T;
|
|
190
|
-
inject<T extends GenericParser>(Parser: ClassType<T>): Promise<T>;
|
|
191
|
-
register(...parsers: ClassType<GenericParser>[]): Promise<void>;
|
|
192
|
-
read<T = unknown>(file: string): Promise<T>;
|
|
193
|
-
write<T = LockableData>(file: string, data: T): Promise<void>;
|
|
194
|
-
parse<T = unknown>(file: string, data: string | Buffer): T;
|
|
195
|
-
parseWith<T = unknown>(Parser: ClassType<GenericParser>, data: string | Buffer): T;
|
|
196
|
-
stringify<T = any>(file: string, data: T): string;
|
|
197
|
-
stringifyWith<T = any>(Parser: ClassType<GenericParser>, data: T): string;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
type SetCtxDefaultsOptions<T extends ListrContext = ListrContext> = Partial<T>;
|
|
201
|
-
interface SetCtxAssignOptions<K = Record<PropertyKey, any>> {
|
|
202
|
-
from: K;
|
|
203
|
-
keys: (keyof K)[];
|
|
204
|
-
}
|
|
205
|
-
declare function setCtxDefaults<T extends ListrContext = ListrContext>(ctx: T, ...defaults: SetCtxDefaultsOptions<T>[]): void;
|
|
206
|
-
declare function setCtxAssign<T extends ListrContext = ListrContext, K = Record<PropertyKey, any>>(ctx: T, ...assigns: SetCtxAssignOptions<K>[]): void;
|
|
207
|
-
|
|
208
|
-
declare function isVerbose(logLevel: LogLevels): boolean;
|
|
209
|
-
declare function isDebug(logLevel: LogLevels): boolean;
|
|
210
|
-
declare function isSilent(logLevel: LogLevels): boolean;
|
|
211
|
-
|
|
212
|
-
declare function isHookedWithShouldRunBefore<T extends Command$1 = Command$1>(command: T): command is T & ShouldRunBeforeHook;
|
|
213
|
-
declare function isHookedWithShouldRunAfter<T extends Command$1 = Command$1>(command: T): command is T & ShouldRunAfterHook<any>;
|
|
214
|
-
declare function isHookedWithRegister<T extends Command$1 = Command$1>(command: T): command is T & RegisterHook;
|
|
215
|
-
|
|
216
|
-
declare enum MergeStrategy {
|
|
217
|
-
OVERWRITE = "OVERWRITE",
|
|
218
|
-
EXTEND = "EXTEND"
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/** Merge objects deep from overwriting the properties from source to target.
|
|
222
|
-
* Does not mutate the object */
|
|
223
|
-
declare function merge<T extends Record<PropertyKey, any> | any[]>(strategy: MergeStrategy, ...source: Partial<T>[]): T;
|
|
224
|
-
declare function uniqueArrayFilter(value: any, index: any, self: string | any[]): boolean;
|
|
225
|
-
|
|
226
|
-
interface CommonLockerData {
|
|
227
|
-
path?: string | string[];
|
|
228
|
-
enabled?: boolean;
|
|
229
|
-
root?: boolean;
|
|
230
|
-
}
|
|
231
|
-
type LockableData = any;
|
|
232
|
-
interface LockData<T extends LockableData = LockableData> extends Partial<CommonLockerData> {
|
|
233
|
-
data: T;
|
|
234
|
-
merge?: MergeStrategy;
|
|
235
|
-
}
|
|
236
|
-
interface UnlockData extends CommonLockerData {
|
|
237
|
-
path: string | string[];
|
|
238
|
-
}
|
|
239
|
-
interface LockerServiceOptions {
|
|
240
|
-
file: string;
|
|
241
|
-
parser: ClassType<GenericParser>;
|
|
242
|
-
root?: string[];
|
|
243
|
-
context?: string;
|
|
244
|
-
token?: InjectionToken;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
declare class LockerService<LockFile extends LockableData = LockableData> {
|
|
248
|
-
private readonly logger;
|
|
249
|
-
private readonly fs;
|
|
250
|
-
private readonly parser;
|
|
251
|
-
private readonly options;
|
|
252
|
-
readonly op: typeof op;
|
|
253
|
-
private toLock;
|
|
254
|
-
private toUnlock;
|
|
255
|
-
constructor(logger: LoggerService, fs: FileSystemService, parser: ParserService, options: LockerServiceOptions);
|
|
256
|
-
hasLock(): boolean;
|
|
257
|
-
hasUnlock(): boolean;
|
|
258
|
-
addLock<T extends LockableData = LockFile>(...data: LockData<T>[]): void;
|
|
259
|
-
addUnlock(...data: UnlockData[]): void;
|
|
260
|
-
applyLockAll(lock: LockFile): Promise<LockFile>;
|
|
261
|
-
lockAll(): Promise<void>;
|
|
262
|
-
applyUnlockAll(lock: LockFile): Promise<LockFile>;
|
|
263
|
-
unlockAll(): Promise<void>;
|
|
264
|
-
all(): Promise<void>;
|
|
265
|
-
applyAll(lock: LockFile): Promise<LockFile>;
|
|
266
|
-
applyLock<T extends LockableData = LockFile>(lock: LockFile, ...data: LockData<T>[]): Promise<LockFile>;
|
|
267
|
-
lock<T extends LockableData = LockFile>(...data: LockData<T>[]): Promise<LockFile>;
|
|
268
|
-
applyUnlock(lock: LockFile, ...data: UnlockData[]): Promise<LockFile>;
|
|
269
|
-
unlock(...data: UnlockData[]): Promise<LockFile | undefined>;
|
|
270
|
-
read(): Promise<LockFile>;
|
|
271
|
-
tryRead(): Promise<LockFile | undefined>;
|
|
272
|
-
tryRemove(): Promise<void>;
|
|
273
|
-
write(data: LockFile): Promise<void>;
|
|
274
|
-
private buildPath;
|
|
275
|
-
private normalizePath;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
declare class LockerModule {
|
|
279
|
-
static forFeature(options: LockerServiceOptions): DynamicModule;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
declare class ConfigService {
|
|
283
|
-
private readonly parser;
|
|
284
|
-
private readonly logger;
|
|
285
|
-
defaults: string;
|
|
286
|
-
root: string;
|
|
287
|
-
config: GlobalConfig;
|
|
288
|
-
oclif: Config;
|
|
289
|
-
command: typeof Command$1;
|
|
290
|
-
constructor(parser: ParserService, logger: LoggerService, options: ConfigModuleOptions);
|
|
291
|
-
get isVerbose(): boolean;
|
|
292
|
-
get isDebug(): boolean;
|
|
293
|
-
get isSilent(): boolean;
|
|
294
|
-
get isJson(): boolean;
|
|
295
|
-
read<T extends LockableData = LockableData>(path: string): Promise<T>;
|
|
296
|
-
extend<T extends LockableData = LockableData>(paths: (string | Partial<T>)[], strategy?: MergeStrategy): Promise<T>;
|
|
297
|
-
merge<T extends LockableData = LockableData>(configs: Partial<T>[], strategy?: MergeStrategy): T;
|
|
298
|
-
env<T extends LockableData = LockableData>(definition: string | Record<PropertyKey, any>, config: T): Promise<T>;
|
|
299
|
-
write<T extends LockableData = LockableData>(path: string, data: T): Promise<void>;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
declare class ConfigModule {
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
declare const TOKEN_LOGO_GENERATOR: InjectionToken;
|
|
306
|
-
|
|
307
|
-
declare class LogoService {
|
|
308
|
-
readonly cs: ConfigService;
|
|
309
|
-
private generator;
|
|
310
|
-
constructor(cs: ConfigService, moduleRef: ModuleRef);
|
|
311
|
-
generate(): void;
|
|
312
|
-
shouldBeSilent(): boolean;
|
|
313
|
-
write(...data: string[]): void;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
type LogoGeneratorFn = (this: LogoService) => void;
|
|
317
|
-
|
|
318
|
-
declare class LogoModule {
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
declare const TOKEN_VALIDATOR_SERVICE_OPTIONS: InjectionToken;
|
|
322
|
-
|
|
323
|
-
interface ValidatorServiceOptions {
|
|
324
|
-
validator?: ValidatorOptions;
|
|
325
|
-
transformer?: ClassTransformOptions;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
declare class ValidatorModule {
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
declare class ValidatorService {
|
|
332
|
-
private readonly logger;
|
|
333
|
-
private options;
|
|
334
|
-
constructor(logger: LoggerService, moduleRef: ModuleRef);
|
|
335
|
-
validate<T extends Record<PropertyKey, any>>(classType: ClassType<T>, object: T, options?: ValidatorServiceOptions): Promise<T>;
|
|
336
|
-
validateSync<T extends Record<PropertyKey, any>>(classType: ClassType<T>, object: T, options?: ValidatorServiceOptions): T;
|
|
337
|
-
private logValidationError;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
declare function setup(): Promise<void>;
|
|
341
|
-
|
|
342
|
-
interface CliModuleOptions {
|
|
343
|
-
config: ConfigModuleOptions;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
declare class CliModule {
|
|
347
|
-
static forRoot(options: CliModuleOptions): DynamicModule;
|
|
348
|
-
static forMinimum(): DynamicModule;
|
|
349
|
-
static create(cls: DynamicModule): Promise<INestApplicationContext>;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
declare class ShouldRunBeforeHook {
|
|
353
|
-
shouldRunBefore(): void | Promise<void>;
|
|
354
|
-
}
|
|
355
|
-
declare class ShouldRunAfterHook<Ctx extends ListrContext = ListrContext> {
|
|
356
|
-
shouldRunAfter(ctx: Ctx): void | Promise<void>;
|
|
357
|
-
}
|
|
358
|
-
declare class RegisterHook {
|
|
359
|
-
register(cli: DynamicModule, options: CliModuleOptions): DynamicModule | Promise<DynamicModule>;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
type InferFlags<T extends typeof Command$1> = Interfaces.InferredFlags<(typeof Command$1)['baseFlags'] & T['flags']>;
|
|
363
|
-
type InferArgs<T extends typeof Command$1> = Interfaces.InferredArgs<T['args']>;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Makes the object deep partial.
|
|
367
|
-
*/
|
|
368
|
-
type DeepPartial<T> = {
|
|
369
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
declare abstract class Command<T extends typeof Command$1 = typeof Command$1, Ctx extends ListrContext = ListrContext> extends Command$1 {
|
|
373
|
-
static baseFlags: {
|
|
374
|
-
"log-level": _oclif_core_lib_interfaces.OptionFlag<string, _oclif_core_lib_interfaces.CustomOptions>;
|
|
375
|
-
ci: _oclif_core_lib_interfaces.BooleanFlag<boolean>;
|
|
376
|
-
json: _oclif_core_lib_interfaces.BooleanFlag<boolean>;
|
|
377
|
-
};
|
|
378
|
-
logger: LoggerService;
|
|
379
|
-
tasks: Manager<Ctx>;
|
|
380
|
-
app: INestApplicationContext;
|
|
381
|
-
flags: InferFlags<T>;
|
|
382
|
-
args: InferArgs<T>;
|
|
383
|
-
exit(code?: number): never;
|
|
384
|
-
/** Run all tasks from task manager. */
|
|
385
|
-
runTasks<C extends Ctx = Ctx>(): Promise<C>;
|
|
386
|
-
protected setCtxDefaults<T extends Ctx = Ctx>(...defaults: SetCtxDefaultsOptions<T>[]): void;
|
|
387
|
-
protected setCtxAssign<K = Record<PropertyKey, any>>(...assigns: SetCtxAssignOptions<K>[]): void;
|
|
388
|
-
protected pipeProcessToLogger(instance: ChildProcess, options?: PipeProcessToLoggerOptions): ChildProcess;
|
|
389
|
-
protected pipeProcessThroughListr(instance: ChildProcess, task: ListrTaskWrapper<any, any, any>): ChildProcess;
|
|
390
|
-
/** Initial functions / constructor */
|
|
391
|
-
protected init(): Promise<void>;
|
|
392
|
-
/** Tasks to run before end of the command. */
|
|
393
|
-
protected finally<C extends Ctx = Ctx>(err: Error | undefined): Promise<{
|
|
394
|
-
ctx: C;
|
|
395
|
-
}>;
|
|
396
|
-
/** Catch any error occurred during command. */
|
|
397
|
-
protected catch(err: Error): Promise<never>;
|
|
398
|
-
abstract run(): Promise<any>;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
declare enum FileConstants {
|
|
402
|
-
CONFIG_SERVICE_DEFAULTS_DIR = "config"
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
declare enum HelpGroups {
|
|
406
|
-
CLI = "CLI"
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
declare const notFoundHook: Hook<'command_not_found'>;
|
|
410
|
-
|
|
411
|
-
declare const updateNotifierHook: Hook<'init'>;
|
|
412
|
-
|
|
413
|
-
export { type ClassType, CliModule, type CliModuleOptions, Command, type CommonLockerData, type ConfigIterator, ConfigModule, type ConfigModuleOptions, ConfigService, type DeepPartial, EnvironmentVariableParser, FileConstants, FileSystemService, FilesystemModule, GenericParser, type GlobalConfig, HelpGroups, type InferArgs, type InferFlags, JsonParser, type LockData, type LockableData, LockerModule, LockerService, type LockerServiceOptions, LogFieldStatus, LogLevels, type LoggerFormat, LoggerModule, LoggerService, type LogoGeneratorFn, LogoModule, LogoService, MergeStrategy, ParserModule, ParserService, type PipeProcessToLoggerOptions, RegisterHook, type SetCtxAssignOptions, type SetCtxDefaultsOptions, ShouldRunAfterHook, ShouldRunBeforeHook, TOKEN_LOGO_GENERATOR, TOKEN_VALIDATOR_SERVICE_OPTIONS, type UnlockData, ValidatorModule, ValidatorService, type ValidatorServiceOptions, type Winston, WinstonService, YamlParser, isDebug, isHookedWithRegister, isHookedWithShouldRunAfter, isHookedWithShouldRunBefore, isSilent, isVerbose, merge, notFoundHook, pipeProcessThroughListr, pipeProcessToLogger, setCtxAssign, setCtxDefaults, setup, uniqueArrayFilter, updateNotifierHook };
|
|
1
|
+
import { ClassType } from "./interfaces/class.interface.js";
|
|
2
|
+
import { ConfigIterator, ConfigModuleOptions, GlobalConfig } from "./lib/config/config.interface.js";
|
|
3
|
+
import { GenericParser } from "./lib/parser/parser.interface.js";
|
|
4
|
+
import { pipeProcessThroughListr } from "./lib/logger/pipe/pipe-process-to-listr.js";
|
|
5
|
+
import { LogFieldStatus, LogLevels } from "./lib/logger/logger.constants.js";
|
|
6
|
+
import { PipeProcessToLoggerOptions } from "./lib/logger/pipe/pipe-process-to-logger.interface.js";
|
|
7
|
+
import { LoggerFormat, Winston } from "./lib/logger/logger.interface.js";
|
|
8
|
+
import { WinstonService } from "./lib/logger/winston.service.js";
|
|
9
|
+
import { LoggerService } from "./lib/logger/logger.service.js";
|
|
10
|
+
import { pipeProcessToLogger } from "./lib/logger/pipe/pipe-process-to-logger.js";
|
|
11
|
+
import { LoggerModule } from "./lib/logger/logger.module.js";
|
|
12
|
+
import { EnvironmentVariableParser } from "./lib/parser/fts/env-parser.service.js";
|
|
13
|
+
import { JsonParser } from "./lib/parser/fts/json-parser.service.js";
|
|
14
|
+
import { YamlParser } from "./lib/parser/fts/yaml-parser.service.js";
|
|
15
|
+
import { ParserModule } from "./lib/parser/parser.module.js";
|
|
16
|
+
import { fs } from "./lib/fs/filesystem.interface.js";
|
|
17
|
+
import { FileSystemService } from "./lib/fs/filesystem.service.js";
|
|
18
|
+
import { FilesystemModule } from "./lib/fs/filesystem.module.js";
|
|
19
|
+
import { ParserService } from "./lib/parser/parser.service.js";
|
|
20
|
+
import { SetCtxAssignOptions, SetCtxDefaultsOptions, setCtxAssign, setCtxDefaults } from "./utils/defaults.js";
|
|
21
|
+
import { isDebug, isSilent, isVerbose } from "./utils/environment.js";
|
|
22
|
+
import { isHookedWithRegister, isHookedWithShouldRunAfter, isHookedWithShouldRunBefore } from "./utils/guards.js";
|
|
23
|
+
import { MergeStrategy } from "./utils/merge.constants.js";
|
|
24
|
+
import { merge, uniqueArrayFilter } from "./utils/merge.js";
|
|
25
|
+
import { ux } from "./utils/index.js";
|
|
26
|
+
import { CommonLockerData, LockData, LockableData, LockerServiceOptions, UnlockData } from "./lib/locker/locker.interface.js";
|
|
27
|
+
import { LockerService } from "./lib/locker/locker.service.js";
|
|
28
|
+
import { LockerModule } from "./lib/locker/locker.module.js";
|
|
29
|
+
import { ConfigService } from "./lib/config/config.service.js";
|
|
30
|
+
import { ConfigModule } from "./lib/config/config.module.js";
|
|
31
|
+
import { TOKEN_LOGO_GENERATOR } from "./lib/logo/logo.constants.js";
|
|
32
|
+
import { LogoService } from "./lib/logo/logo.service.js";
|
|
33
|
+
import { LogoGeneratorFn } from "./lib/logo/logo.interface.js";
|
|
34
|
+
import { LogoModule } from "./lib/logo/logo.module.js";
|
|
35
|
+
import { TOKEN_VALIDATOR_SERVICE_OPTIONS } from "./lib/validator/validator.constants.js";
|
|
36
|
+
import { ValidatorServiceOptions } from "./lib/validator/validator.interface.js";
|
|
37
|
+
import { ValidatorModule } from "./lib/validator/validator.module.js";
|
|
38
|
+
import { ValidatorService } from "./lib/validator/validator.service.js";
|
|
39
|
+
import { setup } from "./lib/setup.js";
|
|
40
|
+
import { CliModuleOptions } from "./lib/cli.interface.js";
|
|
41
|
+
import { CliModule } from "./lib/cli.module.js";
|
|
42
|
+
import { RegisterHook, ShouldRunAfterHook, ShouldRunBeforeHook } from "./interfaces/hooks.interface.js";
|
|
43
|
+
import { Arg, ArgInput, Args, Flag, FlagInput, Flags, InferArgs, InferFlags, InferredFlags } from "./interfaces/oclif.interface.js";
|
|
44
|
+
import { DeepPartial } from "./interfaces/type-helper.interface.js";
|
|
45
|
+
import { Command } from "./commands/base.command.js";
|
|
46
|
+
import { FileConstants } from "./constants/file.constants.js";
|
|
47
|
+
import { HelpGroups } from "./constants/help-groups.constants.js";
|
|
48
|
+
import { notFoundHook } from "./hooks/not-found.hook.js";
|
|
49
|
+
import { updateNotifierHook } from "./hooks/update-notifier.hook.js";
|
|
50
|
+
import { DynamicModule, Inject } from "@nestjs/common";
|
|
51
|
+
export { Arg, ArgInput, Args, ClassType, CliModule, CliModuleOptions, Command, CommonLockerData, ConfigIterator, ConfigModule, ConfigModuleOptions, ConfigService, DeepPartial, type DynamicModule, EnvironmentVariableParser, FileConstants, FileSystemService, FilesystemModule, Flag, FlagInput, Flags, GenericParser, GlobalConfig, HelpGroups, InferArgs, InferFlags, InferredFlags, Inject, JsonParser, LockData, LockableData, LockerModule, LockerService, LockerServiceOptions, LogFieldStatus, LogLevels, LoggerFormat, LoggerModule, LoggerService, LogoGeneratorFn, LogoModule, LogoService, MergeStrategy, ParserModule, ParserService, PipeProcessToLoggerOptions, RegisterHook, SetCtxAssignOptions, SetCtxDefaultsOptions, ShouldRunAfterHook, ShouldRunBeforeHook, TOKEN_LOGO_GENERATOR, TOKEN_VALIDATOR_SERVICE_OPTIONS, UnlockData, ValidatorModule, ValidatorService, ValidatorServiceOptions, Winston, WinstonService, YamlParser, fs, isDebug, isHookedWithRegister, isHookedWithShouldRunAfter, isHookedWithShouldRunBefore, isSilent, isVerbose, merge, notFoundHook, pipeProcessThroughListr, pipeProcessToLogger, setCtxAssign, setCtxDefaults, setup, uniqueArrayFilter, updateNotifierHook, ux };
|