@aws-amplify/graphql-model-transformer 1.3.0-sync-fix.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/lib/rds-lambda.zip +0 -0
  3. package/package.json +5 -5
  4. package/rds-lambda/node_modules/.package-lock.json +91 -77
  5. package/rds-lambda/node_modules/@aws-sdk/client-ssm/package.json +5 -5
  6. package/rds-lambda/node_modules/@aws-sdk/client-sso/package.json +3 -3
  7. package/rds-lambda/node_modules/@aws-sdk/client-sso-oidc/package.json +3 -3
  8. package/rds-lambda/node_modules/@aws-sdk/client-sts/package.json +4 -4
  9. package/rds-lambda/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
  10. package/rds-lambda/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
  11. package/rds-lambda/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
  12. package/rds-lambda/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
  13. package/rds-lambda/node_modules/@aws-sdk/token-providers/package.json +2 -2
  14. package/rds-lambda/node_modules/@aws-sdk/util-endpoints/package.json +1 -1
  15. package/rds-lambda/node_modules/@sinonjs/commons/package.json +1 -1
  16. package/rds-lambda/node_modules/@sinonjs/fake-timers/README.md +7 -0
  17. package/rds-lambda/node_modules/@sinonjs/fake-timers/package.json +9 -9
  18. package/rds-lambda/node_modules/@types/node/README.md +1 -1
  19. package/rds-lambda/node_modules/@types/node/package.json +2 -2
  20. package/rds-lambda/node_modules/caniuse-lite/package.json +1 -1
  21. package/rds-lambda/node_modules/electron-to-chromium/full-chromium-versions.json +1 -1
  22. package/rds-lambda/node_modules/electron-to-chromium/full-versions.json +1 -1
  23. package/rds-lambda/node_modules/electron-to-chromium/package.json +1 -1
  24. package/rds-lambda/node_modules/electron-to-chromium/versions.json +1 -1
  25. package/rds-lambda/node_modules/is-core-module/CHANGELOG.md +6 -0
  26. package/rds-lambda/node_modules/is-core-module/core.json +1 -1
  27. package/rds-lambda/node_modules/is-core-module/package.json +1 -1
  28. package/rds-lambda/node_modules/jest-snapshot/node_modules/semver/package.json +3 -3
  29. package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/LICENSE +21 -0
  30. package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/README.md +77 -0
  31. package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/package.json +40 -0
  32. package/rds-lambda/node_modules/pg/package.json +11 -4
  33. package/rds-lambda/node_modules/pg-cloudflare/LICENSE +21 -0
  34. package/rds-lambda/node_modules/pg-cloudflare/README.md +33 -0
  35. package/rds-lambda/node_modules/pg-cloudflare/package.json +28 -0
  36. package/rds-lambda/node_modules/pg-cloudflare/src/index.ts +164 -0
  37. package/rds-lambda/node_modules/ts-jest/node_modules/semver/package.json +3 -3
  38. package/rds-lambda/package-lock.json +91 -77
  39. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,77 @@
