@hia-doc/dotnetdoc-runner 0.1.8 → 0.1.9
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/README.md +5 -0
- package/package.json +5 -5
- package/src/index.mjs +38 -3
package/README.md
CHANGED
|
@@ -45,6 +45,11 @@ Roslyn source extractor.
|
|
|
45
45
|
对 `dotnet-csharp-source`,配置也可以提供 `projectPath`,由 runner 先从
|
|
46
46
|
`.csproj` 推导源码文件集合,再调用轻量 Roslyn source extractor。
|
|
47
47
|
|
|
48
|
+
当同一请求同时包含 XML documentation 与带 `projectPath` 的 C# source 时,
|
|
49
|
+
`dotnetdoc-source-relation` 会携带同一 project-relative identity,并把
|
|
50
|
+
resolution、confidence、provenance 分开输出。relation 仍是 metadata-only:
|
|
51
|
+
`sourcesContentPolicy: none`,不嵌入源码正文,也不授予 source reader 能力。
|
|
52
|
+
|
|
48
53
|
```json
|
|
49
54
|
{
|
|
50
55
|
"kind": "dotnet-csharp-source",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hia-doc/dotnetdoc-runner",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Standalone .NET XML documentation runner and CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"LICENSE"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@hia-doc/dotnet-source-extractor": "0.1.
|
|
40
|
-
"@hia-doc/dotnet-xml-doc-extractor": "0.1.
|
|
41
|
-
"@hia-doc/dotnetdoc-adapter": "0.1.
|
|
42
|
-
"@hia-doc/dotnetdoc-spec": "0.1.
|
|
39
|
+
"@hia-doc/dotnet-source-extractor": "0.1.9",
|
|
40
|
+
"@hia-doc/dotnet-xml-doc-extractor": "0.1.9",
|
|
41
|
+
"@hia-doc/dotnetdoc-adapter": "0.1.9",
|
|
42
|
+
"@hia-doc/dotnetdoc-spec": "0.1.9"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/src/index.mjs
CHANGED
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
DOTNETDOC_CSHARP_SOURCE_EXTRACTION_CONTRACT,
|
|
10
10
|
DOTNETDOC_MARKUP_COMMENT_EXTRACTION_CONTRACT,
|
|
11
11
|
DOTNETDOC_PROJECT_DISCOVERY_CONTRACT,
|
|
12
|
+
DOTNETDOC_PROJECT_IDENTITY_POLICY,
|
|
13
|
+
DOTNETDOC_SOURCES_CONTENT_POLICY,
|
|
12
14
|
DOTNETDOC_SOURCE_RELATION_CONTRACT,
|
|
13
15
|
DOTNETDOC_SOURCE_RELATION_CONTRACT_VERSION,
|
|
14
16
|
DOTNETDOC_XML_DOC_EXTRACTION_CONTRACT
|
|
@@ -21,7 +23,11 @@ export {
|
|
|
21
23
|
} from "./schema.mjs";
|
|
22
24
|
import { DOTNETDOC_CONFIG_SCHEMA_ID, DOTNETDOC_CONFIG_SCHEMA_VERSION } from "./schema.mjs";
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @lang zh-CN DotNetDoc runner/producer 的公开包版本;它与各个 `0.1.0-draft` artifact contract version 分离。
|
|
28
|
+
* @lang en Public package version of the DotNetDoc runner/producer, kept separate from every `0.1.0-draft` artifact contract version.
|
|
29
|
+
*/
|
|
30
|
+
export const DOTNETDOC_RUNNER_VERSION = "0.1.9";
|
|
25
31
|
export const DOTNETDOC_INPUT_KINDS = Object.freeze(["dotnet-xml-doc", "dotnet-csharp-source", "dotnet-aspnet-surface", "dotnet-markup-comments", "dotnet-project"]);
|
|
26
32
|
export const DOTNETDOC_OUTPUT_KINDS = Object.freeze(["dotnetdoc-extraction", "hia-document", "dotnetdoc-source-relation", "dotnetdoc-aspnet-endpoint-extraction", "dotnetdoc-markup-comment-extraction", "dotnetdoc-project-discovery"]);
|
|
27
33
|
export const DOTNETDOC_BUILD_WARNING_CLASSIFICATION_CONTRACT = "dotnetdoc-build-warning-classification";
|
|
@@ -405,6 +411,14 @@ function buildSourceRelationArtifact(extractionRecords, request) {
|
|
|
405
411
|
xmlDocArtifacts: xmlRecords.map((record) => sourceArtifactRef(record)),
|
|
406
412
|
csharpSourceArtifacts: sourceRecords.map((record) => sourceArtifactRef(record))
|
|
407
413
|
},
|
|
414
|
+
identityPolicy: {
|
|
415
|
+
policy: DOTNETDOC_PROJECT_IDENTITY_POLICY,
|
|
416
|
+
scope: "workspace",
|
|
417
|
+
pathKind: "project-relative",
|
|
418
|
+
absolutePathInIdentity: false,
|
|
419
|
+
displayLabelInIdentity: false,
|
|
420
|
+
localeInIdentity: false
|
|
421
|
+
},
|
|
408
422
|
summary: {
|
|
409
423
|
relationCount: relations.length,
|
|
410
424
|
fallbackRelationCount,
|
|
@@ -414,7 +428,7 @@ function buildSourceRelationArtifact(extractionRecords, request) {
|
|
|
414
428
|
csharpSourceMemberCount: countMembers(sourceRecords)
|
|
415
429
|
},
|
|
416
430
|
privacy: {
|
|
417
|
-
sourcesContentPolicy:
|
|
431
|
+
sourcesContentPolicy: DOTNETDOC_SOURCES_CONTENT_POLICY,
|
|
418
432
|
sourcePreviewPolicy: "none",
|
|
419
433
|
embedsSourcesContent: false
|
|
420
434
|
},
|
|
@@ -446,7 +460,17 @@ function createSourceRelation(xmlRecord, xmlMember, sourceRecord, sourceMember,
|
|
|
446
460
|
memberId: xmlMember.id,
|
|
447
461
|
kind: xmlMember.kind,
|
|
448
462
|
name: xmlMember.name,
|
|
463
|
+
resolution: "resolved",
|
|
449
464
|
confidence: relationConfidence,
|
|
465
|
+
provenance: {
|
|
466
|
+
producer: "@hia-doc/dotnetdoc-runner",
|
|
467
|
+
activity: "xml-doc-to-csharp-source",
|
|
468
|
+
contract: DOTNETDOC_SOURCE_RELATION_CONTRACT,
|
|
469
|
+
contractVersion: DOTNETDOC_SOURCE_RELATION_CONTRACT_VERSION
|
|
470
|
+
},
|
|
471
|
+
...(sourceRecord.artifact.source?.projectContext?.projectIdentity
|
|
472
|
+
? { projectIdentity: sourceRecord.artifact.source.projectContext.projectIdentity }
|
|
473
|
+
: {}),
|
|
450
474
|
match: {
|
|
451
475
|
mode: matchMode,
|
|
452
476
|
exactDocumentationId: matchMode === "documentation-id"
|
|
@@ -628,7 +652,10 @@ function sourceArtifactRef(record) {
|
|
|
628
652
|
contract: record.artifact.contract,
|
|
629
653
|
contractVersion: record.artifact.contractVersion,
|
|
630
654
|
artifactPath: record.artifactPath,
|
|
631
|
-
inputPath: record.input.path
|
|
655
|
+
inputPath: record.input.path,
|
|
656
|
+
...(record.artifact.source?.projectContext?.projectIdentity
|
|
657
|
+
? { projectIdentity: record.artifact.source.projectContext.projectIdentity }
|
|
658
|
+
: {})
|
|
632
659
|
};
|
|
633
660
|
}
|
|
634
661
|
|
|
@@ -640,6 +667,14 @@ function unresolvedMember(reason, side, record, member) {
|
|
|
640
667
|
name: member.name,
|
|
641
668
|
side,
|
|
642
669
|
reason,
|
|
670
|
+
resolution: "unresolved",
|
|
671
|
+
confidence: member.source?.confidence ?? "low",
|
|
672
|
+
provenance: {
|
|
673
|
+
producer: "@hia-doc/dotnetdoc-runner",
|
|
674
|
+
activity: "xml-doc-to-csharp-source",
|
|
675
|
+
contract: DOTNETDOC_SOURCE_RELATION_CONTRACT,
|
|
676
|
+
contractVersion: DOTNETDOC_SOURCE_RELATION_CONTRACT_VERSION
|
|
677
|
+
},
|
|
643
678
|
source: {
|
|
644
679
|
path: member.source?.path ?? record.input.path,
|
|
645
680
|
language: member.source?.language ?? (side === "xml-doc" ? "xml" : "csharp"),
|