@extantape/payload-plugin-docs 0.1.0 → 0.1.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Captive Origins
3
+ Copyright (c) 2026 EXTANT APE
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Docs for Payload: a docs page for every feature your site lists, made and kept up to date by hook, with hand-written pages beside them, a publish-time lint for internals, and a check that nothing is missing.
4
4
 
5
- **Status:** 0.1.0, not on npm yet. 21 tests pass against Payload 3.92 with an in-memory MongoDB replica set and a fake generator (no AI is called). They cover pages following features, the lint, reviews, publishing rules, public access, the check and the tree. No site uses it yet.
5
+ **Status:** 0.1.1 is the latest release (see [CHANGELOG.md](CHANGELOG.md)). 25 tests pass against Payload 3.92 with an in-memory MongoDB replica set and a fake generator (no AI is called). They cover pages following features, the lint, reviews, publishing rules, public access, the check and the tree. No site uses it yet.
6
6
 
7
7
  ## What it does
8
8
 
@@ -46,6 +46,20 @@ Docs for Payload: a docs page for every feature your site lists, made and kept u
46
46
  - The public sees only published pages that aren't archived, without review details or the plugin's own fields. Drafts and old versions are for editors (`access.edit`) only.
47
47
  - **Bodies are Markdown**, so your site renders them its own way.
48
48
 
49
+ ## On its own, and with others
50
+
51
+ **On its own.** Docs needs the MongoDB adapter, `access.edit` and `access.review`, and at least one feature source: a `list` function you write. Drafts come from your own `generate`, or from each feature's summary and details. It doesn't import any other plugin.
52
+
53
+ **Needs.** Payload `^3.80.0` as a peer dependency. No other EXTANT APE plugin is required.
54
+
55
+ **Works with:**
56
+
57
+ - **Roadmap** (`@extantape/payload-plugin-roadmap`): with `catalog: { docs: true }`, Roadmap's features catalog adds itself to `config.custom.docsSources` and calls `onFeatureChange` when an entry changes. No import either way, and plugin order doesn't matter.
58
+
59
+ **Color Theory.** None needed. It has no screens of its own, and its collections use Payload's standard admin, which takes Color Theory's admin colors when its `applyToAdmin` option is on.
60
+
61
+ **Family.** Docs is in the Library family, with Watchlist and Wikipedia, which are named but not built yet. Roadmap is in a different family (Patronage), so that pairing is "works with". The families are a working draft that may change.
62
+
49
63
  ## Install
50
64
 
51
65
  ```sh
package/dist/sync.js CHANGED
@@ -137,7 +137,15 @@ export async function checkDocs(payload, req) {
137
137
  const problems = [];
138
138
  const all = (await payload.find({ collection: o.slug, pagination: false, draft: false, ...sys })).docs;
139
139
  const live = all.filter((p) => p._status === 'published' && !p.archived);
140
- for (const source of sourcesOf(payload)) {
140
+ let sources;
141
+ try {
142
+ sources = sourcesOf(payload);
143
+ }
144
+ catch {
145
+ // Two sources with one name: reported, not thrown, so the nightly job still gets its list.
146
+ return { ok: false, problems: [{ kind: 'duplicate', ref: 'sources', detail: 'two feature sources have the same name' }] };
147
+ }
148
+ for (const source of sources) {
141
149
  let features;
142
150
  try {
143
151
  features = await source.list({ payload, req });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extantape/payload-plugin-docs",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Docs for Payload: a docs page for every feature your site lists, made and kept up to date by hook, with hand-written pages beside them, a publish-time lint for internals, and a check that nothing is missing.",
5
5
  "homepage": "https://github.com/ExtantApe/payload-plugin-docs#readme",
6
6
  "bugs": {