create-nextblock 0.2.64 → 0.2.66

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.
@@ -597,6 +597,49 @@ async function runSetupWizard(projectDir, projectName) {
597
597
  };
598
598
  }
599
599
 
600
+ clack.note(
601
+ 'Optional Premium Module Setup:\nIf you have a nextblock license, you can install the premium modules now.',
602
+ );
603
+ const setupPremium = await clack.confirm({
604
+ message:
605
+ 'Do you have a GitHub Personal Access Token (PAT) for premium modules?',
606
+ initialValue: false,
607
+ });
608
+
609
+ if (clack.isCancel(setupPremium)) {
610
+ handleWizardCancel('Setup cancelled.');
611
+ }
612
+
613
+ if (setupPremium) {
614
+ const patPrompt = await clack.text({
615
+ message: 'Your GitHub Personal Access Token (PAT):',
616
+ placeholder: 'ghp_ or github_pat_...',
617
+ validate: (val) => {
618
+ if (!val) return 'PAT is required';
619
+ if (!val.startsWith('ghp_') && !val.startsWith('github_pat_')) {
620
+ return 'Token must start with ghp_ or github_pat_';
621
+ }
622
+ },
623
+ });
624
+
625
+ if (clack.isCancel(patPrompt)) {
626
+ handleWizardCancel('Setup cancelled.');
627
+ }
628
+
629
+ const pat = patPrompt.trim();
630
+
631
+ // Configure .npmrc for the project
632
+ const npmrcPath = resolve(projectPath, '.npmrc');
633
+ const npmrcContent = [
634
+ '@nextblock-cms:registry=https://npm.pkg.github.com',
635
+ `//npm.pkg.github.com/:_authToken=${pat}`,
636
+ '',
637
+ ].join('\n');
638
+
639
+ await fs.appendFile(npmrcPath, npmrcContent);
640
+ clack.note('Premium modules configured in .npmrc!');
641
+ }
642
+
600
643
  await appendEnvBlock('SMTP', [
601
644
  '',
602
645
  '# Email SMTP Configuration',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextblock",
3
- "version": "0.2.64",
3
+ "version": "0.2.66",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextblock-cms/template",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "next dev",