From 1dd5044e472f410a6c9a3f095aa3ad446cccc0a8 Mon Sep 17 00:00:00 2001 From: Christopher Dieringer Date: Fri, 20 Jan 2023 21:34:06 -0800 Subject: [PATCH] fix: roll graphile bit forward, add displayName (#555) * fix: roll graphile bit forward, add displayName * refactor: drop deps * chore: roll node to 18 --- .github/workflows/main.yml | 2 +- .github/workflows/onchange.yml | 2 +- package.json | 9 +- pnpm-lock.yaml | 389 +++++++++++++++++---------- src/__tests__/fixture/freeport.ts | 26 +- src/__tests__/fixture/nanographql.ts | 18 ++ src/__tests__/main.test.ts | 24 +- src/postgraphile-upsert.ts | 1 + 8 files changed, 304 insertions(+), 167 deletions(-) create mode 100644 src/__tests__/fixture/nanographql.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4127af9..39c5f000 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: - name: setup-node uses: actions/setup-node@v3 with: - node-version: 16.17.0 + node-version: 18.13.0 - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/onchange.yml b/.github/workflows/onchange.yml index 4d2d6d0f..1a9d7ee7 100644 --- a/.github/workflows/onchange.yml +++ b/.github/workflows/onchange.yml @@ -17,7 +17,7 @@ jobs: # - uses: wagoid/commitlint-github-action@v5 - uses: actions/setup-node@v3 with: - node-version: 16.17.0 + node-version: 18.13.0 - name: Install pnpm run: npm install -g pnpm@7 - name: checks diff --git a/package.json b/package.json index 8a2dcaa5..4afd75dd 100644 --- a/package.json +++ b/package.json @@ -33,16 +33,14 @@ "dockerode": "3.3.4", "eslint": "8.32.0", "execa": "5.1.1", - "freeport": "1.0.5", - "graphile-build": "4.12.3", + "graphile-build": "4.13.0", "graphql": "16.6.0", "husky": "8.0.3", "json-decycle": "3.0.0", - "nanographql": "2.0.0", "node-fetch": "2.6.8", "p-retry": "4.6.2", "pg": "8.8.0", - "postgraphile": "4.12.12", + "postgraphile": "4.13.0", "postgraphile-core": "4.13.0", "prettier": "2.8.3", "prettier-plugin-organize-imports": "3.2.2", @@ -95,5 +93,8 @@ "branches": [ "main" ] + }, + "dependencies": { + "build": "^0.1.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d2ae3338..b45bd710 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,20 +14,19 @@ specifiers: '@typescript-eslint/parser': 5.48.2 ava: 5.1.1 bluebird: 3.7.2 + build: ^0.1.4 c8: 7.12.0 dockerode: 3.3.4 eslint: 8.32.0 execa: 5.1.1 - freeport: 1.0.5 - graphile-build: 4.12.3 + graphile-build: 4.13.0 graphql: 16.6.0 husky: 8.0.3 json-decycle: 3.0.0 - nanographql: 2.0.0 node-fetch: 2.6.8 p-retry: 4.6.2 pg: 8.8.0 - postgraphile: 4.12.12 + postgraphile: 4.13.0 postgraphile-core: 4.13.0 prettier: 2.8.3 prettier-plugin-organize-imports: 3.2.2 @@ -36,6 +35,9 @@ specifiers: ts-node: 10.9.1 typescript: 4.9.4 +dependencies: + build: 0.1.4 + devDependencies: '@commitlint/cli': 17.4.2 '@commitlint/config-conventional': 17.4.2 @@ -54,16 +56,14 @@ devDependencies: dockerode: 3.3.4 eslint: 8.32.0 execa: 5.1.1 - freeport: 1.0.5 - graphile-build: 4.12.3_graphql@16.6.0 + graphile-build: 4.13.0_graphql@16.6.0 graphql: 16.6.0 husky: 8.0.3 json-decycle: 3.0.0 - nanographql: 2.0.0 node-fetch: 2.6.8 p-retry: 4.6.2 pg: 8.8.0 - postgraphile: 4.12.12 + postgraphile: 4.13.0 postgraphile-core: 4.13.0_graphql@16.6.0+pg@8.8.0 prettier: 2.8.3 prettier-plugin-organize-imports: 3.2.2_uhxzhaxu465qzax2tftpee5s7i @@ -107,8 +107,6 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} requiresBuild: true - dev: true - optional: true /@commitlint/cli/17.4.2: resolution: {integrity: sha512-0rPGJ2O1owhpxMIXL9YJ2CgPkdrFLKZElIZHXDN8L8+qWK1DGH7Q7IelBT1pchXTYTuDlqkOTdh//aTvT3bSUA==} @@ -285,6 +283,14 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true + /@dabh/diagnostics/2.0.3: + resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + dependencies: + colorspace: 1.1.4 + enabled: 2.0.0 + kuler: 2.0.0 + dev: false + /@eslint/eslintrc/1.4.1: resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -631,8 +637,8 @@ packages: resolution: {integrity: sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA==} dev: true - /@types/jsonwebtoken/8.5.8: - resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} + /@types/jsonwebtoken/9.0.1: + resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==} dependencies: '@types/node': 18.11.18 dev: true @@ -1042,6 +1048,10 @@ packages: safer-buffer: 2.1.2 dev: true + /async/3.2.4: + resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + dev: false + /asynckit/0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true @@ -1187,7 +1197,7 @@ packages: dev: true /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} dev: true /buffer-writer/2.0.0: @@ -1202,6 +1212,22 @@ packages: ieee754: 1.2.1 dev: true + /build/0.1.4: + resolution: {integrity: sha512-KwbDJ/zrsU8KZRRMfoURG14cKIAStUlS8D5jBDvtrZbwO5FEkYqc3oB8HIhRiyD64A48w1lc+sOmQ+mmBw5U/Q==} + engines: {node: '>v0.4.12'} + dependencies: + cssmin: 0.3.2 + jsmin: 1.0.1 + jxLoader: 0.1.1 + moo-server: 1.3.0 + promised-io: 0.3.6 + timespan: 2.3.0 + uglify-js: 1.3.5 + walker: 1.0.8 + winston: 3.8.2 + wrench: 1.3.9 + dev: false + /buildcheck/0.0.3: resolution: {integrity: sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA==} engines: {node: '>=10.0.0'} @@ -1400,7 +1426,6 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 - dev: true /color-convert/2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -1411,11 +1436,30 @@ packages: /color-name/1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true /color-name/1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true + + /color-string/1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: false + + /color/3.2.1: + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + dependencies: + color-convert: 1.9.3 + color-string: 1.9.1 + dev: false + + /colorspace/1.1.4: + resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + dependencies: + color: 3.2.1 + text-hex: 1.0.0 + dev: false /combined-stream/1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} @@ -1595,6 +1639,11 @@ packages: engines: {node: '>=8'} dev: true + /cssmin/0.3.2: + resolution: {integrity: sha512-bynxGIAJ8ybrnFobjsQotIjA8HFDDgPwbeUWNXXXfR+B4f9kkxdcUyagJoQCSUOfMV+ZZ6bMn8bvbozlCzUGwQ==} + hasBin: true + dev: false + /currently-unhandled/0.4.1: resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} engines: {node: '>=0.10.0'} @@ -1807,7 +1856,7 @@ packages: dev: true /ee-first/1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} dev: true /emittery/1.0.1: @@ -1823,6 +1872,10 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /enabled/2.0.0: + resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + dev: false + /encodeurl/1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -2264,6 +2317,10 @@ packages: reusify: 1.0.4 dev: true + /fecha/4.2.3: + resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + dev: false + /figures/2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -2372,6 +2429,10 @@ packages: resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==} dev: true + /fn.name/1.1.0: + resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + dev: false + /foreground-child/2.0.0: resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} engines: {node: '>=8.0.0'} @@ -2389,10 +2450,6 @@ packages: mime-types: 2.1.35 dev: true - /freeport/1.0.5: - resolution: {integrity: sha512-1+iRfba5tXzQAF83Tvvw5ZuhqDzyACfM+v13SZkdq8xKdaj/WR0Bke4sw9HsO1nU143+Hn0JxIleHEct+xbz9A==} - dev: true - /from2/2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} dependencies: @@ -2580,8 +2637,8 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true - /graphile-build-pg/4.12.3_graphql@15.8.0+pg@8.8.0: - resolution: {integrity: sha512-Gnwwxm2NRuyxOx5xchU+Po9a6XagRJpEgoezzHmfBRHwFBY2zprCMYdLvllqRrPJBBWdYAjx7H1NxctBiYiIoQ==} + /graphile-build-pg/4.13.0_graphql@15.8.0+pg@8.8.0: + resolution: {integrity: sha512-1FD+3wjCdK1lbICY1QVO26A7s8efSjR522LarL9Bx1M1iBJHNIpCEW2PK+LkulQjY1l5LGQ1A93GQFqi6cZ6bg==} engines: {node: '>=8.6'} peerDependencies: pg: '>=6.1.0 <9' @@ -2589,12 +2646,12 @@ packages: '@graphile/lru': 4.11.0 chalk: 2.4.2 debug: 4.3.4 - graphile-build: 4.12.3_graphql@15.8.0 - jsonwebtoken: 8.5.1 + graphile-build: 4.13.0_graphql@15.8.0 + jsonwebtoken: 9.0.0 lodash: 4.17.21 lru-cache: 4.1.5 pg: 8.8.0 - pg-sql2: 4.12.3_pg@8.8.0 + pg-sql2: 4.13.0_pg@8.8.0 transitivePeerDependencies: - graphql - supports-color @@ -2620,8 +2677,8 @@ packages: - supports-color dev: true - /graphile-build/4.12.3_graphql@15.8.0: - resolution: {integrity: sha512-xwNNNrieWm78DVkB29epKLBAMEd5U9nXY1tQQn2n5pMisbqYMtIQOnfZzLhwM6AsNEyAfaQYyV0fD6wCkyYQpA==} + /graphile-build/4.13.0_graphql@15.8.0: + resolution: {integrity: sha512-KPBrHgRw5fury6l9WEQH6ys1UtnxrRrG+Ehnr68NvfNELp4T+QsekTSVFi5LWoJOaXvdYMqP2L8MFBRQP2vKsw==} engines: {node: '>=8.6'} peerDependencies: graphql: '>=0.9 <0.14 || ^14.0.2 || ^15.4.0' @@ -2630,27 +2687,7 @@ packages: chalk: 2.4.2 debug: 4.3.4 graphql: 15.8.0 - graphql-parse-resolve-info: 4.12.3_graphql@15.8.0 - iterall: 1.3.0 - lodash: 4.17.21 - lru-cache: 5.1.1 - pluralize: 7.0.0 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /graphile-build/4.12.3_graphql@16.6.0: - resolution: {integrity: sha512-xwNNNrieWm78DVkB29epKLBAMEd5U9nXY1tQQn2n5pMisbqYMtIQOnfZzLhwM6AsNEyAfaQYyV0fD6wCkyYQpA==} - engines: {node: '>=8.6'} - peerDependencies: - graphql: '>=0.9 <0.14 || ^14.0.2 || ^15.4.0' - dependencies: - '@graphile/lru': 4.11.0 - chalk: 2.4.2 - debug: 4.3.4 - graphql: 16.6.0 - graphql-parse-resolve-info: 4.12.3_graphql@16.6.0 + graphql-parse-resolve-info: 4.13.0_graphql@15.8.0 iterall: 1.3.0 lodash: 4.17.21 lru-cache: 5.1.1 @@ -2680,27 +2717,27 @@ packages: - supports-color dev: true - /graphile-utils/4.12.3_3ewg7ajbs66pjsbb3ypkakvjdy: - resolution: {integrity: sha512-Kls1TNZnPAZ3iLphTTagB+xM+EP+ry33o+4s1vEkl0JE1c0B8ztVTfs3fUl04vyQ2q1K24QTwLYrJ4LN8+Xbuw==} + /graphile-utils/4.13.0_63c2xjmapkyolo7vkw3x3gqe7e: + resolution: {integrity: sha512-6nzlCNeJB1qV9AaPyJ/iHU+CDfs8jxpcmQ47Fmrgmp8r5VwKdL/uDt0LW8IuXu2VZrbM1GGyZ8rQtcdVmQYZ+g==} engines: {node: '>=8.6'} peerDependencies: graphile-build: ^4.5.0 graphile-build-pg: ^4.5.0 dependencies: debug: 4.3.4 - graphile-build: 4.12.3_graphql@15.8.0 - graphile-build-pg: 4.12.3_graphql@15.8.0+pg@8.8.0 + graphile-build: 4.13.0_graphql@15.8.0 + graphile-build-pg: 4.13.0_graphql@15.8.0+pg@8.8.0 graphql: 15.8.0 tslib: 2.4.0 transitivePeerDependencies: - supports-color dev: true - /graphql-parse-resolve-info/4.12.3_graphql@15.8.0: - resolution: {integrity: sha512-Lxb+v+SCxzBZHKohK4xje3CBQ1iZ968DiKuFtmwzSaI45oP8FgPJjJv35TOzgv73QLijEdgH4NDZGwIvwJM7Kw==} + /graphql-parse-resolve-info/4.13.0_graphql@15.8.0: + resolution: {integrity: sha512-VVJ1DdHYcR7hwOGQKNH+QTzuNgsLA8l/y436HtP9YHoX6nmwXRWq3xWthU3autMysXdm0fQUbhTZCx0W9ICozw==} engines: {node: '>=8.6'} peerDependencies: - graphql: '>=0.9 <0.14 || ^14.0.2 || ^15.4.0' + graphql: '>=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0' dependencies: debug: 4.3.4 graphql: 15.8.0 @@ -2709,19 +2746,6 @@ packages: - supports-color dev: true - /graphql-parse-resolve-info/4.12.3_graphql@16.6.0: - resolution: {integrity: sha512-Lxb+v+SCxzBZHKohK4xje3CBQ1iZ968DiKuFtmwzSaI45oP8FgPJjJv35TOzgv73QLijEdgH4NDZGwIvwJM7Kw==} - engines: {node: '>=8.6'} - peerDependencies: - graphql: '>=0.9 <0.14 || ^14.0.2 || ^15.4.0' - dependencies: - debug: 4.3.4 - graphql: 16.6.0 - tslib: 2.4.0 - transitivePeerDependencies: - - supports-color - dev: true - /graphql-parse-resolve-info/4.13.0_graphql@16.6.0: resolution: {integrity: sha512-VVJ1DdHYcR7hwOGQKNH+QTzuNgsLA8l/y436HtP9YHoX6nmwXRWq3xWthU3autMysXdm0fQUbhTZCx0W9ICozw==} engines: {node: '>=8.6'} @@ -2943,7 +2967,6 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /ini/1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -2975,6 +2998,10 @@ packages: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true + /is-arrayish/0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: false + /is-bigint/1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -3113,7 +3140,6 @@ packages: /is-stream/2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - dev: true /is-string/1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} @@ -3210,6 +3236,11 @@ packages: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true + /js-yaml/0.3.7: + resolution: {integrity: sha512-/7PsVDNP2tVe2Z1cF9kTEkjamIwz4aooDpRKmN1+g/9eePCgcxsv4QDvEbxO0EH+gdDD7MLyDoR6BASo3hH51g==} + engines: {node: '> 0.4.11'} + dev: false + /js-yaml/3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -3225,6 +3256,12 @@ packages: argparse: 2.0.1 dev: true + /jsmin/1.0.1: + resolution: {integrity: sha512-OPuL5X/bFKgVdMvEIX3hnpx3jbVpFCrEM8pKPXjFkZUqg521r41ijdyTz7vACOhW6o1neVlcLyd+wkbK5fNHRg==} + engines: {node: '>=0.1.93'} + hasBin: true + dev: false + /json-decycle/3.0.0: resolution: {integrity: sha512-biPYneQmoSBHh1zYt5Bw4kKUM51e2biUe1FUq4E4/+RtxDhS53r7bZ1xUs4bdGV4PtWA68TaKqc9PNGkQ4v9sg==} engines: {node: '>= 16.13.2'} @@ -3280,22 +3317,6 @@ packages: engines: {'0': node >= 0.2.0} dev: true - /jsonwebtoken/8.5.1: - resolution: {integrity: sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==} - engines: {node: '>=4', npm: '>=1.4.28'} - dependencies: - jws: 3.2.2 - lodash.includes: 4.3.0 - lodash.isboolean: 3.0.3 - lodash.isinteger: 4.0.4 - lodash.isnumber: 3.0.3 - lodash.isplainobject: 4.0.6 - lodash.isstring: 4.0.1 - lodash.once: 4.1.1 - ms: 2.1.3 - semver: 5.7.1 - dev: true - /jsonwebtoken/9.0.0: resolution: {integrity: sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==} engines: {node: '>=12', npm: '>=6'} @@ -3329,11 +3350,25 @@ packages: safe-buffer: 5.2.1 dev: true + /jxLoader/0.1.1: + resolution: {integrity: sha512-ClEvAj3K68y8uKhub3RgTmcRPo5DfIWvtxqrKQdDPyZ1UVHIIKvVvjrAsJFSVL5wjv0rt5iH9SMCZ0XRKNzeUA==} + engines: {node: '>v0.4.10'} + dependencies: + js-yaml: 0.3.7 + moo-server: 1.3.0 + promised-io: 0.3.6 + walker: 1.0.8 + dev: false + /kind-of/6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} dev: true + /kuler/2.0.0: + resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} + dev: false + /levn/0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -3421,30 +3456,14 @@ packages: resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==} dev: true - /lodash.includes/4.3.0: - resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} - dev: true - - /lodash.isboolean/3.0.3: - resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} - dev: true - /lodash.isfunction/3.0.9: resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} dev: true - /lodash.isinteger/4.0.4: - resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} - dev: true - /lodash.ismatch/4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} dev: true - /lodash.isnumber/3.0.3: - resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} - dev: true - /lodash.isplainobject/4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} dev: true @@ -3465,10 +3484,6 @@ packages: resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} dev: true - /lodash.once/4.1.1: - resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} - dev: true - /lodash.snakecase/4.1.1: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} dev: true @@ -3493,6 +3508,16 @@ packages: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true + /logform/2.4.2: + resolution: {integrity: sha512-W4c9himeAwXEdZ05dQNerhFz2XG80P9Oj0loPUMV23VC2it0orMHQhJm4hdnnor3rd1HsGf6a2lPwBM1zeXHGw==} + dependencies: + '@colors/colors': 1.5.0 + fecha: 4.2.3 + ms: 2.1.3 + safe-stable-stringify: 2.4.2 + triple-beam: 1.3.0 + dev: false + /loose-envify/1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -3531,6 +3556,12 @@ packages: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true + /makeerror/1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + dependencies: + tmpl: 1.0.5 + dev: false + /map-age-cleaner/0.1.3: resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} engines: {node: '>=6'} @@ -3584,7 +3615,7 @@ packages: dev: true /media-typer/0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} engines: {node: '>= 0.6'} dev: true @@ -3691,6 +3722,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /moo-server/1.3.0: + resolution: {integrity: sha512-9A8/eor2DXwpv1+a4pZAAydqLFVrWoKoO1fzdzqLUhYVXAO1Kgd1FR2gFZi7YdHzF0s4W8cDNwCfKJQrvLqxDw==} + engines: {node: '>v0.4.10'} + dev: false + /ms/2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true @@ -3701,17 +3737,12 @@ packages: /ms/2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true /nan/2.16.0: resolution: {integrity: sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==} dev: true optional: true - /nanographql/2.0.0: - resolution: {integrity: sha512-Ze4qVPPG9yGmPzaM0LTKGGEkYQ9BQvvKwOkrrw4iqHVTByuVE02l50XZV+bCfABHLLs+Fm2+vJ+H9eXxFKtavQ==} - dev: true - /natural-compare-lite/1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true @@ -3935,6 +3966,12 @@ packages: wrappy: 1.0.2 dev: true + /one-time/1.0.0: + resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} + dependencies: + fn.name: 1.1.0 + dev: false + /onetime/5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -4187,21 +4224,6 @@ packages: resolution: {integrity: sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==} dev: true - /pg-sql2/4.12.3_pg@8.8.0: - resolution: {integrity: sha512-xPVNoN7O5fT9ssq+j/IRbq0OOtD7Sagz0Xbzb5Z6M3T5cU1pi43QdBv6nvZ7wIuvi/iSq2/02wYridSp7B69EQ==} - engines: {node: '>=8.6'} - peerDependencies: - pg: '>=6.1.0 <9' - dependencies: - '@graphile/lru': 4.11.0 - '@types/pg': 8.6.6 - debug: 4.3.4 - pg: 8.8.0 - tslib: 2.4.0 - transitivePeerDependencies: - - supports-color - dev: true - /pg-sql2/4.13.0_pg@8.8.0: resolution: {integrity: sha512-9sUlAR+FCuOPezS+2cQCSRUEmnyYrT929DiceZIsINk4R54hCGSh1OTWIP4gbAZeUMTYeEXnwTfnnEOupLYTRQ==} engines: {node: '>=8.6'} @@ -4303,15 +4325,15 @@ packages: engines: {node: '>=4'} dev: true - /postgraphile-core/4.12.3_graphql@15.8.0+pg@8.8.0: - resolution: {integrity: sha512-rr/UCIWQ0o0qXwynTPZbMhEzexdSUtcgmnktfAhr4V8StlexKIaYzg8oiW2ihI/DVWS9NkzD+eNF2EpcyqXAPA==} + /postgraphile-core/4.13.0_graphql@15.8.0+pg@8.8.0: + resolution: {integrity: sha512-8O7xVKZ20K1dTw4KO0jNAfZPNrxNsGG2VrG3Q0IO70ki/OswE6kz/WBZnWFeGxX0sHSEOGWQa4NSrj9EYsSNuw==} engines: {node: '>=8.6'} peerDependencies: graphql: '>=0.9 <0.14 || ^14.0.2 || ^15.4.0' pg: '>=6.1.0 <9' dependencies: - graphile-build: 4.12.3_graphql@15.8.0 - graphile-build-pg: 4.12.3_graphql@15.8.0+pg@8.8.0 + graphile-build: 4.13.0_graphql@15.8.0 + graphile-build-pg: 4.13.0_graphql@15.8.0+pg@8.8.0 graphql: 15.8.0 pg: 8.8.0 tslib: 2.4.0 @@ -4335,14 +4357,14 @@ packages: - supports-color dev: true - /postgraphile/4.12.12: - resolution: {integrity: sha512-bHXmr7hvA82TaU0gfO/W/5hYdAsRsQMf3QtmIdPRb51LxYanlYwzJm/c0Ca8/amzt9jTKk62q/lv0TqYoCr7Bg==} + /postgraphile/4.13.0: + resolution: {integrity: sha512-p2VqUnsECd1XrucylK1iosvKEn96J8CWeMVWzxF7b6G21jmaETvFe2CO2q4+dKY5DFCVEF2O9pEfmUfYCKl5+A==} engines: {node: '>=8.6'} hasBin: true dependencies: '@graphile/lru': 4.11.0 '@types/json5': 0.0.30 - '@types/jsonwebtoken': 8.5.8 + '@types/jsonwebtoken': 9.0.1 '@types/pg': 8.6.6 '@types/ws': 7.4.7 body-parser: 1.20.0 @@ -4350,20 +4372,20 @@ packages: commander: 2.20.3 debug: 4.3.4 finalhandler: 1.2.0 - graphile-build: 4.12.3_graphql@15.8.0 - graphile-build-pg: 4.12.3_graphql@15.8.0+pg@8.8.0 - graphile-utils: 4.12.3_3ewg7ajbs66pjsbb3ypkakvjdy + graphile-build: 4.13.0_graphql@15.8.0 + graphile-build-pg: 4.13.0_graphql@15.8.0+pg@8.8.0 + graphile-utils: 4.13.0_63c2xjmapkyolo7vkw3x3gqe7e graphql: 15.8.0 graphql-ws: 5.9.0_graphql@15.8.0 http-errors: 1.8.1 iterall: 1.3.0 json5: 2.2.1 - jsonwebtoken: 8.5.1 + jsonwebtoken: 9.0.0 parseurl: 1.3.3 pg: 8.8.0 pg-connection-string: 2.5.0 - pg-sql2: 4.12.3_pg@8.8.0 - postgraphile-core: 4.12.3_graphql@15.8.0+pg@8.8.0 + pg-sql2: 4.13.0_pg@8.8.0 + postgraphile-core: 4.13.0_graphql@15.8.0+pg@8.8.0 subscriptions-transport-ws: 0.9.19_graphql@15.8.0 tslib: 2.4.0 ws: 7.5.8 @@ -4435,6 +4457,10 @@ packages: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true + /promised-io/0.3.6: + resolution: {integrity: sha512-bNwZusuNIW4m0SPR8jooSyndD35ggirHlxVl/UhIaZD/F0OBv9ebfc6tNmbpZts3QXHggkjIBH8lvtnzhtcz0A==} + dev: false + /prop-types/15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -4542,7 +4568,6 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true /readdirp/3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -4665,7 +4690,11 @@ packages: /safe-buffer/5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true + + /safe-stable-stringify/2.4.2: + resolution: {integrity: sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==} + engines: {node: '>=10'} + dev: false /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -4791,6 +4820,12 @@ packages: pkg-conf: 2.1.0 dev: true + /simple-swizzle/0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 + dev: false + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -4883,6 +4918,10 @@ packages: nan: 2.16.0 dev: true + /stack-trace/0.0.10: + resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} + dev: false + /stack-utils/2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -4994,7 +5033,6 @@ packages: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: true /strip-ansi/6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -5151,6 +5189,10 @@ packages: engines: {node: '>=0.10'} dev: true + /text-hex/1.0.0: + resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} + dev: false + /text-table/0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -5177,6 +5219,15 @@ packages: engines: {node: '>=4'} dev: true + /timespan/2.3.0: + resolution: {integrity: sha512-0Jq9+58T2wbOyLth0EU+AUb6JMGCLaTWIykJFa7hyAybjVH9gpVMTfUAwo5fWAvtFt2Tjh/Elg8JtgNpnMnM8g==} + engines: {node: '>= 0.2.0'} + dev: false + + /tmpl/1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + dev: false + /to-regex-range/5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -5202,6 +5253,10 @@ packages: engines: {node: '>=8'} dev: true + /triple-beam/1.3.0: + resolution: {integrity: sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==} + dev: false + /ts-node/10.9.1_awa2wsr5thmg3i7jqycphctjfq: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -5325,6 +5380,11 @@ packages: hasBin: true dev: true + /uglify-js/1.3.5: + resolution: {integrity: sha512-YPX1DjKtom8l9XslmPFQnqWzTBkvI4N0pbkzLuPZZ4QTyig0uQqvZz9NgUdfEV+qccJzi7fVcGWdESvRIjWptQ==} + hasBin: true + dev: false + /uglify-js/3.16.0: resolution: {integrity: sha512-FEikl6bR30n0T3amyBh3LoiBdqHRy/f4H80+My34HOesOKyHfOsxAPAxOoqC0JUnC1amnO0IwkYC3sko51caSw==} engines: {node: '>=0.8.0'} @@ -5374,8 +5434,7 @@ packages: dev: true /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} - dev: true + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -5397,6 +5456,12 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /walker/1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + dependencies: + makeerror: 1.0.12 + dev: false + /webidl-conversions/3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true @@ -5431,6 +5496,32 @@ packages: isexe: 2.0.0 dev: true + /winston-transport/4.5.0: + resolution: {integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==} + engines: {node: '>= 6.4.0'} + dependencies: + logform: 2.4.2 + readable-stream: 3.6.0 + triple-beam: 1.3.0 + dev: false + + /winston/3.8.2: + resolution: {integrity: sha512-MsE1gRx1m5jdTTO9Ld/vND4krP2To+lgDoMEHGGa4HIlAUyXJtfc7CxQcGXVyz2IBpw5hbFkj2b/AtUdQwyRew==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.5.0 + '@dabh/diagnostics': 2.0.3 + async: 3.2.4 + is-stream: 2.0.1 + logform: 2.4.2 + one-time: 1.0.0 + readable-stream: 3.6.0 + safe-stable-stringify: 2.4.2 + stack-trace: 0.0.10 + triple-beam: 1.3.0 + winston-transport: 4.5.0 + dev: false + /word-wrap/1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} @@ -5453,6 +5544,12 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /wrench/1.3.9: + resolution: {integrity: sha512-srTJQmLTP5YtW+F5zDuqjMEZqLLr/eJOZfDI5ibfPfRMeDh3oBUefAscuH0q5wBKE339ptH/S/0D18ZkfOfmKQ==} + engines: {node: '>=0.1.97'} + deprecated: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years. + dev: false + /write-file-atomic/5.0.0: resolution: {integrity: sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} diff --git a/src/__tests__/fixture/freeport.ts b/src/__tests__/fixture/freeport.ts index 1fd8b6f7..2ff5586b 100644 --- a/src/__tests__/fixture/freeport.ts +++ b/src/__tests__/fixture/freeport.ts @@ -1,4 +1,24 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ import { promisify } from "util"; -const freeportCb = require("freeport"); -export const freeport = promisify(freeportCb); +import net from "net"; + +export const freeport = promisify( + (cb: (error: Error | null, port: number) => void) => { + const server = net.createServer(); + let port = 0; + server.on("listening", function () { + const addr = server.address(); + if (typeof addr === "string" || addr === null) { + throw new Error("invalid"); + } + port = addr.port; + server.close(); + }); + server.on("close", function () { + cb(null, port); + }); + server.on("error", function (err) { + cb(err, -1); + }); + server.listen(0, "127.0.0.1"); + } +); diff --git a/src/__tests__/fixture/nanographql.ts b/src/__tests__/fixture/nanographql.ts new file mode 100644 index 00000000..d3bcc82a --- /dev/null +++ b/src/__tests__/fixture/nanographql.ts @@ -0,0 +1,18 @@ +const getOpname = /(query|mutation) ?([\w\d-_]+)? ?\(.*?\)? \{/; + +export function nanographql(str: string) { + const query = Array.isArray(str) ? str.join("") : str; + const name = getOpname.exec(query); + return function (variables?: any) { + const data = { + query, + variables: JSON.stringify(variables), + operationName: undefined as string | undefined, + }; + if (name && name.length) { + const operationName = name[2]; + if (operationName) data.operationName = name[2]; + } + return JSON.stringify(data); + }; +} diff --git a/src/__tests__/main.test.ts b/src/__tests__/main.test.ts index 54ddb87b..131c65e7 100644 --- a/src/__tests__/main.test.ts +++ b/src/__tests__/main.test.ts @@ -1,12 +1,12 @@ -import { container, DbContext } from "./fixture/db"; import { createPool } from "./fixture/client"; +import { container, DbContext } from "./fixture/db"; import { createServer, Server } from "http"; import { freeport } from "./fixture/freeport"; import { PgMutationUpsertPlugin } from "../postgraphile-upsert"; import { Pool } from "pg"; import { postgraphile } from "postgraphile"; import ava, { TestFn, ExecutionContext } from "ava"; -import nanographql = require("nanographql"); +import { nanographql } from "./fixture/nanographql"; import pRetry from "p-retry"; import fetch from "node-fetch"; @@ -103,7 +103,7 @@ const execGqlOp = (t: PluginExecutionContext, query: () => string) => const text = await res.text(); throw new Error(`op failed: ${res.statusText}\n\n${text}`); } - const json = await res.json(); + const json = (await res.json()) as { errors: any; data: any }; if (json.errors) throw new Error(JSON.stringify(json.errors)); return json; }); @@ -122,24 +122,24 @@ const fetchType = async (t: PluginExecutionContext, name: string) => { }; const fetchMutationTypes = async (t: PluginExecutionContext) => { - const query = nanographql` + const query = nanographql(` query { __type(name: "Mutation") { name fields { name - args { + args { name } } } } - `; + `); return execGqlOp(t, query); }; const fetchAllBikes = async (t: PluginExecutionContext) => { - const query = nanographql` + const query = nanographql(` query { allBikes { edges { @@ -151,12 +151,12 @@ const fetchAllBikes = async (t: PluginExecutionContext) => { } } } - `; + `); return execGqlOp(t, query); }; const fetchAllRoles = async (t: PluginExecutionContext) => { - const query = nanographql` + const query = nanographql(` query { allRoles(orderBy: RANK_ASC) { edges { @@ -169,12 +169,12 @@ const fetchAllRoles = async (t: PluginExecutionContext) => { } } } - }`; + }`); return execGqlOp(t, query); }; const fetchAllCars = async (t: PluginExecutionContext) => { - const query = nanographql` + const query = nanographql(` query { allCars { edges { @@ -186,7 +186,7 @@ const fetchAllCars = async (t: PluginExecutionContext) => { } } } - }`; + }`); return execGqlOp(t, query); }; diff --git a/src/postgraphile-upsert.ts b/src/postgraphile-upsert.ts index 3330687d..db5007d3 100644 --- a/src/postgraphile-upsert.ts +++ b/src/postgraphile-upsert.ts @@ -57,6 +57,7 @@ export const PgMutationUpsertPlugin: Plugin = (builder) => { return extend(fields, upsertFieldsByName); }); }; +PgMutationUpsertPlugin.displayName = "upsert"; const hasOwnProperty = (x: unknown, key: string) => Object.prototype.hasOwnProperty.call(x, key);