@symbo.ls/fetch 2.11.291 → 2.11.312
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/cjs/index.js +5 -2
- package/index.js +5 -3
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var utils = __toESM(require("@domql/utils"), 1);
|
|
|
38
38
|
var globals = __toESM(require("@domql/globals"), 1);
|
|
39
39
|
const { overwriteDeep, deepDestringify } = utils;
|
|
40
40
|
const { window } = globals;
|
|
41
|
-
const IS_DEVELOPMENT = window && window.location ? window.location.host.includes("dev.")
|
|
41
|
+
const IS_DEVELOPMENT = window && window.location ? window.location.host.includes("dev.") : true;
|
|
42
42
|
const SERVER_URL = IS_DEVELOPMENT ? "http://localhost:13335/get/" : "https://api.symbols.app/get/";
|
|
43
43
|
const defaultOptions = {
|
|
44
44
|
endpoint: SERVER_URL
|
|
@@ -63,8 +63,10 @@ const fetchRemote = async (key, options = defaultOptions) => {
|
|
|
63
63
|
};
|
|
64
64
|
const fetchProject = async (key, options) => {
|
|
65
65
|
const { editor } = options;
|
|
66
|
+
console.log(editor);
|
|
66
67
|
if (editor && editor.remote) {
|
|
67
68
|
const data = await fetchRemote(key, editor);
|
|
69
|
+
console.log(data);
|
|
68
70
|
const evalData = IS_DEVELOPMENT ? deepDestringify(data) : deepDestringify(data.releases[0]);
|
|
69
71
|
if (editor.serviceRoute) {
|
|
70
72
|
if (utils.isArray(editor.serviceRoute)) {
|
|
@@ -94,7 +96,8 @@ const fetchProjectAsync = async (key, options, callback) => {
|
|
|
94
96
|
const { editor } = options;
|
|
95
97
|
if (editor && editor.remote) {
|
|
96
98
|
const data = await fetchRemote(key, editor);
|
|
97
|
-
|
|
99
|
+
console.log(data);
|
|
100
|
+
const evalData = IS_DEVELOPMENT || options.isDevelopment ? deepDestringify(data) : deepDestringify(data.releases[0]);
|
|
98
101
|
callback(evalData);
|
|
99
102
|
}
|
|
100
103
|
};
|
package/index.js
CHANGED
|
@@ -7,8 +7,7 @@ const { window } = globals
|
|
|
7
7
|
|
|
8
8
|
const IS_DEVELOPMENT =
|
|
9
9
|
window && window.location
|
|
10
|
-
? window.location.host.includes('dev.')
|
|
11
|
-
window.location.host.includes('symbo.ls')
|
|
10
|
+
? window.location.host.includes('dev.')
|
|
12
11
|
: process.env.NODE_ENV === 'development'
|
|
13
12
|
|
|
14
13
|
const SERVER_URL = IS_DEVELOPMENT
|
|
@@ -46,8 +45,10 @@ export const fetchRemote = async (key, options = defaultOptions) => {
|
|
|
46
45
|
export const fetchProject = async (key, options) => {
|
|
47
46
|
const { editor } = options
|
|
48
47
|
|
|
48
|
+
console.log(editor)
|
|
49
49
|
if (editor && editor.remote) {
|
|
50
50
|
const data = await fetchRemote(key, editor)
|
|
51
|
+
console.log(data)
|
|
51
52
|
const evalData = IS_DEVELOPMENT
|
|
52
53
|
? deepDestringify(data)
|
|
53
54
|
: deepDestringify(data.releases[0])
|
|
@@ -83,7 +84,8 @@ export const fetchProjectAsync = async (key, options, callback) => {
|
|
|
83
84
|
|
|
84
85
|
if (editor && editor.remote) {
|
|
85
86
|
const data = await fetchRemote(key, editor)
|
|
86
|
-
|
|
87
|
+
console.log(data)
|
|
88
|
+
const evalData = (IS_DEVELOPMENT || options.isDevelopment)
|
|
87
89
|
? deepDestringify(data)
|
|
88
90
|
: deepDestringify(data.releases[0])
|
|
89
91
|
callback(evalData)
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/fetch",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.312",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "513a605a59275b54c8a81b82ce6e7d7177521da9",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "index.js",
|
|
8
8
|
"main": "index.js",
|