@symbo.ls/fetch 2.11.410 → 2.11.431

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
@@ -46,10 +46,10 @@ const defaultOptions = {
46
46
  const fetch = globalThis.fetch;
47
47
  const fetchRemote = async (key, options = defaultOptions) => {
48
48
  const baseUrl = options.endpoint || SERVER_URL;
49
- const route = options.serviceRoute ? utils.isArray(options.serviceRoute) ? options.serviceRoute.map((v) => v.toLowerCase()).join(",") : options.serviceRoute : "";
49
+ const route = options.serviceRoute ? utils.isArray(options.serviceRoute) ? options.serviceRoute.map((v) => v.toLowerCase() + "=true").join("&") : options.serviceRoute : "";
50
50
  let response;
51
51
  try {
52
- response = await fetch(baseUrl + "/" + route, {
52
+ response = await fetch(baseUrl + "/?" + route, {
53
53
  method: "GET",
54
54
  headers: { "Content-Type": "application/json", "X-AppKey": key, "X-Metadata": options.metadata }
55
55
  });
@@ -82,6 +82,8 @@ const fetchProject = async (key, options) => {
82
82
  "snippets",
83
83
  "pages",
84
84
  "utils",
85
+ "files",
86
+ "packages",
85
87
  "functions"
86
88
  ].forEach((key2) => {
87
89
  overwriteDeep(options[key2], evalData[key2.toLowerCase()]);
package/index.js CHANGED
@@ -24,13 +24,13 @@ export const fetchRemote = async (key, options = defaultOptions) => {
24
24
  const baseUrl = options.endpoint || SERVER_URL
25
25
  const route = options.serviceRoute
26
26
  ? utils.isArray(options.serviceRoute)
27
- ? options.serviceRoute.map((v) => v.toLowerCase()).join(',')
27
+ ? options.serviceRoute.map((v) => v.toLowerCase() + '=true').join('&')
28
28
  : options.serviceRoute
29
29
  : ''
30
30
 
31
31
  let response
32
32
  try {
33
- response = await fetch(baseUrl + '/' + route, {
33
+ response = await fetch(baseUrl + '/' + '?' + route, {
34
34
  method: 'GET',
35
35
  headers: { 'Content-Type': 'application/json', 'X-AppKey': key, 'X-Metadata': options.metadata }
36
36
  })
@@ -67,6 +67,8 @@ export const fetchProject = async (key, options) => {
67
67
  'snippets',
68
68
  'pages',
69
69
  'utils',
70
+ 'files',
71
+ 'packages',
70
72
  'functions'
71
73
  ].forEach((key) => {
72
74
  overwriteDeep(options[key], evalData[key.toLowerCase()])
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/fetch",
3
- "version": "2.11.410",
3
+ "version": "2.11.431",
4
4
  "license": "MIT",
5
- "gitHead": "8ea25d0b8ce6086f6892b69b372af85f80391a80",
5
+ "gitHead": "344741b514c3e90a1eca5e509880547b88c14eb2",
6
6
  "type": "module",
7
7
  "module": "index.js",
8
8
  "main": "index.js",