@theholocron/holocron-plugin-fern 3.43.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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/package.json +66 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Newton Koumantzelis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ <!-- editorconfig-checker-disable-file -->
2
+
3
+ # `@theholocron/holocron-plugin-fern`
4
+
5
+ Fern plugin for [Holocron](../cli). Implements the `wiki` capability for
6
+ engineering knowledge publishing via [Fern](https://buildwithfern.com).
7
+
8
+ ## Install
9
+
10
+ <!-- prettier-ignore -->
11
+ ```bash
12
+ pnpm add -D @theholocron/holocron-plugin-fern
13
+
14
+ ```
15
+
16
+ ## Config
17
+
18
+ <!-- prettier-ignore -->
19
+ ```jsonc
20
+ {
21
+ "providers": {
22
+ // Short form — org name inferred from config.org
23
+ "wiki": "fern",
24
+
25
+ // With custom domain — all repos share wiki.theholocron.dev/<reponame>
26
+ "wiki": ["fern", { "domain": "wiki.theholocron.dev" }],
27
+
28
+ // With an explicit basepath
29
+ "wiki": ["fern", { "domain": "wiki.theholocron.dev/myrepo" }],
30
+ },
31
+ }
32
+
33
+ ```
34
+
35
+ ### Options
36
+
37
+ | Option | Required | Description |
38
+ | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | `domain` | No | Base domain (`"wiki.theholocron.dev"`) or full path (`"wiki.theholocron.dev/myrepo"`). When a base domain is given, the repo name is appended automatically as a basepath. |
40
+
41
+ ## What `holocron setup` does
42
+
43
+ 1. **Writes `fern/fern.config.json`** — Fern workspace org name and pinned
44
+ CLI version. Always overwritten.
45
+ 2. **Scaffolds `fern/docs.yml`** — Instance URL, optional custom domain with
46
+ `multi-source: true`, and navigation pointing at `docs/decisions/` and
47
+ `docs/engineering/`. Skipped if the file already exists so hand-edited
48
+ navigation entries are preserved.
49
+
50
+ Both files must be committed — the CI workflow reads them at deploy time.
51
+
52
+ ## Custom domain and multi-source routing
53
+
54
+ When `domain` is a bare host, the plugin appends the repo name as a
55
+ basepath so every repo in the org gets its own URL under a shared domain:
56
+
57
+ ```yaml
58
+ # Generated fern/docs.yml for repo "theholocron/holocron"
59
+ # with domain: "wiki.theholocron.dev"
60
+ instances:
61
+ - url: theholocron.docs.buildwithfern.com/holocron
62
+ custom-domain: wiki.theholocron.dev/holocron
63
+ multi-source: true
64
+ ```
65
+
66
+ DNS: add one CNAME record — `wiki.theholocron.dev` →
67
+ `theholocron.docs.buildwithfern.com`.
68
+
69
+ ## Password protection
70
+
71
+ Password protection is configured in the **Fern Dashboard**
72
+ (`dashboard.buildwithfern.com`) — it is not configurable via `docs.yml` or
73
+ any CLI flag. Configure access control manually in the dashboard after
74
+ running `holocron setup`.
75
+
76
+ ## CI secrets
77
+
78
+ Add `HOLOCRON_FERN_TOKEN` to your repo's GitHub Secrets. The `wiki.yml` thin caller
79
+ passes it to the Fern CLI during `fern generate --docs`.
80
+
81
+ | Secret | Purpose |
82
+ | --------------------- | -------------------------------------------- |
83
+ | `HOLOCRON_FERN_TOKEN` | Fern workspace API token for `fern generate` |
84
+
85
+ Generate a token at `dashboard.buildwithfern.com` under **Settings → API tokens**.
86
+
87
+ ## What `wiki` provides
88
+
89
+ - `provision(opts?)` — writes `fern/fern.config.json` and scaffolds
90
+ `fern/docs.yml` (skipped if already present).
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@theholocron/holocron-plugin-fern",
3
+ "version": "3.43.0",
4
+ "description": "Holocron plugin for Fern. Implements the wiki capability for engineering knowledge publishing.",
5
+ "keywords": [
6
+ "fern",
7
+ "holocron",
8
+ "plugin",
9
+ "wiki"
10
+ ],
11
+ "homepage": "https://github.com/theholocron/holocron/tree/main/packages/holocron-plugin-fern#readme",
12
+ "bugs": "https://github.com/theholocron/holocron/issues",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/theholocron/holocron.git",
16
+ "directory": "packages/holocron-plugin-fern"
17
+ },
18
+ "license": "MIT",
19
+ "author": "Newton Koumantzelis",
20
+ "sideEffects": false,
21
+ "type": "module",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.mts",
25
+ "import": "./dist/index.mjs",
26
+ "default": "./dist/index.mjs"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "devDependencies": {
33
+ "@theholocron/eslint-config": "^7.25.4",
34
+ "@theholocron/tsconfig": "^7.20.0",
35
+ "@theholocron/tsdown-config": "^7.20.0",
36
+ "@theholocron/vitest-config": "^7.20.0",
37
+ "@types/node": "^26",
38
+ "@vitest/coverage-v8": "^4.1.10",
39
+ "@vitest/eslint-plugin": "^1.6.27",
40
+ "eslint": "^10.8.1",
41
+ "eslint-plugin-n": "^18.3.0",
42
+ "globals": "^17.11.0",
43
+ "tsdown": "^0.22.14",
44
+ "tsx": "4.23.12",
45
+ "typescript": "^5.9.3",
46
+ "vitest": "^4.1.10",
47
+ "@theholocron/cli": "3.43.0"
48
+ },
49
+ "peerDependencies": {
50
+ "@theholocron/cli": "3.43.0"
51
+ },
52
+ "engines": {
53
+ "node": ">=22"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "scripts": {
59
+ "build": "tsdown",
60
+ "lint": "eslint .",
61
+ "typecheck": "tsc --noEmit",
62
+ "test": "vitest run",
63
+ "test:watch": "vitest",
64
+ "test:coverage": "vitest run --coverage"
65
+ }
66
+ }