@secondlayer/cli 15.0.0 → 15.0.1

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 CHANGED
@@ -202516,11 +202516,10 @@ function buildOssCompose(opts = {}) {
202516
202516
  const owner = opts.owner ?? DEFAULT_IMAGE_OWNER;
202517
202517
  const tag = opts.imageTag ?? DEFAULT_IMAGE_TAG;
202518
202518
  const runtimeImage = `ghcr.io/${owner}/secondlayer-runtime:${tag}`;
202519
- const consoleImage = `ghcr.io/${owner}/secondlayer-console:${tag}`;
202520
202519
  return `# Generated by \`secondlayer setup\` — do not edit by hand.
202521
202520
  # Mirrors docker/oss/docker-compose.yml; see that file for the source of truth
202522
- # on env vars, profiles, and third-party digest pins. \`secondlayer\`/\`console\`
202523
- # are swapped from a repo build to the published OSS images (no checkout here).
202521
+ # on env vars, profiles, and third-party digest pins. \`secondlayer\` is
202522
+ # swapped from a repo build to the published OSS image (no checkout here).
202524
202523
  name: secondlayer
202525
202524
 
202526
202525
  services:
@@ -202597,27 +202596,6 @@ services:
202597
202596
  retries: 3
202598
202597
  restart: unless-stopped
202599
202598
 
202600
- console:
202601
- image: ${consoleImage}
202602
- environment:
202603
- SL_API_URL: http://secondlayer:3800
202604
- INSTANCE_TOKEN: \${INSTANCE_TOKEN:-}
202605
- CONSOLE_TOKEN: \${CONSOLE_TOKEN:-}
202606
- NODE_ENV: production
202607
- ports:
202608
- - "\${CONSOLE_PORT:-3801}:3801"
202609
- depends_on:
202610
- secondlayer:
202611
- condition: service_started
202612
- healthcheck:
202613
- test: ["CMD", "curl", "-f", "http://localhost:3801/console"]
202614
- interval: 30s
202615
- timeout: 5s
202616
- start_period: 15s
202617
- retries: 3
202618
- restart: unless-stopped
202619
- profiles: ["console"]
202620
-
202621
202599
  bitcoind:
202622
202600
  # Digest = kylemanna/bitcoind:latest as published 2026-07-20 — see
202623
202601
  # docker/oss/docker-compose.yml for why the digest is the real pin here.
@@ -202705,7 +202683,7 @@ dbcache=4096
202705
202683
  var init_oss_compose = () => {};
202706
202684
 
202707
202685
  // src/lib/setup-wizard.ts
202708
- import { spawn as spawn4, spawnSync as spawnSync5 } from "node:child_process";
202686
+ import { spawn as spawn3, spawnSync as spawnSync5 } from "node:child_process";
202709
202687
  import { randomBytes as randomBytes4 } from "node:crypto";
202710
202688
  import { existsSync as existsSync12 } from "node:fs";
202711
202689
  import { writeFile as writeFile6 } from "node:fs/promises";
@@ -202925,7 +202903,7 @@ function composeProfileArgs(nodeMode) {
202925
202903
  }
202926
202904
  function runStreaming(command, args, opts) {
202927
202905
  return new Promise((resolvePromise, reject) => {
202928
- const child = spawn4(command, args, {
202906
+ const child = spawn3(command, args, {
202929
202907
  cwd: opts.cwd,
202930
202908
  env: opts.env ?? process.env,
202931
202909
  stdio: ["ignore", "pipe", "pipe"]
@@ -203916,7 +203894,7 @@ var {
203916
203894
  // package.json
203917
203895
  var package_default = {
203918
203896
  name: "@secondlayer/cli",
203919
- version: "15.0.0",
203897
+ version: "15.0.1",
203920
203898
  description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
203921
203899
  repository: {
203922
203900
  type: "git",
@@ -203958,7 +203936,7 @@ var package_default = {
203958
203936
  "@secondlayer/bundler": "^0.5.3",
203959
203937
  "@secondlayer/scaffold": "^1.5.7",
203960
203938
  "@secondlayer/sdk": "^10.4.2",
203961
- "@secondlayer/shared": "^11.6.0",
203939
+ "@secondlayer/shared": "^11.6.1",
203962
203940
  "@secondlayer/stacks": "^6.0.0",
203963
203941
  "@secondlayer/subgraphs": "^4.3.4",
203964
203942
  esbuild: "^0.28.2",
@@ -205927,66 +205905,6 @@ async function validateDatabaseConnection(url) {
205927
205905
  console.log(dim("The URL was saved but connection failed. Check your database settings."));
205928
205906
  }
205929
205907
  }
205930
- // src/commands/console.ts
205931
- init_output();
205932
- init_resolve_auth();
205933
- import { spawn as spawn3 } from "node:child_process";
205934
- var DEFAULT_CONSOLE_URL = "http://localhost:3801/console";
205935
- var CONSOLE_PORT = 3801;
205936
- function resolveConsoleUrl(override) {
205937
- if (override)
205938
- return override.replace(/\/+$/, "");
205939
- const apiUrl = process.env.SL_API_URL;
205940
- if (apiUrl && isOssMode()) {
205941
- try {
205942
- const { protocol, hostname } = new URL(apiUrl);
205943
- return `${protocol}//${hostname}:${CONSOLE_PORT}/console`;
205944
- } catch {}
205945
- }
205946
- return DEFAULT_CONSOLE_URL;
205947
- }
205948
- async function isReachable(url) {
205949
- try {
205950
- await fetch(url, { signal: AbortSignal.timeout(2000) });
205951
- return true;
205952
- } catch {
205953
- return false;
205954
- }
205955
- }
205956
- function openBrowser(url) {
205957
- const opener = process.platform === "darwin" ? "open" : process.platform === "linux" ? "xdg-open" : undefined;
205958
- if (!opener)
205959
- return Promise.resolve(false);
205960
- return new Promise((resolve7) => {
205961
- const child = spawn3(opener, [url], { stdio: "ignore", detached: true });
205962
- child.once("error", () => resolve7(false));
205963
- child.once("spawn", () => {
205964
- child.unref();
205965
- resolve7(true);
205966
- });
205967
- });
205968
- }
205969
- function registerConsoleCommand(program2) {
205970
- program2.command("console").description("Open the console UI in a browser").option("--url <url>", `Console URL (default ${DEFAULT_CONSOLE_URL})`).option("--no-open", "Print the console URL instead of opening a browser").action(async (options3) => {
205971
- assertInstanceUrl();
205972
- const url = resolveConsoleUrl(options3.url);
205973
- if (options3.open === false) {
205974
- writeData(url);
205975
- return;
205976
- }
205977
- if (!await isReachable(url)) {
205978
- printError(`Console not reachable at ${url}`, {
205979
- hint: "docker compose --profile console up -d"
205980
- });
205981
- process.exit(1);
205982
- }
205983
- if (await openBrowser(url)) {
205984
- success(`console: ${url}`);
205985
- } else {
205986
- writeData(url);
205987
- }
205988
- });
205989
- }
205990
205908
  // src/commands/context.ts
205991
205909
  init_http();
205992
205910
  import {
@@ -209321,7 +209239,6 @@ registerSetupCommand(program);
209321
209239
  registerInitCommand(program);
209322
209240
  registerBootstrapCommand(program);
209323
209241
  registerObserverCommand(program);
209324
- registerConsoleCommand(program);
209325
209242
  registerLoginCommand(program);
209326
209243
  registerLogoutCommand(program);
209327
209244
  registerWhoamiCommand(program);
@@ -209349,5 +209266,5 @@ registerCreditsCommand(program);
209349
209266
  registerArchiveCommand(program);
209350
209267
  program.parse();
209351
209268
 
209352
- //# debugId=400188075261398364756E2164756E21
209269
+ //# debugId=83D336B04841B78A64756E2164756E21
209353
209270
  //# sourceMappingURL=cli.js.map