@secondlayer/cli 8.0.0 → 8.1.0
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/cli.js +34 -27
- package/dist/cli.js.map +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -32354,7 +32354,7 @@ var {
|
|
|
32354
32354
|
// package.json
|
|
32355
32355
|
var package_default = {
|
|
32356
32356
|
name: "@secondlayer/cli",
|
|
32357
|
-
version: "8.
|
|
32357
|
+
version: "8.1.0",
|
|
32358
32358
|
repository: {
|
|
32359
32359
|
type: "git",
|
|
32360
32360
|
url: "git+https://github.com/ryanwaits/secondlayer.git",
|
|
@@ -37420,6 +37420,29 @@ init_dev_state();
|
|
|
37420
37420
|
init_node_manager();
|
|
37421
37421
|
init_output();
|
|
37422
37422
|
var DEV_SERVICES = ["api", "indexer", "worker", "subgraphs"];
|
|
37423
|
+
async function startStack(options2) {
|
|
37424
|
+
if (options2.devnet) {
|
|
37425
|
+
await connect({
|
|
37426
|
+
project: options2.project,
|
|
37427
|
+
imageTag: options2.imageTag ?? DEFAULT_IMAGE_TAG,
|
|
37428
|
+
owner: options2.owner,
|
|
37429
|
+
up: options2.up ?? true
|
|
37430
|
+
});
|
|
37431
|
+
} else {
|
|
37432
|
+
await stackStart({ node: options2.node, dev: options2.dev });
|
|
37433
|
+
}
|
|
37434
|
+
}
|
|
37435
|
+
async function stopStack(options2) {
|
|
37436
|
+
if (options2.devnet) {
|
|
37437
|
+
await down({ project: options2.project, purge: options2.purge });
|
|
37438
|
+
} else {
|
|
37439
|
+
await stackStop({
|
|
37440
|
+
node: options2.node,
|
|
37441
|
+
dev: options2.dev,
|
|
37442
|
+
wait: options2.wait
|
|
37443
|
+
});
|
|
37444
|
+
}
|
|
37445
|
+
}
|
|
37423
37446
|
function registerLocalCommand(program2) {
|
|
37424
37447
|
const local = program2.command("local").description("Manage local development environment and Stacks node").hook("preAction", async (_thisCommand, actionCommand) => {
|
|
37425
37448
|
if (actionCommand.name() === "help")
|
|
@@ -37441,32 +37464,16 @@ function registerLocalCommand(program2) {
|
|
|
37441
37464
|
const { stopDev: stopDev2 } = await Promise.resolve().then(() => (init_dev_impl(), exports_dev_impl));
|
|
37442
37465
|
await stopDev2();
|
|
37443
37466
|
});
|
|
37444
|
-
local.command("
|
|
37445
|
-
|
|
37446
|
-
|
|
37447
|
-
|
|
37448
|
-
|
|
37449
|
-
|
|
37450
|
-
|
|
37451
|
-
project: options2.project,
|
|
37452
|
-
imageTag: options2.imageTag ?? DEFAULT_IMAGE_TAG,
|
|
37453
|
-
owner: options2.owner,
|
|
37454
|
-
up: options2.up
|
|
37455
|
-
});
|
|
37456
|
-
} else {
|
|
37457
|
-
await stackStart({ node: options2.node, dev: options2.dev });
|
|
37458
|
-
}
|
|
37459
|
-
});
|
|
37460
|
-
local.command("down").description("Stop the full local stack").option("--devnet", "Stop a local Clarinet devnet instead").option("--no-node", "Skip stopping the Stacks node").option("--no-dev", "Skip stopping dev services").option("--wait", "Wait for in-flight work to drain before stopping").option("--project <dir>", "[--devnet] Clarinet project directory").option("--purge", "[--devnet] Also remove volumes (wipes the local index)").action(async (options2) => {
|
|
37461
|
-
if (options2.devnet) {
|
|
37462
|
-
await down({ project: options2.project, purge: options2.purge });
|
|
37463
|
-
} else {
|
|
37464
|
-
await stackStop({
|
|
37465
|
-
node: options2.node,
|
|
37466
|
-
dev: options2.dev,
|
|
37467
|
-
wait: options2.wait
|
|
37468
|
-
});
|
|
37467
|
+
local.command("up").description("Start the full local stack (Stacks node + dev services)").option("--devnet", "Run against a local Clarinet devnet instead").option("--no-node", "Skip starting the Stacks node").option("--no-dev", "Skip starting dev services").option("--project <dir>", "[--devnet] Clarinet project directory").option("--image-tag <tag>", "[--devnet] Published image tag to run").option("--owner <owner>", "[--devnet] ghcr image owner to pull from").option("--no-up", "[--devnet] Patch config + write compose without starting").action((options2) => startStack(options2));
|
|
37468
|
+
local.command("down").description("Stop the full local stack").option("--devnet", "Stop a local Clarinet devnet instead").option("--no-node", "Skip stopping the Stacks node").option("--no-dev", "Skip stopping dev services").option("--wait", "Wait for in-flight work to drain before stopping").option("--project <dir>", "[--devnet] Clarinet project directory").option("--purge", "[--devnet] Also remove volumes (wipes the local index)").action((options2) => stopStack(options2));
|
|
37469
|
+
local.command("restart").description("Restart the full local stack (stop then start)").option("--devnet", "Restart a local Clarinet devnet instead").option("--no-node", "Skip the Stacks node (restart dev services only)").option("--no-dev", "Skip dev services").option("--wait", "Wait for in-flight work to drain before stopping").option("--project <dir>", "[--devnet] Clarinet project directory").option("--image-tag <tag>", "[--devnet] Published image tag to run").option("--owner <owner>", "[--devnet] ghcr image owner to pull from").action(async (options2) => {
|
|
37470
|
+
if (options2.node === false && !options2.devnet) {
|
|
37471
|
+
const { restartDev: restartDev2 } = await Promise.resolve().then(() => (init_dev_impl(), exports_dev_impl));
|
|
37472
|
+
await restartDev2();
|
|
37473
|
+
return;
|
|
37469
37474
|
}
|
|
37475
|
+
await stopStack(options2);
|
|
37476
|
+
await startStack(options2);
|
|
37470
37477
|
});
|
|
37471
37478
|
local.command("status").description("Show local environment status").action(async () => {
|
|
37472
37479
|
await showLocalStatus();
|
|
@@ -38013,5 +38020,5 @@ program.commandsGroup("Account:");
|
|
|
38013
38020
|
registerAccountCommand(program);
|
|
38014
38021
|
program.parse();
|
|
38015
38022
|
|
|
38016
|
-
//# debugId=
|
|
38023
|
+
//# debugId=EB492BA5EF828A4C64756E2164756E21
|
|
38017
38024
|
//# sourceMappingURL=cli.js.map
|