repowise 0.1.88 → 0.1.89
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/bin/repowise.js +24 -12
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -3241,6 +3241,7 @@ async function create() {
|
|
|
3241
3241
|
let repoRoot;
|
|
3242
3242
|
let repoPlatform;
|
|
3243
3243
|
let repoExternalId;
|
|
3244
|
+
let repoLookupError;
|
|
3244
3245
|
spinner.start("Checking for pending repository...");
|
|
3245
3246
|
try {
|
|
3246
3247
|
const pending = await apiRequest("/v1/onboarding/pending");
|
|
@@ -3276,7 +3277,8 @@ async function create() {
|
|
|
3276
3277
|
repoPlatform = match.platform;
|
|
3277
3278
|
repoExternalId = match.externalId;
|
|
3278
3279
|
}
|
|
3279
|
-
} catch {
|
|
3280
|
+
} catch (err) {
|
|
3281
|
+
repoLookupError = err instanceof Error ? err.message : String(err);
|
|
3280
3282
|
}
|
|
3281
3283
|
} else {
|
|
3282
3284
|
try {
|
|
@@ -3285,11 +3287,15 @@ async function create() {
|
|
|
3285
3287
|
}
|
|
3286
3288
|
}
|
|
3287
3289
|
if (!repoId) {
|
|
3288
|
-
|
|
3289
|
-
chalk5.red(
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3290
|
+
if (repoLookupError) {
|
|
3291
|
+
spinner.fail(chalk5.red(`Failed to look up repositories: ${repoLookupError}`));
|
|
3292
|
+
} else {
|
|
3293
|
+
spinner.fail(
|
|
3294
|
+
chalk5.red(
|
|
3295
|
+
"Could not find this repository in your RepoWise account. Connect it on the dashboard first."
|
|
3296
|
+
)
|
|
3297
|
+
);
|
|
3298
|
+
}
|
|
3293
3299
|
process.exitCode = 1;
|
|
3294
3300
|
return;
|
|
3295
3301
|
}
|
|
@@ -4044,6 +4050,7 @@ async function sync() {
|
|
|
4044
4050
|
let repoId;
|
|
4045
4051
|
let repoPlatform;
|
|
4046
4052
|
let repoExternalId;
|
|
4053
|
+
let repoLookupError;
|
|
4047
4054
|
spinner.start("Resolving repository...");
|
|
4048
4055
|
try {
|
|
4049
4056
|
const repos = await apiRequest("/v1/repos");
|
|
@@ -4053,14 +4060,19 @@ async function sync() {
|
|
|
4053
4060
|
repoPlatform = match.platform;
|
|
4054
4061
|
repoExternalId = match.externalId;
|
|
4055
4062
|
}
|
|
4056
|
-
} catch {
|
|
4063
|
+
} catch (err) {
|
|
4064
|
+
repoLookupError = err instanceof Error ? err.message : String(err);
|
|
4057
4065
|
}
|
|
4058
4066
|
if (!repoId) {
|
|
4059
|
-
|
|
4060
|
-
chalk9.red(
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4067
|
+
if (repoLookupError) {
|
|
4068
|
+
spinner.fail(chalk9.red(`Failed to look up repositories: ${repoLookupError}`));
|
|
4069
|
+
} else {
|
|
4070
|
+
spinner.fail(
|
|
4071
|
+
chalk9.red(
|
|
4072
|
+
"Could not find this repository in your RepoWise account. Run `repowise create` first."
|
|
4073
|
+
)
|
|
4074
|
+
);
|
|
4075
|
+
}
|
|
4064
4076
|
process.exitCode = 1;
|
|
4065
4077
|
return;
|
|
4066
4078
|
}
|