@glass-ui-kit/cli 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +30 -3
  2. package/package.json +7 -4
package/dist/index.js CHANGED
@@ -185,9 +185,36 @@ import path4 from "path";
185
185
  import path3 from "path";
186
186
  import os from "os";
187
187
  import fs from "fs/promises";
188
- import {
189
- registryIndexSchema
190
- } from "@glass-ui-kit/schema";
188
+
189
+ // ../schema/dist/registry.js
190
+ import { z } from "zod";
191
+ var registryTypeSchema = z.enum([
192
+ "registry:ui",
193
+ "registry:lib",
194
+ "registry:hook",
195
+ "registry:theme"
196
+ ]);
197
+ var registryItemSchema = z.object({
198
+ name: z.string(),
199
+ type: registryTypeSchema,
200
+ dependencies: z.array(z.string()).optional(),
201
+ devDependencies: z.array(z.string()).optional(),
202
+ registryDependencies: z.array(z.string()).optional(),
203
+ files: z.array(z.object({
204
+ path: z.string(),
205
+ content: z.string().optional(),
206
+ // Se rellena en build-time
207
+ type: z.enum(["client", "server"]).default("client")
208
+ // Future-proofing para RSC
209
+ })),
210
+ meta: z.object({
211
+ // Metadatos específicos para Glass UI (ej. si requiere backdrop-filter específico)
212
+ requiresBlur: z.boolean().default(true)
213
+ }).optional()
214
+ });
215
+ var registryIndexSchema = z.array(registryItemSchema);
216
+
217
+ // src/utils/registry.ts
191
218
  var DEFAULT_REGISTRY_URL = "https://ui-glass.vercel.app/registry.json";
192
219
  var CACHE_DIR = path3.join(os.homedir(), ".glass-ui");
193
220
  var CACHE_FILE = path3.join(CACHE_DIR, "registry.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glass-ui-kit/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The official CLI for Glass UI. Add glassmorphism components to your React projects in seconds.",
5
5
  "keywords": [
6
6
  "glassmorphism",
@@ -29,19 +29,22 @@
29
29
  "dist",
30
30
  "README.md"
31
31
  ],
32
+ "engines": {
33
+ "node": ">=18.0.0"
34
+ },
32
35
  "dependencies": {
33
36
  "chalk": "^5.3.0",
34
37
  "commander": "^11.1.0",
35
38
  "node-fetch": "^3.3.2",
36
- "zod": "^3.22.4",
37
- "@glass-ui-kit/schema": "0.0.1"
39
+ "zod": "^3.22.4"
38
40
  },
39
41
  "devDependencies": {
40
42
  "@types/node": "^20.11.0",
41
43
  "bun-types": "latest",
42
44
  "tsup": "^8.0.1",
43
45
  "typescript": "^5.3.3",
44
- "@glass-ui-kit/tsconfig": "0.0.1"
46
+ "@glass-ui-kit/tsconfig": "0.0.1",
47
+ "@glass-ui-kit/schema": "0.0.1"
45
48
  },
46
49
  "publishConfig": {
47
50
  "access": "public"