@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.
- package/.jsii +552 -0
- package/API.md +8472 -0
- package/CHANGELOG.md +189 -0
- package/LICENSE +674 -0
- package/README.md +82 -0
- package/lib/cli/commands/init.d.ts +1 -0
- package/lib/cli/commands/init.js +8 -0
- package/lib/cli/commands/save/apply-snapshot.d.ts +7 -0
- package/lib/cli/commands/save/apply-snapshot.js +278 -0
- package/lib/cli/commands/save/cli.d.ts +8 -0
- package/lib/cli/commands/save/cli.js +33 -0
- package/lib/cli/commands/save/draft.d.ts +0 -0
- package/lib/cli/commands/save/draft.js +2 -0
- package/lib/cli/commands/save/utils.d.ts +9 -0
- package/lib/cli/commands/save/utils.js +123 -0
- package/lib/cli/commands/sync.d.ts +5 -0
- package/lib/cli/commands/sync.js +13 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +44 -0
- package/lib/index.d.ts +59 -0
- package/lib/index.js +322 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +16 -0
- package/node_modules/@types/node/assert.d.ts +117 -0
- package/node_modules/@types/node/async_hooks.d.ts +246 -0
- package/node_modules/@types/node/buffer.d.ts +22 -0
- package/node_modules/@types/node/child_process.d.ts +507 -0
- package/node_modules/@types/node/cluster.d.ts +260 -0
- package/node_modules/@types/node/console.d.ts +3 -0
- package/node_modules/@types/node/constants.d.ts +448 -0
- package/node_modules/@types/node/crypto.d.ts +1183 -0
- package/node_modules/@types/node/dgram.d.ts +118 -0
- package/node_modules/@types/node/dns.d.ts +372 -0
- package/node_modules/@types/node/domain.d.ts +16 -0
- package/node_modules/@types/node/events.d.ts +47 -0
- package/node_modules/@types/node/fs.d.ts +2567 -0
- package/node_modules/@types/node/globals.d.ts +1351 -0
- package/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +456 -0
- package/node_modules/@types/node/http2.d.ts +952 -0
- package/node_modules/@types/node/https.d.ts +156 -0
- package/node_modules/@types/node/index.d.ts +91 -0
- package/node_modules/@types/node/inspector.d.ts +3040 -0
- package/node_modules/@types/node/module.d.ts +3 -0
- package/node_modules/@types/node/net.d.ts +290 -0
- package/node_modules/@types/node/os.d.ts +263 -0
- package/node_modules/@types/node/package.json +195 -0
- package/node_modules/@types/node/path.d.ts +159 -0
- package/node_modules/@types/node/perf_hooks.d.ts +259 -0
- package/node_modules/@types/node/process.d.ts +15 -0
- package/node_modules/@types/node/punycode.d.ts +75 -0
- package/node_modules/@types/node/querystring.d.ts +29 -0
- package/node_modules/@types/node/readline.d.ts +158 -0
- package/node_modules/@types/node/repl.d.ts +390 -0
- package/node_modules/@types/node/stream.d.ts +334 -0
- package/node_modules/@types/node/string_decoder.d.ts +7 -0
- package/node_modules/@types/node/timers.d.ts +16 -0
- package/node_modules/@types/node/tls.d.ts +713 -0
- package/node_modules/@types/node/trace_events.d.ts +61 -0
- package/node_modules/@types/node/tty.d.ts +66 -0
- package/node_modules/@types/node/url.d.ts +147 -0
- package/node_modules/@types/node/util.d.ts +200 -0
- package/node_modules/@types/node/v8.d.ts +197 -0
- package/node_modules/@types/node/vm.d.ts +112 -0
- package/node_modules/@types/node/wasi.d.ts +55 -0
- package/node_modules/@types/node/worker_threads.d.ts +207 -0
- package/node_modules/@types/node/zlib.d.ts +356 -0
- package/node_modules/@types/pg/LICENSE +21 -0
- package/node_modules/@types/pg/README.md +15 -0
- package/node_modules/@types/pg/index.d.mts +56 -0
- package/node_modules/@types/pg/index.d.ts +360 -0
- package/node_modules/@types/pg/lib/connection-parameters.d.ts +58 -0
- package/node_modules/@types/pg/lib/type-overrides.d.ts +77 -0
- package/node_modules/@types/pg/package.json +38 -0
- package/node_modules/@types/pg-copy-streams/LICENSE +21 -0
- package/node_modules/@types/pg-copy-streams/README.md +38 -0
- package/node_modules/@types/pg-copy-streams/index.d.ts +19 -0
- package/node_modules/@types/pg-copy-streams/package.json +28 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1176 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +150 -0
- package/node_modules/commander/lib/command.js +2777 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +747 -0
- package/node_modules/commander/lib/option.js +380 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +19 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1113 -0
- package/node_modules/pg/LICENSE +21 -0
- package/node_modules/pg/README.md +95 -0
- package/node_modules/pg/esm/index.mjs +20 -0
- package/node_modules/pg/lib/client.js +743 -0
- package/node_modules/pg/lib/connection-parameters.js +171 -0
- package/node_modules/pg/lib/connection.js +221 -0
- package/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
- package/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
- package/node_modules/pg/lib/crypto/utils.js +9 -0
- package/node_modules/pg/lib/defaults.js +91 -0
- package/node_modules/pg/lib/index.js +73 -0
- package/node_modules/pg/lib/native/client.js +323 -0
- package/node_modules/pg/lib/native/index.js +2 -0
- package/node_modules/pg/lib/native/query.js +165 -0
- package/node_modules/pg/lib/query.js +252 -0
- package/node_modules/pg/lib/result.js +109 -0
- package/node_modules/pg/lib/stream.js +83 -0
- package/node_modules/pg/lib/type-overrides.js +35 -0
- package/node_modules/pg/lib/utils.js +217 -0
- package/node_modules/pg/package.json +76 -0
- package/node_modules/pg-copy-streams/Makefile +19 -0
- package/node_modules/pg-copy-streams/README.md +315 -0
- package/node_modules/pg-copy-streams/copy-both.js +267 -0
- package/node_modules/pg-copy-streams/copy-from.js +173 -0
- package/node_modules/pg-copy-streams/copy-to.js +177 -0
- package/node_modules/pg-copy-streams/eslint.config.js +55 -0
- package/node_modules/pg-copy-streams/index.js +17 -0
- package/node_modules/pg-copy-streams/message-formats.js +27 -0
- package/node_modules/pg-copy-streams/obuf.js +376 -0
- package/node_modules/pg-copy-streams/package.json +51 -0
- package/package.json +136 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
const Buffer = require('buffer').Buffer
|
|
2
|
+
|
|
3
|
+
function OffsetBuffer() {
|
|
4
|
+
this.offset = 0
|
|
5
|
+
this.size = 0
|
|
6
|
+
this.buffers = []
|
|
7
|
+
}
|
|
8
|
+
module.exports = OffsetBuffer
|
|
9
|
+
|
|
10
|
+
OffsetBuffer.prototype.isEmpty = function isEmpty() {
|
|
11
|
+
return this.size === 0
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
OffsetBuffer.prototype.clone = function clone(size) {
|
|
15
|
+
const r = new OffsetBuffer()
|
|
16
|
+
r.offset = this.offset
|
|
17
|
+
r.size = size
|
|
18
|
+
r.buffers = this.buffers.slice()
|
|
19
|
+
return r
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
OffsetBuffer.prototype.toChunks = function toChunks() {
|
|
23
|
+
if (this.size === 0) return []
|
|
24
|
+
|
|
25
|
+
// We are going to slice it anyway
|
|
26
|
+
if (this.offset !== 0) {
|
|
27
|
+
this.buffers[0] = this.buffers[0].slice(this.offset)
|
|
28
|
+
this.offset = 0
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const chunks = []
|
|
32
|
+
let off = 0
|
|
33
|
+
let i
|
|
34
|
+
for (i = 0; off <= this.size && i < this.buffers.length; i++) {
|
|
35
|
+
let buf = this.buffers[i]
|
|
36
|
+
off += buf.length
|
|
37
|
+
|
|
38
|
+
// Slice off last buffer
|
|
39
|
+
if (off > this.size) {
|
|
40
|
+
buf = buf.slice(0, buf.length - (off - this.size))
|
|
41
|
+
this.buffers[i] = buf
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
chunks.push(buf)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// If some buffers were skipped - trim length
|
|
48
|
+
if (i < this.buffers.length) this.buffers.length = i
|
|
49
|
+
|
|
50
|
+
return chunks
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
OffsetBuffer.prototype.toString = function toString(enc) {
|
|
54
|
+
return this.toChunks()
|
|
55
|
+
.map(function (c) {
|
|
56
|
+
return c.toString(enc)
|
|
57
|
+
})
|
|
58
|
+
.join('')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
OffsetBuffer.prototype.use = function use(buf, off, n) {
|
|
62
|
+
this.buffers = [buf]
|
|
63
|
+
this.offset = off
|
|
64
|
+
this.size = n
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
OffsetBuffer.prototype.push = function push(data) {
|
|
68
|
+
// Ignore empty writes
|
|
69
|
+
if (data.length === 0) return
|
|
70
|
+
|
|
71
|
+
this.size += data.length
|
|
72
|
+
this.buffers.push(data)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
OffsetBuffer.prototype.has = function has(n) {
|
|
76
|
+
return this.size >= n
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
OffsetBuffer.prototype.skip = function skip(n) {
|
|
80
|
+
if (this.size === 0) return
|
|
81
|
+
|
|
82
|
+
this.size -= n
|
|
83
|
+
|
|
84
|
+
// Fast case, skip bytes in a first buffer
|
|
85
|
+
if (this.offset + n < this.buffers[0].length) {
|
|
86
|
+
this.offset += n
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let left = n - (this.buffers[0].length - this.offset)
|
|
91
|
+
this.offset = 0
|
|
92
|
+
let shift
|
|
93
|
+
for (shift = 1; left > 0 && shift < this.buffers.length; shift++) {
|
|
94
|
+
const buf = this.buffers[shift]
|
|
95
|
+
if (buf.length > left) {
|
|
96
|
+
this.offset = left
|
|
97
|
+
break
|
|
98
|
+
}
|
|
99
|
+
left -= buf.length
|
|
100
|
+
}
|
|
101
|
+
this.buffers = this.buffers.slice(shift)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
OffsetBuffer.prototype.copy = function copy(target, targetOff, off, n) {
|
|
105
|
+
if (this.size === 0) return
|
|
106
|
+
if (off !== 0) throw new Error('Unsupported offset in .copy()')
|
|
107
|
+
|
|
108
|
+
let toff = targetOff
|
|
109
|
+
const first = this.buffers[0]
|
|
110
|
+
const toCopy = Math.min(n, first.length - this.offset)
|
|
111
|
+
first.copy(target, toff, this.offset, this.offset + toCopy)
|
|
112
|
+
|
|
113
|
+
toff += toCopy
|
|
114
|
+
let left = n - toCopy
|
|
115
|
+
for (let i = 1; left > 0 && i < this.buffers.length; i++) {
|
|
116
|
+
const buf = this.buffers[i]
|
|
117
|
+
const toCopy = Math.min(left, buf.length)
|
|
118
|
+
|
|
119
|
+
buf.copy(target, toff, 0, toCopy)
|
|
120
|
+
|
|
121
|
+
toff += toCopy
|
|
122
|
+
left -= toCopy
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
OffsetBuffer.prototype.take = function take(n) {
|
|
127
|
+
if (n === 0) return Buffer.alloc(0)
|
|
128
|
+
|
|
129
|
+
this.size -= n
|
|
130
|
+
|
|
131
|
+
// Fast cases
|
|
132
|
+
const first = this.buffers[0].length - this.offset
|
|
133
|
+
if (first === n) {
|
|
134
|
+
let r = this.buffers.shift()
|
|
135
|
+
if (this.offset !== 0) {
|
|
136
|
+
r = r.slice(this.offset)
|
|
137
|
+
this.offset = 0
|
|
138
|
+
}
|
|
139
|
+
return r
|
|
140
|
+
} else if (first > n) {
|
|
141
|
+
const r = this.buffers[0].slice(this.offset, this.offset + n)
|
|
142
|
+
this.offset += n
|
|
143
|
+
return r
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Allocate and fill buffer
|
|
147
|
+
const out = Buffer.alloc(n)
|
|
148
|
+
let toOff = 0
|
|
149
|
+
let startOff = this.offset
|
|
150
|
+
let i
|
|
151
|
+
for (i = 0; toOff !== n && i < this.buffers.length; i++) {
|
|
152
|
+
const buf = this.buffers[i]
|
|
153
|
+
const toCopy = Math.min(buf.length - startOff, n - toOff)
|
|
154
|
+
|
|
155
|
+
buf.copy(out, toOff, startOff, startOff + toCopy)
|
|
156
|
+
if (startOff + toCopy < buf.length) {
|
|
157
|
+
this.offset = startOff + toCopy
|
|
158
|
+
break
|
|
159
|
+
} else {
|
|
160
|
+
toOff += toCopy
|
|
161
|
+
startOff = 0
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
this.buffers = this.buffers.slice(i)
|
|
166
|
+
if (this.buffers.length === 0) this.offset = 0
|
|
167
|
+
|
|
168
|
+
return out
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
OffsetBuffer.prototype.peekUInt8 = function peekUInt8() {
|
|
172
|
+
return this.buffers[0][this.offset]
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
OffsetBuffer.prototype.readUInt8 = function readUInt8() {
|
|
176
|
+
this.size -= 1
|
|
177
|
+
const first = this.buffers[0]
|
|
178
|
+
const r = first[this.offset]
|
|
179
|
+
if (++this.offset === first.length) {
|
|
180
|
+
this.offset = 0
|
|
181
|
+
this.buffers.shift()
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return r
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
OffsetBuffer.prototype.readUInt16LE = function readUInt16LE() {
|
|
188
|
+
const first = this.buffers[0]
|
|
189
|
+
this.size -= 2
|
|
190
|
+
|
|
191
|
+
let r
|
|
192
|
+
let shift
|
|
193
|
+
|
|
194
|
+
// Fast case - first buffer has all bytes
|
|
195
|
+
if (first.length - this.offset >= 2) {
|
|
196
|
+
r = first.readUInt16LE(this.offset)
|
|
197
|
+
shift = 0
|
|
198
|
+
this.offset += 2
|
|
199
|
+
|
|
200
|
+
// One byte here - one byte there
|
|
201
|
+
} else {
|
|
202
|
+
r = first[this.offset] | (this.buffers[1][0] << 8)
|
|
203
|
+
shift = 1
|
|
204
|
+
this.offset = 1
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (this.offset === this.buffers[shift].length) {
|
|
208
|
+
this.offset = 0
|
|
209
|
+
shift++
|
|
210
|
+
}
|
|
211
|
+
if (shift !== 0) this.buffers = this.buffers.slice(shift)
|
|
212
|
+
|
|
213
|
+
return r
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
OffsetBuffer.prototype.readUInt24LE = function readUInt24LE() {
|
|
217
|
+
const first = this.buffers[0]
|
|
218
|
+
|
|
219
|
+
let r
|
|
220
|
+
let shift
|
|
221
|
+
const firstHas = first.length - this.offset
|
|
222
|
+
|
|
223
|
+
// Fast case - first buffer has all bytes
|
|
224
|
+
if (firstHas >= 3) {
|
|
225
|
+
r = first.readUInt16LE(this.offset) | (first[this.offset + 2] << 16)
|
|
226
|
+
shift = 0
|
|
227
|
+
this.offset += 3
|
|
228
|
+
|
|
229
|
+
// First buffer has 2 of 3 bytes
|
|
230
|
+
} else if (firstHas >= 2) {
|
|
231
|
+
r = first.readUInt16LE(this.offset) | (this.buffers[1][0] << 16)
|
|
232
|
+
shift = 1
|
|
233
|
+
this.offset = 1
|
|
234
|
+
|
|
235
|
+
// Slow case: First buffer has 1 of 3 bytes
|
|
236
|
+
} else {
|
|
237
|
+
r = first[this.offset]
|
|
238
|
+
this.offset = 0
|
|
239
|
+
this.buffers.shift()
|
|
240
|
+
this.size -= 1
|
|
241
|
+
|
|
242
|
+
r |= this.readUInt16LE() << 8
|
|
243
|
+
return r
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
this.size -= 3
|
|
247
|
+
if (this.offset === this.buffers[shift].length) {
|
|
248
|
+
this.offset = 0
|
|
249
|
+
shift++
|
|
250
|
+
}
|
|
251
|
+
if (shift !== 0) this.buffers = this.buffers.slice(shift)
|
|
252
|
+
|
|
253
|
+
return r
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
OffsetBuffer.prototype.readUInt32LE = function readUInt32LE() {
|
|
257
|
+
const first = this.buffers[0]
|
|
258
|
+
|
|
259
|
+
let r
|
|
260
|
+
let shift
|
|
261
|
+
const firstHas = first.length - this.offset
|
|
262
|
+
|
|
263
|
+
// Fast case - first buffer has all bytes
|
|
264
|
+
if (firstHas >= 4) {
|
|
265
|
+
r = first.readUInt32LE(this.offset)
|
|
266
|
+
shift = 0
|
|
267
|
+
this.offset += 4
|
|
268
|
+
|
|
269
|
+
// First buffer has 3 of 4 bytes
|
|
270
|
+
} else if (firstHas >= 3) {
|
|
271
|
+
r = (first.readUInt16LE(this.offset) | (first[this.offset + 2] << 16)) + this.buffers[1][0] * 0x1000000
|
|
272
|
+
shift = 1
|
|
273
|
+
this.offset = 1
|
|
274
|
+
|
|
275
|
+
// Slow case: First buffer has 2 of 4 bytes
|
|
276
|
+
} else if (firstHas >= 2) {
|
|
277
|
+
r = first.readUInt16LE(this.offset)
|
|
278
|
+
this.offset = 0
|
|
279
|
+
this.buffers.shift()
|
|
280
|
+
this.size -= 2
|
|
281
|
+
|
|
282
|
+
r += this.readUInt16LE() * 0x10000
|
|
283
|
+
return r
|
|
284
|
+
|
|
285
|
+
// Slow case: First buffer has 1 of 4 bytes
|
|
286
|
+
} else {
|
|
287
|
+
r = first[this.offset]
|
|
288
|
+
this.offset = 0
|
|
289
|
+
this.buffers.shift()
|
|
290
|
+
this.size -= 1
|
|
291
|
+
|
|
292
|
+
r += this.readUInt24LE() * 0x100
|
|
293
|
+
return r
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
this.size -= 4
|
|
297
|
+
if (this.offset === this.buffers[shift].length) {
|
|
298
|
+
this.offset = 0
|
|
299
|
+
shift++
|
|
300
|
+
}
|
|
301
|
+
if (shift !== 0) this.buffers = this.buffers.slice(shift)
|
|
302
|
+
|
|
303
|
+
return r
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
OffsetBuffer.prototype.readUInt16BE = function readUInt16BE() {
|
|
307
|
+
const r = this.readUInt16LE()
|
|
308
|
+
|
|
309
|
+
return ((r & 0xff) << 8) | (r >> 8)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
OffsetBuffer.prototype.readUInt24BE = function readUInt24BE() {
|
|
313
|
+
const r = this.readUInt24LE()
|
|
314
|
+
|
|
315
|
+
return ((r & 0xff) << 16) | (((r >> 8) & 0xff) << 8) | (r >> 16)
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
OffsetBuffer.prototype.readUInt32BE = function readUInt32BE() {
|
|
319
|
+
const r = this.readUInt32LE()
|
|
320
|
+
|
|
321
|
+
return (((r & 0xff) << 24) | (((r >>> 8) & 0xff) << 16) | (((r >>> 16) & 0xff) << 8) | (r >>> 24)) >>> 0
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Signed number APIs
|
|
325
|
+
|
|
326
|
+
function signedInt8(num) {
|
|
327
|
+
if (num >= 0x80) return -(0xff ^ num) - 1
|
|
328
|
+
else return num
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
OffsetBuffer.prototype.peekInt8 = function peekInt8() {
|
|
332
|
+
return signedInt8(this.peekUInt8())
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
OffsetBuffer.prototype.readInt8 = function readInt8() {
|
|
336
|
+
return signedInt8(this.readUInt8())
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function signedInt16(num) {
|
|
340
|
+
if (num >= 0x8000) return -(0xffff ^ num) - 1
|
|
341
|
+
else return num
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
OffsetBuffer.prototype.readInt16BE = function readInt16BE() {
|
|
345
|
+
return signedInt16(this.readUInt16BE())
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
OffsetBuffer.prototype.readInt16LE = function readInt16LE() {
|
|
349
|
+
return signedInt16(this.readUInt16LE())
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function signedInt24(num) {
|
|
353
|
+
if (num >= 0x800000) return -(0xffffff ^ num) - 1
|
|
354
|
+
else return num
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
OffsetBuffer.prototype.readInt24BE = function readInt24BE() {
|
|
358
|
+
return signedInt24(this.readUInt24BE())
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
OffsetBuffer.prototype.readInt24LE = function readInt24LE() {
|
|
362
|
+
return signedInt24(this.readUInt24LE())
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function signedInt32(num) {
|
|
366
|
+
if (num >= 0x80000000) return -(0xffffffff ^ num) - 1
|
|
367
|
+
else return num
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
OffsetBuffer.prototype.readInt32BE = function readInt32BE() {
|
|
371
|
+
return signedInt32(this.readUInt32BE())
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
OffsetBuffer.prototype.readInt32LE = function readInt32LE() {
|
|
375
|
+
return signedInt32(this.readUInt32LE())
|
|
376
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pg-copy-streams",
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"description": "Low-Level COPY TO and COPY FROM streams for PostgreSQL in JavaScript using",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "npm run lint && mocha --v8-expose-gc",
|
|
8
|
+
"lint": "[ \"$(node -v | cut -d. -f1)\" = \"v8\" ] || eslint '**/*.{js,ts}'"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git://github.com/brianc/node-pg-copy-streams.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"postgres",
|
|
16
|
+
"copy",
|
|
17
|
+
"in",
|
|
18
|
+
"out",
|
|
19
|
+
"stream"
|
|
20
|
+
],
|
|
21
|
+
"author": "Brian M. Carlson",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/brianc/node-pg-copy-streams/issues"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
28
|
+
"@eslint/js": "^9.27.0",
|
|
29
|
+
"async": "~0.2.10",
|
|
30
|
+
"benchmark": "^2.1.4",
|
|
31
|
+
"concat-stream": "^2.0.0",
|
|
32
|
+
"csv-parse": "^5.6.0",
|
|
33
|
+
"csv-parser": "^3.2.0",
|
|
34
|
+
"duplex-child-process": "^1.0.0",
|
|
35
|
+
"eslint": "^9.27.0",
|
|
36
|
+
"eslint-config-prettier": "^10.1.5",
|
|
37
|
+
"eslint-plugin-prettier": "^5.4.0",
|
|
38
|
+
"globals": "^16.2.0",
|
|
39
|
+
"lodash": "^4.17.21",
|
|
40
|
+
"mocha": "^11.5.0",
|
|
41
|
+
"pg": "^8.16.0",
|
|
42
|
+
"prettier": "^3.5.3"
|
|
43
|
+
},
|
|
44
|
+
"prettier": {
|
|
45
|
+
"semi": false,
|
|
46
|
+
"printWidth": 120,
|
|
47
|
+
"arrowParens": "always",
|
|
48
|
+
"trailingComma": "es5",
|
|
49
|
+
"singleQuote": true
|
|
50
|
+
}
|
|
51
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wbce/projen-d9",
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "git@github.com:LaWebcapsule/projen-templates.git"
|
|
6
|
+
},
|
|
7
|
+
"bin": {
|
|
8
|
+
"wbce-d9": "lib/cli/index.js",
|
|
9
|
+
"wbce-directus": "lib/cli/index.js"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "webcapsule",
|
|
13
|
+
"email": "support@wbce.io",
|
|
14
|
+
"organization": false
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@stylistic/eslint-plugin": "^2",
|
|
18
|
+
"@types/jest": "^30.0.0",
|
|
19
|
+
"@types/node": "^12.20.55",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^8",
|
|
21
|
+
"@typescript-eslint/parser": "^8",
|
|
22
|
+
"@wbce/projen-d9-extension": "*",
|
|
23
|
+
"@wbce/projen-shared": "0.0.3",
|
|
24
|
+
"constructs": "^10.0.0",
|
|
25
|
+
"eslint": "^9",
|
|
26
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
27
|
+
"eslint-plugin-import": "^2.32.0",
|
|
28
|
+
"jest": "^30.3.0",
|
|
29
|
+
"jest-junit": "^16",
|
|
30
|
+
"jsii": "~5.9.0",
|
|
31
|
+
"jsii-diff": "^1.127.0",
|
|
32
|
+
"jsii-docgen": "^10.5.0",
|
|
33
|
+
"jsii-pacmak": "^1.127.0",
|
|
34
|
+
"jsii-rosetta": "~5.9.0",
|
|
35
|
+
"projen": "^0.99.24",
|
|
36
|
+
"ts-jest": "^29.4.6",
|
|
37
|
+
"typescript": "^5.9.3"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@wbce/projen-d9-extension": "*",
|
|
41
|
+
"@wbce/projen-shared": "0.0.3",
|
|
42
|
+
"constructs": "^10.6.0",
|
|
43
|
+
"projen": "^0.99.24"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@types/pg": "^8.20.0",
|
|
47
|
+
"@types/pg-copy-streams": "^1.2.5",
|
|
48
|
+
"commander": "^14.0.3",
|
|
49
|
+
"pg": "^8.20.0",
|
|
50
|
+
"pg-copy-streams": "^7.0.0"
|
|
51
|
+
},
|
|
52
|
+
"bundledDependencies": [
|
|
53
|
+
"@types/pg",
|
|
54
|
+
"@types/pg-copy-streams",
|
|
55
|
+
"commander",
|
|
56
|
+
"pg",
|
|
57
|
+
"pg-copy-streams"
|
|
58
|
+
],
|
|
59
|
+
"main": "lib/index.js",
|
|
60
|
+
"license": "GPL-3.0-or-later",
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
},
|
|
64
|
+
"version": "0.0.27",
|
|
65
|
+
"jest": {
|
|
66
|
+
"coverageProvider": "v8",
|
|
67
|
+
"testMatch": [
|
|
68
|
+
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
69
|
+
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)"
|
|
70
|
+
],
|
|
71
|
+
"clearMocks": true,
|
|
72
|
+
"collectCoverage": true,
|
|
73
|
+
"coverageReporters": [
|
|
74
|
+
"json",
|
|
75
|
+
"lcov",
|
|
76
|
+
"clover",
|
|
77
|
+
"cobertura",
|
|
78
|
+
"text"
|
|
79
|
+
],
|
|
80
|
+
"coverageDirectory": "coverage",
|
|
81
|
+
"coveragePathIgnorePatterns": [
|
|
82
|
+
"/node_modules/"
|
|
83
|
+
],
|
|
84
|
+
"testPathIgnorePatterns": [
|
|
85
|
+
"/node_modules/"
|
|
86
|
+
],
|
|
87
|
+
"watchPathIgnorePatterns": [
|
|
88
|
+
"/node_modules/"
|
|
89
|
+
],
|
|
90
|
+
"reporters": [
|
|
91
|
+
"default",
|
|
92
|
+
[
|
|
93
|
+
"jest-junit",
|
|
94
|
+
{
|
|
95
|
+
"outputDirectory": "test-reports"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
],
|
|
99
|
+
"transform": {
|
|
100
|
+
"^.+\\.[t]sx?$": [
|
|
101
|
+
"ts-jest",
|
|
102
|
+
{
|
|
103
|
+
"tsconfig": "tsconfig.dev.json"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"types": "lib/index.d.ts",
|
|
109
|
+
"stability": "stable",
|
|
110
|
+
"jsii": {
|
|
111
|
+
"outdir": "dist",
|
|
112
|
+
"targets": {},
|
|
113
|
+
"tsc": {
|
|
114
|
+
"outDir": "lib",
|
|
115
|
+
"rootDir": "src"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".",
|
|
119
|
+
"scripts": {
|
|
120
|
+
"build": "npx projen build",
|
|
121
|
+
"compat": "npx projen compat",
|
|
122
|
+
"compile": "npx projen compile",
|
|
123
|
+
"default": "npx projen default",
|
|
124
|
+
"docgen": "npx projen docgen",
|
|
125
|
+
"eslint": "npx projen eslint",
|
|
126
|
+
"package": "npx projen package",
|
|
127
|
+
"package-all": "npx projen package-all",
|
|
128
|
+
"package:js": "npx projen package:js",
|
|
129
|
+
"post-compile": "npx projen post-compile",
|
|
130
|
+
"pre-compile": "npx projen pre-compile",
|
|
131
|
+
"test": "npx projen test",
|
|
132
|
+
"test:watch": "npx projen test:watch",
|
|
133
|
+
"watch": "npx projen watch",
|
|
134
|
+
"projen": "npx projen"
|
|
135
|
+
}
|
|
136
|
+
}
|