scripts: add token to gql-sdl args
This commit is contained in:
parent
2ae4d87b4d
commit
dd1bab5ffc
@ -56,7 +56,7 @@
|
|||||||
"@vchikalkin/eslint-config-awesome": "^1.1.6",
|
"@vchikalkin/eslint-config-awesome": "^1.1.6",
|
||||||
"antd": "^5.14.2",
|
"antd": "^5.14.2",
|
||||||
"eslint": "^8.52.0",
|
"eslint": "^8.52.0",
|
||||||
"gql-sdl": "^1.0.0",
|
"gql-sdl": "^1.1.0",
|
||||||
"jest": "^29.4.3",
|
"jest": "^29.4.3",
|
||||||
"jest-environment-jsdom": "^29.3.1",
|
"jest-environment-jsdom": "^29.3.1",
|
||||||
"msw": "^1.1.0",
|
"msw": "^1.1.0",
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
const run = require('tools/scripts');
|
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() {
|
function downloadSchema() {
|
||||||
const { URL_CRM_GRAPHQL_DIRECT } = process.env;
|
const command1 = [
|
||||||
const PATH_CRM_GRAPHQL_SCHEMA = './graphql/crm.schema.graphql';
|
'gql-sdl',
|
||||||
const command1 = ['gql-sdl', URL_CRM_GRAPHQL_DIRECT, '-o', PATH_CRM_GRAPHQL_SCHEMA].join(' ');
|
URL_CRM_GRAPHQL_DIRECT,
|
||||||
|
`-H "Authorization: Bearer ${TOKEN}"`,
|
||||||
|
'-o',
|
||||||
|
PATH_CRM_GRAPHQL_SCHEMA,
|
||||||
|
].join(' ');
|
||||||
run(command1, 'Download GraphQL Schema...');
|
run(command1, 'Download GraphQL Schema...');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@ -242,7 +242,7 @@ importers:
|
|||||||
specifier: ^8.52.0
|
specifier: ^8.52.0
|
||||||
version: 8.57.0
|
version: 8.57.0
|
||||||
gql-sdl:
|
gql-sdl:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.1.0
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
jest:
|
jest:
|
||||||
specifier: ^29.4.3
|
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/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)
|
'@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.3.3)
|
||||||
eslint: 8.57.0
|
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:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
@ -8200,7 +8200,7 @@ packages:
|
|||||||
'@graphql-tools/json-file-loader': 7.4.18(graphql@16.8.1)
|
'@graphql-tools/json-file-loader': 7.4.18(graphql@16.8.1)
|
||||||
'@graphql-tools/load': 7.8.14(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/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)
|
'@graphql-tools/utils': 9.2.1(graphql@16.8.1)
|
||||||
cosmiconfig: 8.0.0
|
cosmiconfig: 8.0.0
|
||||||
graphql: 16.8.1
|
graphql: 16.8.1
|
||||||
@ -9320,7 +9320,7 @@ packages:
|
|||||||
pretty-format: 29.7.0
|
pretty-format: 29.7.0
|
||||||
slash: 3.0.0
|
slash: 3.0.0
|
||||||
strip-json-comments: 3.1.1
|
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:
|
transitivePeerDependencies:
|
||||||
- babel-plugin-macros
|
- babel-plugin-macros
|
||||||
- supports-color
|
- supports-color
|
||||||
@ -13241,7 +13241,7 @@ packages:
|
|||||||
'@babel/core': 7.23.9
|
'@babel/core': 7.23.9
|
||||||
bs-logger: 0.2.6
|
bs-logger: 0.2.6
|
||||||
fast-json-stable-stringify: 2.1.0
|
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
|
jest-util: 29.7.0
|
||||||
json5: 2.2.3
|
json5: 2.2.3
|
||||||
lodash.memoize: 4.1.2
|
lodash.memoize: 4.1.2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user