rvlib-shipkit 2.15.0 → 2.17.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +1 -1
  3. package/src/assets/kit-config.ts +19 -1
  4. package/src/assets/run-assets.ts +18 -0
  5. package/src/checks/SK038-speaks-as.check.ts +66 -0
  6. package/src/cli/cmd_Drill.ts +219 -12
  7. package/src/cli/cmd_Media.ts +34 -8
  8. package/src/cli/cmd_Review.ts +22 -7
  9. package/src/cli/cmd_Secret.ts +127 -0
  10. package/src/cli/cmd_Social.ts +19 -9
  11. package/src/cli/cmd_Wiki.ts +4 -4
  12. package/src/cli/family-pages.ts +1 -0
  13. package/src/cli/registry.ts +8 -1
  14. package/src/core/scope.ts +42 -0
  15. package/src/drill/card.ts +65 -0
  16. package/src/drill/clean.ts +17 -6
  17. package/src/drill/finish.ts +67 -0
  18. package/src/drill/render.ts +21 -2
  19. package/src/drill/run.ts +51 -2
  20. package/src/drill/score.ts +68 -0
  21. package/src/drill/seal.ts +259 -0
  22. package/src/home/home-paths.ts +10 -1
  23. package/src/init-repo.ts +14 -4
  24. package/src/media-store/content.ts +1 -1
  25. package/src/media-store/hand.ts +6 -1
  26. package/src/media-store/put.ts +11 -7
  27. package/src/media-store/space.ts +17 -3
  28. package/src/repo-config.ts +4 -1
  29. package/src/review/auto.ts +7 -2
  30. package/src/review/cells.ts +1 -1
  31. package/src/review/format.ts +2 -2
  32. package/src/review/model.ts +46 -13
  33. package/src/review/previews.ts +1 -1
  34. package/src/review/routes.ts +11 -0
  35. package/src/review/store.ts +18 -10
  36. package/src/secrets/list.ts +40 -0
  37. package/src/serve/hub-app/cols-svc.ts +2 -1
  38. package/src/serve/hub-app/review/review-kit.ts +4 -0
  39. package/src/serve/hub-app/review/review-st.ts +40 -3
  40. package/src/serve/hub-app/review/review-views.tsx +145 -64
  41. package/src/serve/hub-app/review/thread-st.ts +76 -16
  42. package/src/serve/hub-app/review.css +17 -2
  43. package/src/shipkit.ts +1 -1
  44. package/src/social/house.ts +7 -5
  45. package/src/wiki/run-wiki.ts +13 -3
@@ -1,13 +1,16 @@
1
1
  // md-wiki graph server + link lint (folded in from the standalone mdwiki
2
2
  // lib; that npm package is frozen). Plain modules behind cmd_Wiki —
3
3
  // clipanion owns the option parsing.
4
- import { basename, relative, resolve } from 'path'
4
+ import { existsSync } from 'fs'
5
+ import { basename, join, relative, resolve } from 'path'
6
+ import { agentDirAt } from '../core/agent-dir-at.ts'
5
7
  import { lintMd } from './lint-md.ts'
6
8
  import { scanMdGraph } from './scan-md.ts'
7
9
  import { serveMdGraph } from './serve-graph.ts'
8
10
 
9
11
  export type WikiScanOpts = {
10
- root: string
12
+ /** default: the repo's wiki, as the hub mounts it (`wiki/`, else the agent folder, else the cwd) */
13
+ root?: string
11
14
  index?: string
12
15
  skip?: string
13
16
  /** where the verdict goes. The command passes its own stream, so the
@@ -16,8 +19,15 @@ export type WikiScanOpts = {
16
19
  print?: (line: string) => void
17
20
  }
18
21
 
22
+ // a `→ <path>` ref is relative to the wiki folder, so a lint rooted above it reports every ref as dangling
23
+ export function defaultWikiRoot(cwd: string): string {
24
+ if (existsSync(join(cwd, 'wiki'))) return 'wiki'
25
+ const agent = agentDirAt(cwd)
26
+ return existsSync(join(cwd, agent)) ? agent : '.'
27
+ }
28
+
19
29
  const scanConfig = (o: WikiScanOpts): { root: string; index?: string; skipDirs?: string[] } => ({
20
- root: resolve(process.cwd(), o.root),
30
+ root: resolve(process.cwd(), o.root ?? defaultWikiRoot(process.cwd())),
21
31
  index: o.index,
22
32
  skipDirs: o.skip?.split(',').filter(Boolean),
23
33
  })