xtra-cli 1.0.1 → 1.0.2

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.
@@ -12,11 +12,13 @@ const config = new conf_1.default({
12
12
  apiUrl: PRODUCTION_API_URL,
13
13
  },
14
14
  });
15
- // Auto-heal: if an old localhost value was persisted, clear it so we use production.
15
+ // Auto-heal: if an old localhost or deprecated domain was persisted, clear it so we use production.
16
16
  // Users who intentionally want localhost should set XTRA_API_URL env var instead.
17
17
  const _storedApiUrl = config.get("apiUrl");
18
- if (_storedApiUrl && _storedApiUrl.includes("localhost") && !process.env.XTRA_API_URL) {
19
- config.set("apiUrl", PRODUCTION_API_URL);
18
+ if (_storedApiUrl && !process.env.XTRA_API_URL) {
19
+ if (_storedApiUrl.includes("localhost") || _storedApiUrl.includes("xtra-security.vercel.app")) {
20
+ config.set("apiUrl", PRODUCTION_API_URL);
21
+ }
20
22
  }
21
23
  const getConfig = () => ({
22
24
  ...config.store,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtra-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "CLI for XtraSecurity Platform",
5
5
  "main": "dist/index.js",
6
6
  "bin": {