metascope 0.1.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/dist/.DS_Store +0 -0
- package/dist/bin/chunk-BjEoQXZ0.js +1 -0
- package/dist/bin/cli.js +45845 -0
- package/dist/bin/jiti-D2Njwwqq.js +9 -0
- package/dist/bin/web-tree-sitter-LICENSE +21 -0
- package/dist/bin/web-tree-sitter.wasm +0 -0
- package/dist/grammars/tree-sitter-python-LICENSE +21 -0
- package/dist/grammars/tree-sitter-python.wasm +0 -0
- package/dist/grammars/tree-sitter-ruby-LICENSE +22 -0
- package/dist/grammars/tree-sitter-ruby.wasm +0 -0
- package/dist/lib/chunk-DrSxFLj_.js +14 -0
- package/dist/lib/index.d.ts +1496 -0
- package/dist/lib/index.js +6215 -0
- package/license.txt +21 -0
- package/package.json +109 -0
- package/readme.md +548 -0
|
@@ -0,0 +1,1496 @@
|
|
|
1
|
+
import { ILogBasic, ILogLayer } from "lognow";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import * as _kitschpatrol_tokei0 from "@kitschpatrol/tokei";
|
|
4
|
+
import { Language, LanguageInfo } from "@kitschpatrol/tokei";
|
|
5
|
+
import { GitConfig } from "pkg-types";
|
|
6
|
+
import { NormalizedPackageJson } from "read-pkg";
|
|
7
|
+
import { PyprojectData } from "read-pyproject";
|
|
8
|
+
|
|
9
|
+
//#region src/lib/log.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Set the logger instance for the module.
|
|
12
|
+
* Export this for library consumers to inject their own logger.
|
|
13
|
+
* @param logger - Accepts either a LogLayer instance or a Console- or Stream-like log target
|
|
14
|
+
*/
|
|
15
|
+
declare function setLogger(logger?: ILogBasic | ILogLayer): void;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/lib/source.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* A value that is either a single item or an array of items.
|
|
20
|
+
*/
|
|
21
|
+
type OneOrMany<T> = T | T[];
|
|
22
|
+
/**
|
|
23
|
+
* A unified record returned by every metadata source.
|
|
24
|
+
* @template D The shape of the primary data extracted from the source.
|
|
25
|
+
* @template E The shape of any additional computed/derived fields.
|
|
26
|
+
*/
|
|
27
|
+
type SourceRecord<D extends Record<string, unknown> = Record<string, unknown>, E extends Record<string, unknown> = Record<string, unknown>> = {
|
|
28
|
+
/** Primary structured data from this source. */data: D; /** Additional computed or derived fields not present in the raw source. */
|
|
29
|
+
extra?: E; /** The file path or URL from which the data was derived. */
|
|
30
|
+
source: string;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/lib/sources/arduino-library-properties.d.ts
|
|
34
|
+
declare const arduinoLibraryPropertiesSchema: z.ZodObject<{
|
|
35
|
+
architectures: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
36
|
+
authors: z.ZodArray<z.ZodObject<{
|
|
37
|
+
email: z.ZodOptional<z.ZodString>;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
41
|
+
Communication: "Communication";
|
|
42
|
+
"Data Processing": "Data Processing";
|
|
43
|
+
"Data Storage": "Data Storage";
|
|
44
|
+
"Device Control": "Device Control";
|
|
45
|
+
Display: "Display";
|
|
46
|
+
Other: "Other";
|
|
47
|
+
Sensors: "Sensors";
|
|
48
|
+
"Signal Input/Output": "Signal Input/Output";
|
|
49
|
+
Timing: "Timing";
|
|
50
|
+
Uncategorized: "Uncategorized";
|
|
51
|
+
}>>;
|
|
52
|
+
depends: z.ZodArray<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
versionConstraint: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
57
|
+
includes: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
58
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
59
|
+
maintainer: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
email: z.ZodOptional<z.ZodString>;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
64
|
+
paragraph: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
65
|
+
raw: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
66
|
+
repository: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
67
|
+
sentence: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
68
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
69
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
type ArduinoLibraryProperties = z.infer<typeof arduinoLibraryPropertiesSchema>;
|
|
72
|
+
type ArduinoLibraryPropertiesData = OneOrMany<SourceRecord<ArduinoLibraryProperties>> | undefined;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/lib/sources/cinder-cinderblock-xml.d.ts
|
|
75
|
+
declare const cinderCinderblockSchema: z.ZodObject<{
|
|
76
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
77
|
+
git: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
78
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
79
|
+
library: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
80
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
81
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
82
|
+
requires: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
83
|
+
summary: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
84
|
+
supports: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
85
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
86
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
type CinderCinderblock = z.infer<typeof cinderCinderblockSchema>;
|
|
89
|
+
type CinderCinderblockXmlData = OneOrMany<SourceRecord<CinderCinderblock>> | undefined;
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/lib/sources/code-stats.d.ts
|
|
92
|
+
type CodeStatsTotals = Omit<LanguageInfo, 'language' | 'reports'> & {
|
|
93
|
+
languages: Language[];
|
|
94
|
+
};
|
|
95
|
+
type CodeStatsFields = {
|
|
96
|
+
/** Per-language line count perLanguage, sorted by lines of code descending. */perLanguage?: LanguageInfo[]; /** Aggregate line counts across all languages. */
|
|
97
|
+
total?: CodeStatsTotals;
|
|
98
|
+
};
|
|
99
|
+
type CodeStatsData = OneOrMany<SourceRecord<CodeStatsFields>> | undefined;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/lib/sources/codemeta-json.d.ts
|
|
102
|
+
declare const codeMetaJsonDataSchema: z.ZodObject<{
|
|
103
|
+
applicationCategory: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
104
|
+
applicationSubCategory: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
105
|
+
author: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
|
+
affiliation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
107
|
+
email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
108
|
+
familyName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
109
|
+
givenName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
110
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
111
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
112
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
Organization: "Organization";
|
|
114
|
+
Person: "Person";
|
|
115
|
+
}>>;
|
|
116
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
117
|
+
}, z.core.$strip>>>>>;
|
|
118
|
+
buildInstructions: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
119
|
+
codeRepository: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
120
|
+
continuousIntegration: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
121
|
+
contributor: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
+
affiliation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
123
|
+
email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
124
|
+
familyName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
125
|
+
givenName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
126
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
127
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
128
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
Organization: "Organization";
|
|
130
|
+
Person: "Person";
|
|
131
|
+
}>>;
|
|
132
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
133
|
+
}, z.core.$strip>>>>>;
|
|
134
|
+
copyrightHolder: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
135
|
+
affiliation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
136
|
+
email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
137
|
+
familyName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
138
|
+
givenName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
139
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
140
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
141
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
Organization: "Organization";
|
|
143
|
+
Person: "Person";
|
|
144
|
+
}>>;
|
|
145
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
146
|
+
}, z.core.$strip>>>>>;
|
|
147
|
+
copyrightYear: z.ZodPipe<z.ZodTransform<number | undefined, unknown>, z.ZodOptional<z.ZodNumber>>;
|
|
148
|
+
dateCreated: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
149
|
+
dateModified: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
150
|
+
datePublished: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
151
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
152
|
+
developmentStatus: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
153
|
+
downloadUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
154
|
+
funder: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
155
|
+
affiliation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
156
|
+
email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
157
|
+
familyName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
158
|
+
givenName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
159
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
160
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
161
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
Organization: "Organization";
|
|
163
|
+
Person: "Person";
|
|
164
|
+
}>>;
|
|
165
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
166
|
+
}, z.core.$strip>>>>>;
|
|
167
|
+
funding: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
168
|
+
identifier: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
169
|
+
installUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
170
|
+
isAccessibleForFree: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
issueTracker: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
172
|
+
keywords: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
173
|
+
license: z.ZodOptional<z.ZodPipe<z.ZodTransform<string | string[] | undefined, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>>;
|
|
174
|
+
maintainer: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
175
|
+
affiliation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
176
|
+
email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
177
|
+
familyName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
178
|
+
givenName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
179
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
180
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
181
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
Organization: "Organization";
|
|
183
|
+
Person: "Person";
|
|
184
|
+
}>>;
|
|
185
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
186
|
+
}, z.core.$strip>>>>>;
|
|
187
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
188
|
+
operatingSystem: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
189
|
+
programmingLanguage: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
190
|
+
readme: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
191
|
+
relatedLink: z.ZodOptional<z.ZodPipe<z.ZodTransform<string | string[] | undefined, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>>;
|
|
192
|
+
releaseNotes: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
193
|
+
runtimePlatform: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
194
|
+
softwareHelp: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
195
|
+
softwareRequirements: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
196
|
+
identifier: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
197
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
198
|
+
runtimePlatform: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
199
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
200
|
+
}, z.core.$strip>>>>>;
|
|
201
|
+
softwareSuggestions: z.ZodOptional<z.ZodPipe<z.ZodTransform<Record<string, unknown>[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
202
|
+
identifier: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
203
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
204
|
+
runtimePlatform: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
205
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
206
|
+
}, z.core.$strip>>>>>;
|
|
207
|
+
softwareVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
208
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
209
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>>;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
type CodeMetaJson = z.infer<typeof codeMetaJsonDataSchema>;
|
|
212
|
+
type CodeMetaJsonData = OneOrMany<SourceRecord<CodeMetaJson>> | undefined;
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/lib/sources/dependency-updates.d.ts
|
|
215
|
+
type DependencyUpdatesPackage = {
|
|
216
|
+
/** Human-readable age of the update (e.g. "3 months"). */age?: string; /** Additional info about the update (e.g. deprecation notice). */
|
|
217
|
+
info?: string; /** Package name. */
|
|
218
|
+
name: string; /** Latest available version. */
|
|
219
|
+
new: string; /** Currently installed version. */
|
|
220
|
+
old: string;
|
|
221
|
+
};
|
|
222
|
+
type DependencyUpdatesFields = {
|
|
223
|
+
/** Packages with available major version updates. */major?: DependencyUpdatesPackage[]; /** Packages with available minor version updates. */
|
|
224
|
+
minor?: DependencyUpdatesPackage[]; /** Packages with available patch version updates. */
|
|
225
|
+
patch?: DependencyUpdatesPackage[];
|
|
226
|
+
};
|
|
227
|
+
type DependencyUpdatesExtra = {
|
|
228
|
+
/** Total dependency staleness in libyears. */libyears?: number; /** Total number of outdated packages. */
|
|
229
|
+
total?: number;
|
|
230
|
+
};
|
|
231
|
+
type DependencyUpdatesData = OneOrMany<SourceRecord<DependencyUpdatesFields, DependencyUpdatesExtra>> | undefined;
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/lib/sources/file-stats.d.ts
|
|
234
|
+
type FileStats = {
|
|
235
|
+
/** Total number of directories (recursive). */totalDirectoryCount?: number; /** Total number of files (recursive). */
|
|
236
|
+
totalFileCount?: number; /** Total size of all files in bytes. */
|
|
237
|
+
totalSizeBytes?: number;
|
|
238
|
+
};
|
|
239
|
+
type FileStatsData = OneOrMany<SourceRecord<FileStats>> | undefined;
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/lib/sources/git-config.d.ts
|
|
242
|
+
type GitConfigInfo = GitConfig;
|
|
243
|
+
type GitConfigData = OneOrMany<SourceRecord<GitConfigInfo>> | undefined;
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/lib/sources/git-stats.d.ts
|
|
246
|
+
type GitStatsInfo = {
|
|
247
|
+
/** Total number of local branches. */branchCount?: number; /** Name of the currently checked-out branch. */
|
|
248
|
+
branchCurrent?: string; /** Total number of commits in the current branch. */
|
|
249
|
+
commitCount?: number; /** ISO 8601 date of the repository's first commit. */
|
|
250
|
+
commitDateFirst?: string; /** ISO 8601 date of the most recent commit. */
|
|
251
|
+
commitDateLast?: string; /** Number of unique commit author emails. */
|
|
252
|
+
contributorCount?: number; /** Whether the repo uses Git LFS. */
|
|
253
|
+
hasLfs?: boolean; /** Whether the working tree has no uncommitted changes. */
|
|
254
|
+
isClean?: boolean; /** Whether the working tree has uncommitted changes. */
|
|
255
|
+
isDirty?: boolean; /** Whether any remote is ahead of the local branch. */
|
|
256
|
+
isRemoteAhead?: boolean; /** Number of configured remotes. */
|
|
257
|
+
remoteCount?: number; /** Per-remote ahead/behind commit counts relative to HEAD. */
|
|
258
|
+
remoteStatus?: Record<string, {
|
|
259
|
+
ahead: number;
|
|
260
|
+
behind: number;
|
|
261
|
+
}>; /** Number of registered git submodules. */
|
|
262
|
+
submoduleCount?: number; /** Total number of tags. */
|
|
263
|
+
tagCount?: number; /** ISO 8601 date of the most recent tag. */
|
|
264
|
+
tagDateLatest?: string; /** Name of the most recent tag. */
|
|
265
|
+
tagNameLatest?: string; /** Number of tags matching a version pattern (e.g. v1.2.3). */
|
|
266
|
+
tagReleaseCount?: number; /** ISO 8601 date of the most recent version tag. */
|
|
267
|
+
tagVersionDateLatest?: string; /** Most recent version tag, without the leading "v". */
|
|
268
|
+
tagVersionLatest?: string; /** Total commits ahead of all remotes combined. */
|
|
269
|
+
totalAhead?: number; /** Total commits behind all remotes combined. */
|
|
270
|
+
totalBehind?: number; /** Number of files tracked by git. */
|
|
271
|
+
trackedFileCount?: number; /** Total size in bytes of all tracked files. */
|
|
272
|
+
trackedSizeBytes?: number; /** Number of files with staged or unstaged changes. */
|
|
273
|
+
uncommittedFileCount?: number;
|
|
274
|
+
};
|
|
275
|
+
type GitStatsData = OneOrMany<SourceRecord<GitStatsInfo>> | undefined;
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/lib/sources/github.d.ts
|
|
278
|
+
type GitHubInfo = {
|
|
279
|
+
/** ISO 8601 date when the repo was archived, if applicable. */archivedAt?: string; /** Name of the repository's code of conduct. */
|
|
280
|
+
codeOfConduct?: string; /** Commits the default branch is ahead of the upstream fork parent. */
|
|
281
|
+
commitsAheadUpstream?: number; /** Commits the default branch is behind the upstream fork parent. */
|
|
282
|
+
commitsBehindUpstream?: number; /** Number of contributors to the repository. */
|
|
283
|
+
contributorCount?: number; /** ISO 8601 date when the repo was created. */
|
|
284
|
+
createdAt?: string; /** GitHub's internal numeric repository ID. */
|
|
285
|
+
databaseId?: number; /** Name of the default branch (e.g. "main"). */
|
|
286
|
+
defaultBranch?: string; /** Repository description. */
|
|
287
|
+
description?: string; /** Total number of discussions. */
|
|
288
|
+
discussionCount?: number; /** Repository disk usage in bytes. */
|
|
289
|
+
diskUsageBytes?: number; /** Number of forks. */
|
|
290
|
+
forkCount?: number; /** URL of the upstream repository this was forked from. */
|
|
291
|
+
forkedFrom?: string; /** Funding links configured on the repository. */
|
|
292
|
+
fundingLinks?: Array<{
|
|
293
|
+
platform: string;
|
|
294
|
+
url: string;
|
|
295
|
+
}>; /** Whether a CONTRIBUTING file exists. */
|
|
296
|
+
hasContributing?: boolean; /** Whether discussions are enabled. */
|
|
297
|
+
hasDiscussionsEnabled?: boolean; /** Whether issues are enabled. */
|
|
298
|
+
hasIssuesEnabled?: boolean; /** Whether the repo uses Git LFS (detected via .gitattributes). */
|
|
299
|
+
hasLfs?: boolean; /** Whether GitHub Pages is enabled. */
|
|
300
|
+
hasPages?: boolean; /** Whether projects are enabled. */
|
|
301
|
+
hasProjectsEnabled?: boolean; /** Whether sponsorships are enabled. */
|
|
302
|
+
hasSponsorshipsEnabled?: boolean; /** Whether vulnerability alerts are enabled. */
|
|
303
|
+
hasVulnerabilityAlertsEnabled?: boolean; /** Whether the wiki is enabled. */
|
|
304
|
+
hasWikiEnabled?: boolean; /** Homepage URL set on the repository. */
|
|
305
|
+
homepageUrl?: string; /** Whether the repository is archived. */
|
|
306
|
+
isArchived?: boolean; /** Whether the repository is disabled. */
|
|
307
|
+
isDisabled?: boolean; /** Whether the repository is a fork. */
|
|
308
|
+
isFork?: boolean; /** Whether the repository belongs to an organization. */
|
|
309
|
+
isInOrganization?: boolean; /** Whether the repository is a mirror. */
|
|
310
|
+
isMirror?: boolean; /** Whether the repository is private. */
|
|
311
|
+
isPrivate?: boolean; /** Whether a security policy is enabled. */
|
|
312
|
+
isSecurityPolicyEnabled?: boolean; /** Number of closed issues. */
|
|
313
|
+
issueCountClosed?: number; /** Number of open issues. */
|
|
314
|
+
issueCountOpen?: number; /** Whether the repository is a template. */
|
|
315
|
+
isTemplate?: boolean; /** Languages used in the repo, keyed by name with size in bytes. */
|
|
316
|
+
languages?: Record<string, number>; /** License identifier (unused; codemeta provides this). */
|
|
317
|
+
license?: string; /** SPDX license key (e.g. "mit"). */
|
|
318
|
+
licenseKey?: string; /** Human-readable license name. */
|
|
319
|
+
licenseName?: string; /** SPDX license identifier (e.g. "MIT"). */
|
|
320
|
+
licenseSpdxId?: string; /** URL to the license text. */
|
|
321
|
+
licenseUrl?: string; /** URL of the upstream mirror, if applicable. */
|
|
322
|
+
mirrorUrl?: string; /** Repository name. */
|
|
323
|
+
name?: string; /** Full "owner/repo" identifier. */
|
|
324
|
+
nameWithOwner?: string; /** URL to the repository's Open Graph image. */
|
|
325
|
+
openGraphImageUrl?: string; /** GitHub username of the repository owner. */
|
|
326
|
+
ownerLogin?: string; /** Owner type, e.g. "User" or "Organization". */
|
|
327
|
+
ownerType?: string; /** Full "owner/repo" of the parent fork source. */
|
|
328
|
+
parentNameWithOwner?: string; /** Primary programming language of the repository. */
|
|
329
|
+
primaryLanguage?: string; /** Number of closed pull requests. */
|
|
330
|
+
pullRequestCountClosed?: number; /** Number of merged pull requests. */
|
|
331
|
+
pullRequestCountMerged?: number; /** Number of open pull requests. */
|
|
332
|
+
pullRequestCountOpen?: number; /** ISO 8601 date of the most recent push. */
|
|
333
|
+
pushedAt?: string; /** Total number of releases. */
|
|
334
|
+
releaseCount?: number; /** ISO 8601 date of the latest release. */
|
|
335
|
+
releaseDateLatest?: string; /** Total download count across latest release assets. */
|
|
336
|
+
releaseDownloadCount?: number; /** Tag name of the latest release. */
|
|
337
|
+
releaseVersionLatest?: string; /** URL to the security policy. */
|
|
338
|
+
securityPolicyUrl?: string; /** Repository merge and branch settings. */
|
|
339
|
+
settings?: {
|
|
340
|
+
/** Whether "Update branch" button is enabled. */allowUpdateBranch?: boolean; /** Whether auto-merge is allowed. */
|
|
341
|
+
autoMergeAllowed?: boolean; /** Whether branches are deleted after merge. */
|
|
342
|
+
deleteBranchOnMerge?: boolean; /** Whether forking is allowed. */
|
|
343
|
+
forkingAllowed?: boolean; /** Whether merge commits are allowed. */
|
|
344
|
+
mergeCommitAllowed?: boolean; /** Template for merge commit messages. */
|
|
345
|
+
mergeCommitMessage?: string; /** Template for merge commit titles. */
|
|
346
|
+
mergeCommitTitle?: string; /** Whether rebase merging is allowed. */
|
|
347
|
+
rebaseMergeAllowed?: boolean; /** Whether squash merging is allowed. */
|
|
348
|
+
squashMergeAllowed?: boolean; /** Template for squash merge commit messages. */
|
|
349
|
+
squashMergeCommitMessage?: string; /** Template for squash merge commit titles. */
|
|
350
|
+
squashMergeCommitTitle?: string; /** Whether web-based commits require sign-off. */
|
|
351
|
+
webCommitSignoffRequired?: boolean;
|
|
352
|
+
}; /** SSH clone URL. */
|
|
353
|
+
sshUrl?: string; /** Number of stars. */
|
|
354
|
+
stargazerCount?: number; /** Number of git submodules (detected via .gitmodules). */
|
|
355
|
+
submoduleCount?: number; /** URL of the template repository this was created from. */
|
|
356
|
+
templateFrom?: string; /** Repository topics. */
|
|
357
|
+
topics?: string[]; /** ISO 8601 date the repo was last updated. */
|
|
358
|
+
updatedAt?: string; /** GitHub URL of the repository. */
|
|
359
|
+
url?: string; /** Whether a custom Open Graph image is set. */
|
|
360
|
+
usesCustomOpenGraphImage?: boolean; /** Repository visibility (e.g. "PUBLIC", "PRIVATE"). */
|
|
361
|
+
visibility?: string; /** Number of open vulnerability alerts. */
|
|
362
|
+
vulnerabilityAlertCount?: number; /** Number of watchers. */
|
|
363
|
+
watcherCount?: number;
|
|
364
|
+
};
|
|
365
|
+
type GitHubData = OneOrMany<SourceRecord<GitHubInfo>> | undefined;
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/lib/sources/go-go-mod.d.ts
|
|
368
|
+
declare const goModDataSchema: z.ZodObject<{
|
|
369
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
370
|
+
module: z.ZodString;
|
|
371
|
+
version: z.ZodString;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
go_version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
374
|
+
module: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
375
|
+
repository_url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
376
|
+
tool_dependencies: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
377
|
+
}, z.core.$strip>;
|
|
378
|
+
/** Parsed go.mod metadata */
|
|
379
|
+
type GoMod = z.infer<typeof goModDataSchema>;
|
|
380
|
+
type GoGoModData = OneOrMany<SourceRecord<GoMod>> | undefined;
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/lib/sources/go-goreleaser-yaml.d.ts
|
|
383
|
+
declare const goreleaserDataSchema: z.ZodObject<{
|
|
384
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
385
|
+
homepage: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
386
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
387
|
+
maintainer: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
388
|
+
operating_systems: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
389
|
+
project_name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
390
|
+
repository_url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
391
|
+
vendor: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
392
|
+
}, z.core.$strip>;
|
|
393
|
+
/** Parsed goreleaser metadata */
|
|
394
|
+
type Goreleaser = z.infer<typeof goreleaserDataSchema>;
|
|
395
|
+
type GoGoreleaserYamlData = OneOrMany<SourceRecord<Goreleaser>> | undefined;
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region src/lib/sources/java-pom-xml.d.ts
|
|
398
|
+
declare const pomXmlSchema: z.ZodObject<{
|
|
399
|
+
artifactId: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
400
|
+
ciManagementUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
401
|
+
contributors: z.ZodArray<z.ZodObject<{
|
|
402
|
+
email: z.ZodOptional<z.ZodString>;
|
|
403
|
+
name: z.ZodString;
|
|
404
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
405
|
+
url: z.ZodOptional<z.ZodString>;
|
|
406
|
+
}, z.core.$strip>>;
|
|
407
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
408
|
+
artifactId: z.ZodString;
|
|
409
|
+
groupId: z.ZodString;
|
|
410
|
+
version: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
413
|
+
devDependencies: z.ZodArray<z.ZodObject<{
|
|
414
|
+
artifactId: z.ZodString;
|
|
415
|
+
groupId: z.ZodString;
|
|
416
|
+
version: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
developers: z.ZodArray<z.ZodObject<{
|
|
419
|
+
email: z.ZodOptional<z.ZodString>;
|
|
420
|
+
name: z.ZodString;
|
|
421
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
422
|
+
url: z.ZodOptional<z.ZodString>;
|
|
423
|
+
}, z.core.$strip>>;
|
|
424
|
+
groupId: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
425
|
+
identifier: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
426
|
+
inceptionYear: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
427
|
+
issueManagementUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
428
|
+
javaVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
429
|
+
licenses: z.ZodArray<z.ZodObject<{
|
|
430
|
+
name: z.ZodOptional<z.ZodString>;
|
|
431
|
+
url: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>>;
|
|
433
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
434
|
+
organization: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
name: z.ZodString;
|
|
436
|
+
url: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, z.core.$strip>>;
|
|
438
|
+
scmUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
439
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
440
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
type PomXml = z.infer<typeof pomXmlSchema>;
|
|
443
|
+
type JavaPomXmlData = OneOrMany<SourceRecord<PomXml>> | undefined;
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region src/lib/sources/license-file.d.ts
|
|
446
|
+
type LicenseMatch = {
|
|
447
|
+
/** Match confidence between 0 and 1. */confidence: number; /** SPDX license identifier (e.g. "MIT"). */
|
|
448
|
+
spdxId: string;
|
|
449
|
+
};
|
|
450
|
+
type LicenseFileData = OneOrMany<SourceRecord<LicenseMatch>> | undefined;
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region src/lib/sources/metadata-file.d.ts
|
|
453
|
+
declare const metadataSchema: z.ZodObject<{
|
|
454
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
455
|
+
homepage: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
456
|
+
keywords: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
457
|
+
repository: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
type Metadata = z.infer<typeof metadataSchema>;
|
|
460
|
+
type MetadataFileData = OneOrMany<SourceRecord<Metadata>> | undefined;
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region src/lib/sources/metascope.d.ts
|
|
463
|
+
type MetascopeInfo = {
|
|
464
|
+
/** Total scan duration in milliseconds. */durationMs: number; /** Resolved options used for this scan (credentials excluded). */
|
|
465
|
+
options: Omit<GetMetadataBaseOptions, 'credentials'>; /** ISO 8601 timestamp of when the scan was performed. */
|
|
466
|
+
scannedAt: string; /** Version of the metascope library used. */
|
|
467
|
+
version: string; /** Workspaces Resolved */
|
|
468
|
+
workspaceDirectories: string[];
|
|
469
|
+
};
|
|
470
|
+
type MetascopeData = SourceRecord<MetascopeInfo> | undefined;
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region src/lib/sources/node-npm-registry.d.ts
|
|
473
|
+
type NodeNpmRegistryInfo = {
|
|
474
|
+
/** Deprecation message, if the package is deprecated. */deprecated?: string; /** Downloads in the last month. */
|
|
475
|
+
downloadsMonthly?: number; /** All-time total downloads. */
|
|
476
|
+
downloadsTotal?: number; /** Downloads in the last week. */
|
|
477
|
+
downloadsWeekly?: number; /** Downloads in the last year. */
|
|
478
|
+
downloadsYearly?: number; /** Number of files in the published package. */
|
|
479
|
+
fileCount?: number; /** Whether the package exposes TypeScript types. */
|
|
480
|
+
hasTypes?: boolean; /** ISO 8601 date the package was last published. */
|
|
481
|
+
publishDateLatest?: string; /** Unpacked size of the published package in bytes. */
|
|
482
|
+
unpackedSizeBytes?: number; /** The npmjs.com URL for the package. */
|
|
483
|
+
url?: string; /** Latest published version string. */
|
|
484
|
+
versionLatest?: string;
|
|
485
|
+
};
|
|
486
|
+
type NodeNpmRegistryData = OneOrMany<SourceRecord<NodeNpmRegistryInfo>> | undefined;
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/lib/sources/node-package-json.d.ts
|
|
489
|
+
type NodePackageJsonData = OneOrMany<SourceRecord<NormalizedPackageJson>> | undefined;
|
|
490
|
+
//#endregion
|
|
491
|
+
//#region src/lib/sources/obsidian-plugin-manifest-json.d.ts
|
|
492
|
+
type ObsidianManifest = {
|
|
493
|
+
/** Plugin author name. */author?: string; /** URL for the plugin author. */
|
|
494
|
+
authorUrl?: string; /** Plugin description. */
|
|
495
|
+
description?: string; /** URL for funding or sponsorship. */
|
|
496
|
+
fundingUrl?: string; /** Unique plugin identifier. */
|
|
497
|
+
id: string; /** Whether the plugin is desktop-only. */
|
|
498
|
+
isDesktopOnly?: boolean; /** Minimum Obsidian app version required. */
|
|
499
|
+
minAppVersion?: string; /** Display name of the plugin. */
|
|
500
|
+
name?: string; /** Plugin version string. */
|
|
501
|
+
version?: string;
|
|
502
|
+
};
|
|
503
|
+
type ObsidianPluginManifestJsonData = OneOrMany<SourceRecord<ObsidianManifest>> | undefined;
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region src/lib/sources/obsidian-plugin-registry.d.ts
|
|
506
|
+
type ObsidianPluginRegistryInfo = {
|
|
507
|
+
/** Total community download count. */downloadCount?: number; /** Obsidian plugin directory URL. */
|
|
508
|
+
url?: string;
|
|
509
|
+
};
|
|
510
|
+
type ObsidianPluginRegistryData = OneOrMany<SourceRecord<ObsidianPluginRegistryInfo>> | undefined;
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region src/lib/sources/openframeworks-addon-config-mk.d.ts
|
|
513
|
+
declare const openframeworksAddonConfigSchema: z.ZodObject<{
|
|
514
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
515
|
+
dependencies: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
516
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
517
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
518
|
+
platformSections: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
519
|
+
tags: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
520
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
type OpenframeworksAddonConfig = z.infer<typeof openframeworksAddonConfigSchema>;
|
|
523
|
+
type OpenframeworksAddonConfigMkData = OneOrMany<SourceRecord<OpenframeworksAddonConfig>> | undefined;
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region src/lib/sources/openframeworks-install-xml.d.ts
|
|
526
|
+
declare const openframeworksInstallXmlSchema: z.ZodObject<{
|
|
527
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
528
|
+
codeUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
529
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
530
|
+
downloadUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
531
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
532
|
+
operatingSystems: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
533
|
+
requirements: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
534
|
+
siteUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
535
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
536
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
537
|
+
}, z.core.$strip>;
|
|
538
|
+
type OpenframeworksInstallXml = z.infer<typeof openframeworksInstallXmlSchema>;
|
|
539
|
+
type OpenframeworksInstallXmlData = OneOrMany<SourceRecord<OpenframeworksInstallXml>> | undefined;
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/lib/sources/processing-library-properties.d.ts
|
|
542
|
+
declare const processingLibraryPropertiesSchema: z.ZodObject<{
|
|
543
|
+
authors: z.ZodArray<z.ZodObject<{
|
|
544
|
+
name: z.ZodString;
|
|
545
|
+
url: z.ZodOptional<z.ZodString>;
|
|
546
|
+
}, z.core.$strip>>;
|
|
547
|
+
categories: z.ZodArray<z.ZodEnum<{
|
|
548
|
+
GUI: "GUI";
|
|
549
|
+
"3D": "3D";
|
|
550
|
+
Animation: "Animation";
|
|
551
|
+
Compilations: "Compilations";
|
|
552
|
+
Data: "Data";
|
|
553
|
+
Fabrication: "Fabrication";
|
|
554
|
+
Geometry: "Geometry";
|
|
555
|
+
Hardware: "Hardware";
|
|
556
|
+
"I/O": "I/O";
|
|
557
|
+
Language: "Language";
|
|
558
|
+
Math: "Math";
|
|
559
|
+
Simulation: "Simulation";
|
|
560
|
+
Sound: "Sound";
|
|
561
|
+
Utilities: "Utilities";
|
|
562
|
+
Typography: "Typography";
|
|
563
|
+
"Video & Vision": "Video & Vision";
|
|
564
|
+
}>>;
|
|
565
|
+
download: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
566
|
+
id: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
567
|
+
maxRevision: z.ZodNumber;
|
|
568
|
+
minRevision: z.ZodNumber;
|
|
569
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
570
|
+
paragraph: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
571
|
+
prettyVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
572
|
+
raw: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
573
|
+
sentence: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
574
|
+
type: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
575
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
576
|
+
version: z.ZodNumber;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
type ProcessingLibraryProperties = z.infer<typeof processingLibraryPropertiesSchema>;
|
|
579
|
+
type ProcessingLibraryPropertiesData = OneOrMany<SourceRecord<ProcessingLibraryProperties>> | undefined;
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/lib/sources/processing-sketch-properties.d.ts
|
|
582
|
+
declare const processingSketchPropertiesSchema: z.ZodObject<{
|
|
583
|
+
authors: z.ZodArray<z.ZodObject<{
|
|
584
|
+
name: z.ZodString;
|
|
585
|
+
url: z.ZodOptional<z.ZodString>;
|
|
586
|
+
}, z.core.$strip>>;
|
|
587
|
+
component: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
588
|
+
download: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
589
|
+
main: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
590
|
+
manifestLabel: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
591
|
+
manifestOrientation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
592
|
+
manifestPackage: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
593
|
+
manifestPermissions: z.ZodArray<z.ZodString>;
|
|
594
|
+
manifestSdkMin: z.ZodOptional<z.ZodNumber>;
|
|
595
|
+
manifestSdkTarget: z.ZodOptional<z.ZodNumber>;
|
|
596
|
+
manifestVersionCode: z.ZodOptional<z.ZodNumber>;
|
|
597
|
+
manifestVersionName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
598
|
+
maxRevision: z.ZodNumber;
|
|
599
|
+
minRevision: z.ZodNumber;
|
|
600
|
+
mode: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
601
|
+
modeId: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
602
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
603
|
+
paragraph: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
604
|
+
prettyVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
605
|
+
raw: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
606
|
+
sentence: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
607
|
+
templates: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
608
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
609
|
+
version: z.ZodNumber;
|
|
610
|
+
zipfilename: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
611
|
+
}, z.core.$strip>;
|
|
612
|
+
type ProcessingSketchProperties = z.infer<typeof processingSketchPropertiesSchema>;
|
|
613
|
+
type ProcessingSketchPropertiesData = OneOrMany<SourceRecord<ProcessingSketchProperties>> | undefined;
|
|
614
|
+
//#endregion
|
|
615
|
+
//#region src/lib/sources/publiccode-yaml.d.ts
|
|
616
|
+
declare const publiccodeSchema: z.ZodObject<{
|
|
617
|
+
applicationSuite: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
618
|
+
availableLanguages: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
619
|
+
categories: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
620
|
+
contacts: z.ZodArray<z.ZodObject<{
|
|
621
|
+
affiliation: z.ZodOptional<z.ZodString>;
|
|
622
|
+
email: z.ZodOptional<z.ZodString>;
|
|
623
|
+
name: z.ZodString;
|
|
624
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
625
|
+
}, z.core.$strip>>;
|
|
626
|
+
contractors: z.ZodArray<z.ZodObject<{
|
|
627
|
+
name: z.ZodString;
|
|
628
|
+
until: z.ZodOptional<z.ZodString>;
|
|
629
|
+
website: z.ZodOptional<z.ZodString>;
|
|
630
|
+
}, z.core.$strip>>;
|
|
631
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
632
|
+
category: z.ZodEnum<{
|
|
633
|
+
hardware: "hardware";
|
|
634
|
+
open: "open";
|
|
635
|
+
proprietary: "proprietary";
|
|
636
|
+
}>;
|
|
637
|
+
name: z.ZodString;
|
|
638
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
639
|
+
version: z.ZodOptional<z.ZodString>;
|
|
640
|
+
versionMax: z.ZodOptional<z.ZodString>;
|
|
641
|
+
versionMin: z.ZodOptional<z.ZodString>;
|
|
642
|
+
}, z.core.$strip>>;
|
|
643
|
+
description: z.ZodOptional<z.ZodObject<{
|
|
644
|
+
documentation: z.ZodOptional<z.ZodString>;
|
|
645
|
+
features: z.ZodArray<z.ZodString>;
|
|
646
|
+
genericName: z.ZodOptional<z.ZodString>;
|
|
647
|
+
localisedName: z.ZodOptional<z.ZodString>;
|
|
648
|
+
longDescription: z.ZodOptional<z.ZodString>;
|
|
649
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
650
|
+
}, z.core.$strip>>;
|
|
651
|
+
descriptions: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
652
|
+
documentation: z.ZodOptional<z.ZodString>;
|
|
653
|
+
features: z.ZodArray<z.ZodString>;
|
|
654
|
+
genericName: z.ZodOptional<z.ZodString>;
|
|
655
|
+
localisedName: z.ZodOptional<z.ZodString>;
|
|
656
|
+
longDescription: z.ZodOptional<z.ZodString>;
|
|
657
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
developmentStatus: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
660
|
+
inputTypes: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
661
|
+
isBasedOn: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
662
|
+
landingUrl: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
663
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
664
|
+
localisationReady: z.ZodOptional<z.ZodBoolean>;
|
|
665
|
+
logo: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
666
|
+
mainCopyrightOwner: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
667
|
+
maintenanceType: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
668
|
+
monochromeLogo: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
669
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
670
|
+
outputTypes: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
671
|
+
platforms: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
672
|
+
publiccodeYmlVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
673
|
+
releaseDate: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
674
|
+
repoOwner: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
675
|
+
roadmap: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
676
|
+
softwareType: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
677
|
+
softwareVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
678
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
679
|
+
usedBy: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
680
|
+
}, z.core.$strip>;
|
|
681
|
+
type Publiccode = z.infer<typeof publiccodeSchema>;
|
|
682
|
+
type PubliccodeYamlData = OneOrMany<SourceRecord<Publiccode>> | undefined;
|
|
683
|
+
//#endregion
|
|
684
|
+
//#region src/lib/sources/python-pkg-info.d.ts
|
|
685
|
+
/** Parsed PKG-INFO / METADATA metadata */
|
|
686
|
+
declare const pkgInfoDataSchema: z.ZodObject<{
|
|
687
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
688
|
+
author_email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
689
|
+
classifiers: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
690
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
691
|
+
description_content_type: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
692
|
+
download_url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
693
|
+
home_page: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
694
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
695
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
696
|
+
long_description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
697
|
+
maintainer: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
698
|
+
maintainer_email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
699
|
+
metadata_version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
700
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
701
|
+
platforms: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
702
|
+
project_urls: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
703
|
+
requires_dist: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
704
|
+
requires_python: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
705
|
+
summary: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
706
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
707
|
+
}, z.core.$strip>;
|
|
708
|
+
type PkgInfo = z.infer<typeof pkgInfoDataSchema>;
|
|
709
|
+
type PythonPkgInfoData = OneOrMany<SourceRecord<PkgInfo>> | undefined;
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region src/lib/sources/python-pypi-registry.d.ts
|
|
712
|
+
type PythonPypiRegistryInfo = {
|
|
713
|
+
/** Total downloads over the last 180 days. */downloads180Days?: number; /** Downloads in the last day. */
|
|
714
|
+
downloadsDaily?: number; /** Downloads in the last month. */
|
|
715
|
+
downloadsMonthly?: number; /** Downloads in the last week. */
|
|
716
|
+
downloadsWeekly?: number; /** ISO 8601 date the package was last published. */
|
|
717
|
+
publishDateLatest?: string; /** Total number of releases on PyPI. */
|
|
718
|
+
releaseCount?: number; /** Size in bytes of the latest release artifact. */
|
|
719
|
+
sizeBytes?: number; /** PyPI project URL. */
|
|
720
|
+
url?: string; /** Latest published version string. */
|
|
721
|
+
versionLatest?: string; /** Whether the latest version has been yanked. */
|
|
722
|
+
yanked?: boolean; /** Reason the version was yanked, if provided. */
|
|
723
|
+
yankedReason?: string;
|
|
724
|
+
};
|
|
725
|
+
type PythonPypiRegistryData = OneOrMany<SourceRecord<PythonPypiRegistryInfo>> | undefined;
|
|
726
|
+
//#endregion
|
|
727
|
+
//#region src/lib/sources/python-pyproject-toml.d.ts
|
|
728
|
+
type PythonPyprojectTomlData = OneOrMany<SourceRecord<PyprojectData>> | undefined;
|
|
729
|
+
//#endregion
|
|
730
|
+
//#region src/lib/sources/python-setup-cfg.d.ts
|
|
731
|
+
declare const setupCfgDataSchema: z.ZodObject<{
|
|
732
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
733
|
+
author_email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
734
|
+
classifiers: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
735
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
736
|
+
download_url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
737
|
+
extras_require: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
738
|
+
install_requires: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
739
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
740
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
741
|
+
long_description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
742
|
+
maintainer: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
743
|
+
maintainer_email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
744
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
745
|
+
project_urls: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
746
|
+
python_requires: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
747
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
748
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
749
|
+
}, z.core.$strip>;
|
|
750
|
+
/** Parsed setup.cfg metadata */
|
|
751
|
+
type SetupCfg = z.infer<typeof setupCfgDataSchema>;
|
|
752
|
+
type PythonSetupCfgData = OneOrMany<SourceRecord<SetupCfg>> | undefined;
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region src/lib/sources/python-setup-py.d.ts
|
|
755
|
+
/** Parsed setup.py metadata */
|
|
756
|
+
declare const setupPyDataSchema: z.ZodObject<{
|
|
757
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
758
|
+
author_email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
759
|
+
classifiers: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
760
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
761
|
+
download_url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
762
|
+
extras_require: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
763
|
+
install_requires: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
764
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
765
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
766
|
+
long_description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
767
|
+
maintainer: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
768
|
+
maintainer_email: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
769
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
770
|
+
project_urls: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
771
|
+
python_requires: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
772
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
773
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
774
|
+
}, z.core.$strip>;
|
|
775
|
+
type SetupPyData = z.infer<typeof setupPyDataSchema>;
|
|
776
|
+
type PythonSetupPyData = OneOrMany<SourceRecord<SetupPyData>> | undefined;
|
|
777
|
+
//#endregion
|
|
778
|
+
//#region src/lib/sources/readme-file.d.ts
|
|
779
|
+
declare const readmeSchema: z.ZodObject<{
|
|
780
|
+
name: z.ZodString;
|
|
781
|
+
}, z.core.$strip>;
|
|
782
|
+
type Readme = z.infer<typeof readmeSchema>;
|
|
783
|
+
type ReadmeFileData = OneOrMany<SourceRecord<Readme>> | undefined;
|
|
784
|
+
//#endregion
|
|
785
|
+
//#region src/lib/sources/ruby-gemspec.d.ts
|
|
786
|
+
/** @public */
|
|
787
|
+
declare const gemSpecSchema: z.ZodObject<{
|
|
788
|
+
authors: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
789
|
+
bindir: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
790
|
+
cert_chain: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
791
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
792
|
+
name: z.ZodString;
|
|
793
|
+
requirements: z.ZodArray<z.ZodString>;
|
|
794
|
+
type: z.ZodEnum<{
|
|
795
|
+
development: "development";
|
|
796
|
+
runtime: "runtime";
|
|
797
|
+
}>;
|
|
798
|
+
}, z.core.$strip>>;
|
|
799
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
800
|
+
email: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
801
|
+
executables: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
802
|
+
extensions: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
803
|
+
extra: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
804
|
+
extra_rdoc_files: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
805
|
+
files: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
806
|
+
homepage: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
807
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
808
|
+
licenses: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
809
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
810
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
811
|
+
platform: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
812
|
+
post_install_message: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
813
|
+
rdoc_options: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
814
|
+
require_paths: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
815
|
+
required_ruby_version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
816
|
+
required_rubygems_version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
817
|
+
signing_key: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
818
|
+
summary: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
819
|
+
test_files: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
820
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
821
|
+
}, z.core.$strip>;
|
|
822
|
+
type GemSpec = z.infer<typeof gemSpecSchema>;
|
|
823
|
+
type RubyGemspecData = OneOrMany<SourceRecord<GemSpec>> | undefined;
|
|
824
|
+
//#endregion
|
|
825
|
+
//#region src/lib/sources/rust-cargo-toml.d.ts
|
|
826
|
+
declare const cargoTomlSchema: z.ZodObject<{
|
|
827
|
+
authors: z.ZodArray<z.ZodObject<{
|
|
828
|
+
email: z.ZodOptional<z.ZodString>;
|
|
829
|
+
name: z.ZodString;
|
|
830
|
+
}, z.core.$strip>>;
|
|
831
|
+
buildDependencies: z.ZodArray<z.ZodObject<{
|
|
832
|
+
name: z.ZodString;
|
|
833
|
+
version: z.ZodOptional<z.ZodString>;
|
|
834
|
+
}, z.core.$strip>>;
|
|
835
|
+
categories: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
836
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
837
|
+
name: z.ZodString;
|
|
838
|
+
version: z.ZodOptional<z.ZodString>;
|
|
839
|
+
}, z.core.$strip>>;
|
|
840
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
841
|
+
devDependencies: z.ZodArray<z.ZodObject<{
|
|
842
|
+
name: z.ZodString;
|
|
843
|
+
version: z.ZodOptional<z.ZodString>;
|
|
844
|
+
}, z.core.$strip>>;
|
|
845
|
+
documentation: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
846
|
+
edition: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
847
|
+
homepage: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
848
|
+
keywords: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
849
|
+
license: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
850
|
+
licenseFile: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
851
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
852
|
+
readme: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
853
|
+
repository: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
854
|
+
rustVersion: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
855
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
856
|
+
workspaceMembers: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
857
|
+
}, z.core.$strip>;
|
|
858
|
+
type CargoToml = z.infer<typeof cargoTomlSchema>;
|
|
859
|
+
type RustCargoTomlData = OneOrMany<SourceRecord<CargoToml>> | undefined;
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region src/lib/sources/xcode-info-plist.d.ts
|
|
862
|
+
declare const infoPlistSchema: z.ZodObject<{
|
|
863
|
+
applicationCategory: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
864
|
+
author: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
865
|
+
authorEmail: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
866
|
+
copyrightHolder: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
867
|
+
copyrightYear: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
868
|
+
description: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
869
|
+
identifier: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
870
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
871
|
+
operatingSystems: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
872
|
+
processorRequirements: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
873
|
+
url: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
874
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
875
|
+
}, z.core.$strip>;
|
|
876
|
+
type InfoPlist = z.infer<typeof infoPlistSchema>;
|
|
877
|
+
type XcodeInfoPlistData = OneOrMany<SourceRecord<InfoPlist>> | undefined;
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region src/lib/sources/xcode-project-pbxproj.d.ts
|
|
880
|
+
declare const pbxprojSchema: z.ZodObject<{
|
|
881
|
+
copyrightHolder: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
882
|
+
copyrightYear: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
883
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
884
|
+
url: z.ZodString;
|
|
885
|
+
}, z.core.$strip>>;
|
|
886
|
+
identifier: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
887
|
+
name: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
888
|
+
operatingSystems: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
889
|
+
organizationName: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
890
|
+
programmingLanguage: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
891
|
+
version: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
|
|
892
|
+
}, z.core.$strip>;
|
|
893
|
+
type Pbxproj = z.infer<typeof pbxprojSchema>;
|
|
894
|
+
type XcodeProjectPbxprojData = OneOrMany<SourceRecord<Pbxproj>> | undefined;
|
|
895
|
+
//#endregion
|
|
896
|
+
//#region src/lib/metadata-types.d.ts
|
|
897
|
+
/**
|
|
898
|
+
* The complete metadata context assembled from all sources.
|
|
899
|
+
* Each key corresponds to a metadata source.
|
|
900
|
+
*/
|
|
901
|
+
type MetadataContext = {
|
|
902
|
+
arduinoLibraryProperties: ArduinoLibraryPropertiesData;
|
|
903
|
+
cinderCinderblockXml: CinderCinderblockXmlData;
|
|
904
|
+
codemetaJson: CodeMetaJsonData;
|
|
905
|
+
codeStats: CodeStatsData;
|
|
906
|
+
dependencyUpdates: DependencyUpdatesData;
|
|
907
|
+
fileStats: FileStatsData;
|
|
908
|
+
gitConfig: GitConfigData;
|
|
909
|
+
github: GitHubData;
|
|
910
|
+
gitStats: GitStatsData;
|
|
911
|
+
goGoMod: GoGoModData;
|
|
912
|
+
goGoreleaserYaml: GoGoreleaserYamlData;
|
|
913
|
+
javaPomXml: JavaPomXmlData;
|
|
914
|
+
licenseFile: LicenseFileData;
|
|
915
|
+
metadataFile: MetadataFileData;
|
|
916
|
+
metascope: MetascopeData;
|
|
917
|
+
nodeNpmRegistry: NodeNpmRegistryData;
|
|
918
|
+
nodePackageJson: NodePackageJsonData;
|
|
919
|
+
obsidianPluginManifestJson: ObsidianPluginManifestJsonData;
|
|
920
|
+
obsidianPluginRegistry: ObsidianPluginRegistryData;
|
|
921
|
+
openframeworksAddonConfigMk: OpenframeworksAddonConfigMkData;
|
|
922
|
+
openframeworksInstallXml: OpenframeworksInstallXmlData;
|
|
923
|
+
processingLibraryProperties: ProcessingLibraryPropertiesData;
|
|
924
|
+
processingSketchProperties: ProcessingSketchPropertiesData;
|
|
925
|
+
publiccodeYaml: PubliccodeYamlData;
|
|
926
|
+
pythonPkgInfo: PythonPkgInfoData;
|
|
927
|
+
pythonPypiRegistry: PythonPypiRegistryData;
|
|
928
|
+
pythonPyprojectToml: PythonPyprojectTomlData;
|
|
929
|
+
pythonSetupCfg: PythonSetupCfgData;
|
|
930
|
+
pythonSetupPy: PythonSetupPyData;
|
|
931
|
+
readmeFile: ReadmeFileData;
|
|
932
|
+
rubyGemspec: RubyGemspecData;
|
|
933
|
+
rustCargoToml: RustCargoTomlData;
|
|
934
|
+
xcodeInfoPlist: XcodeInfoPlistData;
|
|
935
|
+
xcodeProjectPbxproj: XcodeProjectPbxprojData;
|
|
936
|
+
};
|
|
937
|
+
/**
|
|
938
|
+
* The name of a metadata source.
|
|
939
|
+
*/
|
|
940
|
+
type SourceName = keyof MetadataContext;
|
|
941
|
+
/**
|
|
942
|
+
* User-supplied data passed to templates for parameterized ownership checks.
|
|
943
|
+
* All fields are optional; templates that don't need them can ignore the argument.
|
|
944
|
+
*/
|
|
945
|
+
type TemplateData = {
|
|
946
|
+
[key: string]: unknown;
|
|
947
|
+
authorName?: string | string[];
|
|
948
|
+
githubAccount?: string | string[];
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* A template function that transforms MetadataContext into a custom shape.
|
|
952
|
+
* The optional second argument provides user-supplied template data.
|
|
953
|
+
*/
|
|
954
|
+
type Template<T> = (context: MetadataContext, templateData: TemplateData) => T;
|
|
955
|
+
/**
|
|
956
|
+
* Identity wrapper for type inference in config files.
|
|
957
|
+
* Use this in `metascope.config.ts` to get autocomplete on available fields.
|
|
958
|
+
* @example
|
|
959
|
+
* ```typescript
|
|
960
|
+
* import { defineTemplate } from 'metascope'
|
|
961
|
+
*
|
|
962
|
+
* export default defineTemplate(({ codemetaJson, github }) => ({
|
|
963
|
+
* name: codemetaJson?.data.name,
|
|
964
|
+
* stars: github?.data.stargazerCount,
|
|
965
|
+
* }))
|
|
966
|
+
* ```
|
|
967
|
+
*/
|
|
968
|
+
declare function defineTemplate<T>(transform: Template<T>): Template<T>;
|
|
969
|
+
/**
|
|
970
|
+
* API credentials for remote metadata sources.
|
|
971
|
+
*/
|
|
972
|
+
type Credentials = {
|
|
973
|
+
githubToken?: string;
|
|
974
|
+
};
|
|
975
|
+
/**
|
|
976
|
+
* Base options shared by all `getMetadata` overloads.
|
|
977
|
+
*/
|
|
978
|
+
type GetMetadataBaseOptions = {
|
|
979
|
+
/** When true (the default), all paths in the output (source, workspaceDirectories, etc.) are absolute. When false, paths are relative to the project directory. */absolute?: boolean; /** API credentials for remote sources. */
|
|
980
|
+
credentials?: Credentials; /** Skip web sources (npm registry, GitHub API, PyPI, etc.). */
|
|
981
|
+
offline?: boolean; /** Project directory path. Defaults to `'.'` (resolved to `process.cwd()` via `path.resolve`). */
|
|
982
|
+
path: string; /** Search for metadata files recursively in subdirectories. Defaults to false. */
|
|
983
|
+
recursive?: boolean; /** Ignore files specified .gitignore in the file tree. Defaults to true. */
|
|
984
|
+
respectIgnored?: boolean; /** User-supplied data passed to templates. */
|
|
985
|
+
templateData?: TemplateData;
|
|
986
|
+
/**
|
|
987
|
+
* Directories to any monorepo workspaces... only supports yarn, npm, pnpm, lerna, and bolt at the moment
|
|
988
|
+
* Never includes the root path!
|
|
989
|
+
* False is disable, true is auto-discover which turns into string[], string[] is manual list relative to the project directory path...
|
|
990
|
+
*/
|
|
991
|
+
workspaces?: boolean | string[];
|
|
992
|
+
};
|
|
993
|
+
/**
|
|
994
|
+
* Default values for optional fields in `GetMetadataBaseOptions`.
|
|
995
|
+
*/
|
|
996
|
+
declare const DEFAULT_GET_METADATA_OPTIONS: Required<Omit<GetMetadataBaseOptions, 'credentials' | 'templateData'>>;
|
|
997
|
+
/**
|
|
998
|
+
* Options for `getMetadata` without a template (returns full `MetadataContext`).
|
|
999
|
+
*/
|
|
1000
|
+
type GetMetadataOptions = GetMetadataBaseOptions & {
|
|
1001
|
+
/** Built-in template name or omit for full output. */template?: 'frontmatter' | 'project' | (string & {});
|
|
1002
|
+
};
|
|
1003
|
+
/**
|
|
1004
|
+
* Options for `getMetadata` with a template function (returns the template's return type).
|
|
1005
|
+
*/
|
|
1006
|
+
type GetMetadataTemplateOptions<T> = GetMetadataBaseOptions & {
|
|
1007
|
+
/** Template function that transforms MetadataContext into a custom shape. */template: Template<T>;
|
|
1008
|
+
};
|
|
1009
|
+
//#endregion
|
|
1010
|
+
//#region src/lib/utilities/codemeta-helpers.d.ts
|
|
1011
|
+
/**
|
|
1012
|
+
* Helpers for building codemeta JSON-LD objects.
|
|
1013
|
+
*
|
|
1014
|
+
* Provides type-safe constructors for Person/Organization and SoftwareApplication
|
|
1015
|
+
* dependency nodes, plus deduplication and license URL normalization.
|
|
1016
|
+
*/
|
|
1017
|
+
/**
|
|
1018
|
+
* An Organization node in codemeta JSON-LD.
|
|
1019
|
+
*/
|
|
1020
|
+
type CodemetaOrganizationLd = {
|
|
1021
|
+
'@type': 'Organization';
|
|
1022
|
+
name: string;
|
|
1023
|
+
};
|
|
1024
|
+
/**
|
|
1025
|
+
* A Person or Organization node in codemeta JSON-LD.
|
|
1026
|
+
*/
|
|
1027
|
+
type CodemetaPersonOrOrgLd = {
|
|
1028
|
+
'@id'?: string;
|
|
1029
|
+
'@type': 'Organization' | 'Person';
|
|
1030
|
+
affiliation?: CodemetaOrganizationLd;
|
|
1031
|
+
email?: string;
|
|
1032
|
+
familyName?: string;
|
|
1033
|
+
givenName?: string;
|
|
1034
|
+
name?: string;
|
|
1035
|
+
url?: string;
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* A software dependency node in codemeta JSON-LD.
|
|
1039
|
+
*/
|
|
1040
|
+
type CodemetaDependencyLd = {
|
|
1041
|
+
'@type': 'SoftwareApplication';
|
|
1042
|
+
identifier?: string;
|
|
1043
|
+
name: string;
|
|
1044
|
+
runtimePlatform?: string;
|
|
1045
|
+
version?: string;
|
|
1046
|
+
};
|
|
1047
|
+
//#endregion
|
|
1048
|
+
//#region src/lib/templates/codemeta.d.ts
|
|
1049
|
+
declare const codemeta: Template<{
|
|
1050
|
+
'@context': string;
|
|
1051
|
+
'@type': string;
|
|
1052
|
+
applicationCategory: string | undefined;
|
|
1053
|
+
applicationSubCategory: string | undefined;
|
|
1054
|
+
author: CodemetaPersonOrOrgLd[] | undefined;
|
|
1055
|
+
buildInstructions: string | undefined;
|
|
1056
|
+
codeRepository: string | undefined;
|
|
1057
|
+
continuousIntegration: string | undefined;
|
|
1058
|
+
contributor: CodemetaPersonOrOrgLd[] | undefined;
|
|
1059
|
+
copyrightHolder: CodemetaPersonOrOrgLd[] | undefined;
|
|
1060
|
+
copyrightYear: number | undefined;
|
|
1061
|
+
dateCreated: string | undefined;
|
|
1062
|
+
dateModified: string | undefined;
|
|
1063
|
+
datePublished: string | undefined;
|
|
1064
|
+
description: string | undefined;
|
|
1065
|
+
developmentStatus: string | undefined;
|
|
1066
|
+
downloadUrl: string | undefined;
|
|
1067
|
+
funder: CodemetaPersonOrOrgLd[] | undefined;
|
|
1068
|
+
funding: string | undefined;
|
|
1069
|
+
identifier: string | undefined;
|
|
1070
|
+
installUrl: string | undefined;
|
|
1071
|
+
isAccessibleForFree: boolean | undefined;
|
|
1072
|
+
issueTracker: string | undefined;
|
|
1073
|
+
keywords: string[] | undefined;
|
|
1074
|
+
license: string | undefined;
|
|
1075
|
+
maintainer: CodemetaPersonOrOrgLd[] | undefined;
|
|
1076
|
+
name: string | undefined;
|
|
1077
|
+
operatingSystem: string[] | undefined;
|
|
1078
|
+
programmingLanguage: string[] | undefined;
|
|
1079
|
+
readme: string | undefined;
|
|
1080
|
+
relatedLink: string | string[] | undefined;
|
|
1081
|
+
releaseNotes: string | undefined;
|
|
1082
|
+
runtimePlatform: string[] | undefined;
|
|
1083
|
+
softwareHelp: string | undefined;
|
|
1084
|
+
softwareRequirements: CodemetaDependencyLd[] | undefined;
|
|
1085
|
+
softwareSuggestions: CodemetaDependencyLd[] | undefined;
|
|
1086
|
+
targetProduct: Record<string, string> | undefined;
|
|
1087
|
+
url: string | undefined;
|
|
1088
|
+
version: string | undefined;
|
|
1089
|
+
}>;
|
|
1090
|
+
//#endregion
|
|
1091
|
+
//#region src/lib/templates/frontmatter.d.ts
|
|
1092
|
+
/**
|
|
1093
|
+
* A compact, non-nested, polyglot overview of the project.
|
|
1094
|
+
* Designed for Obsidian frontmatter — flat keys with natural language names,
|
|
1095
|
+
* blending all available sources into a single trackable snapshot.
|
|
1096
|
+
*/
|
|
1097
|
+
declare const frontmatter: Template<{
|
|
1098
|
+
Name: string | null;
|
|
1099
|
+
alias: string | null;
|
|
1100
|
+
Description: string | null;
|
|
1101
|
+
Author: string[] | null;
|
|
1102
|
+
Version: string | null;
|
|
1103
|
+
Public: boolean;
|
|
1104
|
+
Published: boolean;
|
|
1105
|
+
Status: "source" | "fork" | "unmaintained" | null;
|
|
1106
|
+
'GitHub Owner': string | null;
|
|
1107
|
+
tags: string[];
|
|
1108
|
+
License: string[] | null;
|
|
1109
|
+
Language: string[] | null;
|
|
1110
|
+
'Secondary Language': _kitschpatrol_tokei0.Language[] | null;
|
|
1111
|
+
'Repo Path': string | null;
|
|
1112
|
+
'Readme Path': string | null;
|
|
1113
|
+
'VS Code Path': string | null;
|
|
1114
|
+
'Homepage URL': string | null;
|
|
1115
|
+
'Repo URL': string | null;
|
|
1116
|
+
'Package URL': string | null;
|
|
1117
|
+
'Readme URL': string | null;
|
|
1118
|
+
'Issues URL': string | null;
|
|
1119
|
+
Created: string | null;
|
|
1120
|
+
'First Commit Date': string | null;
|
|
1121
|
+
'Latest Commit Date': string | null;
|
|
1122
|
+
'Latest Push Date': string | null;
|
|
1123
|
+
'Latest Release Date': string | null;
|
|
1124
|
+
'Latest Release Version': string | null;
|
|
1125
|
+
Stars: number | null;
|
|
1126
|
+
Watchers: number | null;
|
|
1127
|
+
Contributors: number | null;
|
|
1128
|
+
Forks: number | null;
|
|
1129
|
+
'Downloads Total': number | null;
|
|
1130
|
+
'Downloads Monthly': number | null;
|
|
1131
|
+
Releases: number | null;
|
|
1132
|
+
'Issues Open': number | null;
|
|
1133
|
+
'Issues Closed': number | null;
|
|
1134
|
+
'PRs Open': number | null;
|
|
1135
|
+
'PRs Merged': number | null;
|
|
1136
|
+
'PRs Closed': number | null;
|
|
1137
|
+
'Vulnerability Alerts': number | null;
|
|
1138
|
+
'Lines of Code': number | null;
|
|
1139
|
+
'Total Files': number | null;
|
|
1140
|
+
'Total Size MB': number | null;
|
|
1141
|
+
'Tracked Files': number | null;
|
|
1142
|
+
'Tracked Size MB': number | null;
|
|
1143
|
+
'GitHub Size MB': number | null;
|
|
1144
|
+
Runtime: string[] | null;
|
|
1145
|
+
'Operating System': string[] | null;
|
|
1146
|
+
Dependencies: number;
|
|
1147
|
+
'Dev Dependencies': number;
|
|
1148
|
+
'Major Updates': number;
|
|
1149
|
+
'Minor Updates': number;
|
|
1150
|
+
'Patch Updates': number;
|
|
1151
|
+
'Total Updates': number;
|
|
1152
|
+
Libyears: number;
|
|
1153
|
+
'Shared Config': boolean;
|
|
1154
|
+
'Forked From': string | null;
|
|
1155
|
+
'Fork Ahead': number | null;
|
|
1156
|
+
'Fork Behind': number | null;
|
|
1157
|
+
'Template From': string | null;
|
|
1158
|
+
'Template Repo': boolean;
|
|
1159
|
+
Organization: boolean;
|
|
1160
|
+
'Git Commits': number | null;
|
|
1161
|
+
'Git Dirty Files': number | null;
|
|
1162
|
+
'Git Remotes Ahead': number | null;
|
|
1163
|
+
'Git Remotes Behind': number | null;
|
|
1164
|
+
'Git LFS': boolean;
|
|
1165
|
+
'Git Tags': number | null;
|
|
1166
|
+
'Git Current Branch': string | null;
|
|
1167
|
+
'Git Branches': number | null;
|
|
1168
|
+
'Git Remotes': number | null;
|
|
1169
|
+
'Git Submodules': number;
|
|
1170
|
+
'Metadata Scanned': string | null;
|
|
1171
|
+
}>;
|
|
1172
|
+
//#endregion
|
|
1173
|
+
//#region src/lib/templates/project.d.ts
|
|
1174
|
+
/**
|
|
1175
|
+
* Legacy structure used in AllWork desktop app
|
|
1176
|
+
*/
|
|
1177
|
+
declare const project: Template<{
|
|
1178
|
+
description: string | undefined;
|
|
1179
|
+
firstCommitDate: string | undefined;
|
|
1180
|
+
gitHubLink: string | undefined;
|
|
1181
|
+
gitHubStarCount: number | undefined;
|
|
1182
|
+
gitIsClean: boolean | undefined;
|
|
1183
|
+
gitIsDirty: boolean | undefined;
|
|
1184
|
+
gitRemoteCount: number | undefined;
|
|
1185
|
+
homepage: string | undefined;
|
|
1186
|
+
isAuthoredByMe: boolean | undefined;
|
|
1187
|
+
isOnMyGitHub: boolean | undefined;
|
|
1188
|
+
isOnNpm: boolean;
|
|
1189
|
+
isPublic: boolean;
|
|
1190
|
+
isRemoteAhead: boolean | undefined;
|
|
1191
|
+
issueCount: number | undefined;
|
|
1192
|
+
lastCommitDate: string | undefined;
|
|
1193
|
+
license: string | undefined;
|
|
1194
|
+
majorUpdateCount: number;
|
|
1195
|
+
majorUpdateList: string[] | undefined;
|
|
1196
|
+
npmDownloadCount: number | undefined;
|
|
1197
|
+
readmePath: string | undefined;
|
|
1198
|
+
repositoryPath: string | undefined;
|
|
1199
|
+
semverUpdateCount: undefined;
|
|
1200
|
+
semverUpdateList: undefined;
|
|
1201
|
+
tags: string[] | undefined;
|
|
1202
|
+
title: string | undefined;
|
|
1203
|
+
type: "source" | "fork" | "unmaintained" | undefined;
|
|
1204
|
+
usesPnpm: boolean;
|
|
1205
|
+
usesSharedConfig: boolean;
|
|
1206
|
+
version: string | undefined;
|
|
1207
|
+
}>;
|
|
1208
|
+
//#endregion
|
|
1209
|
+
//#region src/lib/templates/index.d.ts
|
|
1210
|
+
/**
|
|
1211
|
+
* Built-in templates, keyed by name.
|
|
1212
|
+
*/
|
|
1213
|
+
declare const templates: {
|
|
1214
|
+
codemeta: Template<{
|
|
1215
|
+
'@context': string;
|
|
1216
|
+
'@type': string;
|
|
1217
|
+
applicationCategory: string | undefined;
|
|
1218
|
+
applicationSubCategory: string | undefined;
|
|
1219
|
+
author: CodemetaPersonOrOrgLd[] | undefined;
|
|
1220
|
+
buildInstructions: string | undefined;
|
|
1221
|
+
codeRepository: string | undefined;
|
|
1222
|
+
continuousIntegration: string | undefined;
|
|
1223
|
+
contributor: CodemetaPersonOrOrgLd[] | undefined;
|
|
1224
|
+
copyrightHolder: CodemetaPersonOrOrgLd[] | undefined;
|
|
1225
|
+
copyrightYear: number | undefined;
|
|
1226
|
+
dateCreated: string | undefined;
|
|
1227
|
+
dateModified: string | undefined;
|
|
1228
|
+
datePublished: string | undefined;
|
|
1229
|
+
description: string | undefined;
|
|
1230
|
+
developmentStatus: string | undefined;
|
|
1231
|
+
downloadUrl: string | undefined;
|
|
1232
|
+
funder: CodemetaPersonOrOrgLd[] | undefined;
|
|
1233
|
+
funding: string | undefined;
|
|
1234
|
+
identifier: string | undefined;
|
|
1235
|
+
installUrl: string | undefined;
|
|
1236
|
+
isAccessibleForFree: boolean | undefined;
|
|
1237
|
+
issueTracker: string | undefined;
|
|
1238
|
+
keywords: string[] | undefined;
|
|
1239
|
+
license: string | undefined;
|
|
1240
|
+
maintainer: CodemetaPersonOrOrgLd[] | undefined;
|
|
1241
|
+
name: string | undefined;
|
|
1242
|
+
operatingSystem: string[] | undefined;
|
|
1243
|
+
programmingLanguage: string[] | undefined;
|
|
1244
|
+
readme: string | undefined;
|
|
1245
|
+
relatedLink: string | string[] | undefined;
|
|
1246
|
+
releaseNotes: string | undefined;
|
|
1247
|
+
runtimePlatform: string[] | undefined;
|
|
1248
|
+
softwareHelp: string | undefined;
|
|
1249
|
+
softwareRequirements: CodemetaDependencyLd[] | undefined;
|
|
1250
|
+
softwareSuggestions: CodemetaDependencyLd[] | undefined;
|
|
1251
|
+
targetProduct: Record<string, string> | undefined;
|
|
1252
|
+
url: string | undefined;
|
|
1253
|
+
version: string | undefined;
|
|
1254
|
+
}>;
|
|
1255
|
+
frontmatter: Template<{
|
|
1256
|
+
Name: string | null;
|
|
1257
|
+
alias: string | null;
|
|
1258
|
+
Description: string | null;
|
|
1259
|
+
Author: string[] | null;
|
|
1260
|
+
Version: string | null;
|
|
1261
|
+
Public: boolean;
|
|
1262
|
+
Published: boolean;
|
|
1263
|
+
Status: "source" | "fork" | "unmaintained" | null;
|
|
1264
|
+
'GitHub Owner': string | null;
|
|
1265
|
+
tags: string[];
|
|
1266
|
+
License: string[] | null;
|
|
1267
|
+
Language: string[] | null;
|
|
1268
|
+
'Secondary Language': _kitschpatrol_tokei0.Language[] | null;
|
|
1269
|
+
'Repo Path': string | null;
|
|
1270
|
+
'Readme Path': string | null;
|
|
1271
|
+
'VS Code Path': string | null;
|
|
1272
|
+
'Homepage URL': string | null;
|
|
1273
|
+
'Repo URL': string | null;
|
|
1274
|
+
'Package URL': string | null;
|
|
1275
|
+
'Readme URL': string | null;
|
|
1276
|
+
'Issues URL': string | null;
|
|
1277
|
+
Created: string | null;
|
|
1278
|
+
'First Commit Date': string | null;
|
|
1279
|
+
'Latest Commit Date': string | null;
|
|
1280
|
+
'Latest Push Date': string | null;
|
|
1281
|
+
'Latest Release Date': string | null;
|
|
1282
|
+
'Latest Release Version': string | null;
|
|
1283
|
+
Stars: number | null;
|
|
1284
|
+
Watchers: number | null;
|
|
1285
|
+
Contributors: number | null;
|
|
1286
|
+
Forks: number | null;
|
|
1287
|
+
'Downloads Total': number | null;
|
|
1288
|
+
'Downloads Monthly': number | null;
|
|
1289
|
+
Releases: number | null;
|
|
1290
|
+
'Issues Open': number | null;
|
|
1291
|
+
'Issues Closed': number | null;
|
|
1292
|
+
'PRs Open': number | null;
|
|
1293
|
+
'PRs Merged': number | null;
|
|
1294
|
+
'PRs Closed': number | null;
|
|
1295
|
+
'Vulnerability Alerts': number | null;
|
|
1296
|
+
'Lines of Code': number | null;
|
|
1297
|
+
'Total Files': number | null;
|
|
1298
|
+
'Total Size MB': number | null;
|
|
1299
|
+
'Tracked Files': number | null;
|
|
1300
|
+
'Tracked Size MB': number | null;
|
|
1301
|
+
'GitHub Size MB': number | null;
|
|
1302
|
+
Runtime: string[] | null;
|
|
1303
|
+
'Operating System': string[] | null;
|
|
1304
|
+
Dependencies: number;
|
|
1305
|
+
'Dev Dependencies': number;
|
|
1306
|
+
'Major Updates': number;
|
|
1307
|
+
'Minor Updates': number;
|
|
1308
|
+
'Patch Updates': number;
|
|
1309
|
+
'Total Updates': number;
|
|
1310
|
+
Libyears: number;
|
|
1311
|
+
'Shared Config': boolean;
|
|
1312
|
+
'Forked From': string | null;
|
|
1313
|
+
'Fork Ahead': number | null;
|
|
1314
|
+
'Fork Behind': number | null;
|
|
1315
|
+
'Template From': string | null;
|
|
1316
|
+
'Template Repo': boolean;
|
|
1317
|
+
Organization: boolean;
|
|
1318
|
+
'Git Commits': number | null;
|
|
1319
|
+
'Git Dirty Files': number | null;
|
|
1320
|
+
'Git Remotes Ahead': number | null;
|
|
1321
|
+
'Git Remotes Behind': number | null;
|
|
1322
|
+
'Git LFS': boolean;
|
|
1323
|
+
'Git Tags': number | null;
|
|
1324
|
+
'Git Current Branch': string | null;
|
|
1325
|
+
'Git Branches': number | null;
|
|
1326
|
+
'Git Remotes': number | null;
|
|
1327
|
+
'Git Submodules': number;
|
|
1328
|
+
'Metadata Scanned': string | null;
|
|
1329
|
+
}>;
|
|
1330
|
+
project: Template<{
|
|
1331
|
+
description: string | undefined;
|
|
1332
|
+
firstCommitDate: string | undefined;
|
|
1333
|
+
gitHubLink: string | undefined;
|
|
1334
|
+
gitHubStarCount: number | undefined;
|
|
1335
|
+
gitIsClean: boolean | undefined;
|
|
1336
|
+
gitIsDirty: boolean | undefined;
|
|
1337
|
+
gitRemoteCount: number | undefined;
|
|
1338
|
+
homepage: string | undefined;
|
|
1339
|
+
isAuthoredByMe: boolean | undefined;
|
|
1340
|
+
isOnMyGitHub: boolean | undefined;
|
|
1341
|
+
isOnNpm: boolean;
|
|
1342
|
+
isPublic: boolean;
|
|
1343
|
+
isRemoteAhead: boolean | undefined;
|
|
1344
|
+
issueCount: number | undefined;
|
|
1345
|
+
lastCommitDate: string | undefined;
|
|
1346
|
+
license: string | undefined;
|
|
1347
|
+
majorUpdateCount: number;
|
|
1348
|
+
majorUpdateList: string[] | undefined;
|
|
1349
|
+
npmDownloadCount: number | undefined;
|
|
1350
|
+
readmePath: string | undefined;
|
|
1351
|
+
repositoryPath: string | undefined;
|
|
1352
|
+
semverUpdateCount: undefined;
|
|
1353
|
+
semverUpdateList: undefined;
|
|
1354
|
+
tags: string[] | undefined;
|
|
1355
|
+
title: string | undefined;
|
|
1356
|
+
type: "source" | "fork" | "unmaintained" | undefined;
|
|
1357
|
+
usesPnpm: boolean;
|
|
1358
|
+
usesSharedConfig: boolean;
|
|
1359
|
+
version: string | undefined;
|
|
1360
|
+
}>;
|
|
1361
|
+
};
|
|
1362
|
+
/**
|
|
1363
|
+
* Maps built-in template names to their return types.
|
|
1364
|
+
*/
|
|
1365
|
+
type TemplateMap = {
|
|
1366
|
+
codemeta: ReturnType<typeof codemeta>;
|
|
1367
|
+
frontmatter: ReturnType<typeof frontmatter>;
|
|
1368
|
+
project: ReturnType<typeof project>;
|
|
1369
|
+
};
|
|
1370
|
+
/**
|
|
1371
|
+
* Names of built-in templates.
|
|
1372
|
+
*/
|
|
1373
|
+
type TemplateName = keyof TemplateMap;
|
|
1374
|
+
//#endregion
|
|
1375
|
+
//#region src/lib/metadata.d.ts
|
|
1376
|
+
type PartialPath<T> = Omit<T, 'path'> & {
|
|
1377
|
+
path?: string;
|
|
1378
|
+
};
|
|
1379
|
+
declare function getMetadata<K extends TemplateName>(options: PartialPath<Omit<GetMetadataOptions, 'template'> & {
|
|
1380
|
+
template: K;
|
|
1381
|
+
}>): Promise<TemplateMap[K]>;
|
|
1382
|
+
declare function getMetadata<T>(options: PartialPath<GetMetadataTemplateOptions<T>>): Promise<T>;
|
|
1383
|
+
declare function getMetadata(options?: PartialPath<GetMetadataOptions>): Promise<MetadataContext>;
|
|
1384
|
+
declare namespace template_helpers_d_exports {
|
|
1385
|
+
export { REPLACEMENTS, collectArrayField, collectField, ensureArray, firstOf, isAuthoredBy, isOnGithubAccountOf, mixedStringsToArray, nonEmpty, stripNamespace, stripUndefined, toAlias, toBasicLicense, toBasicLicenses, toBasicNames, toDelimitedString, toLocalUrl, toMarkdownLink, toMb, toStatus, usesPnpm, usesSharedConfig };
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Extract the first element from a `OneOrMany` value.
|
|
1389
|
+
*
|
|
1390
|
+
* Metadata sources may return a single record or an array of records. This
|
|
1391
|
+
* helper normalizes access so you can safely retrieve the first record
|
|
1392
|
+
* regardless of cardinality.
|
|
1393
|
+
*/
|
|
1394
|
+
declare function firstOf<T>(value: T | T[] | undefined): T | undefined;
|
|
1395
|
+
/**
|
|
1396
|
+
* Wrap a value in an array if it isn't one already.
|
|
1397
|
+
* Returns an empty array for `undefined` or `null`.
|
|
1398
|
+
*/
|
|
1399
|
+
declare function ensureArray<T>(value: null | T | T[] | undefined): T[];
|
|
1400
|
+
/**
|
|
1401
|
+
* Collect values from all records in a `OneOrMany<SourceRecord<D>>` source.
|
|
1402
|
+
* Runs the accessor on each record's `.data` and returns all non-undefined results.
|
|
1403
|
+
*
|
|
1404
|
+
* Useful for extracting a specific field from sources that may contain multiple records
|
|
1405
|
+
* (e.g. multiple Cargo.toml files in a workspace).
|
|
1406
|
+
*/
|
|
1407
|
+
declare function collectField<T extends {
|
|
1408
|
+
data: unknown;
|
|
1409
|
+
}, R>(source: T | T[] | undefined, accessor: (data: T['data']) => R | undefined): R[];
|
|
1410
|
+
/**
|
|
1411
|
+
* Collect and flatten array values from all records in a `OneOrMany<SourceRecord<D>>` source.
|
|
1412
|
+
* Runs the accessor on each record's `.data` and flattens the resulting arrays.
|
|
1413
|
+
*/
|
|
1414
|
+
declare function collectArrayField<T extends {
|
|
1415
|
+
data: unknown;
|
|
1416
|
+
}, R>(source: T | T[] | undefined, accessor: (data: T['data']) => R[] | undefined): R[];
|
|
1417
|
+
/**
|
|
1418
|
+
* Return the array if non-empty, otherwise undefined.
|
|
1419
|
+
* Useful for converting empty collection results to undefined before `stripUndefined`.
|
|
1420
|
+
*/
|
|
1421
|
+
declare function nonEmpty<T>(array: T[]): T[] | undefined;
|
|
1422
|
+
/**
|
|
1423
|
+
* Join an array of strings with a delimiter, filtering out undefined values.
|
|
1424
|
+
*/
|
|
1425
|
+
declare function toDelimitedString(source: Array<string | undefined> | string | string[] | undefined, delimiter?: string): string | undefined;
|
|
1426
|
+
/**
|
|
1427
|
+
* Convert a URL or path to a markdown link using its basename as the label.
|
|
1428
|
+
*/
|
|
1429
|
+
declare function toMarkdownLink(value: string | undefined): string | undefined;
|
|
1430
|
+
/**
|
|
1431
|
+
* Convert bytes to megabytes (rounded).
|
|
1432
|
+
*/
|
|
1433
|
+
declare function toMb(bytes: unknown): number | undefined;
|
|
1434
|
+
/**
|
|
1435
|
+
* Strip the namespace or directory prefix from a package name or path.
|
|
1436
|
+
*/
|
|
1437
|
+
declare function stripNamespace(value: string): string;
|
|
1438
|
+
/**
|
|
1439
|
+
* Convert a package name to a human-friendly alias using title case
|
|
1440
|
+
* and brand-name corrections.
|
|
1441
|
+
*/
|
|
1442
|
+
declare function toAlias(value: string | undefined): string | undefined;
|
|
1443
|
+
declare const REPLACEMENTS: Map<string, string>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Takes any value and extracts all strings from it.
|
|
1446
|
+
* Returns string[] if any strings were found, or undefined otherwise.
|
|
1447
|
+
* Optionally performs case-insensitive string replacement with `replacements`.
|
|
1448
|
+
*/
|
|
1449
|
+
declare function mixedStringsToArray(value: unknown, replacements?: Map<string, string>): string[] | undefined;
|
|
1450
|
+
/**
|
|
1451
|
+
* Convert a filename or relative path to a local `file://` URL rooted at `repoPath`.
|
|
1452
|
+
*/
|
|
1453
|
+
declare function toLocalUrl(value: string | undefined, repoPath: string | undefined): string | undefined;
|
|
1454
|
+
/**
|
|
1455
|
+
* Recursively removes `undefined` values and empty objects from an object.
|
|
1456
|
+
* Only recurses into plain objects and arrays. Non-plain objects (like Date)
|
|
1457
|
+
* are preserved as-is.
|
|
1458
|
+
* Array elements that are `undefined` are also removed.
|
|
1459
|
+
* Returns `undefined` if the entire input becomes empty after stripping.
|
|
1460
|
+
*/
|
|
1461
|
+
declare function stripUndefined<T>(value: T): T;
|
|
1462
|
+
/**
|
|
1463
|
+
* Strip the SPDX license URL prefix, returning just the license identifier.
|
|
1464
|
+
*/
|
|
1465
|
+
declare function toBasicLicense(source: string | undefined): string | undefined;
|
|
1466
|
+
/**
|
|
1467
|
+
* Normalize one or more license values to plain SPDX identifiers, stripping URL prefixes.
|
|
1468
|
+
*/
|
|
1469
|
+
declare function toBasicLicenses(...sources: Array<string | string[] | undefined>): string[] | undefined;
|
|
1470
|
+
type CodeMetaPersonOrOrg = NonNullable<CodeMetaJson['author']>[number];
|
|
1471
|
+
/**
|
|
1472
|
+
* Extract display names from an array of `CodeMetaPersonOrOrg`.
|
|
1473
|
+
*/
|
|
1474
|
+
declare function toBasicNames(source: CodeMetaPersonOrOrg[] | undefined): string[] | undefined;
|
|
1475
|
+
/**
|
|
1476
|
+
* Check if the project has `@kitschpatrol/shared-config` as a dependency.
|
|
1477
|
+
*/
|
|
1478
|
+
declare function usesSharedConfig(codemeta: CodeMetaJson): boolean;
|
|
1479
|
+
/**
|
|
1480
|
+
* Check if the project uses pnpm as its package manager.
|
|
1481
|
+
*/
|
|
1482
|
+
declare function usesPnpm(packageJson: NodePackageJsonData): boolean;
|
|
1483
|
+
/**
|
|
1484
|
+
* True if project was authored by specific person(s).
|
|
1485
|
+
*/
|
|
1486
|
+
declare function isAuthoredBy(codemetaAuthorName?: CodeMetaPersonOrOrg | CodeMetaPersonOrOrg[], expectedAuthorName?: string | string[]): boolean | undefined;
|
|
1487
|
+
/**
|
|
1488
|
+
* True if project is on a specific GitHub account(s).
|
|
1489
|
+
*/
|
|
1490
|
+
declare function isOnGithubAccountOf(codeRepository?: string, githubUserName?: string | string[]): boolean | undefined;
|
|
1491
|
+
/**
|
|
1492
|
+
* Heuristic project status based on authorship and GitHub account.
|
|
1493
|
+
*/
|
|
1494
|
+
declare function toStatus(codeRepository?: string, codemetaAuthorName?: CodeMetaPersonOrOrg | CodeMetaPersonOrOrg[], authorName?: string | string[], githubUserName?: string | string[]): /** It's a fork on GitHub */('fork' /** I am original author, local or on github */ | 'source' /** Someone else's local code */ | 'unmaintained') | undefined;
|
|
1495
|
+
//#endregion
|
|
1496
|
+
export { type Credentials, DEFAULT_GET_METADATA_OPTIONS, type GetMetadataOptions, type GetMetadataTemplateOptions, type MetadataContext, type OneOrMany, type SourceName, type SourceRecord, type Template, type TemplateData, defineTemplate, getMetadata, template_helpers_d_exports as helpers, setLogger, templates };
|