@wbce/projen-d9 0.0.27

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 (125) hide show
  1. package/.jsii +552 -0
  2. package/API.md +8472 -0
  3. package/CHANGELOG.md +189 -0
  4. package/LICENSE +674 -0
  5. package/README.md +82 -0
  6. package/lib/cli/commands/init.d.ts +1 -0
  7. package/lib/cli/commands/init.js +8 -0
  8. package/lib/cli/commands/save/apply-snapshot.d.ts +7 -0
  9. package/lib/cli/commands/save/apply-snapshot.js +278 -0
  10. package/lib/cli/commands/save/cli.d.ts +8 -0
  11. package/lib/cli/commands/save/cli.js +33 -0
  12. package/lib/cli/commands/save/draft.d.ts +0 -0
  13. package/lib/cli/commands/save/draft.js +2 -0
  14. package/lib/cli/commands/save/utils.d.ts +9 -0
  15. package/lib/cli/commands/save/utils.js +123 -0
  16. package/lib/cli/commands/sync.d.ts +5 -0
  17. package/lib/cli/commands/sync.js +13 -0
  18. package/lib/cli/index.d.ts +2 -0
  19. package/lib/cli/index.js +44 -0
  20. package/lib/index.d.ts +59 -0
  21. package/lib/index.js +322 -0
  22. package/node_modules/@types/node/LICENSE +21 -0
  23. package/node_modules/@types/node/README.md +16 -0
  24. package/node_modules/@types/node/assert.d.ts +117 -0
  25. package/node_modules/@types/node/async_hooks.d.ts +246 -0
  26. package/node_modules/@types/node/buffer.d.ts +22 -0
  27. package/node_modules/@types/node/child_process.d.ts +507 -0
  28. package/node_modules/@types/node/cluster.d.ts +260 -0
  29. package/node_modules/@types/node/console.d.ts +3 -0
  30. package/node_modules/@types/node/constants.d.ts +448 -0
  31. package/node_modules/@types/node/crypto.d.ts +1183 -0
  32. package/node_modules/@types/node/dgram.d.ts +118 -0
  33. package/node_modules/@types/node/dns.d.ts +372 -0
  34. package/node_modules/@types/node/domain.d.ts +16 -0
  35. package/node_modules/@types/node/events.d.ts +47 -0
  36. package/node_modules/@types/node/fs.d.ts +2567 -0
  37. package/node_modules/@types/node/globals.d.ts +1351 -0
  38. package/node_modules/@types/node/globals.global.d.ts +1 -0
  39. package/node_modules/@types/node/http.d.ts +456 -0
  40. package/node_modules/@types/node/http2.d.ts +952 -0
  41. package/node_modules/@types/node/https.d.ts +156 -0
  42. package/node_modules/@types/node/index.d.ts +91 -0
  43. package/node_modules/@types/node/inspector.d.ts +3040 -0
  44. package/node_modules/@types/node/module.d.ts +3 -0
  45. package/node_modules/@types/node/net.d.ts +290 -0
  46. package/node_modules/@types/node/os.d.ts +263 -0
  47. package/node_modules/@types/node/package.json +195 -0
  48. package/node_modules/@types/node/path.d.ts +159 -0
  49. package/node_modules/@types/node/perf_hooks.d.ts +259 -0
  50. package/node_modules/@types/node/process.d.ts +15 -0
  51. package/node_modules/@types/node/punycode.d.ts +75 -0
  52. package/node_modules/@types/node/querystring.d.ts +29 -0
  53. package/node_modules/@types/node/readline.d.ts +158 -0
  54. package/node_modules/@types/node/repl.d.ts +390 -0
  55. package/node_modules/@types/node/stream.d.ts +334 -0
  56. package/node_modules/@types/node/string_decoder.d.ts +7 -0
  57. package/node_modules/@types/node/timers.d.ts +16 -0
  58. package/node_modules/@types/node/tls.d.ts +713 -0
  59. package/node_modules/@types/node/trace_events.d.ts +61 -0
  60. package/node_modules/@types/node/tty.d.ts +66 -0
  61. package/node_modules/@types/node/url.d.ts +147 -0
  62. package/node_modules/@types/node/util.d.ts +200 -0
  63. package/node_modules/@types/node/v8.d.ts +197 -0
  64. package/node_modules/@types/node/vm.d.ts +112 -0
  65. package/node_modules/@types/node/wasi.d.ts +55 -0
  66. package/node_modules/@types/node/worker_threads.d.ts +207 -0
  67. package/node_modules/@types/node/zlib.d.ts +356 -0
  68. package/node_modules/@types/pg/LICENSE +21 -0
  69. package/node_modules/@types/pg/README.md +15 -0
  70. package/node_modules/@types/pg/index.d.mts +56 -0
  71. package/node_modules/@types/pg/index.d.ts +360 -0
  72. package/node_modules/@types/pg/lib/connection-parameters.d.ts +58 -0
  73. package/node_modules/@types/pg/lib/type-overrides.d.ts +77 -0
  74. package/node_modules/@types/pg/package.json +38 -0
  75. package/node_modules/@types/pg-copy-streams/LICENSE +21 -0
  76. package/node_modules/@types/pg-copy-streams/README.md +38 -0
  77. package/node_modules/@types/pg-copy-streams/index.d.ts +19 -0
  78. package/node_modules/@types/pg-copy-streams/package.json +28 -0
  79. package/node_modules/commander/LICENSE +22 -0
  80. package/node_modules/commander/Readme.md +1176 -0
  81. package/node_modules/commander/esm.mjs +16 -0
  82. package/node_modules/commander/index.js +24 -0
  83. package/node_modules/commander/lib/argument.js +150 -0
  84. package/node_modules/commander/lib/command.js +2777 -0
  85. package/node_modules/commander/lib/error.js +39 -0
  86. package/node_modules/commander/lib/help.js +747 -0
  87. package/node_modules/commander/lib/option.js +380 -0
  88. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  89. package/node_modules/commander/package-support.json +19 -0
  90. package/node_modules/commander/package.json +82 -0
  91. package/node_modules/commander/typings/esm.d.mts +3 -0
  92. package/node_modules/commander/typings/index.d.ts +1113 -0
  93. package/node_modules/pg/LICENSE +21 -0
  94. package/node_modules/pg/README.md +95 -0
  95. package/node_modules/pg/esm/index.mjs +20 -0
  96. package/node_modules/pg/lib/client.js +743 -0
  97. package/node_modules/pg/lib/connection-parameters.js +171 -0
  98. package/node_modules/pg/lib/connection.js +221 -0
  99. package/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
  100. package/node_modules/pg/lib/crypto/sasl.js +212 -0
  101. package/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
  102. package/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
  103. package/node_modules/pg/lib/crypto/utils.js +9 -0
  104. package/node_modules/pg/lib/defaults.js +91 -0
  105. package/node_modules/pg/lib/index.js +73 -0
  106. package/node_modules/pg/lib/native/client.js +323 -0
  107. package/node_modules/pg/lib/native/index.js +2 -0
  108. package/node_modules/pg/lib/native/query.js +165 -0
  109. package/node_modules/pg/lib/query.js +252 -0
  110. package/node_modules/pg/lib/result.js +109 -0
  111. package/node_modules/pg/lib/stream.js +83 -0
  112. package/node_modules/pg/lib/type-overrides.js +35 -0
  113. package/node_modules/pg/lib/utils.js +217 -0
  114. package/node_modules/pg/package.json +76 -0
  115. package/node_modules/pg-copy-streams/Makefile +19 -0
  116. package/node_modules/pg-copy-streams/README.md +315 -0
  117. package/node_modules/pg-copy-streams/copy-both.js +267 -0
  118. package/node_modules/pg-copy-streams/copy-from.js +173 -0
  119. package/node_modules/pg-copy-streams/copy-to.js +177 -0
  120. package/node_modules/pg-copy-streams/eslint.config.js +55 -0
  121. package/node_modules/pg-copy-streams/index.js +17 -0
  122. package/node_modules/pg-copy-streams/message-formats.js +27 -0
  123. package/node_modules/pg-copy-streams/obuf.js +376 -0
  124. package/node_modules/pg-copy-streams/package.json +51 -0
  125. package/package.json +136 -0
