gistajs 0.1.9 → 0.1.11
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 +16 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -7
- 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);
|
|
@@ -1457,13 +1458,21 @@ async function provisionVercel(cwd, region, deps = defaultDeps3) {
|
|
|
1457
1458
|
);
|
|
1458
1459
|
for (let [key, value] of values) {
|
|
1459
1460
|
let args = existing.includes(key) ? ["env", "update", key, "production", "--yes"] : ["env", "add", key, "production", "--force"];
|
|
1460
|
-
await deps.runInput("vercel", args, cwd,
|
|
1461
|
-
`);
|
|
1461
|
+
await deps.runInput("vercel", args, cwd, value);
|
|
1462
1462
|
}
|
|
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
1463
|
deps.stdout.log("Saved COOKIE_SECRET, DB_URL, and DB_AUTH_TOKEN to Vercel.");
|
|
1464
|
+
let shouldDeploy = await deps.promptConfirm(
|
|
1465
|
+
"Deploy to Vercel now? (y/N) ",
|
|
1466
|
+
false
|
|
1467
|
+
);
|
|
1468
|
+
if (shouldDeploy) {
|
|
1469
|
+
deps.stdout.log(`Deploying to Vercel in ${region.label}...`);
|
|
1470
|
+
await deps.run("vercel", ["--regions", region.vercel], cwd);
|
|
1471
|
+
} else {
|
|
1472
|
+
deps.stdout.log(
|
|
1473
|
+
`Set your Vercel function region to ${region.label} in project settings if you want it to match Turso.`
|
|
1474
|
+
);
|
|
1475
|
+
}
|
|
1467
1476
|
return {
|
|
1468
1477
|
provider: "vercel",
|
|
1469
1478
|
status: "completed"
|
|
@@ -1528,7 +1537,7 @@ async function readCliVersion() {
|
|
|
1528
1537
|
if (false) {
|
|
1529
1538
|
throw new Error("Could not resolve the installed gistajs version");
|
|
1530
1539
|
}
|
|
1531
|
-
return "0.1.
|
|
1540
|
+
return "0.1.11";
|
|
1532
1541
|
}
|
|
1533
1542
|
async function readDefaultProvisionRegion() {
|
|
1534
1543
|
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);
|
|
@@ -1442,13 +1443,21 @@ async function provisionVercel(cwd, region, deps = defaultDeps3) {
|
|
|
1442
1443
|
);
|
|
1443
1444
|
for (let [key, value] of values) {
|
|
1444
1445
|
let args = existing.includes(key) ? ["env", "update", key, "production", "--yes"] : ["env", "add", key, "production", "--force"];
|
|
1445
|
-
await deps.runInput("vercel", args, cwd,
|
|
1446
|
-
`);
|
|
1446
|
+
await deps.runInput("vercel", args, cwd, value);
|
|
1447
1447
|
}
|
|
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
1448
|
deps.stdout.log("Saved COOKIE_SECRET, DB_URL, and DB_AUTH_TOKEN to Vercel.");
|
|
1449
|
+
let shouldDeploy = await deps.promptConfirm(
|
|
1450
|
+
"Deploy to Vercel now? (y/N) ",
|
|
1451
|
+
false
|
|
1452
|
+
);
|
|
1453
|
+
if (shouldDeploy) {
|
|
1454
|
+
deps.stdout.log(`Deploying to Vercel in ${region.label}...`);
|
|
1455
|
+
await deps.run("vercel", ["--regions", region.vercel], cwd);
|
|
1456
|
+
} else {
|
|
1457
|
+
deps.stdout.log(
|
|
1458
|
+
`Set your Vercel function region to ${region.label} in project settings if you want it to match Turso.`
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1452
1461
|
return {
|
|
1453
1462
|
provider: "vercel",
|
|
1454
1463
|
status: "completed"
|
|
@@ -1513,7 +1522,7 @@ async function readCliVersion() {
|
|
|
1513
1522
|
if (false) {
|
|
1514
1523
|
throw new Error("Could not resolve the installed gistajs version");
|
|
1515
1524
|
}
|
|
1516
|
-
return "0.1.
|
|
1525
|
+
return "0.1.11";
|
|
1517
1526
|
}
|
|
1518
1527
|
async function readDefaultProvisionRegion() {
|
|
1519
1528
|
try {
|