ws-process 0.3.57 → 0.3.58

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.
Files changed (2) hide show
  1. package/index.js +15 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -626,8 +626,22 @@ function asyncSend(msg) {
626
626
  if (altDomain) {
627
627
  url = [altDomain, msg.url.replace(/^\/{0,}/, '')].join('/');
628
628
  } else {
629
+ const defaultDomain = [
630
+ 'https://',
631
+ [
632
+ 'api',
633
+ ['dev', 'staging'].find(
634
+ (each) => each === local.stage,
635
+ )
636
+ ? 'dev'
637
+ : null,
638
+ ]
639
+ .filter(Boolean)
640
+ .join('-'),
641
+ '.bsg.support',
642
+ ].join('');
629
643
  url = [
630
- user.system?.useApi2 === true ? 'https://api2.bsg.support' : 'https://api.bsg.support',
644
+ user.system?.useApi2 === true ? 'https://api2.bsg.support' : defaultDomain,
631
645
  msg.url.replace(/^\/{0,}/, ''),
632
646
  ].join('/');
633
647
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws-process",
3
- "version": "0.3.57",
3
+ "version": "0.3.58",
4
4
  "description": "Process Management for Web Socket Client",
5
5
  "main": "index.js",
6
6
  "type": "module",