{"versions":{"0.1.1":{"name":"gaussdb-connection-string","version":"0.1.1","description":"Functions for dealing with a GaussDB connection string","main":"./index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./esm/index.mjs","require":"./index.js","default":"./index.js"}},"scripts":{"test":"nyc --reporter=lcov mocha && npm run check-coverage","check-coverage":"nyc check-coverage --statements 100 --branches 100 --lines 100 --functions 100"},"repository":{"type":"git","url":"git@github.com:HuaweiCloudDeveloper/gaussdb-node.git","directory":"packages/gaussdb-connection-string"},"keywords":["connection","string","parse","gaussdb"],"author":"Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)","license":"MIT","bugs":{"url":"https://github.com/HuaweiCloudDeveloper/gaussdb-node/issues"},"homepage":"https://github.com/HuaweiCloudDeveloper/gaussdb-node/tree/master/packages/gaussdb-connection-string","devDependencies":{"@types/pg":"^8.12.0","chai":"^4.1.1","coveralls":"^3.0.4","istanbul":"^0.4.5","mocha":"^10.5.2","nyc":"^15","tsx":"^4.19.4","typescript":"^4.0.3"},"gitHead":"90fe4f95cded826963d76a93b2a344a13f7b3f16","_nodeVersion":"20.19.3","_npmVersion":"lerna/8.2.2/node@v20.19.3+x64 (linux)","_id":"gaussdb-connection-string@0.1.1","dist":{"integrity":"sha512-y0sLNCjpNSiHyiBNVjlVTTqVnuJbDdvCdoowTQfrXJk+uNzZTDQ1bWTFrorkPEJ2CyofIpqPkolDfQBCWwKAfg==","shasum":"d15939e826b89cb9a507ed8c700c00115fb4a53a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gaussdb-connection-string/-/gaussdb-connection-string-0.1.1.tgz","fileCount":6,"unpackedSize":14787,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBZMGpwnGIRqd1Cf2mYw4DT1m1ntralqK+9B/dOBYWuwAiEAoMN247IpS1jQVjWeGWR9leM1rH2XTamEh15z/etYpcU="}],"size":5338},"_npmUser":{"name":"anonymous","email":"happygame1024@gmail.com","actor":{"name":"happygame","email":"happygame1024@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"anonymous","email":"happygame1024@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gaussdb-connection-string_0.1.1_1751098311323_0.8015915676960272"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-06-28T08:11:51.498Z","publish_time":1751098311498,"_source_registry_name":"default","contributors":[]},"0.2.0":{"name":"gaussdb-connection-string","version":"0.2.0","description":"Functions for dealing with a GaussDB connection string","main":"./index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./esm/index.mjs","require":"./index.js","default":"./index.js"}},"scripts":{"test":"nyc --reporter=lcov mocha && npm run check-coverage","check-coverage":"nyc check-coverage --statements 100 --branches 100 --lines 100 --functions 100"},"repository":{"type":"git","url":"git@github.com:HuaweiCloudDeveloper/gaussdb-node.git","directory":"packages/gaussdb-connection-string"},"keywords":["connection","string","parse","gaussdb"],"author":"Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)","license":"MIT","bugs":{"url":"https://github.com/HuaweiCloudDeveloper/gaussdb-node/issues"},"homepage":"https://github.com/HuaweiCloudDeveloper/gaussdb-node/tree/master/packages/gaussdb-connection-string","devDependencies":{"@types/pg":"^8.12.0","chai":"^4.1.1","coveralls":"^3.0.4","istanbul":"^0.4.5","mocha":"^10.5.2","nyc":"^15","tsx":"^4.19.4","typescript":"^4.0.3"},"gitHead":"f94b11adc5a52d2964a0a4c6d865691861f900cb","_nodeVersion":"20.19.3","_npmVersion":"lerna/8.2.2/node@v20.19.3+x64 (linux)","_id":"gaussdb-connection-string@0.2.0","dist":{"integrity":"sha512-W+O5k/rIugU26DdXMz26j6jUG78l4miU5dASGIC0nNr+CayU+u2szhsNXyJU1w98y/lsOU9kRRH7tEv41Or5Ww==","shasum":"eb77d3ebc38629be845797d48cfeeb83394c2fa8","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gaussdb-connection-string/-/gaussdb-connection-string-0.2.0.tgz","fileCount":6,"unpackedSize":14787,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCyE/XRo+m50jzUMYjJD68SjtQG+QoZR2F+V1IDHn1EfQIgCuAhMFfpPl5Gt38iPjIeJOnwrjiWpJu74cDqHZwherg="}],"size":5338},"_npmUser":{"name":"anonymous","email":"happygame1024@gmail.com","actor":{"name":"happygame","email":"happygame1024@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"anonymous","email":"happygame1024@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gaussdb-connection-string_0.2.0_1751100929877_0.9065026074225133"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-06-28T08:55:30.065Z","publish_time":1751100930065,"_source_registry_name":"default","contributors":[]},"0.2.1":{"name":"gaussdb-connection-string","version":"0.2.1","description":"Functions for dealing with a GaussDB connection string","main":"./index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./esm/index.mjs","require":"./index.js","default":"./index.js"}},"scripts":{"test":"nyc --reporter=lcov mocha && npm run check-coverage","check-coverage":"nyc check-coverage --statements 100 --branches 100 --lines 100 --functions 100"},"repository":{"type":"git","url":"git@github.com:HuaweiCloudDeveloper/gaussdb-node.git","directory":"packages/gaussdb-connection-string"},"keywords":["connection","string","parse","gaussdb"],"author":"Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)","license":"MIT","bugs":{"url":"https://github.com/HuaweiCloudDeveloper/gaussdb-node/issues"},"homepage":"https://github.com/HuaweiCloudDeveloper/gaussdb-node/tree/master/packages/gaussdb-connection-string","devDependencies":{"@types/pg":"^8.12.0","chai":"^4.1.1","coveralls":"^3.0.4","istanbul":"^0.4.5","mocha":"^10.5.2","nyc":"^15","tsx":"^4.19.4","typescript":"^4.0.3"},"gitHead":"debbf9ede742e0c9adcb34755350acfd1b27a73b","_nodeVersion":"20.19.3","_npmVersion":"lerna/8.2.3/node@v20.19.3+x64 (linux)","_id":"gaussdb-connection-string@0.2.1","dist":{"integrity":"sha512-omOtWpFVMQP5Bo7hKGDLudAJW6ywyNQtFU4zZqXBUsUkK0kjt/g0+aYnpY5G/VekRZqTKTiEeE8z2+18b2T3Mg==","shasum":"c160a6b05b9d35b9a2fd5a0f37c9496140c5736e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gaussdb-connection-string/-/gaussdb-connection-string-0.2.1.tgz","fileCount":6,"unpackedSize":14802,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFbYLL/waQiRq9IvDhyby/bKAXQrbW5iiqkH9dKJVQuiAiAhqUVo3uD6RpmtvR9neRB76a11OP5wKXRO8C5RmxHWmw=="}],"size":5340},"_npmUser":{"name":"anonymous","email":"happygame1024@gmail.com","actor":{"name":"happygame","email":"happygame1024@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"anonymous","email":"happygame1024@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gaussdb-connection-string_0.2.1_1751510743439_0.3710632493387809"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-03T02:45:43.584Z","publish_time":1751510743584,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.2.1"},"name":"gaussdb-connection-string","time":{"created":"2025-06-10T07:06:00.364Z","modified":"2025-07-03T03:16:11.932Z","0.1.1":"2025-06-28T08:11:51.498Z","0.2.0":"2025-06-28T08:55:30.065Z","0.2.1":"2025-07-03T02:45:43.584Z"},"readme":"gaussdb-connection-string\n====================\n\n<!-- TODO: 打包后恢复 -->\n<!-- [![NPM](https://nodei.co/npm/gaussdb-connection-string.png?compact=true)](https://nodei.co/npm/gaussdb-connection-string/) -->\n\nFunctions for dealing with a GaussDB connection string\n\n`parse` method taken from [gaussdb-node](https://github.com/HuaweiCloudDeveloper/gaussdb-node.git)\nCopyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com)\nCopyright (c) 2025 happy-game\nMIT License\n\n## Usage\n\n```js\nconst parse = require('gaussdb-connection-string').parse;\n\nconst config = parse('gaussdb://someuser:somepassword@somehost:381/somedatabase')\n```\n\nThe resulting config contains a subset of the following properties:\n\n* `user` - User with which to authenticate to the server\n* `password` - Corresponding password\n* `host` - GaussDB server hostname or, for UNIX domain sockets, the socket filename\n* `port` - port on which to connect\n* `database` - Database name within the server\n* `client_encoding` - string encoding the client will use\n* `ssl`, either a boolean or an object with properties\n  * `rejectUnauthorized`\n  * `cert`\n  * `key`\n  * `ca`\n* any other query parameters (for example, `application_name`) are preserved intact.\n\n### ClientConfig Compatibility for TypeScript\n\nThe gaussdb-connection-string `ConnectionOptions` interface is not compatible with the `ClientConfig` interface that [gaussdb.Client](https://node-gaussdb.com/apis/client) expects. To remedy this, use the `parseIntoClientConfig` function instead of `parse`:\n\n```ts\nimport { ClientConfig } from 'gaussdb-node';\nimport { parseIntoClientConfig } from 'gaussdb-connection-string';\n\nconst config: ClientConfig = parseIntoClientConfig('gaussdb://someuser:somepassword@somehost:381/somedatabase')\n```\n\nYou can also use `toClientConfig` to convert an existing `ConnectionOptions` interface into a `ClientConfig` interface:\n\n```ts\nimport { ClientConfig } from 'gaussdb-node';\nimport { parse, toClientConfig } from 'gaussdb-connection-string';\n\nconst config = parse('gaussdb://someuser:somepassword@somehost:381/somedatabase')\nconst clientConfig: ClientConfig = toClientConfig(config)\n```\n\n## Connection Strings\n\nThe short summary of acceptable URLs is:\n\n * `socket:<path>?<query>` - UNIX domain socket\n * `gaussdb://<user>:<password>@<host>:<port>/<database>?<query>` - TCP connection\n\nBut see below for more details.\n\n### UNIX Domain Sockets\n<!-- TODO: 此处待修改 -->\nWhen user and password are not given, the socket path follows `socket:`, as in `socket:/var/run/pgsql`.\nThis form can be shortened to just a path: `/var/run/pgsql`.\n\nWhen user and password are given, they are included in the typical URL positions, with an empty `host`, as in `socket://user:pass@/var/run/pgsql`.\n\nQuery parameters follow a `?` character, including the following special query parameters:\n\n * `db=<database>` - sets the database name (urlencoded)\n * `encoding=<encoding>` - sets the `client_encoding` property\n\n### TCP Connections\n\nTCP connections to the GaussDB server are indicated with `gaussdb:` or `gauss:` schemes (in fact, any scheme but `socket:` is accepted).\nIf username and password are included, they should be urlencoded.\nThe database name, however, should *not* be urlencoded.\n\nQuery parameters follow a `?` character, including the following special query parameters:\n * `host=<host>` - sets `host` property, overriding the URL's host\n * `encoding=<encoding>` - sets the `client_encoding` property\n * `ssl=1`, `ssl=true`, `ssl=0`, `ssl=false` - sets `ssl` to true or false, accordingly\n * `uselibpqcompat=true` - use libpq semantics\n * `sslmode=<sslmode>` when `uselibpqcompat=true` is not set\n   * `sslmode=disable` - sets `ssl` to false\n   * `sslmode=no-verify` - sets `ssl` to `{ rejectUnauthorized: false }`\n   * `sslmode=prefer`, `sslmode=require`, `sslmode=verify-ca`, `sslmode=verify-full` - sets `ssl` to true\n * `sslmode=<sslmode>` when `uselibpqcompat=true`\n   * `sslmode=disable` - sets `ssl` to false\n   * `sslmode=prefer` - sets `ssl` to `{ rejectUnauthorized: false }`\n   * `sslmode=require` - sets `ssl` to `{ rejectUnauthorized: false }` unless `sslrootcert` is specified, in which case it behaves like `verify-ca`\n   * `sslmode=verify-ca` - sets `ssl` to `{ checkServerIdentity: no-op }` (verify CA, but not server identity). This verifies the presented certificate against the effective CA specified in sslrootcert.\n   * `sslmode=verify-full` - sets `ssl` to `{}` (verify CA and server identity)\n * `sslcert=<filename>` - reads data from the given file and includes the result as `ssl.cert`\n * `sslkey=<filename>` - reads data from the given file and includes the result as `ssl.key`\n * `sslrootcert=<filename>` - reads data from the given file and includes the result as `ssl.ca`\n\nA bare relative URL, such as `salesdata`, will indicate a database name while leaving other properties empty.","users":{}}