@dsh-plugin-hub/schemas 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.
@@ -0,0 +1,702 @@
1
+ import { z } from "zod";
2
+ export declare const npmPackageNameSchema: z.ZodString;
3
+ export declare const exactSemverSchema: z.ZodString;
4
+ export declare const dshBundleSchema: z.ZodObject<{
5
+ patch: z.ZodString;
6
+ }, z.core.$strict>;
7
+ export declare const dshClientSchema: z.ZodObject<{
8
+ inject: z.ZodDefault<z.ZodArray<z.ZodString>>;
9
+ platform: z.ZodDefault<z.ZodEnum<{
10
+ any: "any";
11
+ web: "web";
12
+ headless: "headless";
13
+ desktop: "desktop";
14
+ }>>;
15
+ }, z.core.$loose>;
16
+ export declare const dshPackageManifestSchema: z.ZodObject<{
17
+ name: z.ZodString;
18
+ version: z.ZodString;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ license: z.ZodOptional<z.ZodString>;
21
+ main: z.ZodOptional<z.ZodString>;
22
+ exports: z.ZodOptional<z.ZodUnknown>;
23
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ sideEffects: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
25
+ repository: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
26
+ type: z.ZodOptional<z.ZodString>;
27
+ url: z.ZodString;
28
+ }, z.core.$loose>]>>;
29
+ dsh: z.ZodObject<{
30
+ bundle: z.ZodObject<{
31
+ patch: z.ZodString;
32
+ }, z.core.$strict>;
33
+ client: z.ZodOptional<z.ZodObject<{
34
+ inject: z.ZodDefault<z.ZodArray<z.ZodString>>;
35
+ platform: z.ZodDefault<z.ZodEnum<{
36
+ any: "any";
37
+ web: "web";
38
+ headless: "headless";
39
+ desktop: "desktop";
40
+ }>>;
41
+ }, z.core.$loose>>;
42
+ }, z.core.$loose>;
43
+ }, z.core.$loose>;
44
+ /**
45
+ * Keep only fields the Hub needs to install and describe a bundle. npm's
46
+ * version endpoint adds maintainer emails and internal operational metadata to
47
+ * package.json; those fields must never be mirrored into the public Registry.
48
+ */
49
+ export declare function sanitizeDshPackageManifest(value: unknown): {
50
+ [x: string]: unknown;
51
+ name: string;
52
+ version: string;
53
+ dsh: {
54
+ [x: string]: unknown;
55
+ bundle: {
56
+ patch: string;
57
+ };
58
+ client?: {
59
+ [x: string]: unknown;
60
+ inject: string[];
61
+ platform: "any" | "web" | "headless" | "desktop";
62
+ } | undefined;
63
+ };
64
+ description?: string | undefined;
65
+ license?: string | undefined;
66
+ main?: string | undefined;
67
+ exports?: unknown;
68
+ files?: string[] | undefined;
69
+ sideEffects?: boolean | string[] | undefined;
70
+ repository?: string | {
71
+ [x: string]: unknown;
72
+ url: string;
73
+ type?: string | undefined;
74
+ } | undefined;
75
+ };
76
+ export declare const dshProfileManifestSchema: z.ZodObject<{
77
+ name: z.ZodString;
78
+ private: z.ZodOptional<z.ZodBoolean>;
79
+ dependencies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
80
+ dsh: z.ZodObject<{
81
+ profile: z.ZodObject<{
82
+ bundles: z.ZodArray<z.ZodString>;
83
+ }, z.core.$strict>;
84
+ }, z.core.$loose>;
85
+ }, z.core.$loose>;
86
+ export declare const screenshotSchema: z.ZodObject<{
87
+ url: z.ZodURL;
88
+ alt: z.ZodString;
89
+ width: z.ZodOptional<z.ZodNumber>;
90
+ height: z.ZodOptional<z.ZodNumber>;
91
+ }, z.core.$strict>;
92
+ export declare const pluginSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
93
+ kind: z.ZodLiteral<"npm">;
94
+ packageName: z.ZodString;
95
+ version: z.ZodString;
96
+ tarballUrl: z.ZodURL;
97
+ integrity: z.ZodOptional<z.ZodString>;
98
+ installSpec: z.ZodString;
99
+ }, z.core.$strict>, z.ZodObject<{
100
+ kind: z.ZodLiteral<"github">;
101
+ repository: z.ZodString;
102
+ ref: z.ZodString;
103
+ commit: z.ZodOptional<z.ZodString>;
104
+ subdirectory: z.ZodOptional<z.ZodString>;
105
+ installSpec: z.ZodString;
106
+ }, z.core.$strict>, z.ZodObject<{
107
+ kind: z.ZodLiteral<"r2">;
108
+ objectKey: z.ZodString;
109
+ tarballUrl: z.ZodURL;
110
+ integrity: z.ZodString;
111
+ installSpec: z.ZodString;
112
+ }, z.core.$strict>], "kind">;
113
+ export declare const compatibilitySchema: z.ZodObject<{
114
+ dsh: z.ZodDefault<z.ZodString>;
115
+ node: z.ZodOptional<z.ZodString>;
116
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<{
117
+ darwin: "darwin";
118
+ linux: "linux";
119
+ win32: "win32";
120
+ }>>>;
121
+ surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
122
+ any: "any";
123
+ web: "web";
124
+ headless: "headless";
125
+ desktop: "desktop";
126
+ }>>>;
127
+ hmr: z.ZodDefault<z.ZodEnum<{
128
+ full: "full";
129
+ config: "config";
130
+ refresh: "refresh";
131
+ restart: "restart";
132
+ }>>;
133
+ }, z.core.$strict>;
134
+ export declare const hubListingSchema: z.ZodObject<{
135
+ schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
136
+ displayName: z.ZodOptional<z.ZodString>;
137
+ summary: z.ZodOptional<z.ZodString>;
138
+ description: z.ZodOptional<z.ZodString>;
139
+ homepage: z.ZodOptional<z.ZodURL>;
140
+ categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
141
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
142
+ iconUrl: z.ZodOptional<z.ZodURL>;
143
+ screenshots: z.ZodDefault<z.ZodArray<z.ZodObject<{
144
+ url: z.ZodURL;
145
+ alt: z.ZodString;
146
+ width: z.ZodOptional<z.ZodNumber>;
147
+ height: z.ZodOptional<z.ZodNumber>;
148
+ }, z.core.$strict>>>;
149
+ compatibility: z.ZodOptional<z.ZodObject<{
150
+ dsh: z.ZodDefault<z.ZodString>;
151
+ node: z.ZodOptional<z.ZodString>;
152
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<{
153
+ darwin: "darwin";
154
+ linux: "linux";
155
+ win32: "win32";
156
+ }>>>;
157
+ surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
158
+ any: "any";
159
+ web: "web";
160
+ headless: "headless";
161
+ desktop: "desktop";
162
+ }>>>;
163
+ hmr: z.ZodDefault<z.ZodEnum<{
164
+ full: "full";
165
+ config: "config";
166
+ refresh: "refresh";
167
+ restart: "restart";
168
+ }>>;
169
+ }, z.core.$strict>>;
170
+ entryIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
171
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
172
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
173
+ channel: z.ZodDefault<z.ZodEnum<{
174
+ stable: "stable";
175
+ next: "next";
176
+ beta: "beta";
177
+ canary: "canary";
178
+ }>>;
179
+ }, z.core.$strict>;
180
+ export declare const pluginVersionSchema: z.ZodObject<{
181
+ version: z.ZodString;
182
+ channel: z.ZodDefault<z.ZodEnum<{
183
+ stable: "stable";
184
+ next: "next";
185
+ beta: "beta";
186
+ canary: "canary";
187
+ }>>;
188
+ manifest: z.ZodObject<{
189
+ name: z.ZodString;
190
+ version: z.ZodString;
191
+ description: z.ZodOptional<z.ZodString>;
192
+ license: z.ZodOptional<z.ZodString>;
193
+ main: z.ZodOptional<z.ZodString>;
194
+ exports: z.ZodOptional<z.ZodUnknown>;
195
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
196
+ sideEffects: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
197
+ repository: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
198
+ type: z.ZodOptional<z.ZodString>;
199
+ url: z.ZodString;
200
+ }, z.core.$loose>]>>;
201
+ dsh: z.ZodObject<{
202
+ bundle: z.ZodObject<{
203
+ patch: z.ZodString;
204
+ }, z.core.$strict>;
205
+ client: z.ZodOptional<z.ZodObject<{
206
+ inject: z.ZodDefault<z.ZodArray<z.ZodString>>;
207
+ platform: z.ZodDefault<z.ZodEnum<{
208
+ any: "any";
209
+ web: "web";
210
+ headless: "headless";
211
+ desktop: "desktop";
212
+ }>>;
213
+ }, z.core.$loose>>;
214
+ }, z.core.$loose>;
215
+ }, z.core.$loose>;
216
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
217
+ kind: z.ZodLiteral<"npm">;
218
+ packageName: z.ZodString;
219
+ version: z.ZodString;
220
+ tarballUrl: z.ZodURL;
221
+ integrity: z.ZodOptional<z.ZodString>;
222
+ installSpec: z.ZodString;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ kind: z.ZodLiteral<"github">;
225
+ repository: z.ZodString;
226
+ ref: z.ZodString;
227
+ commit: z.ZodOptional<z.ZodString>;
228
+ subdirectory: z.ZodOptional<z.ZodString>;
229
+ installSpec: z.ZodString;
230
+ }, z.core.$strict>, z.ZodObject<{
231
+ kind: z.ZodLiteral<"r2">;
232
+ objectKey: z.ZodString;
233
+ tarballUrl: z.ZodURL;
234
+ integrity: z.ZodString;
235
+ installSpec: z.ZodString;
236
+ }, z.core.$strict>], "kind">;
237
+ compatibility: z.ZodObject<{
238
+ dsh: z.ZodDefault<z.ZodString>;
239
+ node: z.ZodOptional<z.ZodString>;
240
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<{
241
+ darwin: "darwin";
242
+ linux: "linux";
243
+ win32: "win32";
244
+ }>>>;
245
+ surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
246
+ any: "any";
247
+ web: "web";
248
+ headless: "headless";
249
+ desktop: "desktop";
250
+ }>>>;
251
+ hmr: z.ZodDefault<z.ZodEnum<{
252
+ full: "full";
253
+ config: "config";
254
+ refresh: "refresh";
255
+ restart: "restart";
256
+ }>>;
257
+ }, z.core.$strict>;
258
+ entryIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
259
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
260
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
261
+ publishedAt: z.ZodISODateTime;
262
+ yanked: z.ZodDefault<z.ZodBoolean>;
263
+ unpackedSize: z.ZodOptional<z.ZodNumber>;
264
+ fileCount: z.ZodOptional<z.ZodNumber>;
265
+ }, z.core.$strict>;
266
+ export declare const publisherMetadataSchema: z.ZodObject<{
267
+ compatibility: z.ZodOptional<z.ZodObject<{
268
+ dsh: z.ZodOptional<z.ZodString>;
269
+ hmr: z.ZodOptional<z.ZodEnum<{
270
+ full: "full";
271
+ config: "config";
272
+ refresh: "refresh";
273
+ restart: "restart";
274
+ }>>;
275
+ }, z.core.$strict>>;
276
+ }, z.core.$strict>;
277
+ export declare const pluginRecordSchema: z.ZodObject<{
278
+ id: z.ZodUUID;
279
+ slug: z.ZodString;
280
+ packageName: z.ZodString;
281
+ displayName: z.ZodString;
282
+ summary: z.ZodString;
283
+ description: z.ZodDefault<z.ZodString>;
284
+ repository: z.ZodString;
285
+ github: z.ZodOptional<z.ZodObject<{
286
+ stars: z.ZodNumber;
287
+ pushedAt: z.ZodOptional<z.ZodISODateTime>;
288
+ }, z.core.$strict>>;
289
+ homepage: z.ZodOptional<z.ZodURL>;
290
+ license: z.ZodOptional<z.ZodString>;
291
+ categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
292
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
293
+ iconUrl: z.ZodOptional<z.ZodURL>;
294
+ screenshots: z.ZodDefault<z.ZodArray<z.ZodObject<{
295
+ url: z.ZodURL;
296
+ alt: z.ZodString;
297
+ width: z.ZodOptional<z.ZodNumber>;
298
+ height: z.ZodOptional<z.ZodNumber>;
299
+ }, z.core.$strict>>>;
300
+ publisherMetadata: z.ZodDefault<z.ZodObject<{
301
+ compatibility: z.ZodOptional<z.ZodObject<{
302
+ dsh: z.ZodOptional<z.ZodString>;
303
+ hmr: z.ZodOptional<z.ZodEnum<{
304
+ full: "full";
305
+ config: "config";
306
+ refresh: "refresh";
307
+ restart: "restart";
308
+ }>>;
309
+ }, z.core.$strict>>;
310
+ }, z.core.$strict>>;
311
+ claimed: z.ZodDefault<z.ZodBoolean>;
312
+ verified: z.ZodDefault<z.ZodBoolean>;
313
+ deprecated: z.ZodDefault<z.ZodBoolean>;
314
+ replacement: z.ZodOptional<z.ZodString>;
315
+ latestVersion: z.ZodString;
316
+ distTags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
317
+ weeklyDownloads: z.ZodOptional<z.ZodNumber>;
318
+ versions: z.ZodArray<z.ZodObject<{
319
+ version: z.ZodString;
320
+ channel: z.ZodDefault<z.ZodEnum<{
321
+ stable: "stable";
322
+ next: "next";
323
+ beta: "beta";
324
+ canary: "canary";
325
+ }>>;
326
+ manifest: z.ZodObject<{
327
+ name: z.ZodString;
328
+ version: z.ZodString;
329
+ description: z.ZodOptional<z.ZodString>;
330
+ license: z.ZodOptional<z.ZodString>;
331
+ main: z.ZodOptional<z.ZodString>;
332
+ exports: z.ZodOptional<z.ZodUnknown>;
333
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
334
+ sideEffects: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
335
+ repository: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
336
+ type: z.ZodOptional<z.ZodString>;
337
+ url: z.ZodString;
338
+ }, z.core.$loose>]>>;
339
+ dsh: z.ZodObject<{
340
+ bundle: z.ZodObject<{
341
+ patch: z.ZodString;
342
+ }, z.core.$strict>;
343
+ client: z.ZodOptional<z.ZodObject<{
344
+ inject: z.ZodDefault<z.ZodArray<z.ZodString>>;
345
+ platform: z.ZodDefault<z.ZodEnum<{
346
+ any: "any";
347
+ web: "web";
348
+ headless: "headless";
349
+ desktop: "desktop";
350
+ }>>;
351
+ }, z.core.$loose>>;
352
+ }, z.core.$loose>;
353
+ }, z.core.$loose>;
354
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
355
+ kind: z.ZodLiteral<"npm">;
356
+ packageName: z.ZodString;
357
+ version: z.ZodString;
358
+ tarballUrl: z.ZodURL;
359
+ integrity: z.ZodOptional<z.ZodString>;
360
+ installSpec: z.ZodString;
361
+ }, z.core.$strict>, z.ZodObject<{
362
+ kind: z.ZodLiteral<"github">;
363
+ repository: z.ZodString;
364
+ ref: z.ZodString;
365
+ commit: z.ZodOptional<z.ZodString>;
366
+ subdirectory: z.ZodOptional<z.ZodString>;
367
+ installSpec: z.ZodString;
368
+ }, z.core.$strict>, z.ZodObject<{
369
+ kind: z.ZodLiteral<"r2">;
370
+ objectKey: z.ZodString;
371
+ tarballUrl: z.ZodURL;
372
+ integrity: z.ZodString;
373
+ installSpec: z.ZodString;
374
+ }, z.core.$strict>], "kind">;
375
+ compatibility: z.ZodObject<{
376
+ dsh: z.ZodDefault<z.ZodString>;
377
+ node: z.ZodOptional<z.ZodString>;
378
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<{
379
+ darwin: "darwin";
380
+ linux: "linux";
381
+ win32: "win32";
382
+ }>>>;
383
+ surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
384
+ any: "any";
385
+ web: "web";
386
+ headless: "headless";
387
+ desktop: "desktop";
388
+ }>>>;
389
+ hmr: z.ZodDefault<z.ZodEnum<{
390
+ full: "full";
391
+ config: "config";
392
+ refresh: "refresh";
393
+ restart: "restart";
394
+ }>>;
395
+ }, z.core.$strict>;
396
+ entryIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
397
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
398
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
399
+ publishedAt: z.ZodISODateTime;
400
+ yanked: z.ZodDefault<z.ZodBoolean>;
401
+ unpackedSize: z.ZodOptional<z.ZodNumber>;
402
+ fileCount: z.ZodOptional<z.ZodNumber>;
403
+ }, z.core.$strict>>;
404
+ createdAt: z.ZodISODateTime;
405
+ updatedAt: z.ZodISODateTime;
406
+ }, z.core.$strict>;
407
+ export declare const profileBundleSchema: z.ZodObject<{
408
+ packageName: z.ZodString;
409
+ selector: z.ZodDefault<z.ZodString>;
410
+ version: z.ZodOptional<z.ZodString>;
411
+ installSpec: z.ZodOptional<z.ZodString>;
412
+ integrity: z.ZodOptional<z.ZodString>;
413
+ sourceKind: z.ZodOptional<z.ZodEnum<{
414
+ npm: "npm";
415
+ github: "github";
416
+ builtin: "builtin";
417
+ }>>;
418
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
419
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
420
+ }, z.core.$strict>;
421
+ export declare const profileRuntimeSchema: z.ZodObject<{
422
+ range: z.ZodDefault<z.ZodString>;
423
+ version: z.ZodOptional<z.ZodString>;
424
+ integrity: z.ZodOptional<z.ZodString>;
425
+ }, z.core.$strict>;
426
+ export declare const profileInputSchema: z.ZodObject<{
427
+ key: z.ZodString;
428
+ label: z.ZodString;
429
+ description: z.ZodOptional<z.ZodString>;
430
+ required: z.ZodDefault<z.ZodBoolean>;
431
+ secret: z.ZodDefault<z.ZodBoolean>;
432
+ }, z.core.$strict>;
433
+ export declare const profileVerificationSchema: z.ZodObject<{
434
+ structural: z.ZodLiteral<"passed">;
435
+ composition: z.ZodOptional<z.ZodEnum<{
436
+ local_required: "local_required";
437
+ locally_verified: "locally_verified";
438
+ }>>;
439
+ activation: z.ZodEnum<{
440
+ local_required: "local_required";
441
+ locally_verified: "locally_verified";
442
+ }>;
443
+ platform: z.ZodOptional<z.ZodEnum<{
444
+ darwin: "darwin";
445
+ linux: "linux";
446
+ win32: "win32";
447
+ }>>;
448
+ verifiedAt: z.ZodOptional<z.ZodISODateTime>;
449
+ }, z.core.$strict>;
450
+ export declare const hubProfileVersionSchema: z.ZodObject<{
451
+ schemaVersion: z.ZodLiteral<1>;
452
+ version: z.ZodString;
453
+ name: z.ZodString;
454
+ description: z.ZodDefault<z.ZodString>;
455
+ dsh: z.ZodDefault<z.ZodString>;
456
+ runtime: z.ZodOptional<z.ZodObject<{
457
+ range: z.ZodDefault<z.ZodString>;
458
+ version: z.ZodOptional<z.ZodString>;
459
+ integrity: z.ZodOptional<z.ZodString>;
460
+ }, z.core.$strict>>;
461
+ bundles: z.ZodArray<z.ZodObject<{
462
+ packageName: z.ZodString;
463
+ selector: z.ZodDefault<z.ZodString>;
464
+ version: z.ZodOptional<z.ZodString>;
465
+ installSpec: z.ZodOptional<z.ZodString>;
466
+ integrity: z.ZodOptional<z.ZodString>;
467
+ sourceKind: z.ZodOptional<z.ZodEnum<{
468
+ npm: "npm";
469
+ github: "github";
470
+ builtin: "builtin";
471
+ }>>;
472
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
473
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
474
+ }, z.core.$strict>>;
475
+ patch: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
476
+ patchYaml: z.ZodOptional<z.ZodString>;
477
+ inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
478
+ key: z.ZodString;
479
+ label: z.ZodString;
480
+ description: z.ZodOptional<z.ZodString>;
481
+ required: z.ZodDefault<z.ZodBoolean>;
482
+ secret: z.ZodDefault<z.ZodBoolean>;
483
+ }, z.core.$strict>>>;
484
+ verification: z.ZodOptional<z.ZodObject<{
485
+ structural: z.ZodLiteral<"passed">;
486
+ composition: z.ZodOptional<z.ZodEnum<{
487
+ local_required: "local_required";
488
+ locally_verified: "locally_verified";
489
+ }>>;
490
+ activation: z.ZodEnum<{
491
+ local_required: "local_required";
492
+ locally_verified: "locally_verified";
493
+ }>;
494
+ platform: z.ZodOptional<z.ZodEnum<{
495
+ darwin: "darwin";
496
+ linux: "linux";
497
+ win32: "win32";
498
+ }>>;
499
+ verifiedAt: z.ZodOptional<z.ZodISODateTime>;
500
+ }, z.core.$strict>>;
501
+ contentHash: z.ZodOptional<z.ZodString>;
502
+ publishedAt: z.ZodISODateTime;
503
+ }, z.core.$strict>;
504
+ export declare const profileDraftSchema: z.ZodObject<{
505
+ schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
506
+ slug: z.ZodString;
507
+ name: z.ZodString;
508
+ description: z.ZodDefault<z.ZodString>;
509
+ visibility: z.ZodDefault<z.ZodEnum<{
510
+ private: "private";
511
+ public: "public";
512
+ unlisted: "unlisted";
513
+ }>>;
514
+ dsh: z.ZodDefault<z.ZodString>;
515
+ runtime: z.ZodOptional<z.ZodObject<{
516
+ range: z.ZodDefault<z.ZodString>;
517
+ version: z.ZodOptional<z.ZodString>;
518
+ integrity: z.ZodOptional<z.ZodString>;
519
+ }, z.core.$strict>>;
520
+ bundles: z.ZodArray<z.ZodObject<{
521
+ packageName: z.ZodString;
522
+ selector: z.ZodDefault<z.ZodString>;
523
+ version: z.ZodOptional<z.ZodString>;
524
+ installSpec: z.ZodOptional<z.ZodString>;
525
+ integrity: z.ZodOptional<z.ZodString>;
526
+ sourceKind: z.ZodOptional<z.ZodEnum<{
527
+ npm: "npm";
528
+ github: "github";
529
+ builtin: "builtin";
530
+ }>>;
531
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
532
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
533
+ }, z.core.$strict>>;
534
+ patch: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
535
+ patchYaml: z.ZodOptional<z.ZodString>;
536
+ inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
537
+ key: z.ZodString;
538
+ label: z.ZodString;
539
+ description: z.ZodOptional<z.ZodString>;
540
+ required: z.ZodDefault<z.ZodBoolean>;
541
+ secret: z.ZodDefault<z.ZodBoolean>;
542
+ }, z.core.$strict>>>;
543
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
544
+ }, z.core.$strict>;
545
+ export declare const hubProfileSchema: z.ZodObject<{
546
+ id: z.ZodUUID;
547
+ slug: z.ZodString;
548
+ packageName: z.ZodOptional<z.ZodString>;
549
+ repository: z.ZodOptional<z.ZodString>;
550
+ owner: z.ZodString;
551
+ claimed: z.ZodDefault<z.ZodBoolean>;
552
+ visibility: z.ZodDefault<z.ZodEnum<{
553
+ private: "private";
554
+ public: "public";
555
+ unlisted: "unlisted";
556
+ }>>;
557
+ latestVersion: z.ZodString;
558
+ versions: z.ZodArray<z.ZodObject<{
559
+ schemaVersion: z.ZodLiteral<1>;
560
+ version: z.ZodString;
561
+ name: z.ZodString;
562
+ description: z.ZodDefault<z.ZodString>;
563
+ dsh: z.ZodDefault<z.ZodString>;
564
+ runtime: z.ZodOptional<z.ZodObject<{
565
+ range: z.ZodDefault<z.ZodString>;
566
+ version: z.ZodOptional<z.ZodString>;
567
+ integrity: z.ZodOptional<z.ZodString>;
568
+ }, z.core.$strict>>;
569
+ bundles: z.ZodArray<z.ZodObject<{
570
+ packageName: z.ZodString;
571
+ selector: z.ZodDefault<z.ZodString>;
572
+ version: z.ZodOptional<z.ZodString>;
573
+ installSpec: z.ZodOptional<z.ZodString>;
574
+ integrity: z.ZodOptional<z.ZodString>;
575
+ sourceKind: z.ZodOptional<z.ZodEnum<{
576
+ npm: "npm";
577
+ github: "github";
578
+ builtin: "builtin";
579
+ }>>;
580
+ before: z.ZodDefault<z.ZodArray<z.ZodString>>;
581
+ after: z.ZodDefault<z.ZodArray<z.ZodString>>;
582
+ }, z.core.$strict>>;
583
+ patch: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
584
+ patchYaml: z.ZodOptional<z.ZodString>;
585
+ inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
586
+ key: z.ZodString;
587
+ label: z.ZodString;
588
+ description: z.ZodOptional<z.ZodString>;
589
+ required: z.ZodDefault<z.ZodBoolean>;
590
+ secret: z.ZodDefault<z.ZodBoolean>;
591
+ }, z.core.$strict>>>;
592
+ verification: z.ZodOptional<z.ZodObject<{
593
+ structural: z.ZodLiteral<"passed">;
594
+ composition: z.ZodOptional<z.ZodEnum<{
595
+ local_required: "local_required";
596
+ locally_verified: "locally_verified";
597
+ }>>;
598
+ activation: z.ZodEnum<{
599
+ local_required: "local_required";
600
+ locally_verified: "locally_verified";
601
+ }>;
602
+ platform: z.ZodOptional<z.ZodEnum<{
603
+ darwin: "darwin";
604
+ linux: "linux";
605
+ win32: "win32";
606
+ }>>;
607
+ verifiedAt: z.ZodOptional<z.ZodISODateTime>;
608
+ }, z.core.$strict>>;
609
+ contentHash: z.ZodOptional<z.ZodString>;
610
+ publishedAt: z.ZodISODateTime;
611
+ }, z.core.$strict>>;
612
+ createdAt: z.ZodISODateTime;
613
+ updatedAt: z.ZodISODateTime;
614
+ }, z.core.$strict>;
615
+ export declare const profileCatalogItemSchema: z.ZodObject<{
616
+ id: z.ZodUUID;
617
+ slug: z.ZodString;
618
+ packageName: z.ZodOptional<z.ZodString>;
619
+ owner: z.ZodString;
620
+ claimed: z.ZodDefault<z.ZodBoolean>;
621
+ latestVersion: z.ZodString;
622
+ name: z.ZodString;
623
+ description: z.ZodString;
624
+ bundleCount: z.ZodNumber;
625
+ updatedAt: z.ZodISODateTime;
626
+ }, z.core.$strict>;
627
+ export declare const profileSearchResponseSchema: z.ZodObject<{
628
+ items: z.ZodArray<z.ZodObject<{
629
+ id: z.ZodUUID;
630
+ slug: z.ZodString;
631
+ packageName: z.ZodOptional<z.ZodString>;
632
+ owner: z.ZodString;
633
+ claimed: z.ZodDefault<z.ZodBoolean>;
634
+ latestVersion: z.ZodString;
635
+ name: z.ZodString;
636
+ description: z.ZodString;
637
+ bundleCount: z.ZodNumber;
638
+ updatedAt: z.ZodISODateTime;
639
+ }, z.core.$strict>>;
640
+ }, z.core.$strict>;
641
+ export declare const registrySearchResponseSchema: z.ZodObject<{
642
+ items: z.ZodArray<z.ZodObject<{
643
+ description: z.ZodDefault<z.ZodString>;
644
+ license: z.ZodOptional<z.ZodString>;
645
+ repository: z.ZodString;
646
+ packageName: z.ZodString;
647
+ github: z.ZodOptional<z.ZodObject<{
648
+ stars: z.ZodNumber;
649
+ pushedAt: z.ZodOptional<z.ZodISODateTime>;
650
+ }, z.core.$strict>>;
651
+ displayName: z.ZodString;
652
+ summary: z.ZodString;
653
+ homepage: z.ZodOptional<z.ZodURL>;
654
+ categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
655
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
656
+ iconUrl: z.ZodOptional<z.ZodURL>;
657
+ screenshots: z.ZodDefault<z.ZodArray<z.ZodObject<{
658
+ url: z.ZodURL;
659
+ alt: z.ZodString;
660
+ width: z.ZodOptional<z.ZodNumber>;
661
+ height: z.ZodOptional<z.ZodNumber>;
662
+ }, z.core.$strict>>>;
663
+ latestVersion: z.ZodString;
664
+ id: z.ZodUUID;
665
+ slug: z.ZodString;
666
+ publisherMetadata: z.ZodDefault<z.ZodObject<{
667
+ compatibility: z.ZodOptional<z.ZodObject<{
668
+ dsh: z.ZodOptional<z.ZodString>;
669
+ hmr: z.ZodOptional<z.ZodEnum<{
670
+ full: "full";
671
+ config: "config";
672
+ refresh: "refresh";
673
+ restart: "restart";
674
+ }>>;
675
+ }, z.core.$strict>>;
676
+ }, z.core.$strict>>;
677
+ claimed: z.ZodDefault<z.ZodBoolean>;
678
+ verified: z.ZodDefault<z.ZodBoolean>;
679
+ deprecated: z.ZodDefault<z.ZodBoolean>;
680
+ replacement: z.ZodOptional<z.ZodString>;
681
+ distTags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
682
+ weeklyDownloads: z.ZodOptional<z.ZodNumber>;
683
+ createdAt: z.ZodISODateTime;
684
+ updatedAt: z.ZodISODateTime;
685
+ }, z.core.$strict>>;
686
+ nextCursor: z.ZodNullable<z.ZodString>;
687
+ total: z.ZodOptional<z.ZodNumber>;
688
+ }, z.core.$strict>;
689
+ export type DshPackageManifest = z.infer<typeof dshPackageManifestSchema>;
690
+ export type DshProfileManifest = z.infer<typeof dshProfileManifestSchema>;
691
+ export type HubListing = z.infer<typeof hubListingSchema>;
692
+ export type PluginSource = z.infer<typeof pluginSourceSchema>;
693
+ export type PluginVersion = z.infer<typeof pluginVersionSchema>;
694
+ export type PluginRecord = z.infer<typeof pluginRecordSchema>;
695
+ export type ProfileBundle = z.infer<typeof profileBundleSchema>;
696
+ export type ProfileRuntime = z.infer<typeof profileRuntimeSchema>;
697
+ export type ProfileInput = z.infer<typeof profileInputSchema>;
698
+ export type ProfileDraft = z.infer<typeof profileDraftSchema>;
699
+ export type HubProfileVersion = z.infer<typeof hubProfileVersionSchema>;
700
+ export type HubProfile = z.infer<typeof hubProfileSchema>;
701
+ export type ProfileCatalogItem = z.infer<typeof profileCatalogItemSchema>;
702
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,oBAAoB,aAImB,CAAC;AAErD,eAAO,MAAM,iBAAiB,aAE+B,CAAC;AAE9D,eAAO,MAAM,eAAe;;kBAIjB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;iBAKZ,CAAC;AAEjB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBrB,CAAC;AAEjB;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCxD;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;iBAerB,CAAC;AAEjB,eAAO,MAAM,gBAAgB;;;;;kBAOlB,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;4BA8B7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;kBAQrB,CAAC;AAEZ,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiBlB,CAAC;AAEZ,eAAO,MAAM,mB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$/;
4
+ export const npmPackageNameSchema = z
5
+ .string()
6
+ .min(1)
7
+ .max(214)
8
+ .regex(npmNamePattern, "Invalid npm package name");
9
+ export const exactSemverSchema = z
10
+ .string()
11
+ .regex(semverPattern, "Expected an exact semantic version");
12
+ export const dshBundleSchema = z
13
+ .object({
14
+ patch: z.string().min(1),
15
+ })
16
+ .strict();
17
+ export const dshClientSchema = z
18
+ .object({
19
+ inject: z.array(npmPackageNameSchema).default([]),
20
+ platform: z.enum(["web", "headless", "desktop", "any"]).default("any"),
21
+ })
22
+ .passthrough();
23
+ export const dshPackageManifestSchema = z
24
+ .object({
25
+ name: npmPackageNameSchema,
26
+ version: exactSemverSchema,
27
+ description: z.string().max(2_000).optional(),
28
+ license: z.string().max(100).optional(),
29
+ main: z.string().min(1).optional(),
30
+ exports: z.unknown().optional(),
31
+ files: z.array(z.string()).optional(),
32
+ sideEffects: z.union([z.boolean(), z.array(z.string())]).optional(),
33
+ repository: z
34
+ .union([
35
+ z.string().min(1),
36
+ z.object({ type: z.string().optional(), url: z.string().min(1) }).passthrough(),
37
+ ])
38
+ .optional(),
39
+ dsh: z
40
+ .object({
41
+ bundle: dshBundleSchema,
42
+ client: dshClientSchema.optional(),
43
+ })
44
+ .passthrough(),
45
+ })
46
+ .passthrough();
47
+ /**
48
+ * Keep only fields the Hub needs to install and describe a bundle. npm's
49
+ * version endpoint adds maintainer emails and internal operational metadata to
50
+ * package.json; those fields must never be mirrored into the public Registry.
51
+ */
52
+ export function sanitizeDshPackageManifest(value) {
53
+ const manifest = dshPackageManifestSchema.parse(value);
54
+ const repository = typeof manifest.repository === "string"
55
+ ? manifest.repository
56
+ : manifest.repository
57
+ ? {
58
+ type: manifest.repository.type,
59
+ url: manifest.repository.url,
60
+ ...(typeof manifest.repository.directory === "string"
61
+ ? { directory: manifest.repository.directory }
62
+ : {}),
63
+ }
64
+ : undefined;
65
+ return dshPackageManifestSchema.parse({
66
+ name: manifest.name,
67
+ version: manifest.version,
68
+ description: manifest.description,
69
+ license: manifest.license,
70
+ main: manifest.main,
71
+ exports: manifest.exports,
72
+ files: manifest.files,
73
+ sideEffects: manifest.sideEffects,
74
+ repository,
75
+ dsh: {
76
+ bundle: { patch: manifest.dsh.bundle.patch },
77
+ ...(manifest.dsh.client
78
+ ? {
79
+ client: {
80
+ inject: manifest.dsh.client.inject,
81
+ platform: manifest.dsh.client.platform,
82
+ },
83
+ }
84
+ : {}),
85
+ },
86
+ });
87
+ }
88
+ export const dshProfileManifestSchema = z
89
+ .object({
90
+ name: npmPackageNameSchema,
91
+ private: z.boolean().optional(),
92
+ dependencies: z.record(npmPackageNameSchema, z.string().min(1)).default({}),
93
+ dsh: z
94
+ .object({
95
+ profile: z
96
+ .object({
97
+ bundles: z.array(npmPackageNameSchema).min(1),
98
+ })
99
+ .strict(),
100
+ })
101
+ .passthrough(),
102
+ })
103
+ .passthrough();
104
+ export const screenshotSchema = z
105
+ .object({
106
+ url: z.url(),
107
+ alt: z.string().min(1).max(300),
108
+ width: z.number().int().positive().optional(),
109
+ height: z.number().int().positive().optional(),
110
+ })
111
+ .strict();
112
+ export const pluginSourceSchema = z.discriminatedUnion("kind", [
113
+ z
114
+ .object({
115
+ kind: z.literal("npm"),
116
+ packageName: npmPackageNameSchema,
117
+ version: exactSemverSchema,
118
+ tarballUrl: z.url(),
119
+ integrity: z.string().min(1).optional(),
120
+ installSpec: z.string().min(1),
121
+ })
122
+ .strict(),
123
+ z
124
+ .object({
125
+ kind: z.literal("github"),
126
+ repository: z.string().regex(/^[^/\s]+\/[^/\s]+$/),
127
+ ref: z.string().min(1),
128
+ commit: z.string().regex(/^[0-9a-f]{40}$/i).optional(),
129
+ subdirectory: z.string().min(1).optional(),
130
+ installSpec: z.string().min(1),
131
+ })
132
+ .strict(),
133
+ z
134
+ .object({
135
+ kind: z.literal("r2"),
136
+ objectKey: z.string().min(1),
137
+ tarballUrl: z.url(),
138
+ integrity: z.string().min(1),
139
+ installSpec: z.string().min(1),
140
+ })
141
+ .strict(),
142
+ ]);
143
+ export const compatibilitySchema = z
144
+ .object({
145
+ dsh: z.string().min(1).default("*"),
146
+ node: z.string().min(1).optional(),
147
+ platforms: z.array(z.enum(["darwin", "linux", "win32"])).default([]),
148
+ surfaces: z.array(z.enum(["web", "headless", "desktop", "any"])).default(["any"]),
149
+ hmr: z.enum(["full", "config", "refresh", "restart"]).default("restart"),
150
+ })
151
+ .strict();
152
+ export const hubListingSchema = z
153
+ .object({
154
+ schemaVersion: z.literal(1).default(1),
155
+ displayName: z.string().min(1).max(120).optional(),
156
+ summary: z.string().min(1).max(300).optional(),
157
+ description: z.string().max(20_000).optional(),
158
+ homepage: z.url().optional(),
159
+ categories: z.array(z.string().min(1).max(60)).max(12).default([]),
160
+ keywords: z.array(z.string().min(1).max(60)).max(30).default([]),
161
+ iconUrl: z.url().optional(),
162
+ screenshots: z.array(screenshotSchema).max(8).default([]),
163
+ compatibility: compatibilitySchema.optional(),
164
+ entryIds: z.array(z.string().min(1)).max(100).default([]),
165
+ before: z.array(npmPackageNameSchema).default([]),
166
+ after: z.array(npmPackageNameSchema).default([]),
167
+ channel: z.enum(["stable", "next", "beta", "canary"]).default("stable"),
168
+ })
169
+ .strict();
170
+ export const pluginVersionSchema = z
171
+ .object({
172
+ version: exactSemverSchema,
173
+ channel: z.enum(["stable", "next", "beta", "canary"]).default("stable"),
174
+ manifest: dshPackageManifestSchema,
175
+ source: pluginSourceSchema,
176
+ compatibility: compatibilitySchema,
177
+ entryIds: z.array(z.string().min(1)).default([]),
178
+ before: z.array(npmPackageNameSchema).default([]),
179
+ after: z.array(npmPackageNameSchema).default([]),
180
+ publishedAt: z.iso.datetime(),
181
+ yanked: z.boolean().default(false),
182
+ unpackedSize: z.number().int().nonnegative().optional(),
183
+ fileCount: z.number().int().nonnegative().optional(),
184
+ })
185
+ .strict();
186
+ export const publisherMetadataSchema = z
187
+ .object({
188
+ compatibility: z
189
+ .object({
190
+ dsh: z.string().min(1).max(120).optional(),
191
+ hmr: z.enum(["full", "config", "refresh", "restart"]).optional(),
192
+ })
193
+ .strict()
194
+ .optional(),
195
+ })
196
+ .strict();
197
+ export const pluginRecordSchema = z
198
+ .object({
199
+ id: z.uuid(),
200
+ slug: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
201
+ packageName: npmPackageNameSchema,
202
+ displayName: z.string().min(1).max(120),
203
+ summary: z.string().min(1).max(300),
204
+ description: z.string().max(20_000).default(""),
205
+ repository: z.string().regex(/^[^/\s]+\/[^/\s]+$/),
206
+ // GitHub-side trust signals, attached when the repository is present in
207
+ // github_source_listings. Optional: source-only discovery may lag or a
208
+ // package may come from a repository outside the discovered topics.
209
+ github: z
210
+ .object({
211
+ stars: z.number().int().nonnegative(),
212
+ pushedAt: z.iso.datetime().optional(),
213
+ })
214
+ .strict()
215
+ .optional(),
216
+ homepage: z.url().optional(),
217
+ license: z.string().max(100).optional(),
218
+ categories: z.array(z.string().min(1)).default([]),
219
+ keywords: z.array(z.string().min(1)).default([]),
220
+ iconUrl: z.url().optional(),
221
+ screenshots: z.array(screenshotSchema).max(8).default([]),
222
+ publisherMetadata: publisherMetadataSchema.default({}),
223
+ claimed: z.boolean().default(false),
224
+ verified: z.boolean().default(false),
225
+ deprecated: z.boolean().default(false),
226
+ replacement: npmPackageNameSchema.optional(),
227
+ latestVersion: exactSemverSchema,
228
+ distTags: z.record(z.string(), exactSemverSchema).default({}),
229
+ weeklyDownloads: z.number().int().nonnegative().optional(),
230
+ versions: z.array(pluginVersionSchema).min(1),
231
+ createdAt: z.iso.datetime(),
232
+ updatedAt: z.iso.datetime(),
233
+ })
234
+ .strict();
235
+ export const profileBundleSchema = z
236
+ .object({
237
+ packageName: npmPackageNameSchema,
238
+ selector: z.string().min(1).default("latest"),
239
+ /** Exact immutable resolution. Required on Hub-authored releases. */
240
+ version: exactSemverSchema.optional(),
241
+ installSpec: z.string().min(1).optional(),
242
+ integrity: z.string().min(1).optional(),
243
+ sourceKind: z.enum(["npm", "github", "builtin"]).optional(),
244
+ before: z.array(npmPackageNameSchema).default([]),
245
+ after: z.array(npmPackageNameSchema).default([]),
246
+ })
247
+ .strict();
248
+ export const profileRuntimeSchema = z
249
+ .object({
250
+ range: z.string().min(1).default("*"),
251
+ version: exactSemverSchema.optional(),
252
+ integrity: z.string().min(1).optional(),
253
+ })
254
+ .strict();
255
+ export const profileInputSchema = z
256
+ .object({
257
+ key: z.string().regex(/^[A-Z][A-Z0-9_]*$/),
258
+ label: z.string().min(1).max(120),
259
+ description: z.string().max(500).optional(),
260
+ required: z.boolean().default(true),
261
+ secret: z.boolean().default(true),
262
+ })
263
+ .strict();
264
+ export const profileVerificationSchema = z
265
+ .object({
266
+ structural: z.literal("passed"),
267
+ composition: z.enum(["local_required", "locally_verified"]).optional(),
268
+ activation: z.enum(["local_required", "locally_verified"]),
269
+ platform: z.enum(["darwin", "linux", "win32"]).optional(),
270
+ verifiedAt: z.iso.datetime().optional(),
271
+ })
272
+ .strict();
273
+ export const hubProfileVersionSchema = z
274
+ .object({
275
+ schemaVersion: z.literal(1),
276
+ version: exactSemverSchema,
277
+ name: z.string().min(1).max(120),
278
+ description: z.string().max(2_000).default(""),
279
+ dsh: z.string().min(1).default("*"),
280
+ runtime: profileRuntimeSchema.optional(),
281
+ bundles: z.array(profileBundleSchema).min(1),
282
+ patch: z.array(z.record(z.string(), z.unknown())).default([]),
283
+ patchYaml: z.string().max(200_000).optional(),
284
+ inputs: z.array(profileInputSchema).default([]),
285
+ verification: profileVerificationSchema.optional(),
286
+ contentHash: z.string().regex(/^sha256:[0-9a-f]{64}$/).optional(),
287
+ publishedAt: z.iso.datetime(),
288
+ })
289
+ .strict();
290
+ export const profileDraftSchema = z
291
+ .object({
292
+ schemaVersion: z.literal(1).default(1),
293
+ slug: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
294
+ name: z.string().min(1).max(120),
295
+ description: z.string().max(2_000).default(""),
296
+ visibility: z.enum(["public", "unlisted", "private"]).default("public"),
297
+ dsh: z.string().min(1).default("*"),
298
+ runtime: profileRuntimeSchema.optional(),
299
+ bundles: z.array(profileBundleSchema).min(1),
300
+ patch: z.array(z.record(z.string(), z.unknown())).default([]),
301
+ patchYaml: z.string().max(200_000).optional(),
302
+ inputs: z.array(profileInputSchema).default([]),
303
+ updatedAt: z.iso.datetime().optional(),
304
+ })
305
+ .strict();
306
+ export const hubProfileSchema = z
307
+ .object({
308
+ id: z.uuid(),
309
+ slug: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
310
+ packageName: npmPackageNameSchema.optional(),
311
+ repository: z.string().regex(/^[^/\s]+\/[^/\s]+$/).optional(),
312
+ owner: z.string().min(1),
313
+ claimed: z.boolean().default(false),
314
+ visibility: z.enum(["public", "unlisted", "private"]).default("public"),
315
+ latestVersion: exactSemverSchema,
316
+ versions: z.array(hubProfileVersionSchema).min(1),
317
+ createdAt: z.iso.datetime(),
318
+ updatedAt: z.iso.datetime(),
319
+ })
320
+ .strict();
321
+ export const profileCatalogItemSchema = z
322
+ .object({
323
+ id: z.uuid(),
324
+ slug: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
325
+ packageName: npmPackageNameSchema.optional(),
326
+ owner: z.string().min(1),
327
+ claimed: z.boolean().default(false),
328
+ latestVersion: exactSemverSchema,
329
+ name: z.string().min(1).max(120),
330
+ description: z.string().max(2_000),
331
+ bundleCount: z.number().int().nonnegative(),
332
+ updatedAt: z.iso.datetime(),
333
+ })
334
+ .strict();
335
+ export const profileSearchResponseSchema = z
336
+ .object({
337
+ items: z.array(profileCatalogItemSchema),
338
+ })
339
+ .strict();
340
+ export const registrySearchResponseSchema = z
341
+ .object({
342
+ items: z.array(pluginRecordSchema.omit({ versions: true })),
343
+ nextCursor: z.string().nullable(),
344
+ // Present only when the backend supports numbered pagination
345
+ // (page/sort params). Older backends omit it and the frontend falls back
346
+ // to cursor-only rendering.
347
+ total: z.number().int().nonnegative().optional(),
348
+ })
349
+ .strict();
350
+ //# sourceMappingURL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,CAAC,QAAQ,EAAE;IACjC,6DAA6D;IAC7D,yEAAyE;IACzE,4BAA4B;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CACjD,CAAC;KACD,MAAM,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@dsh-plugin-hub/schemas",
3
+ "version": "0.1.0",
4
+ "description": "Portable DSH bundle, profile, and Hub API schemas",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "dependencies": {
19
+ "zod": "4.4.3"
20
+ },
21
+ "devDependencies": {
22
+ "typescript": "5.9.3"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public",
26
+ "provenance": true
27
+ },
28
+ "license": "MIT",
29
+ "scripts": {
30
+ "build": "tsc -p tsconfig.json",
31
+ "typecheck": "tsc -p tsconfig.json --noEmit"
32
+ }
33
+ }