sr-npm 1.7.840 → 1.7.842

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/backend/index.js CHANGED
@@ -5,6 +5,4 @@ module.exports = {
5
5
  ...require('./consts'),
6
6
  ...require('./data'),
7
7
  ...require('./careersMultiBoxesPageIds'),
8
- ...require('./secretsData'),
9
- ...require('./collectionConsts'),
10
8
  };
package/eslint.config.mjs CHANGED
@@ -19,7 +19,7 @@ export default defineConfig([
19
19
  {
20
20
  files: ["pages/**/*.js", "public/**/*.js"],
21
21
  languageOptions: {
22
- sourceType: "module",
22
+ sourceType: "commonjs",
23
23
  globals: { ...globals.browser },
24
24
  },
25
25
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.840",
3
+ "version": "1.7.842",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -21,7 +21,6 @@ async function homePageOnReady(_$w,thisObject=null) {
21
21
  bindPrimarySearch(_$w,allvaluesobjects,allJobs),
22
22
  loadPrimarySearchRepeater(_$w)
23
23
  ]);
24
-
25
24
  }
26
25
  else{
27
26
 
package/pages/index.js CHANGED
@@ -6,6 +6,6 @@ module.exports = {
6
6
  ...require('./pagesUtils'),
7
7
  ...require('./brandPage'),
8
8
  ...require('./supportTeamsPage'),
9
- ...require('./masterPage').default,
9
+ ...require('./masterPage'),
10
10
  };
11
11
 
@@ -1,16 +1,8 @@
1
- import { TEMPLATE_TYPE } from '../backend/collectionConsts';
2
-
3
- async function getApiKeys() {
4
- const response = await fetch('/_functions/getApiKeys');
5
- if (!response.ok) {
6
- console.error('Failed to fetch API key@$#@$#@$#@#$s');
7
- throw new Error('Failed to fetch API keys, response: ', response);
8
- }
9
- return await response.json();
10
- }
1
+ const { getApiKeys } = require('../backend/secretsData');
2
+ const { TEMPLATE_TYPE } = require('../backend/collectionConsts');
11
3
 
12
4
  async function masterPageOnReady(_$w) {
13
- const { companyId, templateType } = await getApiKeys();
5
+ ({ companyId, templateType } = await getApiKeys());
14
6
  console.log("companyId: ", companyId);
15
7
  console.log("templateType: ", templateType);
16
8
  if(templateType===TEMPLATE_TYPE.EXTERNAL){
@@ -19,8 +11,8 @@ async function masterPageOnReady(_$w) {
19
11
  else{
20
12
  console.log("templateType is internal");
21
13
  }
22
- }
14
+ }
23
15
 
24
- export default {
16
+ module.exports = {
25
17
  masterPageOnReady,
26
- };
18
+ };
@@ -1,23 +0,0 @@
1
- const { getApiKeys } = require('./secretsData');
2
- const { ok, badRequest } = require('wix-http-functions');
3
-
4
- export async function get_getApiKeys(request) {
5
- try {
6
- const data = await getApiKeys();
7
- return ok({
8
- body: data,
9
- headers: {
10
- "Content-Type": "application/json"
11
- }
12
- });
13
- } catch (error) {
14
- console.error('Error in get_getApiKeys:', error);
15
- return badRequest({
16
- body: { error: error.message },
17
- headers: {
18
- "Content-Type": "application/json"
19
- }
20
- });
21
- }
22
- }
23
-