@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 +1 -1
- package/src/commands/add.js +4 -2
package/package.json
CHANGED
package/src/commands/add.js
CHANGED
|
@@ -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[
|
|
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 (
|
|
302
|
+
if (actualFramework !== 'html') {
|
|
301
303
|
console.log();
|
|
302
304
|
|
|
303
305
|
if (!isAstralkitInstalled()) {
|