@stepzen/graphiql-proxy 0.50.0 → 0.51.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stepzen/graphiql-proxy",
3
- "version": "0.50.0",
3
+ "version": "0.51.0-beta.0",
4
4
  "author": "Darren Waddell <darren@stepzen.com>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://stepzen.com",
@@ -23,7 +23,7 @@
23
23
  "posttest": "prettier . --check"
24
24
  },
25
25
  "dependencies": {
26
- "@stepzen/fetch": "0.50.0",
26
+ "@stepzen/fetch": "0.51.0-beta.0",
27
27
  "chalk": "^4.1.2",
28
28
  "cross-spawn": "^7.0.6",
29
29
  "debug": "^4.3.4",
@@ -61,5 +61,5 @@
61
61
  "--comment--": "workaround for CVE-2024-21538",
62
62
  "cross-spawn": "^7.0.6"
63
63
  },
64
- "gitHead": "138e95d48fb8df908329eddfafa64479eaeecf64"
64
+ "gitHead": "2df22b05b9d938cf85b3f4f59da1863db569b5e8"
65
65
  }
@@ -7,16 +7,16 @@ import {createRequire} from 'node:module'
7
7
  const {version} = createRequire(import.meta.url)('../../../package.json')
8
8
 
9
9
  const proxy = async (req, res) => {
10
- const {adminkey, debugging, zenservUrl, predicates, workspace} = req.stepzen
10
+ const {adminkey, debugging, zenservUrl, predicates, workspace, accessToken} =
11
+ req.stepzen
11
12
 
12
13
  let endpoint = workspace.endpoint
13
14
 
14
15
  const headers = {
15
- Authorization: `Apikey ${adminkey}`,
16
+ Authorization: accessToken ? `Bearer ${accessToken}` : `Apikey ${adminkey}`,
16
17
  ...(req.body.headers || {}),
17
18
  }
18
19
  delete req.body.headers
19
-
20
20
  if (debugging.enabled) {
21
21
  headers = {
22
22
  'StepZen-Debug-Level': 1,
@@ -25,6 +25,7 @@ export default async function (options) {
25
25
  account,
26
26
  adminkey,
27
27
  apikey,
28
+ accessToken,
28
29
  cli = {version: ''},
29
30
  /** @deprecated use zenservUrl */
30
31
  domain = 'us-east-a.ibm.stepzen.net',
@@ -64,6 +65,7 @@ export default async function (options) {
64
65
  req.stepzen = {
65
66
  adminkey,
66
67
  apikey,
68
+ accessToken,
67
69
  cli,
68
70
  debugging,
69
71
  predicates,