cloudstructs 0.6.1 → 0.6.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 (99) hide show
  1. package/.gitattributes +1 -0
  2. package/.jsii +3 -3
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/ecs-service-roller/index.js +2 -2
  5. package/lib/email-receiver/receiver.js +1 -1
  6. package/lib/saml-identity-provider/index.js +2 -2
  7. package/lib/slack-app/manifest.js +1 -1
  8. package/lib/slack-app/slack-app.js +2 -2
  9. package/lib/slack-events/index.js +1 -1
  10. package/lib/slack-textract/index.js +1 -1
  11. package/lib/state-machine-cr-provider/index.js +1 -1
  12. package/lib/static-website/index.js +1 -1
  13. package/lib/toolkit-cleaner/index.js +1 -1
  14. package/lib/url-shortener/index.js +1 -1
  15. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  16. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1 -1
  17. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +3 -3
  18. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +4 -3
  19. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +1 -1
  20. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +1 -1
  21. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -1
  22. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +2 -2
  23. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
  24. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +30 -19
  25. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +1 -1
  26. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +187 -0
  27. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +1 -1
  28. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +2 -2
  29. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  30. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +1 -1
  31. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +3 -3
  32. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +4 -3
  33. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +1 -1
  34. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +1 -1
  35. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -1
  36. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +2 -2
  37. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  38. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +30 -19
  39. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +1 -1
  40. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +187 -0
  41. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +1 -1
  42. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +2 -2
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +1 -1
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +3 -3
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +4 -3
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +1 -1
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +1 -1
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -1
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +2 -2
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +30 -19
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1 -1
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +187 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +1 -1
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +2 -2
  57. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  58. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +1 -1
  59. package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +3 -3
  60. package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +4 -3
  61. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +1 -1
  62. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +1 -1
  63. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -1
  64. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +2 -2
  65. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
  66. package/node_modules/@types/is-stream/node_modules/@types/node/path.d.ts +30 -19
  67. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +1 -1
  68. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +187 -0
  69. package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +1 -1
  70. package/node_modules/@types/is-stream/node_modules/@types/node/worker_threads.d.ts +2 -2
  71. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  72. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +1 -1
  73. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +3 -3
  74. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +4 -3
  75. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +1 -1
  76. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +1 -1
  77. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -1
  78. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +2 -2
  79. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
  80. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +30 -19
  81. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1 -1
  82. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +187 -0
  83. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +1 -1
  84. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +2 -2
  85. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  86. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +1 -1
  87. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +3 -3
  88. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +4 -3
  89. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +1 -1
  90. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +1 -1
  91. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -1
  92. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +2 -2
  93. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
  94. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +30 -19
  95. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1 -1
  96. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +187 -0
  97. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +1 -1
  98. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +2 -2
  99. package/package.json +8 -8
@@ -1105,6 +1105,193 @@ declare module 'util' {
1105
1105
  */
1106
1106
  encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
1107
1107
  }
