mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Compare commits
26 Commits
pg-cloudfl
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eb7529a59 | ||
|
|
b94c8e1366 | ||
|
|
5a581bbb34 | ||
|
|
6bf475c3c1 | ||
|
|
d10e09c888 | ||
|
|
8750cada1d | ||
|
|
ecff60dc8a | ||
|
|
8d493f3b55 | ||
|
|
917478397b | ||
|
|
f5c90a5484 | ||
|
|
65bc3d4884 | ||
|
|
a6c1084db1 | ||
|
|
1b2bedc9c8 | ||
|
|
27a2754787 | ||
|
|
01fadd93d7 | ||
|
|
43b8692019 | ||
|
|
fab87b28af | ||
|
|
c8fb1e9261 | ||
|
|
54e0424991 | ||
|
|
235d7ad5e2 | ||
|
|
8f8e7315e8 | ||
|
|
f0d1c4868a | ||
|
|
0ad6c9b71e | ||
|
|
54964ecff7 | ||
|
|
1a25d12817 | ||
|
|
e00aac1398 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -42,8 +42,8 @@ jobs:
|
||||
- '18'
|
||||
- '20'
|
||||
- '22'
|
||||
- '23'
|
||||
- '24'
|
||||
- '25'
|
||||
os:
|
||||
- ubuntu-latest
|
||||
name: Node.js ${{ matrix.node }}
|
||||
|
||||
@ -4,6 +4,10 @@ For richer information consult the commit log on github with referenced pull req
|
||||
|
||||
We do not include break-fix version release in this file.
|
||||
|
||||
## pg@8.17.0
|
||||
|
||||
- Throw correct error if database URL parsing [fails](https://github.com/brianc/node-postgres/issues/3513).
|
||||
|
||||
## pg@8.16.0
|
||||
|
||||
- Add support for [min connection pool size](https://github.com/brianc/node-postgres/pull/3438).
|
||||
|
||||
@ -91,7 +91,7 @@ const result = await pool.query('SELECT $1::text as name', ['brianc'])
|
||||
console.log(result.rows[0].name) // brianc
|
||||
```
|
||||
|
||||
Notice in the example above there is no need to check out or release a client. The pool is doing the acquiring and releasing internally. I find `pool.query` to be a handy shortcut many situations and use it exclusively unless I need a transaction.
|
||||
Notice in the example above there is no need to check out or release a client. The pool is doing the acquiring and releasing internally. I find `pool.query` to be a handy shortcut in many situations and I use it exclusively unless I need a transaction.
|
||||
|
||||
<Alert>
|
||||
<div>
|
||||
@ -112,7 +112,7 @@ Acquires a client from the pool.
|
||||
|
||||
- If there are idle clients in the pool one will be returned to the callback on `process.nextTick`.
|
||||
- If the pool is not full but all current clients are checked out a new client will be created & returned to this callback.
|
||||
- If the pool is 'full' and all clients are currently checked out will wait in a FIFO queue until a client becomes available by it being released back to the pool.
|
||||
- If the pool is 'full' and all clients are currently checked out, requests will wait in a FIFO queue until a client becomes available by being released back to the pool.
|
||||
|
||||
```js
|
||||
import { Pool } from 'pg'
|
||||
|
||||
@ -3,6 +3,10 @@ title: Upgrading
|
||||
slug: /guides/upgrading
|
||||
---
|
||||
|
||||
## node version support
|
||||
|
||||
I have maintained legacy apps in production for many years. I get it...upgrading node and your entire dependency tree is rough, but so is missing out on critical fixes. I've taken pride over the years in not introducing breaking changes without a need because I've spent too much of my own time in my own apps upgrading a semver major version of a library with many breaking changes. That being said: node-postgres only _officially_ supports node versions which are still under the [LTS lifetime](https://nodejs.org/en/about/previous-releases). The [CI matrix](https://github.com/brianc/node-postgres/blob/master/.github/workflows/ci.yml#L39) is the most official and enforced compatiblity matrix; however, I may drop support for node versions outside of node's LTS lifetime at any time, with any semver minor release, if it is required to land new features or bug fixes on supported versions of node. I recommend in general to use a lockfile, and, if you're on an older version of node nearing EOL use absolutely pinned versions for as many of your modules as you can, including this one.
|
||||
|
||||
# Upgrading to 8.0
|
||||
|
||||
node-postgres at 8.0 introduces a breaking change to ssl-verified connections. If you connect with ssl and use
|
||||
@ -23,10 +27,6 @@ The rest of the changes are relatively minor and unlikely to cause issues; see [
|
||||
|
||||
node-postgres at 7.0 introduces somewhat significant breaking changes to the public API.
|
||||
|
||||
## node version support
|
||||
|
||||
Starting with `pg@7.0` the earliest version of node supported will be `node@4.x LTS`. Support for `node@0.12.x` and `node@.10.x` is dropped, and the module wont work as it relies on new es6 features not available in older versions of node.
|
||||
|
||||
## pg singleton
|
||||
|
||||
In the past there was a singleton pool manager attached to the root `pg` object in the package. This singleton could be used to provision connection pools automatically by calling `pg.connect`. This API caused a lot of confusion for users. It also introduced a opaque module-managed singleton which was difficult to reason about, debug, error-prone, and inflexible. Starting in pg@6.0 the methods' documentation was removed, and starting in pg@6.3 the methods were deprecated with a warning message.
|
||||
|
||||
@ -22,7 +22,7 @@ Special thanks to [Medplum](https://www.medplum.com/) for sponsoring node-postgr
|
||||
<a href="https://www.medplum.com/">
|
||||
<img
|
||||
alt="Medplum"
|
||||
src="https://raw.githubusercontent.com/medplum/medplum-logo/refs/heads/main/medplum-logo.png"
|
||||
src="https://raw.githubusercontent.com/medplum/medplum-logo/refs/heads/main/v3/medplum-logo-grape8-277x60.png"
|
||||
style={{
|
||||
width: '300px',
|
||||
height: 'auto',
|
||||
|
||||
@ -4,5 +4,5 @@ await esbuild.build({
|
||||
entryPoints: ['./src/index.mjs'],
|
||||
bundle: true,
|
||||
outfile: './dist/esbuild-cloudflare.js',
|
||||
conditions: ['import', 'cloudflare'],
|
||||
conditions: ['import', 'workerd'],
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-bundler-test",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"description": "Test bundlers with pg-cloudflare, https://github.com/brianc/node-postgres/issues/3452",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
@ -9,7 +9,7 @@
|
||||
"@rollup/plugin-commonjs": "^28.0.3",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"esbuild": "^0.25.5",
|
||||
"pg-cloudflare": "^1.2.6",
|
||||
"pg-cloudflare": "^1.3.0",
|
||||
"rollup": "^4.41.1",
|
||||
"vite": "^6.3.5",
|
||||
"webpack": "^5.99.9",
|
||||
|
||||
@ -8,6 +8,6 @@ export default defineConfig({
|
||||
file: 'dist/rollup-cloudflare.js',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [nodeResolve({ exportConditions: ['import', 'cloudflare'], preferBuiltins: true }), commonjs()],
|
||||
plugins: [nodeResolve({ exportConditions: ['import', 'workerd'], preferBuiltins: true }), commonjs()],
|
||||
external: ['cloudflare:sockets'],
|
||||
})
|
||||
|
||||
@ -14,7 +14,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
conditions: ['import', 'cloudflare'],
|
||||
conditions: ['import', 'workerd'],
|
||||
},
|
||||
plugins: [commonjs()],
|
||||
})
|
||||
|
||||
@ -6,7 +6,7 @@ export default {
|
||||
output: {
|
||||
filename: 'webpack-cloudflare.js',
|
||||
},
|
||||
resolve: { conditionNames: ['import', 'cloudflare'] },
|
||||
resolve: { conditionNames: ['import', 'workerd'] },
|
||||
plugins: [
|
||||
// ignore cloudflare:sockets imports
|
||||
new webpack.IgnorePlugin({
|
||||
|
||||
@ -19,7 +19,7 @@ config. For example:
|
||||
```js
|
||||
export default {
|
||||
...,
|
||||
resolve: { conditionNames: [..., "cloudflare"] },
|
||||
resolve: { conditionNames: [..., "workerd"] },
|
||||
plugins: [
|
||||
// ignore cloudflare:sockets imports
|
||||
new webpack.IgnorePlugin({
|
||||
@ -29,11 +29,15 @@ config. For example:
|
||||
}
|
||||
```
|
||||
- `vite.config.js`
|
||||
|
||||
> [!NOTE]
|
||||
> If you are using the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin) then the following configuration is not necessary.
|
||||
|
||||
```js
|
||||
export default defineConfig({
|
||||
...,
|
||||
resolve: {
|
||||
conditions: [..., "cloudflare"],
|
||||
conditions: [..., "workerd"],
|
||||
},
|
||||
build: {
|
||||
...,
|
||||
@ -44,11 +48,12 @@ config. For example:
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
- `rollup.config.js`
|
||||
```js
|
||||
export default defineConfig({
|
||||
...,
|
||||
plugins: [..., nodeResolve({ exportConditions: [..., 'cloudflare'] })],
|
||||
plugins: [..., nodeResolve({ exportConditions: [..., 'workerd'] })],
|
||||
// don't try to bundle cloudflare:sockets
|
||||
external: [..., 'cloudflare:sockets'],
|
||||
})
|
||||
@ -57,7 +62,7 @@ config. For example:
|
||||
```js
|
||||
await esbuild.build({
|
||||
...,
|
||||
conditions: [..., 'cloudflare'],
|
||||
conditions: [..., 'workerd'],
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-cloudflare",
|
||||
"version": "1.2.6",
|
||||
"version": "1.3.0",
|
||||
"description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -11,12 +11,13 @@
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"cloudflare": {
|
||||
"workerd": {
|
||||
"import": "./esm/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"default": "./dist/empty.js"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const { emitWarning } = require('node:process')
|
||||
|
||||
//Parse method copied from https://github.com/brianc/node-postgres
|
||||
//Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com)
|
||||
//MIT License
|
||||
@ -33,6 +35,7 @@ function parse(str, options = {}) {
|
||||
} catch (err) {
|
||||
// Remove the input from the error message to avoid leaking sensitive information
|
||||
err.input && (err.input = '*****REDACTED*****')
|
||||
throw err
|
||||
}
|
||||
|
||||
// We'd like to use Object.fromEntries() here but Node.js 10 does not support it
|
||||
@ -138,6 +141,9 @@ function parse(str, options = {}) {
|
||||
case 'require':
|
||||
case 'verify-ca':
|
||||
case 'verify-full': {
|
||||
if (config.sslmode !== 'verify-full') {
|
||||
deprecatedSslModeWarning(config.sslmode)
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'no-verify': {
|
||||
@ -206,6 +212,20 @@ function parseIntoClientConfig(str) {
|
||||
return toClientConfig(parse(str))
|
||||
}
|
||||
|
||||
function deprecatedSslModeWarning(sslmode) {
|
||||
if (!deprecatedSslModeWarning.warned) {
|
||||
deprecatedSslModeWarning.warned = true
|
||||
emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
|
||||
In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.
|
||||
|
||||
To prepare for this change:
|
||||
- If you want the current behavior, explicitly use 'sslmode=verify-full'
|
||||
- If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${sslmode}'
|
||||
|
||||
See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = parse
|
||||
|
||||
parse.parse = parse
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-connection-string",
|
||||
"version": "2.9.1",
|
||||
"version": "2.10.0",
|
||||
"description": "Functions for dealing with a PostgresSQL connection string",
|
||||
"main": "./index.js",
|
||||
"types": "./index.d.ts",
|
||||
|
||||
@ -330,6 +330,7 @@ describe('parse', function () {
|
||||
parse(connectionString)
|
||||
} catch (err: unknown) {
|
||||
expect(JSON.stringify(err)).to.not.include(password, 'Password should not be in the error message')
|
||||
expect(JSON.stringify(err)).to.include('REDACTED', 'The thrown error should contain the redacted URL')
|
||||
return
|
||||
}
|
||||
throw new Error('Expected an error to be thrown')
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-cursor",
|
||||
"version": "2.15.1",
|
||||
"version": "2.16.1",
|
||||
"description": "Query cursor extension for node-postgres",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
@ -25,7 +25,7 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"mocha": "^10.5.2",
|
||||
"pg": "^8.16.1"
|
||||
"pg": "^8.17.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"pg": "^8"
|
||||
|
||||
@ -5,9 +5,14 @@ const { describe, it } = test
|
||||
const paths = [
|
||||
'pg',
|
||||
'pg/lib/index.js',
|
||||
'pg/lib/index',
|
||||
'pg/lib/connection-parameters',
|
||||
'pg/lib/connection-parameters.js',
|
||||
'pg/lib/type-overrides',
|
||||
'pg-protocol/dist/messages.js',
|
||||
'pg-protocol/dist/messages',
|
||||
'pg-native/lib/build-result.js',
|
||||
'pg-cloudflare/package.json',
|
||||
]
|
||||
for (const path of paths) {
|
||||
describe(`importing ${path}`, () => {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "pg-esm-test",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.1",
|
||||
"description": "A test module for PostgreSQL with ESM support",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "node --test --conditions=cloudflare"
|
||||
"test": "node --test --conditions=workerd"
|
||||
},
|
||||
"keywords": [
|
||||
"postgres",
|
||||
@ -14,13 +14,13 @@
|
||||
"test"
|
||||
],
|
||||
"devDependencies": {
|
||||
"pg": "^8.16.1",
|
||||
"pg-cloudflare": "^1.2.6",
|
||||
"pg-cursor": "^2.15.1",
|
||||
"pg-native": "^3.5.1",
|
||||
"pg-pool": "^3.10.1",
|
||||
"pg-protocol": "^1.10.1",
|
||||
"pg-query-stream": "^4.10.1"
|
||||
"pg": "^8.17.1",
|
||||
"pg-cloudflare": "^1.3.0",
|
||||
"pg-cursor": "^2.16.1",
|
||||
"pg-native": "^3.5.2",
|
||||
"pg-pool": "^3.11.0",
|
||||
"pg-protocol": "^1.11.0",
|
||||
"pg-query-stream": "^4.11.1"
|
||||
},
|
||||
"author": "Brian M. Carlson <brian.m.carlson@gmail.com>",
|
||||
"license": "MIT"
|
||||
|
||||
@ -18,7 +18,7 @@ const Client = (module.exports = function (config) {
|
||||
this._reading = false
|
||||
this._read = this._read.bind(this)
|
||||
|
||||
// allow custom type converstion to be passed in
|
||||
// allow custom type conversion to be passed in
|
||||
this._types = config.types || types
|
||||
|
||||
// allow config to specify returning results
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-native",
|
||||
"version": "3.5.1",
|
||||
"version": "3.5.2",
|
||||
"description": "A slightly nicer interface to Postgres over node-libpq",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
# pg-pool
|
||||
|
||||
[](https://travis-ci.org/brianc/node-pg-pool)
|
||||
|
||||
A connection pool for node-postgres
|
||||
|
||||
## install
|
||||
|
||||
```sh
|
||||
npm i pg-pool pg
|
||||
```
|
||||
@ -48,14 +50,15 @@ const pgNativePool = new Pool({ Client: PgNativeClient })
|
||||
```
|
||||
|
||||
##### Note:
|
||||
|
||||
The Pool constructor does not support passing a Database URL as the parameter. To use pg-pool on heroku, for example, you need to parse the URL into a config object. Here is an example of how to parse a Database URL.
|
||||
|
||||
```js
|
||||
const Pool = require('pg-pool');
|
||||
const Pool = require('pg-pool')
|
||||
const url = require('url')
|
||||
|
||||
const params = url.parse(process.env.DATABASE_URL);
|
||||
const auth = params.auth.split(':');
|
||||
const params = url.parse(process.env.DATABASE_URL)
|
||||
const auth = params.auth.split(':')
|
||||
|
||||
const config = {
|
||||
user: auth[0],
|
||||
@ -63,10 +66,10 @@ const config = {
|
||||
host: params.hostname,
|
||||
port: params.port,
|
||||
database: params.pathname.split('/')[1],
|
||||
ssl: true
|
||||
};
|
||||
ssl: true,
|
||||
}
|
||||
|
||||
const pool = new Pool(config);
|
||||
const pool = new Pool(config)
|
||||
|
||||
/*
|
||||
Transforms, 'postgres://DBuser:secret@DBHost:#####/myDB', into
|
||||
@ -87,12 +90,14 @@ pg-pool supports a fully promise-based api for acquiring clients
|
||||
|
||||
```js
|
||||
const pool = new Pool()
|
||||
pool.connect().then(client => {
|
||||
client.query('select $1::text as name', ['pg-pool']).then(res => {
|
||||
pool.connect().then((client) => {
|
||||
client
|
||||
.query('select $1::text as name', ['pg-pool'])
|
||||
.then((res) => {
|
||||
client.release()
|
||||
console.log('hello from', res.rows[0].name)
|
||||
})
|
||||
.catch(e => {
|
||||
.catch((e) => {
|
||||
client.release()
|
||||
console.error('query error', e.message, e.stack)
|
||||
})
|
||||
@ -105,7 +110,7 @@ this ends up looking much nicer if you're using [co](https://github.com/tj/co) o
|
||||
|
||||
```js
|
||||
// with async/await
|
||||
(async () => {
|
||||
;(async () => {
|
||||
const pool = new Pool()
|
||||
const client = await pool.connect()
|
||||
try {
|
||||
@ -114,7 +119,7 @@ this ends up looking much nicer if you're using [co](https://github.com/tj/co) o
|
||||
} finally {
|
||||
client.release()
|
||||
}
|
||||
})().catch(e => console.error(e.message, e.stack))
|
||||
})().catch((e) => console.error(e.message, e.stack))
|
||||
|
||||
// with co
|
||||
co(function* () {
|
||||
@ -125,7 +130,7 @@ co(function * () {
|
||||
} finally {
|
||||
client.release()
|
||||
}
|
||||
}).catch(e => console.error(e.message, e.stack))
|
||||
}).catch((e) => console.error(e.message, e.stack))
|
||||
```
|
||||
|
||||
### your new favorite helper method
|
||||
@ -148,7 +153,7 @@ pool.query('SELECT $1::text as name', ['brianc'], function (err, res) {
|
||||
})
|
||||
```
|
||||
|
||||
__pro tip:__ unless you need to run a transaction (which requires a single client for multiple queries) or you
|
||||
**pro tip:** unless you need to run a transaction (which requires a single client for multiple queries) or you
|
||||
have some other edge case like [streaming rows](https://github.com/brianc/node-pg-query-stream) or using a [cursor](https://github.com/brianc/node-pg-cursor)
|
||||
you should almost always just use `pool.query`. Its easy, it does the right thing :tm:, and wont ever forget to return
|
||||
clients back to the pool after the query is done.
|
||||
@ -187,7 +192,7 @@ await pool.end()
|
||||
|
||||
### a note on instances
|
||||
|
||||
The pool should be a __long-lived object__ in your application. Generally you'll want to instantiate one pool when your app starts up and use the same instance of the pool throughout the lifetime of your application. If you are frequently creating a new pool within your code you likely don't have your pool initialization code in the correct place. Example:
|
||||
The pool should be a **long-lived object** in your application. Generally you'll want to instantiate one pool when your app starts up and use the same instance of the pool throughout the lifetime of your application. If you are frequently creating a new pool within your code you likely don't have your pool initialization code in the correct place. Example:
|
||||
|
||||
```js
|
||||
// assume this is a file in your program at ./your-app/lib/db.js
|
||||
@ -237,7 +242,7 @@ pool.on('error', function(error, client) {
|
||||
|
||||
#### connect
|
||||
|
||||
Fired whenever the pool creates a __new__ `pg.Client` instance and successfully connects it to the backend.
|
||||
Fired whenever the pool creates a **new** `pg.Client` instance and successfully connects it to the backend.
|
||||
|
||||
Example:
|
||||
|
||||
@ -247,20 +252,19 @@ const pool = new Pool()
|
||||
|
||||
const count = 0
|
||||
|
||||
pool.on('connect', client => {
|
||||
pool.on('connect', (client) => {
|
||||
client.count = count++
|
||||
})
|
||||
|
||||
pool
|
||||
.connect()
|
||||
.then(client => {
|
||||
.then((client) => {
|
||||
return client
|
||||
.query('SELECT $1::int AS "clientCount"', [client.count])
|
||||
.then(res => console.log(res.rows[0].clientCount)) // outputs 0
|
||||
.then((res) => console.log(res.rows[0].clientCount)) // outputs 0
|
||||
.then(() => client)
|
||||
})
|
||||
.then(client => client.release())
|
||||
|
||||
.then((client) => client.release())
|
||||
```
|
||||
|
||||
#### acquire
|
||||
@ -293,7 +297,6 @@ setTimeout(function () {
|
||||
console.log('connect count:', connectCount) // output: connect count: 10
|
||||
console.log('acquire count:', acquireCount) // output: acquire count: 200
|
||||
}, 100)
|
||||
|
||||
```
|
||||
|
||||
### environment variables
|
||||
@ -310,27 +313,6 @@ PGSSLMODE=require
|
||||
|
||||
Usually I will export these into my local environment via a `.env` file with environment settings or export them in `~/.bash_profile` or something similar. This way I get configurability which works with both the postgres suite of tools (`psql`, `pg_dump`, `pg_restore`) and node, I can vary the environment variables locally and in production, and it supports the concept of a [12-factor app](http://12factor.net/) out of the box.
|
||||
|
||||
## bring your own promise
|
||||
|
||||
In versions of node `<=0.12.x` there is no native promise implementation available globally. You can polyfill the promise globally like this:
|
||||
|
||||
```js
|
||||
// first run `npm install promise-polyfill --save
|
||||
if (typeof Promise == 'undefined') {
|
||||
global.Promise = require('promise-polyfill')
|
||||
}
|
||||
```
|
||||
|
||||
You can use any other promise implementation you'd like. The pool also allows you to configure the promise implementation on a per-pool level:
|
||||
|
||||
```js
|
||||
const bluebirdPool = new Pool({
|
||||
Promise: require('bluebird')
|
||||
})
|
||||
```
|
||||
|
||||
__please note:__ in node `<=0.12.x` the pool will throw if you do not provide a promise constructor in one of the two ways mentioned above. In node `>=4.0.0` the pool will use the native promise implementation by default; however, the two methods above still allow you to "bring your own."
|
||||
|
||||
## maxUses and read-replica autoscaling (e.g. AWS Aurora)
|
||||
|
||||
The maxUses config option can help an application instance rebalance load against a replica set that has been auto-scaled after the connection pool is already full of healthy connections.
|
||||
|
||||
@ -372,8 +372,10 @@ class Pool extends EventEmitter {
|
||||
let tid
|
||||
if (this.options.idleTimeoutMillis && this._isAboveMin()) {
|
||||
tid = setTimeout(() => {
|
||||
if (this._isAboveMin()) {
|
||||
this.log('remove idle client')
|
||||
this._remove(client, this._pulseQueue.bind(this))
|
||||
}
|
||||
}, this.options.idleTimeoutMillis)
|
||||
|
||||
if (this.options.allowExitOnIdle) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-pool",
|
||||
"version": "3.10.1",
|
||||
"version": "3.11.0",
|
||||
"description": "Connection pool for node-postgres",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
@ -30,9 +30,9 @@
|
||||
"author": "Brian M. Carlson",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/brianc/node-pg-pool/issues"
|
||||
"url": "https://github.com/brianc/node-postgres/issues"
|
||||
},
|
||||
"homepage": "https://github.com/brianc/node-pg-pool#readme",
|
||||
"homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-pool#readme",
|
||||
"devDependencies": {
|
||||
"bluebird": "3.7.2",
|
||||
"co": "4.6.0",
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
'use strict'
|
||||
const co = require('co')
|
||||
const expect = require('expect.js')
|
||||
|
||||
const describe = require('mocha').describe
|
||||
const it = require('mocha').it
|
||||
const BluebirdPromise = require('bluebird')
|
||||
|
||||
const Pool = require('../')
|
||||
|
||||
const checkType = (promise) => {
|
||||
expect(promise).to.be.a(BluebirdPromise)
|
||||
return promise.catch((e) => undefined)
|
||||
}
|
||||
|
||||
describe('Bring your own promise', function () {
|
||||
it(
|
||||
'uses supplied promise for operations',
|
||||
co.wrap(function* () {
|
||||
const pool = new Pool({ Promise: BluebirdPromise })
|
||||
const client1 = yield checkType(pool.connect())
|
||||
client1.release()
|
||||
yield checkType(pool.query('SELECT NOW()'))
|
||||
const client2 = yield checkType(pool.connect())
|
||||
// TODO - make sure pg supports BYOP as well
|
||||
client2.release()
|
||||
yield checkType(pool.end())
|
||||
})
|
||||
)
|
||||
|
||||
it(
|
||||
'uses promises in errors',
|
||||
co.wrap(function* () {
|
||||
const pool = new Pool({ Promise: BluebirdPromise, port: 48484 })
|
||||
yield checkType(pool.connect())
|
||||
yield checkType(pool.end())
|
||||
yield checkType(pool.connect())
|
||||
yield checkType(pool.query())
|
||||
yield checkType(pool.end())
|
||||
})
|
||||
)
|
||||
})
|
||||
@ -124,3 +124,19 @@ describe('pool size of 2', () => {
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
describe('pool min size', () => {
|
||||
it(
|
||||
'does not drop below min when clients released at same time',
|
||||
co.wrap(function* () {
|
||||
const pool = new Pool({ max: 2, min: 1, idleTimeoutMillis: 10 })
|
||||
const client = yield pool.connect()
|
||||
const client2 = yield pool.connect()
|
||||
client.release()
|
||||
client2.release()
|
||||
yield new Promise((resolve) => setTimeout(resolve, 20))
|
||||
expect(pool.idleCount).to.equal(1)
|
||||
return yield pool.end()
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-protocol",
|
||||
"version": "1.10.1",
|
||||
"version": "1.11.0",
|
||||
"description": "The postgres client/server binary protocol, implemented in TypeScript",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -10,11 +10,8 @@
|
||||
"require": "./dist/index.js",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./dist/*": {
|
||||
"import": "./dist/*",
|
||||
"require": "./dist/*",
|
||||
"default": "./dist/*"
|
||||
}
|
||||
"./dist/*": "./dist/*.js",
|
||||
"./dist/*.js": "./dist/*.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
||||
@ -4,6 +4,7 @@ import { parse } from '.'
|
||||
import assert from 'assert'
|
||||
import { PassThrough } from 'stream'
|
||||
import { BackendMessage } from './messages'
|
||||
import { Parser } from './parser'
|
||||
|
||||
const authOkBuffer = buffers.authenticationOk()
|
||||
const paramStatusBuffer = buffers.parameterStatus('client_encoding', 'UTF8')
|
||||
@ -565,4 +566,10 @@ describe('PgPacketStream', function () {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('cleans up the reader after handling a packet', function () {
|
||||
const parser = new Parser()
|
||||
parser.parse(oneFieldBuf, () => {})
|
||||
assert.strictEqual((parser as any).reader.buffer.byteLength, 0)
|
||||
})
|
||||
})
|
||||
|
||||
@ -96,6 +96,7 @@ describe('serializer', () => {
|
||||
.addCString('')
|
||||
.addInt16(0)
|
||||
.addInt16(0)
|
||||
.addInt16(1)
|
||||
.addInt16(0)
|
||||
.join(true, 'B')
|
||||
assert.deepEqual(actual, expectedBuffer)
|
||||
@ -123,6 +124,7 @@ describe('serializer', () => {
|
||||
.addInt32(-1)
|
||||
.addInt32(4)
|
||||
.add(Buffer.from('zing'))
|
||||
.addInt16(1)
|
||||
.addInt16(0)
|
||||
.join(true, 'B')
|
||||
assert.deepEqual(actual, expectedBuffer)
|
||||
@ -149,6 +151,7 @@ describe('serializer', () => {
|
||||
.addInt32(-1)
|
||||
.addInt32(-1)
|
||||
.addInt32(-1)
|
||||
.addInt16(1)
|
||||
.addInt16(0)
|
||||
.join(true, 'B')
|
||||
assert.deepEqual(actual, expectedBuffer)
|
||||
@ -176,6 +179,7 @@ describe('serializer', () => {
|
||||
.addInt32(-1)
|
||||
.addInt32(4)
|
||||
.add(Buffer.from('zing', 'utf-8'))
|
||||
.addInt16(1)
|
||||
.addInt16(0)
|
||||
.join(true, 'B')
|
||||
assert.deepEqual(actual, expectedBuffer)
|
||||
|
||||
@ -36,6 +36,9 @@ const LEN_LENGTH = 4
|
||||
|
||||
const HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH
|
||||
|
||||
// A placeholder for a `BackendMessage`’s length value that will be set after construction.
|
||||
const LATEINIT_LENGTH = -1
|
||||
|
||||
export type Packet = {
|
||||
code: number
|
||||
packet: Buffer
|
||||
@ -152,160 +155,181 @@ export class Parser {
|
||||
}
|
||||
|
||||
private handlePacket(offset: number, code: number, length: number, bytes: Buffer): BackendMessage {
|
||||
const { reader } = this
|
||||
|
||||
// NOTE: This undesirably retains the buffer in `this.reader` if the `parse*Message` calls below throw. However, those should only throw in the case of a protocol error, which normally results in the reader being discarded.
|
||||
reader.setBuffer(offset, bytes)
|
||||
|
||||
let message: BackendMessage
|
||||
|
||||
switch (code) {
|
||||
case MessageCodes.BindComplete:
|
||||
return bindComplete
|
||||
message = bindComplete
|
||||
break
|
||||
case MessageCodes.ParseComplete:
|
||||
return parseComplete
|
||||
message = parseComplete
|
||||
break
|
||||
case MessageCodes.CloseComplete:
|
||||
return closeComplete
|
||||
message = closeComplete
|
||||
break
|
||||
case MessageCodes.NoData:
|
||||
return noData
|
||||
message = noData
|
||||
break
|
||||
case MessageCodes.PortalSuspended:
|
||||
return portalSuspended
|
||||
message = portalSuspended
|
||||
break
|
||||
case MessageCodes.CopyDone:
|
||||
return copyDone
|
||||
message = copyDone
|
||||
break
|
||||
case MessageCodes.ReplicationStart:
|
||||
return replicationStart
|
||||
message = replicationStart
|
||||
break
|
||||
case MessageCodes.EmptyQuery:
|
||||
return emptyQuery
|
||||
message = emptyQuery
|
||||
break
|
||||
case MessageCodes.DataRow:
|
||||
return this.parseDataRowMessage(offset, length, bytes)
|
||||
message = parseDataRowMessage(reader)
|
||||
break
|
||||
case MessageCodes.CommandComplete:
|
||||
return this.parseCommandCompleteMessage(offset, length, bytes)
|
||||
message = parseCommandCompleteMessage(reader)
|
||||
break
|
||||
case MessageCodes.ReadyForQuery:
|
||||
return this.parseReadyForQueryMessage(offset, length, bytes)
|
||||
message = parseReadyForQueryMessage(reader)
|
||||
break
|
||||
case MessageCodes.NotificationResponse:
|
||||
return this.parseNotificationMessage(offset, length, bytes)
|
||||
message = parseNotificationMessage(reader)
|
||||
break
|
||||
case MessageCodes.AuthenticationResponse:
|
||||
return this.parseAuthenticationResponse(offset, length, bytes)
|
||||
message = parseAuthenticationResponse(reader, length)
|
||||
break
|
||||
case MessageCodes.ParameterStatus:
|
||||
return this.parseParameterStatusMessage(offset, length, bytes)
|
||||
message = parseParameterStatusMessage(reader)
|
||||
break
|
||||
case MessageCodes.BackendKeyData:
|
||||
return this.parseBackendKeyData(offset, length, bytes)
|
||||
message = parseBackendKeyData(reader)
|
||||
break
|
||||
case MessageCodes.ErrorMessage:
|
||||
return this.parseErrorMessage(offset, length, bytes, 'error')
|
||||
message = parseErrorMessage(reader, 'error')
|
||||
break
|
||||
case MessageCodes.NoticeMessage:
|
||||
return this.parseErrorMessage(offset, length, bytes, 'notice')
|
||||
message = parseErrorMessage(reader, 'notice')
|
||||
break
|
||||
case MessageCodes.RowDescriptionMessage:
|
||||
return this.parseRowDescriptionMessage(offset, length, bytes)
|
||||
message = parseRowDescriptionMessage(reader)
|
||||
break
|
||||
case MessageCodes.ParameterDescriptionMessage:
|
||||
return this.parseParameterDescriptionMessage(offset, length, bytes)
|
||||
message = parseParameterDescriptionMessage(reader)
|
||||
break
|
||||
case MessageCodes.CopyIn:
|
||||
return this.parseCopyInMessage(offset, length, bytes)
|
||||
message = parseCopyInMessage(reader)
|
||||
break
|
||||
case MessageCodes.CopyOut:
|
||||
return this.parseCopyOutMessage(offset, length, bytes)
|
||||
message = parseCopyOutMessage(reader)
|
||||
break
|
||||
case MessageCodes.CopyData:
|
||||
return this.parseCopyData(offset, length, bytes)
|
||||
message = parseCopyData(reader, length)
|
||||
break
|
||||
default:
|
||||
return new DatabaseError('received invalid response: ' + code.toString(16), length, 'error')
|
||||
}
|
||||
|
||||
reader.setBuffer(0, emptyBuffer)
|
||||
|
||||
message.length = length
|
||||
return message
|
||||
}
|
||||
}
|
||||
|
||||
private parseReadyForQueryMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const status = this.reader.string(1)
|
||||
return new ReadyForQueryMessage(length, status)
|
||||
const parseReadyForQueryMessage = (reader: BufferReader) => {
|
||||
const status = reader.string(1)
|
||||
return new ReadyForQueryMessage(LATEINIT_LENGTH, status)
|
||||
}
|
||||
|
||||
private parseCommandCompleteMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const text = this.reader.cstring()
|
||||
return new CommandCompleteMessage(length, text)
|
||||
const parseCommandCompleteMessage = (reader: BufferReader) => {
|
||||
const text = reader.cstring()
|
||||
return new CommandCompleteMessage(LATEINIT_LENGTH, text)
|
||||
}
|
||||
|
||||
private parseCopyData(offset: number, length: number, bytes: Buffer) {
|
||||
const chunk = bytes.slice(offset, offset + (length - 4))
|
||||
return new CopyDataMessage(length, chunk)
|
||||
const parseCopyData = (reader: BufferReader, length: number) => {
|
||||
const chunk = reader.bytes(length - 4)
|
||||
return new CopyDataMessage(LATEINIT_LENGTH, chunk)
|
||||
}
|
||||
|
||||
private parseCopyInMessage(offset: number, length: number, bytes: Buffer) {
|
||||
return this.parseCopyMessage(offset, length, bytes, 'copyInResponse')
|
||||
}
|
||||
const parseCopyInMessage = (reader: BufferReader) => parseCopyMessage(reader, 'copyInResponse')
|
||||
|
||||
private parseCopyOutMessage(offset: number, length: number, bytes: Buffer) {
|
||||
return this.parseCopyMessage(offset, length, bytes, 'copyOutResponse')
|
||||
}
|
||||
const parseCopyOutMessage = (reader: BufferReader) => parseCopyMessage(reader, 'copyOutResponse')
|
||||
|
||||
private parseCopyMessage(offset: number, length: number, bytes: Buffer, messageName: MessageName) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const isBinary = this.reader.byte() !== 0
|
||||
const columnCount = this.reader.int16()
|
||||
const message = new CopyResponse(length, messageName, isBinary, columnCount)
|
||||
const parseCopyMessage = (reader: BufferReader, messageName: MessageName) => {
|
||||
const isBinary = reader.byte() !== 0
|
||||
const columnCount = reader.int16()
|
||||
const message = new CopyResponse(LATEINIT_LENGTH, messageName, isBinary, columnCount)
|
||||
for (let i = 0; i < columnCount; i++) {
|
||||
message.columnTypes[i] = this.reader.int16()
|
||||
message.columnTypes[i] = reader.int16()
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
private parseNotificationMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const processId = this.reader.int32()
|
||||
const channel = this.reader.cstring()
|
||||
const payload = this.reader.cstring()
|
||||
return new NotificationResponseMessage(length, processId, channel, payload)
|
||||
const parseNotificationMessage = (reader: BufferReader) => {
|
||||
const processId = reader.int32()
|
||||
const channel = reader.cstring()
|
||||
const payload = reader.cstring()
|
||||
return new NotificationResponseMessage(LATEINIT_LENGTH, processId, channel, payload)
|
||||
}
|
||||
|
||||
private parseRowDescriptionMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const fieldCount = this.reader.int16()
|
||||
const message = new RowDescriptionMessage(length, fieldCount)
|
||||
const parseRowDescriptionMessage = (reader: BufferReader) => {
|
||||
const fieldCount = reader.int16()
|
||||
const message = new RowDescriptionMessage(LATEINIT_LENGTH, fieldCount)
|
||||
for (let i = 0; i < fieldCount; i++) {
|
||||
message.fields[i] = this.parseField()
|
||||
message.fields[i] = parseField(reader)
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
private parseField(): Field {
|
||||
const name = this.reader.cstring()
|
||||
const tableID = this.reader.uint32()
|
||||
const columnID = this.reader.int16()
|
||||
const dataTypeID = this.reader.uint32()
|
||||
const dataTypeSize = this.reader.int16()
|
||||
const dataTypeModifier = this.reader.int32()
|
||||
const mode = this.reader.int16() === 0 ? 'text' : 'binary'
|
||||
const parseField = (reader: BufferReader) => {
|
||||
const name = reader.cstring()
|
||||
const tableID = reader.uint32()
|
||||
const columnID = reader.int16()
|
||||
const dataTypeID = reader.uint32()
|
||||
const dataTypeSize = reader.int16()
|
||||
const dataTypeModifier = reader.int32()
|
||||
const mode = reader.int16() === 0 ? 'text' : 'binary'
|
||||
return new Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode)
|
||||
}
|
||||
|
||||
private parseParameterDescriptionMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const parameterCount = this.reader.int16()
|
||||
const message = new ParameterDescriptionMessage(length, parameterCount)
|
||||
const parseParameterDescriptionMessage = (reader: BufferReader) => {
|
||||
const parameterCount = reader.int16()
|
||||
const message = new ParameterDescriptionMessage(LATEINIT_LENGTH, parameterCount)
|
||||
for (let i = 0; i < parameterCount; i++) {
|
||||
message.dataTypeIDs[i] = this.reader.int32()
|
||||
message.dataTypeIDs[i] = reader.int32()
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
private parseDataRowMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const fieldCount = this.reader.int16()
|
||||
const parseDataRowMessage = (reader: BufferReader) => {
|
||||
const fieldCount = reader.int16()
|
||||
const fields: any[] = new Array(fieldCount)
|
||||
for (let i = 0; i < fieldCount; i++) {
|
||||
const len = this.reader.int32()
|
||||
const len = reader.int32()
|
||||
// a -1 for length means the value of the field is null
|
||||
fields[i] = len === -1 ? null : this.reader.string(len)
|
||||
fields[i] = len === -1 ? null : reader.string(len)
|
||||
}
|
||||
return new DataRowMessage(length, fields)
|
||||
return new DataRowMessage(LATEINIT_LENGTH, fields)
|
||||
}
|
||||
|
||||
private parseParameterStatusMessage(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const name = this.reader.cstring()
|
||||
const value = this.reader.cstring()
|
||||
return new ParameterStatusMessage(length, name, value)
|
||||
const parseParameterStatusMessage = (reader: BufferReader) => {
|
||||
const name = reader.cstring()
|
||||
const value = reader.cstring()
|
||||
return new ParameterStatusMessage(LATEINIT_LENGTH, name, value)
|
||||
}
|
||||
|
||||
private parseBackendKeyData(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const processID = this.reader.int32()
|
||||
const secretKey = this.reader.int32()
|
||||
return new BackendKeyDataMessage(length, processID, secretKey)
|
||||
const parseBackendKeyData = (reader: BufferReader) => {
|
||||
const processID = reader.int32()
|
||||
const secretKey = reader.int32()
|
||||
return new BackendKeyDataMessage(LATEINIT_LENGTH, processID, secretKey)
|
||||
}
|
||||
|
||||
public parseAuthenticationResponse(offset: number, length: number, bytes: Buffer) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const code = this.reader.int32()
|
||||
const parseAuthenticationResponse = (reader: BufferReader, length: number) => {
|
||||
const code = reader.int32()
|
||||
// TODO(bmc): maybe better types here
|
||||
const message: BackendMessage & any = {
|
||||
name: 'authenticationOk',
|
||||
@ -323,8 +347,8 @@ export class Parser {
|
||||
case 5: // AuthenticationMD5Password
|
||||
if (message.length === 12) {
|
||||
message.name = 'authenticationMD5Password'
|
||||
const salt = this.reader.bytes(4)
|
||||
return new AuthenticationMD5Password(length, salt)
|
||||
const salt = reader.bytes(4)
|
||||
return new AuthenticationMD5Password(LATEINIT_LENGTH, salt)
|
||||
}
|
||||
break
|
||||
case 10: // AuthenticationSASL
|
||||
@ -333,7 +357,7 @@ export class Parser {
|
||||
message.mechanisms = []
|
||||
let mechanism: string
|
||||
do {
|
||||
mechanism = this.reader.cstring()
|
||||
mechanism = reader.cstring()
|
||||
if (mechanism) {
|
||||
message.mechanisms.push(mechanism)
|
||||
}
|
||||
@ -342,11 +366,11 @@ export class Parser {
|
||||
break
|
||||
case 11: // AuthenticationSASLContinue
|
||||
message.name = 'authenticationSASLContinue'
|
||||
message.data = this.reader.string(length - 8)
|
||||
message.data = reader.string(length - 8)
|
||||
break
|
||||
case 12: // AuthenticationSASLFinal
|
||||
message.name = 'authenticationSASLFinal'
|
||||
message.data = this.reader.string(length - 8)
|
||||
message.data = reader.string(length - 8)
|
||||
break
|
||||
default:
|
||||
throw new Error('Unknown authenticationOk message type ' + code)
|
||||
@ -354,19 +378,20 @@ export class Parser {
|
||||
return message
|
||||
}
|
||||
|
||||
private parseErrorMessage(offset: number, length: number, bytes: Buffer, name: MessageName) {
|
||||
this.reader.setBuffer(offset, bytes)
|
||||
const parseErrorMessage = (reader: BufferReader, name: MessageName) => {
|
||||
const fields: Record<string, string> = {}
|
||||
let fieldType = this.reader.string(1)
|
||||
let fieldType = reader.string(1)
|
||||
while (fieldType !== '\0') {
|
||||
fields[fieldType] = this.reader.cstring()
|
||||
fieldType = this.reader.string(1)
|
||||
fields[fieldType] = reader.cstring()
|
||||
fieldType = reader.string(1)
|
||||
}
|
||||
|
||||
const messageValue = fields.M
|
||||
|
||||
const message =
|
||||
name === 'notice' ? new NoticeMessage(length, messageValue) : new DatabaseError(messageValue, length, name)
|
||||
name === 'notice'
|
||||
? new NoticeMessage(LATEINIT_LENGTH, messageValue)
|
||||
: new DatabaseError(messageValue, LATEINIT_LENGTH, name)
|
||||
|
||||
message.severity = fields.S
|
||||
message.code = fields.C
|
||||
@ -386,4 +411,3 @@ export class Parser {
|
||||
message.routine = fields.R
|
||||
return message
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,6 +157,8 @@ const bind = (config: BindOpts = {}): Buffer => {
|
||||
writer.addInt16(len)
|
||||
writer.add(paramWriter.flush())
|
||||
|
||||
// all results use the same format code
|
||||
writer.addInt16(1)
|
||||
// format code
|
||||
writer.addInt16(binary ? ParamType.BINARY : ParamType.STRING)
|
||||
return writer.flush(code.bind)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg-query-stream",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"description": "Postgres query result returned as readable stream",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@ -45,7 +45,7 @@
|
||||
"concat-stream": "~1.0.1",
|
||||
"eslint-plugin-promise": "^7.2.1",
|
||||
"mocha": "^10.5.2",
|
||||
"pg": "^8.16.1",
|
||||
"pg": "^8.17.1",
|
||||
"stream-spec": "~0.3.5",
|
||||
"ts-node": "^8.5.4",
|
||||
"typescript": "^4.0.3"
|
||||
@ -54,6 +54,6 @@
|
||||
"pg": "^8"
|
||||
},
|
||||
"dependencies": {
|
||||
"pg-cursor": "^2.15.1"
|
||||
"pg-cursor": "^2.16.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
const utils = require('./utils')
|
||||
const nodeUtils = require('util')
|
||||
const sasl = require('./crypto/sasl')
|
||||
const TypeOverrides = require('./type-overrides')
|
||||
|
||||
@ -11,6 +12,27 @@ const defaults = require('./defaults')
|
||||
const Connection = require('./connection')
|
||||
const crypto = require('./crypto/utils')
|
||||
|
||||
const activeQueryDeprecationNotice = nodeUtils.deprecate(
|
||||
() => {},
|
||||
'Client.activeQuery is deprecated and will be removed in a future version.'
|
||||
)
|
||||
|
||||
const queryQueueDeprecationNotice = nodeUtils.deprecate(
|
||||
() => {},
|
||||
'Client.queryQueue is deprecated and will be removed in a future version.'
|
||||
)
|
||||
|
||||
const pgPassDeprecationNotice = nodeUtils.deprecate(
|
||||
() => {},
|
||||
'pgpass support is deprecated and will be removed in a future version. ' +
|
||||
'You can provide an async function as the password property to the Client/Pool constructor that returns a password instead. Within this funciton you can call the pgpass module in your own code.'
|
||||
)
|
||||
|
||||
const byoPromiseDeprecationNotice = nodeUtils.deprecate(
|
||||
() => {},
|
||||
'Passing a custom Promise implementation to the Client/Pool constructor is deprecated and will be removed in a future version.'
|
||||
)
|
||||
|
||||
class Client extends EventEmitter {
|
||||
constructor(config) {
|
||||
super()
|
||||
@ -34,6 +56,9 @@ class Client extends EventEmitter {
|
||||
|
||||
const c = config || {}
|
||||
|
||||
if (c.Promise) {
|
||||
byoPromiseDeprecationNotice()
|
||||
}
|
||||
this._Promise = c.Promise || global.Promise
|
||||
this._types = new TypeOverrides(c.types)
|
||||
this._ending = false
|
||||
@ -42,6 +67,7 @@ class Client extends EventEmitter {
|
||||
this._connected = false
|
||||
this._connectionError = false
|
||||
this._queryable = true
|
||||
this._activeQuery = null
|
||||
|
||||
this.enableChannelBinding = Boolean(c.enableChannelBinding) // set true to use SCRAM-SHA-256-PLUS when offered
|
||||
this.connection =
|
||||
@ -53,7 +79,7 @@ class Client extends EventEmitter {
|
||||
keepAliveInitialDelayMillis: c.keepAliveInitialDelayMillis || 0,
|
||||
encoding: this.connectionParameters.client_encoding || 'utf8',
|
||||
})
|
||||
this.queryQueue = []
|
||||
this._queryQueue = []
|
||||
this.binary = c.binary || defaults.binary
|
||||
this.processID = null
|
||||
this.secretKey = null
|
||||
@ -70,6 +96,20 @@ class Client extends EventEmitter {
|
||||
this._connectionTimeoutMillis = c.connectionTimeoutMillis || 0
|
||||
}
|
||||
|
||||
get activeQuery() {
|
||||
activeQueryDeprecationNotice()
|
||||
return this._activeQuery
|
||||
}
|
||||
|
||||
set activeQuery(val) {
|
||||
activeQueryDeprecationNotice()
|
||||
this._activeQuery = val
|
||||
}
|
||||
|
||||
_getActiveQuery() {
|
||||
return this._activeQuery
|
||||
}
|
||||
|
||||
_errorAllQueries(err) {
|
||||
const enqueueError = (query) => {
|
||||
process.nextTick(() => {
|
||||
@ -77,13 +117,14 @@ class Client extends EventEmitter {
|
||||
})
|
||||
}
|
||||
|
||||
if (this.activeQuery) {
|
||||
enqueueError(this.activeQuery)
|
||||
this.activeQuery = null
|
||||
const activeQuery = this._getActiveQuery()
|
||||
if (activeQuery) {
|
||||
enqueueError(activeQuery)
|
||||
this._activeQuery = null
|
||||
}
|
||||
|
||||
this.queryQueue.forEach(enqueueError)
|
||||
this.queryQueue.length = 0
|
||||
this._queryQueue.forEach(enqueueError)
|
||||
this._queryQueue.length = 0
|
||||
}
|
||||
|
||||
_connect(callback) {
|
||||
@ -203,9 +244,7 @@ class Client extends EventEmitter {
|
||||
con.on('notification', this._handleNotification.bind(this))
|
||||
}
|
||||
|
||||
// TODO(bmc): deprecate pgpass "built in" integration since this.password can be a function
|
||||
// it can be supplied by the user if required - this is a breaking change!
|
||||
_checkPgPass(cb) {
|
||||
_getPassword(cb) {
|
||||
const con = this.connection
|
||||
if (typeof this.password === 'function') {
|
||||
this._Promise
|
||||
@ -233,6 +272,7 @@ class Client extends EventEmitter {
|
||||
const pgPass = require('pgpass')
|
||||
pgPass(this.connectionParameters, (pass) => {
|
||||
if (undefined !== pass) {
|
||||
pgPassDeprecationNotice()
|
||||
this.connectionParameters.password = this.password = pass
|
||||
}
|
||||
cb()
|
||||
@ -244,13 +284,13 @@ class Client extends EventEmitter {
|
||||
}
|
||||
|
||||
_handleAuthCleartextPassword(msg) {
|
||||
this._checkPgPass(() => {
|
||||
this._getPassword(() => {
|
||||
this.connection.password(this.password)
|
||||
})
|
||||
}
|
||||
|
||||
_handleAuthMD5Password(msg) {
|
||||
this._checkPgPass(async () => {
|
||||
this._getPassword(async () => {
|
||||
try {
|
||||
const hashedPassword = await crypto.postgresMd5PasswordHash(this.user, this.password, msg.salt)
|
||||
this.connection.password(hashedPassword)
|
||||
@ -261,7 +301,7 @@ class Client extends EventEmitter {
|
||||
}
|
||||
|
||||
_handleAuthSASL(msg) {
|
||||
this._checkPgPass(() => {
|
||||
this._getPassword(() => {
|
||||
try {
|
||||
this.saslSession = sasl.startSession(msg.mechanisms, this.enableChannelBinding && this.connection.stream)
|
||||
this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response)
|
||||
@ -314,8 +354,8 @@ class Client extends EventEmitter {
|
||||
}
|
||||
this.emit('connect')
|
||||
}
|
||||
const { activeQuery } = this
|
||||
this.activeQuery = null
|
||||
const activeQuery = this._getActiveQuery()
|
||||
this._activeQuery = null
|
||||
this.readyForQuery = true
|
||||
if (activeQuery) {
|
||||
activeQuery.handleReadyForQuery(this.connection)
|
||||
@ -323,7 +363,7 @@ class Client extends EventEmitter {
|
||||
this._pulseQueryQueue()
|
||||
}
|
||||
|
||||
// if we receieve an error event or error message
|
||||
// if we receive an error event or error message
|
||||
// during the connection process we handle it here
|
||||
_handleErrorWhileConnecting(err) {
|
||||
if (this._connectionError) {
|
||||
@ -355,49 +395,51 @@ class Client extends EventEmitter {
|
||||
if (this._connecting) {
|
||||
return this._handleErrorWhileConnecting(msg)
|
||||
}
|
||||
const activeQuery = this.activeQuery
|
||||
const activeQuery = this._getActiveQuery()
|
||||
|
||||
if (!activeQuery) {
|
||||
this._handleErrorEvent(msg)
|
||||
return
|
||||
}
|
||||
|
||||
this.activeQuery = null
|
||||
this._activeQuery = null
|
||||
activeQuery.handleError(msg, this.connection)
|
||||
}
|
||||
|
||||
_handleRowDescription(msg) {
|
||||
// delegate rowDescription to active query
|
||||
this.activeQuery.handleRowDescription(msg)
|
||||
this._getActiveQuery().handleRowDescription(msg)
|
||||
}
|
||||
|
||||
_handleDataRow(msg) {
|
||||
// delegate dataRow to active query
|
||||
this.activeQuery.handleDataRow(msg)
|
||||
this._getActiveQuery().handleDataRow(msg)
|
||||
}
|
||||
|
||||
_handlePortalSuspended(msg) {
|
||||
// delegate portalSuspended to active query
|
||||
this.activeQuery.handlePortalSuspended(this.connection)
|
||||
this._getActiveQuery().handlePortalSuspended(this.connection)
|
||||
}
|
||||
|
||||
_handleEmptyQuery(msg) {
|
||||
// delegate emptyQuery to active query
|
||||
this.activeQuery.handleEmptyQuery(this.connection)
|
||||
this._getActiveQuery().handleEmptyQuery(this.connection)
|
||||
}
|
||||
|
||||
_handleCommandComplete(msg) {
|
||||
if (this.activeQuery == null) {
|
||||
const activeQuery = this._getActiveQuery()
|
||||
if (activeQuery == null) {
|
||||
const error = new Error('Received unexpected commandComplete message from backend.')
|
||||
this._handleErrorEvent(error)
|
||||
return
|
||||
}
|
||||
// delegate commandComplete to active query
|
||||
this.activeQuery.handleCommandComplete(msg, this.connection)
|
||||
activeQuery.handleCommandComplete(msg, this.connection)
|
||||
}
|
||||
|
||||
_handleParseComplete() {
|
||||
if (this.activeQuery == null) {
|
||||
const activeQuery = this._getActiveQuery()
|
||||
if (activeQuery == null) {
|
||||
const error = new Error('Received unexpected parseComplete message from backend.')
|
||||
this._handleErrorEvent(error)
|
||||
return
|
||||
@ -405,17 +447,17 @@ class Client extends EventEmitter {
|
||||
// if a prepared statement has a name and properly parses
|
||||
// we track that its already been executed so we don't parse
|
||||
// it again on the same client
|
||||
if (this.activeQuery.name) {
|
||||
this.connection.parsedStatements[this.activeQuery.name] = this.activeQuery.text
|
||||
if (activeQuery.name) {
|
||||
this.connection.parsedStatements[activeQuery.name] = activeQuery.text
|
||||
}
|
||||
}
|
||||
|
||||
_handleCopyInResponse(msg) {
|
||||
this.activeQuery.handleCopyInResponse(this.connection)
|
||||
this._getActiveQuery().handleCopyInResponse(this.connection)
|
||||
}
|
||||
|
||||
_handleCopyData(msg) {
|
||||
this.activeQuery.handleCopyData(msg, this.connection)
|
||||
this._getActiveQuery().handleCopyData(msg, this.connection)
|
||||
}
|
||||
|
||||
_handleNotification(msg) {
|
||||
@ -471,8 +513,8 @@ class Client extends EventEmitter {
|
||||
con.on('connect', function () {
|
||||
con.cancel(client.processID, client.secretKey)
|
||||
})
|
||||
} else if (client.queryQueue.indexOf(query) !== -1) {
|
||||
client.queryQueue.splice(client.queryQueue.indexOf(query), 1)
|
||||
} else if (client._queryQueue.indexOf(query) !== -1) {
|
||||
client._queryQueue.splice(client._queryQueue.indexOf(query), 1)
|
||||
}
|
||||
}
|
||||
|
||||
@ -497,21 +539,22 @@ class Client extends EventEmitter {
|
||||
|
||||
_pulseQueryQueue() {
|
||||
if (this.readyForQuery === true) {
|
||||
this.activeQuery = this.queryQueue.shift()
|
||||
if (this.activeQuery) {
|
||||
this._activeQuery = this._queryQueue.shift()
|
||||
const activeQuery = this._getActiveQuery()
|
||||
if (activeQuery) {
|
||||
this.readyForQuery = false
|
||||
this.hasExecuted = true
|
||||
|
||||
const queryError = this.activeQuery.submit(this.connection)
|
||||
const queryError = activeQuery.submit(this.connection)
|
||||
if (queryError) {
|
||||
process.nextTick(() => {
|
||||
this.activeQuery.handleError(queryError, this.connection)
|
||||
activeQuery.handleError(queryError, this.connection)
|
||||
this.readyForQuery = true
|
||||
this._pulseQueryQueue()
|
||||
})
|
||||
}
|
||||
} else if (this.hasExecuted) {
|
||||
this.activeQuery = null
|
||||
this._activeQuery = null
|
||||
this.emit('drain')
|
||||
}
|
||||
}
|
||||
@ -565,9 +608,9 @@ class Client extends EventEmitter {
|
||||
query.callback = () => {}
|
||||
|
||||
// Remove from queue
|
||||
const index = this.queryQueue.indexOf(query)
|
||||
const index = this._queryQueue.indexOf(query)
|
||||
if (index > -1) {
|
||||
this.queryQueue.splice(index, 1)
|
||||
this._queryQueue.splice(index, 1)
|
||||
}
|
||||
|
||||
this._pulseQueryQueue()
|
||||
@ -601,7 +644,7 @@ class Client extends EventEmitter {
|
||||
return result
|
||||
}
|
||||
|
||||
this.queryQueue.push(query)
|
||||
this._queryQueue.push(query)
|
||||
this._pulseQueryQueue()
|
||||
return result
|
||||
}
|
||||
@ -626,7 +669,7 @@ class Client extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.activeQuery || !this._queryable) {
|
||||
if (this._getActiveQuery() || !this._queryable) {
|
||||
// if we have an active query we need to force a disconnect
|
||||
// on the socket - otherwise a hung query could block end forever
|
||||
this.connection.stream.destroy()
|
||||
@ -642,6 +685,10 @@ class Client extends EventEmitter {
|
||||
})
|
||||
}
|
||||
}
|
||||
get queryQueue() {
|
||||
queryQueueDeprecationNotice()
|
||||
return this._queryQueue
|
||||
}
|
||||
}
|
||||
|
||||
// expose a Query constructor
|
||||
|
||||
@ -7,6 +7,10 @@ const defaults = require('./defaults')
|
||||
const parse = require('pg-connection-string').parse // parses a connection string
|
||||
|
||||
const val = function (key, config, envVar) {
|
||||
if (config[key]) {
|
||||
return config[key]
|
||||
}
|
||||
|
||||
if (envVar === undefined) {
|
||||
envVar = process.env['PG' + key.toUpperCase()]
|
||||
} else if (envVar === false) {
|
||||
@ -15,7 +19,7 @@ const val = function (key, config, envVar) {
|
||||
envVar = process.env[envVar]
|
||||
}
|
||||
|
||||
return config[key] || envVar || defaults[key]
|
||||
return envVar || defaults[key]
|
||||
}
|
||||
|
||||
const readSSLConfigFromEnvironment = function () {
|
||||
|
||||
@ -1,11 +1,18 @@
|
||||
'use strict'
|
||||
|
||||
let user
|
||||
try {
|
||||
user = process.platform === 'win32' ? process.env.USERNAME : process.env.USER
|
||||
} catch {
|
||||
// ignore, e.g., Deno without --allow-env
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
// database host. defaults to localhost
|
||||
host: 'localhost',
|
||||
|
||||
// database user's name
|
||||
user: process.platform === 'win32' ? process.env.USERNAME : process.env.USER,
|
||||
user,
|
||||
|
||||
// name of database to connect
|
||||
database: undefined,
|
||||
|
||||
@ -34,10 +34,20 @@ const PG = function (clientConstructor) {
|
||||
this.utils = utils
|
||||
}
|
||||
|
||||
if (typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined') {
|
||||
module.exports = new PG(require('./native'))
|
||||
} else {
|
||||
module.exports = new PG(Client)
|
||||
let clientConstructor = Client
|
||||
|
||||
let forceNative = false
|
||||
try {
|
||||
forceNative = !!process.env.NODE_PG_FORCE_NATIVE
|
||||
} catch {
|
||||
// ignore, e.g., Deno without --allow-env
|
||||
}
|
||||
|
||||
if (forceNative) {
|
||||
clientConstructor = require('./native')
|
||||
}
|
||||
|
||||
module.exports = new PG(clientConstructor)
|
||||
|
||||
// lazy require native module...the native module may not have installed
|
||||
Object.defineProperty(module.exports, 'native', {
|
||||
@ -61,4 +71,3 @@ if (typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined') {
|
||||
return native
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ const NativeQuery = (module.exports = function (config, values, callback) {
|
||||
// then emit them as they come in
|
||||
// without setting singleRowMode to true
|
||||
// this has almost no meaning because libpq
|
||||
// reads all rows into memory befor returning any
|
||||
// reads all rows into memory before returning any
|
||||
this._emitRowEvents = false
|
||||
this.on(
|
||||
'newListener',
|
||||
|
||||
@ -112,7 +112,7 @@ class Query extends EventEmitter {
|
||||
// if a named prepared statement is created with empty query text
|
||||
// the backend will send an emptyQuery message but *not* a command complete message
|
||||
// since we pipeline sync immediately after execute we don't need to do anything here
|
||||
// unless we have rows specified, in which case we did not pipeline the intial sync call
|
||||
// unless we have rows specified, in which case we did not pipeline the initial sync call
|
||||
handleEmptyQuery(connection) {
|
||||
if (this.rows) {
|
||||
connection.sync()
|
||||
|
||||
@ -66,7 +66,8 @@ class Result {
|
||||
const rawValue = rowData[i]
|
||||
const field = this.fields[i].name
|
||||
if (rawValue !== null) {
|
||||
row[field] = this._parsers[i](rawValue)
|
||||
const v = this.fields[i].format === 'binary' ? Buffer.from(rawValue) : rawValue
|
||||
row[field] = this._parsers[i](v)
|
||||
} else {
|
||||
row[field] = null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pg",
|
||||
"version": "8.16.1",
|
||||
"version": "8.17.1",
|
||||
"description": "PostgreSQL client - pure javascript & libpq with the same API",
|
||||
"keywords": [
|
||||
"database",
|
||||
@ -28,16 +28,13 @@
|
||||
"./package.json": {
|
||||
"default": "./package.json"
|
||||
},
|
||||
"./lib/*": {
|
||||
"import": "./lib/*",
|
||||
"require": "./lib/*",
|
||||
"default": "./lib/*"
|
||||
}
|
||||
"./lib/*": "./lib/*.js",
|
||||
"./lib/*.js": "./lib/*.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"pg-connection-string": "^2.9.1",
|
||||
"pg-pool": "^3.10.1",
|
||||
"pg-protocol": "^1.10.1",
|
||||
"pg-connection-string": "^2.10.0",
|
||||
"pg-pool": "^3.11.0",
|
||||
"pg-protocol": "^1.11.0",
|
||||
"pg-types": "2.2.0",
|
||||
"pgpass": "1.0.5"
|
||||
},
|
||||
@ -53,7 +50,7 @@
|
||||
"wrangler": "^3.x"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"pg-cloudflare": "^1.2.6"
|
||||
"pg-cloudflare": "^1.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"pg-native": ">=3.0.1"
|
||||
|
||||
@ -19,15 +19,8 @@ test('simple query interface', function () {
|
||||
rows.push(row['name'])
|
||||
})
|
||||
query.once('row', function (row) {
|
||||
test('Can iterate through columns', function () {
|
||||
const columnCount = Object.keys(row).length
|
||||
if ('length' in row) {
|
||||
assert.lengthIs(
|
||||
row,
|
||||
columnCount,
|
||||
'Iterating through the columns gives a different length from calling .length.'
|
||||
)
|
||||
}
|
||||
test('returned right columns', function () {
|
||||
assert.deepStrictEqual(row, { name: row.name })
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
25
packages/pg/test/integration/gh-issues/3487-tests.js
Normal file
25
packages/pg/test/integration/gh-issues/3487-tests.js
Normal file
@ -0,0 +1,25 @@
|
||||
const helper = require('../test-helper')
|
||||
const assert = require('assert')
|
||||
|
||||
const suite = new helper.Suite()
|
||||
|
||||
suite.testAsync('allows you to switch between format modes for arrays', async () => {
|
||||
const client = new helper.pg.Client()
|
||||
await client.connect()
|
||||
|
||||
const r1 = await client.query({
|
||||
text: 'SELECT CAST($1 AS INT[]) as a',
|
||||
values: [[1, 2, 8]],
|
||||
binary: false,
|
||||
})
|
||||
assert.deepEqual([1, 2, 8], r1.rows[0].a)
|
||||
|
||||
const r2 = await client.query({
|
||||
text: 'SELECT CAST($1 AS INT[]) as a',
|
||||
values: [[4, 5, 6]],
|
||||
binary: true,
|
||||
})
|
||||
assert.deepEqual([4, 5, 6], r2.rows[0].a)
|
||||
|
||||
await client.end()
|
||||
})
|
||||
@ -31,8 +31,6 @@ suite.test('emits end when not in query', function () {
|
||||
client.connection.emit('connect')
|
||||
process.nextTick(function () {
|
||||
client.connection.emit('readyForQuery')
|
||||
assert.equal(client.queryQueue.length, 0)
|
||||
assert(client.activeQuery, 'client should have issued query')
|
||||
process.nextTick(function () {
|
||||
stream.emit('close')
|
||||
})
|
||||
|
||||
294
yarn.lock
294
yarn.lock
@ -1034,6 +1034,13 @@
|
||||
wrap-ansi "^8.1.0"
|
||||
wrap-ansi-cjs "npm:wrap-ansi@^7.0.0"
|
||||
|
||||
"@isaacs/fs-minipass@^4.0.0":
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32"
|
||||
integrity sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==
|
||||
dependencies:
|
||||
minipass "^7.0.4"
|
||||
|
||||
"@istanbuljs/load-nyc-config@^1.0.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
|
||||
@ -1827,10 +1834,10 @@
|
||||
"@nodelib/fs.scandir" "2.1.5"
|
||||
fastq "^1.6.0"
|
||||
|
||||
"@npmcli/agent@^2.0.0":
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5"
|
||||
integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==
|
||||
"@npmcli/agent@^3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-3.0.0.tgz#1685b1fbd4a1b7bb4f930cbb68ce801edfe7aa44"
|
||||
integrity sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==
|
||||
dependencies:
|
||||
agent-base "^7.1.0"
|
||||
http-proxy-agent "^7.0.0"
|
||||
@ -1838,10 +1845,10 @@
|
||||
lru-cache "^10.0.1"
|
||||
socks-proxy-agent "^8.0.3"
|
||||
|
||||
"@npmcli/fs@^3.1.0":
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.1.tgz#59cdaa5adca95d135fc00f2bb53f5771575ce726"
|
||||
integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==
|
||||
"@npmcli/fs@^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-4.0.0.tgz#a1eb1aeddefd2a4a347eca0fab30bc62c0e1c0f2"
|
||||
integrity sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==
|
||||
dependencies:
|
||||
semver "^7.3.5"
|
||||
|
||||
@ -1959,10 +1966,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
|
||||
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
|
||||
|
||||
"@pkgr/core@^0.2.3":
|
||||
version "0.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c"
|
||||
integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==
|
||||
"@pkgr/core@^0.2.4":
|
||||
version "0.2.7"
|
||||
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.7.tgz#eb5014dfd0b03e7f3ba2eeeff506eed89b028058"
|
||||
integrity sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==
|
||||
|
||||
"@rollup/plugin-commonjs@^28.0.3":
|
||||
version "28.0.3"
|
||||
@ -2668,10 +2675,10 @@ abbrev@1.0.x:
|
||||
resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
|
||||
integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU=
|
||||
|
||||
abbrev@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf"
|
||||
integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==
|
||||
abbrev@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-3.0.1.tgz#8ac8b3b5024d31464fe2a5feeea9f4536bf44025"
|
||||
integrity sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==
|
||||
|
||||
acorn-jsx@^5.3.2:
|
||||
version "5.3.2"
|
||||
@ -3199,12 +3206,12 @@ cacache@^12.0.0, cacache@^12.0.3:
|
||||
unique-filename "^1.1.1"
|
||||
y18n "^4.0.0"
|
||||
|
||||
cacache@^18.0.0:
|
||||
version "18.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.3.tgz#864e2c18414e1e141ae8763f31e46c2cb96d1b21"
|
||||
integrity sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==
|
||||
cacache@^19.0.1:
|
||||
version "19.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cacache/-/cacache-19.0.1.tgz#3370cc28a758434c85c2585008bd5bdcff17d6cd"
|
||||
integrity sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==
|
||||
dependencies:
|
||||
"@npmcli/fs" "^3.1.0"
|
||||
"@npmcli/fs" "^4.0.0"
|
||||
fs-minipass "^3.0.0"
|
||||
glob "^10.2.2"
|
||||
lru-cache "^10.0.1"
|
||||
@ -3212,10 +3219,10 @@ cacache@^18.0.0:
|
||||
minipass-collect "^2.0.1"
|
||||
minipass-flush "^1.0.5"
|
||||
minipass-pipeline "^1.2.4"
|
||||
p-map "^4.0.0"
|
||||
ssri "^10.0.0"
|
||||
tar "^6.1.11"
|
||||
unique-filename "^3.0.0"
|
||||
p-map "^7.0.2"
|
||||
ssri "^12.0.0"
|
||||
tar "^7.4.3"
|
||||
unique-filename "^4.0.0"
|
||||
|
||||
cache-base@^1.0.1:
|
||||
version "1.0.1"
|
||||
@ -3411,10 +3418,10 @@ chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.4:
|
||||
resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz"
|
||||
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
|
||||
|
||||
chownr@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
|
||||
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
|
||||
chownr@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4"
|
||||
integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==
|
||||
|
||||
chrome-trace-event@^1.0.2:
|
||||
version "1.0.4"
|
||||
@ -4434,12 +4441,12 @@ eslint-plugin-node@^11.1.0:
|
||||
semver "^6.1.0"
|
||||
|
||||
eslint-plugin-prettier@^5.1.2:
|
||||
version "5.2.6"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.6.tgz#be39e3bb23bb3eeb7e7df0927cdb46e4d7945096"
|
||||
integrity sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==
|
||||
version "5.5.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.1.tgz#470820964de9aedb37e9ce62c3266d2d26d08d15"
|
||||
integrity sha512-dobTkHT6XaEVOo8IO90Q4DOSxnm3Y151QxPJlM/vKC0bVy+d6cVWQZLlFiuZPP0wS6vZwSKeJgKkcS+KfMBlRw==
|
||||
dependencies:
|
||||
prettier-linter-helpers "^1.0.0"
|
||||
synckit "^0.11.0"
|
||||
synckit "^0.11.7"
|
||||
|
||||
eslint-plugin-promise@^7.2.1:
|
||||
version "7.2.1"
|
||||
@ -4965,13 +4972,6 @@ fs-minipass@^1.2.7:
|
||||
dependencies:
|
||||
minipass "^2.6.0"
|
||||
|
||||
fs-minipass@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
|
||||
integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
|
||||
fs-minipass@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54"
|
||||
@ -5205,7 +5205,7 @@ glob@8.1.0:
|
||||
minimatch "^5.0.1"
|
||||
once "^1.3.0"
|
||||
|
||||
glob@^10.2.2, glob@^10.3.10:
|
||||
glob@^10.2.2:
|
||||
version "10.4.1"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2"
|
||||
integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==
|
||||
@ -5227,19 +5227,7 @@ glob@^5.0.15:
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@^7.1.1, glob@^7.1.3, glob@^7.1.4:
|
||||
version "7.1.6"
|
||||
resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz"
|
||||
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.4"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@^7.1.6:
|
||||
glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
@ -5794,11 +5782,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
|
||||
dependencies:
|
||||
is-extglob "^2.1.1"
|
||||
|
||||
is-lambda@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5"
|
||||
integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==
|
||||
|
||||
is-module@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
|
||||
@ -6479,23 +6462,22 @@ make-error@^1.1.1:
|
||||
resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
|
||||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
||||
|
||||
make-fetch-happen@^13.0.0:
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36"
|
||||
integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==
|
||||
make-fetch-happen@^14.0.3:
|
||||
version "14.0.3"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz#d74c3ecb0028f08ab604011e0bc6baed483fcdcd"
|
||||
integrity sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==
|
||||
dependencies:
|
||||
"@npmcli/agent" "^2.0.0"
|
||||
cacache "^18.0.0"
|
||||
"@npmcli/agent" "^3.0.0"
|
||||
cacache "^19.0.1"
|
||||
http-cache-semantics "^4.1.1"
|
||||
is-lambda "^1.0.1"
|
||||
minipass "^7.0.2"
|
||||
minipass-fetch "^3.0.0"
|
||||
minipass-fetch "^4.0.0"
|
||||
minipass-flush "^1.0.5"
|
||||
minipass-pipeline "^1.2.4"
|
||||
negotiator "^0.6.3"
|
||||
proc-log "^4.2.0"
|
||||
negotiator "^1.0.0"
|
||||
proc-log "^5.0.0"
|
||||
promise-retry "^2.0.1"
|
||||
ssri "^10.0.0"
|
||||
ssri "^12.0.0"
|
||||
|
||||
make-fetch-happen@^5.0.0:
|
||||
version "5.0.2"
|
||||
@ -6763,14 +6745,14 @@ minipass-collect@^2.0.1:
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
|
||||
minipass-fetch@^3.0.0:
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.5.tgz#f0f97e40580affc4a35cc4a1349f05ae36cb1e4c"
|
||||
integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==
|
||||
minipass-fetch@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-4.0.1.tgz#f2d717d5a418ad0b1a7274f9b913515d3e78f9e5"
|
||||
integrity sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
minipass-sized "^1.0.3"
|
||||
minizlib "^2.1.2"
|
||||
minizlib "^3.0.1"
|
||||
optionalDependencies:
|
||||
encoding "^0.1.13"
|
||||
|
||||
@ -6810,12 +6792,7 @@ minipass@^3.0.0:
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
minipass@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
|
||||
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
|
||||
|
||||
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2:
|
||||
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.0.4, minipass@^7.1.2:
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
|
||||
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
|
||||
@ -6827,13 +6804,12 @@ minizlib@^1.3.3:
|
||||
dependencies:
|
||||
minipass "^2.9.0"
|
||||
|
||||
minizlib@^2.1.1, minizlib@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
|
||||
integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
|
||||
minizlib@^3.0.1:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.2.tgz#f33d638eb279f664439aa38dc5f91607468cb574"
|
||||
integrity sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
yallist "^4.0.0"
|
||||
minipass "^7.1.2"
|
||||
|
||||
mississippi@^3.0.0:
|
||||
version "3.0.0"
|
||||
@ -6866,10 +6842,10 @@ mkdirp-promise@^5.0.1:
|
||||
dependencies:
|
||||
mkdirp "*"
|
||||
|
||||
mkdirp@*, mkdirp@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
mkdirp@*, mkdirp@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50"
|
||||
integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==
|
||||
|
||||
mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.5:
|
||||
version "0.5.5"
|
||||
@ -7002,10 +6978,10 @@ natural-compare@^1.4.0:
|
||||
resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
|
||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||
|
||||
negotiator@^0.6.3:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
||||
negotiator@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-1.0.0.tgz#b6c91bb47172d69f93cfd7c357bbb529019b5f6a"
|
||||
integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==
|
||||
|
||||
neo-async@^2.6.0, neo-async@^2.6.2:
|
||||
version "2.6.2"
|
||||
@ -7034,20 +7010,20 @@ node-fetch@^2.5.0, node-fetch@^2.6.1:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-gyp@>=10.x:
|
||||
version "10.2.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.2.0.tgz#80101c4aa4f7ab225f13fcc8daaaac4eb1a8dd86"
|
||||
integrity sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==
|
||||
version "11.3.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-11.3.0.tgz#e543e3dcd69877e4a9a682ce355150c5d6a6947b"
|
||||
integrity sha512-9J0+C+2nt3WFuui/mC46z2XCZ21/cKlFDuywULmseD/LlmnOrSeEAE4c/1jw6aybXLmpZnQY3/LmOJfgyHIcng==
|
||||
dependencies:
|
||||
env-paths "^2.2.0"
|
||||
exponential-backoff "^3.1.1"
|
||||
glob "^10.3.10"
|
||||
graceful-fs "^4.2.6"
|
||||
make-fetch-happen "^13.0.0"
|
||||
nopt "^7.0.0"
|
||||
proc-log "^4.1.0"
|
||||
make-fetch-happen "^14.0.3"
|
||||
nopt "^8.0.0"
|
||||
proc-log "^5.0.0"
|
||||
semver "^7.3.5"
|
||||
tar "^6.2.1"
|
||||
which "^4.0.0"
|
||||
tar "^7.4.3"
|
||||
tinyglobby "^0.2.12"
|
||||
which "^5.0.0"
|
||||
|
||||
node-gyp@^5.0.2:
|
||||
version "5.1.1"
|
||||
@ -7093,12 +7069,12 @@ nopt@^4.0.1:
|
||||
abbrev "1"
|
||||
osenv "^0.1.4"
|
||||
|
||||
nopt@^7.0.0:
|
||||
version "7.2.1"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7"
|
||||
integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==
|
||||
nopt@^8.0.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-8.1.0.tgz#b11d38caf0f8643ce885818518064127f602eae3"
|
||||
integrity sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==
|
||||
dependencies:
|
||||
abbrev "^2.0.0"
|
||||
abbrev "^3.0.0"
|
||||
|
||||
normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0:
|
||||
version "2.5.0"
|
||||
@ -7449,12 +7425,10 @@ p-map@^3.0.0:
|
||||
dependencies:
|
||||
aggregate-error "^3.0.0"
|
||||
|
||||
p-map@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b"
|
||||
integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
|
||||
dependencies:
|
||||
aggregate-error "^3.0.0"
|
||||
p-map@^7.0.2:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/p-map/-/p-map-7.0.3.tgz#7ac210a2d36f81ec28b736134810f7ba4418cdb6"
|
||||
integrity sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==
|
||||
|
||||
p-pipe@^1.2.0:
|
||||
version "1.2.0"
|
||||
@ -7862,10 +7836,10 @@ printable-characters@^1.0.42:
|
||||
resolved "https://registry.yarnpkg.com/printable-characters/-/printable-characters-1.0.42.tgz#3f18e977a9bd8eb37fcc4ff5659d7be90868b3d8"
|
||||
integrity sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==
|
||||
|
||||
proc-log@^4.1.0, proc-log@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034"
|
||||
integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==
|
||||
proc-log@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-5.0.0.tgz#e6c93cf37aef33f835c53485f314f50ea906a9d8"
|
||||
integrity sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==
|
||||
|
||||
process-nextick-args@~2.0.0:
|
||||
version "2.0.1"
|
||||
@ -8833,10 +8807,10 @@ sshpk@^1.7.0:
|
||||
safer-buffer "^2.0.2"
|
||||
tweetnacl "~0.14.0"
|
||||
|
||||
ssri@^10.0.0:
|
||||
version "10.0.6"
|
||||
resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5"
|
||||
integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==
|
||||
ssri@^12.0.0:
|
||||
version "12.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ssri/-/ssri-12.0.0.tgz#bcb4258417c702472f8191981d3c8a771fee6832"
|
||||
integrity sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
|
||||
@ -9111,13 +9085,12 @@ supports-preserve-symlinks-flag@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
|
||||
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
|
||||
|
||||
synckit@^0.11.0:
|
||||
version "0.11.4"
|
||||
resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.4.tgz#48972326b59723fc15b8d159803cf8302b545d59"
|
||||
integrity sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==
|
||||
synckit@^0.11.7:
|
||||
version "0.11.8"
|
||||
resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457"
|
||||
integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==
|
||||
dependencies:
|
||||
"@pkgr/core" "^0.2.3"
|
||||
tslib "^2.8.1"
|
||||
"@pkgr/core" "^0.2.4"
|
||||
|
||||
tapable@^2.1.1, tapable@^2.2.0:
|
||||
version "2.2.2"
|
||||
@ -9137,17 +9110,17 @@ tar@^4.4.10, tar@^4.4.12, tar@^4.4.8:
|
||||
safe-buffer "^5.2.1"
|
||||
yallist "^3.1.1"
|
||||
|
||||
tar@^6.1.11, tar@^6.2.1:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
|
||||
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
|
||||
tar@^7.4.3:
|
||||
version "7.4.3"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-7.4.3.tgz#88bbe9286a3fcd900e94592cda7a22b192e80571"
|
||||
integrity sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==
|
||||
dependencies:
|
||||
chownr "^2.0.0"
|
||||
fs-minipass "^2.0.0"
|
||||
minipass "^5.0.0"
|
||||
minizlib "^2.1.1"
|
||||
mkdirp "^1.0.3"
|
||||
yallist "^4.0.0"
|
||||
"@isaacs/fs-minipass" "^4.0.0"
|
||||
chownr "^3.0.0"
|
||||
minipass "^7.1.2"
|
||||
minizlib "^3.0.1"
|
||||
mkdirp "^3.0.1"
|
||||
yallist "^5.0.0"
|
||||
|
||||
temp-dir@^1.0.0:
|
||||
version "1.0.0"
|
||||
@ -9251,15 +9224,7 @@ tinyexec@^0.3.2:
|
||||
resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2"
|
||||
integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==
|
||||
|
||||
tinyglobby@^0.2.12:
|
||||
version "0.2.13"
|
||||
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.13.tgz#a0e46515ce6cbcd65331537e57484af5a7b2ff7e"
|
||||
integrity sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==
|
||||
dependencies:
|
||||
fdir "^6.4.4"
|
||||
picomatch "^4.0.2"
|
||||
|
||||
tinyglobby@^0.2.13:
|
||||
tinyglobby@^0.2.12, tinyglobby@^0.2.13:
|
||||
version "0.2.14"
|
||||
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.14.tgz#5280b0cf3f972b050e74ae88406c0a6a58f4079d"
|
||||
integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==
|
||||
@ -9387,7 +9352,7 @@ tslib@^1.9.0:
|
||||
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz"
|
||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||
|
||||
tslib@^2.4.0, tslib@^2.8.1:
|
||||
tslib@^2.4.0:
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
|
||||
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
|
||||
@ -9541,12 +9506,12 @@ unique-filename@^1.1.1:
|
||||
dependencies:
|
||||
unique-slug "^2.0.0"
|
||||
|
||||
unique-filename@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea"
|
||||
integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==
|
||||
unique-filename@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-4.0.0.tgz#a06534d370e7c977a939cd1d11f7f0ab8f1fed13"
|
||||
integrity sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==
|
||||
dependencies:
|
||||
unique-slug "^4.0.0"
|
||||
unique-slug "^5.0.0"
|
||||
|
||||
unique-slug@^2.0.0:
|
||||
version "2.0.2"
|
||||
@ -9555,10 +9520,10 @@ unique-slug@^2.0.0:
|
||||
dependencies:
|
||||
imurmurhash "^0.1.4"
|
||||
|
||||
unique-slug@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3"
|
||||
integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==
|
||||
unique-slug@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-5.0.0.tgz#ca72af03ad0dbab4dad8aa683f633878b1accda8"
|
||||
integrity sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==
|
||||
dependencies:
|
||||
imurmurhash "^0.1.4"
|
||||
|
||||
@ -9852,10 +9817,10 @@ which@^2.0.1:
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
which@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a"
|
||||
integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==
|
||||
which@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-5.0.0.tgz#d93f2d93f79834d4363c7d0c23e00d07c466c8d6"
|
||||
integrity sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==
|
||||
dependencies:
|
||||
isexe "^3.1.1"
|
||||
|
||||
@ -10090,6 +10055,11 @@ yallist@^4.0.0:
|
||||
resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"
|
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||
|
||||
yallist@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533"
|
||||
integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==
|
||||
|
||||
yargs-parser@20.2.4:
|
||||
version "20.2.4"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user