@shard-for-obsidian/lib 0.3.1 → 0.3.2
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/marketplace/index.d.ts +2 -0
- package/dist/marketplace/index.d.ts.map +1 -1
- package/dist/marketplace/index.js +2 -0
- package/dist/marketplace/oci-to-markdown.d.ts +20 -0
- package/dist/marketplace/oci-to-markdown.d.ts.map +1 -0
- package/dist/marketplace/oci-to-markdown.js +48 -0
- package/dist/marketplace/version-grouping.d.ts +30 -0
- package/dist/marketplace/version-grouping.d.ts.map +1 -0
- package/dist/marketplace/version-grouping.js +51 -0
- package/dist/schemas/marketplace.d.ts +78 -26
- package/dist/schemas/marketplace.d.ts.map +1 -1
- package/dist/schemas/marketplace.js +6 -2
- package/package.json +1 -1
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { MarketplaceClient, DEFAULT_MARKETPLACE_URL, type MarketplaceClientOptions, } from "./client.js";
|
|
2
|
+
export { ociAnnotationsToFrontmatter, type PluginFrontmatter } from './oci-to-markdown.js';
|
|
3
|
+
export { groupVersionsBySha, sortTagsByPriority, type RawVersion, type GroupedVersion, } from './version-grouping.js';
|
|
2
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/marketplace/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/marketplace/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,2BAA2B,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE3F,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,cAAc,GACpB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frontmatter structure for marketplace markdown files
|
|
3
|
+
*/
|
|
4
|
+
export interface PluginFrontmatter {
|
|
5
|
+
id: string;
|
|
6
|
+
registryUrl: string;
|
|
7
|
+
name: string;
|
|
8
|
+
author: string;
|
|
9
|
+
description: string;
|
|
10
|
+
license?: string;
|
|
11
|
+
minObsidianVersion?: string;
|
|
12
|
+
authorUrl?: string;
|
|
13
|
+
repository?: string;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Transform OCI annotations to markdown frontmatter structure
|
|
18
|
+
*/
|
|
19
|
+
export declare function ociAnnotationsToFrontmatter(annotations: Record<string, string>, registryUrl: string): PluginFrontmatter;
|
|
20
|
+
//# sourceMappingURL=oci-to-markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oci-to-markdown.d.ts","sourceRoot":"","sources":["../../src/marketplace/oci-to-markdown.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAyBnB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for OCI manifest annotations from Shard packages
|
|
4
|
+
*/
|
|
5
|
+
const OciAnnotationsSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
'org.opencontainers.image.title': z.string().optional(),
|
|
8
|
+
'org.opencontainers.image.description': z.string().optional(),
|
|
9
|
+
'org.opencontainers.image.version': z.string().optional(),
|
|
10
|
+
'org.opencontainers.image.created': z.string().optional(),
|
|
11
|
+
'org.opencontainers.image.authors': z.string().optional(),
|
|
12
|
+
'org.opencontainers.image.url': z.string().optional(),
|
|
13
|
+
'org.opencontainers.image.source': z.string().optional(),
|
|
14
|
+
'org.opencontainers.image.licenses': z.string().optional(),
|
|
15
|
+
'vnd.obsidianmd.plugin.id': z.string(),
|
|
16
|
+
'vnd.obsidianmd.plugin.name': z.string(),
|
|
17
|
+
'vnd.obsidianmd.plugin.author': z.string(),
|
|
18
|
+
'vnd.obsidianmd.plugin.description': z.string(),
|
|
19
|
+
'vnd.obsidianmd.plugin.repo': z.string(),
|
|
20
|
+
'vnd.obsidianmd.plugin.minAppVersion': z.string().optional(),
|
|
21
|
+
})
|
|
22
|
+
.passthrough();
|
|
23
|
+
/**
|
|
24
|
+
* Transform OCI annotations to markdown frontmatter structure
|
|
25
|
+
*/
|
|
26
|
+
export function ociAnnotationsToFrontmatter(annotations, registryUrl) {
|
|
27
|
+
// Validate input
|
|
28
|
+
const validated = OciAnnotationsSchema.parse(annotations);
|
|
29
|
+
// Build frontmatter object
|
|
30
|
+
const frontmatter = {
|
|
31
|
+
id: validated['vnd.obsidianmd.plugin.id'],
|
|
32
|
+
name: validated['vnd.obsidianmd.plugin.name'],
|
|
33
|
+
author: validated['vnd.obsidianmd.plugin.author'],
|
|
34
|
+
description: validated['vnd.obsidianmd.plugin.description'],
|
|
35
|
+
registryUrl,
|
|
36
|
+
};
|
|
37
|
+
// Add optional fields
|
|
38
|
+
if (validated['org.opencontainers.image.source']) {
|
|
39
|
+
frontmatter.repository = validated['org.opencontainers.image.source'];
|
|
40
|
+
}
|
|
41
|
+
if (validated['org.opencontainers.image.licenses']) {
|
|
42
|
+
frontmatter.license = validated['org.opencontainers.image.licenses'];
|
|
43
|
+
}
|
|
44
|
+
if (validated['vnd.obsidianmd.plugin.minAppVersion']) {
|
|
45
|
+
frontmatter.minObsidianVersion = validated['vnd.obsidianmd.plugin.minAppVersion'];
|
|
46
|
+
}
|
|
47
|
+
return frontmatter;
|
|
48
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version information before grouping
|
|
3
|
+
*/
|
|
4
|
+
export interface RawVersion {
|
|
5
|
+
tag: string;
|
|
6
|
+
sha: string;
|
|
7
|
+
publishedAt: string;
|
|
8
|
+
size: number;
|
|
9
|
+
annotations: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Version information after grouping by SHA
|
|
13
|
+
*/
|
|
14
|
+
export interface GroupedVersion {
|
|
15
|
+
sha: string;
|
|
16
|
+
canonicalTag: string;
|
|
17
|
+
additionalTags: string[];
|
|
18
|
+
publishedAt: string;
|
|
19
|
+
size: number;
|
|
20
|
+
annotations: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Sort tags by priority: full semver > partial semver > other
|
|
24
|
+
*/
|
|
25
|
+
export declare function sortTagsByPriority(tags: string[]): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Group versions by SHA digest, selecting canonical tag
|
|
28
|
+
*/
|
|
29
|
+
export declare function groupVersionsBySha(versions: RawVersion[]): GroupedVersion[];
|
|
30
|
+
//# sourceMappingURL=version-grouping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-grouping.d.ts","sourceRoot":"","sources":["../../src/marketplace/version-grouping.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAY3D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,cAAc,EAAE,CA6C3E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sort tags by priority: full semver > partial semver > other
|
|
3
|
+
*/
|
|
4
|
+
export function sortTagsByPriority(tags) {
|
|
5
|
+
return tags.sort((a, b) => {
|
|
6
|
+
// Full semver (X.Y.Z) has highest priority
|
|
7
|
+
const aIsFullSemver = /^\d+\.\d+\.\d+/.test(a);
|
|
8
|
+
const bIsFullSemver = /^\d+\.\d+\.\d+/.test(b);
|
|
9
|
+
if (aIsFullSemver && !bIsFullSemver)
|
|
10
|
+
return -1;
|
|
11
|
+
if (!aIsFullSemver && bIsFullSemver)
|
|
12
|
+
return 1;
|
|
13
|
+
// Both same type: lexicographic comparison (numeric-aware, descending)
|
|
14
|
+
return b.localeCompare(a, undefined, { numeric: true });
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Group versions by SHA digest, selecting canonical tag
|
|
19
|
+
*/
|
|
20
|
+
export function groupVersionsBySha(versions) {
|
|
21
|
+
// Build map of SHA -> version data
|
|
22
|
+
const versionMap = new Map();
|
|
23
|
+
for (const version of versions) {
|
|
24
|
+
const existing = versionMap.get(version.sha);
|
|
25
|
+
if (existing) {
|
|
26
|
+
existing.tags.push(version.tag);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
versionMap.set(version.sha, {
|
|
30
|
+
tags: [version.tag],
|
|
31
|
+
publishedAt: version.publishedAt,
|
|
32
|
+
size: version.size,
|
|
33
|
+
annotations: version.annotations,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Convert to grouped versions with canonical tag selection
|
|
38
|
+
const grouped = Array.from(versionMap.entries()).map(([sha, data]) => {
|
|
39
|
+
const sorted = sortTagsByPriority(data.tags);
|
|
40
|
+
return {
|
|
41
|
+
sha,
|
|
42
|
+
canonicalTag: sorted[0],
|
|
43
|
+
additionalTags: sorted.slice(1),
|
|
44
|
+
publishedAt: data.publishedAt,
|
|
45
|
+
size: data.size,
|
|
46
|
+
annotations: data.annotations,
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
// Sort grouped versions by canonical tag (descending)
|
|
50
|
+
return grouped.sort((a, b) => sortTagsByPriority([a.canonicalTag, b.canonicalTag])[0] === a.canonicalTag ? -1 : 1);
|
|
51
|
+
}
|
|
@@ -3,8 +3,12 @@ import { z } from "zod";
|
|
|
3
3
|
* Plugin version information from OCI registry
|
|
4
4
|
*/
|
|
5
5
|
export declare const PluginVersionSchema: z.ZodObject<{
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/** Canonical version tag (highest priority) */
|
|
7
|
+
canonicalTag: z.ZodString;
|
|
8
|
+
/** Additional tags pointing to same SHA */
|
|
9
|
+
additionalTags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10
|
+
/** SHA digest */
|
|
11
|
+
sha: z.ZodString;
|
|
8
12
|
/** Publication timestamp (ISO 8601) */
|
|
9
13
|
publishedAt: z.ZodString;
|
|
10
14
|
/** Size in bytes */
|
|
@@ -14,13 +18,17 @@ export declare const PluginVersionSchema: z.ZodObject<{
|
|
|
14
18
|
}, "strip", z.ZodTypeAny, {
|
|
15
19
|
size: number;
|
|
16
20
|
annotations: Record<string, string>;
|
|
17
|
-
|
|
21
|
+
canonicalTag: string;
|
|
22
|
+
sha: string;
|
|
18
23
|
publishedAt: string;
|
|
24
|
+
additionalTags?: string[] | undefined;
|
|
19
25
|
}, {
|
|
20
26
|
size: number;
|
|
21
27
|
annotations: Record<string, string>;
|
|
22
|
-
|
|
28
|
+
canonicalTag: string;
|
|
29
|
+
sha: string;
|
|
23
30
|
publishedAt: string;
|
|
31
|
+
additionalTags?: string[] | undefined;
|
|
24
32
|
}>;
|
|
25
33
|
/**
|
|
26
34
|
* Marketplace plugin information
|
|
@@ -51,8 +59,12 @@ export declare const MarketplacePluginSchema: z.ZodObject<{
|
|
|
51
59
|
introduction: z.ZodOptional<z.ZodString>;
|
|
52
60
|
/** Available versions from OCI */
|
|
53
61
|
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
-
/**
|
|
55
|
-
|
|
62
|
+
/** Canonical version tag (highest priority) */
|
|
63
|
+
canonicalTag: z.ZodString;
|
|
64
|
+
/** Additional tags pointing to same SHA */
|
|
65
|
+
additionalTags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
66
|
+
/** SHA digest */
|
|
67
|
+
sha: z.ZodString;
|
|
56
68
|
/** Publication timestamp (ISO 8601) */
|
|
57
69
|
publishedAt: z.ZodString;
|
|
58
70
|
/** Size in bytes */
|
|
@@ -62,13 +74,17 @@ export declare const MarketplacePluginSchema: z.ZodObject<{
|
|
|
62
74
|
}, "strip", z.ZodTypeAny, {
|
|
63
75
|
size: number;
|
|
64
76
|
annotations: Record<string, string>;
|
|
65
|
-
|
|
77
|
+
canonicalTag: string;
|
|
78
|
+
sha: string;
|
|
66
79
|
publishedAt: string;
|
|
80
|
+
additionalTags?: string[] | undefined;
|
|
67
81
|
}, {
|
|
68
82
|
size: number;
|
|
69
83
|
annotations: Record<string, string>;
|
|
70
|
-
|
|
84
|
+
canonicalTag: string;
|
|
85
|
+
sha: string;
|
|
71
86
|
publishedAt: string;
|
|
87
|
+
additionalTags?: string[] | undefined;
|
|
72
88
|
}>, "many">>;
|
|
73
89
|
}, "strip", z.ZodTypeAny, {
|
|
74
90
|
id: string;
|
|
@@ -85,8 +101,10 @@ export declare const MarketplacePluginSchema: z.ZodObject<{
|
|
|
85
101
|
versions?: {
|
|
86
102
|
size: number;
|
|
87
103
|
annotations: Record<string, string>;
|
|
88
|
-
|
|
104
|
+
canonicalTag: string;
|
|
105
|
+
sha: string;
|
|
89
106
|
publishedAt: string;
|
|
107
|
+
additionalTags?: string[] | undefined;
|
|
90
108
|
}[] | undefined;
|
|
91
109
|
}, {
|
|
92
110
|
id: string;
|
|
@@ -103,8 +121,10 @@ export declare const MarketplacePluginSchema: z.ZodObject<{
|
|
|
103
121
|
versions?: {
|
|
104
122
|
size: number;
|
|
105
123
|
annotations: Record<string, string>;
|
|
106
|
-
|
|
124
|
+
canonicalTag: string;
|
|
125
|
+
sha: string;
|
|
107
126
|
publishedAt: string;
|
|
127
|
+
additionalTags?: string[] | undefined;
|
|
108
128
|
}[] | undefined;
|
|
109
129
|
}>;
|
|
110
130
|
/**
|
|
@@ -137,8 +157,12 @@ export declare const MarketplaceIndexSchema: z.ZodObject<{
|
|
|
137
157
|
introduction: z.ZodOptional<z.ZodString>;
|
|
138
158
|
/** Available versions from OCI */
|
|
139
159
|
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
-
/**
|
|
141
|
-
|
|
160
|
+
/** Canonical version tag (highest priority) */
|
|
161
|
+
canonicalTag: z.ZodString;
|
|
162
|
+
/** Additional tags pointing to same SHA */
|
|
163
|
+
additionalTags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
164
|
+
/** SHA digest */
|
|
165
|
+
sha: z.ZodString;
|
|
142
166
|
/** Publication timestamp (ISO 8601) */
|
|
143
167
|
publishedAt: z.ZodString;
|
|
144
168
|
/** Size in bytes */
|
|
@@ -148,13 +172,17 @@ export declare const MarketplaceIndexSchema: z.ZodObject<{
|
|
|
148
172
|
}, "strip", z.ZodTypeAny, {
|
|
149
173
|
size: number;
|
|
150
174
|
annotations: Record<string, string>;
|
|
151
|
-
|
|
175
|
+
canonicalTag: string;
|
|
176
|
+
sha: string;
|
|
152
177
|
publishedAt: string;
|
|
178
|
+
additionalTags?: string[] | undefined;
|
|
153
179
|
}, {
|
|
154
180
|
size: number;
|
|
155
181
|
annotations: Record<string, string>;
|
|
156
|
-
|
|
182
|
+
canonicalTag: string;
|
|
183
|
+
sha: string;
|
|
157
184
|
publishedAt: string;
|
|
185
|
+
additionalTags?: string[] | undefined;
|
|
158
186
|
}>, "many">>;
|
|
159
187
|
}, "strip", z.ZodTypeAny, {
|
|
160
188
|
id: string;
|
|
@@ -171,8 +199,10 @@ export declare const MarketplaceIndexSchema: z.ZodObject<{
|
|
|
171
199
|
versions?: {
|
|
172
200
|
size: number;
|
|
173
201
|
annotations: Record<string, string>;
|
|
174
|
-
|
|
202
|
+
canonicalTag: string;
|
|
203
|
+
sha: string;
|
|
175
204
|
publishedAt: string;
|
|
205
|
+
additionalTags?: string[] | undefined;
|
|
176
206
|
}[] | undefined;
|
|
177
207
|
}, {
|
|
178
208
|
id: string;
|
|
@@ -189,8 +219,10 @@ export declare const MarketplaceIndexSchema: z.ZodObject<{
|
|
|
189
219
|
versions?: {
|
|
190
220
|
size: number;
|
|
191
221
|
annotations: Record<string, string>;
|
|
192
|
-
|
|
222
|
+
canonicalTag: string;
|
|
223
|
+
sha: string;
|
|
193
224
|
publishedAt: string;
|
|
225
|
+
additionalTags?: string[] | undefined;
|
|
194
226
|
}[] | undefined;
|
|
195
227
|
}>, "many">;
|
|
196
228
|
/** Generation timestamp (ISO 8601) */
|
|
@@ -211,8 +243,10 @@ export declare const MarketplaceIndexSchema: z.ZodObject<{
|
|
|
211
243
|
versions?: {
|
|
212
244
|
size: number;
|
|
213
245
|
annotations: Record<string, string>;
|
|
214
|
-
|
|
246
|
+
canonicalTag: string;
|
|
247
|
+
sha: string;
|
|
215
248
|
publishedAt: string;
|
|
249
|
+
additionalTags?: string[] | undefined;
|
|
216
250
|
}[] | undefined;
|
|
217
251
|
}[];
|
|
218
252
|
generatedAt: string;
|
|
@@ -232,8 +266,10 @@ export declare const MarketplaceIndexSchema: z.ZodObject<{
|
|
|
232
266
|
versions?: {
|
|
233
267
|
size: number;
|
|
234
268
|
annotations: Record<string, string>;
|
|
235
|
-
|
|
269
|
+
canonicalTag: string;
|
|
270
|
+
sha: string;
|
|
236
271
|
publishedAt: string;
|
|
272
|
+
additionalTags?: string[] | undefined;
|
|
237
273
|
}[] | undefined;
|
|
238
274
|
}[];
|
|
239
275
|
generatedAt: string;
|
|
@@ -268,8 +304,12 @@ export declare const CachedMarketplaceDataSchema: z.ZodObject<{
|
|
|
268
304
|
introduction: z.ZodOptional<z.ZodString>;
|
|
269
305
|
/** Available versions from OCI */
|
|
270
306
|
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
271
|
-
/**
|
|
272
|
-
|
|
307
|
+
/** Canonical version tag (highest priority) */
|
|
308
|
+
canonicalTag: z.ZodString;
|
|
309
|
+
/** Additional tags pointing to same SHA */
|
|
310
|
+
additionalTags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
311
|
+
/** SHA digest */
|
|
312
|
+
sha: z.ZodString;
|
|
273
313
|
/** Publication timestamp (ISO 8601) */
|
|
274
314
|
publishedAt: z.ZodString;
|
|
275
315
|
/** Size in bytes */
|
|
@@ -279,13 +319,17 @@ export declare const CachedMarketplaceDataSchema: z.ZodObject<{
|
|
|
279
319
|
}, "strip", z.ZodTypeAny, {
|
|
280
320
|
size: number;
|
|
281
321
|
annotations: Record<string, string>;
|
|
282
|
-
|
|
322
|
+
canonicalTag: string;
|
|
323
|
+
sha: string;
|
|
283
324
|
publishedAt: string;
|
|
325
|
+
additionalTags?: string[] | undefined;
|
|
284
326
|
}, {
|
|
285
327
|
size: number;
|
|
286
328
|
annotations: Record<string, string>;
|
|
287
|
-
|
|
329
|
+
canonicalTag: string;
|
|
330
|
+
sha: string;
|
|
288
331
|
publishedAt: string;
|
|
332
|
+
additionalTags?: string[] | undefined;
|
|
289
333
|
}>, "many">>;
|
|
290
334
|
}, "strip", z.ZodTypeAny, {
|
|
291
335
|
id: string;
|
|
@@ -302,8 +346,10 @@ export declare const CachedMarketplaceDataSchema: z.ZodObject<{
|
|
|
302
346
|
versions?: {
|
|
303
347
|
size: number;
|
|
304
348
|
annotations: Record<string, string>;
|
|
305
|
-
|
|
349
|
+
canonicalTag: string;
|
|
350
|
+
sha: string;
|
|
306
351
|
publishedAt: string;
|
|
352
|
+
additionalTags?: string[] | undefined;
|
|
307
353
|
}[] | undefined;
|
|
308
354
|
}, {
|
|
309
355
|
id: string;
|
|
@@ -320,8 +366,10 @@ export declare const CachedMarketplaceDataSchema: z.ZodObject<{
|
|
|
320
366
|
versions?: {
|
|
321
367
|
size: number;
|
|
322
368
|
annotations: Record<string, string>;
|
|
323
|
-
|
|
369
|
+
canonicalTag: string;
|
|
370
|
+
sha: string;
|
|
324
371
|
publishedAt: string;
|
|
372
|
+
additionalTags?: string[] | undefined;
|
|
325
373
|
}[] | undefined;
|
|
326
374
|
}>, "many">;
|
|
327
375
|
/** Fetch timestamp (Unix epoch milliseconds) */
|
|
@@ -342,8 +390,10 @@ export declare const CachedMarketplaceDataSchema: z.ZodObject<{
|
|
|
342
390
|
versions?: {
|
|
343
391
|
size: number;
|
|
344
392
|
annotations: Record<string, string>;
|
|
345
|
-
|
|
393
|
+
canonicalTag: string;
|
|
394
|
+
sha: string;
|
|
346
395
|
publishedAt: string;
|
|
396
|
+
additionalTags?: string[] | undefined;
|
|
347
397
|
}[] | undefined;
|
|
348
398
|
}[];
|
|
349
399
|
fetchedAt: number;
|
|
@@ -363,8 +413,10 @@ export declare const CachedMarketplaceDataSchema: z.ZodObject<{
|
|
|
363
413
|
versions?: {
|
|
364
414
|
size: number;
|
|
365
415
|
annotations: Record<string, string>;
|
|
366
|
-
|
|
416
|
+
canonicalTag: string;
|
|
417
|
+
sha: string;
|
|
367
418
|
publishedAt: string;
|
|
419
|
+
additionalTags?: string[] | undefined;
|
|
368
420
|
}[] | undefined;
|
|
369
421
|
}[];
|
|
370
422
|
fetchedAt: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/schemas/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B,
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/schemas/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B,+CAA+C;;IAE/C,2CAA2C;;IAE3C,iBAAiB;;IAEjB,uCAAuC;;IAEvC,oBAAoB;;IAEpB,+BAA+B;;;;;;;;;;;;;;;;EAE/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IAElC,gBAAgB;;IAEhB,kDAAkD;;IAIlD,mBAAmB;;IAEnB,oBAAoB;;IAEpB,yBAAyB;;IAIzB,yBAAyB;;IAEzB,wCAAwC;;IAExC,iBAAiB;;IAIjB,6DAA6D;;IAE7D,oBAAoB;;IAIpB,oCAAoC;;IAEpC,kCAAkC;;QAlDlC,+CAA+C;;QAE/C,2CAA2C;;QAE3C,iBAAiB;;QAEjB,uCAAuC;;QAEvC,oBAAoB;;QAEpB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0C/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC,sBAAsB;;QAtCtB,gBAAgB;;QAEhB,kDAAkD;;QAIlD,mBAAmB;;QAEnB,oBAAoB;;QAEpB,yBAAyB;;QAIzB,yBAAyB;;QAEzB,wCAAwC;;QAExC,iBAAiB;;QAIjB,6DAA6D;;QAE7D,oBAAoB;;QAIpB,oCAAoC;;QAEpC,kCAAkC;;YAlDlC,+CAA+C;;YAE/C,2CAA2C;;YAE3C,iBAAiB;;YAEjB,uCAAuC;;YAEvC,oBAAoB;;YAEpB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkD/B,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;IACtC,sBAAsB;;QAhDtB,gBAAgB;;QAEhB,kDAAkD;;QAIlD,mBAAmB;;QAEnB,oBAAoB;;QAEpB,yBAAyB;;QAIzB,yBAAyB;;QAEzB,wCAAwC;;QAExC,iBAAiB;;QAIjB,6DAA6D;;QAE7D,oBAAoB;;QAIpB,oCAAoC;;QAEpC,kCAAkC;;YAlDlC,+CAA+C;;YAE/C,2CAA2C;;YAE3C,iBAAiB;;YAEjB,uCAAuC;;YAEvC,oBAAoB;;YAEpB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4D/B,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -3,8 +3,12 @@ import { z } from "zod";
|
|
|
3
3
|
* Plugin version information from OCI registry
|
|
4
4
|
*/
|
|
5
5
|
export const PluginVersionSchema = z.object({
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/** Canonical version tag (highest priority) */
|
|
7
|
+
canonicalTag: z.string(),
|
|
8
|
+
/** Additional tags pointing to same SHA */
|
|
9
|
+
additionalTags: z.array(z.string()).optional(),
|
|
10
|
+
/** SHA digest */
|
|
11
|
+
sha: z.string(),
|
|
8
12
|
/** Publication timestamp (ISO 8601) */
|
|
9
13
|
publishedAt: z.string(),
|
|
10
14
|
/** Size in bytes */
|