@sitecore-content-sdk/core 2.0.2-canary.2 → 2.0.2-canary.4
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.
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -54,8 +65,9 @@ class GraphQLRequestClient {
|
|
|
54
65
|
* @param {string} [config.apiKey] - apikey
|
|
55
66
|
* @param {string} [config.contextId] - contextId
|
|
56
67
|
*/
|
|
57
|
-
static createClientFactory(
|
|
58
|
-
|
|
68
|
+
static createClientFactory(_a) {
|
|
69
|
+
var { endpoint } = _a, factoryConfig = __rest(_a, ["endpoint"]);
|
|
70
|
+
return (config = {}) => new GraphQLRequestClient(endpoint, Object.assign(Object.assign({}, factoryConfig), config));
|
|
59
71
|
}
|
|
60
72
|
/**
|
|
61
73
|
* Execute graphql request
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { GraphQLClient as Client } from 'graphql-request';
|
|
2
13
|
import parse from 'url-parse';
|
|
3
14
|
import debuggers from './debug';
|
|
@@ -48,8 +59,9 @@ export class GraphQLRequestClient {
|
|
|
48
59
|
* @param {string} [config.apiKey] - apikey
|
|
49
60
|
* @param {string} [config.contextId] - contextId
|
|
50
61
|
*/
|
|
51
|
-
static createClientFactory(
|
|
52
|
-
|
|
62
|
+
static createClientFactory(_a) {
|
|
63
|
+
var { endpoint } = _a, factoryConfig = __rest(_a, ["endpoint"]);
|
|
64
|
+
return (config = {}) => new GraphQLRequestClient(endpoint, Object.assign(Object.assign({}, factoryConfig), config));
|
|
53
65
|
}
|
|
54
66
|
/**
|
|
55
67
|
* Execute graphql request
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/core",
|
|
3
|
-
"version": "2.0.2-canary.
|
|
3
|
+
"version": "2.0.2-canary.4",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"description": "",
|
|
76
76
|
"types": "types/index.d.ts",
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "55475570dda431b096e079e5ea1c5b0ed3771ac7",
|
|
78
78
|
"files": [
|
|
79
79
|
"dist",
|
|
80
80
|
"types",
|
|
@@ -75,9 +75,7 @@ export type GraphQLRequestClientFactory = (config?: Omit<GraphQLRequestClientCon
|
|
|
75
75
|
*/
|
|
76
76
|
export type GraphQLRequestClientFactoryConfig = {
|
|
77
77
|
endpoint: string;
|
|
78
|
-
|
|
79
|
-
contextId?: string;
|
|
80
|
-
};
|
|
78
|
+
} & GraphQLRequestClientConfig;
|
|
81
79
|
/**
|
|
82
80
|
* A GraphQL client for Sitecore APIs that uses the 'graphql-request' library.
|
|
83
81
|
* https://github.com/prisma-labs/graphql-request
|
|
@@ -105,7 +103,7 @@ export declare class GraphQLRequestClient implements GraphQLClient {
|
|
|
105
103
|
* @param {string} [config.apiKey] - apikey
|
|
106
104
|
* @param {string} [config.contextId] - contextId
|
|
107
105
|
*/
|
|
108
|
-
static createClientFactory({ endpoint,
|
|
106
|
+
static createClientFactory({ endpoint, ...factoryConfig }: GraphQLRequestClientFactoryConfig): GraphQLRequestClientFactory;
|
|
109
107
|
/**
|
|
110
108
|
* Execute graphql request
|
|
111
109
|
* @param {string | DocumentNode} query graphql query
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-request-client.d.ts","sourceRoot":"","sources":["../src/graphql-request-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAkB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGlF;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,CAAC,CAAC,EACP,KAAK,EAAE,MAAM,GAAG,YAAY,EAC5B,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,EACtC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,CAAC,CAAC,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,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