Skip to content

Commit

Permalink
Add explicit ws dependency (#865)
Browse files Browse the repository at this point in the history
* install ws

* add custom docs url for 403 errors

* update changelog

* Update packages/pwa-kit-dev/CHANGELOG.md

Co-authored-by: Kevin He <[email protected]>
  • Loading branch information
raiyaj and kevinxh authored Dec 16, 2022
1 parent 9b843f7 commit f9536a5
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 10 deletions.
3 changes: 3 additions & 0 deletions packages/pwa-kit-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v2.4.1 (Dec 16, 2022)
- Add explicit `ws` dependency [#865](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/865)

## v2.4.0 (Dec 01, 2022)
- Add `tail-logs` command [#789](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/789)
- Upgrade minimatch [#793](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/793)
Expand Down
73 changes: 64 additions & 9 deletions packages/pwa-kit-dev/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/pwa-kit-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"webpack-dev-middleware": "^5.2.2",
"webpack-hot-middleware": "^2.25.1",
"webpack-hot-server-middleware": "^0.6.1",
"webpack-notifier": "^1.12.0"
"webpack-notifier": "^1.12.0",
"ws": "^8.11.0"
},
"devDependencies": {
"@loadable/component": "^5.15.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/pwa-kit-dev/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ Utils.errorForStatus = (response) => {
error = {}
}

if (status === 403) {
error.docs_url =
'https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/mrt-overview.html#users,-abilities,-and-roles'
}

return new Error(
[
`HTTP ${status}`,
Expand Down

0 comments on commit f9536a5

Please sign in to comment.