sr-npm 1.7.312 → 1.7.313

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/utils.js +32 -29
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.312",
3
+ "version": "1.7.313",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/utils.js CHANGED
@@ -31,42 +31,45 @@ function htmlToText(html) {
31
31
  }
32
32
 
33
33
  async function htmlToRichContent(htmlString) {
34
- console.log("htmlString **********",htmlString)
35
- const raw = JSON.stringify({
36
- "content": htmlString
37
- });
34
+ console.log("i am here")
35
+ const serverlessAuth = await getServerlessAuth()
36
+ console.log("serverlessAuth **********",serverlessAuth)
37
+ // console.log("htmlString **********",htmlString)
38
+ // const raw = JSON.stringify({
39
+ // "content": htmlString
40
+ // });
38
41
 
39
42
 
40
- const requestOptions = {
41
- method: "post",
42
- headers: {
43
- "Content-Type": "application/json",
44
- "Cookie": "XSRF-TOKEN=1753949844|p--a7HsuVjR4",
45
- "Authorization": "Bearer "+await getServerlessAuth()
43
+ // const requestOptions = {
44
+ // method: "post",
45
+ // headers: {
46
+ // "Content-Type": "application/json",
47
+ // "Cookie": "XSRF-TOKEN=1753949844|p--a7HsuVjR4",
48
+ // "Authorization": "Bearer "+await getServerlessAuth()
46
49
 
47
- },
48
- body: raw
49
- };
50
+ // },
51
+ // body: raw
52
+ // };
50
53
 
51
- console.log("requestOptions **********",requestOptions)
54
+ // console.log("requestOptions **********",requestOptions)
52
55
 
53
- try{
54
- const response = await fetch("https://www.wixapis.com/data-sync/v1/abmp-content-converter", requestOptions);
55
- if (response.ok) {
56
- const data = await response.json();
57
- console.log("data.richContent **********",data.richContent)
58
- return data.richContent;
59
- }
56
+ // try{
57
+ // const response = await fetch("https://www.wixapis.com/data-sync/v1/abmp-content-converter", requestOptions);
58
+ // if (response.ok) {
59
+ // const data = await response.json();
60
+ // console.log("data.richContent **********",data.richContent)
61
+ // return data.richContent;
62
+ // }
60
63
 
61
- else
62
- {
63
- console.error(`error in fetching data, response: ${response}`);
64
+ // else
65
+ // {
66
+ // console.error(`error in fetching data, response: ${response}`);
64
67
 
65
- }
66
- }
67
- catch(error){
68
- console.error("error in fetching data",error);
69
- }
68
+ // }
69
+ // }
70
+ // catch(error){
71
+ // console.error("error in fetching data",error);
72
+ // }
70
73
  }
71
74
 
72
75
  function filterBrokenMarkers(items) {