@stepzen/graphiql-proxy 0.26.0-experimental.910b3ea → 0.26.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020,2021,2022, StepZen, Inc.
3
+ Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stepzen/graphiql-proxy",
3
- "version": "0.26.0-experimental.910b3ea",
3
+ "version": "0.26.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.26.0-experimental.910b3ea",
26
+ "@stepzen/fetch": "0.26.0",
27
27
  "chalk": "^4.1.2",
28
28
  "cors": "^2.8.5",
29
29
  "cross-spawn": "^7.0.3",
@@ -56,5 +56,5 @@
56
56
  "sinon-chai": "3.7.0",
57
57
  "ts-node": "^10.8.2"
58
58
  },
59
- "gitHead": "910b3eaf3ed29c493250219621b17921d28efeda"
59
+ "gitHead": "550e95c4d8e84bbed265b7333b4754c2e42ca790"
60
60
  }
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const debugging = async (req, res) => {
4
4
  const {debugging} = req.stepzen
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const details = async (req, res) => {
4
4
  const {zenservUrl, predicates, workspace} = req.stepzen
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const ping = async (req, res) => {
4
4
  res.json({
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const predicates = async (req, res) => {
4
4
  const {predicates} = req.stepzen
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const debug = require('debug')
4
4
  const fetch = require('@stepzen/fetch').default
@@ -6,32 +6,17 @@ const fetch = require('@stepzen/fetch').default
6
6
  const {version} = require('../../../package.json')
7
7
 
8
8
  const proxy = async (req, res) => {
9
- const {
10
- adminkey,
11
- debugging,
12
- zenservDomain,
13
- zenservUrl,
14
- predicates,
15
- workspace,
16
- } = req.stepzen
9
+ const {adminkey, debugging, zenservUrl, predicates, workspace} = req.stepzen
17
10
 
18
11
  let endpoint = workspace.endpoint
19
12
 
20
- let headers = {
21
- host: zenservDomain,
22
- }
23
-
13
+ let headers = {}
24
14
  if (predicates.available && predicates.enabled) {
25
15
  try {
26
- const others = JSON.parse(JSON.stringify(predicates.headers))
27
- headers = {
28
- ...headers,
29
- ...others,
30
- }
16
+ headers = JSON.parse(JSON.stringify(predicates.headers))
31
17
  } catch {}
32
18
  } else {
33
19
  headers = {
34
- ...headers,
35
20
  Authorization: `Apikey ${adminkey}`,
36
21
  }
37
22
  }
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const fs = require('fs')
4
4
  const prettier = require('prettier')
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
 
3
3
  const cors = require('cors')
4
4
  const debug = require('debug')
@@ -17,12 +17,12 @@ const samples = require('./api/samples')
17
17
 
18
18
  module.exports = async options => {
19
19
  const {
20
- /** @deprecated use zenservDomain and zenservUrl */
20
+ /** @deprecated use zenservUrl */
21
21
  account,
22
22
  adminkey,
23
23
  apikey,
24
24
  cli = {version: ''},
25
- /** @deprecated use zenservDomain and zenservUrl */
25
+ /** @deprecated use zenservUrl */
26
26
  domain = 'stepzen.io',
27
27
  port = 5000,
28
28
  predicates = {
@@ -35,7 +35,6 @@ module.exports = async options => {
35
35
  onToggleDebugging: async () => {},
36
36
  },
37
37
  workspace,
38
- zenservDomain,
39
38
  zenservUrl,
40
39
  } = options
41
40
 
@@ -43,7 +42,7 @@ module.exports = async options => {
43
42
  if (options[option]) {
44
43
  debug('stepzen:dashboard')(
45
44
  `The account ${option} is deprecated.` +
46
- ` Please use zenservDomain and zenservUrl instead.`,
45
+ ` Please use zenservUrl instead.`,
47
46
  )
48
47
  }
49
48
  }
@@ -64,8 +63,6 @@ module.exports = async options => {
64
63
  debugging,
65
64
  predicates,
66
65
  workspace,
67
- zenservDomain:
68
- zenservDomain || `${account}.${domain.replace('.io', '.net')}`,
69
66
  zenservUrl:
70
67
  zenservUrl || `https://${account}.${domain.replace('.io', '.net')}`,
71
68
  }
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2020,2021,2022, StepZen, Inc.
1
+ // Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
2
2
  // Original code from https://github.com/facebook/create-react-app/blob/0f6fc2bc71d78f0dcae67f3f08ce98a42fc0a57c/packages/react-dev-utils/openChrome.applescript
3
3
 
4
4
  const chalk = require('chalk')
@@ -1,5 +1,5 @@
1
1
  (*
2
- Copyright (c) 2020,2021,2022, StepZen, Inc.
2
+ Copyright (c) 2020,2021,2022,2023, StepZen, Inc.
3
3
 
4
4
  Original code from https://github.com/facebook/create-react-app/blob/0f6fc2bc71d78f0dcae67f3f08ce98a42fc0a57c/packages/react-dev-utils/openChrome.applescript
5
5
  *)