@symbo.ls/fetch 2.31.26 → 2.31.27

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 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, deepDestringify } = utils;
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 ? deepDestringify(data) : deepDestringify(data.releases[0]);
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 ? deepDestringify(data) : deepDestringify(data.releases[0]);
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, deepDestringify } = utils;
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 ? deepDestringify(data) : deepDestringify(data.releases[0]);
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 ? deepDestringify(data) : deepDestringify(data.releases[0]);
64
+ const evalData = IS_DEVELOPMENT || options.isDevelopment ? deepDestringifyFunctions(data) : deepDestringifyFunctions(data.releases[0]);
65
65
  callback(evalData);
66
66
  }
67
67
  };
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import * as utils from '@domql/utils'
4
- const { window, overwriteDeep, deepDestringify } = utils
4
+ const { window, overwriteDeep, deepDestringifyFunctions } = utils
5
5
 
6
6
  const IS_DEVELOPMENT =
7
7
  window && window.location
@@ -22,7 +22,7 @@ export const fetchRemote = async (key, options = defaultOptions) => {
22
22
  const baseUrl = options.endpoint || SERVER_URL
23
23
  const route = options.serviceRoute
24
24
  ? utils.isArray(options.serviceRoute)
25
- ? options.serviceRoute.map(v => v.toLowerCase() + '=true').join('&')
25
+ ? options.serviceRoute.map((v) => v.toLowerCase() + '=true').join('&')
26
26
  : options.serviceRoute
27
27
  : ''
28
28
 
@@ -51,12 +51,12 @@ export const fetchProject = async (key, options) => {
51
51
  const data = await fetchRemote(key, editor)
52
52
  const evalData =
53
53
  IS_DEVELOPMENT || options.isDevelopment
54
- ? deepDestringify(data)
55
- : deepDestringify(data.releases[0])
54
+ ? deepDestringifyFunctions(data)
55
+ : deepDestringifyFunctions(data.releases[0])
56
56
 
57
57
  if (editor.serviceRoute) {
58
58
  if (utils.isArray(editor.serviceRoute)) {
59
- editor.serviceRoute.forEach(route => {
59
+ editor.serviceRoute.forEach((route) => {
60
60
  overwriteDeep(options[route], evalData[route.toLowerCase()])
61
61
  })
62
62
  } else {
@@ -73,7 +73,7 @@ export const fetchProject = async (key, options) => {
73
73
  'files',
74
74
  'packages',
75
75
  'functions'
76
- ].forEach(key => {
76
+ ].forEach((key) => {
77
77
  overwriteDeep(options[key], evalData[key.toLowerCase()])
78
78
  })
79
79
  }
@@ -89,8 +89,8 @@ export const fetchProjectAsync = async (key, options, callback) => {
89
89
  const data = await fetchRemote(key, editor)
90
90
  const evalData =
91
91
  IS_DEVELOPMENT || options.isDevelopment
92
- ? deepDestringify(data)
93
- : deepDestringify(data.releases[0])
92
+ ? deepDestringifyFunctions(data)
93
+ : deepDestringifyFunctions(data.releases[0])
94
94
  callback(evalData)
95
95
  }
96
96
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/fetch",
3
- "version": "2.31.26",
3
+ "version": "2.31.27",
4
4
  "license": "MIT",
5
- "gitHead": "126577d65a218af7e2f66b0a3f9691942ee8b9d2",
5
+ "gitHead": "0edcd5aae5c16b6a53a7e9b6512bb2562e8eb8a1",
6
6
  "type": "module",
7
7
  "module": "index.js",
8
8
  "main": "index.js",
@@ -29,6 +29,6 @@
29
29
  "prepublish": "npm run build; npm run copy:package:cjs"
30
30
  },
31
31
  "dependencies": {
32
- "@domql/utils": "^2.31.26"
32
+ "@domql/utils": "^2.31.27"
33
33
  }
34
34
  }