@takeshape/cli 8.257.0 → 8.260.2
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/dist/graphql.d.ts.map +1 -1
- package/dist/graphql.js +7 -5
- package/package.json +6 -5
package/dist/graphql.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/graphql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/graphql.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAoB,MAAM,iBAAiB,CAAC;AAEhE,oBAAY,UAAU,GAClB,CAAC,YAAY,GAAG;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,GACF,MAAM,GACN,SAAS,CAAC;AAEd,oBAAY,iBAAiB,GACzB,CAAC,UAAU,GAAG;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC,GACF,MAAM,CAAC;AAEX,oBAAY,kBAAkB,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,KAAK,MAAM,CAAC;AAgBvF,eAAO,MAAM,kBAAkB,oBAA8C,CAAC;AAC9E,eAAO,MAAM,uBAAuB,oBAAqD,CAAC;AAE1F,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAOD,eAAO,MAAM,sBAAsB,uBACZ,kBAAkB,cAC9B,SAAS,aAAa,MAAM,eAAe,UAAU,oDAAsC,MAkCnG,CAAC;AAEJ,eAAO,MAAM,eAAe,WApCjB,SAAS,aAAa,MAAM,eAAe,UAAU,oDAAsC,MAoC7B,CAAC;AAC1E,eAAO,MAAM,oBAAoB,WArCtB,SAAS,aAAa,MAAM,eAAe,UAAU,oDAAsC,MAqCnB,CAAC;AAEpF,wBAAgB,YAAY,CAAC,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,YACnE,MAAM,aAAa,SAAS,KAAG,QAAQ,IAAI,CAAC,CAQnE"}
|
package/dist/graphql.js
CHANGED
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getGraphQLEndpoint = exports.getGraphQLAdminEndpoint = exports.createConnectorFactory = exports.createConnector = exports.createAdminConnector = void 0;
|
|
7
7
|
exports.graphQLQuery = graphQLQuery;
|
|
8
8
|
|
|
9
|
+
var _branches = require("@takeshape/branches");
|
|
10
|
+
|
|
9
11
|
var _nodeFetch = _interopRequireDefault(require("node-fetch"));
|
|
10
12
|
|
|
11
13
|
var _asyncRetry = _interopRequireDefault(require("async-retry"));
|
|
@@ -14,22 +16,22 @@ var _errors = require("./errors");
|
|
|
14
16
|
|
|
15
17
|
var _api = require("./util/api");
|
|
16
18
|
|
|
17
|
-
var
|
|
19
|
+
var _branches2 = require("./util/branches");
|
|
18
20
|
|
|
19
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
22
|
|
|
21
23
|
const getGraphQLEndpointFactory = (path, useBranch) => (params, pathParams) => {
|
|
22
24
|
const projectId = typeof pathParams === 'object' ? pathParams.projectId : pathParams;
|
|
23
25
|
const branchParams = typeof pathParams === 'object' ? pathParams : {
|
|
24
|
-
environment:
|
|
26
|
+
environment: _branches.BRANCH_ENVIRONMENT_PRODUCTION_ENUM
|
|
25
27
|
};
|
|
26
|
-
const basePath = projectId ? useBranch ? (0,
|
|
28
|
+
const basePath = projectId ? useBranch ? (0, _branches2.getBranchBasePath)(branchParams, projectId) : `/project/${projectId}` : '';
|
|
27
29
|
return `${params.endpoint}${basePath}${path}`;
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
const getGraphQLEndpoint = getGraphQLEndpointFactory('/graphql', true);
|
|
31
33
|
exports.getGraphQLEndpoint = getGraphQLEndpoint;
|
|
32
|
-
const getGraphQLAdminEndpoint = getGraphQLEndpointFactory('/
|
|
34
|
+
const getGraphQLAdminEndpoint = getGraphQLEndpointFactory('/admin-graphql', false);
|
|
33
35
|
exports.getGraphQLAdminEndpoint = getGraphQLAdminEndpoint;
|
|
34
36
|
const defaultOptions = {
|
|
35
37
|
retries: 3,
|
|
@@ -38,7 +40,7 @@ const defaultOptions = {
|
|
|
38
40
|
|
|
39
41
|
const createConnectorFactory = getGraphQLEndpoint => (params, authToken, pathParams, options) => {
|
|
40
42
|
const endpoint = getGraphQLEndpoint(params, pathParams ?? {
|
|
41
|
-
environment:
|
|
43
|
+
environment: _branches.BRANCH_ENVIRONMENT_PRODUCTION_ENUM
|
|
42
44
|
});
|
|
43
45
|
const authHeader = (0, _api.getAuthHeader)(authToken);
|
|
44
46
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.260.2",
|
|
4
4
|
"description": "TakeShape CLI",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -57,10 +57,11 @@
|
|
|
57
57
|
"semver": "^6.3.0",
|
|
58
58
|
"stream-to-promise": "^2.2.0",
|
|
59
59
|
"tmp": "^0.0.33",
|
|
60
|
-
"@takeshape/
|
|
61
|
-
"@takeshape/schema": "8.
|
|
62
|
-
"@takeshape/
|
|
63
|
-
"@takeshape/
|
|
60
|
+
"@takeshape/branches": "8.260.2",
|
|
61
|
+
"@takeshape/schema": "8.260.2",
|
|
62
|
+
"@takeshape/ssg": "8.260.2",
|
|
63
|
+
"@takeshape/util": "8.260.2",
|
|
64
|
+
"@takeshape/streams": "8.260.2"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@types/archiver": "^3.1.0",
|