1108
+
1109
+ /**
1110
+ * Provides a high-level API for command-line argument parsing. Takes a
1111
+ * specification for the expected arguments and returns a structured object
1112
+ * with the parsed values and positionals.
1113
+ *
1114
+ * `config` provides arguments for parsing and configures the parser. It
1115
+ * supports the following properties:
1116
+ *
1117
+ * - `args` The array of argument strings. **Default:** `process.argv` with
1118
+ * `execPath` and `filename` removed.
1119
+ * - `options` Arguments known to the parser. Keys of `options` are the long
1120
+ * names of options and values are objects accepting the following properties:
1121
+ *
1122
+ * - `type` Type of argument, which must be either `boolean` (for options
1123
+ * which do not take values) or `string` (for options which do).
1124
+ * - `multiple` Whether this option can be provided multiple
1125
+ * times. If `true`, all values will be collected in an array. If
1126
+ * `false`, values for the option are last-wins. **Default:** `false`.
1127
+ * - `short` A single character alias for the option.
1128
+ *
1129
+ * - `strict`: Whether an error should be thrown when unknown arguments
1130
+ * are encountered, or when arguments are passed that do not match the
1131
+ * `type` configured in `options`. **Default:** `true`.
1132
+ * - `allowPositionals`: Whether this command accepts positional arguments.
1133
+ * **Default:** `false` if `strict` is `true`, otherwise `true`.
1134
+ * - `tokens`: Whether tokens {boolean} Return the parsed tokens. This is useful
1135
+ * for extending the built-in behavior, from adding additional checks through
1136
+ * to reprocessing the tokens in different ways.
1137
+ * **Default:** `false`.
1138
+ *
1139
+ * @returns The parsed command line arguments:
1140
+ *
1141
+ * - `values` A mapping of parsed option names with their string
1142
+ * or boolean values.
1143
+ * - `positionals` Positional arguments.
1144
+ * - `tokens` Detailed parse information (only if `tokens` was specified).
1145
+ *
1146
+ */
1147
+ export function parseArgs<T extends ParseArgsConfig>(config: T): ParsedResults<T>;
1148
+
1149
+ interface ParseArgsOptionConfig {
1150
+ type: 'string' | 'boolean';
1151
+ short?: string;
1152
+ multiple?: boolean;
1153
+ }
1154
+
1155
+ interface ParseArgsOptionsConfig {
1156
+ [longOption: string]: ParseArgsOptionConfig;
1157
+ }
1158
+
1159
+ export interface ParseArgsConfig {
1160
+ strict?: boolean;
1161
+ allowPositionals?: boolean;
1162
+ tokens?: boolean;
1163
+ options?: ParseArgsOptionsConfig;
1164
+ args?: string[];
1165
+ }
1166
+
1167
+ /*
1168
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
1169
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
1170
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
1171
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
1172
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
1173
+ This is technically incorrect but is a much nicer UX for the common case.
1174
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
1175
+ */
1176
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
1177
+ ? IfTrue
1178
+ : T extends false
1179
+ ? IfFalse
1180
+ : IfTrue;
1181
+
1182
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
1183
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
1184
+ ? IfFalse
1185
+ : T extends true
1186
+ ? IfTrue
1187
+ : IfFalse;
1188
+
1189
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
1190
+ T['strict'],
1191
+ O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
1192
+ string | boolean
1193
+ >;
1194
+
1195
+ type ParsedValues<T extends ParseArgsConfig> =
1196
+ & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
1197
+ & (T['options'] extends ParseArgsOptionsConfig
1198
+ ? {
1199
+ -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
1200
+ T['options'][LongOption]['multiple'],
1201
+ undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
1202
+ undefined | ExtractOptionValue<T, T['options'][LongOption]>
1203
+ >;
1204
+ }
1205
+ : {});
1206
+
1207
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
1208
+ T['strict'],
1209
+ IfDefaultsFalse<T['allowPositionals'], string[], []>,
1210
+ IfDefaultsTrue<T['allowPositionals'], string[], []>
1211
+ >;
1212
+
1213
+ type PreciseTokenForOptions<
1214
+ K extends string,
1215
+ O extends ParseArgsOptionConfig,
1216
+ > = O['type'] extends 'string'
1217
+ ? {
1218
+ kind: 'option';
1219
+ index: number;
1220
+ name: K;
1221
+ rawName: string;
1222
+ value: string;
1223
+ inlineValue: boolean;
1224
+ }
1225
+ : O['type'] extends 'boolean'
1226
+ ? {
1227
+ kind: 'option';
1228
+ index: number;
1229
+ name: K;
1230
+ rawName: string;
1231
+ value: undefined;
1232
+ inlineValue: undefined;
1233
+ }
1234
+ : OptionToken & { name: K };
1235
+
1236
+ type TokenForOptions<
1237
+ T extends ParseArgsConfig,
1238
+ K extends keyof T['options'] = keyof T['options'],
1239
+ > = K extends unknown
1240
+ ? T['options'] extends ParseArgsOptionsConfig
1241
+ ? PreciseTokenForOptions<K & string, T['options'][K]>
1242
+ : OptionToken
1243
+ : never;
1244
+
1245
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
1246
+
1247
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
1248
+ T['strict'],
1249
+ IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
1250
+ IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
1251
+ >;
1252
+
1253
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
1254
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
1255
+ >;
1256
+
1257
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
1258
+ T['tokens'],
1259
+ {
1260
+ values: ParsedValues<T>;
1261
+ positionals: ParsedPositionals<T>;
1262
+ tokens: ParsedTokens<T>;
1263
+ },
1264
+ {
1265
+ values: ParsedValues<T>;
1266
+ positionals: ParsedPositionals<T>;
1267
+ }
1268
+ >;
1269
+
1270
+ type OptionToken =
1271
+ | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
1272
+ | {
1273
+ kind: 'option';
1274
+ index: number;
1275
+ name: string;
1276
+ rawName: string;
1277
+ value: undefined;
1278
+ inlineValue: undefined;
1279
+ };
1280
+
1281
+ type Token =
1282
+ | OptionToken
1283
+ | { kind: 'positional'; index: number; value: string }
1284
+ | { kind: 'option-terminator'; index: number };
1285
+
1286
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
1287
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
1288
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
1289
+ ? {
1290
+ values: { [longOption: string]: undefined | string | boolean | Array<string | boolean> };
1291
+ positionals: string[];
1292
+ tokens?: Token[];
1293
+ }
1294
+ : PreciseParsedResults<T>;
1108
1295
  }
