@mikeyt23/node-cli-utils 2.0.0-beta.1 → 2.0.0-beta.2

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.
Files changed (51) hide show
  1. package/dist/cjs/GitUtility.d.ts +7 -0
  2. package/dist/cjs/GitUtility.d.ts.map +1 -0
  3. package/dist/cjs/GitUtility.js +49 -0
  4. package/dist/cjs/TarballUtility.d.ts +17 -7
  5. package/dist/cjs/TarballUtility.d.ts.map +1 -1
  6. package/dist/cjs/TarballUtility.js +18 -24
  7. package/dist/cjs/certUtils.d.ts +53 -17
  8. package/dist/cjs/certUtils.d.ts.map +1 -1
  9. package/dist/cjs/certUtils.js +175 -111
  10. package/dist/cjs/dbMigrationUtils.js +44 -54
  11. package/dist/cjs/dotnetUtils.d.ts.map +1 -1
  12. package/dist/cjs/dotnetUtils.js +4 -2
  13. package/dist/cjs/esmSpecific.d.mts +5 -0
  14. package/dist/cjs/esmSpecific.d.mts.map +1 -1
  15. package/dist/cjs/esmSpecific.mjs +6 -1
  16. package/dist/cjs/generalUtils.d.ts +268 -26
  17. package/dist/cjs/generalUtils.d.ts.map +1 -1
  18. package/dist/cjs/generalUtils.js +522 -106
  19. package/dist/cjs/generalUtilsInternal.d.ts +9 -3
  20. package/dist/cjs/generalUtilsInternal.d.ts.map +1 -1
  21. package/dist/cjs/generalUtilsInternal.js +159 -59
  22. package/dist/cjs/hostsUtils.d.ts +16 -0
  23. package/dist/cjs/hostsUtils.d.ts.map +1 -0
  24. package/dist/cjs/hostsUtils.js +82 -0
  25. package/dist/cjs/runWhileParentAlive.js +7 -9
  26. package/dist/esm/GitUtility.d.ts +7 -0
  27. package/dist/esm/GitUtility.d.ts.map +1 -0
  28. package/dist/esm/GitUtility.js +43 -0
  29. package/dist/esm/TarballUtility.d.ts +17 -7
  30. package/dist/esm/TarballUtility.d.ts.map +1 -1
  31. package/dist/esm/TarballUtility.js +21 -25
  32. package/dist/esm/certUtils.d.ts +53 -17
  33. package/dist/esm/certUtils.d.ts.map +1 -1
  34. package/dist/esm/certUtils.js +172 -86
  35. package/dist/esm/dbMigrationUtils.js +45 -55
  36. package/dist/esm/dotnetUtils.d.ts.map +1 -1
  37. package/dist/esm/dotnetUtils.js +4 -2
  38. package/dist/esm/esmSpecific.d.mts +5 -0
  39. package/dist/esm/esmSpecific.d.mts.map +1 -1
  40. package/dist/esm/esmSpecific.mjs +6 -1
  41. package/dist/esm/generalUtils.d.ts +268 -26
  42. package/dist/esm/generalUtils.d.ts.map +1 -1
  43. package/dist/esm/generalUtils.js +490 -105
  44. package/dist/esm/generalUtilsInternal.d.ts +9 -3
  45. package/dist/esm/generalUtilsInternal.d.ts.map +1 -1
  46. package/dist/esm/generalUtilsInternal.js +150 -57
  47. package/dist/esm/hostsUtils.d.ts +16 -0
  48. package/dist/esm/hostsUtils.d.ts.map +1 -0
  49. package/dist/esm/hostsUtils.js +69 -0
  50. package/dist/esm/runWhileParentAlive.js +8 -10
  51. package/package.json +4 -2
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Only dynamically import this if ESM is detected. This allows a CJS-specific build to avoid
3
+ * an error it would otherwise encounter when parsing import.meta.url.
4
+ * @returns the file path of the currently executing script
5
+ */
1
6
  export declare const getImportMetaUrlFilePath: () => string;
2
7
  //# sourceMappingURL=esmSpecific.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"esmSpecific.d.mts","sourceRoot":"","sources":["../../src/esmSpecific.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,cAGpC,CAAA"}
