@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,360 @@
1
+ /// <reference types="node" />
2
+
3
+ import events = require("events");
4
+ import stream = require("stream");
5
+ import pgTypes = require("pg-types");
6
+ import { NoticeMessage } from "pg-protocol/dist/messages.js";
7
+
8
+ import { ConnectionOptions } from "tls";
9
+
10
+ export type QueryConfigValues<T> = T extends Array<infer U> ? T : never;
11
+
12
+ export interface ClientConfig {
13
+ user?: string | undefined;
14
+ database?: string | undefined;
15
+ password?: string | (() => string | Promise<string>) | undefined;
16
+ port?: number | undefined;
17
+ host?: string | undefined;
18
+ connectionString?: string | undefined;
19
+ keepAlive?: boolean | undefined;
20
+ stream?: () => stream.Duplex | undefined;
21
+ statement_timeout?: false | number | undefined;
22
+ ssl?: boolean | ConnectionOptions | undefined;
23
+ query_timeout?: number | undefined;
24
+ lock_timeout?: number | undefined;
25
+ keepAliveInitialDelayMillis?: number | undefined;
26
+ idle_in_transaction_session_timeout?: number | undefined;
27
+ application_name?: string | undefined;
28
+ fallback_application_name?: string | undefined;
29
+ connectionTimeoutMillis?: number | undefined;
30
+ types?: CustomTypesConfig | undefined;
31
+ options?: string | undefined;
32
+ client_encoding?: string | undefined;
33
+ }
34
+
35
+ export type ConnectionConfig = ClientConfig;
36
+
37
+ export interface Defaults extends ClientConfig {
38
+ poolSize?: number | undefined;
39
+ poolIdleTimeout?: number | undefined;
40
+ reapIntervalMillis?: number | undefined;
41
+ binary?: boolean | undefined;
42
+ parseInt8?: boolean | undefined;
43
+ parseInputDatesAsUTC?: boolean | undefined;
44
+ }
45
+
46
+ export interface PoolConfig extends ClientConfig {
47
+ // properties from module 'pg-pool'
48
+ max?: number | undefined;
49
+ min?: number | undefined;
50
+ idleTimeoutMillis?: number | undefined | null;
51
+ log?: ((...messages: any[]) => void) | undefined;
52
+ Promise?: PromiseConstructorLike | undefined;
53
+ allowExitOnIdle?: boolean | undefined;
54
+ maxUses?: number | undefined;
55
+ maxLifetimeSeconds?: number | undefined;
56
+ Client?: (new() => ClientBase) | undefined;
57
+ onConnect?: ((client: ClientBase) => void) | undefined;
58
+ }
59
+
60
+ export interface QueryConfig<I = any[]> {
61
+ name?: string | undefined;
62
+ text: string;
63
+ values?: QueryConfigValues<I>;
64
+ types?: CustomTypesConfig | undefined;
65
+ }
66
+
67
+ export interface CustomTypesConfig {
68
+ getTypeParser: typeof pgTypes.getTypeParser;
69
+ }
70
+
71
+ export interface Submittable {
72
+ submit: (connection: Connection) => void;
73
+ }
74
+
75
+ export interface QueryArrayConfig<I = any[]> extends QueryConfig<I> {
76
+ rowMode: "array";
77
+ }
78
+
79
+ export interface FieldDef {
80
+ name: string;
81
+ tableID: number;
82
+ columnID: number;
83
+ dataTypeID: number;
84
+ dataTypeSize: number;
85
+ dataTypeModifier: number;
86
+ format: string;
87
+ }
88
+
89
+ export interface QueryResultBase {
90
+ command: string;
91
+ rowCount: number | null;
92
+ oid: number;
93
+ fields: FieldDef[];
94
+ }
95
+
96
+ export interface QueryResultRow {
97
+ [column: string]: any;
98
+ }
99
+
100
+ export interface QueryResult<R extends QueryResultRow = any> extends QueryResultBase {
101
+ rows: R[];
102
+ }
103
+
104
+ export interface QueryArrayResult<R extends any[] = any[]> extends QueryResultBase {
105
+ rows: R[];
106
+ }
107
+
108
+ export interface Notification {
109
+ processId: number;
110
+ channel: string;
111
+ payload?: string | undefined;
112
+ }
113
+
114
+ export interface ResultBuilder<R extends QueryResultRow = any> extends QueryResult<R> {
115
+ addRow(row: R): void;
116
+ }
117
+
118
+ export interface QueryParse {
119
+ name: string;
120
+ text: string;
121
+ types: string[];
122
+ }
123
+
124
+ type ValueMapper = (param: any, index: number) => any;
125
+
126
+ export interface BindConfig {
127
+ portal?: string | undefined;
128
+ statement?: string | undefined;
129
+ binary?: string | undefined;
130
+ values?: Array<Buffer | null | undefined | string> | undefined;
131
+ valueMapper?: ValueMapper | undefined;
132
+ }
133
+
134
+ export interface ExecuteConfig {
135
+ portal?: string | undefined;
136
+ rows?: string | undefined;
137
+ }
138
+
139
+ export interface MessageConfig {
140
+ type: string;
141
+ name?: string | undefined;
142
+ }
143
+
144
+ export function escapeIdentifier(str: string): string;
145
+
146
+ export function escapeLiteral(str: string): string;
147
+
148
+ export class Connection extends events.EventEmitter {
149
+ readonly stream: stream.Duplex;
150
+
151
+ constructor(config?: ConnectionConfig);
152
+
153
+ bind(config: BindConfig | null, more: boolean): void;
154
+ execute(config: ExecuteConfig | null, more: boolean): void;
155
+ parse(query: QueryParse, more: boolean): void;
156
+
157
+ query(text: string): void;
158
+
159
+ describe(msg: MessageConfig, more: boolean): void;
160
+ close(msg: MessageConfig, more: boolean): void;
161
+
162
+ flush(): void;
163
+ sync(): void;
164
+ end(): void;
165
+ }
166
+
167
+ export interface PoolOptions extends PoolConfig {
168
+ max: number;
169
+ maxUses: number;
170
+ allowExitOnIdle: boolean;
171
+ maxLifetimeSeconds: number;
172
+ idleTimeoutMillis: number | null;
173
+ }
174
+
175
+ /**
176
+ * {@link https://node-postgres.com/apis/pool}
177
+ */
178
+ export class Pool extends events.EventEmitter {
179
+ /**
180
+ * Every field of the config object is entirely optional.
181
+ * The config passed to the pool is also passed to every client
182
+ * instance within the pool when the pool creates that client.
183
+ */
184
+ constructor(config?: PoolConfig);
185
+
186
+ readonly totalCount: number;
187
+ readonly idleCount: number;
188
+ readonly waitingCount: number;
189
+ readonly expiredCount: number;
190
+
191
+ readonly ending: boolean;
192
+ readonly ended: boolean;
193
+
194
+ options: PoolOptions;
195
+
196
+ connect(): Promise<PoolClient>;
197
+ connect(
198
+ callback: (err: Error | undefined, client: PoolClient | undefined, done: (release?: any) => void) => void,
199
+ ): void;
200
+
201
+ end(): Promise<void>;
202
+ end(callback: () => void): void;
203
+
204
+ query<T extends Submittable>(queryStream: T): T;
205
+ // tslint:disable:no-unnecessary-generics
206
+ query<R extends any[] = any[], I = any[]>(
207
+ queryConfig: QueryArrayConfig<I>,
208
+ values?: QueryConfigValues<I>,
209
+ ): Promise<QueryArrayResult<R>>;
210
+ query<R extends QueryResultRow = any, I = any[]>(
211
+ queryConfig: QueryConfig<I>,
212
+ ): Promise<QueryResult<R>>;
213
+ query<R extends QueryResultRow = any, I = any[]>(
214
+ queryTextOrConfig: string | QueryConfig<I>,
215
+ values?: QueryConfigValues<I>,
216
+ ): Promise<QueryResult<R>>;
217
+ query<R extends any[] = any[], I = any[]>(
218
+ queryConfig: QueryArrayConfig<I>,
219
+ callback: (err: Error, result: QueryArrayResult<R>) => void,
220
+ ): void;
221
+ query<R extends QueryResultRow = any, I = any[]>(
222
+ queryTextOrConfig: string | QueryConfig<I>,
223
+ callback: (err: Error, result: QueryResult<R>) => void,
224
+ ): void;
225
+ query<R extends QueryResultRow = any, I = any[]>(
226
+ queryText: string,
227
+ values: QueryConfigValues<I>,
228
+ callback: (err: Error, result: QueryResult<R>) => void,
229
+ ): void;
230
+ // tslint:enable:no-unnecessary-generics
231
+
232
+ on<K extends "error" | "release" | "connect" | "acquire" | "remove">(
233
+ event: K,
234
+ listener: K extends "error" | "release" ? (err: Error, client: PoolClient) => void
235
+ : (client: PoolClient) => void,
236
+ ): this;
237
+ }
238
+
239
+ export class ClientBase extends events.EventEmitter {
240
+ constructor(config?: string | ClientConfig);
241
+
242
+ connect(): Promise<ClientBase>;
243
+ connect(callback: ((err: Error) => void) | ((err: null, c: ClientBase) => void)): void;
244
+
245
+ query<T extends Submittable>(queryStream: T): T;
246
+ // tslint:disable:no-unnecessary-generics
247
+ query<R extends any[] = any[], I = any[]>(
248
+ queryConfig: QueryArrayConfig<I>,
249
+ values?: QueryConfigValues<I>,
250
+ ): Promise<QueryArrayResult<R>>;
251
+ query<R extends QueryResultRow = any, I = any>(
252
+ queryConfig: QueryConfig<I>,
253
+ ): Promise<QueryResult<R>>;
254
+ query<R extends QueryResultRow = any, I = any[]>(
255
+ queryTextOrConfig: string | QueryConfig<I>,
256
+ values?: QueryConfigValues<I>,
257
+ ): Promise<QueryResult<R>>;
258
+ query<R extends any[] = any[], I = any[]>(
259
+ queryConfig: QueryArrayConfig<I>,
260
+ callback: (err: Error, result: QueryArrayResult<R>) => void,
261
+ ): void;
262
+ query<R extends QueryResultRow = any, I = any[]>(
263
+ queryTextOrConfig: string | QueryConfig<I>,
264
+ callback: (err: Error, result: QueryResult<R>) => void,
265
+ ): void;
266
+ query<R extends QueryResultRow = any, I = any[]>(
267
+ queryText: string,
268
+ values: QueryConfigValues<I>,
269
+ callback: (err: Error, result: QueryResult<R>) => void,
270
+ ): void;
271
+ // tslint:enable:no-unnecessary-generics
272
+
273
+ copyFrom(queryText: string): stream.Writable;
274
+ copyTo(queryText: string): stream.Readable;
275
+
276
+ pauseDrain(): void;
277
+ resumeDrain(): void;
278
+
279
+ escapeIdentifier: typeof escapeIdentifier;
280
+ escapeLiteral: typeof escapeLiteral;
281
+ setTypeParser: typeof pgTypes.setTypeParser;
282
+ getTypeParser: typeof pgTypes.getTypeParser;
283
+
284
+ on<E extends "drain" | "error" | "notice" | "notification" | "end">(
285
+ event: E,
286
+ listener: E extends "drain" | "end" ? () => void
287
+ : E extends "error" ? (err: Error) => void
288
+ : E extends "notice" ? (notice: NoticeMessage) => void
289
+ : (message: Notification) => void,
290
+ ): this;
291
+ }
292
+
293
+ export class Client extends ClientBase {
294
+ user?: string | undefined;
295
+ database?: string | undefined;
296
+ port: number;
297
+ host: string;
298
+ password?: string | undefined;
299
+ ssl: boolean;
300
+ readonly connection: Connection;
301
+
302
+ constructor(config?: string | ClientConfig);
303
+
304
+ connect(): Promise<Client>;
305
+ connect(callback: ((err: Error) => void) | ((err: null, c: Client) => void)): void;
306
+
307
+ end(): Promise<void>;
308
+ end(callback: (err: Error) => void): void;
309
+ }
310
+
311
+ export interface PoolClient extends ClientBase {
312
+ release(err?: Error | boolean): void;
313
+ }
314
+
315
+ export class Query<R extends QueryResultRow = any, I extends any[] = any> extends events.EventEmitter
316
+ implements Submittable
317
+ {
318
+ constructor(
319
+ queryTextOrConfig?: string | QueryConfig<I>,
320
+ callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
321
+ );
322
+ constructor(
323
+ queryTextOrConfig?: string | QueryConfig<I>,
324
+ values?: I,
325
+ callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
326
+ );
327
+ submit: (connection: Connection) => void;
328
+ on<E extends "row" | "error" | "end">(
329
+ event: E,
330
+ listener: E extends "row" ? (row: R, result?: ResultBuilder<R>) => void
331
+ : E extends "error" ? (err: Error) => void
332
+ : (result: ResultBuilder<R>) => void,
333
+ ): this;
334
+ }
335
+
336
+ export class Events extends events.EventEmitter {
337
+ on(event: "error", listener: (err: Error, client: Client) => void): this;
338
+ }
339
+
340
+ export const types: typeof pgTypes;
341
+
342
+ export const defaults: Defaults & ClientConfig;
343
+
344
+ import * as Pg from ".";
345
+
346
+ export const native: typeof Pg | null;
347
+
348
+ export { DatabaseError } from "pg-protocol";
349
+ export { TypeOverrides };
350
+ import TypeOverrides = require("./lib/type-overrides");
351
+
352
+ export class Result<R extends QueryResultRow = any> implements QueryResult<R> {
353
+ command: string;
354
+ rowCount: number | null;
355
+ oid: number;
356
+ fields: FieldDef[];
357
+ rows: R[];
358
+
359
+ constructor(rowMode: string, t: typeof types);
360
+ }
@@ -0,0 +1,58 @@
1
+ import { ConnectionOptions } from "tls";
2
+ import { ConnectionConfig } from "..";
3
+
4
+ interface ConnectionParametersConfig extends
5
+ Pick<
6
+ ConnectionConfig,
7
+ | "user"
8
+ | "database"
9
+ | "password"
10
+ | "port"
11
+ | "host"
12
+ | "options"
13
+ | "ssl"
14
+ | "application_name"
15
+ | "statement_timeout"
16
+ | "idle_in_transaction_session_timeout"
17
+ | "query_timeout"
18
+ >
19
+ {
20
+ binary?: unknown;
21
+ client_encoding?: unknown;
22
+ replication?: unknown;
23
+ isDomainSocket?: unknown;
24
+ fallback_application_name?: unknown;
25
+ lock_timeout?: unknown;
26
+ connect_timeout?: unknown;
27
+ keepalives?: unknown;
28
+ keepalives_idle?: unknown;
29
+ }
30
+
31
+ export = ConnectionParameters;
32
+ declare class ConnectionParameters implements ConnectionParametersConfig {
33
+ user?: string | undefined;
34
+ database?: string | undefined;
35
+ password?: string | (() => string | Promise<string>) | undefined;
36
+ port?: number | undefined;
37
+ host?: string | undefined;
38
+ statement_timeout?: false | number | undefined;
39
+ ssl?: boolean | ConnectionOptions | undefined;
40
+ query_timeout?: number | undefined;
41
+ idle_in_transaction_session_timeout?: number | undefined;
42
+ application_name?: string | undefined;
43
+ options?: string | undefined;
44
+
45
+ binary?: unknown;
46
+ client_encoding?: unknown;
47
+ replication?: unknown;
48
+ isDomainSocket?: unknown;
49
+ fallback_application_name?: unknown;
50
+ lock_timeout?: unknown;
51
+ connect_timeout?: unknown;
52
+ keepalives?: unknown;
53
+ keepalives_idle?: unknown;
54
+
55
+ constructor(config?: string | ConnectionParametersConfig);
56
+
57
+ getLibpqConnectionString<TResult>(cb: (err: Error | null, params: string | null) => TResult): TResult;
58
+ }
@@ -0,0 +1,77 @@
1
+ import { CustomTypesConfig } from "..";
2
+
3
+ declare enum builtins {
4
+ BOOL = 16,
5
+ BYTEA = 17,
6
+ CHAR = 18,
7
+ INT8 = 20,
8
+ INT2 = 21,
9
+ INT4 = 23,
10
+ REGPROC = 24,
11
+ TEXT = 25,
12
+ OID = 26,
13
+ TID = 27,
14
+ XID = 28,
15
+ CID = 29,
16
+ JSON = 114,
17
+ XML = 142,
18
+ PG_NODE_TREE = 194,
19
+ SMGR = 210,
20
+ PATH = 602,
21
+ POLYGON = 604,
22
+ CIDR = 650,
23
+ FLOAT4 = 700,
24
+ FLOAT8 = 701,
25
+ ABSTIME = 702,
26
+ RELTIME = 703,
27
+ TINTERVAL = 704,
28
+ CIRCLE = 718,
29
+ MACADDR8 = 774,
30
+ MONEY = 790,
31
+ MACADDR = 829,
32
+ INET = 869,
33
+ ACLITEM = 1033,
34
+ BPCHAR = 1042,
35
+ VARCHAR = 1043,
36
+ DATE = 1082,
37
+ TIME = 1083,
38
+ TIMESTAMP = 1114,
39
+ TIMESTAMPTZ = 1184,
40
+ INTERVAL = 1186,
41
+ TIMETZ = 1266,
42
+ BIT = 1560,
43
+ VARBIT = 1562,
44
+ NUMERIC = 1700,
45
+ REFCURSOR = 1790,
46
+ REGPROCEDURE = 2202,
47
+ REGOPER = 2203,
48
+ REGOPERATOR = 2204,
49
+ REGCLASS = 2205,
50
+ REGTYPE = 2206,
51
+ UUID = 2950,
52
+ TXID_SNAPSHOT = 2970,
53
+ PG_LSN = 3220,
54
+ PG_NDISTINCT = 3361,
55
+ PG_DEPENDENCIES = 3402,
56
+ TSVECTOR = 3614,
57
+ TSQUERY = 3615,
58
+ GTSVECTOR = 3642,
59
+ REGCONFIG = 3734,
60
+ REGDICTIONARY = 3769,
61
+ JSONB = 3802,
62
+ REGNAMESPACE = 4089,
63
+ REGROLE = 4096,
64
+ }
65
+ type TypeId = builtins;
66
+ type TypeParser<TOid = number, TReturn = any> = (oid: TOid) => TReturn;
67
+ type TypeFormat = "text" | "binary";
68
+
69
+ export = TypeOverrides;
70
+ declare class TypeOverrides implements CustomTypesConfig {
71
+ constructor(types?: CustomTypesConfig);
72
+ setTypeParser<T>(oid: number | TypeId, parseFn: TypeParser<string, T>): void;
73
+ setTypeParser<T>(oid: number | TypeId, format: "text", parseFn: TypeParser<string, T>): void;
74
+ setTypeParser<T>(oid: number | TypeId, format: "binary", parseFn: TypeParser<Buffer, T>): void;
75
+
76
+ getTypeParser<T>(oid: number | TypeId, format?: TypeFormat): TypeParser;
77
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@types/pg",
3
+ "version": "8.20.0",
4
+ "description": "TypeScript definitions for pg",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Phips Peter",
10
+ "githubUsername": "pspeter3",
11
+ "url": "https://github.com/pspeter3"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./index.d.mts",
19
+ "require": "./index.d.ts"
20
+ },
21
+ "./lib/*": "./lib/*.d.ts",
22
+ "./package.json": "./package.json"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
27
+ "directory": "types/pg"
28
+ },
29
+ "scripts": {},
30
+ "dependencies": {
31
+ "@types/node": "*",
32
+ "pg-protocol": "*",
33
+ "pg-types": "^2.2.0"
34
+ },
35
+ "peerDependencies": {},
36
+ "typesPublisherContentHash": "f49c5d3be2d9b3b43bff35d90669b2a3b2f48b9a342ea62a8ba88c95fff36622",
37
+ "typeScriptVersion": "5.2"
38
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,38 @@
1
+ # Installation
2
+ > `npm install --save @types/pg-copy-streams`
3
+
4
+ # Summary
5
+ This package contains type definitions for pg-copy-streams (https://github.com/brianc/node-pg-copy-streams).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg-copy-streams.
9
+ ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg-copy-streams/index.d.ts)
10
+ ````ts
11
+ /// <reference types="node" />
12
+
13
+ import { Connection, Submittable } from "pg";
14
+ import { Readable, ReadableOptions, Writable, WritableOptions } from "stream";
15
+
16
+ export function from(txt: string, options?: WritableOptions): CopyStreamQuery;
17
+ export function to(txt: string, options?: ReadableOptions): CopyToStreamQuery;
18
+
19
+ export class CopyStreamQuery extends Writable implements Submittable {
20
+ text: string;
21
+ rowCount: number;
22
+ submit(connection: Connection): void;
23
+ }
24
+
25
+ export class CopyToStreamQuery extends Readable implements Submittable {
26
+ text: string;
27
+ rowCount: number;
28
+ submit(connection: Connection): void;
29
+ }
30
+
31
+ ````
32
+
33
+ ### Additional Details
34
+ * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
35
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/pg](https://npmjs.com/package/@types/pg)
36
+
37
+ # Credits
38
+ These definitions were written by [Brian Crowell](https://github.com/fluggo).
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+
3
+ import { Connection, Submittable } from "pg";
4
+ import { Readable, ReadableOptions, Writable, WritableOptions } from "stream";
5
+
6
+ export function from(txt: string, options?: WritableOptions): CopyStreamQuery;
7
+ export function to(txt: string, options?: ReadableOptions): CopyToStreamQuery;
8
+
9
+ export class CopyStreamQuery extends Writable implements Submittable {
10
+ text: string;
11
+ rowCount: number;
12
+ submit(connection: Connection): void;
13
+ }
14
+
15
+ export class CopyToStreamQuery extends Readable implements Submittable {
16
+ text: string;
17
+ rowCount: number;
18
+ submit(connection: Connection): void;
19
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@types/pg-copy-streams",
3
+ "version": "1.2.5",
4
+ "description": "TypeScript definitions for pg-copy-streams",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg-copy-streams",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Brian Crowell",
10
+ "githubUsername": "fluggo",
11
+ "url": "https://github.com/fluggo"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/pg-copy-streams"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {
23
+ "@types/node": "*",
24
+ "@types/pg": "*"
25
+ },
26
+ "typesPublisherContentHash": "55772524aed4b9b04dffdbac58ddeddf51f44b382e26f0cd070a4f201bddee9f",
27
+ "typeScriptVersion": "4.5"
28
+ }
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.