1109
1296
  declare module 'util/types' {
1110
1297
  export * from 'util/types';
@@ -223,7 +223,7 @@ declare module 'vm' {
223
223
  runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
224
224
  /**
225
225
  * Runs the compiled code contained by the `vm.Script` within the context of the
226
- * current `global` object. Running code does not have access to local scope, but_does_ have access to the current `global` object.
226
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
227
227
  *
228
228
  * The following example compiles code that increments a `global` variable then
229
229
  * executes that code multiple times:
@@ -175,7 +175,7 @@ declare module 'worker_threads' {
175
175
  */
176
176
  postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
177
177
  /**
178
- * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does_not_ let the program exit if it's the only active handle left (the default
178
+ * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
179
179
  * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
180
180
  *
181
181
  * If listeners are attached or removed using `.on('message')`, the port
@@ -400,7 +400,7 @@ declare module 'worker_threads' {
400
400
  */
401
401
  postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
402
402
  /**
403
- * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does_not_ let the program exit if it's the only active handle left (the default
403
+ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
404
404
  * behavior). If the worker is `ref()`ed, calling `ref()` again has
405
405
  * no effect.
406
406
  * @since v10.5.0
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 28 Jul 2022 02:32:30 GMT
11
+ * Last updated: Wed, 10 Aug 2022 20:02:19 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
@@ -480,7 +480,7 @@ declare module 'buffer' {
480
480
  * if `size` is 0.
481
481
  *
482
482
  * The underlying memory for `Buffer` instances created in this way is _not_
483
- * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `buf.fill(0)` to initialize
483
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
484
484
  * such `Buffer` instances with zeroes.
485
485
  *
486
486
  * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
@@ -393,8 +393,8 @@ declare module 'events' {
393
393
  * called multiple times to remove each instance.
394
394
  *
395
395
  * Once an event is emitted, all listeners attached to it at the
396
- * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and_before_ the last listener finishes execution will
397
- * not remove them from`emit()` in progress. Subsequent events behave as expected.
396
+ * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
397
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
398
398
  *
399
399
  * ```js
400
400
  * const myEmitter = new MyEmitter();
@@ -596,7 +596,7 @@ declare module 'events' {
596
596
  */
597
597
  prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
598
598
  /**
599
- * Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this
599
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
600
600
  * listener is removed, and then invoked.
601
601
  *
602
602
  * ```js
@@ -33,6 +33,7 @@ declare module 'fs/promises' {
33
33
  WatchEventType,
34
34
  CopyOptions,
35
35
  ReadStream,
36
+ TimeLike,
36
37
  WriteStream,
37
38
  } from 'node:fs';
38
39
  interface FileChangeInfo<T extends string | Buffer> {
@@ -329,7 +330,7 @@ declare module 'fs/promises' {
329
330
  * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
330
331
  * @since v10.0.0
331
332
  */
332
- utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
333
+ utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
333
334
  /**
334
335
  * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
335
336
  * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
@@ -762,7 +763,7 @@ declare module 'fs/promises' {
762
763
  * @since v14.5.0, v12.19.0
763
764
  * @return Fulfills with `undefined` upon success.
764
765
  */
765
- function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
766
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
766
767
  /**
767
768
  * Changes the ownership of a file.
768
769
  * @since v10.0.0
@@ -780,7 +781,7 @@ declare module 'fs/promises' {
780
781
  * @since v10.0.0
781
782
  * @return Fulfills with `undefined` upon success.
782
783
  */
783
- function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
784
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
784
785
  /**
785
786
  * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
786
787
  *
@@ -1395,7 +1395,7 @@ declare module 'fs' {
1395
1395
  * Use `fs.rm(path, { recursive: true, force: true })` instead.
1396
1396
  *
1397
1397
  * If `true`, perform a recursive directory removal. In
1398
- * recursive mode soperations are retried on failure.
1398
+ * recursive mode, operations are retried on failure.
1399
1399
  * @default false
1400
1400
  */
1401
1401
  recursive?: boolean | undefined;
@@ -1642,7 +1642,7 @@ declare module 'http2' {
1642
1642
  * be called multiple times to provide successive parts of the body.
1643
1643
  *
1644
1644
  * In the `http` module, the response body is omitted when the
1645
- * request is a HEAD request. Similarly, the `204` and `304` responses_must not_ include a message body.
1645
+ * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
1646
1646
  *
1647
1647
  * `chunk` can be a string or a buffer. If `chunk` is a string,
1648
1648
  * the second parameter specifies how to encode it into a byte stream.
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 18.6
1
+ // Type definitions for non-npm package Node.js 18.7
2
2
  // Project: https://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -205,7 +205,7 @@ declare module 'net' {
205
205
  */
206
206
  unref(): this;
207
207
  /**
208
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will_not_ let the program exit if it's the only socket left (the default behavior).
208
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
209
209
  * If the socket is `ref`ed calling `ref` again will have no effect.
210
210
  * @since v0.9.1
211
211
  * @return The socket itself.
@@ -504,7 +504,7 @@ declare module 'net' {
504
504
  */
505
505
  getConnections(cb: (error: Error | null, count: number) => void): void;
506
506
  /**
507
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will_not_ let the program exit if it's the only server left (the default behavior).
507
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
508
508
  * If the server is `ref`ed calling `ref()` again will have no effect.
509
509
  * @since v0.9.1
510
510
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.6.2",
3
+ "version": "18.7.1",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  },
221
221
  "scripts": {},
222
222
  "dependencies": {},
223
- "typesPublisherContentHash": "a7df569b45848b5af802c513c0bac5e342b40f2297a1492597939b74c0033e42",
223
+ "typesPublisherContentHash": "dabf6406f99a6dad52b569d7fc0180c6fdcb855b56d14b54fb274ff38f94d24f",
224
224
  "typeScriptVersion": "4.0"
225
225
  }
@@ -69,18 +69,19 @@ declare module 'path' {
69
69
  * Normalize a string path, reducing '..' and '.' parts.
70
70
  * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
71
71
  *
72
- * @param p string path to normalize.
72
+ * @param path string path to normalize.
73
+ * @throws {TypeError} if `path` is not a string.
73
74
  */
74
- normalize(p: string): string;
75
+ normalize(path: string): string;
75
76
  /**
76
77
  * Join all arguments together and normalize the resulting path.
77
- * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
78
78
  *
79
79
  * @param paths paths to join.
80
+ * @throws {TypeError} if any of the path segments is not a string.
80
81
  */
81
82
  join(...paths: string[]): string;
82
83
  /**
83
- * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
84
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
84
85
  *
85
86
  * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
86
87
  *
@@ -89,41 +90,50 @@ declare module 'path' {
89
90
  * the current working directory is used as well. The resulting path is normalized,
90
91
  * and trailing slashes are removed unless the path gets resolved to the root directory.
91
92
  *
92
- * @param pathSegments string paths to join. Non-string arguments are ignored.
93
+ * @param paths A sequence of paths or path segments.
94
+ * @throws {TypeError} if any of the arguments is not a string.
93
95
  */
94
- resolve(...pathSegments: string[]): string;
96
+ resolve(...paths: string[]): string;
95
97
  /**
96
98
  * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
97
99
  *
100
+ * If the given {path} is a zero-length string, `false` will be returned.
101
+ *
98
102
  * @param path path to test.
103
+ * @throws {TypeError} if `path` is not a string.
99
104
  */
100
- isAbsolute(p: string): boolean;
105
+ isAbsolute(path: string): boolean;
101
106
  /**
102
- * Solve the relative path from {from} to {to}.
107
+ * Solve the relative path from {from} to {to} based on the current working directory.
103
108
  * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
109
+ *
110
+ * @throws {TypeError} if either `from` or `to` is not a string.
104
111
  */
105
112
  relative(from: string, to: string): string;
106
113
  /**
107
114
  * Return the directory name of a path. Similar to the Unix dirname command.
108
115
  *
109
- * @param p the path to evaluate.
116
+ * @param path the path to evaluate.
117
+ * @throws {TypeError} if `path` is not a string.
110
118
  */
111
- dirname(p: string): string;
119
+ dirname(path: string): string;
112
120
  /**
113
121
  * Return the last portion of a path. Similar to the Unix basename command.
114
122
  * Often used to extract the file name from a fully qualified path.
115
123
  *
116
- * @param p the path to evaluate.
124
+ * @param path the path to evaluate.
117
125
  * @param ext optionally, an extension to remove from the result.
126
+ * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
118
127
  */
119
- basename(p: string, ext?: string): string;
128
+ basename(path: string, ext?: string): string;
120
129
  /**
121
130
  * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
122
- * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
131
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
123
132
  *
124
- * @param p the path to evaluate.
133
+ * @param path the path to evaluate.
134
+ * @throws {TypeError} if `path` is not a string.
125
135
  */
126
- extname(p: string): string;
136
+ extname(path: string): string;
127
137
  /**
128
138
  * The platform-specific file separator. '\\' or '/'.
129
139
  */
@@ -135,15 +145,16 @@ declare module 'path' {
135
145
  /**
136
146
  * Returns an object from a path string - the opposite of format().
137
147
  *
138
- * @param pathString path to evaluate.
148
+ * @param path path to evaluate.
149
+ * @throws {TypeError} if `path` is not a string.
139
150
  */
140
- parse(p: string): ParsedPath;
151
+ parse(path: string): ParsedPath;
141
152
  /**
142
153
  * Returns a path string from an object - the opposite of parse().
143
154
  *
144
- * @param pathString path to evaluate.
155
+ * @param pathObject path to evaluate.
145
156
  */
146
- format(pP: FormatInputPathObject): string;
157
+ format(pathObject: FormatInputPathObject): string;
147
158
  /**
148
159
  * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
149
160
  * If path is not a string, path will be returned without modifications.
@@ -590,7 +590,7 @@ declare module 'process' {
590
590
  *
591
591
  * The reason this is problematic is because writes to `process.stdout` in Node.js
592
592
  * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
593
- * event loop. Calling `process.exit()`, however, forces the process to exit_before_ those additional writes to `stdout` can be performed.
593
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
594
594
  *
595
595
  * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
596
596
  * scheduling any additional work for the event loop: