@use-aistack/cli 0.7.0 → 0.7.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/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  import { Command } from "commander";
5
5
 
6
6
  // src/version.ts
7
- var CLI_VERSION = true ? "0.7.0" : "0.0.0-dev";
7
+ var CLI_VERSION = true ? "0.7.1" : "0.0.0-dev";
8
8
 
9
9
  // src/api.ts
10
10
  var BASE_URL = process.env.AISTACK_URL || "https://aistack.to";
@@ -4504,6 +4504,9 @@ function fmtUSD(n) {
4504
4504
  return `\u2248$${Math.round(n).toLocaleString("en-US")}`;
4505
4505
  }
4506
4506
  var fmtPct = (share) => `${(share * 100).toFixed(1)}%`;
4507
+ function fmtReceivedAt(ms) {
4508
+ return `${new Date(ms).toISOString().slice(0, 16).replace("T", " ")} UTC`;
4509
+ }
4507
4510
  function totalUSD(payload) {
4508
4511
  let sum = 0;
4509
4512
  let any = false;
@@ -4586,13 +4589,11 @@ function scanNoteLines(stats, label) {
4586
4589
  }
4587
4590
  return out;
4588
4591
  }
4589
- function payloadBlock(payload, showHeader, stats) {
4592
+ function payloadBlock(payload, stats) {
4590
4593
  const out = [];
4591
- if (showHeader) {
4592
- out.push(
4593
- `\u2014 ${harnessLabel(payload.harness.name)}${payload.harness.version ? ` ${payload.harness.version}` : ""}`
4594
- );
4595
- }
4594
+ out.push(
4595
+ `\u2014 ${harnessLabel(payload.harness.name)}${payload.harness.version ? ` ${payload.harness.version}` : ""}`
4596
+ );
4596
4597
  out.push(
4597
4598
  `window ${payload.window.days} days \xB7 ${payload.window.from} \u2192 ${payload.window.to}`
4598
4599
  );
@@ -4642,10 +4643,13 @@ function buildGateSummary(ctx) {
4642
4643
  `to ${config.stack.name} \xB7 ${host}/stacks/${config.stack.slug}`
4643
4644
  );
4644
4645
  }
4646
+ out.push(
4647
+ `searched ${HARNESS_ADAPTERS.map((a) => harnessLabel(a.name).toLowerCase()).join(", ")}`
4648
+ );
4645
4649
  for (const payload of payloads) {
4646
4650
  const stats = ctx.scanStats?.[payload.harness.name];
4647
- out.push(...payloadBlock(payload, payloads.length > 1, stats));
4648
4651
  out.push("");
4652
+ out.push(...payloadBlock(payload, stats));
4649
4653
  }
4650
4654
  if (out[out.length - 1] === "") out.pop();
4651
4655
  const n = payloads.reduce((a, p8) => a + withheldCount(p8), 0);
@@ -4957,7 +4961,9 @@ async function syncCommand(options = {}) {
4957
4961
  const res = await syncPublish(staged.token, staged.bodyJson);
4958
4962
  s.stop("Published");
4959
4963
  const lines2 = [
4960
- `Snapshot received at ${new Date(res.receivedAt).toISOString()}`,
4964
+ `Snapshot received ${fmtReceivedAt(res.receivedAt)}`,
4965
+ "",
4966
+ "Your stack now shows what actually ran:",
4961
4967
  lime(res.url)
4962
4968
  ];
4963
4969
  if (res.keptPrivate.refused && staged.body.keptPrivate !== void 0) {
@@ -5138,7 +5144,9 @@ function createSyncServer(deps, send) {
5138
5144
  (res) => {
5139
5145
  if (staged?.id === approvedStage.id) staged = null;
5140
5146
  const lines2 = [
5141
- `Published. Snapshot received at ${new Date(res.receivedAt).toISOString()}.`,
5147
+ `Published. Snapshot received ${fmtReceivedAt(res.receivedAt)}.`,
5148
+ "",
5149
+ "Your stack now shows what actually ran:",
5142
5150
  res.url
5143
5151
  ];
5144
5152
  const kp = approvedStage.body.keptPrivate;