@modularcore/registry 0.2.0 → 0.5.1
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/build-registry.d.ts.map +1 -1
- package/dist/build-registry.js +37 -2
- package/dist/build-registry.js.map +1 -1
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -0
- package/dist/dependency-usage.d.ts +35 -0
- package/dist/dependency-usage.d.ts.map +1 -0
- package/dist/dependency-usage.js +67 -0
- package/dist/dependency-usage.js.map +1 -0
- package/dist/framework-catalog.d.ts +70 -0
- package/dist/framework-catalog.d.ts.map +1 -0
- package/dist/framework-catalog.js +143 -0
- package/dist/framework-catalog.js.map +1 -0
- package/dist/framework-files.d.ts +19 -0
- package/dist/framework-files.d.ts.map +1 -0
- package/dist/framework-files.js +73 -0
- package/dist/framework-files.js.map +1 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +35 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +0 -4
- package/dist/schema.js.map +1 -1
- package/dist/schema.zod.d.ts +87 -2
- package/dist/schema.zod.d.ts.map +1 -1
- package/dist/schema.zod.js +71 -2
- package/dist/schema.zod.js.map +1 -1
- package/dist/ui-coverage.d.ts +59 -0
- package/dist/ui-coverage.d.ts.map +1 -0
- package/dist/ui-coverage.js +143 -0
- package/dist/ui-coverage.js.map +1 -0
- package/package.json +11 -7
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACT,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG7F,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAgBhF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,6BAA6B,EAC7B,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { FrameworkDefinition } from './framework-catalog.js';
|
|
2
|
+
import type { UiCoverage } from './ui-coverage.js';
|
|
1
3
|
/**
|
|
2
4
|
* Descriptor types for a ModularCore registry component (`modularcore.json`).
|
|
3
5
|
* Runtime validation lives in `schema.zod.ts`; keep both in sync.
|
|
@@ -5,6 +7,15 @@
|
|
|
5
7
|
/** Extensible component kind. New kinds (e.g. `agent-tool`) can be added without breaking existing descriptors. */
|
|
6
8
|
export type ComponentType = 'frontend-component' | 'headless-core' | 'snippet' | (string & {});
|
|
7
9
|
export type SupportedFramework = 'react' | 'svelte' | (string & {});
|
|
10
|
+
export interface PreviewImage {
|
|
11
|
+
/**
|
|
12
|
+
* En el descriptor, la ruta dentro del paquete (`preview/media-picker.png`). En lo que sirve el
|
|
13
|
+
* registry, la URL ya servible: `buildRegistry` copia el fichero y reescribe este campo.
|
|
14
|
+
*/
|
|
15
|
+
image: string;
|
|
16
|
+
/** Texto alternativo. Obligatorio: la captura es contenido, no decoración. */
|
|
17
|
+
alt: string;
|
|
18
|
+
}
|
|
8
19
|
/** `internal` components are built and locally resolvable but excluded from the public `index.json`. */
|
|
9
20
|
export type Visibility = 'public' | 'internal';
|
|
10
21
|
export type FileEncoding = 'utf8' | 'base64';
|
|
@@ -29,6 +40,26 @@ export interface RegistryDescriptor {
|
|
|
29
40
|
type: ComponentType;
|
|
30
41
|
category: string;
|
|
31
42
|
frameworks: SupportedFramework[];
|
|
43
|
+
/**
|
|
44
|
+
* Cobertura de la UI de referencia por framework. `frameworks` dice dónde se puede instalar
|
|
45
|
+
* —núcleo y adaptador—; esto dice dónde hay además componentes de interfaz, y qué falta por
|
|
46
|
+
* adaptar. Ver `ui-coverage.ts`.
|
|
47
|
+
*/
|
|
48
|
+
ui?: Record<string, UiCoverage>;
|
|
49
|
+
/**
|
|
50
|
+
* Frameworks que este componente aporta al catálogo, para los que el registry no trae
|
|
51
|
+
* definición de casa. Permite traer un componente en Solid o Qwik sin tocar código nuestro.
|
|
52
|
+
*/
|
|
53
|
+
frameworkDefs?: Record<string, FrameworkDefinition>;
|
|
54
|
+
/**
|
|
55
|
+
* Una captura del componente en funcionamiento, para el catálogo y para quien revise la
|
|
56
|
+
* aportación: nadie puede ejecutar un componente de un framework que no tiene instalado, pero
|
|
57
|
+
* sí ver qué hace.
|
|
58
|
+
*
|
|
59
|
+
* No va en `files[]` a propósito: aquello es lo que la CLI copia al proyecto de quien instala,
|
|
60
|
+
* y una captura no pinta nada en su `src/`.
|
|
61
|
+
*/
|
|
62
|
+
preview?: PreviewImage;
|
|
32
63
|
visibility: Visibility;
|
|
33
64
|
/** Semver ranges keyed by peer framework, e.g. `{ "react": ">=18" }`. Gates `add` (Phase 3) before writing runes/hooks. */
|
|
34
65
|
peerDependencies: Record<string, string>;
|
|
@@ -53,6 +84,10 @@ export interface RegistryIndexEntry {
|
|
|
53
84
|
category: string;
|
|
54
85
|
version: string;
|
|
55
86
|
frameworks: SupportedFramework[];
|
|
87
|
+
/** Cobertura de la UI de referencia, para que el catálogo distinga «instalable» de «con UI». */
|
|
88
|
+
ui?: Record<string, UiCoverage>;
|
|
89
|
+
/** Captura del componente, con la URL ya servible que produce `buildRegistry`. */
|
|
90
|
+
preview?: PreviewImage;
|
|
56
91
|
description?: string;
|
|
57
92
|
}
|
|
58
93
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mHAAmH;AACnH,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG,eAAe,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE/F,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEpE,wGAAwG;AACxG,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE7C,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,mGAAmG;IACnG,IAAI,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,E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EAAE,CAAC;IAC/B,YAAY,EAAE,qBAAqB,EAAE,CAAC;IACtC,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,0FAA0F;AAC1F,MAAM,WAAW,uBAAwB,SAAQ,sBAAsB;IACrE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,4DAA4D;AAC5D,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACtE,KAAK,EAAE,uBAAuB,EAAE,CAAC;CAClC;AAED,qGAAqG;AACrG,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,gGAAgG;IAChG,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAChC,kFAAkF;IAClF,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/schema.js
CHANGED
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":""}
|
package/dist/schema.zod.d.ts
CHANGED
|
@@ -37,6 +37,34 @@ export declare const registryDescriptorSchema: z.ZodObject<{
|
|
|
37
37
|
}>, z.ZodString]>;
|
|
38
38
|
category: z.ZodString;
|
|
39
39
|
frameworks: z.ZodArray<z.ZodString>;
|
|
40
|
+
preview: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
image: z.ZodString;
|
|
42
|
+
alt: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
frameworkDefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
45
|
+
title: z.ZodString;
|
|
46
|
+
uiExtension: z.ZodOptional<z.ZodString>;
|
|
47
|
+
detect: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
49
|
+
composer: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
peer: z.ZodOptional<z.ZodString>;
|
|
52
|
+
paths: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
components: z.ZodString;
|
|
54
|
+
lib: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
basedOn: z.ZodOptional<z.ZodString>;
|
|
57
|
+
snippetDirectory: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
60
|
+
presentations: z.ZodArray<z.ZodEnum<{
|
|
61
|
+
vanilla: "vanilla";
|
|
62
|
+
headless: "headless";
|
|
63
|
+
tailwind: "tailwind";
|
|
64
|
+
shadcn: "shadcn";
|
|
65
|
+
}>>;
|
|
66
|
+
missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
+
}, z.core.$strip>>>;
|
|
40
68
|
visibility: z.ZodDefault<z.ZodEnum<{
|
|
41
69
|
public: "public";
|
|
42
70
|
internal: "internal";
|
|
@@ -73,21 +101,45 @@ export declare const registryFileWithContentSchema: z.ZodObject<{
|
|
|
73
101
|
content: z.ZodString;
|
|
74
102
|
}, z.core.$strip>;
|
|
75
103
|
export declare const registryEntrySchema: z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
76
105
|
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
77
106
|
"frontend-component": "frontend-component";
|
|
78
107
|
"headless-core": "headless-core";
|
|
79
108
|
snippet: "snippet";
|
|
80
109
|
}>, z.ZodString]>;
|
|
81
110
|
description: z.ZodOptional<z.ZodString>;
|
|
111
|
+
title: z.ZodString;
|
|
82
112
|
visibility: z.ZodDefault<z.ZodEnum<{
|
|
83
113
|
public: "public";
|
|
84
114
|
internal: "internal";
|
|
85
115
|
}>>;
|
|
86
|
-
name: z.ZodString;
|
|
87
116
|
version: z.ZodString;
|
|
88
|
-
title: z.ZodString;
|
|
89
117
|
category: z.ZodString;
|
|
90
118
|
frameworks: z.ZodArray<z.ZodString>;
|
|
119
|
+
frameworkDefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
120
|
+
title: z.ZodString;
|
|
121
|
+
uiExtension: z.ZodOptional<z.ZodString>;
|
|
122
|
+
detect: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
124
|
+
composer: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
peer: z.ZodOptional<z.ZodString>;
|
|
127
|
+
paths: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
components: z.ZodString;
|
|
129
|
+
lib: z.ZodString;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
basedOn: z.ZodOptional<z.ZodString>;
|
|
132
|
+
snippetDirectory: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$strip>>>;
|
|
134
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
135
|
+
presentations: z.ZodArray<z.ZodEnum<{
|
|
136
|
+
vanilla: "vanilla";
|
|
137
|
+
headless: "headless";
|
|
138
|
+
tailwind: "tailwind";
|
|
139
|
+
shadcn: "shadcn";
|
|
140
|
+
}>>;
|
|
141
|
+
missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
91
143
|
peerDependencies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
92
144
|
dependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
93
145
|
registryDependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -106,6 +158,10 @@ export declare const registryEntrySchema: z.ZodObject<{
|
|
|
106
158
|
}>;
|
|
107
159
|
content: z.ZodString;
|
|
108
160
|
}, z.core.$strip>>;
|
|
161
|
+
preview: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
image: z.ZodString;
|
|
163
|
+
alt: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>;
|
|
109
165
|
}, z.core.$strip>;
|
|
110
166
|
export declare const registryIndexEntrySchema: z.ZodObject<{
|
|
111
167
|
name: z.ZodString;
|
|
@@ -113,6 +169,35 @@ export declare const registryIndexEntrySchema: z.ZodObject<{
|
|
|
113
169
|
category: z.ZodString;
|
|
114
170
|
version: z.ZodString;
|
|
115
171
|
frameworks: z.ZodArray<z.ZodString>;
|
|
172
|
+
preview: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
image: z.ZodString;
|
|
174
|
+
alt: z.ZodString;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
177
|
+
presentations: z.ZodArray<z.ZodEnum<{
|
|
178
|
+
vanilla: "vanilla";
|
|
179
|
+
headless: "headless";
|
|
180
|
+
tailwind: "tailwind";
|
|
181
|
+
shadcn: "shadcn";
|
|
182
|
+
}>>;
|
|
183
|
+
missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
116
185
|
description: z.ZodOptional<z.ZodString>;
|
|
117
186
|
}, z.core.$strip>;
|
|
187
|
+
/** Catálogo de frameworks servido en `frameworks.json`, con las mismas reglas que el descriptor. */
|
|
188
|
+
export declare const frameworkCatalogSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
189
|
+
title: z.ZodString;
|
|
190
|
+
uiExtension: z.ZodOptional<z.ZodString>;
|
|
191
|
+
detect: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
193
|
+
composer: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
peer: z.ZodOptional<z.ZodString>;
|
|
196
|
+
paths: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
components: z.ZodString;
|
|
198
|
+
lib: z.ZodString;
|
|
199
|
+
}, z.core.$strip>>;
|
|
200
|
+
basedOn: z.ZodOptional<z.ZodString>;
|
|
201
|
+
snippetDirectory: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
118
203
|
//# sourceMappingURL=schema.zod.d.ts.map
|
package/dist/schema.zod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.zod.d.ts","sourceRoot":"","sources":["../src/schema.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;EAA6B,CAAC;AAE7D,eAAO,MAAM,kBAAkB;;;;;;;;iBAK7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;GAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.zod.d.ts","sourceRoot":"","sources":["../src/schema.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;EAA6B,CAAC;AAE7D,eAAO,MAAM,kBAAkB;;;;;;;;iBAK7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;GAAmD,CAAC;AAgCjF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCnC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEjF,eAAO,MAAM,6BAA6B;;;;;;;;;iBAExC,CAAC;AAkBH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK5B,CAAC;AAEL,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAiBnC,CAAC;AAEH,oGAAoG;AACpG,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;kBAAyD,CAAC"}
|
package/dist/schema.zod.js
CHANGED
|
@@ -35,6 +35,35 @@ export const componentTypeSchema = z.union([
|
|
|
35
35
|
z.string().min(1),
|
|
36
36
|
]);
|
|
37
37
|
export const visibilitySchema = z.enum(['public', 'internal']).default('public');
|
|
38
|
+
/**
|
|
39
|
+
* Las reglas de una definición de framework, compartidas por el descriptor y por el catálogo que
|
|
40
|
+
* el registry sirve. Tenerlas por duplicado dejaba el segundo mucho más laxo: aceptaba rutas
|
|
41
|
+
* vacías, y `init` acababa escribiendo `paths.components: ""`, con lo que todo `add` posterior
|
|
42
|
+
* remapeaba los ficheros a la raíz del proyecto.
|
|
43
|
+
*/
|
|
44
|
+
const frameworkDefinitionSchema = z.object({
|
|
45
|
+
title: z.string().min(1),
|
|
46
|
+
// Una extensión de verdad: uno o más tramos `.algo`, admitiendo dígitos y guiones
|
|
47
|
+
// (`.component.ts`, `.vue`). El patrón anterior aceptaba `..` y rechazaba `.mjs2`.
|
|
48
|
+
uiExtension: z
|
|
49
|
+
.string()
|
|
50
|
+
.regex(/^(?:\.[a-z0-9-]+)+$/i, {
|
|
51
|
+
message: 'uiExtension debe ser como ".tsx" o ".component.ts"',
|
|
52
|
+
})
|
|
53
|
+
.optional(),
|
|
54
|
+
// Con al menos una forma de reconocerlo: un `detect` vacío, o con cadenas vacías, no
|
|
55
|
+
// detecta nada y deja al framework inservible para `init`.
|
|
56
|
+
detect: z
|
|
57
|
+
.object({ npm: z.string().min(1).optional(), composer: z.string().min(1).optional() })
|
|
58
|
+
.refine((value) => value.npm !== undefined || value.composer !== undefined, {
|
|
59
|
+
message: 'detect debe declarar npm o composer',
|
|
60
|
+
})
|
|
61
|
+
.optional(),
|
|
62
|
+
peer: z.string().min(1).optional(),
|
|
63
|
+
paths: z.object({ components: z.string().min(1), lib: z.string().min(1) }).optional(),
|
|
64
|
+
basedOn: z.string().min(1).optional(),
|
|
65
|
+
snippetDirectory: z.string().min(1).optional(),
|
|
66
|
+
});
|
|
38
67
|
export const registryDescriptorSchema = z.object({
|
|
39
68
|
name: z
|
|
40
69
|
.string()
|
|
@@ -45,6 +74,19 @@ export const registryDescriptorSchema = z.object({
|
|
|
45
74
|
type: componentTypeSchema,
|
|
46
75
|
category: z.string().min(1),
|
|
47
76
|
frameworks: z.array(z.string().min(1)).min(1),
|
|
77
|
+
preview: z
|
|
78
|
+
.object({
|
|
79
|
+
image: safeRelativePathSchema,
|
|
80
|
+
alt: z.string().min(1),
|
|
81
|
+
})
|
|
82
|
+
.optional(),
|
|
83
|
+
frameworkDefs: z.record(z.string().min(1), frameworkDefinitionSchema).optional(),
|
|
84
|
+
ui: z
|
|
85
|
+
.record(z.string().min(1), z.object({
|
|
86
|
+
presentations: z.array(z.enum(['headless', 'tailwind', 'shadcn', 'vanilla'])),
|
|
87
|
+
missing: z.array(z.string().min(1)).optional(),
|
|
88
|
+
}))
|
|
89
|
+
.optional(),
|
|
48
90
|
visibility: visibilitySchema,
|
|
49
91
|
peerDependencies: z.record(z.string(), z.string()).default({}),
|
|
50
92
|
dependencies: z.array(z.string()).default([]),
|
|
@@ -56,15 +98,42 @@ export const registryDescriptorSchema = z.object({
|
|
|
56
98
|
export const registryFileWithContentSchema = registryFileSchema.extend({
|
|
57
99
|
content: z.string(),
|
|
58
100
|
});
|
|
101
|
+
/**
|
|
102
|
+
* `preview.image` tiene dos formas según dónde se lea, y por eso hay dos esquemas.
|
|
103
|
+
*
|
|
104
|
+
* En el descriptor es una ruta dentro del paquete (`preview/rating.png`), validada como cualquier
|
|
105
|
+
* otra ruta. En lo que sirve el registry es ya la URL servible, porque `buildRegistry` copia el
|
|
106
|
+
* fichero y reescribe el campo. Validar la segunda con las reglas de la primera rechazaba la
|
|
107
|
+
* salida del propio build: en cuanto un componente declarase una captura, el cliente del registry
|
|
108
|
+
* habría dejado de poder leer el índice entero.
|
|
109
|
+
*/
|
|
110
|
+
const servedPreviewSchema = z.object({
|
|
111
|
+
image: z.string().regex(/^\/registry\/[a-z0-9-]+\.(?:png|jpg|jpeg|webp)$/i, {
|
|
112
|
+
message: 'Served preview must be a /registry/{name}-preview.{ext} URL',
|
|
113
|
+
}),
|
|
114
|
+
alt: z.string().min(1),
|
|
115
|
+
});
|
|
59
116
|
export const registryEntrySchema = registryDescriptorSchema
|
|
60
|
-
.omit({ files: true })
|
|
61
|
-
.extend({
|
|
117
|
+
.omit({ files: true, preview: true })
|
|
118
|
+
.extend({
|
|
119
|
+
files: z.array(registryFileWithContentSchema).min(1),
|
|
120
|
+
preview: servedPreviewSchema.optional(),
|
|
121
|
+
});
|
|
62
122
|
export const registryIndexEntrySchema = z.object({
|
|
63
123
|
name: z.string(),
|
|
64
124
|
title: z.string(),
|
|
65
125
|
category: z.string(),
|
|
66
126
|
version: z.string(),
|
|
67
127
|
frameworks: z.array(z.string()),
|
|
128
|
+
preview: servedPreviewSchema.optional(),
|
|
129
|
+
ui: z
|
|
130
|
+
.record(z.string().min(1), z.object({
|
|
131
|
+
presentations: z.array(z.enum(['headless', 'tailwind', 'shadcn', 'vanilla'])),
|
|
132
|
+
missing: z.array(z.string().min(1)).optional(),
|
|
133
|
+
}))
|
|
134
|
+
.optional(),
|
|
68
135
|
description: z.string().optional(),
|
|
69
136
|
});
|
|
137
|
+
/** Catálogo de frameworks servido en `frameworks.json`, con las mismas reglas que el descriptor. */
|
|
138
|
+
export const frameworkCatalogSchema = z.record(z.string().min(1), frameworkDefinitionSchema);
|
|
70
139
|
//# sourceMappingURL=schema.zod.js.map
|
package/dist/schema.zod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.zod.js","sourceRoot":"","sources":["../src/schema.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,KAAa;IACvC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAClE,uCAAuC;IACvC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;IACnE,OAAO,EAAE,uEAAuE;CACjF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC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AAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { FrameworkDefinition } from './framework-catalog.js';
|
|
2
|
+
/**
|
|
3
|
+
* Cobertura de la UI de referencia por framework.
|
|
4
|
+
*
|
|
5
|
+
* Un componente puede instalarse en cualquier framework que declare en `frameworks` —eso sólo
|
|
6
|
+
* exige núcleo y adaptador—, pero la UI de referencia es otra cosa: se escribe una vez por
|
|
7
|
+
* framework y por presentación, y es justo donde el trabajo se queda a medias sin que nada lo
|
|
8
|
+
* note. Así se declaró `vue` durante meses sin un solo componente de interfaz.
|
|
9
|
+
*
|
|
10
|
+
* `ui` en el descriptor declara esa cobertura, y las brechas conocidas van escritas con nombre y
|
|
11
|
+
* apellido. La comprobación no exige paridad completa —un colaborador entrega los frameworks que
|
|
12
|
+
* puede y el mantenimiento completa el resto— sino que lo declarado sea exactamente lo que hay:
|
|
13
|
+
* una brecha nueva que nadie declare hace fallar la comprobación.
|
|
14
|
+
*/
|
|
15
|
+
/** Las cuatro presentaciones en las que se escribe cada componente de UI. */
|
|
16
|
+
export declare const PRESENTATIONS: readonly ["headless", "tailwind", "shadcn", "vanilla"];
|
|
17
|
+
export type Presentation = (typeof PRESENTATIONS)[number];
|
|
18
|
+
export interface UiCoverage {
|
|
19
|
+
/** Presentaciones que este framework cubre. Vacío: el framework no trae UI de referencia. */
|
|
20
|
+
presentations: Presentation[];
|
|
21
|
+
/**
|
|
22
|
+
* Componentes que otros frameworks sí tienen y este todavía no, por nombre. Es deuda del
|
|
23
|
+
* mantenimiento, no un rechazo al colaborador que aportó el resto.
|
|
24
|
+
*/
|
|
25
|
+
missing?: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface DescribedFile {
|
|
28
|
+
path: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ComponentLocation {
|
|
31
|
+
framework: string;
|
|
32
|
+
presentation: Presentation;
|
|
33
|
+
component: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Sitúa un fichero de UI en el eje framework × presentación × componente, o devuelve `null` si no
|
|
37
|
+
* es UI de referencia (el núcleo, una hoja de estilos suelta, un snippet).
|
|
38
|
+
*
|
|
39
|
+
* `ui/<framework>/<Componente>` es la presentación headless; `ui/<framework>/<presentación>/…` es
|
|
40
|
+
* cada una de las otras tres.
|
|
41
|
+
*/
|
|
42
|
+
export declare function locateUiFile(path: string, catalog?: Record<string, FrameworkDefinition>): ComponentLocation | null;
|
|
43
|
+
export type ActualCoverage = Map<string, Map<Presentation, Set<string>>>;
|
|
44
|
+
/** Cobertura real que se desprende de los ficheros que el descriptor enumera. */
|
|
45
|
+
export declare function readActualCoverage(files: DescribedFile[], catalog?: Record<string, FrameworkDefinition>): ActualCoverage;
|
|
46
|
+
export interface CoverageMismatch {
|
|
47
|
+
framework: string;
|
|
48
|
+
problem: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Compara lo declarado en `ui` con lo que hay, y describe cada discrepancia en una línea legible.
|
|
52
|
+
*
|
|
53
|
+
* Un componente presente sólo en la presentación headless de *todos* los frameworks —los de
|
|
54
|
+
* apoyo, como `ModernSelect`— no cuenta como brecha: la comparación se hace presentación a
|
|
55
|
+
* presentación, así que sólo salta cuando un framework se queda atrás respecto de otro en la
|
|
56
|
+
* misma presentación.
|
|
57
|
+
*/
|
|
58
|
+
export declare function findCoverageMismatches(declared: Record<string, UiCoverage>, files: DescribedFile[], frameworks: string[], catalog?: Record<string, FrameworkDefinition>): CoverageMismatch[];
|
|
59
|
+
//# sourceMappingURL=ui-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-coverage.d.ts","sourceRoot":"","sources":["../src/ui-coverage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;;;;;;;GAYG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,aAAa,wDAAyD,CAAC;AAEpF,MAAM,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**
|
|
3
|
+
* Cobertura de la UI de referencia por framework.
|
|
4
|
+
*
|
|
5
|
+
* Un componente puede instalarse en cualquier framework que declare en `frameworks` —eso sólo
|
|
6
|
+
* exige núcleo y adaptador—, pero la UI de referencia es otra cosa: se escribe una vez por
|
|
7
|
+
* framework y por presentación, y es justo donde el trabajo se queda a medias sin que nada lo
|
|
8
|
+
* note. Así se declaró `vue` durante meses sin un solo componente de interfaz.
|
|
9
|
+
*
|
|
10
|
+
* `ui` en el descriptor declara esa cobertura, y las brechas conocidas van escritas con nombre y
|
|
11
|
+
* apellido. La comprobación no exige paridad completa —un colaborador entrega los frameworks que
|
|
12
|
+
* puede y el mantenimiento completa el resto— sino que lo declarado sea exactamente lo que hay:
|
|
13
|
+
* una brecha nueva que nadie declare hace fallar la comprobación.
|
|
14
|
+
*/
|
|
15
|
+
/** Las cuatro presentaciones en las que se escribe cada componente de UI. */
|
|
16
|
+
export const PRESENTATIONS = ['headless', 'tailwind', 'shadcn', 'vanilla'];
|
|
17
|
+
/** Extensiones de la UI de referencia, tomadas del catálogo: un framework aportado trae la suya. */
|
|
18
|
+
function uiExtensionsOf(catalog) {
|
|
19
|
+
const extensions = {};
|
|
20
|
+
for (const [name, definition] of Object.entries(catalog)) {
|
|
21
|
+
if (definition.uiExtension)
|
|
22
|
+
extensions[name] = definition.uiExtension;
|
|
23
|
+
}
|
|
24
|
+
return extensions;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sitúa un fichero de UI en el eje framework × presentación × componente, o devuelve `null` si no
|
|
28
|
+
* es UI de referencia (el núcleo, una hoja de estilos suelta, un snippet).
|
|
29
|
+
*
|
|
30
|
+
* `ui/<framework>/<Componente>` es la presentación headless; `ui/<framework>/<presentación>/…` es
|
|
31
|
+
* cada una de las otras tres.
|
|
32
|
+
*/
|
|
33
|
+
export function locateUiFile(path, catalog = BUILTIN_FRAMEWORKS) {
|
|
34
|
+
const segments = path.split('/');
|
|
35
|
+
if (segments[0] !== 'ui' || segments.length < 3)
|
|
36
|
+
return null;
|
|
37
|
+
const framework = segments[1];
|
|
38
|
+
const extensions = uiExtensionsOf(catalog);
|
|
39
|
+
if (!framework || !(framework in extensions))
|
|
40
|
+
return null;
|
|
41
|
+
const extension = extensions[framework];
|
|
42
|
+
const last = segments[segments.length - 1];
|
|
43
|
+
if (!last.endsWith(extension))
|
|
44
|
+
return null;
|
|
45
|
+
const component = last.slice(0, -extension.length);
|
|
46
|
+
if (segments.length === 3)
|
|
47
|
+
return { framework, presentation: 'headless', component };
|
|
48
|
+
const presentation = segments[2];
|
|
49
|
+
if (!PRESENTATIONS.includes(presentation))
|
|
50
|
+
return null;
|
|
51
|
+
return { framework, presentation: presentation, component };
|
|
52
|
+
}
|
|
53
|
+
/** Cobertura real que se desprende de los ficheros que el descriptor enumera. */
|
|
54
|
+
export function readActualCoverage(files, catalog = BUILTIN_FRAMEWORKS) {
|
|
55
|
+
const coverage = new Map();
|
|
56
|
+
for (const file of files) {
|
|
57
|
+
const located = locateUiFile(file.path, catalog);
|
|
58
|
+
if (!located)
|
|
59
|
+
continue;
|
|
60
|
+
const byPresentation = coverage.get(located.framework) ?? new Map();
|
|
61
|
+
const components = byPresentation.get(located.presentation) ?? new Set();
|
|
62
|
+
components.add(located.component);
|
|
63
|
+
byPresentation.set(located.presentation, components);
|
|
64
|
+
coverage.set(located.framework, byPresentation);
|
|
65
|
+
}
|
|
66
|
+
return coverage;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Compara lo declarado en `ui` con lo que hay, y describe cada discrepancia en una línea legible.
|
|
70
|
+
*
|
|
71
|
+
* Un componente presente sólo en la presentación headless de *todos* los frameworks —los de
|
|
72
|
+
* apoyo, como `ModernSelect`— no cuenta como brecha: la comparación se hace presentación a
|
|
73
|
+
* presentación, así que sólo salta cuando un framework se queda atrás respecto de otro en la
|
|
74
|
+
* misma presentación.
|
|
75
|
+
*/
|
|
76
|
+
export function findCoverageMismatches(declared, files, frameworks, catalog = BUILTIN_FRAMEWORKS) {
|
|
77
|
+
const actual = readActualCoverage(files, catalog);
|
|
78
|
+
const extensions = uiExtensionsOf(catalog);
|
|
79
|
+
const mismatches = [];
|
|
80
|
+
for (const framework of frameworks) {
|
|
81
|
+
if (!extensions[framework])
|
|
82
|
+
continue; // blade y vanilla se sirven con snippets, no con UI.
|
|
83
|
+
if (!declared[framework]) {
|
|
84
|
+
mismatches.push({
|
|
85
|
+
framework,
|
|
86
|
+
problem: `declarado en "frameworks" pero ausente de "ui": di qué cobertura tiene, aunque sea ninguna`,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Un framework con ficheros de UI y sin entrada en `ui` no lo veía ninguna de las
|
|
91
|
+
// comprobaciones siguientes, que recorren lo declarado: la brecha se colaba justo por donde este
|
|
92
|
+
// módulo promete no dejar pasar ninguna. Y esos ficheros no se instalan en ningún sitio, porque
|
|
93
|
+
// ningún proyecto puede declarar un framework que el componente no soporta.
|
|
94
|
+
for (const framework of actual.keys()) {
|
|
95
|
+
if (declared[framework])
|
|
96
|
+
continue;
|
|
97
|
+
mismatches.push({
|
|
98
|
+
framework,
|
|
99
|
+
problem: `hay ficheros en ui/${framework}/ y el descriptor no lo declara ni en "frameworks" ni en "ui": nadie los instalaría`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
for (const [framework, coverage] of Object.entries(declared)) {
|
|
103
|
+
const byPresentation = actual.get(framework) ?? new Map();
|
|
104
|
+
const present = PRESENTATIONS.filter((p) => (byPresentation.get(p)?.size ?? 0) > 0);
|
|
105
|
+
const declaredPresentations = [...coverage.presentations].sort();
|
|
106
|
+
if (JSON.stringify(present.slice().sort()) !== JSON.stringify(declaredPresentations)) {
|
|
107
|
+
mismatches.push({
|
|
108
|
+
framework,
|
|
109
|
+
problem: `declara las presentaciones [${declaredPresentations.join(', ')}] y en el paquete hay [${present.join(', ')}]`,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// Una brecha es un componente que otro framework sí tiene en esa misma presentación.
|
|
114
|
+
for (const [framework, coverage] of Object.entries(declared)) {
|
|
115
|
+
if (coverage.presentations.length === 0)
|
|
116
|
+
continue;
|
|
117
|
+
const byPresentation = actual.get(framework) ?? new Map();
|
|
118
|
+
const gaps = new Set();
|
|
119
|
+
for (const presentation of coverage.presentations) {
|
|
120
|
+
const mine = byPresentation.get(presentation) ?? new Set();
|
|
121
|
+
for (const [other, otherCoverage] of actual) {
|
|
122
|
+
if (other === framework)
|
|
123
|
+
continue;
|
|
124
|
+
if (!declared[other]?.presentations.includes(presentation))
|
|
125
|
+
continue;
|
|
126
|
+
for (const component of otherCoverage.get(presentation) ?? []) {
|
|
127
|
+
if (!mine.has(component))
|
|
128
|
+
gaps.add(component);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const declaredMissing = [...(coverage.missing ?? [])].sort();
|
|
133
|
+
const actualMissing = [...gaps].sort();
|
|
134
|
+
if (JSON.stringify(declaredMissing) !== JSON.stringify(actualMissing)) {
|
|
135
|
+
mismatches.push({
|
|
136
|
+
framework,
|
|
137
|
+
problem: `declara que le faltan [${declaredMissing.join(', ') || '—'}] y en realidad le faltan [${actualMissing.join(', ') || '—'}]`,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return mismatches;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=ui-coverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-coverage.js","sourceRoot":"","sources":["../src/ui-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAI5D;;;;;;;;;;;;GAYG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAcpF,oGAAoG;AACpG,SAAS,cAAc,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,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;YACtE,UAAU,CAAC,IAAI,CAAC;gBACd,SAAS;gBACT,OAAO,EAAE,0BAA0B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,8BAA8B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG;aACrI,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modularcore/registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,11 +12,20 @@
|
|
|
12
12
|
".": {
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./client": {
|
|
17
|
+
"types": "./dist/client.d.ts",
|
|
18
|
+
"default": "./dist/client.js"
|
|
15
19
|
}
|
|
16
20
|
},
|
|
17
21
|
"files": [
|
|
18
22
|
"dist"
|
|
19
23
|
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc -p tsconfig.json",
|
|
26
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
27
|
+
"test": "vitest run"
|
|
28
|
+
},
|
|
20
29
|
"dependencies": {
|
|
21
30
|
"tar-stream": "^3.2.0",
|
|
22
31
|
"zod": "^4.4.3"
|
|
@@ -24,10 +33,5 @@
|
|
|
24
33
|
"devDependencies": {
|
|
25
34
|
"@types/node": "^22.13.0",
|
|
26
35
|
"@types/tar-stream": "^3.1.4"
|
|
27
|
-
},
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "tsc -p tsconfig.json",
|
|
30
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
31
|
-
"test": "vitest run"
|
|
32
36
|
}
|
|
33
|
-
}
|
|
37
|
+
}
|