@astrofoundry/pi-astro 0.40.76 → 0.40.77
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/extensions/astro-discord/arcane-watch.test.ts +3 -3
- package/extensions/astro-discord/arcane-watch.ts +3 -3
- package/extensions/astro-discord/daily-report.test.ts +14 -14
- package/extensions/astro-discord/daily-report.ts +20 -20
- package/extensions/astro-discord/daily-run.test.ts +7 -7
- package/extensions/astro-discord/daily-run.ts +9 -9
- package/extensions/astro-discord/index.ts +7 -7
- package/extensions/astro-discord/security-monitor.test.ts +8 -8
- package/extensions/astro-discord/security-monitor.ts +15 -15
- package/extensions/astro-discord/security.test.ts +40 -40
- package/extensions/astro-discord/security.ts +39 -39
- package/extensions/astro-discord/supervise.test.ts +1 -1
- package/extensions/astro-discord/supervise.ts +2 -2
- package/extensions/astro-discord/tools-report.test.ts +6 -6
- package/extensions/astro-discord/tools-report.ts +12 -12
- package/package.json +1 -1
|
@@ -252,7 +252,7 @@ export function buildLines(c: Collected): ToolLine[] {
|
|
|
252
252
|
for (const k of casks.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
253
253
|
if (k.pinned) continue;
|
|
254
254
|
const l = line(`cask:${k.name}`, k.name, k.installed, k.latest, { kind: "cask", token: k.name });
|
|
255
|
-
if (packages.has(k.name)) l.manual = `
|
|
255
|
+
if (packages.has(k.name)) l.manual = `installer needs your password; on Cortex: brew upgrade --cask ${k.name}`;
|
|
256
256
|
lines.push(l);
|
|
257
257
|
}
|
|
258
258
|
return lines;
|
|
@@ -394,7 +394,7 @@ export async function collectTools(options: CollectOptions): Promise<Collected>
|
|
|
394
394
|
try {
|
|
395
395
|
const res = await options.fetchImpl("https://nodejs.org/dist/index.json", { signal: AbortSignal.timeout(30_000) });
|
|
396
396
|
nodeLts = res.ok ? latestLts(await res.json()) : null;
|
|
397
|
-
if (!nodeLts) warnings.push(`nodejs.org index answered ${res.status}
|
|
397
|
+
if (!nodeLts) warnings.push(`nodejs.org index answered ${res.status}, no LTS release`);
|
|
398
398
|
} catch (err) {
|
|
399
399
|
warnings.push(`nodejs.org index failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
400
400
|
}
|
|
@@ -414,13 +414,13 @@ export async function collectTools(options: CollectOptions): Promise<Collected>
|
|
|
414
414
|
// Only for tools the installer manages; the first install of each is a manual step.
|
|
415
415
|
const python = installedComponent(installer, "python");
|
|
416
416
|
const pythonLatest = python ? pythonBuild(await fetchJson("https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest", "python-build-standalone"), python.split(".").slice(0, 2).join(".")) : null;
|
|
417
|
-
const gcloudLatest = installedComponent(installer, "gcloud") ? gcloudRelease(await fetchJson("https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json", "
|
|
417
|
+
const gcloudLatest = installedComponent(installer, "gcloud") ? gcloudRelease(await fetchJson("https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json", "gcloud release snapshot")) : null;
|
|
418
418
|
const bwLatest = installedComponent(installer, "bw") ? bwRelease(await fetchJson("https://api.github.com/repos/bitwarden/clients/releases?per_page=30", "bitwarden/clients releases")) : null;
|
|
419
419
|
const jqLatest = installedComponent(installer, "jq") ? jqRelease(await fetchJson("https://api.github.com/repos/jqlang/jq/releases/latest", "jqlang/jq releases")) : null;
|
|
420
420
|
let arcaneServer: string | null = null;
|
|
421
421
|
try {
|
|
422
422
|
arcaneServer = await options.arcaneServer();
|
|
423
|
-
if (!arcaneServer) warnings.push("
|
|
423
|
+
if (!arcaneServer) warnings.push("Arcane server reported no version");
|
|
424
424
|
} catch (err) {
|
|
425
425
|
warnings.push(`Arcane server version failed: ${firstLine(err instanceof Error ? err.message : String(err))}`);
|
|
426
426
|
}
|
|
@@ -505,7 +505,7 @@ export type NotesResult = { notes: ReleaseNote[]; omitted: string[] } | { notes:
|
|
|
505
505
|
export async function notesFor(line: ToolLine, fetchImpl: typeof fetch): Promise<NotesResult> {
|
|
506
506
|
const source = REVIEW_SOURCES[line.key];
|
|
507
507
|
if (!source) return { notes: null, reason: "not reviewed" };
|
|
508
|
-
if (!source.repo) return { notes: null, reason: `no release notes
|
|
508
|
+
if (!source.repo) return { notes: null, reason: `no release notes here; see ${source.notesUrl ?? "the vendor's site"}` };
|
|
509
509
|
let releases: GithubRelease[];
|
|
510
510
|
try {
|
|
511
511
|
releases = withoutPrefix(await fetchReleases(source.repo, fetchImpl), source.tagPrefix);
|
|
@@ -513,7 +513,7 @@ export async function notesFor(line: ToolLine, fetchImpl: typeof fetch): Promise
|
|
|
513
513
|
return { notes: null, reason: `release notes unavailable: ${err instanceof Error ? err.message : String(err)}` };
|
|
514
514
|
}
|
|
515
515
|
const between = releasesBetween(releases, line.installed, line.latest);
|
|
516
|
-
if (between.length === 0) return { notes: null, reason: "GitHub
|
|
516
|
+
if (between.length === 0) return { notes: null, reason: "no GitHub release between the versions" };
|
|
517
517
|
return capTotal(between);
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -673,7 +673,7 @@ function stateButton(state: LineState, customId: string, offeredLabel: string):
|
|
|
673
673
|
const VERDICT_MARK: Record<Verdict, string> = { none: "🟢 nothing relevant", check: "🟡 check", breaking: "🔴 breaking" };
|
|
674
674
|
|
|
675
675
|
export function lineText(l: ToolLine): string {
|
|
676
|
-
const head = `**${escapeDiscord(l.label)}** ${escapeDiscord(l.installed)} → ${escapeDiscord(l.latest)}${l.major ? " · major
|
|
676
|
+
const head = `**${escapeDiscord(l.label)}** ${escapeDiscord(l.installed)} → ${escapeDiscord(l.latest)}${l.major ? " · major" : ""}`;
|
|
677
677
|
const notes = l.review ? `\n-# ${l.review.verdict ? `${VERDICT_MARK[l.review.verdict]}: ` : "notes: "}${escapeDiscord(l.review.reason)}` : "";
|
|
678
678
|
const detail = l.detail ? `\n-# ${escapeDiscord(l.detail)}` : "";
|
|
679
679
|
const manual = l.manual ? `\n-# ${escapeDiscord(l.manual)}` : "";
|
|
@@ -688,13 +688,13 @@ function lineSection(l: ToolLine): MessageComponent {
|
|
|
688
688
|
? l.plan === "auto" && l.state === "offered"
|
|
689
689
|
? { type: 2, style: SECONDARY, label: "Automatic", custom_id: id, disabled: true }
|
|
690
690
|
: stateButton(l.state, id, "Update")
|
|
691
|
-
: { type: 2, style: SECONDARY, label: "
|
|
691
|
+
: { type: 2, style: SECONDARY, label: "By hand", custom_id: `tools:none:${l.key}`.slice(0, CUSTOM_ID_MAX), disabled: true };
|
|
692
692
|
return { type: 9, components: [{ type: 10, content: lineText(l) }], accessory };
|
|
693
693
|
}
|
|
694
694
|
|
|
695
695
|
function allSection(report: ToolsReport): MessageComponent {
|
|
696
696
|
const detail = report.brewAllDetail ? `\n-# ${escapeDiscord(report.brewAllDetail)}` : "";
|
|
697
|
-
return { type: 9, components: [{ type: 10, content: `**Homebrew**: upgrade
|
|
697
|
+
return { type: 9, components: [{ type: 10, content: `**Homebrew**: upgrade all outdated formulae, dependencies included${detail}` }], accessory: stateButton(report.brewAll, allId(report.date), "Upgrade everything") };
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
function clock(iso: string, timeZone: string): string {
|
|
@@ -705,7 +705,7 @@ function headText(report: ToolsReport): MessageComponent {
|
|
|
705
705
|
const when = `checked ${clock(report.checkedAt, report.timeZone)}`;
|
|
706
706
|
const head =
|
|
707
707
|
report.lines.length === 0 && !report.brewOutdated
|
|
708
|
-
? `**${TOOLS_PREFIX}**
|
|
708
|
+
? `**${TOOLS_PREFIX}** all up to date (${when}).`
|
|
709
709
|
: `**${TOOLS_PREFIX}** ${report.lines.length} update${report.lines.length === 1 ? "" : "s"} (${when}).`;
|
|
710
710
|
const warnings = report.warnings.length > 0 ? `\n-# ⚠️ ${escapeDiscord(report.warnings.join(" · ")).slice(0, 800)}` : "";
|
|
711
711
|
const automatic = report.lines.filter((l) => l.plan === "auto").length;
|
|
@@ -713,7 +713,7 @@ function headText(report: ToolsReport): MessageComponent {
|
|
|
713
713
|
const attention = report.lines.filter((l) => l.plan === "update");
|
|
714
714
|
const needs =
|
|
715
715
|
attention.length > 0 && report.mention && report.mention.length > 0
|
|
716
|
-
? `\n${report.mention.map((id) => `<@${id}>`).join(" ")} ${attention.length} update${attention.length === 1 ? " needs" : "s need"} you: ${attention.map((l) => `${escapeDiscord(l.label)}${l.major ? " (major
|
|
716
|
+
? `\n${report.mention.map((id) => `<@${id}>`).join(" ")} ${attention.length} update${attention.length === 1 ? " needs" : "s need"} you: ${attention.map((l) => `${escapeDiscord(l.label)}${l.major ? " (major)" : " (release notes)"}`).join(", ")}`
|
|
717
717
|
: "";
|
|
718
718
|
return { type: 10, content: `${head}${warnings}${plan}${needs}` };
|
|
719
719
|
}
|
|
@@ -779,5 +779,5 @@ export function writePostedReport(report: ToolsReport): void {
|
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
export function failureText(): string {
|
|
782
|
-
return `${TOOLS_PREFIX}
|
|
782
|
+
return `${TOOLS_PREFIX} version check failed, no update list today. Reason in the bridge log on Cortex.`;
|
|
783
783
|
}
|