cdk-common 2.0.1351 → 2.0.1353

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 (168) hide show
  1. package/.jsii +38 -2
  2. package/API.md +36 -0
  3. package/lib/main.js +1 -1
  4. package/lib/managed-policies.d.ts +7 -1
  5. package/lib/managed-policies.js +7 -1
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +5 -11
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +9 -169
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +8 -8
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -7
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +44 -168
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +16 -64
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +240 -332
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +49 -351
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +3 -4
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +279 -1631
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +15 -51
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +3 -3
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +131 -132
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +13 -17
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +869 -791
  23. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +7 -8
  24. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +417 -455
  25. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +6 -26
  26. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +60 -0
  27. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +263 -254
  28. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +528 -804
  29. package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +59 -239
  30. package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +15 -1
  31. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +41 -0
  32. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +6 -59
  33. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.generated.d.ts +3 -10
  34. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +47 -122
  35. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +63 -184
  36. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +6 -6
  37. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  38. package/node_modules/@types/concat-stream/node_modules/@types/node/path/posix.d.ts +8 -0
  39. package/node_modules/@types/concat-stream/node_modules/@types/node/path/win32.d.ts +8 -0
  40. package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +120 -133
  41. package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +282 -643
  42. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +156 -128
  43. package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +5 -5
  44. package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +4 -4
  45. package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +910 -0
  46. package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +3 -3
  47. package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +67 -120
  48. package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +75 -98
  49. package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
  50. package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +2 -2
  51. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +10 -10
  52. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/promises.d.ts +136 -15
  53. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +176 -453
  54. package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +555 -478
  55. package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +4 -4
  56. package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +96 -0
  57. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +80 -180
  58. package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +4 -4
  59. package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +4 -130
  60. package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +102 -177
  61. package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +9 -9
  62. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
  63. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +15 -1
  64. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +15 -1
  65. package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +58 -16
  66. package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +54 -592
  67. package/node_modules/@types/concat-stream/node_modules/@types/node/util/types.d.ts +558 -0
  68. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +120 -792
  69. package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +32 -5
  70. package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +13 -13
  71. package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +4 -4
  72. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
  73. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  74. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/console.d.ts +9 -0
  75. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
  76. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  77. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/events.d.ts +9 -0
  78. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
  79. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  80. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  81. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  82. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/streams.d.ts +93 -0
  83. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  84. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/url.d.ts +24 -0
  85. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +176 -358
  86. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +8 -71
  87. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  88. package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +5 -11
  89. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +9 -169
  90. package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +8 -8
  91. package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -7
  92. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +44 -168
  93. package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +16 -64
  94. package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +240 -332
  95. package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +49 -351
  96. package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +3 -4
  97. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +279 -1631
  98. package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +15 -51
  99. package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  100. package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +3 -3
  101. package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +131 -132
  102. package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +13 -17
  103. package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +869 -791
  104. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +7 -8
  105. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +417 -455
  106. package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +6 -26
  107. package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +60 -0
  108. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +263 -254
  109. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +528 -804
  110. package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +59 -239
  111. package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +15 -1
  112. package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +41 -0
  113. package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +6 -59
  114. package/node_modules/@types/form-data/node_modules/@types/node/inspector.generated.d.ts +3 -10
  115. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +47 -122
  116. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +63 -184
  117. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +6 -6
  118. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  119. package/node_modules/@types/form-data/node_modules/@types/node/path/posix.d.ts +8 -0
  120. package/node_modules/@types/form-data/node_modules/@types/node/path/win32.d.ts +8 -0
  121. package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +120 -133
  122. package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +282 -643
  123. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +156 -128
  124. package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +5 -5
  125. package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +4 -4
  126. package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +910 -0
  127. package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +3 -3
  128. package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +67 -120
  129. package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +75 -98
  130. package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
  131. package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +2 -2
  132. package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +10 -10
  133. package/node_modules/@types/form-data/node_modules/@types/node/stream/promises.d.ts +136 -15
  134. package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +176 -453
  135. package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +555 -478
  136. package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +4 -4
  137. package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +96 -0
  138. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +80 -180
  139. package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +4 -4
  140. package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +4 -130
  141. package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +102 -177
  142. package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +9 -9
  143. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
  144. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +15 -1
  145. package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +15 -1
  146. package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +58 -16
  147. package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +54 -592
  148. package/node_modules/@types/form-data/node_modules/@types/node/util/types.d.ts +558 -0
  149. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +120 -792
  150. package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +32 -5
  151. package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +13 -13
  152. package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +4 -4
  153. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
  154. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  155. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/console.d.ts +9 -0
  156. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
  157. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  158. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/events.d.ts +9 -0
  159. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
  160. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  161. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  162. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  163. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/streams.d.ts +93 -0
  164. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  165. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/url.d.ts +24 -0
  166. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +176 -358
  167. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +8 -71
  168. package/package.json +4 -4
