@synkro-sh/cli 1.3.9 → 1.3.10
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/bootstrap.js +8 -5
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -2438,10 +2438,13 @@ var init_auth = __esm({
|
|
|
2438
2438
|
|
|
2439
2439
|
// cli/api/projects.ts
|
|
2440
2440
|
import { config } from "dotenv";
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2441
|
+
function resolveApiUrl() {
|
|
2442
|
+
for (const v of [process.env.SYNKRO_CRUD_URL, process.env.SYNKRO_API_URL]) {
|
|
2443
|
+
if (v && /^https?:\/\//.test(v)) return v;
|
|
2444
2444
|
}
|
|
2445
|
+
return "https://api.synkro.sh/api";
|
|
2446
|
+
}
|
|
2447
|
+
async function callApi(method, endpoint, body) {
|
|
2445
2448
|
const url = `${API_URL}${endpoint}`;
|
|
2446
2449
|
const accessToken = getAccessToken();
|
|
2447
2450
|
const headers = {
|
|
@@ -2478,7 +2481,7 @@ var init_projects = __esm({
|
|
|
2478
2481
|
"use strict";
|
|
2479
2482
|
init_auth();
|
|
2480
2483
|
config({ quiet: true });
|
|
2481
|
-
API_URL =
|
|
2484
|
+
API_URL = resolveApiUrl();
|
|
2482
2485
|
}
|
|
2483
2486
|
});
|
|
2484
2487
|
|
|
@@ -3171,7 +3174,7 @@ function writeConfigEnv(opts) {
|
|
|
3171
3174
|
`SYNKRO_GATEWAY_URL=${shellQuoteSingle(safeGateway)}`,
|
|
3172
3175
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
3173
3176
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
3174
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.3.
|
|
3177
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.3.10")}`
|
|
3175
3178
|
];
|
|
3176
3179
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
3177
3180
|
if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);
|