@contentstack/marketplace-sdk 1.2.6 → 1.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/marketplace-sdk",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "The Contentstack Marketplace SDK is used to manage the content of your Contentstack marketplace apps",
5
5
  "main": "./dist/node/contentstack-marketplace.js",
6
6
  "browser": "./dist/web/contentstack-marketplace.js",
@@ -92,6 +92,6 @@
92
92
  "webpack-merge": "4.2.2"
93
93
  },
94
94
  "dependencies": {
95
- "axios": "^1.8.2"
95
+ "axios": "^1.8.4"
96
96
  }
97
97
  }
@@ -10,7 +10,7 @@ const user4 = process.env.USER4;
10
10
 
11
11
  const mochawesomeJsonOutput = fs.readFileSync(
12
12
  "./mochawesome-report/mochawesome.json",
13
- "utf-8"
13
+ "utf8"
14
14
  );
15
15
  const mochawesomeReport = JSON.parse(mochawesomeJsonOutput);
16
16
 
package/sanity-report.mjs CHANGED
@@ -5,7 +5,7 @@ import fs from 'fs'
5
5
 
6
6
  dotenv.config()
7
7
 
8
- const mochawesomeJsonOutput = fs.readFileSync('./mochawesome-report/mochawesome.json', 'utf-8')
8
+ const mochawesomeJsonOutput = fs.readFileSync('./mochawesome-report/mochawesome.json', 'utf8')
9
9
  const mochawesomeReport = JSON.parse(mochawesomeJsonOutput)
10
10
  const report = `./mochawesome-report/sanity-report.html`
11
11
 
@@ -25,8 +25,16 @@ console.log(`Failed Tests: ${failedTests}`)
25
25
  console.log(`Pending Tests: ${pendingTests}`)
26
26
  console.log(`Total Duration: ${durationInMinutes}m ${durationInSeconds.toFixed(2)}s`)
27
27
 
28
+ const host = process.env.DEFAULTHOST || ''
29
+ let region = 'NA'
30
+
31
+ const match = host.match(/^([^-]+(?:-[^-]+)*)-api/)
32
+ if (match && match[1]) {
33
+ region = match[1].toUpperCase()
34
+ }
35
+
28
36
  const slackMessage = `
29
- *JavaScript Marketplace SDK Report*
37
+ *JavaScript Marketplace SDK Report - ${region}*
30
38
  • Total Suites: *${totalSuites}*
31
39
  • Total Tests: *${totalTests}*
32
40
  • Passed Tests: *${passedTests}*