Skip to content

Commit b5df9f4

Browse files
committed
Stack breaks added
1 parent 39b4675 commit b5df9f4

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Publish package to NPM repository
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
publish-npm:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '12.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: npm ci
19+
- run: npm publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
publish-git:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: '12.x'
29+
registry-url: 'https://registry.npmjs.org'
30+
scope: '@contentstack'
31+
- run: npm ci
32+
- run: npm publish
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ src
1818
.env
1919
*.tgz
2020
.talismanrc
21-
tap-html.html
21+
tap-html.html
22+
.github

src/core/stack.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export default class Stack {
8181
return this;
8282
} else {
8383
console.error("Kindly provide valid object parameters. The specified API Key, Delivery Token, or Environment Name is invalid.");
84+
break;
8485
}
8586
case 3:
8687
console.warn("WARNING! Obsolete function called. Function 'Contentstack.Stack(api_key, delivery_token, environment)' has been deprecated, please use 'Contentstack.Stack({api_key, delivery_token, environment, region, branch, fetchOptions})' function instead!");
@@ -93,6 +94,7 @@ export default class Stack {
9394
return this;
9495
} else {
9596
console.error("Kindly provide valid string parameters.");
97+
break;
9698
}
9799
case 4:
98100
console.warn("WARNING! Obsolete function called. Function 'Contentstack.Stack(api_key, delivery_token, environment)' has been deprecated, please use 'Contentstack.Stack({api_key, delivery_token, environment, region, branch, fetchOptions})' function instead!");

0 commit comments

Comments
 (0)