From 3a886fddc49aecd5b4c2c6aa51938264aafe2c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Fri, 22 Sep 2023 17:58:58 -0300 Subject: [PATCH 01/20] feat: change configs to deploy graphql --- docker/Makefile | 4 +++- package.json | 5 +++-- packages/graphql/.env.example | 1 + packages/graphql/package.json | 6 ++++-- packages/graphql/src/bin.ts | 9 +++++++++ packages/graphql/src/index.ts | 10 +++++----- packages/graphql/src/utils/index.ts | 1 + packages/graphql/src/utils/requireEnv.ts | 12 ++++++++++++ packages/graphql/tsup.config.ts | 1 + pnpm-lock.yaml | 13 ++++++++----- 10 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 packages/graphql/.env.example create mode 100644 packages/graphql/src/bin.ts create mode 100644 packages/graphql/src/utils/requireEnv.ts diff --git a/docker/Makefile b/docker/Makefile index 71c106b39..9dcf3c0c5 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,6 +1,8 @@ start: # sh ./scripts/start.sh - docker compose start + # docker compose up + echo "Docker env is temporary disabled on this project"; + echo "Run pnpm dev for development"; down: docker compose down diff --git a/package.json b/package.json index 24a9df1f7..2be5fcc1b 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,10 @@ "clean:indexer": "pnpm --filter=indexer clean", "deploy:indexer": "pnpm --filter=indexer run deploy", "deps:update": "updates -gu && pnpm -r exec updates -gu", + "dev": "pnpm turbo:run dev --filter=!indexer", "dev:app": "pnpm --filter=app dev", - "dev:graphql": "run-s node:start && pnpm --filter=graphql dev", - "dev:indexer": "pnpm --filter=indexer dev", + "dev:graphql": "pnpm --filter=graphql dev", + "dev:indexer": "pnpm --filter=indexer dev:indexer", "lint": "run-s lint:check prettier:check", "lint:check": "pnpm turbo:run lint", "node:clean": "make -C ./docker clean", diff --git a/packages/graphql/.env.example b/packages/graphql/.env.example new file mode 100644 index 000000000..a9438ce5e --- /dev/null +++ b/packages/graphql/.env.example @@ -0,0 +1 @@ +FUEL_PROVIDER_URL=http://beta-4.fuel.network/graphql \ No newline at end of file diff --git a/packages/graphql/package.json b/packages/graphql/package.json index ce060d0da..6b53375d8 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -10,10 +10,11 @@ "types": "./dist/index.d.ts", "typings": "./dist/index.d.ts", "scripts": { - "dev": "ts-node-dev -r tsconfig-paths/register --transpile-only --watch ./src/**/*, src/index.ts", + "dev": "ts-node-dev -r tsconfig-paths/register --transpile-only --watch ./src/**/*, src/bin.ts", + "start": "ts-node -r tsconfig-paths/register --transpile-only src/bin.ts", "lint": "eslint .", "codegen": "gql-gen --config codegen.yml", - "build": "pnpm codegen && tsup --dts", + "build": "pnpm codegen && tsup", "prepare": "pnpm build" }, "dependencies": { @@ -23,6 +24,7 @@ "@graphql-tools/stitch": "^9.0.1", "@graphql-tools/url-loader": "^8.0.0", "cors": "^2.8.5", + "dotenv": "16.3.1", "express": "^4.18.2", "graphql": "^16.8.0", "graphql-http": "^1.22.0", diff --git a/packages/graphql/src/bin.ts b/packages/graphql/src/bin.ts new file mode 100644 index 000000000..17019a3c6 --- /dev/null +++ b/packages/graphql/src/bin.ts @@ -0,0 +1,9 @@ +import dotenv from 'dotenv'; +dotenv.config(); + +import app from './'; + +// Start the server: +app.listen(4444, () => + console.log('🚀 Explorer api running at http://localhost:4444/graphql'), +); diff --git a/packages/graphql/src/index.ts b/packages/graphql/src/index.ts index 06e0d65b7..fb0d7bb46 100644 --- a/packages/graphql/src/index.ts +++ b/packages/graphql/src/index.ts @@ -2,6 +2,9 @@ import cors from 'cors'; import express from 'express'; import expressPlayground from 'graphql-playground-middleware-express'; import { startGraphql } from '~/startGraphql'; +import { requireEnv } from '~/utils'; + +const { FUEL_PROVIDER_URL } = requireEnv(['FUEL_PROVIDER_URL']); // Create a server: const app = express(); @@ -20,9 +23,6 @@ app.get( ); // Start graphql server -startGraphql('http://localhost:4000/graphql', app); +startGraphql(FUEL_PROVIDER_URL, app); -// Start the server: -app.listen(4444, () => - console.log('🚀 Explorer api running at http://localhost:4444/graphql'), -); +export default app; diff --git a/packages/graphql/src/utils/index.ts b/packages/graphql/src/utils/index.ts index c6e5b706f..b9f06894f 100644 --- a/packages/graphql/src/utils/index.ts +++ b/packages/graphql/src/utils/index.ts @@ -1,2 +1,3 @@ export * from './graphqlFetch'; export * from './getFieldsValues'; +export * from './requireEnv'; diff --git a/packages/graphql/src/utils/requireEnv.ts b/packages/graphql/src/utils/requireEnv.ts new file mode 100644 index 000000000..0be150313 --- /dev/null +++ b/packages/graphql/src/utils/requireEnv.ts @@ -0,0 +1,12 @@ +export function requireEnv< + A extends string[], + B extends { [key in A[number]]: string }, +>(keys: string[]): B { + return keys.reduce((ret, key) => { + if (!process.env[key]) { + throw new Error(`Environment variable ${key} is required`); + } + ret[key] = process.env[key]!; + return ret; + }, {} as B); +} diff --git a/packages/graphql/tsup.config.ts b/packages/graphql/tsup.config.ts index 979e99193..2b682dbed 100644 --- a/packages/graphql/tsup.config.ts +++ b/packages/graphql/tsup.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'tsup'; export default defineConfig(() => ({ + dts: true, entry: { index: 'src/generated/graphql.ts' }, minify: process.env.NODE_ENV === 'production' ? 'terser' : false, })); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9dfc353f..5ad225c8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -226,6 +226,9 @@ importers: cors: specifier: ^2.8.5 version: 2.8.5 + dotenv: + specifier: 16.3.1 + version: 16.3.1 express: specifier: ^4.18.2 version: 4.18.2 @@ -2663,7 +2666,7 @@ packages: '@fuels/vm-asm': 0.36.1 portfinder: 1.0.32 tree-kill: 1.2.2 - uuid: 9.0.0 + uuid: 9.0.1 transitivePeerDependencies: - encoding - supports-color @@ -6667,7 +6670,7 @@ packages: react-inspector: 6.0.2(react@18.2.0) telejson: 7.2.0 ts-dedent: 2.2.0 - uuid: 9.0.0 + uuid: 9.0.1 transitivePeerDependencies: - '@types/react' - '@types/react-dom' @@ -18309,8 +18312,8 @@ packages: hasBin: true dev: true - /uuid@9.0.0: - resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} + /uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true /v8-compile-cache-lib@3.0.1: @@ -18381,7 +18384,7 @@ packages: sass: '*' stylus: '*' sugarss: '*' - terser: '>=5.14.2' + terser: ^5.4.0 peerDependenciesMeta: '@types/node': optional: true From 0d198bdd392e6f68ae0be47df8cf726cfad67fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Fri, 22 Sep 2023 18:01:52 -0300 Subject: [PATCH 02/20] chore: ignore graphql.schema.json --- .prettierignore | 1 + packages/graphql/graphql.schema.json | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.prettierignore b/.prettierignore index 07588eedd..3bd4b9404 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,3 +9,4 @@ node_modules pnpm-lock.yaml storybook-static .next +graphql.schema.json \ No newline at end of file diff --git a/packages/graphql/graphql.schema.json b/packages/graphql/graphql.schema.json index 764443b15..2a5fc92d5 100644 --- a/packages/graphql/graphql.schema.json +++ b/packages/graphql/graphql.schema.json @@ -6618,7 +6618,11 @@ "name": "include", "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", "isRepeatable": false, - "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], "args": [ { "name": "if", @@ -6642,7 +6646,11 @@ "name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", "isRepeatable": false, - "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], "args": [ { "name": "if", @@ -6666,7 +6674,9 @@ "name": "specifiedBy", "description": "Exposes a URL that specifies the behavior of this scalar.", "isRepeatable": false, - "locations": ["SCALAR"], + "locations": [ + "SCALAR" + ], "args": [ { "name": "url", @@ -6688,4 +6698,4 @@ } ] } -} +} \ No newline at end of file From 0cc414a64e6c9915352d11c9671594df5a0efac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Fri, 22 Sep 2023 18:22:39 -0300 Subject: [PATCH 03/20] fix: graphql vunerability --- package.json | 1 + pnpm-lock.yaml | 441 +++++++++++++++++++++++++------------------------ 2 files changed, 222 insertions(+), 220 deletions(-) diff --git a/package.json b/package.json index 2be5fcc1b..52c402491 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "overrides": { "glob-parent@<5.1.2": ">=5.1.2", "trim@<0.0.3": ">=0.0.3", + "graphql": ">=16.8.1", "trim-newlines@<3.0.1": ">=3.0.1", "terser@>=5.0.0 <5.14.2": ">=5.14.2", "terser@<4.8.1": ">=4.8.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ad225c8b..16a8e0095 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ settings: overrides: glob-parent@<5.1.2: '>=5.1.2' trim@<0.0.3: '>=0.0.3' + graphql: '>=16.8.1' trim-newlines@<3.0.1: '>=3.0.1' terser@>=5.0.0 <5.14.2: '>=5.14.2' terser@<4.8.1: '>=4.8.1' @@ -210,19 +211,19 @@ importers: dependencies: '@graphql-tools/delegate': specifier: ^10.0.3 - version: 10.0.3(graphql@16.8.0) + version: 10.0.3(graphql@16.8.1) '@graphql-tools/load': specifier: ^8.0.0 - version: 8.0.0(graphql@16.8.0) + version: 8.0.0(graphql@16.8.1) '@graphql-tools/schema': specifier: ^10.0.0 - version: 10.0.0(graphql@16.8.0) + version: 10.0.0(graphql@16.8.1) '@graphql-tools/stitch': specifier: ^9.0.1 - version: 9.0.1(graphql@16.8.0) + version: 9.0.1(graphql@16.8.1) '@graphql-tools/url-loader': specifier: ^8.0.0 - version: 8.0.0(@types/node@20.6.0)(graphql@16.8.0) + version: 8.0.0(@types/node@20.6.0)(graphql@16.8.1) cors: specifier: ^2.8.5 version: 2.8.5 @@ -233,11 +234,11 @@ importers: specifier: ^4.18.2 version: 4.18.2 graphql: - specifier: ^16.8.0 - version: 16.8.0 + specifier: '>=16.8.1' + version: 16.8.1 graphql-http: specifier: ^1.22.0 - version: 1.22.0(graphql@16.8.0) + version: 1.22.0(graphql@16.8.1) graphql-playground-middleware-express: specifier: ^1.7.23 version: 1.7.23(express@4.18.2) @@ -250,19 +251,19 @@ importers: version: 0.0.9(typescript@5.2.2) '@graphql-codegen/cli': specifier: 5.0.0 - version: 5.0.0(@types/node@20.6.0)(graphql@16.8.0) + version: 5.0.0(@types/node@20.6.0)(graphql@16.8.1) '@graphql-codegen/introspection': specifier: 4.0.0 - version: 4.0.0(graphql@16.8.0) + version: 4.0.0(graphql@16.8.1) '@graphql-codegen/typescript': specifier: 4.0.1 - version: 4.0.1(graphql@16.8.0) + version: 4.0.1(graphql@16.8.1) '@graphql-codegen/typescript-operations': specifier: 4.0.1 - version: 4.0.1(graphql@16.8.0) + version: 4.0.1(graphql@16.8.1) '@graphql-tools/utils': specifier: ^10.0.6 - version: 10.0.6(graphql@16.8.0) + version: 10.0.6(graphql@16.8.1) '@types/cors': specifier: ^2.8.14 version: 2.8.14 @@ -274,7 +275,7 @@ importers: version: 20.6.0 graphql-codegen-typescript-common: specifier: 0.18.2 - version: 0.18.2(graphql@16.8.0) + version: 0.18.2(graphql@16.8.1) ts-node: specifier: ^10.9.1 version: 10.9.1(@swc/core@1.3.84)(@types/node@20.6.0)(typescript@5.2.2) @@ -307,7 +308,7 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 - /@ardatan/relay-compiler@12.0.0(graphql@16.8.0): + /@ardatan/relay-compiler@12.0.0(graphql@16.8.1): resolution: {integrity: sha512-9anThAaj1dQr6IGmzBMcfzOQKTa5artjuPmw8NYK/fiGEMjADbSguBY2FMDykt+QhilR3wc9VA/3yVju7JHg7Q==} hasBin: true peerDependencies: @@ -324,7 +325,7 @@ packages: fb-watchman: 2.0.2 fbjs: 3.0.5 glob: 7.2.3 - graphql: 16.8.0 + graphql: 16.8.1 immutable: 3.7.6 invariant: 2.2.4 nullthrows: 1.1.1 @@ -2560,9 +2561,9 @@ packages: '@fuel-ts/interfaces': 0.57.0 '@fuel-ts/math': 0.57.0 '@fuel-ts/transactions': 0.57.0 - graphql: 16.8.0 - graphql-request: 5.2.0(graphql@16.8.0) - graphql-tag: 2.12.6(graphql@16.8.0) + graphql: 16.8.1 + graphql-request: 5.2.0(graphql@16.8.1) + graphql-tag: 2.12.6(graphql@16.8.1) ramda: 0.29.0 tai64: 1.0.0 transitivePeerDependencies: @@ -2845,7 +2846,7 @@ packages: resolution: {integrity: sha512-MXtNDk0WXONIrDJOlk07+X7GegpCz2hfbAgSIWycOD0th2z1GndvMqBryiw/pTVDHLnHe+5TGIODLsprI4RiEw==} dev: false - /@graphql-codegen/cli@5.0.0(@types/node@20.6.0)(graphql@16.8.0): + /@graphql-codegen/cli@5.0.0(@types/node@20.6.0)(graphql@16.8.1): resolution: {integrity: sha512-A7J7+be/a6e+/ul2KI5sfJlpoqeqwX8EzktaKCeduyVKgOLA6W5t+NUGf6QumBDXU8PEOqXk3o3F+RAwCWOiqA==} hasBin: true peerDependencies: @@ -2858,25 +2859,25 @@ packages: '@babel/generator': 7.22.15 '@babel/template': 7.22.15 '@babel/types': 7.22.17 - '@graphql-codegen/core': 4.0.0(graphql@16.8.0) - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-tools/apollo-engine-loader': 8.0.0(graphql@16.8.0) - '@graphql-tools/code-file-loader': 8.0.2(graphql@16.8.0) - '@graphql-tools/git-loader': 8.0.2(graphql@16.8.0) - '@graphql-tools/github-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.0) - '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.0) - '@graphql-tools/load': 8.0.0(graphql@16.8.0) - '@graphql-tools/prisma-loader': 8.0.1(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/url-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-codegen/core': 4.0.0(graphql@16.8.1) + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/apollo-engine-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/code-file-loader': 8.0.2(graphql@16.8.1) + '@graphql-tools/git-loader': 8.0.2(graphql@16.8.1) + '@graphql-tools/github-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/load': 8.0.0(graphql@16.8.1) + '@graphql-tools/prisma-loader': 8.0.1(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@whatwg-node/fetch': 0.8.8 chalk: 4.1.2 cosmiconfig: 8.2.0 debounce: 1.2.1 detect-indent: 6.1.0 - graphql: 16.8.0 - graphql-config: 5.0.2(@types/node@20.6.0)(graphql@16.8.0) + graphql: 16.8.1 + graphql-config: 5.0.2(@types/node@20.6.0)(graphql@16.8.1) inquirer: 8.2.6 is-glob: 4.0.3 jiti: 1.19.3 @@ -2900,103 +2901,103 @@ packages: - utf-8-validate dev: true - /@graphql-codegen/core@4.0.0(graphql@16.8.0): + /@graphql-codegen/core@4.0.0(graphql@16.8.1): resolution: {integrity: sha512-JAGRn49lEtSsZVxeIlFVIRxts2lWObR+OQo7V2LHDJ7ohYYw3ilv7nJ8pf8P4GTg/w6ptcYdSdVVdkI8kUHB/Q==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-tools/schema': 10.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/schema': 10.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.5.3 dev: true - /@graphql-codegen/introspection@4.0.0(graphql@16.8.0): + /@graphql-codegen/introspection@4.0.0(graphql@16.8.1): resolution: {integrity: sha512-t9g3AkK99dfHblMWtG4ynUM9+A7JrWq5110zSpNV2wlSnv0+bRKagDW8gozwgXfR5i1IIG8QDjJZ6VgXQVqCZw==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.5.3 transitivePeerDependencies: - encoding - supports-color dev: true - /@graphql-codegen/plugin-helpers@5.0.1(graphql@16.8.0): + /@graphql-codegen/plugin-helpers@5.0.1(graphql@16.8.1): resolution: {integrity: sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) change-case-all: 1.0.15 common-tags: 1.8.2 - graphql: 16.8.0 + graphql: 16.8.1 import-from: 4.0.0 lodash: 4.17.21 tslib: 2.5.3 dev: true - /@graphql-codegen/schema-ast@4.0.0(graphql@16.8.0): + /@graphql-codegen/schema-ast@4.0.0(graphql@16.8.1): resolution: {integrity: sha512-WIzkJFa9Gz28FITAPILbt+7A8+yzOyd1NxgwFh7ie+EmO9a5zQK6UQ3U/BviirguXCYnn+AR4dXsoDrSrtRA1g==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.5.3 dev: true - /@graphql-codegen/typescript-operations@4.0.1(graphql@16.8.0): + /@graphql-codegen/typescript-operations@4.0.1(graphql@16.8.1): resolution: {integrity: sha512-GpUWWdBVUec/Zqo23aFLBMrXYxN2irypHqDcKjN78JclDPdreasAEPcIpMfqf4MClvpmvDLy4ql+djVAwmkjbw==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-codegen/typescript': 4.0.1(graphql@16.8.0) - '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.0) + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/typescript': 4.0.1(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) auto-bind: 4.0.0 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.5.3 transitivePeerDependencies: - encoding - supports-color dev: true - /@graphql-codegen/typescript@4.0.1(graphql@16.8.0): + /@graphql-codegen/typescript@4.0.1(graphql@16.8.1): resolution: {integrity: sha512-3YziQ21dCVdnHb+Us1uDb3pA6eG5Chjv0uTK+bt9dXeMlwYBU8MbtzvQTo4qvzWVC1AxSOKj0rgfNu1xCXqJyA==} peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-codegen/schema-ast': 4.0.0(graphql@16.8.0) - '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.0) + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/schema-ast': 4.0.0(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) auto-bind: 4.0.0 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.5.3 transitivePeerDependencies: - encoding - supports-color dev: true - /@graphql-codegen/visitor-plugin-common@4.0.1(graphql@16.8.0): + /@graphql-codegen/visitor-plugin-common@4.0.1(graphql@16.8.1): resolution: {integrity: sha512-Bi/1z0nHg4QMsAqAJhds+ForyLtk7A3HQOlkrZNm3xEkY7lcBzPtiOTLBtvziwopBsXUxqeSwVjOOFPLS5Yw1Q==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0) - '@graphql-tools/optimize': 2.0.0(graphql@16.8.0) - '@graphql-tools/relay-operation-optimizer': 7.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/optimize': 2.0.0(graphql@16.8.1) + '@graphql-tools/relay-operation-optimizer': 7.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) auto-bind: 4.0.0 change-case-all: 1.0.15 dependency-graph: 0.11.0 - graphql: 16.8.0 - graphql-tag: 2.12.6(graphql@16.8.0) + graphql: 16.8.1 + graphql-tag: 2.12.6(graphql@16.8.1) parse-filepath: 1.0.2 tslib: 2.5.3 transitivePeerDependencies: @@ -3004,87 +3005,87 @@ packages: - supports-color dev: true - /@graphql-tools/apollo-engine-loader@8.0.0(graphql@16.8.0): + /@graphql-tools/apollo-engine-loader@8.0.0(graphql@16.8.1): resolution: {integrity: sha512-axQTbN5+Yxs1rJ6cWQBOfw3AEeC+fvIuZSfJLPLLvFJLj4pUm9fhxey/g6oQZAAQJqKPfw+tLDUQvnfvRK8Kmg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@whatwg-node/fetch': 0.9.9 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 transitivePeerDependencies: - encoding dev: true - /@graphql-tools/batch-delegate@9.0.0(graphql@16.8.0): + /@graphql-tools/batch-delegate@9.0.0(graphql@16.8.1): resolution: {integrity: sha512-23NmxcHQeKcfhMQyrRPTZfW4/+bSpAyR/qAhRjx+/hikDIa1Uv2XVgV9jIitSgM0OEk/KGPB4VQv+LCOWvAYiw==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/delegate': 10.0.3(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) dataloader: 2.2.2 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 dev: false - /@graphql-tools/batch-execute@9.0.2(graphql@16.8.0): + /@graphql-tools/batch-execute@9.0.2(graphql@16.8.1): resolution: {integrity: sha512-Y2uwdZI6ZnatopD/SYfZ1eGuQFI7OU2KGZ2/B/7G9ISmgMl5K+ZZWz/PfIEXeiHirIDhyk54s4uka5rj2xwKqQ==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) dataloader: 2.2.2 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 - /@graphql-tools/code-file-loader@8.0.2(graphql@16.8.0): + /@graphql-tools/code-file-loader@8.0.2(graphql@16.8.1): resolution: {integrity: sha512-AKNpkElUL2cWocYpC4DzNEpo6qJw8Lp+L3bKQ/mIfmbsQxgLz5uve6zHBMhDaFPdlwfIox41N3iUSvi77t9e8A==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) globby: 11.1.0 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 unixify: 1.0.0 transitivePeerDependencies: - supports-color dev: true - /@graphql-tools/delegate@10.0.3(graphql@16.8.0): + /@graphql-tools/delegate@10.0.3(graphql@16.8.1): resolution: {integrity: sha512-Jor9oazZ07zuWkykD3OOhT/2XD74Zm6Ar0ENZMk75MDD51wB2UWUIMljtHxbJhV5A6UBC2v8x6iY0xdCGiIlyw==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/batch-execute': 9.0.2(graphql@16.8.0) - '@graphql-tools/executor': 1.2.0(graphql@16.8.0) - '@graphql-tools/schema': 10.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/batch-execute': 9.0.2(graphql@16.8.1) + '@graphql-tools/executor': 1.2.0(graphql@16.8.1) + '@graphql-tools/schema': 10.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) dataloader: 2.2.2 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 - /@graphql-tools/executor-graphql-ws@1.1.0(graphql@16.8.0): + /@graphql-tools/executor-graphql-ws@1.1.0(graphql@16.8.1): resolution: {integrity: sha512-yM67SzwE8rYRpm4z4AuGtABlOp9mXXVy6sxXnTJRoYIdZrmDbKVfIY+CpZUJCqS0FX3xf2+GoHlsj7Qswaxgcg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@types/ws': 8.5.5 - graphql: 16.8.0 - graphql-ws: 5.14.0(graphql@16.8.0) + graphql: 16.8.1 + graphql-ws: 5.14.0(graphql@16.8.1) isomorphic-ws: 5.0.0(ws@8.13.0) tslib: 2.6.1 ws: 8.13.0 @@ -3092,32 +3093,32 @@ packages: - bufferutil - utf-8-validate - /@graphql-tools/executor-http@1.0.2(@types/node@20.6.0)(graphql@16.8.0): + /@graphql-tools/executor-http@1.0.2(@types/node@20.6.0)(graphql@16.8.1): resolution: {integrity: sha512-JKTB4E3kdQM2/1NEcyrVPyQ8057ZVthCV5dFJiKktqY9IdmF00M8gupFcW3jlbM/Udn78ickeUBsUzA3EouqpA==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@repeaterjs/repeater': 3.0.4 '@whatwg-node/fetch': 0.9.9 extract-files: 11.0.0 - graphql: 16.8.0 + graphql: 16.8.1 meros: 1.3.0(@types/node@20.6.0) tslib: 2.6.1 value-or-promise: 1.0.12 transitivePeerDependencies: - '@types/node' - /@graphql-tools/executor-legacy-ws@1.0.1(graphql@16.8.0): + /@graphql-tools/executor-legacy-ws@1.0.1(graphql@16.8.1): resolution: {integrity: sha512-PQrTJ+ncHMEQspBARc2lhwiQFfRAX/z/CsOdZTFjIljOHgRWGAA1DAx7pEN0j6PflbLCfZ3NensNq2jCBwF46w==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@types/ws': 8.5.5 - graphql: 16.8.0 + graphql: 16.8.1 isomorphic-ws: 5.0.0(ws@8.13.0) tslib: 2.6.1 ws: 8.13.0 @@ -3125,28 +3126,28 @@ packages: - bufferutil - utf-8-validate - /@graphql-tools/executor@1.2.0(graphql@16.8.0): + /@graphql-tools/executor@1.2.0(graphql@16.8.1): resolution: {integrity: sha512-SKlIcMA71Dha5JnEWlw4XxcaJ+YupuXg0QCZgl2TOLFz4SkGCwU/geAsJvUJFwK2RbVLpQv/UMq67lOaBuwDtg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) '@repeaterjs/repeater': 3.0.4 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 - /@graphql-tools/git-loader@8.0.2(graphql@16.8.0): + /@graphql-tools/git-loader@8.0.2(graphql@16.8.1): resolution: {integrity: sha512-AuCB0nlPvsHh8u42zRZdlD/ZMaWP9A44yAkQUVCZir1E/LG63fsZ9svTWJ+CbusW3Hd0ZP9qpxEhlHxnd4Tlsg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 is-glob: 4.0.3 micromatch: 4.0.5 tslib: 2.6.1 @@ -3155,18 +3156,18 @@ packages: - supports-color dev: true - /@graphql-tools/github-loader@8.0.0(@types/node@20.6.0)(graphql@16.8.0): + /@graphql-tools/github-loader@8.0.0(@types/node@20.6.0)(graphql@16.8.1): resolution: {integrity: sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/executor-http': 1.0.2(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/executor-http': 1.0.2(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@whatwg-node/fetch': 0.9.9 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 transitivePeerDependencies: @@ -3175,21 +3176,21 @@ packages: - supports-color dev: true - /@graphql-tools/graphql-file-loader@8.0.0(graphql@16.8.0): + /@graphql-tools/graphql-file-loader@8.0.0(graphql@16.8.1): resolution: {integrity: sha512-wRXj9Z1IFL3+zJG1HWEY0S4TXal7+s1vVhbZva96MSp0kbb/3JBF7j0cnJ44Eq0ClccMgGCDFqPFXty4JlpaPg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/import': 7.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/import': 7.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) globby: 11.1.0 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 unixify: 1.0.0 dev: true - /@graphql-tools/graphql-tag-pluck@8.0.2(graphql@16.8.0): + /@graphql-tools/graphql-tag-pluck@8.0.2(graphql@16.8.1): resolution: {integrity: sha512-U6fE4yEHxuk/nqmPixHpw1WhqdS6aYuaV60m1bEmUmGJNbpAhaMBy01JncpvpF15yZR5LZ0UjkHg+A3Lhoc8YQ==} engines: {node: '>=16.0.0'} peerDependencies: @@ -3200,86 +3201,86 @@ packages: '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.17) '@babel/traverse': 7.22.17 '@babel/types': 7.22.17 - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.6.1 transitivePeerDependencies: - supports-color dev: true - /@graphql-tools/import@7.0.0(graphql@16.8.0): + /@graphql-tools/import@7.0.0(graphql@16.8.1): resolution: {integrity: sha512-NVZiTO8o1GZs6OXzNfjB+5CtQtqsZZpQOq+Uu0w57kdUkT4RlQKlwhT8T81arEsbV55KpzkpFsOZP7J1wdmhBw==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 resolve-from: 5.0.0 tslib: 2.6.1 dev: true - /@graphql-tools/json-file-loader@8.0.0(graphql@16.8.0): + /@graphql-tools/json-file-loader@8.0.0(graphql@16.8.1): resolution: {integrity: sha512-ki6EF/mobBWJjAAC84xNrFMhNfnUFD6Y0rQMGXekrUgY0NdeYXHU0ZUgHzC9O5+55FslqUmAUHABePDHTyZsLg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) globby: 11.1.0 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 unixify: 1.0.0 dev: true - /@graphql-tools/load@8.0.0(graphql@16.8.0): + /@graphql-tools/load@8.0.0(graphql@16.8.1): resolution: {integrity: sha512-Cy874bQJH0FP2Az7ELPM49iDzOljQmK1PPH6IuxsWzLSTxwTqd8dXA09dcVZrI7/LsN26heTY2R8q2aiiv0GxQ==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/schema': 10.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/schema': 10.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 p-limit: 3.1.0 tslib: 2.6.1 - /@graphql-tools/merge@9.0.0(graphql@16.8.0): + /@graphql-tools/merge@9.0.0(graphql@16.8.1): resolution: {integrity: sha512-J7/xqjkGTTwOJmaJQJ2C+VDBDOWJL3lKrHJN4yMaRLAJH3PosB7GiPRaSDZdErs0+F77sH2MKs2haMMkywzx7Q==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.6.1 - /@graphql-tools/optimize@2.0.0(graphql@16.8.0): + /@graphql-tools/optimize@2.0.0(graphql@16.8.1): resolution: {integrity: sha512-nhdT+CRGDZ+bk68ic+Jw1OZ99YCDIKYA5AlVAnBHJvMawSx9YQqQAIj4refNc1/LRieGiuWvhbG3jvPVYho0Dg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 dev: true - /@graphql-tools/prisma-loader@8.0.1(@types/node@20.6.0)(graphql@16.8.0): + /@graphql-tools/prisma-loader@8.0.1(@types/node@20.6.0)(graphql@16.8.1): resolution: {integrity: sha512-bl6e5sAYe35Z6fEbgKXNrqRhXlCJYeWKBkarohgYA338/SD9eEhXtg3Cedj7fut3WyRLoQFpHzfiwxKs7XrgXg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/url-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@types/js-yaml': 4.0.5 '@types/json-stable-stringify': 1.0.34 '@whatwg-node/fetch': 0.9.9 chalk: 4.1.2 debug: 4.3.4 dotenv: 16.3.1 - graphql: 16.8.0 - graphql-request: 6.1.0(graphql@16.8.0) + graphql: 16.8.1 + graphql-request: 6.1.0(graphql@16.8.1) http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 jose: 4.14.6 @@ -3297,67 +3298,67 @@ packages: - utf-8-validate dev: true - /@graphql-tools/relay-operation-optimizer@7.0.0(graphql@16.8.0): + /@graphql-tools/relay-operation-optimizer@7.0.0(graphql@16.8.1): resolution: {integrity: sha512-UNlJi5y3JylhVWU4MBpL0Hun4Q7IoJwv9xYtmAz+CgRa066szzY7dcuPfxrA7cIGgG/Q6TVsKsYaiF4OHPs1Fw==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@ardatan/relay-compiler': 12.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@ardatan/relay-compiler': 12.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.6.1 transitivePeerDependencies: - encoding - supports-color dev: true - /@graphql-tools/schema@10.0.0(graphql@16.8.0): + /@graphql-tools/schema@10.0.0(graphql@16.8.1): resolution: {integrity: sha512-kf3qOXMFcMs2f/S8Y3A8fm/2w+GaHAkfr3Gnhh2LOug/JgpY/ywgFVxO3jOeSpSEdoYcDKLcXVjMigNbY4AdQg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/merge': 9.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/merge': 9.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 - /@graphql-tools/stitch@9.0.1(graphql@16.8.0): + /@graphql-tools/stitch@9.0.1(graphql@16.8.1): resolution: {integrity: sha512-dEtv7TVQTHcUNwUZKZbL1UppcrJBRDdvEqlufXxu/ygXjuWSRm6O86UtvcyKSd2MIEr/gAgzY4e5OuMMLzHOCA==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/batch-delegate': 9.0.0(graphql@16.8.0) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.0) - '@graphql-tools/executor': 1.2.0(graphql@16.8.0) - '@graphql-tools/merge': 9.0.0(graphql@16.8.0) - '@graphql-tools/schema': 10.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - '@graphql-tools/wrap': 10.0.0(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/batch-delegate': 9.0.0(graphql@16.8.1) + '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) + '@graphql-tools/executor': 1.2.0(graphql@16.8.1) + '@graphql-tools/merge': 9.0.0(graphql@16.8.1) + '@graphql-tools/schema': 10.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + '@graphql-tools/wrap': 10.0.0(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 dev: false - /@graphql-tools/url-loader@8.0.0(@types/node@20.6.0)(graphql@16.8.0): + /@graphql-tools/url-loader@8.0.0(@types/node@20.6.0)(graphql@16.8.1): resolution: {integrity: sha512-rPc9oDzMnycvz+X+wrN3PLrhMBQkG4+sd8EzaFN6dypcssiefgWKToXtRKI8HHK68n2xEq1PyrOpkjHFJB+GwA==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/delegate': 10.0.3(graphql@16.8.0) - '@graphql-tools/executor-graphql-ws': 1.1.0(graphql@16.8.0) - '@graphql-tools/executor-http': 1.0.2(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/executor-legacy-ws': 1.0.1(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - '@graphql-tools/wrap': 10.0.0(graphql@16.8.0) + '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) + '@graphql-tools/executor-graphql-ws': 1.1.0(graphql@16.8.1) + '@graphql-tools/executor-http': 1.0.2(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/executor-legacy-ws': 1.0.1(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + '@graphql-tools/wrap': 10.0.0(graphql@16.8.1) '@types/ws': 8.5.5 '@whatwg-node/fetch': 0.9.9 - graphql: 16.8.0 + graphql: 16.8.1 isomorphic-ws: 5.0.0(ws@8.13.0) tslib: 2.6.1 value-or-promise: 1.0.12 @@ -3368,36 +3369,36 @@ packages: - encoding - utf-8-validate - /@graphql-tools/utils@10.0.6(graphql@16.8.0): + /@graphql-tools/utils@10.0.6(graphql@16.8.1): resolution: {integrity: sha512-hZMjl/BbX10iagovakgf3IiqArx8TPsotq5pwBld37uIX1JiZoSbgbCIFol7u55bh32o6cfDEiiJgfAD5fbeyQ==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.0) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) dset: 3.1.2 - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 - /@graphql-tools/wrap@10.0.0(graphql@16.8.0): + /@graphql-tools/wrap@10.0.0(graphql@16.8.1): resolution: {integrity: sha512-HDOeUUh6UhpiH0WPJUQl44ODt1x5pnMUbOJZ7GjTdGQ7LK0AgVt3ftaAQ9duxLkiAtYJmu5YkULirfZGj4HzDg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/delegate': 10.0.3(graphql@16.8.0) - '@graphql-tools/schema': 10.0.0(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) - graphql: 16.8.0 + '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) + '@graphql-tools/schema': 10.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) + graphql: 16.8.1 tslib: 2.6.1 value-or-promise: 1.0.12 - /@graphql-typed-document-node/core@3.2.0(graphql@16.8.0): + /@graphql-typed-document-node/core@3.2.0(graphql@16.8.1): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - graphql: 16.8.0 + graphql: 16.8.1 /@humanwhocodes/config-array@0.11.11: resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} @@ -9108,26 +9109,26 @@ packages: normalize-path: 3.0.0 picomatch: 2.3.1 - /apollo-link@1.2.14(graphql@16.8.0): + /apollo-link@1.2.14(graphql@16.8.1): resolution: {integrity: sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg==} peerDependencies: graphql: ^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0 dependencies: - apollo-utilities: 1.3.4(graphql@16.8.0) - graphql: 16.8.0 + apollo-utilities: 1.3.4(graphql@16.8.1) + graphql: 16.8.1 ts-invariant: 0.4.4 tslib: 1.14.1 zen-observable-ts: 0.8.21 dev: true - /apollo-utilities@1.3.4(graphql@16.8.0): + /apollo-utilities@1.3.4(graphql@16.8.1): resolution: {integrity: sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig==} peerDependencies: graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 dependencies: '@wry/equality': 0.1.11 fast-json-stable-stringify: 2.1.0 - graphql: 16.8.0 + graphql: 16.8.1 ts-invariant: 0.4.4 tslib: 1.14.1 dev: true @@ -12370,7 +12371,7 @@ packages: /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - /graphql-codegen-core@0.18.2(graphql@16.8.0): + /graphql-codegen-core@0.18.2(graphql@16.8.1): resolution: {integrity: sha512-fjfIUrDx0KDdr/jYjUs51+07DvcEc5w9tdid/bNezNzT2iJLtmnnmYLR62an3/PKUnKSOAIKLYxFIBOzsFJH9A==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 @@ -12378,39 +12379,39 @@ packages: chalk: 2.4.2 change-case: 3.1.0 common-tags: 1.8.0 - graphql: 16.8.0 - graphql-tag: 2.10.1(graphql@16.8.0) - graphql-toolkit: 0.2.0(graphql@16.8.0) - graphql-tools: 4.0.4(graphql@16.8.0) + graphql: 16.8.1 + graphql-tag: 2.10.1(graphql@16.8.1) + graphql-toolkit: 0.2.0(graphql@16.8.1) + graphql-tools: 4.0.4(graphql@16.8.1) ts-log: 2.1.4 winston: 3.2.1 transitivePeerDependencies: - supports-color dev: true - /graphql-codegen-plugin-helpers@0.18.2(graphql@16.8.0): + /graphql-codegen-plugin-helpers@0.18.2(graphql@16.8.1): resolution: {integrity: sha512-WZahfp95RdePwwPWxnxAHgfkXXEQXNrgX9sGrB//uGfj8lygcf7m/rNZQ4iooUzoqBEkTtJpi7bezWCieNcq2A==} dependencies: - graphql-codegen-core: 0.18.2(graphql@16.8.0) + graphql-codegen-core: 0.18.2(graphql@16.8.1) import-from: 2.1.0 transitivePeerDependencies: - graphql - supports-color dev: true - /graphql-codegen-typescript-common@0.18.2(graphql@16.8.0): + /graphql-codegen-typescript-common@0.18.2(graphql@16.8.1): resolution: {integrity: sha512-uGGHd/vgwMlnCNOMQkvMxW8Xz0fqPGjPHROsniRNP1ragsa6KfFBrGu9toHgxv8m3MzC6ZPeoUa3wtwtS9oVnA==} dependencies: change-case: 3.1.0 common-tags: 1.8.0 - graphql-codegen-core: 0.18.2(graphql@16.8.0) - graphql-codegen-plugin-helpers: 0.18.2(graphql@16.8.0) + graphql-codegen-core: 0.18.2(graphql@16.8.1) + graphql-codegen-plugin-helpers: 0.18.2(graphql@16.8.1) transitivePeerDependencies: - graphql - supports-color dev: true - /graphql-config@5.0.2(@types/node@20.6.0)(graphql@16.8.0): + /graphql-config@5.0.2(@types/node@20.6.0)(graphql@16.8.1): resolution: {integrity: sha512-7TPxOrlbiG0JplSZYCyxn2XQtqVhXomEjXUmWJVSS5ET1nPhOJSsIb/WTwqWhcYX6G0RlHXSj9PLtGTKmxLNGg==} engines: {node: '>= 16.0.0'} peerDependencies: @@ -12420,14 +12421,14 @@ packages: cosmiconfig-toml-loader: optional: true dependencies: - '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.0) - '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.0) - '@graphql-tools/load': 8.0.0(graphql@16.8.0) - '@graphql-tools/merge': 9.0.0(graphql@16.8.0) - '@graphql-tools/url-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.0) - '@graphql-tools/utils': 10.0.6(graphql@16.8.0) + '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/load': 8.0.0(graphql@16.8.1) + '@graphql-tools/merge': 9.0.0(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.6.0)(graphql@16.8.1) + '@graphql-tools/utils': 10.0.6(graphql@16.8.1) cosmiconfig: 8.2.0 - graphql: 16.8.0 + graphql: 16.8.1 jiti: 1.19.3 minimatch: 4.2.3 string-env-interpolation: 1.0.1 @@ -12439,23 +12440,23 @@ packages: - utf-8-validate dev: true - /graphql-http@1.22.0(graphql@16.8.0): + /graphql-http@1.22.0(graphql@16.8.1): resolution: {integrity: sha512-9RBUlGJWBFqz9LwfpmAbjJL/8j/HCNkZwPBU5+Bfmwez+1Ay43DocMNQYpIWsWqH0Ftv6PTNAh2aRnnMCBJgLw==} engines: {node: '>=12'} peerDependencies: graphql: '>=0.11 <=16' dependencies: - graphql: 16.8.0 + graphql: 16.8.1 dev: false - /graphql-import@0.7.1(graphql@16.8.0): + /graphql-import@0.7.1(graphql@16.8.1): resolution: {integrity: sha512-YpwpaPjRUVlw2SN3OPljpWbVRWAhMAyfSba5U47qGMOSsPLi2gYeJtngGpymjm9nk57RFWEpjqwh4+dpYuFAPw==} engines: {node: '>=4.0.0'} deprecated: GraphQL Import has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes. peerDependencies: graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 dependencies: - graphql: 16.8.0 + graphql: 16.8.1 lodash: 4.17.21 resolve-from: 4.0.0 dev: true @@ -12475,28 +12476,28 @@ packages: graphql-playground-html: 1.6.30 dev: false - /graphql-request@5.2.0(graphql@16.8.0): + /graphql-request@5.2.0(graphql@16.8.1): resolution: {integrity: sha512-pLhKIvnMyBERL0dtFI3medKqWOz/RhHdcgbZ+hMMIb32mEPa5MJSzS4AuXxfI4sRAu6JVVk5tvXuGfCWl9JYWQ==} peerDependencies: graphql: 14 - 16 dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.0) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) cross-fetch: 3.1.8 extract-files: 9.0.0 form-data: 3.0.1 - graphql: 16.8.0 + graphql: 16.8.1 transitivePeerDependencies: - encoding dev: false - /graphql-request@6.1.0(graphql@16.8.0): + /graphql-request@6.1.0(graphql@16.8.1): resolution: {integrity: sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==} peerDependencies: graphql: 14 - 16 dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.0) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) cross-fetch: 3.1.8 - graphql: 16.8.0 + graphql: 16.8.1 transitivePeerDependencies: - encoding dev: true @@ -12513,24 +12514,24 @@ packages: - supports-color dev: true - /graphql-tag@2.10.1(graphql@16.8.0): + /graphql-tag@2.10.1(graphql@16.8.1): resolution: {integrity: sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==} peerDependencies: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 dependencies: - graphql: 16.8.0 + graphql: 16.8.1 dev: true - /graphql-tag@2.12.6(graphql@16.8.0): + /graphql-tag@2.12.6(graphql@16.8.1): resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} engines: {node: '>=10'} peerDependencies: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - graphql: 16.8.0 + graphql: 16.8.1 tslib: 2.6.1 - /graphql-toolkit@0.2.0(graphql@16.8.0): + /graphql-toolkit@0.2.0(graphql@16.8.1): resolution: {integrity: sha512-dMwb+V2u6vwJF70tWuqSxgNal9fK1xcB8JtmCJUStVUh+PjfNrlKH1X5e17vJlN+lRPz1hatr8jH+Q6lTW0jLw==} deprecated: Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details peerDependencies: @@ -12539,8 +12540,8 @@ packages: aggregate-error: 2.1.0 deepmerge: 3.2.0 glob: 7.1.3 - graphql: 16.8.0 - graphql-import: 0.7.1(graphql@16.8.0) + graphql: 16.8.1 + graphql-import: 0.7.1(graphql@16.8.1) graphql-tag-pluck: 0.6.0 is-glob: 4.0.0 is-valid-path: 0.1.1 @@ -12552,7 +12553,7 @@ packages: - supports-color dev: true - /graphql-tools@4.0.4(graphql@16.8.0): + /graphql-tools@4.0.4(graphql@16.8.1): resolution: {integrity: sha512-chF12etTIGVVGy3fCTJ1ivJX2KB7OSG4c6UOJQuqOHCmBQwTyNgCDuejZKvpYxNZiEx7bwIjrodDgDe9RIkjlw==} deprecated: |- This package has been deprecated and now it only exports makeExecutableSchema. @@ -12562,24 +12563,24 @@ packages: peerDependencies: graphql: ^0.13.0 || ^14.0.0 dependencies: - apollo-link: 1.2.14(graphql@16.8.0) - apollo-utilities: 1.3.4(graphql@16.8.0) + apollo-link: 1.2.14(graphql@16.8.1) + apollo-utilities: 1.3.4(graphql@16.8.1) deprecated-decorator: 0.1.6 - graphql: 16.8.0 + graphql: 16.8.1 iterall: 1.3.0 uuid: 3.4.0 dev: true - /graphql-ws@5.14.0(graphql@16.8.0): + /graphql-ws@5.14.0(graphql@16.8.1): resolution: {integrity: sha512-itrUTQZP/TgswR4GSSYuwWUzrE/w5GhbwM2GX3ic2U7aw33jgEsayfIlvaj7/GcIvZgNMzsPTrE5hqPuFUiE5g==} engines: {node: '>=10'} peerDependencies: graphql: '>=0.11 <=16' dependencies: - graphql: 16.8.0 + graphql: 16.8.1 - /graphql@16.8.0: - resolution: {integrity: sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==} + /graphql@16.8.1: + resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} /gunzip-maybe@1.4.2: From e409d84f9e1a2548e4e78cb9a3b99ac36a6be94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 00:14:17 -0300 Subject: [PATCH 04/20] feat: add pull review --- .github/workflows/pr-preview.yml | 28 ++++++++++++++++++++++++++++ .preview/Dockerfile | 16 ++++++++++++++++ .preview/docker-compose.yml | 12 ++++++++++++ package.json | 3 ++- packages/app/next.config.mjs | 10 ++++++++++ turbo.json | 3 +++ 6 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr-preview.yml create mode 100644 .preview/Dockerfile create mode 100644 .preview/docker-compose.yml diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml new file mode 100644 index 000000000..d311e809f --- /dev/null +++ b/.github/workflows/pr-preview.yml @@ -0,0 +1,28 @@ +name: Deploy preview + +on: + pull_request: + branches: [main] + types: [labeled, unlabeled, synchronize, closed, reopened] + +jobs: + deploy: + permissions: + contents: read + deployments: write + pull-requests: write + statuses: write + name: deploy + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - uses: pullpreview/action@v5.3.0 + with: + app_path: ./.preview + github_token: ${{ secrets.GITHUB_TOKEN }} + always_on: main + env: + AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" + AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" + AWS_REGION: "us-east-1" \ No newline at end of file diff --git a/.preview/Dockerfile b/.preview/Dockerfile new file mode 100644 index 000000000..cf23020e9 --- /dev/null +++ b/.preview/Dockerfile @@ -0,0 +1,16 @@ +FROM node:20-slim AS base + +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable + +COPY . /preview + +WORKDIR /preview + +RUN pnpm install --prod --frozen-lockfile +RUN pnpm build + +EXPOSE 3000 + +CMD ["pnpm", "start"] \ No newline at end of file diff --git a/.preview/docker-compose.yml b/.preview/docker-compose.yml new file mode 100644 index 000000000..4aac53d40 --- /dev/null +++ b/.preview/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.9' + +services: + fuel-explorer: + platform: linux/amd64 + container_name: fuel-explorer + build: + context: ../ + dockerfile: ./.preview/Dockerfile + ports: + - '80:3000' + - '4000:4444' diff --git a/package.json b/package.json index 52c402491..c8537c1af 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,11 @@ "clean:indexer": "pnpm --filter=indexer clean", "deploy:indexer": "pnpm --filter=indexer run deploy", "deps:update": "updates -gu && pnpm -r exec updates -gu", - "dev": "pnpm turbo:run dev --filter=!indexer", + "dev": "pnpm turbo:run --filter=!indexer dev", "dev:app": "pnpm --filter=app dev", "dev:graphql": "pnpm --filter=graphql dev", "dev:indexer": "pnpm --filter=indexer dev:indexer", + "start": "pnpm turbo:run --filter=!indexer start", "lint": "run-s lint:check prettier:check", "lint:check": "pnpm turbo:run lint", "node:clean": "make -C ./docker clean", diff --git a/packages/app/next.config.mjs b/packages/app/next.config.mjs index 64ca46b55..e3a3f7ba3 100644 --- a/packages/app/next.config.mjs +++ b/packages/app/next.config.mjs @@ -12,6 +12,16 @@ const config = { eslint: { ignoreDuringBuilds: !!process.env.CI, }, + // This is as proxy route to enable next.js + // to proxy requests to the graphql server + rewrites: async () => { + return [ + { + source: '/graphql', + destination: process.env.GRAPHQL_API || 'http://localhost:4444/graphql', + }, + ]; + }, redirects: async () => { return [ { diff --git a/turbo.json b/turbo.json index 7cc47d1dd..dd11dba7c 100644 --- a/turbo.json +++ b/turbo.json @@ -25,6 +25,9 @@ }, "lint": { "cache": true + }, + "start": { + "cache": false } } } From 559bff7eecdc003593f6cee19a1c3ed85aa4f64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 00:37:14 -0300 Subject: [PATCH 05/20] chore: change path --- .github/workflows/pr-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index d311e809f..5ab07514b 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - uses: pullpreview/action@v5.3.0 with: - app_path: ./.preview + app_path: .preview github_token: ${{ secrets.GITHUB_TOKEN }} always_on: main env: From 219f2df674bcde2d3885b21b4ee6eeae69e0960a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 00:46:07 -0300 Subject: [PATCH 06/20] feat: add one user --- .github/workflows/pr-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 5ab07514b..15c3bc99d 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -20,6 +20,7 @@ jobs: - uses: pullpreview/action@v5.3.0 with: app_path: .preview + admins: luizstacio github_token: ${{ secrets.GITHUB_TOKEN }} always_on: main env: From 9cd06c6550871505ff22a9d3c7b3ec0f9100dc39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 00:57:13 -0300 Subject: [PATCH 07/20] chore: updare pr preview ci --- .github/workflows/pr-preview.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 15c3bc99d..4a60b07d3 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -16,12 +16,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: pullpreview/action@v5.3.0 with: - app_path: .preview - admins: luizstacio github_token: ${{ secrets.GITHUB_TOKEN }} + compose_files: .preview/docker-compose.yml always_on: main env: AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" From 36e200153772ab99f90009821bf0b3a5efef7ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 01:01:17 -0300 Subject: [PATCH 08/20] chore: remove prod flag on install --- .preview/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.preview/Dockerfile b/.preview/Dockerfile index cf23020e9..28e60ee4d 100644 --- a/.preview/Dockerfile +++ b/.preview/Dockerfile @@ -8,7 +8,7 @@ COPY . /preview WORKDIR /preview -RUN pnpm install --prod --frozen-lockfile +RUN pnpm install --frozen-lockfile RUN pnpm build EXPOSE 3000 From da5e8e785e8f27bb6a8e6fa2e621d499f026a450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 01:07:07 -0300 Subject: [PATCH 09/20] add: env provider url --- .preview/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.preview/docker-compose.yml b/.preview/docker-compose.yml index 4aac53d40..286b26459 100644 --- a/.preview/docker-compose.yml +++ b/.preview/docker-compose.yml @@ -7,6 +7,8 @@ services: build: context: ../ dockerfile: ./.preview/Dockerfile + environment: + FUEL_PROVIDER_URL: http://beta-4.fuel.network/graphql ports: - '80:3000' - '4000:4444' From a5ae474c23045279ec23db05dd7ed264bf4c07ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 14:44:20 -0300 Subject: [PATCH 10/20] chore: add dns name --- .github/workflows/pr-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 4a60b07d3..781c0bec3 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -19,6 +19,7 @@ jobs: - uses: actions/checkout@v3 - uses: pullpreview/action@v5.3.0 with: + dns: "app.vrfy.page" github_token: ${{ secrets.GITHUB_TOKEN }} compose_files: .preview/docker-compose.yml always_on: main From bf2c0eea21fa3f95d82bc760611e3dafceb3d1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 15:06:21 -0300 Subject: [PATCH 11/20] chore: remove custom dns --- .github/workflows/pr-preview.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 781c0bec3..4a60b07d3 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -19,7 +19,6 @@ jobs: - uses: actions/checkout@v3 - uses: pullpreview/action@v5.3.0 with: - dns: "app.vrfy.page" github_token: ${{ secrets.GITHUB_TOKEN }} compose_files: .preview/docker-compose.yml always_on: main From 4c82aed1266714c5f1d28bc01db7d6ea1e1aa22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 16:20:11 -0300 Subject: [PATCH 12/20] chore: use build preview --- .preview/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.preview/Dockerfile b/.preview/Dockerfile index 28e60ee4d..31d74687a 100644 --- a/.preview/Dockerfile +++ b/.preview/Dockerfile @@ -9,7 +9,7 @@ COPY . /preview WORKDIR /preview RUN pnpm install --frozen-lockfile -RUN pnpm build +RUN pnpm build:preview EXPOSE 3000 From 9545c400e82e8f06bf35e3335e4ca48da0b28480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 18:33:08 -0300 Subject: [PATCH 13/20] chore: add pullpreview tag before trigger pullpreview --- .github/workflows/pr-preview.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 4a60b07d3..a5dfaa916 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -17,12 +17,19 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 + + - name: Add pullpreview label + if: github.event_name == 'pull_request' && github.event.action == 'opened' + uses: KeisukeYamashita/attach-labels@v1 + with: + labels: pullpreview + token: ${{ secrets.GITHUB_TOKEN }} + - uses: pullpreview/action@v5.3.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} compose_files: .preview/docker-compose.yml - always_on: main env: AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" - AWS_REGION: "us-east-1" \ No newline at end of file + AWS_REGION: "us-east-1" From 92d30d0dcd4020c0f013b869ad4a1115340c94d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 18:37:23 -0300 Subject: [PATCH 14/20] chore: update events and checks --- .github/workflows/pr-preview.yml | 2 +- .github/workflows/pr.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index a5dfaa916..672c301d2 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v3 - name: Add pullpreview label - if: github.event_name == 'pull_request' && github.event.action == 'opened' + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} uses: KeisukeYamashita/attach-labels@v1 with: labels: pullpreview diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9ef853ecc..53076ea94 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -2,7 +2,7 @@ name: "PR Checks" on: pull_request: - types: [opened, synchronize, edited, closed] + types: [opened, synchronize, edited] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From afb026f8829c71b14c43f2b52b916b1e1418c968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 18:42:53 -0300 Subject: [PATCH 15/20] chore: format ci pr-preview --- .github/workflows/pr-preview.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 672c301d2..2a3809d32 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -16,20 +16,20 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Add pullpreview label - if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} - uses: KeisukeYamashita/attach-labels@v1 - with: - labels: pullpreview - token: ${{ secrets.GITHUB_TOKEN }} + - name: Add pullpreview label + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + uses: KeisukeYamashita/attach-labels@v1 + with: + labels: pullpreview + token: ${{ secrets.GITHUB_TOKEN }} - - uses: pullpreview/action@v5.3.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - compose_files: .preview/docker-compose.yml - env: - AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" - AWS_REGION: "us-east-1" + - uses: pullpreview/action@v5.3.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + compose_files: .preview/docker-compose.yml + env: + AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" + AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" + AWS_REGION: "us-east-1" From b06fd53396782d59e2bae098e57bef0fe0725508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 19:00:57 -0300 Subject: [PATCH 16/20] fix: if condition to add tag --- .github/workflows/pr-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 2a3809d32..c4a54c556 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v3 - name: Add pullpreview label - if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + if: ${{ github.event.action == 'opened' || github.event.action == 'synchronize' }} uses: KeisukeYamashita/attach-labels@v1 with: labels: pullpreview From 044b289e38b52ad5d7ae106f8ac2cf1fd6173855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 19:55:47 -0300 Subject: [PATCH 17/20] chore: update the dns name --- .github/workflows/pr-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index c4a54c556..5e96aa526 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -29,6 +29,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} compose_files: .preview/docker-compose.yml + dns: exp.pullpreview.com env: AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" From 6d6566c637f66bba2a799999e5d06871e581833d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sat, 23 Sep 2023 20:12:37 -0300 Subject: [PATCH 18/20] chore: remove custom dns --- .github/workflows/pr-preview.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 5e96aa526..c4a54c556 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -29,7 +29,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} compose_files: .preview/docker-compose.yml - dns: exp.pullpreview.com env: AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" From ddd283f31149ece00766b0d95e7c9d0a3843d76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sun, 24 Sep 2023 00:05:22 -0300 Subject: [PATCH 19/20] chore: add conditional rewrite routes --- .dockerignore | 5 +++++ .preview/Dockerfile | 11 +++++++++++ .preview/docker-compose.yml | 6 ++++-- packages/app/next.config.mjs | 14 ++++++++------ turbo.json | 2 ++ 5 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..f173399b2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +.next +.vercel +.turbo +dist diff --git a/.preview/Dockerfile b/.preview/Dockerfile index 31d74687a..11ec3df11 100644 --- a/.preview/Dockerfile +++ b/.preview/Dockerfile @@ -1,7 +1,18 @@ FROM node:20-slim AS base +# Receive envs on build time +ARG IS_PREVIEW +ARG GRAPHQL_API +ARG FUEL_PROVIDER_URL + +# Expose the args to the env of the container +ENV IS_PREVIEW="${IS_PREVIEW}" +ENV GRAPHQL_API="${GRAPHQL_API}" +ENV FUEL_PROVIDER_URL="${FUEL_PROVIDER_URL}" + ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" + RUN corepack enable COPY . /preview diff --git a/.preview/docker-compose.yml b/.preview/docker-compose.yml index 286b26459..18690865b 100644 --- a/.preview/docker-compose.yml +++ b/.preview/docker-compose.yml @@ -7,8 +7,10 @@ services: build: context: ../ dockerfile: ./.preview/Dockerfile - environment: - FUEL_PROVIDER_URL: http://beta-4.fuel.network/graphql + args: + IS_PREVIEW: true + GRAPHQL_API: http://localhost:4444/graphql + FUEL_PROVIDER_URL: http://beta-4.fuel.network/graphql ports: - '80:3000' - '4000:4444' diff --git a/packages/app/next.config.mjs b/packages/app/next.config.mjs index e3a3f7ba3..246d6f2ad 100644 --- a/packages/app/next.config.mjs +++ b/packages/app/next.config.mjs @@ -15,12 +15,14 @@ const config = { // This is as proxy route to enable next.js // to proxy requests to the graphql server rewrites: async () => { - return [ - { - source: '/graphql', - destination: process.env.GRAPHQL_API || 'http://localhost:4444/graphql', - }, - ]; + return process.env.IS_PREVIEW === 'true' + ? [ + { + source: '/graphql', + destination: process.env.GRAPHQL_API, + }, + ] + : []; }, redirects: async () => { return [ diff --git a/turbo.json b/turbo.json index dd11dba7c..1f4d282f1 100644 --- a/turbo.json +++ b/turbo.json @@ -1,4 +1,6 @@ { + "$schema": "https://turbo.build/schema.json", + "globalEnv": ["NODE_ENV", "IS_PREVIEW", "FUEL_PROVIDER_URL", "GRAPHQL_API"], "pipeline": { "build": { "outputs": ["dist/**", "build/**", ".next/**"], From ea4e5f1c0b5f4c5323c24cdc1d5199d1390b2fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio?= Date: Sun, 24 Sep 2023 00:07:29 -0300 Subject: [PATCH 20/20] chore: remove check string --- packages/app/next.config.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/app/next.config.mjs b/packages/app/next.config.mjs index 246d6f2ad..fc1fb8874 100644 --- a/packages/app/next.config.mjs +++ b/packages/app/next.config.mjs @@ -12,10 +12,11 @@ const config = { eslint: { ignoreDuringBuilds: !!process.env.CI, }, - // This is as proxy route to enable next.js - // to proxy requests to the graphql server rewrites: async () => { - return process.env.IS_PREVIEW === 'true' + // This is as proxy route to enable next.js + // to proxy requests to the graphql server on + // preview environment. + return process.env.IS_PREVIEW ? [ { source: '/graphql',