@qlover/scripts-context 0.0.7 → 0.0.11
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.cjs +4897 -0
- package/dist/{cjs/index.d.ts → index.d.ts} +9 -1
- package/dist/index.js +4890 -0
- package/package.json +17 -15
- package/dist/cjs/index.js +0 -1
- package/dist/es/index.d.ts +0 -537
- package/dist/es/index.js +0 -1
package/dist/es/index.d.ts
DELETED
|
@@ -1,537 +0,0 @@
|
|
|
1
|
-
import * as _commitlint_types from '@commitlint/types';
|
|
2
|
-
import { Logger } from '@qlover/fe-utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Configuration search options interface
|
|
6
|
-
* @interface
|
|
7
|
-
* @description
|
|
8
|
-
* Significance: Defines the configuration structure for ConfigSearch initialization
|
|
9
|
-
* Core idea: Centralize configuration search parameters
|
|
10
|
-
* Main function: Type-safe configuration options
|
|
11
|
-
* Main purpose: Standardize configuration initialization
|
|
12
|
-
* Example:
|
|
13
|
-
* ```typescript
|
|
14
|
-
* const options: ConfigSearchOptions = {
|
|
15
|
-
* name: 'myapp',
|
|
16
|
-
* searchPlaces: ['myapp.config.js'],
|
|
17
|
-
* defaultConfig: { port: 3000 }
|
|
18
|
-
* };
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
interface ConfigSearchOptions {
|
|
22
|
-
/** Base name for configuration files */
|
|
23
|
-
name: string;
|
|
24
|
-
/** Custom search locations for config files */
|
|
25
|
-
searchPlaces?: string[];
|
|
26
|
-
/** Default configuration object */
|
|
27
|
-
defaultConfig?: Record<string, unknown>;
|
|
28
|
-
/** Custom loaders for different file types */
|
|
29
|
-
loaders?: Record<string, (filepath: string) => unknown>;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Search options interface for configuration retrieval
|
|
33
|
-
* @interface
|
|
34
|
-
* @description
|
|
35
|
-
* Significance: Defines options for configuration search operation
|
|
36
|
-
* Core idea: Control configuration file search behavior
|
|
37
|
-
* Main function: Customize search parameters
|
|
38
|
-
* Main purpose: Flexible configuration loading
|
|
39
|
-
* Example:
|
|
40
|
-
* ```typescript
|
|
41
|
-
* const searchOptions: SearchOptions = {
|
|
42
|
-
* file: 'custom.config.js',
|
|
43
|
-
* dir: '/path/to/project'
|
|
44
|
-
* };
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
interface SearchOptions {
|
|
48
|
-
/** Specific configuration file to load */
|
|
49
|
-
file?: string | false;
|
|
50
|
-
/** Directory to search in */
|
|
51
|
-
dir?: string;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Configuration search utility class
|
|
55
|
-
* @class
|
|
56
|
-
* @description
|
|
57
|
-
* Significance: Manages configuration file discovery and loading
|
|
58
|
-
* Core idea: Unified configuration management
|
|
59
|
-
* Main function: Search and load configuration from various sources
|
|
60
|
-
* Main purpose: Provide consistent configuration access
|
|
61
|
-
* Example:
|
|
62
|
-
* ```typescript
|
|
63
|
-
* const configSearch = new ConfigSearch({
|
|
64
|
-
* name: 'myapp',
|
|
65
|
-
* defaultConfig: { port: 3000 }
|
|
66
|
-
* });
|
|
67
|
-
* const config = configSearch.config;
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
declare class ConfigSearch {
|
|
71
|
-
private name;
|
|
72
|
-
private searchPlaces;
|
|
73
|
-
private _config;
|
|
74
|
-
private loaders?;
|
|
75
|
-
private searchCache?;
|
|
76
|
-
/**
|
|
77
|
-
* Creates a ConfigSearch instance
|
|
78
|
-
* @param options - Configuration search options
|
|
79
|
-
* @throws Error if neither name nor searchPlaces is provided
|
|
80
|
-
* @description
|
|
81
|
-
* Significance: Initializes configuration search environment
|
|
82
|
-
* Core idea: Setup configuration search parameters
|
|
83
|
-
* Main function: Create search instance with options
|
|
84
|
-
* Main purpose: Prepare for configuration discovery
|
|
85
|
-
* Example:
|
|
86
|
-
* ```typescript
|
|
87
|
-
* const search = new ConfigSearch({
|
|
88
|
-
* name: 'myapp',
|
|
89
|
-
* defaultConfig: { debug: true }
|
|
90
|
-
* });
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
constructor(options: ConfigSearchOptions);
|
|
94
|
-
/**
|
|
95
|
-
* Get effective configuration
|
|
96
|
-
* @returns Merged configuration object
|
|
97
|
-
* @description
|
|
98
|
-
* Significance: Provides access to final configuration
|
|
99
|
-
* Core idea: Merge default and discovered configurations
|
|
100
|
-
* Main function: Retrieve effective configuration
|
|
101
|
-
* Main purpose: Access complete configuration
|
|
102
|
-
* Example:
|
|
103
|
-
* ```typescript
|
|
104
|
-
* const config = configSearch.config;
|
|
105
|
-
* console.log(config.debug); // true
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
get config(): Record<string, unknown>;
|
|
109
|
-
/**
|
|
110
|
-
* Get search locations
|
|
111
|
-
* @returns Array of search locations
|
|
112
|
-
* @description
|
|
113
|
-
* Significance: Exposes configuration search paths
|
|
114
|
-
* Core idea: Provide transparency in search process
|
|
115
|
-
* Main function: Return search locations
|
|
116
|
-
* Main purpose: Debug and verify search paths
|
|
117
|
-
* Example:
|
|
118
|
-
* ```typescript
|
|
119
|
-
* const places = configSearch.getSearchPlaces();
|
|
120
|
-
* // ['package.json', 'myapp.config.js', ...]
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
getSearchPlaces(): string[];
|
|
124
|
-
/**
|
|
125
|
-
* Get configuration from specific location
|
|
126
|
-
* @param options - Search options
|
|
127
|
-
* @returns Configuration object
|
|
128
|
-
* @throws Error if configuration file is invalid
|
|
129
|
-
* @description
|
|
130
|
-
* Significance: Load configuration from specific location
|
|
131
|
-
* Core idea: Flexible configuration loading
|
|
132
|
-
* Main function: Load and validate configuration
|
|
133
|
-
* Main purpose: Custom configuration loading
|
|
134
|
-
* Example:
|
|
135
|
-
* ```typescript
|
|
136
|
-
* const config = configSearch.get({
|
|
137
|
-
* file: 'custom.config.js',
|
|
138
|
-
* dir: process.cwd()
|
|
139
|
-
* });
|
|
140
|
-
* ```
|
|
141
|
-
*/
|
|
142
|
-
get(options?: SearchOptions): Record<string, unknown>;
|
|
143
|
-
/**
|
|
144
|
-
* Search for configuration with caching
|
|
145
|
-
* @returns Cached configuration object
|
|
146
|
-
* @description
|
|
147
|
-
* Significance: Provides cached configuration access
|
|
148
|
-
* Core idea: Cache configuration for performance
|
|
149
|
-
* Main function: Search and cache configuration
|
|
150
|
-
* Main purpose: Optimize repeated access
|
|
151
|
-
* Example:
|
|
152
|
-
* ```typescript
|
|
153
|
-
* const config = configSearch.search();
|
|
154
|
-
* // Subsequent calls use cached result
|
|
155
|
-
* ```
|
|
156
|
-
*/
|
|
157
|
-
search(): Record<string, unknown>;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
declare const defaultFeConfig: FeConfig;
|
|
161
|
-
type FeConfig = {
|
|
162
|
-
/**
|
|
163
|
-
* Run `fe-clean-branch` to exclude branches
|
|
164
|
-
*
|
|
165
|
-
* @default ["master", "develop", "main"]
|
|
166
|
-
*/
|
|
167
|
-
protectedBranches?: string[];
|
|
168
|
-
/**
|
|
169
|
-
* Run `fe-clean` to includes files
|
|
170
|
-
*
|
|
171
|
-
* @default ["dist","node_modules","yarn.lock","package-lock.json",".eslintcache","*.log"]
|
|
172
|
-
*/
|
|
173
|
-
cleanFiles?: string[];
|
|
174
|
-
/**
|
|
175
|
-
* Use author name when create merge PR
|
|
176
|
-
*
|
|
177
|
-
* @default `package.json -> autor`
|
|
178
|
-
*/
|
|
179
|
-
author?: string | {
|
|
180
|
-
name?: string;
|
|
181
|
-
email?: string;
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Use repo info when create merge PR
|
|
185
|
-
*
|
|
186
|
-
* @default `package.json -> repository`
|
|
187
|
-
*/
|
|
188
|
-
repository?: string | {
|
|
189
|
-
url?: string;
|
|
190
|
-
[key: string]: unknown;
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* commitlint config
|
|
194
|
-
*
|
|
195
|
-
* @default { "extends": ["@commitlint/config-conventional"] }
|
|
196
|
-
*/
|
|
197
|
-
commitlint?: _commitlint_types.UserConfig;
|
|
198
|
-
/**
|
|
199
|
-
* config of CI release
|
|
200
|
-
*
|
|
201
|
-
* scripts release
|
|
202
|
-
*/
|
|
203
|
-
release?: FeReleaseConfig;
|
|
204
|
-
/**
|
|
205
|
-
* @default ['.env.local', '.env']
|
|
206
|
-
*/
|
|
207
|
-
envOrder?: string[];
|
|
208
|
-
};
|
|
209
|
-
type FeReleaseConfig = {
|
|
210
|
-
/**
|
|
211
|
-
* The path to publish the package
|
|
212
|
-
*
|
|
213
|
-
* @default ''
|
|
214
|
-
*/
|
|
215
|
-
publishPath?: string;
|
|
216
|
-
/**
|
|
217
|
-
* Whether to automatically merge PR when creating and publishing
|
|
218
|
-
*
|
|
219
|
-
* @default true
|
|
220
|
-
*/
|
|
221
|
-
autoMergeReleasePR?: boolean;
|
|
222
|
-
/**
|
|
223
|
-
* PR auto merged type
|
|
224
|
-
*
|
|
225
|
-
* @default squash
|
|
226
|
-
*/
|
|
227
|
-
autoMergeType?: 'merge' | 'squash' | 'rebase';
|
|
228
|
-
/**
|
|
229
|
-
* Create the branch name of PR when publishing
|
|
230
|
-
*
|
|
231
|
-
* support vars: pkgName, tagName, env, branch
|
|
232
|
-
*
|
|
233
|
-
* @default 'release-${pkgName}-${tagName}'
|
|
234
|
-
*/
|
|
235
|
-
branchName?: string;
|
|
236
|
-
/**
|
|
237
|
-
* Create a title for publishing PR
|
|
238
|
-
*
|
|
239
|
-
* @default [${pkgName} Release] Branch:${branch}, Tag:${tagName}, Env:${env}
|
|
240
|
-
*/
|
|
241
|
-
PRTitle?: string;
|
|
242
|
-
/**
|
|
243
|
-
* Create a body for publishing PR
|
|
244
|
-
*
|
|
245
|
-
* @default This PR includes version bump to ${tagName}
|
|
246
|
-
*/
|
|
247
|
-
PRBody?: string;
|
|
248
|
-
/**
|
|
249
|
-
* Create a label for publishing PR
|
|
250
|
-
*/
|
|
251
|
-
label?: {
|
|
252
|
-
/**
|
|
253
|
-
* hex color string
|
|
254
|
-
*
|
|
255
|
-
* @default `1A7F37`
|
|
256
|
-
*/
|
|
257
|
-
color?: string;
|
|
258
|
-
/**
|
|
259
|
-
* @default `Label for version update PRs`
|
|
260
|
-
*/
|
|
261
|
-
description?: string;
|
|
262
|
-
/**
|
|
263
|
-
* @default `CI-Release`
|
|
264
|
-
*/
|
|
265
|
-
name?: string;
|
|
266
|
-
};
|
|
267
|
-
/**
|
|
268
|
-
* @default `changes:${name}`
|
|
269
|
-
*/
|
|
270
|
-
changePackagesLabel?: string;
|
|
271
|
-
/**
|
|
272
|
-
* @default `[]`
|
|
273
|
-
*/
|
|
274
|
-
packagesDirectories?: string[];
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Options for shell execution
|
|
279
|
-
*
|
|
280
|
-
* This interface defines the options available for executing shell commands.
|
|
281
|
-
* It provides flexibility in controlling the behavior of shell command execution.
|
|
282
|
-
*
|
|
283
|
-
* @interface
|
|
284
|
-
* @example
|
|
285
|
-
* const options: ShellExecOptions = {
|
|
286
|
-
* silent: true,
|
|
287
|
-
* env: { PATH: '/usr/bin' },
|
|
288
|
-
* dryRun: false
|
|
289
|
-
* };
|
|
290
|
-
*/
|
|
291
|
-
interface ShellExecOptions {
|
|
292
|
-
/**
|
|
293
|
-
* Whether to suppress output to the console.
|
|
294
|
-
*
|
|
295
|
-
* @type {boolean}
|
|
296
|
-
*/
|
|
297
|
-
silent?: boolean;
|
|
298
|
-
/**
|
|
299
|
-
* Environment variables to be passed to the command.
|
|
300
|
-
*
|
|
301
|
-
* @type {Record<string, string>}
|
|
302
|
-
*/
|
|
303
|
-
env?: Record<string, string>;
|
|
304
|
-
/**
|
|
305
|
-
* Result to return when in dry-run mode.
|
|
306
|
-
*
|
|
307
|
-
* @type {unknown}
|
|
308
|
-
*/
|
|
309
|
-
dryRunResult?: unknown;
|
|
310
|
-
/**
|
|
311
|
-
* Whether to perform a dry run.
|
|
312
|
-
* Overrides shell config.isDryRun if set.
|
|
313
|
-
*
|
|
314
|
-
* @type {boolean}
|
|
315
|
-
*/
|
|
316
|
-
dryRun?: boolean;
|
|
317
|
-
/**
|
|
318
|
-
* Template context for command string interpolation.
|
|
319
|
-
*
|
|
320
|
-
* @type {Record<string, unknown>}
|
|
321
|
-
*/
|
|
322
|
-
context?: Record<string, unknown>;
|
|
323
|
-
/**
|
|
324
|
-
* Encoding for command output.
|
|
325
|
-
*
|
|
326
|
-
* @type {string}
|
|
327
|
-
*/
|
|
328
|
-
encoding?: BufferEncoding;
|
|
329
|
-
[key: string]: unknown;
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Interface for shell execution
|
|
333
|
-
*
|
|
334
|
-
* This interface defines a method for executing shell commands.
|
|
335
|
-
* It abstracts the details of shell command execution and provides a consistent interface.
|
|
336
|
-
*
|
|
337
|
-
* @interface
|
|
338
|
-
* @example
|
|
339
|
-
* const shell: ShellInterface = {
|
|
340
|
-
* exec: async (command, options) => {
|
|
341
|
-
* // Logic to execute the command
|
|
342
|
-
* return 'Command output';
|
|
343
|
-
* }
|
|
344
|
-
* };
|
|
345
|
-
*/
|
|
346
|
-
interface ShellInterface {
|
|
347
|
-
/**
|
|
348
|
-
* Execute a command.
|
|
349
|
-
*
|
|
350
|
-
* @param {string | string[]} command - The command to execute.
|
|
351
|
-
* @param {ShellExecOptions} [options] - Options for the command execution.
|
|
352
|
-
* @returns {Promise<string>} The output of the command.
|
|
353
|
-
*/
|
|
354
|
-
exec(command: string | string[], options?: ShellExecOptions): Promise<string>;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
type ExecPromiseFunction = (command: string | string[], options: ShellExecOptions) => Promise<string>;
|
|
358
|
-
/**
|
|
359
|
-
* Configuration interface for Shell class
|
|
360
|
-
* @interface
|
|
361
|
-
*/
|
|
362
|
-
interface ShellConfig extends ShellExecOptions {
|
|
363
|
-
/** Logger instance */
|
|
364
|
-
logger: Logger;
|
|
365
|
-
/**
|
|
366
|
-
* Promise for the execer
|
|
367
|
-
*/
|
|
368
|
-
execPromise?: ExecPromiseFunction;
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Shell class for command execution
|
|
372
|
-
* @class
|
|
373
|
-
* @description Provides methods for executing shell commands with caching and templating support
|
|
374
|
-
*/
|
|
375
|
-
declare class Shell implements ShellInterface {
|
|
376
|
-
config: ShellConfig;
|
|
377
|
-
private cache;
|
|
378
|
-
/**
|
|
379
|
-
* Creates a new Shell instance
|
|
380
|
-
* @param config - Shell configuration
|
|
381
|
-
* @param cache - Command cache map
|
|
382
|
-
*/
|
|
383
|
-
constructor(config: ShellConfig, cache?: Map<string, Promise<string>>);
|
|
384
|
-
/**
|
|
385
|
-
* Gets the logger instance
|
|
386
|
-
*/
|
|
387
|
-
get logger(): Logger;
|
|
388
|
-
/**
|
|
389
|
-
* Formats a template string with context
|
|
390
|
-
* @param template - Template string
|
|
391
|
-
* @param context - Context object for template interpolation
|
|
392
|
-
* @returns Formatted string
|
|
393
|
-
*/
|
|
394
|
-
static format(template?: string, context?: Record<string, unknown>): string;
|
|
395
|
-
/**
|
|
396
|
-
* Formats a template string with context and error handling
|
|
397
|
-
* @param template - Template string
|
|
398
|
-
* @param context - Context object for template interpolation
|
|
399
|
-
* @returns Formatted string
|
|
400
|
-
* @throws Error if template formatting fails
|
|
401
|
-
*/
|
|
402
|
-
format(template?: string, context?: Record<string, unknown>): string;
|
|
403
|
-
/**
|
|
404
|
-
* Executes a command with options
|
|
405
|
-
* @param command - Command string or array
|
|
406
|
-
* @param options - Execution options
|
|
407
|
-
* @returns Promise resolving to command output
|
|
408
|
-
*/
|
|
409
|
-
exec(command: string | string[], options?: ShellExecOptions): Promise<string>;
|
|
410
|
-
/**
|
|
411
|
-
* Executes a command silently
|
|
412
|
-
* @param command - Command string or array
|
|
413
|
-
* @param options - Execution options
|
|
414
|
-
* @returns Promise resolving to command output
|
|
415
|
-
*/
|
|
416
|
-
run(command: string | string[], options?: ShellExecOptions): Promise<string>;
|
|
417
|
-
/**
|
|
418
|
-
* Executes a formatted command with caching
|
|
419
|
-
* @param command - Formatted command string or array
|
|
420
|
-
* @param options - Execution options
|
|
421
|
-
* @returns Promise resolving to command output
|
|
422
|
-
*/
|
|
423
|
-
execFormattedCommand(command: string | string[], options?: ShellExecOptions): Promise<string>;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Create a new ConfigSearch instance with fe configuration
|
|
428
|
-
* @param feConfig - Custom fe configuration
|
|
429
|
-
* @returns ConfigSearch instance
|
|
430
|
-
* @description
|
|
431
|
-
* Significance: Creates configuration search utility
|
|
432
|
-
* Core idea: Merge default and custom configurations
|
|
433
|
-
* Main function: Initialize configuration search
|
|
434
|
-
* Main purpose: Provide configuration discovery
|
|
435
|
-
*
|
|
436
|
-
* @example
|
|
437
|
-
* ```typescript
|
|
438
|
-
* const configSearch = getFeConfigSearch({ debug: true });
|
|
439
|
-
* ```
|
|
440
|
-
*/
|
|
441
|
-
declare function getFeConfigSearch(feConfig?: Record<string, unknown>): ConfigSearch;
|
|
442
|
-
type ScriptContextOptions<T> = T & {
|
|
443
|
-
execPromise?: ExecPromiseFunction;
|
|
444
|
-
};
|
|
445
|
-
/**
|
|
446
|
-
* Options interface for FeScriptContext
|
|
447
|
-
* @interface
|
|
448
|
-
* @description
|
|
449
|
-
* Significance: Defines script execution context options
|
|
450
|
-
* Core idea: Centralize script execution configuration
|
|
451
|
-
* Main function: Type-safe context options
|
|
452
|
-
* Main purpose: Configure script execution environment
|
|
453
|
-
*
|
|
454
|
-
* @example
|
|
455
|
-
* ```typescript
|
|
456
|
-
* const options: FeScriptContextOptions<T> = {
|
|
457
|
-
* logger: new ScriptsLogger(),
|
|
458
|
-
* dryRun: true
|
|
459
|
-
* };
|
|
460
|
-
* ```
|
|
461
|
-
*/
|
|
462
|
-
interface FeScriptContextOptions<T> {
|
|
463
|
-
/** Custom logger instance */
|
|
464
|
-
logger?: Logger;
|
|
465
|
-
/** Shell instance for command execution */
|
|
466
|
-
shell?: Shell;
|
|
467
|
-
/** Custom fe configuration */
|
|
468
|
-
feConfig?: Record<string, unknown>;
|
|
469
|
-
/** Whether to perform dry run */
|
|
470
|
-
dryRun?: boolean;
|
|
471
|
-
/** Enable verbose logging */
|
|
472
|
-
verbose?: boolean;
|
|
473
|
-
/** Additional script-specific options */
|
|
474
|
-
options?: ScriptContextOptions<T>;
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Script execution context class
|
|
478
|
-
* @class
|
|
479
|
-
* @description
|
|
480
|
-
* Significance: Manages script execution environment
|
|
481
|
-
* Core idea: Provide unified context for script execution
|
|
482
|
-
* Main function: Initialize and maintain script context
|
|
483
|
-
* Main purpose: Standardize script execution environment
|
|
484
|
-
*
|
|
485
|
-
* @example
|
|
486
|
-
* ```typescript
|
|
487
|
-
* const context = new FeScriptContext<MyOptions>({
|
|
488
|
-
* dryRun: true,
|
|
489
|
-
* verbose: true
|
|
490
|
-
* });
|
|
491
|
-
* ```
|
|
492
|
-
*/
|
|
493
|
-
declare class FeScriptContext<T = unknown> {
|
|
494
|
-
/** Logger instance */
|
|
495
|
-
readonly logger: Logger;
|
|
496
|
-
/** Shell instance */
|
|
497
|
-
readonly shell: Shell;
|
|
498
|
-
/** Fe configuration */
|
|
499
|
-
readonly feConfig: FeConfig;
|
|
500
|
-
/** Dry run flag */
|
|
501
|
-
readonly dryRun: boolean;
|
|
502
|
-
/** Verbose logging flag */
|
|
503
|
-
readonly verbose: boolean;
|
|
504
|
-
/** Script-specific options */
|
|
505
|
-
options: ScriptContextOptions<T>;
|
|
506
|
-
/**
|
|
507
|
-
* Creates a FeScriptContext instance
|
|
508
|
-
*
|
|
509
|
-
* @description
|
|
510
|
-
* Significance: Initializes script execution context
|
|
511
|
-
* Core idea: Setup execution environment
|
|
512
|
-
* Main function: Create context with options
|
|
513
|
-
* Main purpose: Prepare script execution environment
|
|
514
|
-
*
|
|
515
|
-
* @example
|
|
516
|
-
* ```typescript
|
|
517
|
-
* const context = new FeScriptContext({
|
|
518
|
-
* dryRun: true,
|
|
519
|
-
* options: { branch: 'main' }
|
|
520
|
-
* });
|
|
521
|
-
* ```
|
|
522
|
-
*/
|
|
523
|
-
constructor(scriptsOptions?: FeScriptContextOptions<T>);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
declare class ScriptsLogger extends Logger {
|
|
527
|
-
/**
|
|
528
|
-
* @override
|
|
529
|
-
* @param {string} value
|
|
530
|
-
* @returns {string}
|
|
531
|
-
*/
|
|
532
|
-
prefix(value: string): string;
|
|
533
|
-
obtrusive(title: string): void;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
export { ConfigSearch, FeScriptContext, ScriptsLogger, Shell, defaultFeConfig, getFeConfigSearch };
|
|
537
|
-
export type { ConfigSearchOptions, ExecPromiseFunction, FeConfig, FeReleaseConfig, FeScriptContextOptions, ScriptContextOptions, ShellConfig, ShellExecOptions, ShellInterface };
|
package/dist/es/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cosmiconfigSync as r}from"cosmiconfig";import{exec as t}from"child_process";var n,e,o,i,u,a,c,f,s,l,p,h,v,y,g,d,b,_,m,O,j,w,R,k,x,P,A,E,N,S,T,C,$,z,B,F,I,M,U,V,D,H,G,L,W,Y,J,q,K,Q,X,Z,rr,tr,nr,er,or,ir,ur,ar,cr,fr,sr,lr,pr,hr,vr,yr,gr,dr,br,_r,mr,Or,jr,wr,Rr,kr,xr,Pr,Ar,Er,Nr,Sr,Tr,Cr,$r,zr,Br,Fr,Ir,Mr,Ur,Vr,Dr,Hr,Gr,Lr,Wr,Yr,Jr,qr,Kr,Qr,Xr,Zr,rt,tt,nt,et,ot,it,ut,at,ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ft(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function st(){if(e)return n;return e=1,n=function(r,t,n){switch(n.length){case 0:return r.call(t);case 1:return r.call(t,n[0]);case 2:return r.call(t,n[0],n[1]);case 3:return r.call(t,n[0],n[1],n[2])}return r.apply(t,n)}}function lt(){if(i)return o;return i=1,o=function(r){return r}}function pt(){if(a)return u;a=1;var r=st(),t=Math.max;return u=function(n,e,o){return e=t(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,a=t(i.length-e,0),c=Array(a);++u<a;)c[u]=i[e+u];u=-1;for(var f=Array(e+1);++u<e;)f[u]=i[u];return f[e]=o(c),r(n,this,f)}},u}function ht(){if(f)return c;return f=1,c=function(r){return function(){return r}}}function vt(){if(l)return s;l=1;var r="object"==typeof ct&&ct&&ct.Object===Object&&ct;return s=r}function yt(){if(h)return p;h=1;var r=vt(),t="object"==typeof self&&self&&self.Object===Object&&self,n=r||t||Function("return this")();return p=n}function gt(){if(y)return v;y=1;var r=yt().Symbol;return v=r}function dt(){if(d)return g;d=1;var r=gt(),t=Object.prototype,n=t.hasOwnProperty,e=t.toString,o=r?r.toStringTag:void 0;return g=function(r){var t=n.call(r,o),i=r[o];try{r[o]=void 0;var u=!0}catch(r){}var a=e.call(r);return u&&(t?r[o]=i:delete r[o]),a}}function bt(){if(_)return b;_=1;var r=Object.prototype.toString;return b=function(t){return r.call(t)}}function _t(){if(O)return m;O=1;var r=gt(),t=dt(),n=bt(),e=r?r.toStringTag:void 0;return m=function(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":e&&e in Object(r)?t(r):n(r)}}function mt(){if(w)return j;return w=1,j=function(r){var t=typeof r;return null!=r&&("object"==t||"function"==t)}}function Ot(){if(k)return R;k=1;var r=_t(),t=mt();return R=function(n){if(!t(n))return!1;var e=r(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}function jt(){if(P)return x;P=1;var r=yt()["__core-js_shared__"];return x=r}function wt(){if(E)return A;E=1;var r,t=jt(),n=(r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";return A=function(r){return!!n&&n in r}}function Rt(){if(S)return N;S=1;var r=Function.prototype.toString;return N=function(t){if(null!=t){try{return r.call(t)}catch(r){}try{return t+""}catch(r){}}return""}}function kt(){if(C)return T;C=1;var r=Ot(),t=wt(),n=mt(),e=Rt(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,f=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return T=function(i){return!(!n(i)||t(i))&&(r(i)?f:o).test(e(i))}}function xt(){if(z)return $;return z=1,$=function(r,t){return null==r?void 0:r[t]}}function Pt(){if(F)return B;F=1;var r=kt(),t=xt();return B=function(n,e){var o=t(n,e);return r(o)?o:void 0}}function At(){if(M)return I;M=1;var r=Pt(),t=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(r){}}();return I=t}function Et(){if(V)return U;V=1;var r=ht(),t=At();return U=t?function(n,e){return t(n,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:lt()}function Nt(){if(H)return D;H=1;var r=Date.now;return D=function(t){var n=0,e=0;return function(){var o=r(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},D}function St(){if(L)return G;L=1;var r=Et(),t=Nt()(r);return G=t}function Tt(){if(Y)return W;Y=1;var r=lt(),t=pt(),n=St();return W=function(e,o){return n(t(e,o,r),e+"")}}function Ct(){if(q)return J;return q=1,J=function(){this.__data__=[],this.size=0}}function $t(){if(Q)return K;return Q=1,K=function(r,t){return r===t||r!=r&&t!=t}}function zt(){if(Z)return X;Z=1;var r=$t();return X=function(t,n){for(var e=t.length;e--;)if(r(t[e][0],n))return e;return-1}}function Bt(){if(tr)return rr;tr=1;var r=zt(),t=Array.prototype.splice;return rr=function(n){var e=this.__data__,o=r(e,n);return!(o<0)&&(o==e.length-1?e.pop():t.call(e,o,1),--this.size,!0)}}function Ft(){if(er)return nr;er=1;var r=zt();return nr=function(t){var n=this.__data__,e=r(n,t);return e<0?void 0:n[e][1]}}function It(){if(ir)return or;ir=1;var r=zt();return or=function(t){return r(this.__data__,t)>-1}}function Mt(){if(ar)return ur;ar=1;var r=zt();return ur=function(t,n){var e=this.__data__,o=r(e,t);return o<0?(++this.size,e.push([t,n])):e[o][1]=n,this}}function Ut(){if(fr)return cr;fr=1;var r=Ct(),t=Bt(),n=Ft(),e=It(),o=Mt();function i(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,cr=i}function Vt(){if(lr)return sr;lr=1;var r=Ut();return sr=function(){this.__data__=new r,this.size=0}}function Dt(){if(hr)return pr;return hr=1,pr=function(r){var t=this.__data__,n=t.delete(r);return this.size=t.size,n}}function Ht(){if(yr)return vr;return yr=1,vr=function(r){return this.__data__.get(r)}}function Gt(){if(dr)return gr;return dr=1,gr=function(r){return this.__data__.has(r)}}function Lt(){if(_r)return br;_r=1;var r=Pt()(yt(),"Map");return br=r}function Wt(){if(Or)return mr;Or=1;var r=Pt()(Object,"create");return mr=r}function Yt(){if(wr)return jr;wr=1;var r=Wt();return jr=function(){this.__data__=r?r(null):{},this.size=0}}function Jt(){if(kr)return Rr;return kr=1,Rr=function(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}}function qt(){if(Pr)return xr;Pr=1;var r=Wt(),t=Object.prototype.hasOwnProperty;return xr=function(n){var e=this.__data__;if(r){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(e,n)?e[n]:void 0}}function Kt(){if(Er)return Ar;Er=1;var r=Wt(),t=Object.prototype.hasOwnProperty;return Ar=function(n){var e=this.__data__;return r?void 0!==e[n]:t.call(e,n)}}function Qt(){if(Sr)return Nr;Sr=1;var r=Wt();return Nr=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=r&&void 0===n?"__lodash_hash_undefined__":n,this}}function Xt(){if(Cr)return Tr;Cr=1;var r=Yt(),t=Jt(),n=qt(),e=Kt(),o=Qt();function i(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Tr=i}function Zt(){if(zr)return $r;zr=1;var r=Xt(),t=Ut(),n=Lt();return $r=function(){this.size=0,this.__data__={hash:new r,map:new(n||t),string:new r}}}function rn(){if(Fr)return Br;return Fr=1,Br=function(r){var t=typeof r;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==r:null===r}}function tn(){if(Mr)return Ir;Mr=1;var r=rn();return Ir=function(t,n){var e=t.__data__;return r(n)?e["string"==typeof n?"string":"hash"]:e.map}}function nn(){if(Vr)return Ur;Vr=1;var r=tn();return Ur=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}}function en(){if(Hr)return Dr;Hr=1;var r=tn();return Dr=function(t){return r(this,t).get(t)}}function on(){if(Lr)return Gr;Lr=1;var r=tn();return Gr=function(t){return r(this,t).has(t)}}function un(){if(Yr)return Wr;Yr=1;var r=tn();return Wr=function(t,n){var e=r(this,t),o=e.size;return e.set(t,n),this.size+=e.size==o?0:1,this}}function an(){if(qr)return Jr;qr=1;var r=Zt(),t=nn(),n=en(),e=on(),o=un();function i(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Jr=i}function cn(){if(Qr)return Kr;Qr=1;var r=Ut(),t=Lt(),n=an();return Kr=function(e,o){var i=this.__data__;if(i instanceof r){var u=i.__data__;if(!t||u.length<199)return u.push([e,o]),this.size=++i.size,this;i=this.__data__=new n(u)}return i.set(e,o),this.size=i.size,this}}function fn(){if(Zr)return Xr;Zr=1;var r=Ut(),t=Vt(),n=Dt(),e=Ht(),o=Gt(),i=cn();function u(t){var n=this.__data__=new r(t);this.size=n.size}return u.prototype.clear=t,u.prototype.delete=n,u.prototype.get=e,u.prototype.has=o,u.prototype.set=i,Xr=u}function sn(){if(tt)return rt;tt=1;var r=At();return rt=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}}function ln(){if(et)return nt;et=1;var r=sn(),t=$t();return nt=function(n,e,o){(void 0!==o&&!t(n[e],o)||void 0===o&&!(e in n))&&r(n,e,o)}}function pn(){if(it)return ot;return it=1,ot=function(r){return function(t,n,e){for(var o=-1,i=Object(t),u=e(t),a=u.length;a--;){var c=u[r?a:++o];if(!1===n(i[c],c,i))break}return t}}}function hn(){if(at)return ut;at=1;var r=pn()();return ut=r}var vn,yn,gn,dn,bn,_n,mn,On,jn,wn,Rn,kn,xn,Pn,An,En,Nn,Sn,Tn,Cn,$n,zn,Bn,Fn,In,Mn,Un,Vn,Dn,Hn,Gn,Ln,Wn,Yn={exports:{}};function Jn(){return vn||(vn=1,r=Yn,t=Yn.exports,n=yt(),e=t&&!t.nodeType&&t,o=e&&r&&!r.nodeType&&r,i=o&&o.exports===e?n.Buffer:void 0,u=i?i.allocUnsafe:void 0,r.exports=function(r,t){if(t)return r.slice();var n=r.length,e=u?u(n):new r.constructor(n);return r.copy(e),e}),Yn.exports;var r,t,n,e,o,i,u}function qn(){if(gn)return yn;gn=1;var r=yt().Uint8Array;return yn=r}function Kn(){if(bn)return dn;bn=1;var r=qn();return dn=function(t){var n=new t.constructor(t.byteLength);return new r(n).set(new r(t)),n}}function Qn(){if(mn)return _n;mn=1;var r=Kn();return _n=function(t,n){var e=n?r(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}}function Xn(){if(jn)return On;return jn=1,On=function(r,t){var n=-1,e=r.length;for(t||(t=Array(e));++n<e;)t[n]=r[n];return t}}function Zn(){if(Rn)return wn;Rn=1;var r=mt(),t=Object.create,n=function(){function n(){}return function(e){if(!r(e))return{};if(t)return t(e);n.prototype=e;var o=new n;return n.prototype=void 0,o}}();return wn=n}function re(){if(xn)return kn;return xn=1,kn=function(r,t){return function(n){return r(t(n))}}}function te(){if(An)return Pn;An=1;var r=re()(Object.getPrototypeOf,Object);return Pn=r}function ne(){if(Nn)return En;Nn=1;var r=Object.prototype;return En=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||r)}}function ee(){if(Tn)return Sn;Tn=1;var r=Zn(),t=te(),n=ne();return Sn=function(e){return"function"!=typeof e.constructor||n(e)?{}:r(t(e))}}function oe(){if($n)return Cn;return $n=1,Cn=function(r){return null!=r&&"object"==typeof r}}function ie(){if(Bn)return zn;Bn=1;var r=_t(),t=oe();return zn=function(n){return t(n)&&"[object Arguments]"==r(n)}}function ue(){if(In)return Fn;In=1;var r=ie(),t=oe(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=r(function(){return arguments}())?r:function(r){return t(r)&&e.call(r,"callee")&&!o.call(r,"callee")};return Fn=i}function ae(){if(Un)return Mn;Un=1;var r=Array.isArray;return Mn=r}function ce(){if(Dn)return Vn;Dn=1;return Vn=function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}}function fe(){if(Gn)return Hn;Gn=1;var r=Ot(),t=ce();return Hn=function(n){return null!=n&&t(n.length)&&!r(n)}}function se(){if(Wn)return Ln;Wn=1;var r=fe(),t=oe();return Ln=function(n){return t(n)&&r(n)}}var le,pe,he,ve,ye,ge,de,be,_e,me={exports:{}};function Oe(){if(pe)return le;return pe=1,le=function(){return!1}}function je(){return he||(he=1,function(r,t){var n=yt(),e=Oe(),o=t&&!t.nodeType&&t,i=o&&r&&!r.nodeType&&r,u=i&&i.exports===o?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||e;r.exports=a}(me,me.exports)),me.exports}function we(){if(ye)return ve;ye=1;var r=_t(),t=te(),n=oe(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,a=i.call(Object);return ve=function(e){if(!n(e)||"[object Object]"!=r(e))return!1;var o=t(e);if(null===o)return!0;var c=u.call(o,"constructor")&&o.constructor;return"function"==typeof c&&c instanceof c&&i.call(c)==a},ve}function Re(){if(de)return ge;de=1;var r=_t(),t=ce(),n=oe(),e={};return e["[object Float32Array]"]=e["[object Float64Array]"]=e["[object Int8Array]"]=e["[object Int16Array]"]=e["[object Int32Array]"]=e["[object Uint8Array]"]=e["[object Uint8ClampedArray]"]=e["[object Uint16Array]"]=e["[object Uint32Array]"]=!0,e["[object Arguments]"]=e["[object Array]"]=e["[object ArrayBuffer]"]=e["[object Boolean]"]=e["[object DataView]"]=e["[object Date]"]=e["[object Error]"]=e["[object Function]"]=e["[object Map]"]=e["[object Number]"]=e["[object Object]"]=e["[object RegExp]"]=e["[object Set]"]=e["[object String]"]=e["[object WeakMap]"]=!1,ge=function(o){return n(o)&&t(o.length)&&!!e[r(o)]}}function ke(){if(_e)return be;return _e=1,be=function(r){return function(t){return r(t)}}}var xe,Pe,Ae,Ee,Ne,Se,Te,Ce,$e,ze,Be,Fe,Ie,Me,Ue,Ve,De,He,Ge,Le,We,Ye,Je,qe,Ke,Qe,Xe,Ze,ro,to,no,eo,oo,io,uo,ao,co,fo={exports:{}};function so(){return xe||(xe=1,r=fo,t=fo.exports,n=vt(),e=t&&!t.nodeType&&t,o=e&&r&&!r.nodeType&&r,i=o&&o.exports===e&&n.process,u=function(){try{var r=o&&o.require&&o.require("util").types;return r||i&&i.binding&&i.binding("util")}catch(r){}}(),r.exports=u),fo.exports;var r,t,n,e,o,i,u}function lo(){if(Ae)return Pe;Ae=1;var r=Re(),t=ke(),n=so(),e=n&&n.isTypedArray,o=e?t(e):r;return Pe=o}function po(){if(Ne)return Ee;return Ne=1,Ee=function(r,t){if(("constructor"!==t||"function"!=typeof r[t])&&"__proto__"!=t)return r[t]}}function ho(){if(Te)return Se;Te=1;var r=sn(),t=$t(),n=Object.prototype.hasOwnProperty;return Se=function(e,o,i){var u=e[o];n.call(e,o)&&t(u,i)&&(void 0!==i||o in e)||r(e,o,i)}}function vo(){if($e)return Ce;$e=1;var r=ho(),t=sn();return Ce=function(n,e,o,i){var u=!o;o||(o={});for(var a=-1,c=e.length;++a<c;){var f=e[a],s=i?i(o[f],n[f],f,o,n):void 0;void 0===s&&(s=n[f]),u?t(o,f,s):r(o,f,s)}return o}}function yo(){if(Be)return ze;return Be=1,ze=function(r,t){for(var n=-1,e=Array(r);++n<r;)e[n]=t(n);return e},ze}function go(){if(Ie)return Fe;Ie=1;var r=/^(?:0|[1-9]\d*)$/;return Fe=function(t,n){var e=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&r.test(t))&&t>-1&&t%1==0&&t<n}}function bo(){if(Ue)return Me;Ue=1;var r=yo(),t=ue(),n=ae(),e=je(),o=go(),i=lo(),u=Object.prototype.hasOwnProperty;return Me=function(a,c){var f=n(a),s=!f&&t(a),l=!f&&!s&&e(a),p=!f&&!s&&!l&&i(a),h=f||s||l||p,v=h?r(a.length,String):[],y=v.length;for(var g in a)!c&&!u.call(a,g)||h&&("length"==g||l&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,y))||v.push(g);return v}}function _o(){if(De)return Ve;return De=1,Ve=function(r){var t=[];if(null!=r)for(var n in Object(r))t.push(n);return t}}function mo(){if(Ge)return He;Ge=1;var r=mt(),t=ne(),n=_o(),e=Object.prototype.hasOwnProperty;return He=function(o){if(!r(o))return n(o);var i=t(o),u=[];for(var a in o)("constructor"!=a||!i&&e.call(o,a))&&u.push(a);return u}}function Oo(){if(We)return Le;We=1;var r=bo(),t=mo(),n=fe();return Le=function(e){return n(e)?r(e,!0):t(e)}}function jo(){if(Je)return Ye;Je=1;var r=vo(),t=Oo();return Ye=function(n){return r(n,t(n))}}function wo(){if(Ke)return qe;Ke=1;var r=ln(),t=Jn(),n=Qn(),e=Xn(),o=ee(),i=ue(),u=ae(),a=se(),c=je(),f=Ot(),s=mt(),l=we(),p=lo(),h=po(),v=jo();return qe=function(y,g,d,b,_,m,O){var j=h(y,d),w=h(g,d),R=O.get(w);if(R)r(y,d,R);else{var k=m?m(j,w,d+"",y,g,O):void 0,x=void 0===k;if(x){var P=u(w),A=!P&&c(w),E=!P&&!A&&p(w);k=w,P||A||E?u(j)?k=j:a(j)?k=e(j):A?(x=!1,k=t(w,!0)):E?(x=!1,k=n(w,!0)):k=[]:l(w)||i(w)?(k=j,i(j)?k=v(j):s(j)&&!f(j)||(k=o(w))):x=!1}x&&(O.set(w,k),_(k,w,b,m,O),O.delete(w)),r(y,d,k)}}}function Ro(){if(Xe)return Qe;Xe=1;var r=fn(),t=ln(),n=hn(),e=wo(),o=mt(),i=Oo(),u=po();return Qe=function a(c,f,s,l,p){c!==f&&n(f,(function(n,i){if(p||(p=new r),o(n))e(c,f,i,s,a,l,p);else{var h=l?l(u(c,i),n,i+"",c,f,p):void 0;void 0===h&&(h=n),t(c,i,h)}}),i)},Qe}function ko(){if(ro)return Ze;ro=1;var r=Ro(),t=mt();return Ze=function n(e,o,i,u,a,c){return t(e)&&t(o)&&(c.set(o,e),r(e,o,void 0,n,c),c.delete(o)),e},Ze}function xo(){if(no)return to;no=1;var r=$t(),t=fe(),n=go(),e=mt();return to=function(o,i,u){if(!e(u))return!1;var a=typeof i;return!!("number"==a?t(u)&&n(i,u.length):"string"==a&&i in u)&&r(u[i],o)}}function Po(){if(oo)return eo;oo=1;var r=Tt(),t=xo();return eo=function(n){return r((function(r,e){var o=-1,i=e.length,u=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(u=n.length>3&&"function"==typeof u?(i--,u):void 0,a&&t(e[0],e[1],a)&&(u=i<3?void 0:u,i=1),r=Object(r);++o<i;){var c=e[o];c&&n(r,c,o,u)}return r}))}}function Ao(){if(uo)return io;uo=1;var r=Ro(),t=Po()((function(t,n,e,o){r(t,n,e,o)}));return io=t}function Eo(){if(co)return ao;co=1;var r=st(),t=Tt(),n=ko(),e=Ao(),o=t((function(t){return t.push(void 0,n),r(e,void 0,t)}));return ao=o}var No=ft(Eo()),So=ft(we());class To{name;searchPlaces;_config;loaders;searchCache;constructor(r){const{name:t,searchPlaces:n,defaultConfig:e,loaders:o}=r;if(!t&&!n)throw new Error("searchPlaces or name is required");this.name=t,this.searchPlaces=n||function(r){const t=["json","js","ts","cjs","yaml","yml"];return["package.json",...t.map((t=>`${r}.${t}`)),...t.map((t=>`.${r}.${t}`))]}(t),this._config=e||{},this.loaders=o}get config(){return No({},this.search(),this._config)}getSearchPlaces(){return this.searchPlaces}get(t={}){const{file:n,dir:e=process.cwd()}=t,o={};if(!1===n)return o;const i=r(this.name,{searchPlaces:this.searchPlaces,loaders:this.loaders}),u=n?i.load(n):i.search(e);if(u&&"string"==typeof u.config)throw new Error(`Invalid configuration file at ${u.filepath}`);return u&&So(u.config)?u.config:o}search(){return this.searchCache?this.searchCache:this.searchCache=this.get({})}}const Co={protectedBranches:["master","develop","main"],cleanFiles:["dist","node_modules","yarn.lock","package-lock.json",".eslintcache","*.log"],commitlint:{extends:["@commitlint/config-conventional"]},release:{publishPath:"",autoMergeReleasePR:!1,autoMergeType:"squash",branchName:"release-${pkgName}-${tagName}",PRTitle:"[${pkgName} Release] Branch:${branch}, Tag:${tagName}, Env:${env}",PRBody:"## Publish Details\n\n- 🏷️ Version: ${tagName}\n- 🌲 Branch: ${branch}\n- 🔧 Environment: ${env}\n\n## Changelog\n\n${changelog}\n\n## Notes\n\n- [ ] Please check if the version number is correct\n- [ ] Please confirm all tests have passed\n- [ ] Please confirm the documentation has been updated\n\n> This PR is auto created by release process, please contact the frontend team if there are any questions.",label:{color:"1A7F37",description:"Release PR",name:"CI-Release"},packagesDirectories:[],changePackagesLabel:"changes:${name}"},envOrder:[".env.local",".env.production",".env"]};var $o,zo,Bo,Fo,Io,Mo,Uo,Vo,Do,Ho,Go,Lo,Wo,Yo,Jo,qo,Ko,Qo,Xo,Zo,ri,ti,ni,ei,oi,ii,ui,ai,ci,fi,si,li,pi,hi,vi,yi,gi,di,bi,_i,mi,Oi;function ji(){if(zo)return $o;zo=1;var r=vo(),t=Po(),n=Oo(),e=t((function(t,e,o,i){r(e,n(e),t,i)}));return $o=e}function wi(){if(Fo)return Bo;Fo=1;var r=_t(),t=oe(),n=we();return Bo=function(e){if(!t(e))return!1;var o=r(e);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof e.message&&"string"==typeof e.name&&!n(e)}}function Ri(){if(Mo)return Io;Mo=1;var r=st(),t=Tt(),n=wi(),e=t((function(t,e){try{return r(t,void 0,e)}catch(r){return n(r)?r:new Error(r)}}));return Io=e}function ki(){if(Vo)return Uo;return Vo=1,Uo=function(r,t){for(var n=-1,e=null==r?0:r.length,o=Array(e);++n<e;)o[n]=t(r[n],n,r);return o}}function xi(){if(Ho)return Do;Ho=1;var r=ki();return Do=function(t,n){return r(n,(function(r){return t[r]}))}}function Pi(){if(Lo)return Go;Lo=1;var r=$t(),t=Object.prototype,n=t.hasOwnProperty;return Go=function(e,o,i,u){return void 0===e||r(e,t[i])&&!n.call(u,i)?o:e}}function Ai(){if(Yo)return Wo;Yo=1;var r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};return Wo=function(t){return"\\"+r[t]}}function Ei(){if(qo)return Jo;qo=1;var r=re()(Object.keys,Object);return Jo=r}function Ni(){if(Qo)return Ko;Qo=1;var r=ne(),t=Ei(),n=Object.prototype.hasOwnProperty;return Ko=function(e){if(!r(e))return t(e);var o=[];for(var i in Object(e))n.call(e,i)&&"constructor"!=i&&o.push(i);return o}}function Si(){if(Zo)return Xo;Zo=1;var r=bo(),t=Ni(),n=fe();return Xo=function(e){return n(e)?r(e):t(e)}}function Ti(){if(ti)return ri;ti=1;return ri=/<%=([\s\S]+?)%>/g}function Ci(){if(ei)return ni;return ei=1,ni=function(r){return function(t){return null==r?void 0:r[t]}}}function $i(){if(ii)return oi;ii=1;var r=Ci()({"&":"&","<":"<",">":">",'"':""","'":"'"});return oi=r}function zi(){if(ai)return ui;ai=1;var r=_t(),t=oe();return ui=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==r(n)}}function Bi(){if(fi)return ci;fi=1;var r=gt(),t=ki(),n=ae(),e=zi(),o=r?r.prototype:void 0,i=o?o.toString:void 0;return ci=function r(o){if("string"==typeof o)return o;if(n(o))return t(o,r)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},ci}function Fi(){if(li)return si;li=1;var r=Bi();return si=function(t){return null==t?"":r(t)}}function Ii(){if(hi)return pi;hi=1;var r=$i(),t=Fi(),n=/[&<>"']/g,e=RegExp(n.source);return pi=function(o){return(o=t(o))&&e.test(o)?o.replace(n,r):o}}function Mi(){if(yi)return vi;yi=1;return vi=/<%-([\s\S]+?)%>/g}function Ui(){if(di)return gi;di=1;return gi=/<%([\s\S]+?)%>/g}function Vi(){if(_i)return bi;_i=1;var r=Ii();return bi={escape:Mi(),evaluate:Ui(),interpolate:Ti(),variable:"",imports:{_:{escape:r}}}}function Di(){if(Oi)return mi;Oi=1;var r=ji(),t=Ri(),n=xi(),e=Pi(),o=Ai(),i=wi(),u=xo(),a=Si(),c=Ti(),f=Vi(),s=Fi(),l=/\b__p \+= '';/g,p=/\b(__p \+=) '' \+/g,h=/(__e\(.*?\)|\b__t\)) \+\n'';/g,v=/[()=,{}\[\]\/\s]/,y=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/($^)/,d=/['\n\r\u2028\u2029\\]/g,b=Object.prototype.hasOwnProperty;return mi=function(_,m,O){var j=f.imports._.templateSettings||f;O&&u(_,m,O)&&(m=void 0),_=s(_),m=r({},m,j,e);var w,R,k=r({},m.imports,j.imports,e),x=a(k),P=n(k,x),A=0,E=m.interpolate||g,N="__p += '",S=RegExp((m.escape||g).source+"|"+E.source+"|"+(E===c?y:g).source+"|"+(m.evaluate||g).source+"|$","g"),T=b.call(m,"sourceURL")?"//# sourceURL="+(m.sourceURL+"").replace(/\s/g," ")+"\n":"";_.replace(S,(function(r,t,n,e,i,u){return n||(n=e),N+=_.slice(A,u).replace(d,o),t&&(w=!0,N+="' +\n__e("+t+") +\n'"),i&&(R=!0,N+="';\n"+i+";\n__p += '"),n&&(N+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),A=u+r.length,r})),N+="';\n";var C=b.call(m,"variable")&&m.variable;if(C){if(v.test(C))throw new Error("Invalid `variable` option passed into `_.template`")}else N="with (obj) {\n"+N+"\n}\n";N=(R?N.replace(l,""):N).replace(p,"$1").replace(h,"$1;"),N="function("+(C||"obj")+") {\n"+(C?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(w?", __e = _.escape":"")+(R?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+N+"return __p\n}";var $=t((function(){return Function(x,T+"return "+N).apply(void 0,P)}));if($.source=N,i($))throw $;return $}}var Hi,Gi,Li=ft(Di());class Wi{config;cache;constructor(r,t=new Map){this.config=r,this.cache=t}get logger(){return this.config.logger}static format(r="",t={}){return Li(r)(t)}format(r="",t={}){try{return Wi.format(r,t)}catch(n){throw this.logger.error(`Unable to render template with context:\n${r}\n${JSON.stringify(t)}`),this.logger.error(n),n}}exec(r,t={}){const{context:n,...e}=t;return"string"==typeof r?this.execFormattedCommand(this.format(r,n||{}),e):this.execFormattedCommand(r,e)}run(r,t={}){return this.exec(r,{silent:!0,...t})}async execFormattedCommand(r,t={}){const n=this.config.execPromise;if(!n)throw new Error("execPromise is not defined");const{dryRunResult:e,silent:o,dryRun:i}=t,u=void 0!==i?i:this.config.dryRun,a="string"==typeof r?r:r.join(" "),c=this.cache.has(a);if(o||this.logger.exec(r,{isCached:c}),u)return Promise.resolve(e);if(c)return this.cache.get(a);const f=n(r,t);return this.cache.has(a)||this.cache.set(a,f),f}}function Yi(){if(Gi)return Hi;Gi=1;var r=Ro(),t=Po()((function(t,n,e){r(t,n,e)}));return Hi=t}var Ji=ft(Yi()),qi=function(){function r(r){this.config=r,this.plugins=[]}return r.prototype.use=function(r){this.plugins.find((function(t){return t===r||t.pluginName===r.pluginName||t.constructor===r.constructor}))&&r.onlyOne?console.warn("Plugin ".concat(r.pluginName," is already used, skip adding")):this.plugins.push(r)},r}(),Ki=function(r,t){return Ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])},Ki(r,t)};function Qi(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}Ki(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Xi(r,t,n,e){return new(n||(n=Promise))((function(t,o){function i(r){try{a(e.next(r))}catch(r){o(r)}}function u(r){try{a(e.throw(r))}catch(r){o(r)}}function a(r){var e;r.done?t(r.value):(e=r.value,e instanceof n?e:new n((function(r){r(e)}))).then(i,u)}a((e=e.apply(r,[])).next())}))}function Zi(r,t){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&a[0]?e.return:a[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,a[1])).done)return o;switch(e=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,e=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(r,i)}catch(r){a=[6,r],e=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function ru(r,t,n){if(2===arguments.length)for(var e,o=0,i=t.length;o<i;o++)!e&&o in t||(e||(e=Array.prototype.slice.call(t,0,o)),e[o]=t[o]);return r.concat(e||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var tu,nu,eu,ou,iu,uu=function(r){function t(t,n){var e=this.constructor,o=r.call(this,n instanceof Error?n.message:n||t)||this;return o.id=t,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return Qi(t,r),t}(Error);!function(r){function t(){return null!==r&&r.apply(this,arguments)||this}Qi(t,r)}(uu),function(r){r.REQUEST_ERROR="REQUEST_ERROR",r.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",r.FETCHER_NONE="FETCHER_NONE",r.RESPONSE_NOT_OK="RESPONSE_NOT_OK",r.ABORT_ERROR="ABORT_ERROR",r.URL_NONE="URL_NONE"}(tu||(tu={})),function(r){function t(){return null!==r&&r.apply(this,arguments)||this}Qi(t,r),t.prototype.runHooks=function(r,t,n){for(var e=[],o=3;o<arguments.length;o++)e[o-3]=arguments[o];return Xi(this,0,void 0,(function(){var o,i,u,a,c,f,s,l;return Zi(this,(function(p){switch(p.label){case 0:o=-1,(u=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,u.hooksRuntimes.index=void 0,a=0,c=r,p.label=1;case 1:return a<c.length?(f=c[a],o++,"function"!=typeof f[t]||"function"==typeof f.enabled&&!f.enabled(t,n)?[3,3]:(null===(l=u.hooksRuntimes)||void 0===l?void 0:l.breakChain)?[3,4]:(u.hooksRuntimes.pluginName=f.pluginName,u.hooksRuntimes.hookName=t,u.hooksRuntimes.times++,u.hooksRuntimes.index=o,[4,f[t].apply(f,ru([n],e,!1))])):[3,4];case 2:if(void 0!==(s=p.sent())&&(i=s,u.hooksRuntimes.returnValue=s,u.hooksRuntimes.returnBreakChain))return[2,i];p.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))},t.prototype.execNoError=function(r,t){return Xi(this,0,void 0,(function(){var n;return Zi(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(r,t)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof uu?[2,n]:[2,new uu("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},t.prototype.exec=function(r,t){var n=t||r,e=t?r:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},t.prototype.run=function(r,t){return Xi(this,0,void 0,(function(){var n,e,o,i=this;return Zi(this,(function(u){switch(u.label){case 0:n={parameters:r,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(r){return Xi(i,0,void 0,(function(){var n;return Zi(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",r,t)];case 1:return e.sent(),0!==r.hooksRuntimes.times?[3,3]:(n=r,[4,t(r)]);case 2:return n.returnValue=e.sent(),[2];case 3:return r.returnValue=r.hooksRuntimes.returnValue,[2]}}))}))},u.label=1;case 1:return u.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return u.sent(),[4,e(n)];case 3:return u.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return u.sent(),[2,n.returnValue];case 5:return o=u.sent(),n.error=o,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(u.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof uu)throw n.error;throw new uu("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))}}(qi),function(r){function t(){return null!==r&&r.apply(this,arguments)||this}Qi(t,r),t.prototype.runHooks=function(r,t,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var u,a=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,s=r;f<s.length;f++){var l=s[f];if(a++,"function"==typeof l[t]&&("function"!=typeof l.enabled||l.enabled(t,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=l.pluginName,c.hooksRuntimes.hookName=t,c.hooksRuntimes.times++,c.hooksRuntimes.index=a;var p=l[t].apply(l,ru([n],o,!1));if(void 0!==p&&(u=p,c.hooksRuntimes.returnValue=p,c.hooksRuntimes.returnBreakChain))return u}}return u},t.prototype.execNoError=function(r,t){try{return this.exec(r,t)}catch(r){return r instanceof uu?r:new uu("UNKNOWN_SYNC_ERROR",r)}},t.prototype.exec=function(r,t){var n=t||r,e=t?r:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},t.prototype.run=function(r,t){var n,e={parameters:r,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",e),n=e,this.runHooks(this.plugins,"onExec",n,t),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:t(n),this.runHooks(this.plugins,"onSuccess",e),e.returnValue}catch(r){if(e.error=r,this.runHooks(this.plugins,"onError",e),e.hooksRuntimes.returnValue&&(e.error=e.hooksRuntimes.returnValue),e.error instanceof uu)throw e.error;throw new uu("UNKNOWN_SYNC_ERROR",e.error)}finally{e.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}}}(qi);var au="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function cu(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var fu,su,lu,pu,hu,vu,yu,gu,du,bu,_u,mu,Ou,ju,wu,Ru,ku,xu,Pu,Au,Eu,Nu,Su=cu(iu?ou:(iu=1,ou=eu?nu:(eu=1,nu=function(r){return r&&r.length?r[0]:void 0}))),Tu=cu(su?fu:(su=1,fu=function(r){var t=null==r?0:r.length;return t?r[t-1]:void 0}));function Cu(){if(vu)return hu;vu=1;var r=function(){if(pu)return lu;pu=1;var r="object"==typeof au&&au&&au.Object===Object&&au;return lu=r}(),t="object"==typeof self&&self&&self.Object===Object&&self,n=r||t||Function("return this")();return hu=n}function $u(){if(gu)return yu;gu=1;var r=Cu().Symbol;return yu=r}function zu(){if(ju)return Ou;ju=1;var r=$u(),t=function(){if(bu)return du;bu=1;var r=$u(),t=Object.prototype,n=t.hasOwnProperty,e=t.toString,o=r?r.toStringTag:void 0;return du=function(r){var t=n.call(r,o),i=r[o];try{r[o]=void 0;var u=!0}catch(r){}var a=e.call(r);return u&&(t?r[o]=i:delete r[o]),a}}(),n=function(){if(mu)return _u;mu=1;var r=Object.prototype.toString;return _u=function(t){return r.call(t)}}(),e=r?r.toStringTag:void 0;return Ou=function(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":e&&e in Object(r)?t(r):n(r)}}function Bu(){return Au?Pu:(Au=1,Pu=function(r){return null!=r&&"object"==typeof r})}var Fu,Iu,Mu,Uu,Vu=cu(function(){if(Nu)return Eu;Nu=1;var r=zu(),t=function(){if(xu)return ku;xu=1;var r=(Ru?wu:(Ru=1,wu=function(r,t){return function(n){return r(t(n))}}))(Object.getPrototypeOf,Object);return ku=r}(),n=Bu(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,a=i.call(Object);return Eu=function(e){if(!n(e)||"[object Object]"!=r(e))return!1;var o=t(e);if(null===o)return!0;var c=u.call(o,"constructor")&&o.constructor;return"function"==typeof c&&c instanceof c&&i.call(c)==a}}());function Du(){if(Iu)return Fu;Iu=1;var r=Array.isArray;return Fu=r}var Hu,Gu,Lu=function(){if(Uu)return Mu;Uu=1;var r=zu(),t=Du(),n=Bu();return Mu=function(e){return"string"==typeof e||!t(e)&&n(e)&&"[object String]"==r(e)}}(),Wu=cu(Lu),Yu=cu(Du());function Ju(){return Gu?Hu:(Gu=1,Hu=function(r){var t=typeof r;return null!=r&&("object"==t||"function"==t)})}var qu,Ku,Qu,Xu,Zu,ra,ta,na,ea,oa,ia,ua,aa,ca,fa,sa,la,pa,ha,va,ya,ga,da,ba,_a,ma,Oa,ja,wa,Ra,ka,xa,Pa,Aa,Ea,Na,Sa,Ta,Ca,$a,za,Ba,Fa,Ia,Ma,Ua,Va,Da,Ha,Ga,La,Wa,Ya,Ja,qa,Ka,Qa,Xa,Za,rc,tc,nc,ec,oc,ic,uc,ac,cc,fc,sc,lc,pc,hc,vc,yc,gc,dc,bc,_c,mc,Oc,jc,wc,Rc,kc,xc,Pc,Ac,Ec,Nc,Sc,Tc,Cc,$c,zc,Bc,Fc,Ic,Mc,Uc,Vc,Dc,Hc,Gc,Lc,Wc,Yc,Jc,qc,Kc,Qc,Xc,Zc,rf,tf,nf,ef,of,uf,af,cf,ff,sf,lf,pf,hf,vf,yf,gf,df,bf,_f,mf,Of,jf,wf,Rf,kf=cu(Ju()),xf="LOG",Pf="INFO",Af="ERROR",Ef="WARN",Nf="DEBUG",Sf=function(){function r(r){var t=void 0===r?{}:r,n=t.isCI,e=void 0!==n&&n,o=t.dryRun,i=void 0!==o&&o,u=t.debug,a=void 0!==u&&u,c=t.silent,f=void 0!==c&&c;this.isCI=e,this.isDryRun=i,this.isDebug=a,this.isSilent=f}return r.prototype.print=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.isSilent||console.log.apply(console,t)},r.prototype.prefix=function(r,t){return r},r.prototype.log=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this.print.apply(this,ru([xf],r,!1))},r.prototype.info=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this.print.apply(this,ru([Pf,this.prefix(Pf)],r,!1))},r.prototype.warn=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this.print.apply(this,ru([Ef,this.prefix(Ef)],r,!1))},r.prototype.error=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this.print.apply(this,ru([Af,this.prefix(Af)],r,!1))},r.prototype.debug=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(this.isDebug){var n=Su(r),e=kf(n)?JSON.stringify(n):String(n);this.print.apply(this,ru([Nf,this.prefix(Nf),e],r.slice(1),!1))}},r.prototype.verbose=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this.isDebug&&this.print.apply(this,ru([Nf],r,!1))},r.prototype.exec=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=Vu(Tu(r))?Tu(r):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",r.slice(0,null==n?void 0:-1).map((function(r){return Wu(r)?r:Yu(r)?r.join(" "):String(r)})).join(" ")].join(" ").trim();this.log(u)}},r.prototype.obtrusive=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this.isCI||this.log(),this.log.apply(this,r),this.isCI||this.log()},r}(),Tf={exports:{}},Cf=(qu||(qu=1,function(r,t){function n(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.apply(void 0,r)}function e(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return c(!0===r[0],!1,r)}function o(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return c(!0===r[0],!0,r)}function i(r){if(Array.isArray(r)){for(var t=[],n=0;n<r.length;++n)t.push(i(r[n]));return t}if(u(r)){for(var n in t={},r)t[n]=i(r[n]);return t}return r}function u(r){return r&&"object"==typeof r&&!Array.isArray(r)}function a(r,t){if(!u(r))return t;for(var n in t)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(r[n]=u(r[n])&&u(t[n])?a(r[n],t[n]):t[n]);return r}function c(r,t,n){var e;!r&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var c=n[o];if(u(c))for(var f in c)if("__proto__"!==f&&"constructor"!==f&&"prototype"!==f){var s=r?i(c[f]):c[f];e[f]=t?a(e[f],s):s}}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,r.exports=t=n,t.default=n,t.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,t.merge=e,t.recursive=o,t.clone=i,t.isPlainObject=u}(Tf,Tf.exports)),Tf.exports);function $f(){if(Qu)return Ku;Qu=1;var r=zu(),t=Bu();return Ku=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==r(n)}}function zf(){if(fa)return ca;fa=1;var r=function(){if(ta)return ra;ta=1;var r=zu(),t=Ju();return ra=function(n){if(!t(n))return!1;var e=r(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}(),t=function(){if(ia)return oa;ia=1;var r,t=function(){if(ea)return na;ea=1;var r=Cu()["__core-js_shared__"];return na=r}(),n=(r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";return oa=function(r){return!!n&&n in r}}(),n=Ju(),e=function(){if(aa)return ua;aa=1;var r=Function.prototype.toString;return ua=function(t){if(null!=t){try{return r.call(t)}catch(r){}try{return t+""}catch(r){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,f=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ca=function(i){return!(!n(i)||t(i))&&(r(i)?f:o).test(e(i))}}function Bf(){if(ha)return pa;ha=1;var r=zf(),t=la?sa:(la=1,sa=function(r,t){return null==r?void 0:r[t]});return pa=function(n,e){var o=t(n,e);return r(o)?o:void 0}}function Ff(){if(ya)return va;ya=1;var r=Bf()(Object,"create");return va=r}function If(){return Sa?Na:(Sa=1,Na=function(r,t){return r===t||r!=r&&t!=t})}function Mf(){if(Ca)return Ta;Ca=1;var r=If();return Ta=function(t,n){for(var e=t.length;e--;)if(r(t[e][0],n))return e;return-1}}function Uf(){if(Ya)return Wa;Ya=1;var r=function(){if(Pa)return xa;Pa=1;var r=function(){if(da)return ga;da=1;var r=Ff();return ga=function(){this.__data__=r?r(null):{},this.size=0}}(),t=_a?ba:(_a=1,ba=function(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}),n=function(){if(Oa)return ma;Oa=1;var r=Ff(),t=Object.prototype.hasOwnProperty;return ma=function(n){var e=this.__data__;if(r){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(e,n)?e[n]:void 0}}(),e=function(){if(wa)return ja;wa=1;var r=Ff(),t=Object.prototype.hasOwnProperty;return ja=function(n){var e=this.__data__;return r?void 0!==e[n]:t.call(e,n)}}(),o=function(){if(ka)return Ra;ka=1;var r=Ff();return Ra=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=r&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,xa=i}(),t=function(){if(Ha)return Da;Ha=1;var r=Ea?Aa:(Ea=1,Aa=function(){this.__data__=[],this.size=0}),t=function(){if(za)return $a;za=1;var r=Mf(),t=Array.prototype.splice;return $a=function(n){var e=this.__data__,o=r(e,n);return!(o<0||(o==e.length-1?e.pop():t.call(e,o,1),--this.size,0))}}(),n=function(){if(Fa)return Ba;Fa=1;var r=Mf();return Ba=function(t){var n=this.__data__,e=r(n,t);return e<0?void 0:n[e][1]}}(),e=function(){if(Ma)return Ia;Ma=1;var r=Mf();return Ia=function(t){return r(this.__data__,t)>-1}}(),o=function(){if(Va)return Ua;Va=1;var r=Mf();return Ua=function(t,n){var e=this.__data__,o=r(e,t);return o<0?(++this.size,e.push([t,n])):e[o][1]=n,this}}();function i(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Da=i}(),n=function(){if(La)return Ga;La=1;var r=Bf()(Cu(),"Map");return Ga=r}();return Wa=function(){this.size=0,this.__data__={hash:new r,map:new(n||t),string:new r}}}function Vf(){if(Qa)return Ka;Qa=1;var r=qa?Ja:(qa=1,Ja=function(r){var t=typeof r;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==r:null===r});return Ka=function(t,n){var e=t.__data__;return r(n)?e["string"==typeof n?"string":"hash"]:e.map}}function Df(){if(lc)return sc;lc=1;var r=function(){if(fc)return cc;fc=1;var r=function(){if(ac)return uc;ac=1;var r=Uf(),t=function(){if(Za)return Xa;Za=1;var r=Vf();return Xa=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}}(),n=function(){if(tc)return rc;tc=1;var r=Vf();return rc=function(t){return r(this,t).get(t)}}(),e=function(){if(ec)return nc;ec=1;var r=Vf();return nc=function(t){return r(this,t).has(t)}}(),o=function(){if(ic)return oc;ic=1;var r=Vf();return oc=function(t,n){var e=r(this,t),o=e.size;return e.set(t,n),this.size+=e.size==o?0:1,this}}();function i(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,uc=i}();function t(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var r=arguments,t=e?e.apply(this,r):r[0],i=o.cache;if(i.has(t))return i.get(t);var u=n.apply(this,r);return o.cache=i.set(t,u)||i,u};return o.cache=new(t.Cache||r),o}return t.Cache=r,cc=t}();return sc=function(t){var n=r(t,(function(r){return 500===e.size&&e.clear(),r})),e=n.cache;return n}}function Hf(){if(Oc)return mc;Oc=1;var r=Du(),t=function(){if(Zu)return Xu;Zu=1;var r=Du(),t=$f(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return Xu=function(o,i){if(r(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!t(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(hc)return pc;hc=1;var r=Df(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=r((function(r){var e=[];return 46===r.charCodeAt(0)&&e.push(""),r.replace(t,(function(r,t,o,i){e.push(o?i.replace(n,"$1"):t||r)})),e}));return pc=e}(),e=function(){if(_c)return bc;_c=1;var r=function(){if(dc)return gc;dc=1;var r=$u(),t=yc?vc:(yc=1,vc=function(r,t){for(var n=-1,e=null==r?0:r.length,o=Array(e);++n<e;)o[n]=t(r[n],n,r);return o}),n=Du(),e=$f(),o=r?r.prototype:void 0,i=o?o.toString:void 0;return gc=function r(o){if("string"==typeof o)return o;if(n(o))return t(o,r)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},gc}();return bc=function(t){return null==t?"":r(t)}}();return mc=function(o,i){return r(o)?o:t(o,i)?[o]:n(e(o))}}function Gf(){if(wc)return jc;wc=1;var r=$f();return jc=function(t){if("string"==typeof t||r(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}}function Lf(){if(Pc)return xc;Pc=1;var r=Bf(),t=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(r){}}();return xc=t}function Wf(){if(Cc)return Tc;Cc=1;var r=/^(?:0|[1-9]\d*)$/;return Tc=function(t,n){var e=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&r.test(t))&&t>-1&&t%1==0&&t<n}}function Yf(){if(Fc)return Bc;Fc=1;var r=function(){if(kc)return Rc;kc=1;var r=Hf(),t=Gf();return Rc=function(n,e){for(var o=0,i=(e=r(e,n)).length;null!=n&&o<i;)n=n[t(e[o++])];return o&&o==i?n:void 0}}(),t=function(){if(zc)return $c;zc=1;var r=function(){if(Sc)return Nc;Sc=1;var r=function(){if(Ec)return Ac;Ec=1;var r=Lf();return Ac=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}}(),t=If(),n=Object.prototype.hasOwnProperty;return Nc=function(e,o,i){var u=e[o];n.call(e,o)&&t(u,i)&&(void 0!==i||o in e)||r(e,o,i)}}(),t=Hf(),n=Wf(),e=Ju(),o=Gf();return $c=function(i,u,a,c){if(!e(i))return i;for(var f=-1,s=(u=t(u,i)).length,l=s-1,p=i;null!=p&&++f<s;){var h=o(u[f]),v=a;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(f!=l){var y=p[h];void 0===(v=c?c(y,h,p):void 0)&&(v=e(y)?y:n(u[f+1])?[]:{})}r(p,h,v),p=p[h]}return i}}(),n=Hf();return Bc=function(e,o,i){for(var u=-1,a=o.length,c={};++u<a;){var f=o[u],s=r(e,f);i(s,f)&&t(c,n(f,e),s)}return c}}function Jf(){if(Hc)return Dc;Hc=1;var r=function(){if(Vc)return Uc;Vc=1;var r=zu(),t=Bu();return Uc=function(n){return t(n)&&"[object Arguments]"==r(n)}}(),t=Bu(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=r(function(){return arguments}())?r:function(r){return t(r)&&e.call(r,"callee")&&!o.call(r,"callee")};return Dc=i}function qf(){if(qc)return Jc;qc=1;var r=Mc?Ic:(Mc=1,Ic=function(r,t){return null!=r&&t in Object(r)}),t=function(){if(Yc)return Wc;Yc=1;var r=Hf(),t=Jf(),n=Du(),e=Wf(),o=Lc?Gc:(Lc=1,Gc=function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}),i=Gf();return Wc=function(u,a,c){for(var f=-1,s=(a=r(a,u)).length,l=!1;++f<s;){var p=i(a[f]);if(!(l=null!=u&&c(u,p)))break;u=u[p]}return l||++f!=s?l:!!(s=null==u?0:u.length)&&o(s)&&e(p,s)&&(n(u)||t(u))}}();return Jc=function(n,e){return null!=n&&t(n,e,r)}}function Kf(){if(mf)return _f;mf=1;var r=function(){if(gf)return yf;gf=1;var r=pf?lf:(pf=1,lf=function(r){return function(){return r}}),t=Lf(),n=vf?hf:(vf=1,hf=function(r){return r});return yf=t?function(n,e){return t(n,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:n}(),t=function(){if(bf)return df;bf=1;var r=Date.now;return df=function(t){var n=0,e=0;return function(){var o=r(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},df}(),n=t(r);return _f=n}function Qf(){if(jf)return Of;jf=1;var r=function(){if(uf)return of;uf=1;var r=function(){if(ef)return nf;ef=1;var r=Zc?Xc:(Zc=1,Xc=function(r,t){for(var n=-1,e=t.length,o=r.length;++n<e;)r[o+n]=t[n];return r}),t=function(){if(tf)return rf;tf=1;var r=$u(),t=Jf(),n=Du(),e=r?r.isConcatSpreadable:void 0;return rf=function(r){return n(r)||t(r)||!!(e&&r&&r[e])}}();return nf=function n(e,o,i,u,a){var c=-1,f=e.length;for(i||(i=t),a||(a=[]);++c<f;){var s=e[c];o>0&&i(s)?o>1?n(s,o-1,i,u,a):r(a,s):u||(a[a.length]=s)}return a},nf}();return of=function(t){return null!=t&&t.length?r(t,1):[]}}(),t=function(){if(sf)return ff;sf=1;var r=cf?af:(cf=1,af=function(r,t,n){switch(n.length){case 0:return r.call(t);case 1:return r.call(t,n[0]);case 2:return r.call(t,n[0],n[1]);case 3:return r.call(t,n[0],n[1],n[2])}return r.apply(t,n)}),t=Math.max;return ff=function(n,e,o){return e=t(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,a=t(i.length-e,0),c=Array(a);++u<a;)c[u]=i[e+u];u=-1;for(var f=Array(e+1);++u<e;)f[u]=i[u];return f[e]=o(c),r(n,this,f)}},ff}(),n=Kf();return Of=function(e){return n(t(e,void 0,r),e+"")}}cu(Cf);var Xf,Zf=function(){if(Rf)return wf;Rf=1;var r=function(){if(Qc)return Kc;Qc=1;var r=Yf(),t=qf();return Kc=function(n,e){return r(n,e,(function(r,e){return t(n,e)}))}}(),t=Qf()((function(t,n){return null==t?{}:r(t,n)}));return wf=t}();cu(Zf);var rs=function(){function r(r){void 0===r&&(r={}),this.options=r,this[Xf]="JSONSerializer"}return r.prototype.createReplacer=function(r){return Array.isArray(r)?r:null===r?function(r,t){return"string"==typeof t?t.replace(/\r\n/g,"\n"):t}:"function"==typeof r?function(t,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return r.call(this,t,e)}:function(r,t){return"string"==typeof t?t.replace(/\r\n/g,"\n"):t}},r.prototype.stringify=function(r,t,n){try{var e=this.createReplacer(t);return Array.isArray(e)?JSON.stringify(r,e,n):JSON.stringify(r,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(r){if(r instanceof TypeError&&r.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw r}},r.prototype.parse=function(r,t){return JSON.parse(r,t)},r.prototype.serialize=function(r){return this.stringify(r,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},r.prototype.deserialize=function(r,t){try{return this.parse(r)}catch(r){return t}},r.prototype.serializeArray=function(r){return"["+r.map((function(r){return JSON.stringify(r)})).join(",")+"]"},r}();Xf=Symbol.toStringTag,function(){function r(r,t){void 0===t&&(t=new rs),this.storage=r,this.serializer=t,this.store={}}Object.defineProperty(r.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),r.prototype.setItem=function(r,t,n){var e={key:r,value:t,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(r,o):this.store[r]=o},r.prototype.getItem=function(r,t){var n,e=this.storage?this.storage.getItem(r):this.store[r],o=null!=t?t:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(r),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},r.prototype.removeItem=function(r){this.storage?this.storage.removeItem(r):delete this.store[r]},r.prototype.clear=function(){this.storage?this.storage.clear():this.store={}}}();const ts=(r=0)=>t=>`[${t+r}m`,ns=(r=0)=>t=>`[${38+r};5;${t}m`,es=(r=0)=>(t,n,e)=>`[${38+r};2;${t};${n};${e}m`,os={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const is=function(){const r=new Map;for(const[t,n]of Object.entries(os)){for(const[t,e]of Object.entries(n))os[t]={open:`[${e[0]}m`,close:`[${e[1]}m`},n[t]=os[t],r.set(e[0],e[1]);Object.defineProperty(os,t,{value:n,enumerable:!1})}return Object.defineProperty(os,"codes",{value:r,enumerable:!1}),os.color.close="[39m",os.bgColor.close="[49m",os.color.ansi=ts(),os.color.ansi256=ns(),os.color.ansi16m=es(),os.bgColor.ansi=ts(10),os.bgColor.ansi256=ns(10),os.bgColor.ansi16m=es(10),Object.defineProperties(os,{rgbToAnsi256:{value:(r,t,n)=>r===t&&t===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(r){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map((r=>r+r)).join(""));const e=Number.parseInt(n,16);return[e>>16&255,e>>8&255,255&e]},enumerable:!1},hexToAnsi256:{value:r=>os.rgbToAnsi256(...os.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return r-8+90;let t,n,e;if(r>=232)t=(10*(r-232)+8)/255,n=t,e=t;else{const o=(r-=16)%36;t=Math.floor(r/36)/5,n=Math.floor(o/6)/5,e=o%6/5}const o=2*Math.max(t,n,e);if(0===o)return 30;let i=30+(Math.round(e)<<2|Math.round(n)<<1|Math.round(t));return 2===o&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(r,t,n)=>os.ansi256ToAnsi(os.rgbToAnsi256(r,t,n)),enumerable:!1},hexToAnsi:{value:r=>os.ansi256ToAnsi(os.hexToAnsi256(r)),enumerable:!1}}),os}(),us=(()=>{if(!("navigator"in globalThis))return 0;if(globalThis.navigator.userAgentData){const r=navigator.userAgentData.brands.find((({brand:r})=>"Chromium"===r));if(r&&r.version>93)return 3}return/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)?1:0})(),as=0!==us&&{level:us},cs={stdout:as,stderr:as};function fs(r,t,n){let e=r.indexOf(t);if(-1===e)return r;const o=t.length;let i=0,u="";do{u+=r.slice(i,e)+t+n,i=e+o,e=r.indexOf(t,i)}while(-1!==e);return u+=r.slice(i),u}const{stdout:ss,stderr:ls}=cs,ps=Symbol("GENERATOR"),hs=Symbol("STYLER"),vs=Symbol("IS_EMPTY"),ys=["ansi","ansi","ansi256","ansi16m"],gs=Object.create(null),ds=r=>{const t=(...r)=>r.join(" ");return((r,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=ss?ss.level:0;r.level=void 0===t.level?n:t.level})(t,r),Object.setPrototypeOf(t,bs.prototype),t};function bs(r){return ds(r)}Object.setPrototypeOf(bs.prototype,Function.prototype);for(const[r,t]of Object.entries(is))gs[r]={get(){const n=ws(this,js(t.open,t.close,this[hs]),this[vs]);return Object.defineProperty(this,r,{value:n}),n}};gs.visible={get(){const r=ws(this,this[hs],!0);return Object.defineProperty(this,"visible",{value:r}),r}};const _s=(r,t,n,...e)=>"rgb"===r?"ansi16m"===t?is[n].ansi16m(...e):"ansi256"===t?is[n].ansi256(is.rgbToAnsi256(...e)):is[n].ansi(is.rgbToAnsi(...e)):"hex"===r?_s("rgb",t,n,...is.hexToRgb(...e)):is[n][r](...e),ms=["rgb","hex","ansi256"];for(const r of ms){gs[r]={get(){const{level:t}=this;return function(...n){const e=js(_s(r,ys[t],"color",...n),is.color.close,this[hs]);return ws(this,e,this[vs])}}};gs["bg"+r[0].toUpperCase()+r.slice(1)]={get(){const{level:t}=this;return function(...n){const e=js(_s(r,ys[t],"bgColor",...n),is.bgColor.close,this[hs]);return ws(this,e,this[vs])}}}}const Os=Object.defineProperties((()=>{}),{...gs,level:{enumerable:!0,get(){return this[ps].level},set(r){this[ps].level=r}}}),js=(r,t,n)=>{let e,o;return void 0===n?(e=r,o=t):(e=n.openAll+r,o=t+n.closeAll),{open:r,close:t,openAll:e,closeAll:o,parent:n}},ws=(r,t,n)=>{const e=(...r)=>Rs(e,1===r.length?""+r[0]:r.join(" "));return Object.setPrototypeOf(e,Os),e[ps]=r,e[hs]=t,e[vs]=n,e},Rs=(r,t)=>{if(r.level<=0||!t)return r[vs]?"":t;let n=r[hs];if(void 0===n)return t;const{openAll:e,closeAll:o}=n;if(t.includes(""))for(;void 0!==n;)t=fs(t,n.close,n.open),n=n.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(r,t,n,e){let o=0,i="";do{const u="\r"===r[e-1];i+=r.slice(o,u?e-1:e)+t+(u?"\r\n":"\n")+n,o=e+1,e=r.indexOf("\n",o)}while(-1!==e);return i+=r.slice(o),i}(t,o,e,i)),e+t+o};Object.defineProperties(bs.prototype,gs);const ks=bs();bs({level:ls?ls.level:0});class xs extends Sf{prefix(r){switch(r){case"INFO":return ks.blue(r);case"WARN":return ks.yellow(r);case"ERROR":return ks.red(r);case"DEBUG":return ks.gray(r);default:return r}}obtrusive(r){const t=ks.bold(r);super.obtrusive(t)}}const Ps=(r,n)=>{const e=Array.isArray(r)?r.join(" "):r;return new Promise(((r,o)=>{t(e,{encoding:"utf-8",...n},((t,n,e)=>{let i;i=t?void 0===t.code?1:t.code:0,0===i?r(n.trim()):o(new Error(e||n))}))}))};function As(r){return new To({name:"fe-config",defaultConfig:Ji({},Co,r)})}class Es{logger;shell;feConfig;dryRun;verbose;options;constructor(r){const{logger:t,shell:n,feConfig:e,dryRun:o,verbose:i,options:u}=r||{},a=u||{};this.logger=t||new xs({debug:i,dryRun:o}),this.shell=n||new Wi({logger:this.logger,dryRun:o,execPromise:a.execPromise||Ps}),this.feConfig=As(e).config,this.dryRun=!!o,this.verbose=!!i,this.options=a}}export{To as ConfigSearch,Es as FeScriptContext,xs as ScriptsLogger,Wi as Shell,Co as defaultFeConfig,As as getFeConfigSearch};
|