rspress-plugin-api-extractor 0.19.5 → 0.19.7
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/BuildEnv.js +1 -2
- package/build-program.js +1 -2
- package/build-stages.js +1 -2
- package/category-resolver.js +1 -2
- package/config-helpers.js +1 -2
- package/config-utils.js +1 -2
- package/emit/mdx.js +1 -2
- package/emit/meta.js +1 -2
- package/errors.js +1 -2
- package/hide-cut-transformer.js +1 -2
- package/index.d.ts +0 -10
- package/layers/AppLayer.js +1 -2
- package/layers/api-results.js +1 -2
- package/layers/build-metrics.js +1 -2
- package/layers/config-resolution.js +1 -2
- package/layers/external-types.js +1 -2
- package/layers/observability.js +1 -2
- package/layers/type-environment.js +1 -2
- package/layers/xdg.js +1 -2
- package/llms-program.js +1 -2
- package/markdown/helpers.js +1 -2
- package/markdown/shiki-utils.js +1 -2
- package/model-loader.js +1 -2
- package/observability/EventBus.js +1 -2
- package/observability/events.js +1 -2
- package/observability/heartbeat.js +1 -2
- package/observability/metric-report.js +1 -2
- package/observability/sinks/console-sink.js +1 -2
- package/observability/sinks/issues-sink.js +1 -2
- package/observability/sinks/metrics-sink.js +1 -2
- package/observability/sinks/render-sink.js +1 -2
- package/observability/sinks/trace-sink.js +1 -2
- package/observability/spans.js +1 -2
- package/observability/sync-emitter.js +1 -2
- package/package.json +27 -27
- package/path-derivation.js +1 -2
- package/plugin.js +1 -2
- package/prettier-formatter.js +1 -2
- package/remark-api-codeblocks.js +1 -2
- package/remark-with-api.js +1 -2
- package/runtime/components/ApiExample/index.js +1 -2
- package/runtime/components/ApiLlmsPackageActions/index.js +1 -2
- package/runtime/components/ApiLlmsViewOptions/index.js +1 -2
- package/runtime/components/ApiMember/index.js +1 -2
- package/runtime/components/ApiSignature/index.js +1 -2
- package/runtime/components/EnumMembersTable/index.js +1 -2
- package/runtime/components/EnumMembersTable/index.module.js +1 -2
- package/runtime/components/ExampleBlock/index.js +1 -2
- package/runtime/components/ExampleBlock/index.module.js +1 -2
- package/runtime/components/MarkdownContent/index.js +1 -2
- package/runtime/components/MemberSignature/index.js +1 -2
- package/runtime/components/MemberSignature/index.module.js +1 -2
- package/runtime/components/ParametersTable/index.js +1 -2
- package/runtime/components/ParametersTable/index.module.js +1 -2
- package/runtime/components/SignatureBlock/index.js +1 -2
- package/runtime/components/SignatureBlock/index.module.js +1 -2
- package/runtime/components/SignatureCode/index.js +1 -2
- package/runtime/components/SignatureCode/index.module.js +1 -2
- package/runtime/components/SignatureToolbar/index.js +1 -2
- package/runtime/components/SignatureToolbar/index.module.js +1 -2
- package/runtime/components/buttons/ButtonGroup.js +1 -2
- package/runtime/components/buttons/CopyCodeButton.js +1 -2
- package/runtime/components/buttons/WrapSignatureButton.js +1 -2
- package/runtime/components/buttons/index.module.js +1 -2
- package/runtime/components/icons/CheckIcon/index.js +1 -2
- package/runtime/components/icons/CopyIcon/index.js +1 -2
- package/runtime/components/icons/UnwrapIcon/index.js +1 -2
- package/runtime/components/icons/WrapIcon/index.js +1 -2
- package/runtime/hooks/useWrapToggle.js +1 -2
- package/runtime/index.d.ts +0 -10
- package/runtime/utils/decode-hast.js +1 -2
- package/runtime/utils/hast-renderer.js +1 -2
- package/runtime/utils/strip-tags.js +1 -2
- package/schemas/config.js +1 -2
- package/schemas/observability.js +1 -2
- package/schemas/performance.js +1 -2
- package/serve.js +1 -2
- package/services/ConfigService.js +1 -2
- package/services/HighlighterService.js +1 -2
- package/services/OgService.js +1 -2
- package/services/PluginConfig.js +1 -2
- package/services/TwoslashCacheService.js +1 -2
- package/services/TwoslashEnvironments.js +1 -2
- package/services/TypeRegistryService.js +1 -2
- package/shiki-transformer.js +1 -2
- package/twoslash-access.js +1 -2
- package/twoslash-timing-wrapper.js +1 -2
- package/twoslash-transformer.js +1 -2
- package/vfs-registry.js +1 -2
package/BuildEnv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/BuildEnv.ts
|
|
4
4
|
/**
|
|
5
5
|
* Per-build configuration, as `Context.Reference` values rather than threaded
|
|
6
6
|
* parameters.
|
|
@@ -53,5 +53,4 @@ const PageConcurrency = Context.Reference("rspress-plugin-api-extractor/PageConc
|
|
|
53
53
|
/** Whether Twoslash diagnostics inside `@example` blocks are suppressed. */
|
|
54
54
|
const SuppressExampleErrors = Context.Reference("rspress-plugin-api-extractor/SuppressExampleErrors", { defaultValue: () => true });
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
export { BuildId, PageConcurrency, SuppressExampleErrors, Thresholds };
|
package/build-program.js
CHANGED
|
@@ -13,7 +13,7 @@ import { CrossLinker } from "@tsdoctor/model";
|
|
|
13
13
|
import { attributionFacts, packageContext } from "@tsdoctor/seo";
|
|
14
14
|
import { SnapshotService } from "@tsdoctor/snapshot";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/build-program.ts
|
|
17
17
|
/**
|
|
18
18
|
* Generate markdown documentation for a single API as a native Effect program.
|
|
19
19
|
*
|
|
@@ -137,5 +137,4 @@ function generateApiDocs(apiConfig, fileContextMap) {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
//#endregion
|
|
141
140
|
export { generateApiDocs };
|
package/build-stages.js
CHANGED
|
@@ -13,7 +13,7 @@ import { Routes, parseFrontmatter, stringifyFrontmatter } from "@tsdoctor/model"
|
|
|
13
13
|
import { deriveScriptBody, headTags } from "@tsdoctor/seo";
|
|
14
14
|
import { SnapshotService, hashContent, hashFrontmatter } from "@tsdoctor/snapshot";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/build-stages.ts
|
|
17
17
|
/**
|
|
18
18
|
* Prepare the flat list of WorkItems to process and the cross-link data maps.
|
|
19
19
|
*
|
|
@@ -671,5 +671,4 @@ function buildPipelineForApi(input) {
|
|
|
671
671
|
return Stream.fromIterable(input.workItems).pipe(Stream.mapEffect((workItem) => generateSinglePage(workItem, generateCtx), { concurrency: input.pageConcurrency }), Stream.filter((result) => result !== null), Stream.mapEffect((result) => writeSingleFile(result, writeCtx), { concurrency: input.pageConcurrency }), Stream.runFold(() => [], (acc, result) => [...acc, result]));
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
-
//#endregion
|
|
675
674
|
export { buildPipelineForApi, cleanupAndCommit, generateSinglePage, prepareWorkItems$1 as prepareWorkItems, writeMetadata, writeSingleFile };
|
package/category-resolver.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/category-resolver.ts
|
|
2
2
|
/**
|
|
3
3
|
* Resolver for category and source configurations with proper precedence handling.
|
|
4
4
|
* Encapsulates the logic for merging category configs and resolving source configs.
|
|
@@ -46,5 +46,4 @@ var CategoryResolver = class {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
//#endregion
|
|
50
49
|
export { CategoryResolver };
|
package/config-helpers.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Effect, Layer, Path, Result } from "effect";
|
|
|
5
5
|
import { NodeSyncFileSystem } from "@effected/memfs/node-sync";
|
|
6
6
|
import { discoverBundle } from "@tsdoctor/bundle";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/config-helpers.ts
|
|
9
9
|
/**
|
|
10
10
|
* The sync environment bundle discovery runs under from the config helpers:
|
|
11
11
|
* `@effected/memfs`'s read-only synchronous `FileSystem` over `node:fs` plus
|
|
@@ -149,5 +149,4 @@ function fromParentDir(parentDir, options = {}) {
|
|
|
149
149
|
return configs;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
//#endregion
|
|
153
152
|
export { fromDir, fromParentDir };
|
package/config-utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { SemVer } from "@effected/semver";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/config-utils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Type guard to check if version value is a full VersionConfig
|
|
7
7
|
*/
|
|
@@ -292,5 +292,4 @@ function validateExternalPackages(externalPackages, packageJson) {
|
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
//#endregion
|
|
296
295
|
export { classifyApiConfig, extractAutoDetectedPackages, extractPeerDependencies, extractTypeUtilities, isLoadedModel, isVersionConfig, mergeLlmsPluginConfig, normalizeLlmsPluginConfig, resolveExternalPackageVersions, resolvePackageVersionConflicts, validateExternalPackages };
|
package/emit/mdx.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Result } from "effect";
|
|
2
2
|
import { Blockquote, Code, Heading, InlineCode, Link, List, ListItem, Markdown, MdxJsxAttribute, MdxJsxAttributeValueExpression, MdxJsxFlowElement, MdxjsEsm, Paragraph, Root, Strong, Text } from "@effected/markdown";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/emit/mdx.ts
|
|
5
5
|
/** Serialize one flow node as its own document, without the trailing newline. */
|
|
6
6
|
function serialize(node) {
|
|
7
7
|
return Result.map(Markdown.stringifyResult(Root.make({ children: [node] })), (text) => text.replace(/\n$/, ""));
|
|
@@ -307,5 +307,4 @@ function emitMdxBody(page, options) {
|
|
|
307
307
|
return body.render();
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
//#endregion
|
|
311
310
|
export { emitMdxBody };
|
package/emit/meta.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { emitFrontmatterBlock } from "@tsdoctor/model";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/emit/meta.ts
|
|
4
4
|
/**
|
|
5
5
|
* The RSPress navigation and landing-page emitters: the root and
|
|
6
6
|
* per-category `_meta.json` files rendered from a `@tsdoctor/pages`
|
|
@@ -58,5 +58,4 @@ function emitIndexPage(index) {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
export { categoryMetaEntries, emitIndexPage, renderCategoryMeta, renderMeta, renderRootMeta, rootMetaEntries };
|
package/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Data } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/errors.ts
|
|
4
4
|
const ConfigValidationErrorBase = Data.TaggedError("ConfigValidationError");
|
|
5
5
|
var ConfigValidationError = class extends ConfigValidationErrorBase {
|
|
6
6
|
get message() {
|
|
@@ -14,5 +14,4 @@ var TypeRegistryError = class extends TypeRegistryErrorBase {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
//#endregion
|
|
18
17
|
export { ConfigValidationError, TypeRegistryError };
|
package/hide-cut-transformer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hide-cut-transformer.ts
|
|
2
2
|
/**
|
|
3
3
|
* Extract text content from a HAST line element.
|
|
4
4
|
*
|
|
@@ -92,5 +92,4 @@ const MemberFormatTransformer = {
|
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
//#endregion
|
|
96
95
|
export { HideCutLinesTransformer, MemberFormatTransformer };
|
package/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import "mdast";
|
|
|
11
11
|
import "unified";
|
|
12
12
|
import "vfile";
|
|
13
13
|
import "react";
|
|
14
|
-
//#region src/schemas/config.d.ts
|
|
15
14
|
/**
|
|
16
15
|
* Configuration for a single documentation category (e.g. Classes, Functions).
|
|
17
16
|
*
|
|
@@ -676,8 +675,6 @@ declare const PluginOptions: Schema.Struct<{
|
|
|
676
675
|
}>;
|
|
677
676
|
/** @public */
|
|
678
677
|
type PluginOptions = typeof PluginOptions.Encoded;
|
|
679
|
-
//#endregion
|
|
680
|
-
//#region src/config-helpers.d.ts
|
|
681
678
|
/**
|
|
682
679
|
* Metadata discovered from a single rslib-builder localPaths package folder.
|
|
683
680
|
*
|
|
@@ -751,8 +748,6 @@ declare function fromDir(dir: string, overrides?: FromDirOptions): MultiApiConfi
|
|
|
751
748
|
* defaults to each `api.fromDir` call.
|
|
752
749
|
*/
|
|
753
750
|
declare function fromParentDir(parentDir: string, options?: FromDirOptions): MultiApiConfig[];
|
|
754
|
-
//#endregion
|
|
755
|
-
//#region src/internal-types.d.ts
|
|
756
751
|
/**
|
|
757
752
|
* Compiler options relevant to type resolution.
|
|
758
753
|
* Subset of TypeScript's CompilerOptions used by the type registry and Twoslash.
|
|
@@ -768,8 +763,6 @@ interface LoadedModel {
|
|
|
768
763
|
/** Optional source config returned by the loader */
|
|
769
764
|
source?: SourceConfig;
|
|
770
765
|
}
|
|
771
|
-
//#endregion
|
|
772
|
-
//#region src/plugin.d.ts
|
|
773
766
|
/**
|
|
774
767
|
* RSPress plugin for generating API documentation from API Extractor model files
|
|
775
768
|
*/
|
|
@@ -790,8 +783,6 @@ export declare const ApiExtractorPlugin: typeof ApiExtractorPluginImpl & {
|
|
|
790
783
|
fromDir: typeof fromParentDir;
|
|
791
784
|
};
|
|
792
785
|
};
|
|
793
|
-
//#endregion
|
|
794
|
-
//#region src/serve.d.ts
|
|
795
786
|
/**
|
|
796
787
|
* Which RSPress server {@link serve} runs.
|
|
797
788
|
*
|
|
@@ -894,6 +885,5 @@ export declare function resolveServeConfig(options?: ServeOptions): ResolvedServ
|
|
|
894
885
|
* @public
|
|
895
886
|
*/
|
|
896
887
|
export declare function serve(options?: ServeOptions): Promise<void>;
|
|
897
|
-
//#endregion
|
|
898
888
|
export type { PluginOptions as ApiExtractorPluginOptions, BaseRoute, CategoryConfig, DirInfo, FromDirOptions, LoadedModel, MultiApiConfig, OpenGraphImageConfig, OpenGraphImageMetadata, OpenGraphMetadata, ResolvedServeConfig, ServeMode, ServeOptions, SingleApiConfig, SourceConfig, VersionConfig };
|
|
899
889
|
//# sourceMappingURL=index.d.ts.map
|
package/layers/AppLayer.js
CHANGED
|
@@ -13,7 +13,7 @@ import { Layer, Path } from "effect";
|
|
|
13
13
|
import { SnapshotService } from "@tsdoctor/snapshot";
|
|
14
14
|
import { NodeFileSystem } from "@effect/platform-node";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/layers/AppLayer.ts
|
|
17
17
|
/**
|
|
18
18
|
* The build's layer stack, tiered.
|
|
19
19
|
*
|
|
@@ -63,5 +63,4 @@ function makeAppLayers(input) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
//#endregion
|
|
67
66
|
export { makeAppLayers };
|
package/layers/api-results.js
CHANGED
|
@@ -2,7 +2,7 @@ import { PluginEvent } from "../observability/events.js";
|
|
|
2
2
|
import { emit } from "../observability/EventBus.js";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/layers/api-results.ts
|
|
6
6
|
/**
|
|
7
7
|
* Accumulating one API's resolution result into the build-wide totals.
|
|
8
8
|
*
|
|
@@ -79,5 +79,4 @@ function emitVfsPayloadEvents(packageName, payloads, wantTrace) {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
//#endregion
|
|
83
82
|
export { emitVfsPayloadEvents, mergeApiResult };
|
package/layers/build-metrics.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Layer, Metric } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/layers/build-metrics.ts
|
|
4
4
|
/** Create an isolated metric store for a single build. */
|
|
5
5
|
function makeMetricStore() {
|
|
6
6
|
const registry = /* @__PURE__ */ new Map();
|
|
@@ -84,5 +84,4 @@ const BuildMetrics = {
|
|
|
84
84
|
twoslashDiagnostics: Metric.counter("twoslash.diagnostics")
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
//#endregion
|
|
88
87
|
export { BuildMetrics, makeMetricStore };
|
|
@@ -24,7 +24,7 @@ import { hashContent } from "@tsdoctor/snapshot";
|
|
|
24
24
|
import { loadBundle, publishBundleAssets, resolveBundleFrom } from "@tsdoctor/bundle";
|
|
25
25
|
import { PackageManifest } from "@effected/package-json";
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
// src/layers/config-resolution.ts
|
|
28
28
|
/**
|
|
29
29
|
* Prepend import statements for external type references to the VFS declaration files.
|
|
30
30
|
* Returns per-entry payloads for event emission (heavy content/importRefs gated on wantTrace).
|
|
@@ -539,5 +539,4 @@ function rawTsConfig(api) {
|
|
|
539
539
|
return cfg;
|
|
540
540
|
}
|
|
541
541
|
|
|
542
|
-
//#endregion
|
|
543
542
|
export { makeConfigService };
|
package/layers/external-types.js
CHANGED
|
@@ -2,7 +2,7 @@ import { PluginEvent } from "../observability/events.js";
|
|
|
2
2
|
import { emit } from "../observability/EventBus.js";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/layers/external-types.ts
|
|
6
6
|
/**
|
|
7
7
|
* Merging external package declarations into the build's VFS.
|
|
8
8
|
*
|
|
@@ -70,5 +70,4 @@ const mergeExternalTypes = (typeRegistry, combinedVfs, apiConfigs, allExternalPa
|
|
|
70
70
|
}));
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
-
//#endregion
|
|
74
73
|
export { mergeExternalTypes };
|
package/layers/observability.js
CHANGED
|
@@ -8,7 +8,7 @@ import { makeRenderSink } from "../observability/sinks/render-sink.js";
|
|
|
8
8
|
import { makeTraceSink } from "../observability/sinks/trace-sink.js";
|
|
9
9
|
import { Effect, Layer, Logger, Metric, References } from "effect";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/layers/observability.ts
|
|
12
12
|
function formatTime(date) {
|
|
13
13
|
return date.toTimeString().slice(0, 8);
|
|
14
14
|
}
|
|
@@ -116,5 +116,4 @@ const logBuildSummary = (slowCodeBlockMs, renderPhase) => Effect.gen(function* (
|
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
118
|
|
|
119
|
-
//#endregion
|
|
120
119
|
export { buildEventBus, logBuildSummary, makeSummaryLoggerLayer };
|
|
@@ -7,7 +7,7 @@ import { Effect } from "effect";
|
|
|
7
7
|
import { resolveTypeScriptConfig, twoslashEnvHash } from "@tsdoctor/vfs";
|
|
8
8
|
import ts from "typescript";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/layers/type-environment.ts
|
|
11
11
|
/**
|
|
12
12
|
* Building the build's Twoslash type-checking environments.
|
|
13
13
|
*
|
|
@@ -106,5 +106,4 @@ const registerTypeEnvironments = (input) => Effect.gen(function* () {
|
|
|
106
106
|
}));
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
//#endregion
|
|
110
109
|
export { registerTypeEnvironments, resolveTsConfigTyped };
|
package/layers/xdg.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Layer, Path } from "effect";
|
|
|
2
2
|
import { NodeFileSystem } from "@effect/platform-node";
|
|
3
3
|
import { AppDirs, Xdg } from "@effected/xdg";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/layers/xdg.ts
|
|
6
6
|
/**
|
|
7
7
|
* The plugin's shared platform and XDG layers.
|
|
8
8
|
*
|
|
@@ -40,5 +40,4 @@ const PlatformLive = Layer.mergeAll(NodeFileSystem.layer, Path.layer);
|
|
|
40
40
|
/** XDG application directories rooted at {@link TSDOCTOR_NAMESPACE}. */
|
|
41
41
|
const AppDirsLive = AppDirs.layer({ namespace: TSDOCTOR_NAMESPACE }).pipe(Layer.provide(Layer.mergeAll(Xdg.layer, PlatformLive)));
|
|
42
42
|
|
|
43
|
-
//#endregion
|
|
44
43
|
export { AppDirsLive, PlatformLive, TSDOCTOR_NAMESPACE };
|
package/llms-program.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { filterLlmsFullTxt, filterLlmsTxt, generatePackageLlmsFullTxt, generatePackageLlmsTxt, generateStructuredLlmsTxt, parseLlmsTxtLine } from "@tsdoctor/pages";
|
|
5
5
|
import { Effect, FileSystem } from "effect";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/llms-program.ts
|
|
8
8
|
/**
|
|
9
9
|
* Effect program for post-processing LLMs text files in afterBuild.
|
|
10
10
|
*
|
|
@@ -281,5 +281,4 @@ function generatePerPackageFiles(fs, outDir, result, globalLlmsTxtContent, globa
|
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
//#endregion
|
|
285
284
|
export { processLlmsFiles };
|
package/markdown/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { emitFrontmatterBlock } from "@tsdoctor/model";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/markdown/helpers.ts
|
|
4
4
|
/**
|
|
5
5
|
* Frontmatter assembly for generated pages: the structured title and the
|
|
6
6
|
* rendering of neutral `@tsdoctor/seo` head tags into RSPress `head` pairs.
|
|
@@ -95,5 +95,4 @@ function generateFrontmatter(entityName, description, singularName, apiName, tag
|
|
|
95
95
|
return emitFrontmatterBlock(data);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
//#endregion
|
|
99
98
|
export { generateFrontmatter };
|
package/markdown/shiki-utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PluginEvent } from "../observability/events.js";
|
|
2
2
|
import { emitSync, syncBuildId } from "../observability/sync-emitter.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/markdown/shiki-utils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Default Shiki theme configuration
|
|
7
7
|
*/
|
|
@@ -113,5 +113,4 @@ const SHIKI_LANGS = [
|
|
|
113
113
|
"sh"
|
|
114
114
|
];
|
|
115
115
|
|
|
116
|
-
//#endregion
|
|
117
116
|
export { DEFAULT_SHIKI_THEMES, SHIKI_LANGS, collectShikiThemes, generateShikiHast, normalizeThemeConfig };
|
package/model-loader.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { Model } from "@tsdoctor/model";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/model-loader.ts
|
|
8
8
|
/**
|
|
9
9
|
* Load package.json from a path (string, URL, or Buffer).
|
|
10
10
|
*/
|
|
@@ -70,5 +70,4 @@ function loadVersionModel(versionValue) {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
//#endregion
|
|
74
73
|
export { loadApiModel, loadPackageJson, loadVersionModel };
|
|
@@ -2,7 +2,7 @@ import { BuildId } from "../BuildEnv.js";
|
|
|
2
2
|
import { LEVEL_RANK, levelOf } from "./events.js";
|
|
3
3
|
import { Context, Effect, Layer, Option } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/observability/EventBus.ts
|
|
6
6
|
var EventBus = class extends Context.Service()("rspress-plugin-api-extractor/EventBus") {};
|
|
7
7
|
function makeShape(sinks) {
|
|
8
8
|
const maxAdmitted = sinks.filter((s) => s.capturesPayload === true).reduce((max, s) => Math.max(max, LEVEL_RANK[s.minLevel]), -1);
|
|
@@ -54,5 +54,4 @@ function wantsLevel(level) {
|
|
|
54
54
|
return Effect.serviceOption(EventBus).pipe(Effect.flatMap((maybe) => Option.isSome(maybe) ? maybe.value.wantsLevel(level) : Effect.succeed(false)));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { EventBus, emit, makeEventBusLayer, wantsLevel };
|
package/observability/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Data } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/observability/events.ts
|
|
4
4
|
const LEVEL_RANK = {
|
|
5
5
|
error: 0,
|
|
6
6
|
warn: 1,
|
|
@@ -13,5 +13,4 @@ function levelOf(event) {
|
|
|
13
13
|
return event.level;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { LEVEL_RANK, PluginEvent, levelOf };
|
|
@@ -3,7 +3,7 @@ import { PluginEvent } from "./events.js";
|
|
|
3
3
|
import { emit } from "./EventBus.js";
|
|
4
4
|
import { Duration, Effect, Metric, Ref } from "effect";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/observability/heartbeat.ts
|
|
7
7
|
/** Build a `BuildProgress` event from the current + previous metric snapshot. */
|
|
8
8
|
function makeProgressEvent(args) {
|
|
9
9
|
const { phase, curr, prev } = args;
|
|
@@ -69,5 +69,4 @@ function runHeartbeat(opts) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
//#endregion
|
|
73
72
|
export { formatProgress, makeProgressEvent, runHeartbeat };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Metric } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/observability/metric-report.ts
|
|
4
4
|
/**
|
|
5
5
|
* Break any counter down by its attributes, largest first.
|
|
6
6
|
*
|
|
@@ -120,5 +120,4 @@ function formatCodeBlockReport(report) {
|
|
|
120
120
|
return lines;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
//#endregion
|
|
124
123
|
export { codeBlockReport, codeBlockReportFrom, formatCodeBlockReport, seriesFor };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LEVEL_RANK, levelOf } from "../events.js";
|
|
2
2
|
import { formatProgress } from "../heartbeat.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/observability/sinks/console-sink.ts
|
|
5
5
|
function formatTime(date) {
|
|
6
6
|
return date.toTimeString().slice(0, 8);
|
|
7
7
|
}
|
|
@@ -65,5 +65,4 @@ function makeConsoleSink(logLevel, opts = {}) {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
//#endregion
|
|
69
68
|
export { makeConsoleSink };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { Effect, FileSystem } from "effect";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/observability/sinks/issues-sink.ts
|
|
5
5
|
function withApi(base, api) {
|
|
6
6
|
return api ? {
|
|
7
7
|
...base,
|
|
@@ -164,5 +164,4 @@ function writeIssuesJson(snapshot, opts) {
|
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
//#endregion
|
|
168
167
|
export { eventToIssue, makeIssuesSink, writeIssuesJson };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BuildMetrics } from "../../layers/build-metrics.js";
|
|
2
2
|
import { Metric } from "effect";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/observability/sinks/metrics-sink.ts
|
|
5
5
|
/**
|
|
6
6
|
* Event-driven metrics sink.
|
|
7
7
|
*
|
|
@@ -105,5 +105,4 @@ function makeMetricsSink(context) {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
//#endregion
|
|
109
108
|
export { makeMetricsSink };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { Effect, FileSystem } from "effect";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/observability/sinks/render-sink.ts
|
|
5
5
|
const UNSCOPED = "(unscoped)";
|
|
6
6
|
/** How many of the slowest blocks the artifact retains. */
|
|
7
7
|
const SLOWEST_LIMIT = 25;
|
|
@@ -82,5 +82,4 @@ function writeRenderPhaseJson(report, samples, opts) {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { makeRenderSink, writeRenderPhaseJson };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/observability/sinks/trace-sink.ts
|
|
5
5
|
function openTracePath(p) {
|
|
6
6
|
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
7
7
|
fs.writeFileSync(p, "");
|
|
@@ -27,5 +27,4 @@ function makeTraceSink(tracePath) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
export { makeTraceSink };
|
package/observability/spans.js
CHANGED
|
@@ -3,7 +3,7 @@ import { PluginEvent } from "./events.js";
|
|
|
3
3
|
import { emit } from "./EventBus.js";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/observability/spans.ts
|
|
7
7
|
/**
|
|
8
8
|
* Maps phase names to threshold keys in ResolvedObservability["thresholds"].
|
|
9
9
|
* Used by withPhase to determine the breach threshold for a given phase.
|
|
@@ -55,5 +55,4 @@ function withPhase(phase, ctx, effect) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
//#endregion
|
|
59
58
|
export { withPhase };
|
|
@@ -2,7 +2,7 @@ import { BuildId, Thresholds } from "../BuildEnv.js";
|
|
|
2
2
|
import { emit } from "./EventBus.js";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/observability/sync-emitter.ts
|
|
6
6
|
/**
|
|
7
7
|
* The one bridge from synchronous, fiber-less code to the EventBus.
|
|
8
8
|
*
|
|
@@ -74,5 +74,4 @@ function syncSlowCodeBlockMs() {
|
|
|
74
74
|
return current.slowCodeBlockMs;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
//#endregion
|
|
78
77
|
export { emitSync, installSyncEmitter, syncBuildId, syncSlowCodeBlockMs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rspress-plugin-api-extractor",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "RSPress plugin for generating API documentation from TypeScript API Extractor models",
|
|
6
6
|
"keywords": [
|
|
@@ -37,36 +37,36 @@
|
|
|
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/memfs": "^0.
|
|
47
|
-
"@effected/npm": "^0.
|
|
48
|
-
"@effected/package-json": "^0.
|
|
49
|
-
"@effected/schema-org": "^0.
|
|
50
|
-
"@effected/semver": "^0.
|
|
51
|
-
"@effected/spdx": "^0.
|
|
52
|
-
"@effected/store": "^0.
|
|
53
|
-
"@effected/tsconfig-json": "^0.
|
|
54
|
-
"@effected/walker": "^0.
|
|
55
|
-
"@effected/xdg": "^0.
|
|
56
|
-
"@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/memfs": "^0.18.0",
|
|
47
|
+
"@effected/npm": "^0.25.0",
|
|
48
|
+
"@effected/package-json": "^0.24.1",
|
|
49
|
+
"@effected/schema-org": "^0.11.0",
|
|
50
|
+
"@effected/semver": "^0.15.0",
|
|
51
|
+
"@effected/spdx": "^0.16.0",
|
|
52
|
+
"@effected/store": "^0.17.0",
|
|
53
|
+
"@effected/tsconfig-json": "^0.17.0",
|
|
54
|
+
"@effected/walker": "^0.19.0",
|
|
55
|
+
"@effected/xdg": "^0.13.0",
|
|
56
|
+
"@effected/yaml": "^0.23.0",
|
|
57
57
|
"@microsoft/api-extractor-model": "7.33.12",
|
|
58
58
|
"@shikijs/twoslash": "^4.5.0",
|
|
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/snapshot": "0.5.
|
|
66
|
-
"@tsdoctor/vfs": "0.4.
|
|
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/snapshot": "0.5.7",
|
|
66
|
+
"@tsdoctor/vfs": "0.4.8",
|
|
67
67
|
"@typescript/vfs": "^1.6.5",
|
|
68
68
|
"clsx": "^2.1.1",
|
|
69
|
-
"effect": "^4.0.
|
|
69
|
+
"effect": "^4.0.6",
|
|
70
70
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
71
71
|
"mdast-util-to-hast": "^13.2.1",
|
|
72
72
|
"open": "^11.0.0",
|
package/path-derivation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/path-derivation.ts
|
|
4
4
|
function deriveOutputPaths(input) {
|
|
5
5
|
const { docsRoot, baseRoute, apiFolder, locales, defaultLang, versions, defaultVersion } = input;
|
|
6
6
|
const results = [];
|
|
@@ -34,5 +34,4 @@ function deriveOutputPaths(input) {
|
|
|
34
34
|
return results;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
//#endregion
|
|
38
37
|
export { deriveOutputPaths };
|