@staff0rd/assist 0.700.1 → 0.701.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/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.700.1",
9
+ version: "0.701.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -540,10 +540,13 @@ function resolveRepoWriteLabel(globalRaw, origin) {
540
540
  }
541
541
 
542
542
  // src/shared/stripLegacyConfigKeys.ts
543
- var legacyConfigKeys = ["news"];
544
543
  function stripLegacyConfigKeys(config) {
545
544
  const stripped = { ...config };
546
- for (const key of legacyConfigKeys) delete stripped[key];
545
+ const news = stripped.news;
546
+ if (news && typeof news === "object" && "feeds" in news) {
547
+ const { feeds: _feeds, ...rest } = news;
548
+ stripped.news = rest;
549
+ }
547
550
  return stripped;
548
551
  }
549
552
 
@@ -831,6 +834,9 @@ var assistConfigShape = {
831
834
  miro: z3.strictObject({
832
835
  extracts: z3.record(z3.string(), miroExtractSchema).optional()
833
836
  }).optional(),
837
+ news: z3.strictObject({
838
+ showInNav: z3.boolean().default(false)
839
+ }).optional(),
834
840
  deny: z3.array(
835
841
  z3.strictObject({
836
842
  pattern: z3.string(),
@@ -12355,6 +12361,15 @@ var miroConfigHelp = [
12355
12361
  }
12356
12362
  ];
12357
12363
 
12364
+ // src/commands/news/newsConfigHelp.ts
12365
+ var newsConfigHelp = [
12366
+ {
12367
+ key: "news.showInNav",
12368
+ setter: "assist config set news.showInNav true",
12369
+ note: "show the News tab in the web UI top nav (default false); /news stays reachable by URL either way"
12370
+ }
12371
+ ];
12372
+
12358
12373
  // src/commands/prs/prsConfigHelp.ts
12359
12374
  var prsRaiseConfigHelp = [
12360
12375
  {
@@ -12790,6 +12805,7 @@ var configHelpEntries = [
12790
12805
  ...litellmConfigHelp,
12791
12806
  ...mermaidConfigHelp,
12792
12807
  ...miroConfigHelp,
12808
+ ...newsConfigHelp,
12793
12809
  ...prsConfigHelp,
12794
12810
  ...ravendbConfigHelp,
12795
12811
  ...readTimeConfigHelp,
@@ -13366,6 +13382,12 @@ async function listNewsItems(_req, res) {
13366
13382
  respondJson(res, 200, cachedItems);
13367
13383
  }
13368
13384
 
13385
+ // src/commands/sessions/web/newsNavConfig.ts
13386
+ function newsNavConfig(_req, res) {
13387
+ const showInNav = loadConfig().news?.showInNav ?? false;
13388
+ respondJson(res, 200, { showInNav });
13389
+ }
13390
+
13369
13391
  // src/commands/sessions/web/listScopedRules.ts
13370
13392
  import path27 from "path";
13371
13393
 
@@ -15484,6 +15506,7 @@ var routes2 = {
15484
15506
  "GET /api/server-runs": handleServerRuns,
15485
15507
  "GET /api/pr-list": prList,
15486
15508
  "GET /api/news/items": listNewsItems,
15509
+ "GET /api/news/nav": newsNavConfig,
15487
15510
  "GET /api/releases/state": releasesState,
15488
15511
  "GET /api/releases/configured": releasesConfigured,
15489
15512
  "GET /api/usage/history": listUsageHistory,
@@ -25990,6 +26013,7 @@ async function add2(url) {
25990
26013
  function registerNews(program2) {
25991
26014
  const newsCommand = program2.command("news").description("Manage RSS news feeds");
25992
26015
  newsCommand.command("add").description("Add an RSS feed URL").argument("<url>", "RSS feed URL").action(add2);
26016
+ configHelp(newsCommand, newsConfigHelp);
25993
26017
  }
25994
26018
 
25995
26019
  // src/commands/piHook.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.700.1",
3
+ "version": "0.701.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {