@symbo.ls/fetch 3.2.3 → 3.2.8
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 +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/iife/index.js +2856 -0
- package/index.js +8 -8
- package/package.json +19 -16
- package/dist/cjs/package.json +0 -4
package/dist/cjs/index.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
var utils = __toESM(require("@domql/utils"), 1);
|
|
38
|
-
const { window, overwriteDeep,
|
|
38
|
+
const { window, overwriteDeep, deepDestringifyFunctions } = utils;
|
|
39
39
|
const IS_DEVELOPMENT = window && window.location ? window.location.host.includes("dev.") : utils.isDevelopment();
|
|
40
40
|
const SERVER_URL = IS_DEVELOPMENT ? "http://localhost:8080/get" : "https://api.symbols.app/get";
|
|
41
41
|
const defaultOptions = {
|
|
@@ -65,7 +65,7 @@ const fetchProject = async (key, options) => {
|
|
|
65
65
|
const { editor } = options;
|
|
66
66
|
if (editor && editor.remote) {
|
|
67
67
|
const data = await fetchRemote(key, editor);
|
|
68
|
-
const evalData = IS_DEVELOPMENT || options.isDevelopment ?
|
|
68
|
+
const evalData = IS_DEVELOPMENT || options.isDevelopment ? deepDestringifyFunctions(data) : deepDestringifyFunctions(data.releases[0]);
|
|
69
69
|
if (editor.serviceRoute) {
|
|
70
70
|
if (utils.isArray(editor.serviceRoute)) {
|
|
71
71
|
editor.serviceRoute.forEach((route) => {
|
|
@@ -97,7 +97,7 @@ const fetchProjectAsync = async (key, options, callback) => {
|
|
|
97
97
|
const { editor } = options;
|
|
98
98
|
if (editor && editor.remote) {
|
|
99
99
|
const data = await fetchRemote(key, editor);
|
|
100
|
-
const evalData = IS_DEVELOPMENT || options.isDevelopment ?
|
|
100
|
+
const evalData = IS_DEVELOPMENT || options.isDevelopment ? deepDestringifyFunctions(data) : deepDestringifyFunctions(data.releases[0]);
|
|
101
101
|
callback(evalData);
|
|
102
102
|
}
|
|
103
103
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as utils from "@domql/utils";
|
|
2
|
-
const { window, overwriteDeep,
|
|
2
|
+
const { window, overwriteDeep, deepDestringifyFunctions } = utils;
|
|
3
3
|
const IS_DEVELOPMENT = window && window.location ? window.location.host.includes("dev.") : utils.isDevelopment();
|
|
4
4
|
const SERVER_URL = IS_DEVELOPMENT ? "http://localhost:8080/get" : "https://api.symbols.app/get";
|
|
5
5
|
const defaultOptions = {
|
|
@@ -29,7 +29,7 @@ const fetchProject = async (key, options) => {
|
|
|
29
29
|
const { editor } = options;
|
|
30
30
|
if (editor && editor.remote) {
|
|
31
31
|
const data = await fetchRemote(key, editor);
|
|
32
|
-
const evalData = IS_DEVELOPMENT || options.isDevelopment ?
|
|
32
|
+
const evalData = IS_DEVELOPMENT || options.isDevelopment ? deepDestringifyFunctions(data) : deepDestringifyFunctions(data.releases[0]);
|
|
33
33
|
if (editor.serviceRoute) {
|
|
34
34
|
if (utils.isArray(editor.serviceRoute)) {
|
|
35
35
|
editor.serviceRoute.forEach((route) => {
|
|
@@ -61,7 +61,7 @@ const fetchProjectAsync = async (key, options, callback) => {
|
|
|
61
61
|
const { editor } = options;
|
|
62
62
|
if (editor && editor.remote) {
|
|
63
63
|
const data = await fetchRemote(key, editor);
|
|
64
|
-
const evalData = IS_DEVELOPMENT || options.isDevelopment ?
|
|
64
|
+
const evalData = IS_DEVELOPMENT || options.isDevelopment ? deepDestringifyFunctions(data) : deepDestringifyFunctions(data.releases[0]);
|
|
65
65
|
callback(evalData);
|
|
66
66
|
}
|
|
67
67
|
};
|