betterstart-cli 0.0.83 → 0.0.85
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.
|
@@ -30,7 +30,7 @@ function DialogOverlay({
|
|
|
30
30
|
<DialogPrimitive.Overlay
|
|
31
31
|
data-slot="dialog-overlay"
|
|
32
32
|
className={cn(
|
|
33
|
-
'fixed inset-0 isolate z-
|
|
33
|
+
'fixed inset-0 isolate z-200 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
34
34
|
className
|
|
35
35
|
)}
|
|
36
36
|
{...props}
|
|
@@ -52,7 +52,7 @@ function DialogContent({
|
|
|
52
52
|
<DialogPrimitive.Content
|
|
53
53
|
data-slot="dialog-content"
|
|
54
54
|
className={cn(
|
|
55
|
-
'fixed top-1/2 left-1/2 z-
|
|
55
|
+
'fixed top-1/2 left-1/2 z-200 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-0 rounded-sm text-sm text-popover-foreground ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 overflow-hidden bg-card',
|
|
56
56
|
className
|
|
57
57
|
)}
|
|
58
58
|
{...props}
|
|
@@ -106,7 +106,7 @@ function DialogFooter({
|
|
|
106
106
|
<div
|
|
107
107
|
data-slot="dialog-footer"
|
|
108
108
|
className={cn(
|
|
109
|
-
'flex flex-col-reverse gap-1 px-6 pt-
|
|
109
|
+
'flex flex-col-reverse gap-1 px-6 pt-2 items-center pb-3 bg-muted sm:flex-row sm:justify-between',
|
|
110
110
|
className
|
|
111
111
|
)}
|
|
112
112
|
{...props}
|
package/dist/cli.js
CHANGED
|
@@ -25696,12 +25696,25 @@ function runVercel(runner, args, options) {
|
|
|
25696
25696
|
let stdout = "";
|
|
25697
25697
|
let stderr = "";
|
|
25698
25698
|
let timedOut = false;
|
|
25699
|
+
let closed = false;
|
|
25700
|
+
let effectiveTimeoutMs = timeoutMs;
|
|
25701
|
+
let timeout;
|
|
25702
|
+
const armTimeout = (ms) => {
|
|
25703
|
+
if (closed) return;
|
|
25704
|
+
clearTimeout(timeout);
|
|
25705
|
+
effectiveTimeoutMs = ms;
|
|
25706
|
+
timeout = setTimeout(() => {
|
|
25707
|
+
timedOut = true;
|
|
25708
|
+
child.kill("SIGTERM");
|
|
25709
|
+
}, ms);
|
|
25710
|
+
};
|
|
25711
|
+
const runControl = { extendTimeout: armTimeout };
|
|
25699
25712
|
const onOutputLine = options.onOutputLine;
|
|
25700
25713
|
const createOutputObserver = () => {
|
|
25701
25714
|
if (!onOutputLine) return void 0;
|
|
25702
25715
|
return createFilteredLineForwarder(
|
|
25703
25716
|
(line) => line.length > 0,
|
|
25704
|
-
(text7) => onOutputLine(stripVTControlCharacters3(text7).trim())
|
|
25717
|
+
(text7) => onOutputLine(stripVTControlCharacters3(text7).trim(), runControl)
|
|
25705
25718
|
);
|
|
25706
25719
|
};
|
|
25707
25720
|
const stdoutObserver = createOutputObserver();
|
|
@@ -25748,11 +25761,9 @@ function runVercel(runner, args, options) {
|
|
|
25748
25761
|
errForwarder.flush();
|
|
25749
25762
|
});
|
|
25750
25763
|
}
|
|
25751
|
-
|
|
25752
|
-
timedOut = true;
|
|
25753
|
-
child.kill("SIGTERM");
|
|
25754
|
-
}, timeoutMs);
|
|
25764
|
+
armTimeout(timeoutMs);
|
|
25755
25765
|
child.on("close", (code, signal) => {
|
|
25766
|
+
closed = true;
|
|
25756
25767
|
clearTimeout(timeout);
|
|
25757
25768
|
stdoutObserver?.flush();
|
|
25758
25769
|
stderrObserver?.flush();
|
|
@@ -25764,7 +25775,7 @@ function runVercel(runner, args, options) {
|
|
|
25764
25775
|
stdout,
|
|
25765
25776
|
stderr,
|
|
25766
25777
|
timedOut: true,
|
|
25767
|
-
errorMessage: `Vercel command timed out after ${Math.floor(
|
|
25778
|
+
errorMessage: `Vercel command timed out after ${Math.floor(effectiveTimeoutMs / 1e3)}s`
|
|
25768
25779
|
});
|
|
25769
25780
|
return;
|
|
25770
25781
|
}
|
|
@@ -25779,6 +25790,7 @@ function runVercel(runner, args, options) {
|
|
|
25779
25790
|
});
|
|
25780
25791
|
});
|
|
25781
25792
|
child.on("error", (err) => {
|
|
25793
|
+
closed = true;
|
|
25782
25794
|
clearTimeout(timeout);
|
|
25783
25795
|
stdoutObserver?.flush();
|
|
25784
25796
|
stderrObserver?.flush();
|
|
@@ -26288,6 +26300,8 @@ function ensureVercelJsonFramework(cwd) {
|
|
|
26288
26300
|
}
|
|
26289
26301
|
function parseDeployedUrl(stdout, stderr) {
|
|
26290
26302
|
const plainErr = stripVTControlCharacters4(stderr);
|
|
26303
|
+
const aliased = plainErr.match(/Aliased:\s+(https:\/\/\S+)/i)?.[1];
|
|
26304
|
+
if (aliased) return aliased;
|
|
26291
26305
|
const production = plainErr.match(/Production:\s+(https:\/\/\S+)/i)?.[1];
|
|
26292
26306
|
if (production) return production;
|
|
26293
26307
|
const fromStdout = stripVTControlCharacters4(stdout).match(/https:\/\/\S+/)?.[0];
|
|
@@ -26348,16 +26362,52 @@ import * as p20 from "@clack/prompts";
|
|
|
26348
26362
|
import pc7 from "picocolors";
|
|
26349
26363
|
var PROVISION_TIMEOUT_MS2 = 18e4;
|
|
26350
26364
|
var INTERACTIVE_PROVISION_TIMEOUT_MS2 = 6e5;
|
|
26365
|
+
var ACCEPT_TERMS_URL_PATTERN = /https:\/\/vercel\.com\/\S+\/integrations\/accept-terms\/\S+/i;
|
|
26366
|
+
var TERMS_ACCEPTED_PATTERN = /terms accepted/i;
|
|
26367
|
+
function findAcceptTermsUrl(line) {
|
|
26368
|
+
return ACCEPT_TERMS_URL_PATTERN.exec(line)?.[0];
|
|
26369
|
+
}
|
|
26351
26370
|
async function provisionNeonInteractive(runner, cwd, options) {
|
|
26352
26371
|
const quietSpinner = spinner2();
|
|
26353
26372
|
quietSpinner.start("Creating your Neon database");
|
|
26373
|
+
let termsNotice;
|
|
26374
|
+
let termsResolved = false;
|
|
26375
|
+
const settleTermsNotice = () => {
|
|
26376
|
+
if (!termsNotice || termsResolved) return;
|
|
26377
|
+
termsResolved = true;
|
|
26378
|
+
quietSpinner.clear();
|
|
26379
|
+
eraseRows(termsNotice.rows);
|
|
26380
|
+
p20.log.step(termsNotice.text);
|
|
26381
|
+
};
|
|
26354
26382
|
const quiet = await runVercel(runner, neonAddArgs(options), {
|
|
26355
26383
|
cwd,
|
|
26356
26384
|
mode: "capture",
|
|
26357
26385
|
timeoutMs: PROVISION_TIMEOUT_MS2,
|
|
26358
|
-
env: options.env
|
|
26386
|
+
env: options.env,
|
|
26387
|
+
onOutputLine: (line, run) => {
|
|
26388
|
+
if (!termsNotice) {
|
|
26389
|
+
const termsUrl = findAcceptTermsUrl(line);
|
|
26390
|
+
if (!termsUrl) return;
|
|
26391
|
+
run.extendTimeout(INTERACTIVE_PROVISION_TIMEOUT_MS2);
|
|
26392
|
+
const message = "Please accept the Neon terms in your browser";
|
|
26393
|
+
termsNotice = {
|
|
26394
|
+
text: `${message}
|
|
26395
|
+
${pc7.dim(termsUrl)}`,
|
|
26396
|
+
rows: clackLogRows(message) + clackLogRows(termsUrl) - 1
|
|
26397
|
+
};
|
|
26398
|
+
quietSpinner.clear();
|
|
26399
|
+
p20.log.info(termsNotice.text);
|
|
26400
|
+
quietSpinner.start("Waiting for the terms to be accepted");
|
|
26401
|
+
return;
|
|
26402
|
+
}
|
|
26403
|
+
if (TERMS_ACCEPTED_PATTERN.test(line)) {
|
|
26404
|
+
settleTermsNotice();
|
|
26405
|
+
quietSpinner.start("Creating your Neon database");
|
|
26406
|
+
}
|
|
26407
|
+
}
|
|
26359
26408
|
});
|
|
26360
26409
|
if (quiet.success) {
|
|
26410
|
+
settleTermsNotice();
|
|
26361
26411
|
quietSpinner.clear();
|
|
26362
26412
|
return readNeonProvisionInfo(quiet.stdout);
|
|
26363
26413
|
}
|