vercel-vm-factory 0.16.8 → 0.17.8

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.
Files changed (2) hide show
  1. package/deploy-vm.mjs +18 -22
  2. package/package.json +1 -1
package/deploy-vm.mjs CHANGED
@@ -138,7 +138,7 @@ async function main() {
138
138
  if (usesGitHubAuth(authMode)) printOAuthGuide(oauthRedirectUrl);
139
139
 
140
140
  const authUsername = usesBasicAuth(authMode)
141
- ? await secret(
141
+ ? await value(
142
142
  "auth-user",
143
143
  "Basic auth username",
144
144
  process.env.AUTH_USERNAME ?? defaults["auth-user"],
@@ -340,10 +340,7 @@ async function doctor() {
340
340
  printKeyValue("shell", defaults.shell || "/bin/sh");
341
341
  printKeyValue("tools", defaults.tools || "none");
342
342
  printKeyValue("auth mode", defaults["auth-mode"] || "not set");
343
- printKeyValue(
344
- "auth user",
345
- defaults["auth-user"] ? mask(defaults["auth-user"]) : "not set",
346
- );
343
+ printKeyValue("auth user", defaults["auth-user"] || "not set");
347
344
  printKeyValue(
348
345
  "auth password",
349
346
  defaults["auth-password"] ? mask(defaults["auth-password"]) : "not set",
@@ -906,26 +903,25 @@ function printKeyValue(key, value) {
906
903
  }
907
904
 
908
905
  async function askText(question, fallback = "") {
909
- return String(
910
- await promptResult(
911
- p.text({
912
- message: question,
913
- placeholder: fallback || undefined,
914
- }),
915
- ),
916
- ).trim();
906
+ const answer = await promptResult(
907
+ p.text({
908
+ message: question,
909
+ initialValue: fallback || undefined,
910
+ placeholder: fallback || undefined,
911
+ }),
912
+ );
913
+ return answer === undefined ? "" : String(answer).trim();
917
914
  }
918
915
 
919
916
  async function askSecret(question, fallback = "") {
920
- return String(
921
- await promptResult(
922
- p.password({
923
- message: question,
924
- mask: "*",
925
- placeholder: fallback || undefined,
926
- }),
927
- ),
928
- ).trim();
917
+ const answer = await promptResult(
918
+ p.password({
919
+ message: question,
920
+ mask: "*",
921
+ placeholder: fallback || undefined,
922
+ }),
923
+ );
924
+ return answer === undefined ? "" : String(answer).trim();
929
925
  }
930
926
 
931
927
  async function promptResult(resultPromise) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel-vm-factory",
3
- "version": "0.16.8",
3
+ "version": "0.17.8",
4
4
  "description": "Create Vercel Container deployments for ws-shell from selectable VM images.",
5
5
  "license": "MIT",
6
6
  "type": "module",