ide-assi 0.177.0 → 0.179.0

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.
@@ -193674,15 +193674,12 @@ class IdeAi
193674
193674
  }
193675
193675
 
193676
193676
  class IdeFetch {
193677
- static baseUrl = "/api";
193678
193677
 
193679
193678
  static #request = (method, url, data = {}) => {
193680
193679
 
193681
- console.log(method, url, data);
193680
+ //console.log(method, url, data);
193682
193681
 
193683
- const fullUrl = method === "GET"
193684
- ? `${IdeFetch.baseUrl}/${url}?${new URLSearchParams(data)}`
193685
- : `${IdeFetch.baseUrl}/${url}`;
193682
+ if (method === "GET") url += `?${new URLSearchParams(data)}`;
193686
193683
 
193687
193684
  const options = {
193688
193685
  method,
@@ -193693,7 +193690,7 @@ class IdeFetch {
193693
193690
  options.body = JSON.stringify(data);
193694
193691
  }
193695
193692
 
193696
- return fetch(fullUrl, options)
193693
+ return fetch(url, options)
193697
193694
  .then(res => {
193698
193695
  if (!res.ok) {
193699
193696
  return res.text().then(text => {
@@ -193769,7 +193766,7 @@ class IdeAssi extends HTMLElement
193769
193766
  };
193770
193767
 
193771
193768
  #config = async () => {
193772
- this.config = await api.post("/config/get");
193769
+ this.config = await api.post("/api/config/get");
193773
193770
  };
193774
193771
 
193775
193772
  #init = (info) => {
@@ -193670,15 +193670,12 @@ class IdeAi
193670
193670
  }
193671
193671
 
193672
193672
  class IdeFetch {
193673
- static baseUrl = "/api";
193674
193673
 
193675
193674
  static #request = (method, url, data = {}) => {
193676
193675
 
193677
- console.log(method, url, data);
193676
+ //console.log(method, url, data);
193678
193677
 
193679
- const fullUrl = method === "GET"
193680
- ? `${IdeFetch.baseUrl}/${url}?${new URLSearchParams(data)}`
193681
- : `${IdeFetch.baseUrl}/${url}`;
193678
+ if (method === "GET") url += `?${new URLSearchParams(data)}`;
193682
193679
 
193683
193680
  const options = {
193684
193681
  method,
@@ -193689,7 +193686,7 @@ class IdeFetch {
193689
193686
  options.body = JSON.stringify(data);
193690
193687
  }
193691
193688
 
193692
- return fetch(fullUrl, options)
193689
+ return fetch(url, options)
193693
193690
  .then(res => {
193694
193691
  if (!res.ok) {
193695
193692
  return res.text().then(text => {
@@ -193765,7 +193762,7 @@ class IdeAssi extends HTMLElement
193765
193762
  };
193766
193763
 
193767
193764
  #config = async () => {
193768
- this.config = await api.post("/config/get");
193765
+ this.config = await api.post("/api/config/get");
193769
193766
  };
193770
193767
 
193771
193768
  #init = (info) => {
@@ -56,7 +56,7 @@ export class IdeAssi extends HTMLElement
56
56
  };
57
57
 
58
58
  #config = async () => {
59
- this.config = await api.post("/config/get");
59
+ this.config = await api.post("/api/config/get");
60
60
  };
61
61
 
62
62
  #init = (info) => {
@@ -1,13 +1,10 @@
1
1
  export class IdeFetch {
2
- static baseUrl = "/api";
3
2
 
4
3
  static #request = (method, url, data = {}) => {
5
4
 
6
- console.log(method, url, data);
5
+ //console.log(method, url, data);
7
6
 
8
- const fullUrl = method === "GET"
9
- ? `${IdeFetch.baseUrl}/${url}?${new URLSearchParams(data)}`
10
- : `${IdeFetch.baseUrl}/${url}`;
7
+ if (method === "GET") url += `?${new URLSearchParams(data)}`;
11
8
 
12
9
  const options = {
13
10
  method,
@@ -18,7 +15,7 @@ export class IdeFetch {
18
15
  options.body = JSON.stringify(data);
19
16
  }
20
17
 
21
- return fetch(fullUrl, options)
18
+ return fetch(url, options)
22
19
  .then(res => {
23
20
  if (!res.ok) {
24
21
  return res.text().then(text => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.177.0",
4
+ "version": "0.179.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -56,7 +56,7 @@ export class IdeAssi extends HTMLElement
56
56
  };
57
57
 
58
58
  #config = async () => {
59
- this.config = await api.post("/config/get");
59
+ this.config = await api.post("/api/config/get");
60
60
  };
61
61
 
62
62
  #init = (info) => {
@@ -1,13 +1,10 @@
1
1
  export class IdeFetch {
2
- static baseUrl = "/api";
3
2
 
4
3
  static #request = (method, url, data = {}) => {
5
4
 
6
- console.log(method, url, data);
5
+ //console.log(method, url, data);
7
6
 
8
- const fullUrl = method === "GET"
9
- ? `${IdeFetch.baseUrl}/${url}?${new URLSearchParams(data)}`
10
- : `${IdeFetch.baseUrl}/${url}`;
7
+ if (method === "GET") url += `?${new URLSearchParams(data)}`;
11
8
 
12
9
  const options = {
13
10
  method,
@@ -18,7 +15,7 @@ export class IdeFetch {
18
15
  options.body = JSON.stringify(data);
19
16
  }
20
17
 
21
- return fetch(fullUrl, options)
18
+ return fetch(url, options)
22
19
  .then(res => {
23
20
  if (!res.ok) {
24
21
  return res.text().then(text => {