1
+ pg-connection-string
2
+ ====================
3
+
4
+ [![NPM](https://nodei.co/npm/pg-connection-string.png?compact=true)](https://nodei.co/npm/pg-connection-string/)
5
+
6
+ [![Build Status](https://travis-ci.org/iceddev/pg-connection-string.svg?branch=master)](https://travis-ci.org/iceddev/pg-connection-string)
7
+ [![Coverage Status](https://coveralls.io/repos/github/iceddev/pg-connection-string/badge.svg?branch=master)](https://coveralls.io/github/iceddev/pg-connection-string?branch=master)
8
+
9
+ Functions for dealing with a PostgresSQL connection string
10
+
11
+ `parse` method taken from [node-postgres](https://github.com/brianc/node-postgres.git)
12
+ Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com)
13
+ MIT License
14
+
15
+ ## Usage
16
+
17
+ ```js
18
+ var parse = require('pg-connection-string').parse;
19
+
20
+ var config = parse('postgres://someuser:somepassword@somehost:381/somedatabase')
21
+ ```
22
+
23
+ The resulting config contains a subset of the following properties:
24
+
25
+ * `host` - Postgres server hostname or, for UNIX domain sockets, the socket filename
26
+ * `port` - port on which to connect
27
+ * `user` - User with which to authenticate to the server
28
+ * `password` - Corresponding password
29
+ * `database` - Database name within the server
30
+ * `client_encoding` - string encoding the client will use
31
+ * `ssl`, either a boolean or an object with properties
32
+ * `rejectUnauthorized`
33
+ * `cert`
34
+ * `key`
35
+ * `ca`
36
+ * any other query parameters (for example, `application_name`) are preserved intact.
37
+
38
+ ## Connection Strings
39
+
40
+ The short summary of acceptable URLs is:
41
+
42
+ * `socket:<path>?<query>` - UNIX domain socket
43
+ * `postgres://<user>:<password>@<host>:<port>/<database>?<query>` - TCP connection
44
+
45
+ But see below for more details.
46
+
47
+ ### UNIX Domain Sockets
48
+
49
+ When user and password are not given, the socket path follows `socket:`, as in `socket:/var/run/pgsql`.
50
+ This form can be shortened to just a path: `/var/run/pgsql`.
51
+
52
+ When 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`.
53
+
54
+ Query parameters follow a `?` character, including the following special query parameters:
55
+
56
+ * `db=<database>` - sets the database name (urlencoded)
57
+ * `encoding=<encoding>` - sets the `client_encoding` property
58
+
59
+ ### TCP Connections
60
+
61
+ TCP connections to the Postgres server are indicated with `pg:` or `postgres:` schemes (in fact, any scheme but `socket:` is accepted).
62
+ If username and password are included, they should be urlencoded.
63
+ The database name, however, should *not* be urlencoded.
64
+
65
+ Query parameters follow a `?` character, including the following special query parameters:
66
+ * `host=<host>` - sets `host` property, overriding the URL's host
67
+ * `encoding=<encoding>` - sets the `client_encoding` property
68
+ * `ssl=1`, `ssl=true`, `ssl=0`, `ssl=false` - sets `ssl` to true or false, accordingly
69
+ * `sslmode=<sslmode>`
70
+ * `sslmode=disable` - sets `ssl` to false
71
+ * `sslmode=no-verify` - sets `ssl` to `{ rejectUnauthorized: false }`
72
+ * `sslmode=prefer`, `sslmode=require`, `sslmode=verify-ca`, `sslmode=verify-full` - sets `ssl` to true
73
+ * `sslcert=<filename>` - reads data from the given file and includes the result as `ssl.cert`
74
+ * `sslkey=<filename>` - reads data from the given file and includes the result as `ssl.key`
75
+ * `sslrootcert=<filename>` - reads data from the given file and includes the result as `ssl.ca`
76
+
77
+ A bare relative URL, such as `salesdata`, will indicate a database name while leaving other properties empty.
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "pg-connection-string",
3
+ "version": "2.6.0",
4
+ "description": "Functions for dealing with a PostgresSQL connection string",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "scripts": {
8
+ "test": "istanbul cover _mocha && npm run check-coverage",
9
+ "check-coverage": "istanbul check-coverage --statements 100 --branches 100 --lines 100 --functions 100",
10
+ "coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git://github.com/brianc/node-postgres.git",
15
+ "directory": "packages/pg-connection-string"
16
+ },
17
+ "keywords": [
18
+ "pg",
19
+ "connection",
20
+ "string",
21
+ "parse"
22
+ ],
23
+ "author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/brianc/node-postgres/issues"
27
+ },
28
+ "homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string",
29
+ "devDependencies": {
30
+ "chai": "^4.1.1",
31
+ "coveralls": "^3.0.4",
32
+ "istanbul": "^0.4.5",
33
+ "mocha": "^7.1.2"
34
+ },
35
+ "files": [
36
+ "index.js",
37
+ "index.d.ts"
38
+ ],
39
+ "gitHead": "14b840e96e57fc0617b5c4758f6318f774148ee4"
40
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg",
3
- "version": "8.10.0",
3
+ "version": "8.11.0",
4
4
  "description": "PostgreSQL client - pure javascript & libpq with the same API",
5
5
  "keywords": [
6
6
  "database",
@@ -22,17 +22,24 @@
22
22
  "dependencies": {
23
23
  "buffer-writer": "2.0.0",
24
24
  "packet-reader": "1.0.0",
25
- "pg-connection-string": "^2.5.0",
25
+ "pg-connection-string": "^2.6.0",
26
26
  "pg-pool": "^3.6.0",
27
27
  "pg-protocol": "^1.6.0",
28
28
  "pg-types": "^2.1.0",
29
29
  "pgpass": "1.x"
30
30
  },
31
31
  "devDependencies": {
32
+ "@cloudflare/workers-types": "^4.20230404.0",
32
33
  "async": "2.6.4",
33
34
  "bluebird": "3.5.2",
34
35
  "co": "4.6.0",
35
- "pg-copy-streams": "0.3.0"
36
+ "pg-copy-streams": "0.3.0",
37
+ "typescript": "^4.0.3",
38
+ "workerd": "^1.20230419.0",
39
+ "wrangler": "^2.16.0"
40
+ },
41
+ "optionalDependencies": {
42
+ "pg-cloudflare": "^1.1.0"
36
43
  },
37
44
  "peerDependencies": {
38
45
  "pg-native": ">=3.0.1"
@@ -53,5 +60,5 @@
53
60
  "engines": {
54
61
  "node": ">= 8.0.0"
55
62
  },
56
- "gitHead": "ee302cbcf10437e34fd05d70fc003c357b14c654"
63
+ "gitHead": "14b840e96e57fc0617b5c4758f6318f774148ee4"
57
64
  }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2010 - 2021 Brian Carlson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,33 @@
1
+ # pg-cloudflare
2
+
3
+ A socket implementation that can run on Cloudflare Workers using native TCP connections.
4
+
5
+ ## install
6
+
7
+ ```
8
+ npm i --save-dev pg-cloudflare
9
+ ```
10
+
11
+ ### license
12
+
13
+ The MIT License (MIT)
14
+
15
+ Copyright (c) 2023 Brian M. Carlson
16
+
17
+ Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ of this software and associated documentation files (the "Software"), to deal
19
+ in the Software without restriction, including without limitation the rights
20
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ copies of the Software, and to permit persons to whom the Software is
22
+ furnished to do so, subject to the following conditions:
23
+
24
+ The above copyright notice and this permission notice shall be included in
25
+ all copies or substantial portions of the Software.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33
+ THE SOFTWARE.
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "pg-cloudflare",
3
+ "version": "1.1.0",
4
+ "description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "license": "MIT",
8
+ "devDependencies": {
9
+ "ts-node": "^8.5.4",
10
+ "typescript": "^4.0.3"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "build:watch": "tsc --watch",
15
+ "prepublish": "yarn build",
16
+ "test": "echo e2e test in pg package"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git://github.com/brianc/node-postgres.git",
21
+ "directory": "packages/pg-cloudflare"
22
+ },
23
+ "files": [
24
+ "/dist/*{js,ts,map}",
25
+ "/src"
26
+ ],
27
+ "gitHead": "14b840e96e57fc0617b5c4758f6318f774148ee4"
28
+ }
@@ -0,0 +1,164 @@
1
+ import { SocketOptions, Socket, TlsOptions } from 'cloudflare:sockets'
2
+ import { EventEmitter } from 'events'
3
+
4
+ /**
5
+ * Wrapper around the Cloudflare built-in socket that can be used by the `Connection`.
6
+ */
7
+ export class CloudflareSocket extends EventEmitter {
8
+ writable = false
9
+ destroyed = false
10
+
11
+ private _upgrading = false
12
+ private _upgraded = false
13
+ private _cfSocket: Socket | null = null
14
+ private _cfWriter: WritableStreamDefaultWriter | null = null
15
+ private _cfReader: ReadableStreamDefaultReader | null = null
16
+
17
+ constructor(readonly ssl: boolean) {
18
+ super()
19
+ }
20
+
21
+ setNoDelay() {
22
+ return this
23
+ }
24
+ setKeepAlive() {
25
+ return this
26
+ }
27
+ ref() {
28
+ return this
29
+ }
30
+ unref() {
31
+ return this
32
+ }
33
+
34
+ async connect(port: number, host: string, connectListener?: (...args: unknown[]) => void) {
35
+ try {
36
+ log('connecting')
37
+ if (connectListener) this.once('connect', connectListener)
38
+
39
+ const options: SocketOptions = this.ssl ? { secureTransport: 'starttls' } : {}
40
+ const { connect } = await import('cloudflare:sockets')
41
+ this._cfSocket = connect(`${host}:${port}`, options)
42
+ this._cfWriter = this._cfSocket.writable.getWriter()
43
+ this._addClosedHandler()
44
+
45
+ this._cfReader = this._cfSocket.readable.getReader()
46
+ if (this.ssl) {
47
+ this._listenOnce().catch((e) => this.emit('error', e))
48
+ } else {
49
+ this._listen().catch((e) => this.emit('error', e))
50
+ }
51
+
52
+ await this._cfWriter!.ready
53
+ log('socket ready')
54
+ this.writable = true
55
+ this.emit('connect')
56
+
57
+ return this
58
+ } catch (e) {
59
+ this.emit('error', e)
60
+ }
61
+ }
62
+
63
+ async _listen() {
64
+ while (true) {
65
+ log('awaiting receive from CF socket')
66
+ const { done, value } = await this._cfReader!.read()
67
+ log('CF socket received:', done, value)
68
+ if (done) {
69
+ log('done')
70
+ break
71
+ }
72
+ this.emit('data', Buffer.from(value))
73
+ }
74
+ }
75
+
76
+ async _listenOnce() {
77
+ log('awaiting first receive from CF socket')
78
+ const { done, value } = await this._cfReader!.read()
79
+ log('First CF socket received:', done, value)
80
+ this.emit('data', Buffer.from(value))
81
+ }
82
+
83
+ write(
84
+ data: Uint8Array | string,
85
+ encoding: BufferEncoding = 'utf8',
86
+ callback: (...args: unknown[]) => void = () => {}
87
+ ) {
88
+ if (data.length === 0) return callback()
89
+ if (typeof data === 'string') data = Buffer.from(data, encoding)
90
+
91
+ log('sending data direct:', data)
92
+ this._cfWriter!.write(data).then(
93
+ () => {
94
+ log('data sent')
95
+ callback()
96
+ },
97
+ (err) => {
98
+ log('send error', err)
99
+ callback(err)
100
+ }
101
+ )
102
+ return true
103
+ }
104
+
105
+ end(data = Buffer.alloc(0), encoding: BufferEncoding = 'utf8', callback: (...args: unknown[]) => void = () => {}) {
106
+ log('ending CF socket')
107
+ this.write(data, encoding, (err) => {
108
+ this._cfSocket!.close()
109
+ if (callback) callback(err)
110
+ })
111
+ return this
112
+ }
113
+
114
+ destroy(reason: string) {
115
+ log('destroying CF socket', reason)
116
+ this.destroyed = true
117
+ return this.end()
118
+ }
119
+
120
+ startTls(options: TlsOptions) {
121
+ if (this._upgraded) {
122
+ // Don't try to upgrade again.
123
+ this.emit('error', 'Cannot call `startTls()` more than once on a socket')
124
+ return
125
+ }
126
+ this._cfWriter!.releaseLock()
127
+ this._cfReader!.releaseLock()
128
+ this._upgrading = true
129
+ this._cfSocket = this._cfSocket!.startTls(options)
130
+ this._cfWriter = this._cfSocket.writable.getWriter()
131
+ this._cfReader = this._cfSocket.readable.getReader()
132
+ this._addClosedHandler()
133
+ this._listen().catch((e) => this.emit('error', e))
134
+ }
135
+
136
+ _addClosedHandler() {
137
+ this._cfSocket!.closed.then(() => {
138
+ if (!this._upgrading) {
139
+ log('CF socket closed')
140
+ this._cfSocket = null
141
+ this.emit('close')
142
+ } else {
143
+ this._upgrading = false
144
+ this._upgraded = true
145
+ }
146
+ }).catch((e) => this.emit('error', e))
147
+ }
148
+ }
149
+
150
+ const debug = false
151
+
152
+ function dump(data: unknown) {
153
+ if (data instanceof Uint8Array || data instanceof ArrayBuffer) {
154
+ const hex = Buffer.from(data).toString('hex')
155
+ const str = new TextDecoder().decode(data)
156
+ return `\n>>> STR: "${str.replace(/\n/g, '\\n')}"\n>>> HEX: ${hex}\n`
157
+ } else {
158
+ return data
159
+ }
160
+ }
161
+
162
+ function log(...args: unknown[]) {
163
+ debug && console.log(...args.map(dump))
164
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.5.0",
3
+ "version": "7.5.1",
4
4
  "description": "The semantic version parser used by npm.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@npmcli/eslint-config": "^4.0.0",
17
- "@npmcli/template-oss": "4.13.0",
17
+ "@npmcli/template-oss": "4.14.1",
18
18
  "tap": "^16.0.0"
19
19
  },
20
20
  "license": "ISC",
@@ -53,7 +53,7 @@
53
53
  "author": "GitHub Inc.",
54
54
  "templateOSS": {
55
55
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
56
- "version": "4.13.0",
56
+ "version": "4.14.1",
57
57
  "engines": ">=10",
58
58
  "ciVersions": [
59
59
  "10.0.0",