@doccov/sdk 0.25.2 → 0.25.3
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.ts +2 -2
- package/dist/index.js +50 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2539,7 +2539,7 @@ interface SpecSummary {
|
|
|
2539
2539
|
* ```
|
|
2540
2540
|
*/
|
|
2541
2541
|
declare function extractSpecSummary(openpkg: OpenPkg8, doccov: DocCovSpec4): SpecSummary;
|
|
2542
|
-
import { OpenPkg as
|
|
2542
|
+
import { OpenPkg as OpenPkg_rdqorxtpih } from "@openpkg-ts/spec";
|
|
2543
2543
|
/**
|
|
2544
2544
|
* Build Plan types for AI-powered repository scanning.
|
|
2545
2545
|
*/
|
|
@@ -2636,7 +2636,7 @@ interface BuildPlanExecutionResult {
|
|
|
2636
2636
|
/** Whether all required steps succeeded */
|
|
2637
2637
|
success: boolean;
|
|
2638
2638
|
/** Generated OpenPkg spec (if successful) */
|
|
2639
|
-
spec?:
|
|
2639
|
+
spec?: OpenPkg_rdqorxtpih;
|
|
2640
2640
|
/** Results for each step */
|
|
2641
2641
|
stepResults: BuildPlanStepResult[];
|
|
2642
2642
|
/** Total execution time in milliseconds */
|
package/dist/index.js
CHANGED
|
@@ -1033,11 +1033,60 @@ function formatTypeReference(type, typeChecker, typeRefs, referencedTypes, visit
|
|
|
1033
1033
|
return { type: "object" };
|
|
1034
1034
|
}
|
|
1035
1035
|
if (typeRefs.has(symbolName)) {
|
|
1036
|
+
const typeArgs2 = type.typeArguments;
|
|
1037
|
+
if (typeArgs2 && typeArgs2.length > 0) {
|
|
1038
|
+
return {
|
|
1039
|
+
$ref: `#/types/${symbolName}`,
|
|
1040
|
+
typeArguments: typeArgs2.map((arg) => formatTypeReference(arg, typeChecker, typeRefs, referencedTypes, visited, depth + 1, maxDepth, typeIds))
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1036
1043
|
return { $ref: `#/types/${symbolName}` };
|
|
1037
1044
|
}
|
|
1038
|
-
|
|
1045
|
+
const typeArgs = type.typeArguments;
|
|
1046
|
+
if (symbolName === "Array" || symbolName === "ReadonlyArray") {
|
|
1047
|
+
if (typeArgs && typeArgs.length > 0) {
|
|
1048
|
+
return {
|
|
1049
|
+
type: "array",
|
|
1050
|
+
items: formatTypeReference(typeArgs[0], typeChecker, typeRefs, referencedTypes, visited, depth + 1, maxDepth, typeIds)
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1039
1053
|
return { type: "array" };
|
|
1040
1054
|
}
|
|
1055
|
+
const BUILTIN_GENERICS = new Set([
|
|
1056
|
+
"Promise",
|
|
1057
|
+
"PromiseLike",
|
|
1058
|
+
"Map",
|
|
1059
|
+
"Set",
|
|
1060
|
+
"WeakMap",
|
|
1061
|
+
"WeakSet",
|
|
1062
|
+
"Partial",
|
|
1063
|
+
"Required",
|
|
1064
|
+
"Readonly",
|
|
1065
|
+
"Pick",
|
|
1066
|
+
"Omit",
|
|
1067
|
+
"Record",
|
|
1068
|
+
"Exclude",
|
|
1069
|
+
"Extract",
|
|
1070
|
+
"NonNullable",
|
|
1071
|
+
"Awaited",
|
|
1072
|
+
"Iterable",
|
|
1073
|
+
"Iterator",
|
|
1074
|
+
"IterableIterator",
|
|
1075
|
+
"AsyncIterable",
|
|
1076
|
+
"AsyncIterator",
|
|
1077
|
+
"AsyncIterableIterator",
|
|
1078
|
+
"Generator",
|
|
1079
|
+
"AsyncGenerator"
|
|
1080
|
+
]);
|
|
1081
|
+
if (BUILTIN_GENERICS.has(symbolName)) {
|
|
1082
|
+
if (typeArgs && typeArgs.length > 0) {
|
|
1083
|
+
return {
|
|
1084
|
+
$ref: symbolName,
|
|
1085
|
+
typeArguments: typeArgs.map((arg) => formatTypeReference(arg, typeChecker, typeRefs, referencedTypes, visited, depth + 1, maxDepth, typeIds))
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
return { $ref: symbolName };
|
|
1089
|
+
}
|
|
1041
1090
|
const builtInSchema = BUILTIN_TYPE_SCHEMAS[symbolName];
|
|
1042
1091
|
if (builtInSchema) {
|
|
1043
1092
|
return { ...builtInSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doccov/sdk",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"description": "DocCov SDK - Documentation coverage and drift detection for TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@doccov/spec": "^0.24.1",
|
|
51
|
-
"@openpkg-ts/extract": "^0.
|
|
52
|
-
"@openpkg-ts/spec": "^0.
|
|
51
|
+
"@openpkg-ts/extract": "^0.12.0",
|
|
52
|
+
"@openpkg-ts/spec": "^0.12.0",
|
|
53
53
|
"@vercel/sandbox": "^1.0.3",
|
|
54
54
|
"mdast": "^3.0.0",
|
|
55
55
|
"minimatch": "^10.1.1",
|