@astralkit/cli 3.0.4 → 3.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralkit/cli",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "AstralKit CLI — Install and manage UI components in your project",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "bin": {
@@ -236,6 +236,7 @@ async function addComponent(componentSlug, options) {
236
236
 
237
237
  try {
238
238
  let data;
239
+ let actualFramework = framework;
239
240
  try {
240
241
  data = await getComponent(componentSlug, framework);
241
242
  } catch (fetchErr) {
@@ -243,6 +244,7 @@ async function addComponent(componentSlug, options) {
243
244
  if (fetchErr.code === 'PRO_REQUIRED' && framework !== 'html') {
244
245
  spinner.warn(`${FRAMEWORK_LABELS[framework] || framework} requires a Pro subscription.`);
245
246
  console.log(chalk.gray(' Fetching HTML version instead (free tier).'));
247
+ actualFramework = 'html';
246
248
  const htmlSpinner = ora(`Fetching ${componentSlug} (HTML)...`).start();
247
249
  try {
248
250
  data = await getComponent(componentSlug, 'html');
@@ -289,7 +291,7 @@ async function addComponent(componentSlug, options) {
289
291
  fs.writeFileSync(filePath, file.content);
290
292
  }
291
293
 
292
- spinner.succeed(`Added ${chalk.cyan(data.name || componentSlug)} (${FRAMEWORK_LABELS[framework] || framework})`);
294
+ spinner.succeed(`Added ${chalk.cyan(data.name || componentSlug)} (${FRAMEWORK_LABELS[actualFramework] || actualFramework})`);
293
295
 
294
296
  console.log(chalk.gray(` ${componentsDir}/`));
295
297
  for (const file of data.files) {
@@ -297,7 +299,7 @@ async function addComponent(componentSlug, options) {
297
299
  }
298
300
 
299
301
  // Post-install checks for react/nextjs
300
- if (framework !== 'html') {
302
+ if (actualFramework !== 'html') {
301
303
  console.log();
302
304
 
303
305
  if (!isAstralkitInstalled()) {