@symbo.ls/fetch 2.10.6 → 2.10.11
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/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var defaultOptions = {
|
|
|
30
30
|
};
|
|
31
31
|
var fetchRemote = async (key, options = defaultOptions) => {
|
|
32
32
|
let data = {};
|
|
33
|
-
await window.fetch(`https://${options.endpoint}/${options.route || ""}`, {
|
|
33
|
+
await window.fetch(`https://${options.endpoint || SERVER_URL}/${options.route || ""}`, {
|
|
34
34
|
method: "GET",
|
|
35
35
|
headers: { "Content-Type": "application/json", "X-AppKey": key }
|
|
36
36
|
}).then((response) => {
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../index.js"],
|
|
4
|
-
"sourcesContent": ["'use strict'\n\nconst SERVER_URL = window.location\n .host.includes('local')\n ? 'localhost:13335'\n : 'api.symbols.app'\n\nconst defaultOptions = {\n endpoint: SERVER_URL\n}\n \nexport const fetchRemote = async (key, options = defaultOptions) => {\n let data = {}\n await window.fetch(`https://${options.endpoint}/${options.route || ''}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json', 'X-AppKey': key }\n }).then((response) => {\n return response.json().then(d => data = d)\n })\n return data\n}\n\nexport const fetch = fetchRemote\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAM,aAAa,OAAO,SACvB,KAAK,SAAS,OAAO,IACpB,oBACA;AAEJ,IAAM,iBAAiB;AAAA,EACrB,UAAU;AACZ;AAEO,IAAM,cAAc,OAAO,KAAK,UAAU,mBAAmB;AAClE,MAAI,OAAO,CAAC;AACZ,QAAM,OAAO,MAAM,WAAW,QAAQ,YAAY,QAAQ,SAAS,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["'use strict'\n\nconst SERVER_URL = window.location\n .host.includes('local')\n ? 'localhost:13335'\n : 'api.symbols.app'\n\nconst defaultOptions = {\n endpoint: SERVER_URL\n}\n \nexport const fetchRemote = async (key, options = defaultOptions) => {\n let data = {}\n await window.fetch(`https://${options.endpoint || SERVER_URL}/${options.route || ''}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json', 'X-AppKey': key }\n }).then((response) => {\n return response.json().then(d => data = d)\n })\n return data\n}\n\nexport const fetch = fetchRemote\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAM,aAAa,OAAO,SACvB,KAAK,SAAS,OAAO,IACpB,oBACA;AAEJ,IAAM,iBAAiB;AAAA,EACrB,UAAU;AACZ;AAEO,IAAM,cAAc,OAAO,KAAK,UAAU,mBAAmB;AAClE,MAAI,OAAO,CAAC;AACZ,QAAM,OAAO,MAAM,WAAW,QAAQ,YAAY,cAAc,QAAQ,SAAS,MAAM;AAAA,IACrF,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,oBAAoB,YAAY,IAAI;AAAA,EACjE,CAAC,EAAE,KAAK,CAAC,aAAa;AACpB,WAAO,SAAS,KAAK,EAAE,KAAK,OAAK,OAAO,CAAC;AAAA,EAC3C,CAAC;AACD,SAAO;AACT;AAEO,IAAM,QAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const defaultOptions = {
|
|
|
11
11
|
|
|
12
12
|
export const fetchRemote = async (key, options = defaultOptions) => {
|
|
13
13
|
let data = {}
|
|
14
|
-
await window.fetch(`https://${options.endpoint}/${options.route || ''}`, {
|
|
14
|
+
await window.fetch(`https://${options.endpoint || SERVER_URL}/${options.route || ''}`, {
|
|
15
15
|
method: 'GET',
|
|
16
16
|
headers: { 'Content-Type': 'application/json', 'X-AppKey': key }
|
|
17
17
|
}).then((response) => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/fetch",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.11",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "cc4d2b38b197ae7540e1eb84b1eb3a7c244c3a46",
|
|
6
6
|
"source": "index.js",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"browser": "dist/index.js",
|