sr-npm 1.7.305 → 1.7.307

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 +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.305",
3
+ "version": "1.7.307",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/utils.js CHANGED
@@ -1,4 +1,11 @@
1
1
  const { fetch } = require('wix-fetch');
2
+ const { wixSecretsBackend } = require('wix-secrets-backend');
3
+
4
+
5
+ async function getServerlessAuth() {
6
+ const serverlessAuth = await wixSecretsBackend.getSecret("serverless_auth")
7
+ return serverlessAuth
8
+ }
2
9
 
3
10
  function htmlToText(html) {
4
11
  if (!html) return '';
@@ -33,7 +40,7 @@ async function htmlToRichContent(htmlString) {
33
40
  headers: {
34
41
  "Content-Type": "application/json",
35
42
  "Cookie": "XSRF-TOKEN=1753949844|p--a7HsuVjR4",
36
- "Authorization": "Bearer 2e19efe5f44d29d74480f5b744a5a90f19ba6ca7012ced19e7b14edb1ad6a641"
43
+ "Authorization": "Bearer "+await getServerlessAuth()
37
44
 
38
45
  },
39
46
  body: raw