pittaya 0.0.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/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Pittaya CLI
2
+
3
+ CLI to add Pittaya UI components to your project.
4
+
5
+ See the [full documentation](https://github.com/pittaya-ui/cli#readme) for more information.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx pittaya@latest init
11
+ npx pittaya@latest add button
12
+ ```
13
+
14
+ ### Local Setup
15
+
16
+ ```bash
17
+ # 1. Clone the repository
18
+ git clone git@github.com:pittaya-ui/cli.git
19
+ cd cli
20
+
21
+ # 2. Install dependencies
22
+ npm install
23
+
24
+ # 3. Build the CLI
25
+ cd packages/cli
26
+ npm run build
27
+
28
+ # 4. Link to test
29
+ npm link
30
+
31
+ # 5. Test in another project
32
+ cd /path/to/test-project
33
+ pittaya init
34
+ pittaya add button
35
+ ```
36
+
37
+ ## Links
38
+
39
+ - [Documentation](https://pittaya-ui.vercel.app)
40
+ - [GitHub](https://github.com/pittaya-ui/cli)
41
+
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,383 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { Command } from "commander";
5
+
6
+ // src/commands/add.ts
7
+ import chalk from "chalk";
8
+ import ora from "ora";
9
+ import prompts from "prompts";
10
+ import path from "path";
11
+ import fs2 from "fs/promises";
12
+ import { execa } from "execa";
13
+
14
+ // src/utils/registry.ts
15
+ import fetch from "node-fetch";
16
+ var REGISTRY_BASE_URL = "https://raw.githubusercontent.com/pittaya-ui/cli/main/registry";
17
+ async function fetchRegistry() {
18
+ try {
19
+ const response = await fetch(`${REGISTRY_BASE_URL}/index.json`);
20
+ if (!response.ok) {
21
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
22
+ }
23
+ return await response.json();
24
+ } catch (error) {
25
+ console.error("Error fetching registry:", error);
26
+ throw new Error("Unable to load the registry of components");
27
+ }
28
+ }
29
+ async function getRegistryComponent(name) {
30
+ try {
31
+ const response = await fetch(
32
+ `${REGISTRY_BASE_URL}/components/${name}.json`
33
+ );
34
+ if (!response.ok) {
35
+ throw new Error(`Component "${name}" not found in registry`);
36
+ }
37
+ return await response.json();
38
+ } catch (error) {
39
+ throw new Error(`Error loading component "${name}": ${error.message}`);
40
+ }
41
+ }
42
+
43
+ // src/utils/transformer.ts
44
+ function transformImports(content, config) {
45
+ let transformed = content;
46
+ const aliasMap = {
47
+ "@/components/ui": config.aliases.ui,
48
+ "@/components": config.aliases.components,
49
+ "@/lib/utils": config.aliases.utils,
50
+ "@/lib": config.aliases.lib,
51
+ "@/hooks": config.aliases.hooks
52
+ };
53
+ const sortedAliases = Object.entries(aliasMap).sort(
54
+ ([a], [b]) => b.length - a.length
55
+ );
56
+ for (const [from, to] of sortedAliases) {
57
+ if (from !== to) {
58
+ transformed = transformed.replace(
59
+ new RegExp(`from ["']${escapeRegex(from)}`, "g"),
60
+ `from "${to}`
61
+ );
62
+ transformed = transformed.replace(
63
+ new RegExp(`import ["']${escapeRegex(from)}`, "g"),
64
+ `import "${to}`
65
+ );
66
+ }
67
+ }
68
+ return transformed;
69
+ }
70
+ function escapeRegex(str) {
71
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
72
+ }
73
+
74
+ // src/utils/package-manager.ts
75
+ import fs from "fs/promises";
76
+ async function detectPackageManager() {
77
+ try {
78
+ await fs.access("pnpm-lock.yaml");
79
+ return "pnpm";
80
+ } catch {
81
+ }
82
+ try {
83
+ await fs.access("yarn.lock");
84
+ return "yarn";
85
+ } catch {
86
+ }
87
+ try {
88
+ await fs.access("bun.lockb");
89
+ return "bun";
90
+ } catch {
91
+ }
92
+ return "npm";
93
+ }
94
+
95
+ // src/commands/add.ts
96
+ async function add(components, options) {
97
+ const cwd = process.cwd();
98
+ const componentsJsonPath = path.join(cwd, "components.json");
99
+ let config;
100
+ try {
101
+ const configContent = await fs2.readFile(componentsJsonPath, "utf-8");
102
+ config = JSON.parse(configContent);
103
+ } catch (error) {
104
+ console.log(chalk.red("\n\u274C components.json not found.\n"));
105
+ console.log(
106
+ chalk.dim(`Run ${chalk.bold("npx pittaya init")} first.
107
+ `)
108
+ );
109
+ return;
110
+ }
111
+ const spinner = ora("Fetching available components...").start();
112
+ let registry;
113
+ try {
114
+ registry = await fetchRegistry();
115
+ spinner.succeed("Registry loaded!");
116
+ } catch (error) {
117
+ spinner.fail("Error loading registry");
118
+ console.error(error);
119
+ return;
120
+ }
121
+ if (options.all) {
122
+ components = registry.components.filter((comp) => comp.type === "registry:ui").map((comp) => comp.name);
123
+ }
124
+ if (components.length === 0) {
125
+ const availableComponents = registry.components.filter((comp) => comp.type === "registry:ui").map((comp) => ({
126
+ title: `${comp.name}${comp.description ? ` - ${comp.description}` : ""}`,
127
+ value: comp.name
128
+ }));
129
+ const { selected } = await prompts({
130
+ type: "multiselect",
131
+ name: "selected",
132
+ message: "Select components to add:",
133
+ choices: availableComponents,
134
+ min: 1
135
+ });
136
+ if (!selected || selected.length === 0) {
137
+ console.log(chalk.yellow("\n\u274C No components selected.\n"));
138
+ return;
139
+ }
140
+ components = selected;
141
+ }
142
+ console.log(
143
+ chalk.dim(`
144
+ Adding ${components.length} component(s)...
145
+ `)
146
+ );
147
+ for (const componentName of components) {
148
+ await addComponent(componentName, config, options);
149
+ }
150
+ console.log(chalk.green("\n\u2705 Components added successfully!\n"));
151
+ }
152
+ async function addComponent(name, config, options) {
153
+ const spinner = ora(`Installing ${chalk.bold(name)}...`).start();
154
+ try {
155
+ const component = await getRegistryComponent(name);
156
+ if (!component) {
157
+ spinner.fail(`Component "${name}" not found in registry.`);
158
+ return;
159
+ }
160
+ const packageManager = await detectPackageManager();
161
+ if (component.dependencies && component.dependencies.length > 0) {
162
+ spinner.text = `Installing dependencies for ${name}...`;
163
+ await execa(packageManager, [
164
+ packageManager === "yarn" ? "add" : "install",
165
+ ...component.dependencies
166
+ ]);
167
+ }
168
+ if (component.registryDependencies && component.registryDependencies.length > 0) {
169
+ for (const dep of component.registryDependencies) {
170
+ spinner.text = `Installing dependency ${dep}...`;
171
+ await addComponent(dep, config, { ...options, yes: true });
172
+ }
173
+ }
174
+ for (const file of component.files) {
175
+ const targetPath = resolveTargetPath(file.name, component.type, config);
176
+ const filePath = path.join(process.cwd(), targetPath);
177
+ const exists = await fs2.access(filePath).then(() => true).catch(() => false);
178
+ if (exists && !options.overwrite && !options.yes) {
179
+ spinner.stop();
180
+ const { overwrite } = await prompts({
181
+ type: "confirm",
182
+ name: "overwrite",
183
+ message: `${targetPath} already exists. Overwrite?`,
184
+ initial: false
185
+ });
186
+ if (!overwrite) {
187
+ spinner.warn(`Skipping ${targetPath}`);
188
+ continue;
189
+ }
190
+ spinner.start();
191
+ }
192
+ await fs2.mkdir(path.dirname(filePath), { recursive: true });
193
+ const content = transformImports(file.content, config);
194
+ await fs2.writeFile(filePath, content, "utf-8");
195
+ }
196
+ spinner.succeed(`${chalk.bold(name)} installed successfully!`);
197
+ } catch (error) {
198
+ spinner.fail(`Error installing ${name}`);
199
+ console.error(error);
200
+ }
201
+ }
202
+ function resolveTargetPath(fileName, type, config) {
203
+ if (type === "registry:ui") {
204
+ return path.join(
205
+ config.aliases.ui.replace("@/", "src/"),
206
+ fileName
207
+ );
208
+ }
209
+ if (type === "registry:lib") {
210
+ return path.join(
211
+ config.aliases.lib.replace("@/", "src/"),
212
+ fileName
213
+ );
214
+ }
215
+ if (type === "registry:hook") {
216
+ return path.join(
217
+ config.aliases.hooks.replace("@/", "src/"),
218
+ fileName
219
+ );
220
+ }
221
+ return fileName;
222
+ }
223
+
224
+ // src/commands/init.ts
225
+ import chalk2 from "chalk";
226
+ import ora2 from "ora";
227
+ import prompts2 from "prompts";
228
+ import path2 from "path";
229
+ import fs3 from "fs/promises";
230
+ import { execa as execa2 } from "execa";
231
+ async function init(options) {
232
+ console.log(chalk2.bold("\nWelcome to Pittaya UI!\n"));
233
+ const cwd = process.cwd();
234
+ const componentsJsonPath = path2.join(cwd, "components.json");
235
+ const exists = await fs3.access(componentsJsonPath).then(() => true).catch(() => false);
236
+ if (exists && !options.yes) {
237
+ const { overwrite } = await prompts2({
238
+ type: "confirm",
239
+ name: "overwrite",
240
+ message: "components.json already exists. Do you want to overwrite it?",
241
+ initial: false
242
+ });
243
+ if (!overwrite) {
244
+ console.log(chalk2.yellow("\n\u274C Operation cancelled.\n"));
245
+ return;
246
+ }
247
+ }
248
+ const config = options.yes ? getDefaultConfig() : await prompts2([
249
+ {
250
+ type: "select",
251
+ name: "style",
252
+ message: "Which style would you like to use?",
253
+ choices: [
254
+ { title: "New York", value: "new-york" },
255
+ { title: "Default", value: "default" },
256
+ { title: "Recife", value: "recife" }
257
+ ]
258
+ },
259
+ {
260
+ type: "text",
261
+ name: "tailwindCss",
262
+ message: "Where is your globals.css file?",
263
+ initial: "src/app/globals.css"
264
+ },
265
+ {
266
+ type: "confirm",
267
+ name: "rsc",
268
+ message: "Use React Server Components?",
269
+ initial: true
270
+ },
271
+ {
272
+ type: "text",
273
+ name: "componentsPath",
274
+ message: "Path for components?",
275
+ initial: "@/components"
276
+ },
277
+ {
278
+ type: "text",
279
+ name: "utilsPath",
280
+ message: "Path for utils?",
281
+ initial: "@/lib/utils"
282
+ }
283
+ ]);
284
+ if (!config.style && !options.yes) {
285
+ console.log(chalk2.yellow("\n\u274C Operation cancelled.\n"));
286
+ return;
287
+ }
288
+ const componentsJson = {
289
+ $schema: "https://raw.githubusercontent.com/pittaya-ui/cli/main/registry/schema.json",
290
+ style: config.style || "new-york",
291
+ rsc: config.rsc ?? true,
292
+ tsx: true,
293
+ tailwind: {
294
+ config: "tailwind.config.ts",
295
+ css: config.tailwindCss || "src/app/globals.css",
296
+ baseColor: "neutral",
297
+ cssVariables: true,
298
+ prefix: ""
299
+ },
300
+ aliases: {
301
+ components: config.componentsPath || "@/components",
302
+ utils: config.utilsPath || "@/lib/utils",
303
+ ui: `${config.componentsPath || "@/components"}/ui`,
304
+ lib: "@/lib",
305
+ hooks: "@/hooks"
306
+ },
307
+ iconLibrary: "lucide"
308
+ };
309
+ const spinner = ora2("Creating components.json...").start();
310
+ await fs3.writeFile(
311
+ componentsJsonPath,
312
+ JSON.stringify(componentsJson, null, 2)
313
+ );
314
+ spinner.succeed("components.json created successfully!");
315
+ const packageManager = await detectPackageManager2();
316
+ const depsSpinner = ora2("Installing base dependencies...").start();
317
+ try {
318
+ await execa2(packageManager, [
319
+ packageManager === "yarn" ? "add" : "install",
320
+ "class-variance-authority",
321
+ "clsx",
322
+ "tailwind-merge"
323
+ ]);
324
+ depsSpinner.succeed("Dependencies installed!");
325
+ } catch (error) {
326
+ depsSpinner.fail("Error installing dependencies");
327
+ console.error(error);
328
+ }
329
+ console.log(chalk2.green("\n\u2705 Pittaya UI configured successfully!\n"));
330
+ console.log(chalk2.dim("Next steps:"));
331
+ console.log(
332
+ chalk2.dim(
333
+ ` ${chalk2.bold("npx pittaya add button")} - Add a component`
334
+ )
335
+ );
336
+ console.log(
337
+ chalk2.dim(
338
+ ` ${chalk2.bold("npx pittaya add --all")} - Add all components
339
+ `
340
+ )
341
+ );
342
+ }
343
+ function getDefaultConfig() {
344
+ return {
345
+ style: "new-york",
346
+ tailwindCss: "src/app/globals.css",
347
+ rsc: true,
348
+ componentsPath: "@/components",
349
+ utilsPath: "@/lib/utils"
350
+ };
351
+ }
352
+ async function detectPackageManager2() {
353
+ try {
354
+ await fs3.access("pnpm-lock.yaml");
355
+ return "pnpm";
356
+ } catch {
357
+ }
358
+ try {
359
+ await fs3.access("yarn.lock");
360
+ return "yarn";
361
+ } catch {
362
+ }
363
+ return "npm";
364
+ }
365
+
366
+ // src/commands/credits.ts
367
+ import chalk3 from "chalk";
368
+ async function credits() {
369
+ console.log(chalk3.bold("\nPittaya UI - Creators\n"));
370
+ console.log(chalk3.cyan(" \u2022 Marcos Bueno"));
371
+ console.log(chalk3.cyan(" \u2022 Lucas Ribeiro"));
372
+ console.log(chalk3.cyan(" \u2022 Jarbas Gouveia"));
373
+ console.log(chalk3.dim("\n Thank you for using Pittaya UI! \u2764\uFE0F\n"));
374
+ }
375
+
376
+ // src/index.ts
377
+ var program = new Command();
378
+ program.name("pittaya").description("Add Pittaya UI components to your project").version("0.0.1");
379
+ program.command("init").description("Initialize Pittaya UI in your project").option("-y, --yes", "Skip confirmations and use default values").action(init);
380
+ program.command("add").description("Add a component to your project").argument("[components...]", "Component names to add").option("-y, --yes", "Skip confirmations and overwrite existing files").option("-o, --overwrite", "Overwrite existing files").option("-a, --all", "Add all available components").action(add);
381
+ program.command("credits").description("Show Pittaya UI creators").action(credits);
382
+ program.parse();
383
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/commands/add.ts","../src/utils/registry.ts","../src/utils/transformer.ts","../src/utils/package-manager.ts","../src/commands/init.ts","../src/commands/credits.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport { add } from \"./commands/add.js\";\nimport { init } from \"./commands/init.js\";\nimport { credits } from \"./commands/credits.js\";\n\nconst program = new Command();\n\nprogram\n .name(\"pittaya\")\n .description(\"Add Pittaya UI components to your project\")\n .version(\"0.0.1\");\n\nprogram\n .command(\"init\")\n .description(\"Initialize Pittaya UI in your project\")\n .option(\"-y, --yes\", \"Skip confirmations and use default values\")\n .action(init);\n\nprogram\n .command(\"add\")\n .description(\"Add a component to your project\")\n .argument(\"[components...]\", \"Component names to add\")\n .option(\"-y, --yes\", \"Skip confirmations and overwrite existing files\")\n .option(\"-o, --overwrite\", \"Overwrite existing files\")\n .option(\"-a, --all\", \"Add all available components\")\n .action(add);\n\nprogram\n .command(\"credits\")\n .description(\"Show Pittaya UI creators\")\n .action(credits);\n\nprogram.parse();\n\n","import chalk from \"chalk\";\nimport ora from \"ora\";\nimport prompts from \"prompts\";\nimport path from \"path\";\nimport fs from \"fs/promises\";\nimport { execa } from \"execa\";\nimport { fetchRegistry, getRegistryComponent } from \"../utils/registry.js\";\nimport { transformImports } from \"../utils/transformer.js\";\nimport { detectPackageManager } from \"../utils/package-manager.js\";\nimport { IAddOptions } from \"../interfaces/IAddOptions\";\nimport { IConfig } from \"../interfaces/IConfig\";\nimport { IRegistryComponent } from \"../interfaces/IRegistryComponent\";\n\nexport async function add(components: string[], options: IAddOptions) {\n const cwd = process.cwd();\n const componentsJsonPath = path.join(cwd, \"components.json\");\n\n let config: IConfig;\n try {\n const configContent = await fs.readFile(componentsJsonPath, \"utf-8\");\n config = JSON.parse(configContent);\n } catch (error) {\n console.log(chalk.red(\"\\n❌ components.json not found.\\n\"));\n console.log(\n chalk.dim(`Run ${chalk.bold(\"npx pittaya init\")} first.\\n`)\n );\n return;\n }\n\n const spinner = ora(\"Fetching available components...\").start();\n let registry;\n try {\n registry = await fetchRegistry();\n spinner.succeed(\"Registry loaded!\");\n } catch (error) {\n spinner.fail(\"Error loading registry\");\n console.error(error);\n return;\n }\n\n if (options.all) {\n components = registry.components\n .filter((comp: any) => comp.type === \"registry:ui\")\n .map((comp: any) => comp.name);\n }\n\n if (components.length === 0) {\n const availableComponents = registry.components\n .filter((comp: any) => comp.type === \"registry:ui\")\n .map((comp: any) => ({\n title: `${comp.name}${comp.description ? ` - ${comp.description}` : \"\"}`,\n value: comp.name,\n }));\n\n const { selected } = await prompts({\n type: \"multiselect\",\n name: \"selected\",\n message: \"Select components to add:\",\n choices: availableComponents,\n min: 1,\n });\n\n if (!selected || selected.length === 0) {\n console.log(chalk.yellow(\"\\n❌ No components selected.\\n\"));\n return;\n }\n\n components = selected;\n }\n\n console.log(\n chalk.dim(`\\nAdding ${components.length} component(s)...\\n`)\n );\n\n for (const componentName of components) {\n await addComponent(componentName, config, options);\n }\n\n console.log(chalk.green(\"\\n✅ Components added successfully!\\n\"));\n}\n\nasync function addComponent(\n name: string,\n config: IConfig,\n options: IAddOptions\n) {\n const spinner = ora(`Installing ${chalk.bold(name)}...`).start();\n\n try {\n const component: IRegistryComponent = await getRegistryComponent(name);\n\n if (!component) {\n spinner.fail(`Component \"${name}\" not found in registry.`);\n return;\n }\n\n const packageManager = await detectPackageManager();\n\n if (component.dependencies && component.dependencies.length > 0) {\n spinner.text = `Installing dependencies for ${name}...`;\n await execa(packageManager, [\n packageManager === \"yarn\" ? \"add\" : \"install\",\n ...component.dependencies,\n ]);\n }\n\n if (component.registryDependencies && component.registryDependencies.length > 0) {\n for (const dep of component.registryDependencies) {\n spinner.text = `Installing dependency ${dep}...`;\n await addComponent(dep, config, { ...options, yes: true });\n }\n }\n\n for (const file of component.files) {\n const targetPath = resolveTargetPath(file.name, component.type, config);\n const filePath = path.join(process.cwd(), targetPath);\n\n const exists = await fs\n .access(filePath)\n .then(() => true)\n .catch(() => false);\n\n if (exists && !options.overwrite && !options.yes) {\n spinner.stop();\n const { overwrite } = await prompts({\n type: \"confirm\",\n name: \"overwrite\",\n message: `${targetPath} already exists. Overwrite?`,\n initial: false,\n });\n\n if (!overwrite) {\n spinner.warn(`Skipping ${targetPath}`);\n continue;\n }\n spinner.start();\n }\n\n await fs.mkdir(path.dirname(filePath), { recursive: true });\n\n const content = transformImports(file.content, config);\n\n await fs.writeFile(filePath, content, \"utf-8\");\n }\n\n spinner.succeed(`${chalk.bold(name)} installed successfully!`);\n } catch (error) {\n spinner.fail(`Error installing ${name}`);\n console.error(error);\n }\n}\n\nfunction resolveTargetPath(\n fileName: string,\n type: string,\n config: IConfig\n): string {\n if (type === \"registry:ui\") {\n return path.join(\n config.aliases.ui.replace(\"@/\", \"src/\"),\n fileName\n );\n }\n\n if (type === \"registry:lib\") {\n return path.join(\n config.aliases.lib.replace(\"@/\", \"src/\"),\n fileName\n );\n }\n\n if (type === \"registry:hook\") {\n return path.join(\n config.aliases.hooks.replace(\"@/\", \"src/\"),\n fileName\n );\n }\n\n return fileName;\n}\n\n","import fetch from \"node-fetch\";\r\nimport { IRegistryComponent } from \"../interfaces/IRegistryComponent\";\r\n\r\nconst REGISTRY_BASE_URL = \"https://raw.githubusercontent.com/pittaya-ui/cli/main/registry\";\r\n\r\n\r\nexport async function fetchRegistry(): Promise<any> {\r\n try {\r\n const response = await fetch(`${REGISTRY_BASE_URL}/index.json`);\r\n if (!response.ok) {\r\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\r\n }\r\n return await response.json();\r\n } catch (error) {\r\n console.error(\"Error fetching registry:\", error);\r\n throw new Error(\"Unable to load the registry of components\");\r\n }\r\n}\r\n\r\nexport async function getRegistryComponent(name: string): Promise<IRegistryComponent> {\r\n try {\r\n const response = await fetch(\r\n `${REGISTRY_BASE_URL}/components/${name}.json`\r\n );\r\n\r\n if (!response.ok) {\r\n throw new Error(`Component \"${name}\" not found in registry`);\r\n }\r\n\r\n return await response.json() as IRegistryComponent;\r\n } catch (error: any) {\r\n throw new Error(`Error loading component \"${name}\": ${error.message}`);\r\n }\r\n}\r\n\r\nexport function setRegistryUrl(url: string) {\r\n process.env.PITTAYA_REGISTRY_URL = url;\r\n}\r\n\r\n","\r\n\r\nimport { IConfig } from \"../interfaces/IConfig\";\r\n\r\nexport function transformImports(content: string, config: IConfig): string {\r\n let transformed = content;\r\n\r\n const aliasMap: Record<string, string> = {\r\n \"@/components/ui\": config.aliases.ui,\r\n \"@/components\": config.aliases.components,\r\n \"@/lib/utils\": config.aliases.utils,\r\n \"@/lib\": config.aliases.lib,\r\n \"@/hooks\": config.aliases.hooks,\r\n };\r\n\r\n const sortedAliases = Object.entries(aliasMap).sort(\r\n ([a], [b]) => b.length - a.length\r\n );\r\n\r\n for (const [from, to] of sortedAliases) {\r\n if (from !== to) {\r\n transformed = transformed.replace(\r\n new RegExp(`from [\"']${escapeRegex(from)}`, \"g\"),\r\n `from \"${to}`\r\n );\r\n transformed = transformed.replace(\r\n new RegExp(`import [\"']${escapeRegex(from)}`, \"g\"),\r\n `import \"${to}`\r\n );\r\n }\r\n }\r\n\r\n return transformed;\r\n}\r\n\r\nfunction escapeRegex(str: string): string {\r\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\r\n}\r\n\r\n","import fs from \"fs/promises\";\r\n\r\nexport async function detectPackageManager(): Promise<string> {\r\n try {\r\n await fs.access(\"pnpm-lock.yaml\");\r\n return \"pnpm\";\r\n } catch {}\r\n\r\n try {\r\n await fs.access(\"yarn.lock\");\r\n return \"yarn\";\r\n } catch {}\r\n\r\n try {\r\n await fs.access(\"bun.lockb\");\r\n return \"bun\";\r\n } catch {}\r\n\r\n return \"npm\";\r\n}\r\n\r\n","import chalk from \"chalk\";\nimport ora from \"ora\";\nimport prompts from \"prompts\";\nimport path from \"path\";\nimport fs from \"fs/promises\";\nimport { execa } from \"execa\";\n\ninterface InitOptions {\n yes?: boolean;\n}\n\nexport async function init(options: InitOptions) {\n console.log(chalk.bold(\"\\nWelcome to Pittaya UI!\\n\"));\n\n const cwd = process.cwd();\n const componentsJsonPath = path.join(cwd, \"components.json\");\n\n const exists = await fs\n .access(componentsJsonPath)\n .then(() => true)\n .catch(() => false);\n\n if (exists && !options.yes) {\n const { overwrite } = await prompts({\n type: \"confirm\",\n name: \"overwrite\",\n message: \"components.json already exists. Do you want to overwrite it?\",\n initial: false,\n });\n\n if (!overwrite) {\n console.log(chalk.yellow(\"\\n❌ Operation cancelled.\\n\"));\n return;\n }\n }\n\n const config = options.yes\n ? getDefaultConfig()\n : await prompts([\n {\n type: \"select\",\n name: \"style\",\n message: \"Which style would you like to use?\",\n choices: [\n { title: \"New York\", value: \"new-york\" },\n { title: \"Default\", value: \"default\" },\n { title: \"Recife\", value: \"recife\" },\n ],\n },\n {\n type: \"text\",\n name: \"tailwindCss\",\n message: \"Where is your globals.css file?\",\n initial: \"src/app/globals.css\",\n },\n {\n type: \"confirm\",\n name: \"rsc\",\n message: \"Use React Server Components?\",\n initial: true,\n },\n {\n type: \"text\",\n name: \"componentsPath\",\n message: \"Path for components?\",\n initial: \"@/components\",\n },\n {\n type: \"text\",\n name: \"utilsPath\",\n message: \"Path for utils?\",\n initial: \"@/lib/utils\",\n },\n ]);\n\n if (!config.style && !options.yes) {\n console.log(chalk.yellow(\"\\n❌ Operation cancelled.\\n\"));\n return;\n }\n\n const componentsJson = {\n $schema: \"https://raw.githubusercontent.com/pittaya-ui/cli/main/registry/schema.json\",\n style: config.style || \"new-york\",\n rsc: config.rsc ?? true,\n tsx: true,\n tailwind: {\n config: \"tailwind.config.ts\",\n css: config.tailwindCss || \"src/app/globals.css\",\n baseColor: \"neutral\",\n cssVariables: true,\n prefix: \"\",\n },\n aliases: {\n components: config.componentsPath || \"@/components\",\n utils: config.utilsPath || \"@/lib/utils\",\n ui: `${config.componentsPath || \"@/components\"}/ui`,\n lib: \"@/lib\",\n hooks: \"@/hooks\",\n },\n iconLibrary: \"lucide\",\n };\n\n const spinner = ora(\"Creating components.json...\").start();\n await fs.writeFile(\n componentsJsonPath,\n JSON.stringify(componentsJson, null, 2)\n );\n spinner.succeed(\"components.json created successfully!\");\n\n const packageManager = await detectPackageManager();\n\n const depsSpinner = ora(\"Installing base dependencies...\").start();\n try {\n await execa(packageManager, [\n packageManager === \"yarn\" ? \"add\" : \"install\",\n \"class-variance-authority\",\n \"clsx\",\n \"tailwind-merge\",\n ]);\n depsSpinner.succeed(\"Dependencies installed!\");\n } catch (error) {\n depsSpinner.fail(\"Error installing dependencies\");\n console.error(error);\n }\n\n console.log(chalk.green(\"\\n✅ Pittaya UI configured successfully!\\n\"));\n console.log(chalk.dim(\"Next steps:\"));\n console.log(\n chalk.dim(\n ` ${chalk.bold(\"npx pittaya add button\")} - Add a component`\n )\n );\n console.log(\n chalk.dim(\n ` ${chalk.bold(\"npx pittaya add --all\")} - Add all components\\n`\n )\n );\n}\n\nfunction getDefaultConfig() {\n return {\n style: \"new-york\",\n tailwindCss: \"src/app/globals.css\",\n rsc: true,\n componentsPath: \"@/components\",\n utilsPath: \"@/lib/utils\",\n };\n}\n\nasync function detectPackageManager(): Promise<string> {\n try {\n await fs.access(\"pnpm-lock.yaml\");\n return \"pnpm\";\n } catch {}\n\n try {\n await fs.access(\"yarn.lock\");\n return \"yarn\";\n } catch {}\n\n return \"npm\";\n}\n\n","import chalk from \"chalk\";\r\n\r\nexport async function credits() {\r\n console.log(chalk.bold(\"\\nPittaya UI - Creators\\n\"));\r\n\r\n console.log(chalk.cyan(\" • Marcos Bueno\"));\r\n console.log(chalk.cyan(\" • Lucas Ribeiro\"));\r\n console.log(chalk.cyan(\" • Jarbas Gouveia\"));\r\n\r\n console.log(chalk.dim(\"\\n Thank you for using Pittaya UI! ❤️\\n\"));\r\n}\r\n\r\n"],"mappings":";;;AACA,SAAS,eAAe;;;ACDxB,OAAO,WAAW;AAClB,OAAO,SAAS;AAChB,OAAO,aAAa;AACpB,OAAO,UAAU;AACjB,OAAOA,SAAQ;AACf,SAAS,aAAa;;;ACLtB,OAAO,WAAW;AAGlB,IAAM,oBAAoB;AAG1B,eAAsB,gBAA8B;AAClD,MAAI;AACF,UAAM,WAAW,MAAM,MAAM,GAAG,iBAAiB,aAAa;AAC9D,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,MAAM,QAAQ,SAAS,MAAM,KAAK,SAAS,UAAU,EAAE;AAAA,IACnE;AACA,WAAO,MAAM,SAAS,KAAK;AAAA,EAC7B,SAAS,OAAO;AACd,YAAQ,MAAM,4BAA4B,KAAK;AAC/C,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AACF;AAEA,eAAsB,qBAAqB,MAA2C;AACpF,MAAI;AACF,UAAM,WAAW,MAAM;AAAA,MACrB,GAAG,iBAAiB,eAAe,IAAI;AAAA,IACzC;AAEA,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,MAAM,cAAc,IAAI,yBAAyB;AAAA,IAC7D;AAEA,WAAO,MAAM,SAAS,KAAK;AAAA,EAC7B,SAAS,OAAY;AACnB,UAAM,IAAI,MAAM,4BAA4B,IAAI,MAAM,MAAM,OAAO,EAAE;AAAA,EACvE;AACF;;;AC7BO,SAAS,iBAAiB,SAAiB,QAAyB;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,IAAG,OAAO,gBAAgB;AAChC,WAAO;AAAA,EACT,QAAQ;AAAA,EAAC;AAET,MAAI;AACF,UAAMA,IAAG,OAAO,WAAW;AAC3B,WAAO;AAAA,EACT,QAAQ;AAAA,EAAC;AAET,SAAO;AACT;;;ACjKA,OAAOG,YAAW;AAElB,eAAsB,UAAU;AAC9B,UAAQ,IAAIA,OAAM,KAAK,2BAA2B,CAAC;AAEnD,UAAQ,IAAIA,OAAM,KAAK,uBAAkB,CAAC;AAC1C,UAAQ,IAAIA,OAAM,KAAK,wBAAmB,CAAC;AAC3C,UAAQ,IAAIA,OAAM,KAAK,yBAAoB,CAAC;AAE5C,UAAQ,IAAIA,OAAM,IAAI,oDAA0C,CAAC;AACnE;;;ANJA,IAAM,UAAU,IAAI,QAAQ;AAE5B,QACG,KAAK,SAAS,EACd,YAAY,2CAA2C,EACvD,QAAQ,OAAO;AAElB,QACG,QAAQ,MAAM,EACd,YAAY,uCAAuC,EACnD,OAAO,aAAa,2CAA2C,EAC/D,OAAO,IAAI;AAEd,QACG,QAAQ,KAAK,EACb,YAAY,iCAAiC,EAC7C,SAAS,mBAAmB,wBAAwB,EACpD,OAAO,aAAa,iDAAiD,EACrE,OAAO,mBAAmB,0BAA0B,EACpD,OAAO,aAAa,8BAA8B,EAClD,OAAO,GAAG;AAEb,QACG,QAAQ,SAAS,EACjB,YAAY,0BAA0B,EACtC,OAAO,OAAO;AAEjB,QAAQ,MAAM;","names":["fs","fs","chalk","ora","prompts","path","fs","execa","detectPackageManager","chalk"]}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "pittaya",
3
+ "version": "0.0.1",
4
+ "description": "CLI para adicionar componentes Pittaya UI ao seu projeto",
5
+ "type": "module",
6
+ "bin": {
7
+ "pittaya": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "dev": "tsup --watch",
14
+ "build": "tsup",
15
+ "pub:release": "npm run build && npm publish --access public"
16
+ },
17
+ "keywords": [
18
+ "pittaya",
19
+ "ui",
20
+ "components",
21
+ "cli",
22
+ "react",
23
+ "nextjs"
24
+ ],
25
+ "author": "Pittaya UI",
26
+ "license": "SEE LICENSE IN LICENSE",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/pittaya-ui/cli.git",
30
+ "directory": "packages/cli"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/pittaya-ui/cli/issues"
34
+ },
35
+ "homepage": "https://github.com/pittaya-ui/cli#readme",
36
+ "dependencies": {
37
+ "chalk": "^5.3.0",
38
+ "commander": "^12.0.0",
39
+ "execa": "^9.0.0",
40
+ "https-proxy-agent": "^7.0.4",
41
+ "node-fetch": "^3.3.2",
42
+ "ora": "^8.0.1",
43
+ "prompts": "^2.4.2",
44
+ "ts-morph": "^24.0.0",
45
+ "zod": "^3.23.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^20.11.0",
49
+ "@types/prompts": "^2.4.9",
50
+ "tsup": "^8.0.1",
51
+ "typescript": "^5.3.3"
52
+ }
53
+ }
54
+