@bluealba/platform-cli 0.3.1-feature-platform-cli-231 → 0.3.1-feature-platform-cli-232
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 +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2694,9 +2694,10 @@ async function handleAdd(ctx) {
|
|
|
2694
2694
|
const existingUsernames = new Set(currentAdmins.map((a) => a.username));
|
|
2695
2695
|
const pendingAdmins = [];
|
|
2696
2696
|
const suggestedUsername = getDefaultUsername();
|
|
2697
|
+
const effectiveSuggestion = suggestedUsername && !existingUsernames.has(suggestedUsername) ? suggestedUsername : void 0;
|
|
2697
2698
|
let isFirstIteration = true;
|
|
2698
2699
|
while (true) {
|
|
2699
|
-
const defaultValue = isFirstIteration ?
|
|
2700
|
+
const defaultValue = isFirstIteration ? effectiveSuggestion : void 0;
|
|
2700
2701
|
const username = (await ctx.prompt("Username to add as admin:", defaultValue)).trim();
|
|
2701
2702
|
isFirstIteration = false;
|
|
2702
2703
|
if (!username) {
|
package/package.json
CHANGED