@secondlayer/cli 23.4.0 → 23.4.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
@@ -30040,6 +30040,15 @@ function parseStartBlockOption(value) {
30040
30040
  }
30041
30041
  return parsed;
30042
30042
  }
30043
+ function genesisWarning(startBlock) {
30044
+ if (startBlock === undefined) {
30045
+ return "No startBlock: the first deploy backfills from genesis.";
30046
+ }
30047
+ if (startBlock <= 1) {
30048
+ return `startBlock ${startBlock}: the first deploy backfills all history from genesis.`;
30049
+ }
30050
+ return null;
30051
+ }
30043
30052
  function collectPinnedPrintSources(sources) {
30044
30053
  const out = [];
30045
30054
  for (const [sourceName, raw] of Object.entries(sources ?? {})) {
@@ -30692,9 +30701,9 @@ deploy does not backfill from genesis.`).action(async (file, options) => {
30692
30701
  derived.abis[k] ? { ...v, abi: derived.abis[k] } : v
30693
30702
  ]))
30694
30703
  } : effectiveDef);
30695
- if ((validated.startBlock ?? 1) <= 1) {
30696
- warn("No startBlock: the first deploy backfills from genesis.");
30697
- }
30704
+ const genesis = genesisWarning(effectiveDef.startBlock);
30705
+ if (genesis)
30706
+ warn(genesis);
30698
30707
  if (config.network !== "local") {
30699
30708
  info(`${dryRun ? "Bundling for remote deploy dry run" : "Bundling for remote deploy"} (${config.network})...`);
30700
30709
  const handlerCode = bundled.handlerCode;
@@ -31854,7 +31863,7 @@ var {
31854
31863
  // package.json
31855
31864
  var package_default = {
31856
31865
  name: "@secondlayer/cli",
31857
- version: "23.4.0",
31866
+ version: "23.4.1",
31858
31867
  description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
31859
31868
  repository: {
31860
31869
  type: "git",
@@ -31906,7 +31915,7 @@ var package_default = {
31906
31915
  "@secondlayer/sdk": "^16.2.0",
31907
31916
  "@secondlayer/shared": "^15.0.1",
31908
31917
  "@secondlayer/stacks": "^6.6.0",
31909
- "@secondlayer/subgraphs": "^8.0.1",
31918
+ "@secondlayer/subgraphs": "^8.0.2",
31910
31919
  "@secondlayer/verify": "^0.6.1",
31911
31920
  esbuild: "^0.28.2",
31912
31921
  "smol-toml": "^1.9.1",
@@ -37082,18 +37091,24 @@ async function runLogout() {
37082
37091
  info(`Not logged in (${target}).`);
37083
37092
  return;
37084
37093
  }
37085
- try {
37086
- await httpAt(target, "/api/auth/logout", {
37087
- method: "POST",
37088
- bearer: session.token
37089
- });
37090
- } catch (err) {
37091
- if (err instanceof CliHttpError) {
37092
- warn(`Server logout failed (${err.code}); clearing the local session anyway`);
37094
+ const isSession = session.token.startsWith("ss-sl_");
37095
+ if (isSession) {
37096
+ try {
37097
+ await httpAt(target, "/api/auth/logout", {
37098
+ method: "POST",
37099
+ bearer: session.token
37100
+ });
37101
+ } catch (err) {
37102
+ if (err instanceof CliHttpError) {
37103
+ warn(`Server logout failed (${err.code}); clearing the local session anyway`);
37104
+ }
37093
37105
  }
37094
37106
  }
37095
37107
  await clearSession(target);
37096
37108
  success(`Logged out (${target}).`);
37109
+ if (!isSession) {
37110
+ info("Removed the saved key from this machine. The key stays active; revoke it on the Keys tab.");
37111
+ }
37097
37112
  }
37098
37113
  function registerLogoutCommand(program) {
37099
37114
  program.command("logout").description("Sign this machine out of your Secondlayer account").action(() => runLogout());
@@ -37698,5 +37713,5 @@ registerCreditsCommand(program);
37698
37713
  registerArchiveCommand(program);
37699
37714
  program.parse();
37700
37715
 
37701
- //# debugId=C1922C0758B86D1064756E2164756E21
37716
+ //# debugId=8047E4F45A72C72F64756E2164756E21
37702
37717
  //# sourceMappingURL=cli.js.map