vitepress-plugin-api-extractor 0.4.17 → 0.4.19
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/ApiExtractor.js +1 -2
- package/Categories.js +1 -2
- package/Generate.js +1 -2
- package/Registry.js +1 -2
- package/Twoslash.js +1 -2
- package/TwoslashCache.js +1 -2
- package/emit/frontmatter.js +1 -2
- package/emit/markdown.js +1 -2
- package/emit/sidebar.js +1 -2
- package/index.d.ts +0 -18
- package/package.json +25 -25
package/ApiExtractor.js
CHANGED
|
@@ -4,7 +4,7 @@ import { environmentHash, makeTwoslashTransformer } from "./Twoslash.js";
|
|
|
4
4
|
import { TwoslashCacheStore } from "./TwoslashCache.js";
|
|
5
5
|
import { Effect, Layer, ManagedRuntime } from "effect";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/ApiExtractor.ts
|
|
8
8
|
const AppLive = Layer.mergeAll(PlatformLive, RegistryLive, TwoslashCacheStore.layer);
|
|
9
9
|
/**
|
|
10
10
|
* Generate the API pages and return what the site's config needs.
|
|
@@ -79,5 +79,4 @@ async function apiExtractor(options) {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
//#endregion
|
|
83
82
|
export { apiExtractor };
|
package/Categories.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiItemKind } from "@microsoft/api-extractor-model";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/Categories.ts
|
|
4
4
|
/**
|
|
5
5
|
* The default category set: one group per API item kind, with the folder,
|
|
6
6
|
* singular name and sidebar presentation each carries.
|
|
@@ -45,5 +45,4 @@ function navCategory(config) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
//#endregion
|
|
49
48
|
export { DEFAULT_CATEGORIES, navCategory };
|
package/Generate.js
CHANGED
|
@@ -11,7 +11,7 @@ import { buildIndexPage, buildNav, buildPage, prepareWorkItems, unscopedName } f
|
|
|
11
11
|
import { attributionFacts, deriveScriptBody, deriveSiteUrl, headTags, packageContext } from "@tsdoctor/seo";
|
|
12
12
|
import { resolveTypeScriptConfig } from "@tsdoctor/vfs";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/Generate.ts
|
|
15
15
|
/**
|
|
16
16
|
* The generation program: discover the bundle, load the model, build the
|
|
17
17
|
* virtual file system and compiler options, lift every item into a
|
|
@@ -232,5 +232,4 @@ function decodeManifest(packageJson) {
|
|
|
232
232
|
return PackageManifest.decode(packageJson).pipe(Effect.map((manifest) => manifest), Effect.orElseSucceed(() => void 0));
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
//#endregion
|
|
236
235
|
export { generate };
|
package/Registry.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Cache } from "@effected/store";
|
|
|
4
4
|
import { AppDirs, Xdg } from "@effected/xdg";
|
|
5
5
|
import { PackageFetcher, PackageSpec, RegistryObserver, TypeCache, TypeRegistry } from "@tsdoctor/registry";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/Registry.ts
|
|
8
8
|
/**
|
|
9
9
|
* External type loading: the `@tsdoctor/registry` stack over the same XDG
|
|
10
10
|
* cache the RSPress plugin uses, and the degrading merge of a documented
|
|
@@ -113,5 +113,4 @@ const loadExternalTypes = Effect.fn("Registry.loadExternalTypes")(function* (vfs
|
|
|
113
113
|
};
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
//#endregion
|
|
117
116
|
export { AppDirsLive, PlatformLive, RegistryLive, TSDOCTOR_NAMESPACE, externalPackagesOf, loadExternalTypes };
|
package/Twoslash.js
CHANGED
|
@@ -2,7 +2,7 @@ import { DEFAULT_COMPILER_OPTIONS, toProgrammaticCompilerOptions, twoslashEnvHas
|
|
|
2
2
|
import { transformerTwoslash } from "@shikijs/vitepress-twoslash";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/Twoslash.ts
|
|
6
6
|
/**
|
|
7
7
|
* Fingerprint the type environment: the declarations plus the compiler that
|
|
8
8
|
* interprets them, so a generation cached by one TypeScript is never served
|
|
@@ -39,5 +39,4 @@ function makeTwoslashTransformer(options) {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { environmentHash, makeTwoslashTransformer };
|
package/TwoslashCache.js
CHANGED
|
@@ -4,7 +4,7 @@ import { decodeTwoslashCache, encodeTwoslashCache, makeTwoslashCache, twoslashBl
|
|
|
4
4
|
import { Cache } from "@effected/store";
|
|
5
5
|
import { AppDirs } from "@effected/xdg";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/TwoslashCache.ts
|
|
8
8
|
/**
|
|
9
9
|
* Persistence for the Twoslash result cache: one gzipped generation per type
|
|
10
10
|
* environment in a sqlite-backed `@effected/store` Cache under the XDG cache
|
|
@@ -98,5 +98,4 @@ const StoreLive = Layer.effect(TwoslashCacheStore, Effect.gen(function* () {
|
|
|
98
98
|
};
|
|
99
99
|
})).pipe(Layer.provide(CacheLive));
|
|
100
100
|
|
|
101
|
-
//#endregion
|
|
102
101
|
export { TwoslashCacheStore };
|
package/emit/frontmatter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { emitFrontmatterBlock } from "@tsdoctor/model";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/emit/frontmatter.ts
|
|
4
4
|
/**
|
|
5
5
|
* Frontmatter assembly for generated pages: the page title and description
|
|
6
6
|
* plus the neutral `@tsdoctor/seo` head tags rendered into VitePress's
|
|
@@ -54,5 +54,4 @@ function emitFrontmatter(input) {
|
|
|
54
54
|
return emitFrontmatterBlock(data);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { emitFrontmatter, headConfig };
|
package/emit/markdown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Result } from "effect";
|
|
2
2
|
import { Blockquote, Code, Heading, InlineCode, Link, List, ListItem, Markdown, Paragraph, Root, Strong, Table, TableCell, TableRow, Text } from "@effected/markdown";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/emit/markdown.ts
|
|
5
5
|
/**
|
|
6
6
|
* The fence info string that triggers Twoslash under VitePress's default
|
|
7
7
|
* `explicitTrigger`.
|
|
@@ -195,5 +195,4 @@ function emitMarkdownBody(page) {
|
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
//#endregion
|
|
199
198
|
export { TWOSLASH_META, emitMarkdownBody, markdownBlockTree, markdownTree };
|
package/emit/sidebar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/emit/sidebar.ts
|
|
2
2
|
/** One category group as a collapsible sidebar section. */
|
|
3
3
|
function sidebarGroup(group) {
|
|
4
4
|
const collapsible = group.category.collapsible ?? true;
|
|
@@ -33,5 +33,4 @@ function sidebarFor(tree) {
|
|
|
33
33
|
return { [`${tree.baseRoute}/`]: sidebarItems(tree) };
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
36
|
export { sidebarFor, sidebarGroup, sidebarItems };
|
package/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import "@effected/xdg";
|
|
|
9
9
|
import { HeadTag } from "@tsdoctor/seo";
|
|
10
10
|
import { FlowContent, MarkdownStringifyError } from "@effected/markdown";
|
|
11
11
|
import { TwoslashTypesCache } from "@shikijs/twoslash";
|
|
12
|
-
//#region src/Categories.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* A category as this adapter configures it: how items match it, where its
|
|
15
14
|
* pages live, and how its sidebar group presents.
|
|
@@ -28,8 +27,6 @@ interface CategoryConfig extends WorkItemCategory {
|
|
|
28
27
|
* @public
|
|
29
28
|
*/
|
|
30
29
|
export declare const DEFAULT_CATEGORIES: Readonly<Record<string, CategoryConfig>>;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/emit/sidebar.d.ts
|
|
33
30
|
/**
|
|
34
31
|
* One VitePress sidebar item — the subset of the default theme's
|
|
35
32
|
* `SidebarItem` this adapter emits. Arrays are mutable because VitePress's
|
|
@@ -68,8 +65,6 @@ export declare function sidebarItems(tree: NavTree): SidebarItem[];
|
|
|
68
65
|
* @public
|
|
69
66
|
*/
|
|
70
67
|
export declare function sidebarFor(tree: NavTree): SidebarMulti;
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/Registry.d.ts
|
|
73
68
|
/**
|
|
74
69
|
* The XDG namespace every tsdoctor cache lives under — shared with the
|
|
75
70
|
* RSPress plugin so both adapters read one type cache and one Twoslash
|
|
@@ -132,8 +127,6 @@ export declare const loadExternalTypes: (vfs: Vfs, packages: readonly ExternalPa
|
|
|
132
127
|
loaded: string[];
|
|
133
128
|
skipped: string[];
|
|
134
129
|
}, never, TypeRegistry>;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/Generate.d.ts
|
|
137
130
|
/**
|
|
138
131
|
* The input to {@link generate}.
|
|
139
132
|
*
|
|
@@ -250,8 +243,6 @@ export declare const generate: (input: GenerateInput) => Effect.Effect<{
|
|
|
250
243
|
* @public
|
|
251
244
|
*/
|
|
252
245
|
type GenerateServices = FileSystem.FileSystem | Path.Path | TypeRegistry;
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/TwoslashCache.d.ts
|
|
255
246
|
/**
|
|
256
247
|
* The stats a persisted generation reports, with the environment it was
|
|
257
248
|
* stored under.
|
|
@@ -301,8 +292,6 @@ export declare class TwoslashCacheStore extends TwoslashCacheStore_base {
|
|
|
301
292
|
/** An always-cold in-memory store, for tests. */
|
|
302
293
|
static readonly layerTest: Layer.Layer<TwoslashCacheStore>;
|
|
303
294
|
}
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region src/ApiExtractor.d.ts
|
|
306
295
|
/**
|
|
307
296
|
* The options {@link apiExtractor} takes.
|
|
308
297
|
*
|
|
@@ -383,8 +372,6 @@ interface ApiExtractorResult {
|
|
|
383
372
|
* @public
|
|
384
373
|
*/
|
|
385
374
|
export declare function apiExtractor(options: ApiExtractorOptions): Promise<ApiExtractorResult>;
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region src/emit/frontmatter.d.ts
|
|
388
375
|
/**
|
|
389
376
|
* One VitePress head entry: a pair for an attribute-only tag, a triple when
|
|
390
377
|
* the tag carries inner HTML.
|
|
@@ -418,8 +405,6 @@ interface FrontmatterInput {
|
|
|
418
405
|
* @public
|
|
419
406
|
*/
|
|
420
407
|
export declare function emitFrontmatter(input: FrontmatterInput): string;
|
|
421
|
-
//#endregion
|
|
422
|
-
//#region src/emit/markdown.d.ts
|
|
423
408
|
/**
|
|
424
409
|
* The fence info string that triggers Twoslash under VitePress's default
|
|
425
410
|
* `explicitTrigger`.
|
|
@@ -452,8 +437,6 @@ export declare function markdownTree(page: Page): ReadonlyArray<FlowContent>;
|
|
|
452
437
|
* @public
|
|
453
438
|
*/
|
|
454
439
|
export declare function emitMarkdownBody(page: Page): Result.Result<string, MarkdownStringifyError>;
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region src/Twoslash.d.ts
|
|
457
440
|
/**
|
|
458
441
|
* Everything one Twoslash transformer needs.
|
|
459
442
|
*
|
|
@@ -487,6 +470,5 @@ export declare function environmentHash(vfs: Vfs): string;
|
|
|
487
470
|
* @public
|
|
488
471
|
*/
|
|
489
472
|
export declare function makeTwoslashTransformer(options: TwoslashTransformerOptions): ShikiTransformer;
|
|
490
|
-
//#endregion
|
|
491
473
|
export type { ApiExtractorOptions, ApiExtractorResult, CategoryConfig, ExternalPackage, ExternalTypesReport, FrontmatterInput, GenerateInput, GenerateResult, GenerateServices, HeadConfig, SidebarItem, SidebarMulti, TwoslashCacheReport, TwoslashCacheStoreShape, TwoslashTransformerOptions };
|
|
492
474
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress-plugin-api-extractor",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VitePress adapter for generating API documentation from TypeScript API Extractor models: markdown pages over the @tsdoctor/pages IR, a sidebar from its navigation tree, and Twoslash type-checking over the same virtual file system the RSPress plugin resolves.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,33 +37,33 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@effect/platform-node": "^4.0.
|
|
41
|
-
"@effected/github": "^0.
|
|
42
|
-
"@effected/glob": "^0.
|
|
43
|
-
"@effected/images": "^0.
|
|
44
|
-
"@effected/jsonc": "^0.
|
|
45
|
-
"@effected/markdown": "^0.
|
|
46
|
-
"@effected/npm": "^0.
|
|
47
|
-
"@effected/package-json": "^0.
|
|
48
|
-
"@effected/schema-org": "^0.
|
|
49
|
-
"@effected/semver": "^0.
|
|
50
|
-
"@effected/spdx": "^0.
|
|
51
|
-
"@effected/store": "^0.
|
|
52
|
-
"@effected/tsconfig-json": "^0.
|
|
53
|
-
"@effected/walker": "^0.
|
|
54
|
-
"@effected/xdg": "^0.
|
|
55
|
-
"@effected/yaml": "^0.
|
|
40
|
+
"@effect/platform-node": "^4.0.6",
|
|
41
|
+
"@effected/github": "^0.23.0",
|
|
42
|
+
"@effected/glob": "^0.14.0",
|
|
43
|
+
"@effected/images": "^0.5.0",
|
|
44
|
+
"@effected/jsonc": "^0.19.0",
|
|
45
|
+
"@effected/markdown": "^0.20.0",
|
|
46
|
+
"@effected/npm": "^0.25.0",
|
|
47
|
+
"@effected/package-json": "^0.24.1",
|
|
48
|
+
"@effected/schema-org": "^0.11.0",
|
|
49
|
+
"@effected/semver": "^0.15.0",
|
|
50
|
+
"@effected/spdx": "^0.16.0",
|
|
51
|
+
"@effected/store": "^0.17.0",
|
|
52
|
+
"@effected/tsconfig-json": "^0.17.0",
|
|
53
|
+
"@effected/walker": "^0.19.0",
|
|
54
|
+
"@effected/xdg": "^0.13.0",
|
|
55
|
+
"@effected/yaml": "^0.23.0",
|
|
56
56
|
"@microsoft/api-extractor-model": "7.33.12",
|
|
57
57
|
"@shikijs/twoslash": "^4.5.0",
|
|
58
58
|
"@shikijs/vitepress-twoslash": "^4.4.3",
|
|
59
|
-
"@tsdoctor/bundle": "0.6.
|
|
60
|
-
"@tsdoctor/manifest": "0.2.
|
|
61
|
-
"@tsdoctor/model": "0.8.
|
|
62
|
-
"@tsdoctor/pages": "0.3.
|
|
63
|
-
"@tsdoctor/registry": "0.5.
|
|
64
|
-
"@tsdoctor/seo": "0.4.
|
|
65
|
-
"@tsdoctor/vfs": "0.4.
|
|
66
|
-
"effect": "^4.0.
|
|
59
|
+
"@tsdoctor/bundle": "0.6.6",
|
|
60
|
+
"@tsdoctor/manifest": "0.2.10",
|
|
61
|
+
"@tsdoctor/model": "0.8.12",
|
|
62
|
+
"@tsdoctor/pages": "0.3.13",
|
|
63
|
+
"@tsdoctor/registry": "0.5.10",
|
|
64
|
+
"@tsdoctor/seo": "0.4.10",
|
|
65
|
+
"@tsdoctor/vfs": "0.4.8",
|
|
66
|
+
"effect": "^4.0.6",
|
|
67
67
|
"shiki": "^4.5.0",
|
|
68
68
|
"typescript": "^6.0.3"
|
|
69
69
|
},
|