Skip to content

Commit ad6cd84

Browse files
authored
Merge pull request #13 from LambdaTest/stage
Release 1.1.2
2 parents 2800457 + 2d0636e commit ad6cd84

File tree

7 files changed

+38
-15
lines changed

7 files changed

+38
-15
lines changed

.github/workflows/npm-publish.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,26 @@ jobs:
2727
- run: npm install
2828
- run: npm publish --access public
2929
env:
30-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
30+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
31+
32+
- name: Send custom JSON data to Slack workflow
33+
id: slack
34+
uses: slackapi/[email protected]
35+
with:
36+
# For posting a rich message using Block Kit
37+
payload: |
38+
{
39+
"text": "GitHub Action build result for SmartUI-StoryBook: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
40+
"blocks": [
41+
{
42+
"type": "section",
43+
"text": {
44+
"type": "mrkdwn",
45+
"text": "`SmartUI-StoryBook-NPM-Package` GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
46+
}
47+
}
48+
]
49+
}
50+
env:
51+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
52+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

commands/storybook.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ async function storybook(serve, options) {
7272
})
7373
.catch(function (error) {
7474
if (error.response) {
75-
console.log('[smartui] Error: Cannot fetch Storybook stories');
75+
console.log('[smartui] Cannot fetch stories. Error: ', error.message);
7676
} else if (error.request) {
77-
console.log('[smartui] Error: Cannot fetch Storybook stories');
77+
console.log('[smartui] Cannot fetch stories. Error: ', error.message);
7878
} else {
79-
console.log('[smartui] Error: Cannot fetch Storybook stories');
79+
console.log('[smartui] Cannot fetch stories. Error: ', error.message);
8080
}
8181
});
8282

commands/utils/dom.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ async function sendDoM(storybookUrl, stories, storybookConfig, options) {
1717
if (!fs.existsSync('doms')){
1818
fs.mkdir('doms', (err) => {
1919
if (err) {
20-
return console.error(err);
20+
console.error(err);
21+
process.exit(1);
2122
}
2223
});
2324
}

commands/utils/validate.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ function validateProjectToken(options) {
1414
})
1515
.catch(function (error) {
1616
if (error.response) {
17-
console.log('[smartui] ] Error: Invalid Project Token');
17+
console.log('[smartui] Error: Invalid Project Token');
1818
} else if (error.request) {
19-
console.log('[smartui] ] Error: Project Token could not be validated');
19+
console.log('[smartui] Project Token not validated. Error: ', error.message);
2020
} else {
21-
console.log('[smartui] ] Error: Project Token could not be validated');
21+
console.log('[smartui] Project Token not validated. Error: ', error.message);
2222
}
2323
process.exit(0);
2424
});
@@ -43,11 +43,11 @@ function validateStorybookUrl(url) {
4343
})
4444
.catch(function (error) {
4545
if (error.response) {
46-
console.log('[smartui] Error: Connection to storybook could not be established');
46+
console.log('[smartui] Connection to storybook not established. Error: ', error.message);
4747
} else if (error.request) {
48-
console.log('[smartui] Error: Connection to storybook could not be established');
48+
console.log('[smartui] Connection to storybook not established. Error: ', error.message);
4949
} else {
50-
console.log('[smartui] Error: Connection to storybook could not be established');
50+
console.log('[smartui] Connection to storybook not established. Error: ', error.message);
5151
}
5252
process.exit(0);
5353
});

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { createConfig } = require('./commands/config');
99
program
1010
.name('smartui')
1111
.description('CLI to help you run your SmartUI tests on LambdaTest platform')
12-
.version('1.1.1')
12+
.version('1.1.2')
1313
.addOption(new Option('--env <prod|stage>', 'Runtime environment option').choices(['prod', 'stage']));
1414

1515
const configCommand = program.command('config')

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-storybook",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "LambdaTest's command-line interface (CLI) aimed to help you run your SmartUI tests on LambdaTest platform",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)