gistajs 0.1.9 → 0.1.10
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.cjs +15 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -5
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -1432,6 +1432,7 @@ var defaultDeps3 = {
|
|
|
1432
1432
|
run,
|
|
1433
1433
|
runInput,
|
|
1434
1434
|
runOutput,
|
|
1435
|
+
promptConfirm,
|
|
1435
1436
|
readFile: import_promises7.readFile,
|
|
1436
1437
|
existsSync: import_node_fs.existsSync,
|
|
1437
1438
|
stdout: console,
|
|
@@ -1447,7 +1448,7 @@ async function provisionVercel(cwd, region, deps = defaultDeps3) {
|
|
|
1447
1448
|
await assertLoggedIn2(deps, cwd);
|
|
1448
1449
|
if (!deps.existsSync((0, import_node_path6.join)(cwd, ".vercel", "project.json"))) {
|
|
1449
1450
|
deps.stdout.log("Linking this directory to a Vercel project...");
|
|
1450
|
-
await deps.run("vercel", ["link"], cwd);
|
|
1451
|
+
await deps.run("vercel", ["link", "--yes"], cwd);
|
|
1451
1452
|
}
|
|
1452
1453
|
let envPath = (0, import_node_path6.join)(cwd, ".env");
|
|
1453
1454
|
let file = await readEnvFile(envPath, deps);
|
|
@@ -1460,10 +1461,19 @@ async function provisionVercel(cwd, region, deps = defaultDeps3) {
|
|
|
1460
1461
|
await deps.runInput("vercel", args, cwd, `${value}
|
|
1461
1462
|
`);
|
|
1462
1463
|
}
|
|
1463
|
-
deps.stdout.log(
|
|
1464
|
-
`Set your Vercel function region to ${region.label} in project settings if you want it to match Turso.`
|
|
1465
|
-
);
|
|
1466
1464
|
deps.stdout.log("Saved COOKIE_SECRET, DB_URL, and DB_AUTH_TOKEN to Vercel.");
|
|
1465
|
+
let shouldDeploy = await deps.promptConfirm(
|
|
1466
|
+
"Deploy to Vercel now? (y/N) ",
|
|
1467
|
+
false
|
|
1468
|
+
);
|
|
1469
|
+
if (shouldDeploy) {
|
|
1470
|
+
deps.stdout.log(`Deploying to Vercel in ${region.label}...`);
|
|
1471
|
+
await deps.run("vercel", ["--regions", region.vercel], cwd);
|
|
1472
|
+
} else {
|
|
1473
|
+
deps.stdout.log(
|
|
1474
|
+
`Set your Vercel function region to ${region.label} in project settings if you want it to match Turso.`
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1467
1477
|
return {
|
|
1468
1478
|
provider: "vercel",
|
|
1469
1479
|
status: "completed"
|
|
@@ -1528,7 +1538,7 @@ async function readCliVersion() {
|
|
|
1528
1538
|
if (false) {
|
|
1529
1539
|
throw new Error("Could not resolve the installed gistajs version");
|
|
1530
1540
|
}
|
|
1531
|
-
return "0.1.
|
|
1541
|
+
return "0.1.10";
|
|
1532
1542
|
}
|
|
1533
1543
|
async function readDefaultProvisionRegion() {
|
|
1534
1544
|
try {
|
package/dist/index.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ type ProvisionDeps = {
|
|
|
111
111
|
run: typeof run;
|
|
112
112
|
runInput: typeof runInput;
|
|
113
113
|
runOutput: typeof runOutput;
|
|
114
|
+
promptConfirm: typeof promptConfirm;
|
|
114
115
|
readFile: typeof readFile;
|
|
115
116
|
existsSync: typeof existsSync;
|
|
116
117
|
stdout: Pick<typeof console, 'log'>;
|
package/dist/index.js
CHANGED
|
@@ -1417,6 +1417,7 @@ var defaultDeps3 = {
|
|
|
1417
1417
|
run,
|
|
1418
1418
|
runInput,
|
|
1419
1419
|
runOutput,
|
|
1420
|
+
promptConfirm,
|
|
1420
1421
|
readFile: readFileFs,
|
|
1421
1422
|
existsSync,
|
|
1422
1423
|
stdout: console,
|
|
@@ -1432,7 +1433,7 @@ async function provisionVercel(cwd, region, deps = defaultDeps3) {
|
|
|
1432
1433
|
await assertLoggedIn2(deps, cwd);
|
|
1433
1434
|
if (!deps.existsSync(join6(cwd, ".vercel", "project.json"))) {
|
|
1434
1435
|
deps.stdout.log("Linking this directory to a Vercel project...");
|
|
1435
|
-
await deps.run("vercel", ["link"], cwd);
|
|
1436
|
+
await deps.run("vercel", ["link", "--yes"], cwd);
|
|
1436
1437
|
}
|
|
1437
1438
|
let envPath = join6(cwd, ".env");
|
|
1438
1439
|
let file = await readEnvFile(envPath, deps);
|
|
@@ -1445,10 +1446,19 @@ async function provisionVercel(cwd, region, deps = defaultDeps3) {
|
|
|
1445
1446
|
await deps.runInput("vercel", args, cwd, `${value}
|
|
1446
1447
|
`);
|
|
1447
1448
|
}
|
|
1448
|
-
deps.stdout.log(
|
|
1449
|
-
`Set your Vercel function region to ${region.label} in project settings if you want it to match Turso.`
|
|
1450
|
-
);
|
|
1451
1449
|
deps.stdout.log("Saved COOKIE_SECRET, DB_URL, and DB_AUTH_TOKEN to Vercel.");
|
|
1450
|
+
let shouldDeploy = await deps.promptConfirm(
|
|
1451
|
+
"Deploy to Vercel now? (y/N) ",
|
|
1452
|
+
false
|
|
1453
|
+
);
|
|
1454
|
+
if (shouldDeploy) {
|
|
1455
|
+
deps.stdout.log(`Deploying to Vercel in ${region.label}...`);
|
|
1456
|
+
await deps.run("vercel", ["--regions", region.vercel], cwd);
|
|
1457
|
+
} else {
|
|
1458
|
+
deps.stdout.log(
|
|
1459
|
+
`Set your Vercel function region to ${region.label} in project settings if you want it to match Turso.`
|
|
1460
|
+
);
|
|
1461
|
+
}
|
|
1452
1462
|
return {
|
|
1453
1463
|
provider: "vercel",
|
|
1454
1464
|
status: "completed"
|
|
@@ -1513,7 +1523,7 @@ async function readCliVersion() {
|
|
|
1513
1523
|
if (false) {
|
|
1514
1524
|
throw new Error("Could not resolve the installed gistajs version");
|
|
1515
1525
|
}
|
|
1516
|
-
return "0.1.
|
|
1526
|
+
return "0.1.10";
|
|
1517
1527
|
}
|
|
1518
1528
|
async function readDefaultProvisionRegion() {
|
|
1519
1529
|
try {
|