owosk 0.2.2 → 0.2.3
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.
- package/dist/index.js +8 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,6 +17,9 @@ var GLOBAL_CONFIG_PATH = join(GLOBAL_CONFIG_DIR, "config.json");
|
|
|
17
17
|
function getApiUrl(configUrl) {
|
|
18
18
|
return process.env.OWOSTACK_API_URL || configUrl || "https://sandbox.owostack.com";
|
|
19
19
|
}
|
|
20
|
+
function getLiveApiUrl(configUrl) {
|
|
21
|
+
return process.env.OWOSTACK_API_LIVE_URL || process.env.OWOSTACK_API_URL || configUrl || "https://api.owostack.com";
|
|
22
|
+
}
|
|
20
23
|
function getTestApiUrl(configUrl) {
|
|
21
24
|
return process.env.OWOSTACK_API_TEST_URL || configUrl || "https://sandbox.owostack.com";
|
|
22
25
|
}
|
|
@@ -746,7 +749,7 @@ async function runSync(options) {
|
|
|
746
749
|
p2.intro(pc3.bgYellow(pc3.black(" sync ")));
|
|
747
750
|
const configSettings = await loadConfigSettings(options.config);
|
|
748
751
|
const testUrl = getTestApiUrl(configSettings.environments?.test);
|
|
749
|
-
const liveUrl =
|
|
752
|
+
const liveUrl = getLiveApiUrl(configSettings.environments?.live);
|
|
750
753
|
if (options.prod) {
|
|
751
754
|
p2.log.step(pc3.magenta("Production Mode: Syncing to PROD environment"));
|
|
752
755
|
await runSyncSingle({
|
|
@@ -754,7 +757,7 @@ async function runSync(options) {
|
|
|
754
757
|
dryRun: !!options.dryRun,
|
|
755
758
|
autoApprove: !!options.yes,
|
|
756
759
|
apiKey: options.key || "",
|
|
757
|
-
apiUrl:
|
|
760
|
+
apiUrl: liveUrl,
|
|
758
761
|
environment: "prod"
|
|
759
762
|
});
|
|
760
763
|
} else {
|
|
@@ -1073,7 +1076,7 @@ async function runPull(options) {
|
|
|
1073
1076
|
const apiKey = getApiKey(options.key);
|
|
1074
1077
|
const configSettings = await loadConfigSettings(options.config);
|
|
1075
1078
|
const testUrl = getTestApiUrl(configSettings.environments?.test);
|
|
1076
|
-
const liveUrl =
|
|
1079
|
+
const liveUrl = getLiveApiUrl(configSettings.environments?.live);
|
|
1077
1080
|
const filters = configSettings.filters || {};
|
|
1078
1081
|
let format;
|
|
1079
1082
|
try {
|
|
@@ -1231,7 +1234,7 @@ async function runDiff(options) {
|
|
|
1231
1234
|
const apiKey = getApiKey(options.key);
|
|
1232
1235
|
const configSettings = await loadConfigSettings(options.config);
|
|
1233
1236
|
const testUrl = getTestApiUrl(configSettings.environments?.test);
|
|
1234
|
-
const liveUrl =
|
|
1237
|
+
const liveUrl = getLiveApiUrl(configSettings.environments?.live);
|
|
1235
1238
|
const s = p4.spinner();
|
|
1236
1239
|
if (options.prod) {
|
|
1237
1240
|
p4.log.step(pc5.magenta("Production Mode: Comparing with PROD environment"));
|
|
@@ -1585,7 +1588,7 @@ async function runValidate(options) {
|
|
|
1585
1588
|
}
|
|
1586
1589
|
const configSettings = await loadConfigSettings(options.config);
|
|
1587
1590
|
const testUrl = getTestApiUrl(configSettings.environments?.test);
|
|
1588
|
-
const liveUrl =
|
|
1591
|
+
const liveUrl = getLiveApiUrl(configSettings.environments?.live);
|
|
1589
1592
|
const apiKey = getApiKey();
|
|
1590
1593
|
if (options.prod) {
|
|
1591
1594
|
p7.log.step(pc8.magenta("Production Mode: Checking PROD environment"));
|