1
+ {"version":3,"file":"esmSpecific.d.mts","sourceRoot":"","sources":["../../src/esmSpecific.mts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,cAGpC,CAAA"}
@@ -2,9 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getImportMetaUrlFilePath = void 0;
4
4
  const node_url_1 = require("node:url");
5
+ /**
6
+ * Only dynamically import this if ESM is detected. This allows a CJS-specific build to avoid
7
+ * an error it would otherwise encounter when parsing import.meta.url.
8
+ * @returns the file path of the currently executing script
9
+ */
5
10
  const getImportMetaUrlFilePath = () => {
6
11
  // @ts-ignore
7
12
  return (0, node_url_1.fileURLToPath)(import.meta.url);
8
13
  };
9
14
  exports.getImportMetaUrlFilePath = getImportMetaUrlFilePath;
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNtU3BlY2lmaWMubWpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2VzbVNwZWNpZmljLm10cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1Q0FBd0M7QUFFakMsTUFBTSx3QkFBd0IsR0FBRyxHQUFHLEVBQUU7SUFDM0MsYUFBYTtJQUNiLE9BQU8sSUFBQSx3QkFBYSxFQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUE7QUFDdkMsQ0FBQyxDQUFBO0FBSFksUUFBQSx3QkFBd0IsNEJBR3BDIn0=
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNtU3BlY2lmaWMubWpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2VzbVNwZWNpZmljLm10cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1Q0FBd0M7QUFFeEM7Ozs7R0FJRztBQUNJLE1BQU0sd0JBQXdCLEdBQUcsR0FBRyxFQUFFO0lBQzNDLGFBQWE7SUFDYixPQUFPLElBQUEsd0JBQWEsRUFBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFBO0FBQ3ZDLENBQUMsQ0FBQTtBQUhZLFFBQUEsd0JBQXdCLDRCQUdwQyJ9
@@ -6,6 +6,12 @@ import { SpawnOptions } from 'node:child_process';
6
6
  * @param moreData More data to log
7
7
  */
8
8
  export declare function log(data: unknown, ...moreData: unknown[]): void;
9
+ /**
10
+ * Log conditionally. Useful for methods that have an option to either suppress output or to show it when it normally isn't.
11
+ * @param data The data to log
12
+ * @param moreData More data to log
13
+ */
14
+ export declare function logIf(shouldLog: boolean, data: unknown, ...moreData: unknown[]): void;
9
15
  /**
10
16
  * Wrapper for console.log() that is suppressed if NodeCliUtilsConfig.logEnabled is false.
11
17
  * @param data The data to log
@@ -91,24 +97,33 @@ export declare function sleep(ms: number): Promise<void>;
91
97
  * An extension of the built-in SpawnOptions with an extra option to specify whether a non-zero exit code should throw an error.
92
98
  */
93
99
  export interface SpawnOptionsWithThrow extends SpawnOptions {
94
- throwOnNonZero?: boolean;
100
+ throwOnNonZero: boolean;
95
101
  simpleErrorMsg?: string;
96
102
  }
97
103
  /**
98
- * This is a wrapper function for NodeJS. Defaults stdio to inherit so that output is visible in the console,
99
- * but note that this means stdout and stderr will not be available in the returned SpawnResult.
104
+ * This is a wrapper function for NodeJS spawn. Defaults stdio to inherit so that output is visible in the console,
105
+ * but note that this means stdout and stderr will not be available in the returned SpawnResult. To hide the output
106
+ * from the console but collect the stdout and stderr in the SpawnResult, use stdio: 'pipe'.
100
107
  *
101
108
  * When spawning long-running processes, use {@link spawnAsyncLongRunning} instead so that unexpected
102
109
  * termination of the parent process will not orphan the child process tree on windows.
110
+ *
111
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
112
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
113
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
103
114
  * @param command The command to spawn
104
115
  * @param args The arguments to pass to the command
105
116
  * @param options The options to pass to the command
106
117
  * @returns A Promise that resolves to a {@link SpawnResult}
107
118
  */
108
- export declare function spawnAsync(command: string, args?: string[], options?: SpawnOptionsWithThrow): Promise<SpawnResult>;
119
+ export declare function spawnAsync(command: string, args?: string[], options?: Partial<SpawnOptionsWithThrow>): Promise<SpawnResult>;
109
120
  /**
110
121
  * Use this alternate spawn wrapper instead of {@link spawnAsync} when spawning long-running processes to
111
122
  * avoid orphaned child process trees on Windows.
123
+ *
124
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
125
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
126
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
112
127
  * @param command The command to spawn
113
128
  * @param args The arguments to pass to the command
114
129
  * @param cwd The current working directory to run the command from - defaults to process.cwd()
@@ -125,6 +140,11 @@ export declare function ensureDirectory(dir: string): Promise<void>;
125
140
  * @param dir The directory to create.
126
141
  */
127
142
  export declare function mkdirp(dir: string): Promise<void>;
143
+ /**
144
+ * Create a directory. Will create parent directory structure if it don't exist. Similar to `mkdir -p`.
145
+ * @param dir The directory to create.
146
+ */
147
+ export declare function mkdirpSync(dir: string): Promise<void>;
128
148
  /**
129
149
  * Empties a directory of all files and subdirectories.
130
150
  *
@@ -142,10 +162,8 @@ export declare function emptyDirectory(directoryToEmpty: string, fileAndDirector
142
162
  */
143
163
  export declare function copyDirectoryContents(sourceDirectory: string, destinationDirectory: string): Promise<void>;
144
164
  /**
145
- * Helper method to validate that a non-falsy value is provided for a parameter that should be a string.
146
- *
147
- * **Warning:** this does not validate the type of the parameter, just whether something non-empty was provided.
148
- * @param paramName The name of the parameter, for logging purposes
165
+ * Helper method to validate that a non-falsy and non-empty value is provided for a parameter that should be a string.
166
+ * @param paramName The name of the parameter to be used in the error message
149
167
  * @param paramValue The value of the parameter
150
168
  */
151
169
  export declare function requireString(paramName: string, paramValue: string): void;
@@ -156,56 +174,144 @@ export declare function requireString(paramName: string, paramValue: string): vo
156
174
  */
157
175
  export declare function requireValidPath(paramName: string, paramValue: string): void;
158
176
  /**
159
- * Options for the spawnDockerCompose wrapper function for `docker compose`.
160
- * @param args Additional arguments to pass to the docker-compose command
161
- * @param projectName Pass the same projectName for each commands for the same project to ensure your containers get unique, descriptive and consistent names.
177
+ * Project names must contain only lowercase letters, decimal digits, dashes, and underscores, and must begin with a lowercase letter or decimal digit.
178
+ *
179
+ * See https://docs.docker.com/compose/environment-variables/envvars/#compose_project_name.
180
+ * @param projectName The string to validate
181
+ * @returns `true` if it's a valid docker compose project name and `false` otherwise
182
+ */
183
+ export declare function isDockerComposeProjectNameValid(projectName: string): boolean;
184
+ /**
185
+ * Options for {@link spawnDockerCompose}.
186
+ * @param projectName
162
187
  * Note that there are other better options such as using the environment variable `COMPOSE_PROJECT_NAME`. See https://docs.docker.com/compose/environment-variables/envvars/#compose_project_name.
163
188
  * @param attached Default: false. All commands that support the detached option wil use it unless attached is specified as true (-d support: exec, logs, ps, restart, run, start, stop, up)
164
189
  * @param useDockerComposeFileDirectoryAsCwd Default: false. If true, the docker compose command will be run in the directory containing the docker compose file.
165
190
  */
166
191
  export interface DockerComposeOptions {
167
- args?: string[];
192
+ /** Additional arguments to pass to the docker-compose command. */
193
+ args: string[];
194
+ /**
195
+ * Defaults to `false`. Controls whether or not the `--detach` option is passed. Note that this only applies to
196
+ * some commands (exec, logs, ps, restart, run, start, stop, up).
197
+ */
198
+ attached: boolean;
199
+ /**
200
+ * If not provided, it will default to using the directory that the docker-compose.yml is located in.
201
+ * Specifies what current working directory to use with the spawn command.
202
+ */
203
+ cwd?: string;
204
+ /**
205
+ * Optional. If provided, projectName will be passed as the `--project-name` param to `docker compose` so that generated containers will use it as a prefix
206
+ * instead of the default, which is the directory name where the docker-compose.yml is located.
207
+ *
208
+ * Alternate approaches for setting the docker compose project name:
209
+ *
210
+ * - Locate your docker-compose.yml file in the root of your project so that docker will use that directory name for prefixing generated containers
211
+ * - OR, locate your docker-compose.yml in a sub-directory named appropriately for use as a prefix for generated containers
212
+ * - OR, put a `.env` file in the same directory as your docker-compose.yml
213
+ * with the entry `COMPOSE_PROJECT_NAME=your-project-name`
214
+ *
215
+ * Additional note on docker compose project names form the official docker compose docs: "Project names must contain only lowercase letters, decimal digits,
216
+ * dashes, and underscores, and must begin with a lowercase letter or decimal digit". See https://docs.docker.com/compose/environment-variables/envvars/#compose_project_name.
217
+ *
218
+ */
168
219
  projectName?: string;
169
- attached?: boolean;
170
- useDockerComposeFileDirectoryAsCwd?: boolean;
220
+ /**
221
+ * Optional. If provided, profile is passed to docker compose along with `--profile` param. Must match this regex: `[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
222
+ *
223
+ * See https://docs.docker.com/compose/profiles/.
224
+ */
225
+ profile?: string;
171
226
  }
172
227
  /**
173
- * For docker compose commands, see https://docs.docker.com/compose/reference/.
228
+ * For docker compose commands, see https://docs.docker.com/compose/reference/. For available options for this wrapper function, see {@link DockerComposeOptions}.
229
+ *
230
+ * The current working directory will be the directory of the {@link dockerComposePath} unless specified in the options. This ensures relative paths in the
231
+ * docker compose file will be relative to itself by default.
232
+ *
233
+ * See {@link DockerComposeOptions.projectName} for info on where to locate your docker compose file and how to specify the docker project name.
174
234
  * @param dockerComposePath Path to docker-compose.yml
175
235
  * @param dockerComposeCommand The docker-compose command to run
176
236
  * @param options {@link DockerComposeOptions} to use, including additional arguments to pass to the docker compose command and the project name
177
237
  */
178
- export declare function spawnDockerCompose(dockerComposePath: string, dockerComposeCommand: DockerComposeCommand, options?: DockerComposeOptions): Promise<void>;
238
+ export declare function spawnDockerCompose(dockerComposePath: string, dockerComposeCommand: DockerComposeCommand, options?: Partial<DockerComposeOptions>): Promise<void>;
179
239
  /**
180
- * Splits a string into lines, removing empty lines and carriage return characters.
240
+ * Splits a string into lines, removing `\n` and `\r` characters. Does not return empty lines. Also see {@link stringToLines}.
181
241
  * @param str String to split into lines
182
242
  * @returns An array of lines from the string, with empty lines removed
183
243
  */
184
244
  export declare function stringToNonEmptyLines(str: string): string[];
245
+ /**
246
+ * Splits a string into lines, removing `\n` and `\r` characters. Returns empty lines. Also see {@link stringToNonEmptyLines}.
247
+ * @param str String to split into lines
248
+ * @returns An array of lines from the string, with empty lines removed
249
+ */
250
+ export declare function stringToLines(str: string): string[];
185
251
  /**
186
252
  * Runs the requested command using NodeJS spawnSync wrapped in an outer Windows CMD.exe command and returns the result with stdout split into lines.
187
253
  *
188
254
  * Use this for simple quick commands that don't require a lot of control.
189
255
  *
190
256
  * For commands that aren't Windows and CMD specific, use {@link simpleSpawnSync}.
257
+ *
258
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
259
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
260
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
191
261
  * @param command Command to run
192
262
  * @param args Arguments to pass to the command
193
263
  * @returns An object with the status code, stdout, stderr, and error (if any)
194
264
  * @throws {@link SimpleSpawnError} if the command fails and throwOnNonZero is true
195
265
  */
196
266
  export declare function simpleCmdSync(command: string, args?: string[], throwOnNonZero?: boolean): SimpleSpawnResult;
267
+ /**
268
+ * Runs the requested command using {@link spawnAsync} wrapped in an outer Windows CMD.exe command and returns the result with stdout split into lines.
269
+ *
270
+ * Use this for simple quick commands that don't require a lot of control.
271
+ *
272
+ * For commands that aren't Windows and CMD specific, use {@link simpleSpawnAsync}.
273
+ *
274
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
275
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
276
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
277
+ * @param command Command to run
278
+ * @param args Arguments to pass to the command
279
+ * @returns An object with the status code, stdout, stderr, and error (if any)
280
+ * @throws {@link SimpleSpawnError} if the command fails and throwOnNonZero is true
281
+ */
282
+ export declare function simpleCmdAsync(command: string, args?: string[], throwOnNonZero?: boolean): Promise<SimpleSpawnResult>;
197
283
  /**
198
284
  * Runs the requested command using NodeJS spawnSync and returns the result with stdout split into lines.
199
285
  *
200
286
  * Use this for simple quick commands that don't require a lot of control.
201
287
  *
202
288
  * For commands that are Windows and CMD specific, use {@link simpleCmdSync}.
289
+ *
290
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
291
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
292
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
203
293
  * @param command Command to run
204
294
  * @param args Arguments to pass to the command
205
295
  * @returns An object with the status code, stdout, stderr, and error (if any)
206
296
  * @throws {@link SimpleSpawnError} if the command fails and throwOnNonZero is true
207
297
  */
208
298
  export declare function simpleSpawnSync(command: string, args?: string[], throwOnNonZero?: boolean): SimpleSpawnResult;
299
+ /**
300
+ * Runs the requested command using {@link spawnAsync} and returns the result with stdout split into lines.
301
+ *
302
+ * Use this for simple quick commands that don't require a lot of control.
303
+ *
304
+ * For commands that are Windows and CMD specific, use {@link simpleCmdSync}.
305
+ *
306
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
307
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
308
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
309
+ * @param command Command to run
310
+ * @param args Arguments to pass to the command
311
+ * @returns An object with the status code, stdout, stderr, and error (if any)
312
+ * @throws {@link SimpleSpawnError} if the command fails and throwOnNonZero is true
313
+ */
314
+ export declare function simpleSpawnAsync(command: string, args?: string[], throwOnNonZero?: boolean): Promise<SimpleSpawnResult>;
209
315
  /**
210
316
  * @returns `true` if platform() is 'win32', `false` otherwise
211
317
  */
@@ -217,20 +323,26 @@ export declare function isPlatformWindows(): boolean;
217
323
  export declare function isPlatformMac(): boolean;
218
324
  /**
219
325
  *
220
- * @returns `true` if {@link isPlatformWindows} and {@link isPlatformMac} are both `false, otherwise returns `false`
326
+ * @returns `true` if {@link isPlatformWindows} and {@link isPlatformMac} are both `false, otherwise returns `true`
221
327
  */
222
328
  export declare function isPlatformLinux(): boolean;
223
329
  /**
224
330
  * This is a cross-platform method to get the location of a system command. Useful for checking if software
225
- * is installed, where it's installed and whether there are multiple locations for a command.
331
+ * is installed, where it's installed and whether there are multiple locations.
332
+ * @param commandName The name of the command to find
333
+ * @returns The location of the command, any additional locations, and an error if one occurred
334
+ */
335
+ export declare function which(commandName: string): Promise<WhichResult>;
336
+ /**
337
+ * This is a cross-platform method to get the location of a system command. Useful for checking if software
338
+ * is installed, where it's installed and whether there are multiple locations.
226
339
  * @param commandName The name of the command to find
227
340
  * @returns The location of the command, any additional locations, and an error if one occurred
228
341
  */
229
342
  export declare function whichSync(commandName: string): WhichResult;
230
343
  /**
231
- * First checks if docker is installed and if not immediately returns false.
232
- *
233
- * Then runs the `docker info` command and looks for "error during connect" in the output to determine if docker is running.
344
+ * First checks if docker is installed and if not immediately returns false. Then runs the `docker info`
345
+ * command and looks for "error during connect" in the output to determine if docker is running.
234
346
  * @returns `true` if docker is installed and running, `false` otherwise
235
347
  */
236
348
  export declare function isDockerRunning(): Promise<boolean>;
@@ -305,9 +417,9 @@ export declare function sortDictionaryByKeyAsc(dict: StringKeyedDictionary): Str
305
417
  */
306
418
  export declare function deleteEnvIfExists(envPath: string): Promise<void>;
307
419
  export interface FindFilesOptions {
308
- maxDepth?: number;
309
- excludeDirectoryNames?: string[];
310
- returnForwardSlashRelativePaths?: boolean;
420
+ maxDepth: number;
421
+ excludeDirectoryNames: string[];
422
+ returnForwardSlashRelativePaths: boolean;
311
423
  }
312
424
  /**
313
425
  * Searches a directory recursively for files that match the specified pattern.
@@ -317,7 +429,137 @@ export interface FindFilesOptions {
317
429
  * @param options Specify a max depth to search, defaults to 5
318
430
  * @returns A Promise that resolves to an array of file paths that match the pattern
319
431
  */
320
- export declare function findFilesRecursively(dir: string, filenamePattern: string, options?: FindFilesOptions): Promise<string[]>;
432
+ export declare function findFilesRecursively(dir: string, filenamePattern: string, options?: Partial<FindFilesOptions>): Promise<string[]>;
321
433
  /** Utility function to escape a string for use within regex */
322
434
  export declare function escapeStringForRegex(str: string): string;
435
+ /**
436
+ * Logs the provided 2-dimensional string array as a formatted table.
437
+ *
438
+ * @param data 2-dimensional string array where the first row is the column headers
439
+ * @example
440
+ *
441
+ * logTable([
442
+ * ['Name', 'Age', 'Country'],
443
+ * ['Alice', '28', 'USA'],
444
+ * ['Bob', '22', 'Canada']
445
+ * ])
446
+ */
447
+ export declare function logTable(data: string[][]): void;
448
+ /**
449
+ * See {@link getPowershellHackArgs}.
450
+ */
451
+ export declare const powershellHackPrefix = "$env:PSModulePath = [Environment]::GetEnvironmentVariable('PSModulePath', 'Machine'); ";
452
+ /**
453
+ * Powershell doesn't load the system PSModulePath when running in a non-interactive shell.
454
+ * This is a workaround to set the PSModulePath environment variable to the system value before running a powershell command.
455
+ *
456
+ * **Warning:** Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
457
+ * This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
458
+ * See {@link winInstallCert} and {@link winUninstallCert} for examples of taking user input and inserting it safely into known commands.
459
+ * @param command The powershell command to run
460
+ * @returns An array of arguments to pass to {@link spawnAsync} with the "powershell" command as the first argument
461
+ */
462
+ export declare function getPowershellHackArgs(command: string): string[];
463
+ /**
464
+ * Returns a humanized string representation of the number of milliseconds using ms, seconds, minutes, or hours.
465
+ * @param milliseconds The number of milliseconds to humanize
466
+ * @returns A humanized string representation of the number
467
+ */
468
+ export declare function humanizeTime(milliseconds: number): string;
469
+ export declare class ExtendedError extends Error {
470
+ innerError: Error | null;
471
+ constructor(message: string, innerError?: Error);
472
+ }
473
+ export declare function getHostname(url: string): string;
474
+ export declare function isDirectory(path: string): Promise<boolean>;
475
+ export declare function isDirectorySync(path: string): boolean;
476
+ export type PlatformCode = 'win' | 'linux' | 'mac';
477
+ /**
478
+ * This is a somewhat naive method but is useful if you rarely or never deal with unusual operating systems.
479
+ * @returns `win`, `mac` or `linux`
480
+ */
481
+ export declare function getPlatformCode(): PlatformCode;
482
+ /**
483
+ * Tries connecting to a port to see if it's being listened on or not. It's likely that this won't work in a lot of scenarios, so use it at your own risk.
484
+ * @param port The port to check
485
+ * @returns `true` if the port is available, `false` otherwise
486
+ */
487
+ export declare function isPortAvailable(port: number): Promise<boolean>;
488
+ /**
489
+ * Returns the value for an environment variable or throws if it's undefined or null. Pass optional {@param throwOnEmpty} to throw when the key exists but has an empty value.
490
+ * @param varName The name of the environment variable to get.
491
+ * @param throwOnEmpty Throw an error if key exists (not undefined or null) but is empty.
492
+ * @returns
493
+ */
494
+ export declare function getRequiredEnvVar(varName: string, throwOnEmpty?: boolean): string;
495
+ /** Options for {@link withRetryAsync}. */
496
+ export interface WithRetryOptions {
497
+ /**
498
+ * Number of milliseconds to wait before the first attempt.
499
+ */
500
+ initialDelayMilliseconds: number;
501
+ /**
502
+ * Use this in log messages instead of the function name (useful for passing lambdas which would otherwise display as "anonymous").
503
+ */
504
+ functionLabel?: string;
505
+ /**
506
+ * If NodeCliUtilsConfig.traceEnabled is `true` then messages will be logged even if this option is `false`.
507
+ * Set to `true` to log messages even if Node ]
508
+ */
509
+ traceEnabled: boolean;
510
+ }
511
+ export declare function getNormalizedError(err: unknown): Error;
512
+ /**
513
+ * Call a function until it succeeds. Will stop after the number of calls specified by {@param maxCalls}, or forever if -1 is passed.
514
+ * @param func The function to call
515
+ * @param maxCalls The maximum number of times to call the function before giving up. Pass -1 to retry forever.
516
+ * @param delayMilliseconds The number of milliseconds to wait between calls
517
+ * @param options Options for controlling the behavior of the retry. See {@link WithRetryOptions}.
518
+ */
519
+ export declare function withRetryAsync(func: () => Promise<void>, maxCalls: number, delayMilliseconds: number, options?: Partial<WithRetryOptions>): Promise<void>;
520
+ /**
521
+ * Collapses each instance of consecutive whitespace characters into a single space.
522
+ */
523
+ export declare function collapseWhitespace(str: string): string;
524
+ /**
525
+ * Check if a string is a valid directory name. This is a very simple check that just makes sure the string doesn't contain any invalid characters.
526
+ * @param dirName The directory name to check
527
+ * @returns `true` if the directory name is valid, `false` otherwise
528
+ */
529
+ export declare function isValidDirName(dirName: string): boolean;
530
+ export declare function hasWhitespace(str: string): boolean;
531
+ export declare function stripShellMetaCharacters(input: string): string;
532
+ export declare enum AnsiColor {
533
+ RESET = "\u001B[0m",
534
+ RED = "\u001B[31m",
535
+ GREEN = "\u001B[32m",
536
+ YELLOW = "\u001B[33m",
537
+ CYAN = "\u001B[96m",
538
+ GRAY = "\u001B[90m",
539
+ PURPLE = "\u001B[35m"
540
+ }
541
+ export declare const color: (str: string, colorAnsiCode: AnsiColor) => string;
542
+ export declare const red: (str: string) => string;
543
+ export declare const green: (str: string) => string;
544
+ export declare const cyan: (str: string) => string;
545
+ export declare const gray: (str: string) => string;
546
+ export declare const purple: (str: string) => string;
547
+ export declare const yellow: (str: string) => string;
548
+ export declare enum Emoji {
549
+ RightArrow = "\u27A1\uFE0F",
550
+ LeftArrow = "\u2B05\uFE0F",
551
+ GreenCheck = "\u2705",
552
+ Warning = "\u26A0\uFE0F",
553
+ Lightning = "\u26A1",
554
+ Exclamation = "\u2757",
555
+ RedQuestion = "\u2753",
556
+ RedX = "\u274C",
557
+ Info = "\u2139\uFE0F",
558
+ SadFace = "\uD83D\uDE22",
559
+ Tools = "\uD83D\uDEE0\uFE0F",
560
+ NoEntry = "\u26D4",
561
+ Stop = "\uD83D\uDED1",
562
+ Certificate = "\uD83D\uDCDC",
563
+ Key = "\uD83D\uDD11"
564
+ }
323
565
  //# sourceMappingURL=generalUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generalUtils.d.ts","sourceRoot":"","sources":["../../src/generalUtils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAmB,MAAM,oBAAoB,CAAA;AAWlE;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,QAExD;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,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