launchbase 1.1.0 → 1.1.2

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/bin/launchbase.js +17 -10
  2. package/package.json +1 -1
package/bin/launchbase.js CHANGED
@@ -7,7 +7,7 @@ const crypto = require('crypto');
7
7
  const fs = require('fs-extra');
8
8
  const { execSync, spawn } = require('child_process');
9
9
 
10
- const VERSION = '1.1.0';
10
+ const VERSION = '1.1.2';
11
11
  const program = new Command();
12
12
 
13
13
  function findAvailablePort(startPort = 5432, maxAttempts = 100) {
@@ -361,9 +361,11 @@ program
361
361
  .option('-s, --sdk', 'Include TypeScript SDK')
362
362
  .option('--no-docker', 'Skip Docker/database setup')
363
363
  .option('--no-cicd', 'Skip CI/CD workflow')
364
- .action(async (appName, options) => {
364
+ .action(async (appName, options, command) => {
365
365
  console.log('\nšŸš€ LaunchBase CLI v' + VERSION + '\n');
366
366
  console.log('šŸ“ Creating project:', appName);
367
+ console.log('šŸ” DEBUG options:', JSON.stringify(options));
368
+ console.log('šŸ” DEBUG template flag:', options.template);
367
369
 
368
370
  // Find available ports first
369
371
  console.log('šŸ” Finding available ports...');
@@ -381,22 +383,26 @@ program
381
383
  }
382
384
 
383
385
  // Copy template files with filtering
386
+ console.log('šŸ“‚ Copying template files...');
387
+ console.log(` Include frontend: ${options.template ? 'yes' : 'no'}`);
388
+
384
389
  await fs.copy(templateDir, targetDir, {
385
390
  filter: (src) => {
386
- const relativePath = path.relative(templateDir, src);
391
+ // Normalize path separators for cross-platform compatibility
392
+ const relativePath = path.relative(templateDir, src).replace(/\\/g, '/');
387
393
 
388
394
  // Skip node_modules, dist, etc.
389
395
  if (relativePath.includes('node_modules') || relativePath.includes('dist') || relativePath.includes('.next')) {
390
396
  return false;
391
397
  }
392
398
 
393
- // Skip frontend if not requested
394
- if (relativePath.startsWith('frontend') && !options.template) {
399
+ // Skip frontend if not requested (check with trailing slash to avoid partial matches)
400
+ if ((relativePath.startsWith('frontend/') || relativePath === 'frontend') && !options.template) {
395
401
  return false;
396
402
  }
397
403
 
398
404
  // Skip SDK if not requested
399
- if (relativePath.startsWith('sdk') && !options.sdk) {
405
+ if ((relativePath.startsWith('sdk/') || relativePath === 'sdk') && !options.sdk) {
400
406
  return false;
401
407
  }
402
408
 
@@ -583,20 +589,21 @@ program
583
589
  // Copy template files with filtering
584
590
  await fs.copy(templateDir, targetDir, {
585
591
  filter: (src) => {
586
- const relativePath = path.relative(templateDir, src);
592
+ // Normalize path separators for cross-platform compatibility
593
+ const relativePath = path.relative(templateDir, src).replace(/\\/g, '/');
587
594
 
588
595
  // Skip node_modules, dist, etc.
589
596
  if (relativePath.includes('node_modules') || relativePath.includes('dist') || relativePath.includes('.next')) {
590
597
  return false;
591
598
  }
592
599
 
593
- // Skip frontend if not requested
594
- if (relativePath.startsWith('frontend') && !options.template) {
600
+ // Skip frontend if not requested (check with trailing slash to avoid partial matches)
601
+ if ((relativePath.startsWith('frontend/') || relativePath === 'frontend') && !options.template) {
595
602
  return false;
596
603
  }
597
604
 
598
605
  // Skip SDK if not requested
599
- if (relativePath.startsWith('sdk') && !options.sdk) {
606
+ if ((relativePath.startsWith('sdk/') || relativePath === 'sdk') && !options.sdk) {
600
607
  return false;
601
608
  }
602
609
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchbase",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Generate production-ready NestJS backends with authentication, multi-tenancy, billing, and deployment in minutes",
5
5
  "author": "LaunchBase",
6
6
  "keywords": [