@openpkg-ts/sdk 0.37.0 → 0.38.0
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/LICENSE +21 -0
- package/dist/browser.js +1 -1
- package/dist/index.d.ts +7 -31
- package/dist/index.js +335 -529
- package/dist/shared/{chunk-hnajr1tb.js → chunk-zrx9s0n4.js} +2 -1
- package/package.json +7 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Ryan Waits
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/browser.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -733,8 +733,7 @@ declare function loadSpec(spec: OpenPkg8): DocsInstance;
|
|
|
733
733
|
* Creates a docs instance for querying and rendering API documentation.
|
|
734
734
|
*
|
|
735
735
|
* Render methods (toMarkdown, toHTML, toJSON, toNavigation) return strings or
|
|
736
|
-
* plain data objects — not React components.
|
|
737
|
-
* `@openpkg-ts/registry` package.
|
|
736
|
+
* plain data objects — not React components. Bring your own UI components.
|
|
738
737
|
*
|
|
739
738
|
* @example
|
|
740
739
|
* ```ts
|
|
@@ -1038,30 +1037,7 @@ declare class QueryBuilder {
|
|
|
1038
1037
|
* Create a query builder for the given spec
|
|
1039
1038
|
*/
|
|
1040
1039
|
declare function query(spec: OpenPkg10): QueryBuilder;
|
|
1041
|
-
import { OpenPkg as OpenPkg11 } from "@openpkg-ts/spec";
|
|
1042
|
-
interface ReactLayoutOptions {
|
|
1043
|
-
/** Output directory for generated files */
|
|
1044
|
-
outDir: string;
|
|
1045
|
-
/** Layout variant: 'full' (single page) or 'index' (index with links) */
|
|
1046
|
-
variant?: "full" | "index";
|
|
1047
|
-
/** Components path alias (default: @/components/api) */
|
|
1048
|
-
componentsPath?: string;
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* Generate React layout from an OpenPkg spec.
|
|
1052
|
-
*
|
|
1053
|
-
* Unlike the old per-approach, this generates a single layout file.
|
|
1054
|
-
* Components are installed separately via the registry.
|
|
1055
|
-
*/
|
|
1056
|
-
declare function toReact(spec: OpenPkg11, options: ReactLayoutOptions): Promise<void>;
|
|
1057
|
-
/**
|
|
1058
|
-
* Generate layout code as a string (for preview).
|
|
1059
|
-
*/
|
|
1060
|
-
declare function toReactString(spec: OpenPkg11, options?: {
|
|
1061
|
-
variant?: "full" | "index";
|
|
1062
|
-
componentsPath?: string;
|
|
1063
|
-
}): string;
|
|
1064
|
-
import { OpenPkg as OpenPkg12, SpecExportKind as SpecExportKind7 } from "@openpkg-ts/spec";
|
|
1040
|
+
import { OpenPkg as OpenPkg11, SpecExportKind as SpecExportKind7 } from "@openpkg-ts/spec";
|
|
1065
1041
|
type FilterCriteria = {
|
|
1066
1042
|
/** Filter by kinds */
|
|
1067
1043
|
kinds?: SpecExportKind7[];
|
|
@@ -1086,7 +1062,7 @@ type FilterCriteria = {
|
|
|
1086
1062
|
};
|
|
1087
1063
|
type FilterResult = {
|
|
1088
1064
|
/** New spec with only matched exports (immutable) */
|
|
1089
|
-
spec:
|
|
1065
|
+
spec: OpenPkg11;
|
|
1090
1066
|
/** Number of exports that matched */
|
|
1091
1067
|
matched: number;
|
|
1092
1068
|
/** Total number of exports in original spec */
|
|
@@ -1102,7 +1078,7 @@ type FilterResult = {
|
|
|
1102
1078
|
* @param criteria - Filter criteria (empty criteria matches all)
|
|
1103
1079
|
* @returns FilterResult with new spec, matched count, total count
|
|
1104
1080
|
*/
|
|
1105
|
-
declare function filterSpec(spec:
|
|
1081
|
+
declare function filterSpec(spec: OpenPkg11, criteria: FilterCriteria): FilterResult;
|
|
1106
1082
|
import { SpecExport as SpecExport6, SpecType as SpecType3 } from "@openpkg-ts/spec";
|
|
1107
1083
|
interface GetExportOptions {
|
|
1108
1084
|
/** Entry point file path */
|
|
@@ -1259,7 +1235,7 @@ declare function getSourceLocation(node: ts4.Node, sourceFile: ts4.SourceFile):
|
|
|
1259
1235
|
* - @param {type} paramName - type annotation format
|
|
1260
1236
|
*/
|
|
1261
1237
|
declare function getParamDescription(propertyName: string, jsdocTags: readonly ts4.JSDocTag[], inferredAlias?: string): string | undefined;
|
|
1262
|
-
type DeclarationWithTypeParams = ts4.FunctionDeclaration | ts4.ClassDeclaration | ts4.InterfaceDeclaration | ts4.TypeAliasDeclaration | ts4.MethodDeclaration | ts4.ArrowFunction;
|
|
1238
|
+
type DeclarationWithTypeParams = ts4.FunctionDeclaration | ts4.ClassDeclaration | ts4.InterfaceDeclaration | ts4.TypeAliasDeclaration | ts4.MethodDeclaration | ts4.ArrowFunction | ts4.FunctionExpression;
|
|
1263
1239
|
/**
|
|
1264
1240
|
* Extract type parameters from declarations like `<T extends Base, K = Default>`
|
|
1265
1241
|
* Also captures variance annotations (in/out) and const modifier.
|
|
@@ -1274,7 +1250,7 @@ declare function isSymbolDeprecated(symbol: ts4.Symbol | undefined): {
|
|
|
1274
1250
|
reason?: string;
|
|
1275
1251
|
};
|
|
1276
1252
|
/** Classify a declaration node into an kind */
|
|
1277
|
-
declare function getExportKind(declaration: ts4.Declaration, type: ts4.Type): SpecExportKind8
|
|
1253
|
+
declare function getExportKind(declaration: ts4.Declaration, type: ts4.Type): Exclude<SpecExportKind8, "module" | "reference" | "external">;
|
|
1278
1254
|
/**
|
|
1279
1255
|
* Target version for JSON Schema generation.
|
|
1280
1256
|
* @see https://standardschema.dev/json-schema
|
|
@@ -1791,4 +1767,4 @@ declare function normalizeMembers(members: SpecMember3[], options?: NormalizeOpt
|
|
|
1791
1767
|
import ts16 from "typescript";
|
|
1792
1768
|
declare function isExported(node: ts16.Node): boolean;
|
|
1793
1769
|
declare function getNodeName(node: ts16.Node): string | undefined;
|
|
1794
|
-
export { zodAdapter, withDescription2 as withDescription, valibotAdapter, typeboxAdapter, toSearchIndexJSON, toSearchIndex2 as toSearchIndex,
|
|
1770
|
+
export { zodAdapter, withDescription2 as withDescription, valibotAdapter, typeboxAdapter, toSearchIndexJSON, toSearchIndex2 as toSearchIndex, toPagefindRecords2 as toPagefindRecords, toNavigation2 as toNavigation, toMarkdown2 as toMarkdown, toJSONString, toJSON2 as toJSON, toHTML2 as toHTML, toFumadocsMetaJSON, toDocusaurusSidebarJS, toAlgoliaRecords2 as toAlgoliaRecords, sortByName, serializeVariable, serializeTypeAlias, serializeInterface, serializeFunctionExport, serializeEnum, serializeClass, schemasAreEqual, schemaIsAny, resolveTypeRef, resolveExportTarget, resolveCompiledPath, registerReferencedTypes, registerAdapter, recommendSemverBump, query, normalizeType, normalizeSchema, normalizeMembers, normalizeExport, mergeConfig, loadSpec, loadConfig, listExports, isTypeReference, isTypeOnlyExport, isSymbolDeprecated, isStandardJSONSchema, isSchemaType, isPureRefSchema, isProperty, isPrimitiveName, isMethod, isExported, isBuiltinGeneric, isAnonymous, hasDeprecatedTag, groupByVisibility, getTypeOrigin, getSourceLocation, getProperties, getParamDescription, getNonNullableType, getNodeName, getMethods, getMemberBadges, getJSDocComment, getExportKind, getExport2 as getExport, getDeprecationMessage, toMarkdown2 as generateDocs, formatTypeParameters, formatSchema, formatReturnType, formatParameters, formatMappedType, formatConditionalType, formatBadges, findMissingParamDocs, findDiscriminatorProperty, findAdapter, filterSpec, extractTypeParameters, extractStandardSchemasFromTs, extractStandardSchemasFromProject, extractStandardSchemas, extractSpec, extractSchemaType, extractParameters, extract, exportToMarkdown, ensureNonEmptySchema, diffSpec2 as diffSpecs, diffSpec, detectTsRuntime, deduplicateSchemas, createProgram, createDocs, categorizeBreakingChanges, calculateNextVersion, buildSignatureString, buildSchema, arktypeAdapter, analyzeSpec, TypeRegistry, TypeReference2 as TypeReference, TsRuntime, StandardSchemaExtractionResult, StandardSchemaExtractionOutput, StandardJSONSchemaV1, StandardJSONSchemaTarget, StandardJSONSchemaOptions, SpecMappedType, SpecDiff, SpecDiagnostics, SpecConditionalType, SkippedExportDetail, SimplifiedSpec, SimplifiedSignature, SimplifiedReturn, SimplifiedParameter, SimplifiedMember, SimplifiedExport, SimplifiedExample, SerializerContext, SemverRecommendation, SemverBump, SearchRecord, SearchOptions, SearchIndex, SchemaExtractionResult, SchemaAdapter, STRING_PROTOTYPE_METHODS, QueryBuilder, ProjectExtractionOutput, ProjectExtractionInfo, ProgramResult, ProgramOptions, PagefindRecord, PRIMITIVES, OpenpkgConfig, NormalizeOptions, NavOptions, NavItem, NavGroup, NavFormat, NUMBER_PROTOTYPE_METHODS, MemberChangeInfo, MarkdownOptions, LoadOptions, ListExportsResult, ListExportsOptions, JSONSchema, JSONOptions, HTMLOptions, GroupBy, GetExportResult, GetExportOptions, GenericNav, FumadocsMetaItem, FumadocsMeta, FormatSchemaOptions, ForgottenExport, FilterResult, FilterCriteria, ExtractionWarningCode, ExtractionWarning, ExtractStandardSchemasOptions, ExtractResult, ExtractOptions, ExtractFromProjectOptions, ExternalsConfig, ExportVerification, ExportTracker, ExportMarkdownOptions, ExportItem, DocusaurusSidebarItem, DocusaurusSidebar, DocsInstance, DiagnosticItem, Diagnostic, CategorizedBreaking, CacheManagerOptions, CacheManager, CONFIG_FILENAME, BreakingSeverity, BUILTIN_TYPE_SCHEMAS, AlgoliaRecord, ARRAY_PROTOTYPE_METHODS };
|