replicas-cli 0.2.502 → 0.2.504
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.mjs +6 -10
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9763,7 +9763,7 @@ function formatTurnElapsed(ms) {
|
|
|
9763
9763
|
}
|
|
9764
9764
|
|
|
9765
9765
|
// ../shared/src/cli-version.ts
|
|
9766
|
-
var CLI_VERSION = "0.2.
|
|
9766
|
+
var CLI_VERSION = "0.2.504";
|
|
9767
9767
|
|
|
9768
9768
|
// ../shared/src/version.ts
|
|
9769
9769
|
function compareVersions(v1, v2) {
|
|
@@ -28881,11 +28881,9 @@ async function replicaCreateCommand(name, options) {
|
|
|
28881
28881
|
}
|
|
28882
28882
|
try {
|
|
28883
28883
|
const envResponse = await orgAuthenticatedFetch("/v1/environments");
|
|
28884
|
-
const environments = envResponse.environments
|
|
28885
|
-
(env) => !env.is_global && (env.repository_id || env.repository_set_id)
|
|
28886
|
-
);
|
|
28884
|
+
const environments = envResponse.environments;
|
|
28887
28885
|
if (environments.length === 0) {
|
|
28888
|
-
console.log(chalk14.red("No
|
|
28886
|
+
console.log(chalk14.red("No environments found. Please create an environment first."));
|
|
28889
28887
|
process.exit(1);
|
|
28890
28888
|
}
|
|
28891
28889
|
let replicaName = name;
|
|
@@ -28921,7 +28919,7 @@ async function replicaCreateCommand(name, options) {
|
|
|
28921
28919
|
choices: environments.map((env) => ({
|
|
28922
28920
|
title: env.name,
|
|
28923
28921
|
value: env.id,
|
|
28924
|
-
description: env.repository_set_id ? "repository set" : "repository"
|
|
28922
|
+
description: env.is_global ? "global" : env.repository_set_id ? "repository set" : env.repository_id ? "repository" : "unbound"
|
|
28925
28923
|
}))
|
|
28926
28924
|
});
|
|
28927
28925
|
if (!response2.environment) {
|
|
@@ -29572,8 +29570,7 @@ async function automationCreateCommand(name, options) {
|
|
|
29572
29570
|
);
|
|
29573
29571
|
try {
|
|
29574
29572
|
const envResponse = await orgAuthenticatedFetch("/v1/environments");
|
|
29575
|
-
const
|
|
29576
|
-
const selectableEnvs = allEnvs.filter((env) => !env.is_global);
|
|
29573
|
+
const selectableEnvs = envResponse.environments;
|
|
29577
29574
|
if (selectableEnvs.length === 0) {
|
|
29578
29575
|
console.log(chalk17.red("No environments found. Please create an environment first."));
|
|
29579
29576
|
process.exit(1);
|
|
@@ -29895,8 +29892,7 @@ async function automationEditCommand(id, options) {
|
|
|
29895
29892
|
}
|
|
29896
29893
|
if (options.environment) {
|
|
29897
29894
|
const envResp = await orgAuthenticatedFetch("/v1/environments");
|
|
29898
|
-
|
|
29899
|
-
body.environment_id = resolveSelectableEnvironmentId(options.environment, selectableEnvs);
|
|
29895
|
+
body.environment_id = resolveSelectableEnvironmentId(options.environment, envResp.environments);
|
|
29900
29896
|
}
|
|
29901
29897
|
if (lifecyclePolicy) {
|
|
29902
29898
|
body.workspace_lifecycle_policy = lifecyclePolicy;
|