@@ -0,0 +1,8 @@
1
+ declare module "node:path/posix" {
2
+ import path = require("node:path");
3
+ export = path.posix;
4
+ }
5
+ declare module "path/posix" {
6
+ import path = require("path");
7
+ export = path.posix;
8
+ }
@@ -0,0 +1,8 @@
1
+ declare module "node:path/win32" {
2
+ import path = require("node:path");
3
+ export = path.win32;
4
+ }
5
+ declare module "path/win32" {
6
+ import path = require("path");
7
+ export = path.win32;
8
+ }
@@ -1,11 +1,3 @@
1
- declare module "path/posix" {
2
- import path = require("path");
3
- export = path;
4
- }
5
- declare module "path/win32" {
6
- import path = require("path");
7
- export = path;
8
- }
9
1
  /**
10
2
  * The `node:path` module provides utilities for working with file and directory
11
3
  * paths. It can be accessed using:
@@ -13,9 +5,9 @@ declare module "path/win32" {
13
5
  * ```js
14
6
  * import path from 'node:path';
15
7
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/path.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/path.js)
17
9
  */
18
- declare module "path" {
10
+ declare module "node:path" {
19
11
  namespace path {
20
12
  /**
21
13
  * A parsed path object generated by path.parse() or consumed by path.format().
@@ -64,137 +56,132 @@ declare module "path" {
64
56
  */
65
57
  name?: string | undefined;
66
58
  }
67
- interface PlatformPath {
68
- /**
69
- * Normalize a string path, reducing '..' and '.' parts.
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. If the path is a zero-length string, '.' is returned, representing the current working directory.
71
- *
72
- * @param path string path to normalize.
73
- * @throws {TypeError} if `path` is not a string.
74
- */
75
- normalize(path: string): string;
76
- /**
77
- * Join all arguments together and normalize the resulting path.
78
- *
79
- * @param paths paths to join.
80
- * @throws {TypeError} if any of the path segments is not a string.
81
- */
82
- join(...paths: string[]): string;
83
- /**
84
- * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
85
- *
86
- * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
87
- *
88
- * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
89
- * until an absolute path is found. If after using all {from} paths still no absolute path is found,
90
- * the current working directory is used as well. The resulting path is normalized,
91
- * and trailing slashes are removed unless the path gets resolved to the root directory.
92
- *
93
- * @param paths A sequence of paths or path segments.
94
- * @throws {TypeError} if any of the arguments is not a string.
95
- */
96
- resolve(...paths: string[]): string;
97
- /**
98
- * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
99
- * @param path The path to glob-match against.
100
- * @param pattern The glob to check the path against.
101
- * @returns Whether or not the `path` matched the `pattern`.
102
- * @throws {TypeError} if `path` or `pattern` are not strings.
103
- * @since v22.5.0
104
- */
105
- matchesGlob(path: string, pattern: string): boolean;
106
- /**
107
- * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
108
- *
109
- * If the given {path} is a zero-length string, `false` will be returned.
110
- *
111
- * @param path path to test.
112
- * @throws {TypeError} if `path` is not a string.
113
- */
114
- isAbsolute(path: string): boolean;
115
- /**
116
- * Solve the relative path from {from} to {to} based on the current working directory.
117
- * 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.
118
- *
119
- * @throws {TypeError} if either `from` or `to` is not a string.
120
- */
121
- relative(from: string, to: string): string;
122
- /**
123
- * Return the directory name of a path. Similar to the Unix dirname command.
124
- *
125
- * @param path the path to evaluate.
126
- * @throws {TypeError} if `path` is not a string.
127
- */
128
- dirname(path: string): string;
129
- /**
130
- * Return the last portion of a path. Similar to the Unix basename command.
131
- * Often used to extract the file name from a fully qualified path.
132
- *
133
- * @param path the path to evaluate.
134
- * @param suffix optionally, an extension to remove from the result.
135
- * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
136
- */
137
- basename(path: string, suffix?: string): string;
138
- /**
139
- * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
140
- * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
141
- *
142
- * @param path the path to evaluate.
143
- * @throws {TypeError} if `path` is not a string.
144
- */
145
- extname(path: string): string;
146
- /**
147
- * The platform-specific file separator. '\\' or '/'.
148
- */
149
- readonly sep: "\\" | "/";
150
- /**
151
- * The platform-specific file delimiter. ';' or ':'.
152
- */
153
- readonly delimiter: ";" | ":";
59
+ /**
60
+ * Normalize a string path, reducing '..' and '.' parts.
61
+ * 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. If the path is a zero-length string, '.' is returned, representing the current working directory.
62
+ *
63
+ * @param path string path to normalize.
64
+ * @throws {TypeError} if `path` is not a string.
65
+ */
66
+ function normalize(path: string): string;
67
+ /**
68
+ * Join all arguments together and normalize the resulting path.
69
+ *
70
+ * @param paths paths to join.
71
+ * @throws {TypeError} if any of the path segments is not a string.
72
+ */
73
+ function join(...paths: string[]): string;
74
+ /**
75
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
76
+ *
77
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
78
+ *
79
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
80
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
81
+ * the current working directory is used as well. The resulting path is normalized,
82
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
83
+ *
84
+ * @param paths A sequence of paths or path segments.
85
+ * @throws {TypeError} if any of the arguments is not a string.
86
+ */
87
+ function resolve(...paths: string[]): string;
88
+ /**
89
+ * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
90
+ * @param path The path to glob-match against.
91
+ * @param pattern The glob to check the path against.
92
+ * @returns Whether or not the `path` matched the `pattern`.
93
+ * @throws {TypeError} if `path` or `pattern` are not strings.
94
+ * @since v22.5.0
95
+ */
96
+ function matchesGlob(path: string, pattern: string): boolean;
97
+ /**
98
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
99
+ *
100
+ * If the given {path} is a zero-length string, `false` will be returned.
101
+ *
102
+ * @param path path to test.
103
+ * @throws {TypeError} if `path` is not a string.
104
+ */
105
+ function isAbsolute(path: string): boolean;
106
+ /**
107
+ * Solve the relative path from {from} to {to} based on the current working directory.
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.
111
+ */
112
+ function relative(from: string, to: string): string;
113
+ /**
114
+ * Return the directory name of a path. Similar to the Unix dirname command.
115
+ *
116
+ * @param path the path to evaluate.
117
+ * @throws {TypeError} if `path` is not a string.
118
+ */
119
+ function dirname(path: string): string;
120
+ /**
121
+ * Return the last portion of a path. Similar to the Unix basename command.
122
+ * Often used to extract the file name from a fully qualified path.
123
+ *
124
+ * @param path the path to evaluate.
125
+ * @param suffix 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.
127
+ */
128
+ function basename(path: string, suffix?: string): string;
129
+ /**
130
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
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.
132
+ *
133
+ * @param path the path to evaluate.
134
+ * @throws {TypeError} if `path` is not a string.
135
+ */
136
+ function extname(path: string): string;
137
+ /**
138
+ * The platform-specific file separator. '\\' or '/'.
139
+ */
140
+ const sep: "\\" | "/";
141
+ /**
142
+ * The platform-specific file delimiter. ';' or ':'.
143
+ */
144
+ const delimiter: ";" | ":";
145
+ /**
146
+ * Returns an object from a path string - the opposite of format().
147
+ *
148
+ * @param path path to evaluate.
149
+ * @throws {TypeError} if `path` is not a string.
150
+ */
151
+ function parse(path: string): ParsedPath;
152
+ /**
153
+ * Returns a path string from an object - the opposite of parse().
154
+ *
155
+ * @param pathObject path to evaluate.
156
+ */
157
+ function format(pathObject: FormatInputPathObject): string;
158
+ /**
159
+ * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
160
+ * If path is not a string, path will be returned without modifications.
161
+ * This method is meaningful only on Windows system.
162
+ * On POSIX systems, the method is non-operational and always returns path without modifications.
163
+ */
164
+ function toNamespacedPath(path: string): string;
165
+ }
166
+ namespace path {
167
+ export {
154
168
  /**
155
- * Returns an object from a path string - the opposite of format().
169
+ * The `path.posix` property provides access to POSIX specific implementations of the `path` methods.
156
170
  *
157
- * @param path path to evaluate.
158
- * @throws {TypeError} if `path` is not a string.
171
+ * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`.
159
172
  */
160
- parse(path: string): ParsedPath;
173
+ path as posix,
161
174
  /**
162
- * Returns a path string from an object - the opposite of parse().
175
+ * The `path.win32` property provides access to Windows-specific implementations of the `path` methods.
163
176
  *
164
- * @param pathObject path to evaluate.
165
- */
166
- format(pathObject: FormatInputPathObject): string;
167
- /**
168
- * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
169
- * If path is not a string, path will be returned without modifications.
170
- * This method is meaningful only on Windows system.
171
- * On POSIX systems, the method is non-operational and always returns path without modifications.
172
- */
173
- toNamespacedPath(path: string): string;
174
- /**
175
- * Posix specific pathing.
176
- * Same as parent object on posix.
177
- */
178
- readonly posix: PlatformPath;
179
- /**
180
- * Windows specific pathing.
181
- * Same as parent object on windows
177
+ * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`.
182
178
  */
183
- readonly win32: PlatformPath;
184
- }
179
+ path as win32,
180
+ };
185
181
  }
186
- const path: path.PlatformPath;
187
- export = path;
188
- }
189
- declare module "node:path" {
190
- import path = require("path");
191
182
  export = path;
192
183
  }
193
- declare module "node:path/posix" {
194
- import path = require("path/posix");
195
- export = path;
196
- }
197
- declare module "node:path/win32" {
198
- import path = require("path/win32");
184
+ declare module "path" {
185
+ import path = require("node:path");
199
186
  export = path;
200
187
  }