@@ -0,0 +1,117 @@
1
+ declare module 'assert' {
2
+ function assert(value: any, message?: string | Error): asserts value;
3
+ namespace assert {
4
+ class AssertionError implements Error {
5
+ name: string;
6
+ message: string;
7
+ actual: any;
8
+ expected: any;
9
+ operator: string;
10
+ generatedMessage: boolean;
11
+ code: 'ERR_ASSERTION';
12
+
13
+ constructor(options?: {
14
+ message?: string | undefined;
15
+ actual?: any;
16
+ expected?: any;
17
+ operator?: string | undefined;
18
+ // tslint:disable-next-line:ban-types
19
+ stackStartFn?: Function | undefined;
20
+ });
21
+ }
22
+
23
+ class CallTracker {
24
+ calls(exact?: number): () => void;
25
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
26
+ report(): CallTrackerReportInformation[];
27
+ verify(): void;
28
+ }
29
+ interface CallTrackerReportInformation {
30
+ message: string;
31
+ /** The actual number of times the function was called. */
32
+ actual: number;
33
+ /** The number of times the function was expected to be called. */
34
+ expected: number;
35
+ /** The name of the function that is wrapped. */
36
+ operator: string;
37
+ /** A stack trace of the function. */
38
+ stack: object;
39
+ }
40
+
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
43
+ function fail(message?: string | Error): never;
44
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
45
+ function fail(
46
+ actual: any,
47
+ expected: any,
48
+ message?: string | Error,
49
+ operator?: string,
50
+ // tslint:disable-next-line:ban-types
51
+ stackStartFn?: Function,
52
+ ): never;
53
+ function ok(value: any, message?: string | Error): asserts value;
54
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
55
+ function equal(actual: any, expected: any, message?: string | Error): void;
56
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
57
+ function notEqual(actual: any, expected: any, message?: string | Error): void;
58
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
59
+ function deepEqual(actual: any, expected: any, message?: string | Error): void;
60
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
61
+ function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
62
+ function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
63
+ function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
64
+ function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
65
+ function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
66
+
67
+ function throws(block: () => any, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
69
+ function doesNotThrow(block: () => any, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
71
+
72
+ function ifError(value: any): asserts value is null | undefined;
73
+
74
+ function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
75
+ function rejects(
76
+ block: (() => Promise<any>) | Promise<any>,
77
+ error: AssertPredicate,
78
+ message?: string | Error,
79
+ ): Promise<void>;
80
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
81
+ function doesNotReject(
82
+ block: (() => Promise<any>) | Promise<any>,
83
+ error: AssertPredicate,
84
+ message?: string | Error,
85
+ ): Promise<void>;
86
+
87
+ const strict: Omit<
88
+ typeof assert,
89
+ | 'equal'
90
+ | 'notEqual'
91
+ | 'deepEqual'
92
+ | 'notDeepEqual'
93
+ | 'ok'
94
+ | 'strictEqual'
95
+ | 'deepStrictEqual'
96
+ | 'ifError'
97
+ | 'strict'
98
+ > & {
99
+ (value: any, message?: string | Error): asserts value;
100
+ equal: typeof strictEqual;
101
+ notEqual: typeof notStrictEqual;
102
+ deepEqual: typeof deepStrictEqual;
103
+ notDeepEqual: typeof notDeepStrictEqual;
104
+
105
+ // Mapped types and assertion functions are incompatible?
106
+ // TS2775: Assertions require every name in the call target
107
+ // to be declared with an explicit type annotation.
108
+ ok: typeof ok;
109
+ strictEqual: typeof strictEqual;
110
+ deepStrictEqual: typeof deepStrictEqual;
111
+ ifError: typeof ifError;
112
+ strict: typeof strict;
113
+ };
114
+ }
115
+
116
+ export = assert;
117
+ }
@@ -0,0 +1,246 @@
1
+ /**
2
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
3
+ */
4
+ declare module 'async_hooks' {
5
+ /**
6
+ * Returns the asyncId of the current execution context.
7
+ */
8
+ function executionAsyncId(): number;
9
+
10
+ /**
11
+ * The resource representing the current execution.
12
+ * Useful to store data within the resource.
13
+ *
14
+ * Resource objects returned by `executionAsyncResource()` are most often internal
15
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
16
+ * on the object is likely to crash your application and should be avoided.
17
+ *
18
+ * Using `executionAsyncResource()` in the top-level execution context will
19
+ * return an empty object as there is no handle or request object to use,
20
+ * but having an object representing the top-level can be helpful.
21
+ */
22
+ function executionAsyncResource(): object;
23
+
24
+ /**
25
+ * Returns the ID of the resource responsible for calling the callback that is currently being executed.
26
+ */
27
+ function triggerAsyncId(): number;
28
+
29
+ interface HookCallbacks {
30
+ /**
31
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
32
+ * @param asyncId a unique ID for the async resource
33
+ * @param type the type of the async resource
34
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
35
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
36
+ */
37
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
38
+
39
+ /**
40
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
41
+ * The before callback is called just before said callback is executed.
42
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
43
+ */
44
+ before?(asyncId: number): void;
45
+
46
+ /**
47
+ * Called immediately after the callback specified in before is completed.
48
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
49
+ */
50
+ after?(asyncId: number): void;
51
+
52
+ /**
53
+ * Called when a promise has resolve() called. This may not be in the same execution id
54
+ * as the promise itself.
55
+ * @param asyncId the unique id for the promise that was resolve()d.
56
+ */
57
+ promiseResolve?(asyncId: number): void;
58
+
59
+ /**
60
+ * Called after the resource corresponding to asyncId is destroyed
61
+ * @param asyncId a unique ID for the async resource
62
+ */
63
+ destroy?(asyncId: number): void;
64
+ }
65
+
66
+ interface AsyncHook {
67
+ /**
68
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
69
+ */
70
+ enable(): this;
71
+
72
+ /**
73
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
74
+ */
75
+ disable(): this;
76
+ }
77
+
78
+ /**
79
+ * Registers functions to be called for different lifetime events of each async operation.
80
+ * @param options the callbacks to register
81
+ * @return an AsyncHooks instance used for disabling and enabling hooks
82
+ */
83
+ function createHook(options: HookCallbacks): AsyncHook;
84
+
85
+ interface AsyncResourceOptions {
86
+ /**
87
+ * The ID of the execution context that created this async event.
88
+ * @default executionAsyncId()
89
+ */
90
+ triggerAsyncId?: number | undefined;
91
+
92
+ /**
93
+ * Disables automatic `emitDestroy` when the object is garbage collected.
94
+ * This usually does not need to be set (even if `emitDestroy` is called
95
+ * manually), unless the resource's `asyncId` is retrieved and the
96
+ * sensitive API's `emitDestroy` is called with it.
97
+ * @default false
98
+ */
99
+ requireManualDestroy?: boolean | undefined;
100
+ }
101
+
102
+ /**
103
+ * The class AsyncResource was designed to be extended by the embedder's async resources.
104
+ * Using this users can easily trigger the lifetime events of their own resources.
105
+ */
106
+ class AsyncResource {
107
+ /**
108
+ * AsyncResource() is meant to be extended. Instantiating a
109
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
110
+ * async_hook.executionAsyncId() is used.
111
+ * @param type The type of async event.
112
+ * @param triggerAsyncId The ID of the execution context that created
113
+ * this async event (default: `executionAsyncId()`), or an
114
+ * AsyncResourceOptions object (since v9.3.0)
115
+ */
116
+ constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
117
+
118
+ /**
119
+ * Binds the given function to the current execution context.
120
+ * @param fn The function to bind to the current execution context.
121
+ * @param type An optional name to associate with the underlying `AsyncResource`.
122
+ */
123
+ static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
124
+
125
+ /**
126
+ * Binds the given function to execute to this `AsyncResource`'s scope.
127
+ * @param fn The function to bind to the current `AsyncResource`.
128
+ */
129
+ bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
130
+
131
+ /**
132
+ * Call the provided function with the provided arguments in the
133
+ * execution context of the async resource. This will establish the
134
+ * context, trigger the AsyncHooks before callbacks, call the function,
135
+ * trigger the AsyncHooks after callbacks, and then restore the original
136
+ * execution context.
137
+ * @param fn The function to call in the execution context of this
138
+ * async resource.
139
+ * @param thisArg The receiver to be used for the function call.
140
+ * @param args Optional arguments to pass to the function.
141
+ */
142
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
143
+
144
+ /**
145
+ * Call AsyncHooks destroy callbacks.
146
+ */
147
+ emitDestroy(): this;
148
+
149
+ /**
150
+ * @return the unique ID assigned to this AsyncResource instance.
151
+ */
152
+ asyncId(): number;
153
+
154
+ /**
155
+ * @return the trigger ID for this AsyncResource instance.
156
+ */
157
+ triggerAsyncId(): number;
158
+ }
159
+
160
+ /**
161
+ * When having multiple instances of `AsyncLocalStorage`, they are independent
162
+ * from each other. It is safe to instantiate this class multiple times.
163
+ */
164
+ class AsyncLocalStorage<T> {
165
+ /**
166
+ * This method disables the instance of `AsyncLocalStorage`. All subsequent calls
167
+ * to `asyncLocalStorage.getStore()` will return `undefined` until
168
+ * `asyncLocalStorage.run()` or `asyncLocalStorage.runSyncAndReturn()`
169
+ * is called again.
170
+ *
171
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
172
+ * instance will be exited.
173
+ *
174
+ * Calling `asyncLocalStorage.disable()` is required before the
175
+ * `asyncLocalStorage` can be garbage collected. This does not apply to stores
176
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
177
+ * along with the corresponding async resources.
178
+ *
179
+ * This method is to be used when the `asyncLocalStorage` is not in use anymore
180
+ * in the current process.
181
+ */
182
+ disable(): void;
183
+
184
+ /**
185
+ * This method returns the current store.
186
+ * If this method is called outside of an asynchronous context initialized by
187
+ * calling `asyncLocalStorage.run` or `asyncLocalStorage.runAndReturn`, it will
188
+ * return `undefined`.
189
+ */
190
+ getStore(): T | undefined;
191
+
192
+ /**
193
+ * Calling `asyncLocalStorage.run(callback)` will create a new asynchronous
194
+ * context.
195
+ * Within the callback function and the asynchronous operations from the callback,
196
+ * `asyncLocalStorage.getStore()` will return an instance of `Map` known as
197
+ * "the store". This store will be persistent through the following
198
+ * asynchronous calls.
199
+ *
200
+ * The callback will be ran asynchronously. Optionally, arguments can be passed
201
+ * to the function. They will be passed to the callback function.
202
+ *
203
+ * If an error is thrown by the callback function, it will not be caught by
204
+ * a `try/catch` block as the callback is ran in a new asynchronous resource.
205
+ * Also, the stacktrace will be impacted by the asynchronous call.
206
+ */
207
+ // TODO: Apply generic vararg once available
208
+ run(store: T, callback: (...args: any[]) => void, ...args: any[]): void;
209
+
210
+ /**
211
+ * Calling `asyncLocalStorage.exit(callback)` will create a new asynchronous
212
+ * context.
213
+ * Within the callback function and the asynchronous operations from the callback,
214
+ * `asyncLocalStorage.getStore()` will return `undefined`.
215
+ *
216
+ * The callback will be ran asynchronously. Optionally, arguments can be passed
217
+ * to the function. They will be passed to the callback function.
218
+ *
219
+ * If an error is thrown by the callback function, it will not be caught by
220
+ * a `try/catch` block as the callback is ran in a new asynchronous resource.
221
+ * Also, the stacktrace will be impacted by the asynchronous call.
222
+ */
223
+ exit(callback: (...args: any[]) => void, ...args: any[]): void;
224
+
225
+ /**
226
+ * This methods runs a function synchronously outside of a context and return its
227
+ * return value. The store is not accessible within the callback function or
228
+ * the asynchronous operations created within the callback.
229
+ *
230
+ * Optionally, arguments can be passed to the function. They will be passed to
231
+ * the callback function.
232
+ *
233
+ * If the callback function throws an error, it will be thrown by
234
+ * `exitSyncAndReturn` too. The stacktrace will not be impacted by this call and
235
+ * the context will be re-entered.
236
+ */
237
+ exitSyncAndReturn<R>(callback: (...args: any[]) => R, ...args: any[]): R;
238
+
239
+ /**
240
+ * Calling `asyncLocalStorage.enterWith(store)` will transition into the context
241
+ * for the remainder of the current synchronous execution and will persist
242
+ * through any following asynchronous calls.
243
+ */
244
+ enterWith(store: T): void;
245
+ }
246
+ }
@@ -0,0 +1,22 @@
1
+ declare module 'buffer' {
2
+ export const INSPECT_MAX_BYTES: number;
3
+ export const kMaxLength: number;
4
+ export const kStringMaxLength: number;
5
+ export const constants: {
6
+ MAX_LENGTH: number;
7
+ MAX_STRING_LENGTH: number;
8
+ };
9
+ const BuffType: typeof Buffer;
10
+
11
+ export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
12
+
13
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
14
+
15
+ export const SlowBuffer: {
16
+ /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */
17
+ new(size: number): Buffer;
18
+ prototype: Buffer;
19
+ };
20
+
21
+ export { BuffType as Buffer };
22
+ }