unoverse 0.1.14 → 0.1.15
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/lib/create.mjs +5 -1
- package/package.json +1 -1
package/lib/create.mjs
CHANGED
|
@@ -207,6 +207,11 @@ export async function create(nameArg) {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
if (choice === "2") {
|
|
210
|
+
// TARGET FIRST, credential second. This used to ask for the registry token, make a
|
|
211
|
+
// network round-trip to validate it, and only then discover the folder was not
|
|
212
|
+
// empty. Never ask for a credential you are about to throw away.
|
|
213
|
+
const name = resolveTarget(nameArg);
|
|
214
|
+
|
|
210
215
|
console.log(`\n ${cyan("A universe needs a registry access token.")}`);
|
|
211
216
|
console.log(` ${dim("It authorizes the platform's images. Your Unoverse admin issues it.")}\n`);
|
|
212
217
|
const token = await ask(rl, "Registry access token: ");
|
|
@@ -224,7 +229,6 @@ export async function create(nameArg) {
|
|
|
224
229
|
}
|
|
225
230
|
ok("token accepted");
|
|
226
231
|
|
|
227
|
-
const name = resolveTarget(nameArg);
|
|
228
232
|
download(name);
|
|
229
233
|
ok(`universe scaffolded in ${label(name)}`);
|
|
230
234
|
|
package/package.json
CHANGED