@cenk1cenk2/oclif-common 6.3.29 → 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/chunk-DzC9Nte8.js +31 -0
- package/dist/index.d.ts +361 -324
- package/dist/index.js +1278 -1796
- package/dist/source-map-support-CuBekda-.js +2435 -0
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,413 +1,450 @@
|
|
|
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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
23
|
-
|
|
22
|
+
logLevel: LogLevels;
|
|
23
|
+
isJson: boolean;
|
|
24
24
|
}
|
|
25
25
|
interface ConfigIterator {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
key: (string | number)[];
|
|
27
|
+
env: string;
|
|
28
|
+
parser?: string;
|
|
29
|
+
extensions?: ConfigIterator[];
|
|
30
30
|
}
|
|
31
31
|
interface ConfigModuleOptions {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
203
|
-
|
|
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
|
-
|
|
218
|
-
|
|
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
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
-
|
|
234
|
-
|
|
252
|
+
data: T;
|
|
253
|
+
merge?: MergeStrategy;
|
|
235
254
|
}
|
|
236
255
|
interface UnlockData extends CommonLockerData {
|
|
237
|
-
|
|
256
|
+
path: string | string[];
|
|
238
257
|
}
|
|
239
258
|
interface LockerServiceOptions {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
|
|
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
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
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
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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
|
-
|
|
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
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
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
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
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
|
-
|
|
373
|
+
config: ConfigModuleOptions;
|
|
344
374
|
}
|
|
345
|
-
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/lib/cli.module.d.ts
|
|
346
377
|
declare class CliModule {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
-
|
|
385
|
+
shouldRunBefore(): void | Promise<void>;
|
|
354
386
|
}
|
|
355
387
|
declare class ShouldRunAfterHook<Ctx extends ListrContext = ListrContext> {
|
|
356
|
-
|
|
388
|
+
shouldRunAfter(ctx: Ctx): void | Promise<void>;
|
|
357
389
|
}
|
|
358
390
|
declare class RegisterHook {
|
|
359
|
-
|
|
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
|
-
|
|
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
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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 };
|