@ctx-core/graphql-client 7.0.114 → 7.0.118
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/CHANGELOG.md +31 -0
- package/{dist → lib}/FetchHttpHeaders.d.ts +0 -0
- package/{dist → lib}/FetchHttpHeaders.js +0 -0
- package/{dist → lib}/FetchHttpHeaders.js.map +0 -0
- package/{dist → lib}/FetchHttpOpts.d.ts +0 -0
- package/{dist → lib}/FetchHttpOpts.js +0 -0
- package/{dist → lib}/FetchHttpOpts.js.map +0 -0
- package/{dist → lib}/graphql_fetch.d.ts +0 -0
- package/{dist → lib}/graphql_fetch.js +1 -2
- package/{dist → lib}/graphql_fetch.js.map +1 -1
- package/{dist → lib}/graphql_fetch_.d.ts +0 -0
- package/{dist → lib}/graphql_fetch_.js +2 -4
- package/{dist → lib}/graphql_fetch_.js.map +1 -1
- package/{dist → lib}/graphql_port_txt_.d.ts +0 -0
- package/{dist → lib}/graphql_port_txt_.js +0 -0
- package/{dist → lib}/graphql_port_txt_.js.map +0 -0
- package/{dist → lib}/graphql_url_.d.ts +0 -0
- package/{dist → lib}/graphql_url_.js +0 -0
- package/{dist → lib}/graphql_url_.js.map +0 -0
- package/{dist → lib}/index.d.ts +0 -0
- package/{dist → lib}/index.js +0 -0
- package/{dist → lib}/index.js.map +0 -0
- package/package.json +14 -14
- package/tsconfig.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @ctx-core/graphql-client
|
|
2
2
|
|
|
3
|
+
## 7.0.118
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- update dependencies
|
|
8
|
+
|
|
9
|
+
## 7.0.117
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- version bump
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @ctx-core/dom@11.1.3
|
|
16
|
+
- @ctx-core/fetch@11.0.106
|
|
17
|
+
- @ctx-core/object@22.0.10
|
|
18
|
+
|
|
19
|
+
## 7.0.116
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- .js + .d.ts instead of .ts
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @ctx-core/dom@11.1.2
|
|
26
|
+
- @ctx-core/fetch@11.0.104
|
|
27
|
+
|
|
28
|
+
## 7.0.115
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- update dependencies
|
|
33
|
+
|
|
3
34
|
## 7.0.114
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { graphql_fetch_ } from './graphql_fetch_.js';
|
|
2
2
|
import { graphql_url_ } from './graphql_url_.js';
|
|
3
3
|
let in_graphql_fetch;
|
|
4
|
-
export function graphql_fetch(body, fn_in_http_opts = {
|
|
5
|
-
}) {
|
|
4
|
+
export function graphql_fetch(body, fn_in_http_opts = {}) {
|
|
6
5
|
if (!in_graphql_fetch) {
|
|
7
6
|
in_graphql_fetch = graphql_fetch_({
|
|
8
7
|
url: graphql_url_()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphql_fetch.ts"],"sourcesContent":["import { graphql_fetch_, graphql_fetch_T } from './graphql_fetch_.js'\nimport { graphql_url_ } from './graphql_url_.js'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nlet in_graphql_fetch: graphql_fetch_T\nexport function graphql_fetch<data_T extends unknown = unknown>(\n\tbody:string,\n\tfn_in_http_opts:FetchHttpOpts = {},\n):Promise<graphql_fetch_response_T<data_T>> {\n\tif (!in_graphql_fetch) {\n\t\tin_graphql_fetch = graphql_fetch_<data_T>({\n\t\t\turl: graphql_url_(),\n\t\t})\n\t}\n\treturn in_graphql_fetch(body, fn_in_http_opts) as Promise<graphql_fetch_response_T<data_T>>\n}\nexport interface graphql_fetch_response_T<data_T extends unknown = unknown> {\n\tdata: data_T\n}\nexport {\n\tgraphql_fetch as fetch_graphql,\n\tgraphql_fetch as fetch__graphql,\n}\n"],"names":["graphql_fetch_","graphql_url_","in_graphql_fetch","graphql_fetch","body","fn_in_http_opts","url","fetch_graphql","fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,cAAc,QAAyB,CAAqB;AACrE,MAAM,GAAGC,YAAY,QAAQ,CAAmB;AAEhD,GAAG,CAACC,gBAAgB;AACpB,MAAM,UAAUC,aAAa,CAC5BC,IAAW,EACXC,eAA6B,GAAG,CAAC
|
|
1
|
+
{"version":3,"sources":["../src/graphql_fetch.ts"],"sourcesContent":["import { graphql_fetch_, graphql_fetch_T } from './graphql_fetch_.js'\nimport { graphql_url_ } from './graphql_url_.js'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nlet in_graphql_fetch: graphql_fetch_T\nexport function graphql_fetch<data_T extends unknown = unknown>(\n\tbody:string,\n\tfn_in_http_opts:FetchHttpOpts = {},\n):Promise<graphql_fetch_response_T<data_T>> {\n\tif (!in_graphql_fetch) {\n\t\tin_graphql_fetch = graphql_fetch_<data_T>({\n\t\t\turl: graphql_url_(),\n\t\t})\n\t}\n\treturn in_graphql_fetch(body, fn_in_http_opts) as Promise<graphql_fetch_response_T<data_T>>\n}\nexport interface graphql_fetch_response_T<data_T extends unknown = unknown> {\n\tdata: data_T\n}\nexport {\n\tgraphql_fetch as fetch_graphql,\n\tgraphql_fetch as fetch__graphql,\n}\n"],"names":["graphql_fetch_","graphql_url_","in_graphql_fetch","graphql_fetch","body","fn_in_http_opts","url","fetch_graphql","fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,cAAc,QAAyB,CAAqB;AACrE,MAAM,GAAGC,YAAY,QAAQ,CAAmB;AAEhD,GAAG,CAACC,gBAAgB;AACpB,MAAM,UAAUC,aAAa,CAC5BC,IAAW,EACXC,eAA6B,GAAG,CAAC,CAAC,EACS,CAAC;IAC5C,EAAE,GAAGH,gBAAgB,EAAE,CAAC;QACvBA,gBAAgB,GAAGF,cAAc,CAAS,CAAC;YAC1CM,GAAG,EAAEL,YAAY;QAClB,CAAC;IACF,CAAC;IACD,MAAM,CAACC,gBAAgB,CAACE,IAAI,EAAEC,eAAe;AAC9C,CAAC;AAID,MAAM,GACLF,aAAa,IAAII,aAAa,EAC9BJ,aAAa,IAAIK,cAAc"}
|
|
File without changes
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { fetch } from '@ctx-core/fetch';
|
|
2
2
|
import { assign } from '@ctx-core/object';
|
|
3
|
-
export function graphql_fetch_(in_http_opts = {
|
|
4
|
-
}) {
|
|
5
|
-
return async function graphql_fetch(body, fn_in_http_opts = {
|
|
6
|
-
}) {
|
|
3
|
+
export function graphql_fetch_(in_http_opts = {}) {
|
|
4
|
+
return async function graphql_fetch(body, fn_in_http_opts = {}) {
|
|
7
5
|
const url = fn_in_http_opts.url || in_http_opts.url;
|
|
8
6
|
if (!url) {
|
|
9
7
|
throw `no url prop`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphql_fetch_.ts"],"sourcesContent":["import { fetch } from '@ctx-core/fetch'\nimport { assign } from '@ctx-core/object'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nexport function graphql_fetch_<O1 extends unknown = unknown>(\n\tin_http_opts = {} as FetchHttpOpts\n):graphql_fetch_T<O1> {\n\treturn async function graphql_fetch<O2 extends unknown = O1>(\n\t\tbody:string,\n\t\tfn_in_http_opts:FetchHttpOpts = {},\n\t):Promise<O2> {\n\t\tconst url = fn_in_http_opts.url || in_http_opts.url\n\t\tif (!url) {\n\t\t\tthrow `no url prop`\n\t\t}\n\t\tconst response = await fetch(url, assign({\n\t\t\tmethod: 'POST',\n\t\t\theaders: assign({\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t}, in_http_opts.headers, fn_in_http_opts.headers),\n\t\t\tbody,\n\t\t}, in_http_opts, fn_in_http_opts))\n\t\tif (!response.ok) {\n\t\t\tif (process.env.NODE_ENV === 'production') {\n\t\t\t\tconsole.error(await response.text())\n\t\t\t\tthrow `Error fetching graphql`\n\t\t\t} else {\n\t\t\t\tthrow (await response.text())\n\t\t\t}\n\t\t}\n\t\tconst payload = await response.json()\n\t\tif (payload.errors) throw payload\n\t\treturn payload as O2\n\t}\n}\nexport type graphql_fetch_T<O extends unknown = unknown> =\n\t(body:string, fn_in_http_opts:FetchHttpOpts)=>Promise<O>\nexport {\n\tgraphql_fetch_ as _graphql_fetch,\n\tgraphql_fetch_ as _fetch__graphql,\n}\n"],"names":["fetch","assign","graphql_fetch_","in_http_opts","graphql_fetch","body","fn_in_http_opts","url","response","method","headers","ok","process","env","NODE_ENV","console","error","text","payload","json","errors","_graphql_fetch","_fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,MAAM,QAAQ,CAAkB;AAEzC,MAAM,UAAUC,cAAc,CAC7BC,YAAY,GAAG,CAAC
|
|
1
|
+
{"version":3,"sources":["../src/graphql_fetch_.ts"],"sourcesContent":["import { fetch } from '@ctx-core/fetch'\nimport { assign } from '@ctx-core/object'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nexport function graphql_fetch_<O1 extends unknown = unknown>(\n\tin_http_opts = {} as FetchHttpOpts\n):graphql_fetch_T<O1> {\n\treturn async function graphql_fetch<O2 extends unknown = O1>(\n\t\tbody:string,\n\t\tfn_in_http_opts:FetchHttpOpts = {},\n\t):Promise<O2> {\n\t\tconst url = fn_in_http_opts.url || in_http_opts.url\n\t\tif (!url) {\n\t\t\tthrow `no url prop`\n\t\t}\n\t\tconst response = await fetch(url, assign({\n\t\t\tmethod: 'POST',\n\t\t\theaders: assign({\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t}, in_http_opts.headers, fn_in_http_opts.headers),\n\t\t\tbody,\n\t\t}, in_http_opts, fn_in_http_opts))\n\t\tif (!response.ok) {\n\t\t\tif (process.env.NODE_ENV === 'production') {\n\t\t\t\tconsole.error(await response.text())\n\t\t\t\tthrow `Error fetching graphql`\n\t\t\t} else {\n\t\t\t\tthrow (await response.text())\n\t\t\t}\n\t\t}\n\t\tconst payload = await response.json()\n\t\tif (payload.errors) throw payload\n\t\treturn payload as O2\n\t}\n}\nexport type graphql_fetch_T<O extends unknown = unknown> =\n\t(body:string, fn_in_http_opts:FetchHttpOpts)=>Promise<O>\nexport {\n\tgraphql_fetch_ as _graphql_fetch,\n\tgraphql_fetch_ as _fetch__graphql,\n}\n"],"names":["fetch","assign","graphql_fetch_","in_http_opts","graphql_fetch","body","fn_in_http_opts","url","response","method","headers","ok","process","env","NODE_ENV","console","error","text","payload","json","errors","_graphql_fetch","_fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,MAAM,QAAQ,CAAkB;AAEzC,MAAM,UAAUC,cAAc,CAC7BC,YAAY,GAAG,CAAC,CAAC,EACI,CAAC;IACtB,MAAM,gBAAgBC,aAAa,CAClCC,IAAW,EACXC,eAA6B,GAAG,CAAC,CAAC,EACrB,CAAC;QACd,KAAK,CAACC,GAAG,GAAGD,eAAe,CAACC,GAAG,IAAIJ,YAAY,CAACI,GAAG;QACnD,EAAE,GAAGA,GAAG,EAAE,CAAC;YACV,KAAK,EAAE,WAAW;QACnB,CAAC;QACD,KAAK,CAACC,QAAQ,GAAG,KAAK,CAACR,KAAK,CAACO,GAAG,EAAEN,MAAM,CAAC,CAAC;YACzCQ,MAAM,EAAE,CAAM;YACdC,OAAO,EAAET,MAAM,CAAC,CAAC;gBAChB,CAAc,eAAE,CAAkB;YACnC,CAAC,EAAEE,YAAY,CAACO,OAAO,EAAEJ,eAAe,CAACI,OAAO;YAChDL,IAAI;QACL,CAAC,EAAEF,YAAY,EAAEG,eAAe;QAChC,EAAE,GAAGE,QAAQ,CAACG,EAAE,EAAE,CAAC;YAClB,EAAE,EAAEC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,CAAY,aAAE,CAAC;gBAC3CC,OAAO,CAACC,KAAK,CAAC,KAAK,CAACR,QAAQ,CAACS,IAAI;gBACjC,KAAK,EAAE,sBAAsB;YAC9B,CAAC,MAAM,CAAC;gBACP,KAAK,CAAE,KAAK,CAACT,QAAQ,CAACS,IAAI;YAC3B,CAAC;QACF,CAAC;QACD,KAAK,CAACC,OAAO,GAAG,KAAK,CAACV,QAAQ,CAACW,IAAI;QACnC,EAAE,EAAED,OAAO,CAACE,MAAM,EAAE,KAAK,CAACF,OAAO;QACjC,MAAM,CAACA,OAAO;IACf,CAAC;AACF,CAAC;AAGD,MAAM,GACLhB,cAAc,IAAImB,cAAc,EAChCnB,cAAc,IAAIoB,eAAe"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{dist → lib}/index.d.ts
RENAMED
|
File without changes
|
package/{dist → lib}/index.js
RENAMED
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/graphql-client",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.118",
|
|
4
4
|
"description": "ctx-core graphql-client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"author": "Brian Takita",
|
|
19
19
|
"type": "module",
|
|
20
|
-
"types": "./
|
|
20
|
+
"types": "./lib/index.d.ts",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
-
"import": "./
|
|
23
|
+
"import": "./lib/index.js"
|
|
24
24
|
},
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ctx-core/dom": "^11.
|
|
29
|
-
"@ctx-core/fetch": "^11.0.
|
|
30
|
-
"@ctx-core/object": "^22.0.
|
|
28
|
+
"@ctx-core/dom": "^11.1.3",
|
|
29
|
+
"@ctx-core/fetch": "^11.0.107",
|
|
30
|
+
"@ctx-core/object": "^22.0.10"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@swc/cli": "^0.1.55",
|
|
34
|
-
"@swc/core": "^1.2.
|
|
35
|
-
"@types/node": "^17.0.
|
|
34
|
+
"@swc/core": "^1.2.125",
|
|
35
|
+
"@types/node": "^17.0.7",
|
|
36
36
|
"rimraf": "^3.0.2",
|
|
37
37
|
"typescript": "next"
|
|
38
38
|
},
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"access": "public",
|
|
41
41
|
"cache": "~/.npm"
|
|
42
42
|
},
|
|
43
|
-
"svelte": "./
|
|
43
|
+
"svelte": "./lib/index.js",
|
|
44
44
|
"scripts": {
|
|
45
45
|
"@ctx-core/graphql": "workspace:^9.0.30",
|
|
46
46
|
"build": "npm run compile",
|
|
47
|
-
"clean": "rimraf
|
|
48
|
-
"
|
|
49
|
-
"compile": "npm run
|
|
50
|
-
"
|
|
51
|
-
"
|
|
47
|
+
"clean": "rimraf lib && npm run clean:tsbuildinfo",
|
|
48
|
+
"clean:tsbuildinfo": "rimraf tsconfig.tsbuildinfo && rimraf lib/**/*.d.ts",
|
|
49
|
+
"compile": "npm run compile:source && npm run compile:declaration",
|
|
50
|
+
"compile:source": "swc src --out-dir lib --copy-files --source-maps --config-file .swcrc",
|
|
51
|
+
"compile:declaration": "npm run clean:tsbuildinfo && tsc --declaration --emitDeclarationOnly --declarationDir lib",
|
|
52
52
|
"exec": "$@"
|
|
53
53
|
},
|
|
54
54
|
"readme": "# @ctx-core/graphql-client\n\nGraphQL client logic\n"
|
package/tsconfig.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"node_modules/@types"
|
|
23
23
|
],
|
|
24
24
|
"rootDir": "src",
|
|
25
|
-
"outDir": "
|
|
26
|
-
"declarationDir": "
|
|
25
|
+
"outDir": "lib",
|
|
26
|
+
"declarationDir": "lib",
|
|
27
27
|
"lib": ["dom", "ESNext"],
|
|
28
28
|
"types": [
|
|
29
29
|
"node"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"exclude": [
|
|
35
35
|
"node_modules",
|
|
36
|
-
"
|
|
36
|
+
"lib"
|
|
37
37
|
],
|
|
38
38
|
"references": []
|
|
39
39
|
}
|