scripts: add token to gql-sdl args

This commit is contained in:
vchikalkin 2024-05-20 17:33:26 +03:00
parent 2ae4d87b4d
commit dd1bab5ffc
3 changed files with 18 additions and 9 deletions

View File

@ -56,7 +56,7 @@
"@vchikalkin/eslint-config-awesome": "^1.1.6",
"antd": "^5.14.2",
"eslint": "^8.52.0",
"gql-sdl": "^1.0.0",
"gql-sdl": "^1.1.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.3.1",
"msw": "^1.1.0",

View File

@ -1,9 +1,18 @@
const run = require('tools/scripts');
const TOKEN =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJFVk9MRUFTSU5HIiwidXNlcm5hbWUiOiJ2Y2hpa2Fsa2luIiwiaWF0IjoxNTE2MjM5MDIyfQ.K0_BP6aOCj5VXOSTtFypAHNm-aPKOE9ifAMXmoQSheE';
const PATH_CRM_GRAPHQL_SCHEMA = './graphql/crm.schema.graphql';
const { URL_CRM_GRAPHQL_DIRECT } = process.env;
function downloadSchema() {
const { URL_CRM_GRAPHQL_DIRECT } = process.env;
const PATH_CRM_GRAPHQL_SCHEMA = './graphql/crm.schema.graphql';
const command1 = ['gql-sdl', URL_CRM_GRAPHQL_DIRECT, '-o', PATH_CRM_GRAPHQL_SCHEMA].join(' ');
const command1 = [
'gql-sdl',
URL_CRM_GRAPHQL_DIRECT,
`-H "Authorization: Bearer ${TOKEN}"`,
'-o',
PATH_CRM_GRAPHQL_SCHEMA,
].join(' ');
run(command1, 'Download GraphQL Schema...');
}

10
pnpm-lock.yaml generated
View File

@ -242,7 +242,7 @@ importers:
specifier: ^8.52.0
version: 8.57.0
gql-sdl:
specifier: ^1.0.0
specifier: ^1.1.0
version: 1.1.0
jest:
specifier: ^29.4.3
@ -6956,7 +6956,7 @@ packages:
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.3.3)
'@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.3.3)
eslint: 8.57.0
jest: 29.7.0(@types/node@18.19.18)(ts-node@10.9.2)
jest: 29.7.0(@types/node@20.11.20)(ts-node@10.9.2)
transitivePeerDependencies:
- supports-color
- typescript
@ -8200,7 +8200,7 @@ packages:
'@graphql-tools/json-file-loader': 7.4.18(graphql@16.8.1)
'@graphql-tools/load': 7.8.14(graphql@16.8.1)
'@graphql-tools/merge': 8.4.2(graphql@16.8.1)
'@graphql-tools/url-loader': 7.17.18(@types/node@20.11.20)(graphql@16.8.1)
'@graphql-tools/url-loader': 7.17.18(@types/node@18.19.18)(graphql@16.8.1)
'@graphql-tools/utils': 9.2.1(graphql@16.8.1)
cosmiconfig: 8.0.0
graphql: 16.8.1
@ -9320,7 +9320,7 @@ packages:
pretty-format: 29.7.0
slash: 3.0.0
strip-json-comments: 3.1.1
ts-node: 10.9.2(@types/node@18.19.18)(typescript@5.3.3)
ts-node: 10.9.2(@types/node@20.11.20)(typescript@5.3.3)
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@ -13241,7 +13241,7 @@ packages:
'@babel/core': 7.23.9
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 29.7.0(@types/node@18.19.18)(ts-node@10.9.2)
jest: 29.7.0(@types/node@20.11.20)(ts-node@10.9.2)
jest-util: 29.7.0
json5: 2.2.3
lodash.memoize: 4.1.2