@cenk1cenk2/oclif-common 6.3.28 → 6.3.30

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