@theholocron/holocron-plugin-fern 5.0.0-alpha.277 → 5.0.0-alpha.279

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.d.mts CHANGED
@@ -1,8 +1,11 @@
1
1
  import { AuthError, DnsRecordRequest, PluginToken, ResolveTokenInput, Wiki, WikiProvisionOpts, WikiProxyConfig } from "@theholocron/cli";
2
+ /** Resolves the Fern token from `--token`, `HOLOCRON_FERN_TOKEN`, `FERN_TOKEN` or the keyring entry for `fern`, and throws `AuthError` when none is set. */
2
3
  export declare const resolveToken: import("@theholocron/cli").TokenResolver;
3
4
  /** Every token this plugin takes, for `holocron doctor tokens`. */
4
5
  export declare const tokens: PluginToken[];
6
+ /** The Fern CLI version written into `fern/fern.config.json`. */
5
7
  export declare const FERN_VERSION = "5.114.1";
8
+ /** Options for the Fern `wiki` capability. */
6
9
  interface FernWikiOptions extends ResolveTokenInput {
7
10
  /** Absolute path to the working repo root. Injected by the loader from RuntimeContext. */
8
11
  repoRoot?: string;
@@ -47,9 +50,12 @@ interface FernWikiOptions extends ResolveTokenInput {
47
50
  */
48
51
  icon?: string;
49
52
  }
53
+ /** `wiki` capability for Fern: writes the Fern config and docs scaffold for a repo. */
50
54
  export declare class FernWiki implements Wiki {
51
55
  private readonly opts;
56
+ /** Capability key; always `"wiki"`. */
52
57
  readonly key: "wiki";
58
+ /** Provider name; always `"fern"`. */
53
59
  readonly providerName = "fern";
54
60
  constructor(opts: FernWikiOptions);
55
61
  provision(callOpts?: WikiProvisionOpts): Promise<string>;
@@ -79,8 +85,11 @@ export declare class FernWiki implements Wiki {
79
85
  }>;
80
86
  dnsRecord(): DnsRecordRequest | null;
81
87
  }
88
+ /** Options for the Fern plugin; the same as the `wiki` capability's. */
82
89
  export type FernPluginOptions = FernWikiOptions;
90
+ /** Builds the `wiki` capability from the plugin options. */
83
91
  export declare function wiki(opts: FernPluginOptions): Wiki;
92
+ /** Creates the Fern plugin: its `connection` probe and the `wiki` capability. */
84
93
  export declare function createPlugin(options?: FernPluginOptions): {
85
94
  name: string;
86
95
  probes: {
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
4
  import { stringifyJson } from "@theholocron/json-utils";
5
5
  // src/auth.ts
6
+ /** Resolves the Fern token from `--token`, `HOLOCRON_FERN_TOKEN`, `FERN_TOKEN` or the keyring entry for `fern`, and throws `AuthError` when none is set. */
6
7
  const resolveToken = createResolveToken({
7
8
  envName: "HOLOCRON_FERN_TOKEN",
8
9
  vendorEnvName: "FERN_TOKEN",
@@ -12,10 +13,14 @@ const resolveToken = createResolveToken({
12
13
  /** Every token this plugin takes, for `holocron doctor tokens`. */
13
14
  const tokens = [resolveToken.token];
14
15
  // src/capabilities/wiki.ts
16
+ /** The Fern CLI version written into `fern/fern.config.json`. */
15
17
  const FERN_VERSION = "5.114.1";
18
+ /** `wiki` capability for Fern: writes the Fern config and docs scaffold for a repo. */
16
19
  var FernWiki = class {
17
20
  opts;
21
+ /** Capability key; always `"wiki"`. */
18
22
  key = "wiki";
23
+ /** Provider name; always `"fern"`. */
19
24
  providerName = "fern";
20
25
  constructor(opts) {
21
26
  this.opts = opts;
@@ -173,9 +178,11 @@ function updateInstancesBlock(content, instanceUrl, customDomain, multiSource, r
173
178
  return content.replace(blockRe, newBlock);
174
179
  }
175
180
  // src/index.ts
181
+ /** Builds the `wiki` capability from the plugin options. */
176
182
  function wiki(opts) {
177
183
  return new FernWiki(opts);
178
184
  }
185
+ /** Creates the Fern plugin: its `connection` probe and the `wiki` capability. */
179
186
  function createPlugin(options = {}) {
180
187
  return {
181
188
  name: "@theholocron/holocron-plugin-fern",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-fern",
3
- "version": "5.0.0-alpha.277",
3
+ "version": "5.0.0-alpha.279",
4
4
  "description": "Holocron plugin for Fern. Implements the wiki capability for engineering knowledge publishing.",
5
5
  "keywords": [
6
6
  "fern",
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
- "@theholocron/json-utils": "^1.16.1-alpha.2"
33
+ "@theholocron/json-utils": "^1.16.1-alpha.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26",
@@ -43,14 +43,14 @@
43
43
  "tsx": "4.23.15",
44
44
  "typescript": "^5.9.3",
45
45
  "vitest": "^5.0.5",
46
- "@theholocron/cli": "5.0.0-alpha.277",
47
- "@theholocron/eslint-config": "^8.9.0-alpha.3",
48
- "@theholocron/tsdown-config": "^8.9.0-alpha.3",
49
- "@theholocron/vitest-config": "^8.9.0-alpha.3",
50
- "@theholocron/tsconfig": "^8.9.0-alpha.3"
46
+ "@theholocron/eslint-config": "^8.9.0-alpha.4",
47
+ "@theholocron/tsconfig": "^8.9.0-alpha.4",
48
+ "@theholocron/tsdown-config": "^8.9.0-alpha.4",
49
+ "@theholocron/vitest-config": "^8.9.0-alpha.4",
50
+ "@theholocron/cli": "5.0.0-alpha.279"
51
51
  },
52
52
  "peerDependencies": {
53
- "@theholocron/cli": "5.0.0-alpha.277"
53
+ "@theholocron/cli": "5.0.0-alpha.279"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=22"