File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
server/api/registry/analysis Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -77,21 +77,6 @@ export default defineCachedEventHandler(
7777 } ,
7878)
7979
80- /**
81- * Fetch @types package info including deprecation status using fast-npm-meta.
82- * Returns undefined if the package doesn't exist.
83- */
84- async function fetchTypesPackageInfo ( packageName : string ) : Promise < TypesPackageInfo | undefined > {
85- const result = await getLatestVersion ( packageName , { metadata : true , throw : false } )
86- if ( 'error' in result ) {
87- return undefined
88- }
89- return {
90- packageName,
91- deprecated : result . deprecated ,
92- }
93- }
94-
9580/** Package metadata needed for association validation */
9681interface PackageWithMeta {
9782 maintainers ?: Array < { name : string } >
Original file line number Diff line number Diff line change @@ -106,6 +106,21 @@ interface ExportsAnalysis {
106106 hasTypes : boolean
107107}
108108
109+ /**
110+ * Fetch @types package info including deprecation status using fast-npm-meta.
111+ * Returns undefined if the package doesn't exist.
112+ */
113+ async function fetchTypesPackageInfo ( packageName : string ) : Promise < TypesPackageInfo | undefined > {
114+ const result = await getLatestVersion ( packageName , { metadata : true , throw : false } )
115+ if ( 'error' in result ) {
116+ return undefined
117+ }
118+ return {
119+ packageName,
120+ deprecated : result . deprecated ,
121+ }
122+ }
123+
109124export async function fetchPackageWithTypesAndFiles (
110125 packageName : string ,
111126 version ?: string ,
You can’t perform that action at this time.
0 commit comments