@launchframe/cli 1.0.0-beta.23 → 1.0.0-beta.25

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.
@@ -4,7 +4,8 @@
4
4
  "WebSearch",
5
5
  "WebFetch(domain:developer.mixpanel.com)",
6
6
  "Bash(node -c:*)",
7
- "Bash(node:*)"
7
+ "Bash(node:*)",
8
+ "Bash(git checkout:*)"
8
9
  ]
9
10
  }
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchframe/cli",
3
- "version": "1.0.0-beta.23",
3
+ "version": "1.0.0-beta.25",
4
4
  "description": "Production-ready B2B SaaS boilerplate with subscriptions, credits, and multi-tenancy",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "url": "https://github.com/launchframe/cli/issues"
35
35
  },
36
36
  "engines": {
37
- "node": ">=16.0.0"
37
+ "node": ">=22.0.0"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
@@ -42,7 +42,6 @@
42
42
  "dependencies": {
43
43
  "chalk": "^4.1.2",
44
44
  "fs-extra": "^11.1.1",
45
- "glob": "^10.3.10",
46
45
  "inquirer": "^8.2.5"
47
46
  }
48
47
  }
package/src/index.js CHANGED
@@ -5,6 +5,14 @@ const { isLaunchFrameProject } = require('./utils/project-helpers');
5
5
  const logger = require('./utils/logger');
6
6
  const { initTelemetry, trackEvent, sanitize, setTelemetryEnabled, showTelemetryStatus } = require('./utils/telemetry');
7
7
 
8
+ // Detect locally linked version: npm link installs to global node_modules
9
+ // as a symlink. When running from a real install, __dirname is inside the
10
+ // global node_modules folder. When linked, it resolves to the source directory.
11
+ if (!__dirname.includes('node_modules')) {
12
+ const packageJson = require('../package.json');
13
+ console.log(chalk.yellow(`⚠ Running locally linked CLI v${packageJson.version} (${__dirname})`));
14
+ }
15
+
8
16
  // Import commands
9
17
  const { init } = require('./commands/init');
10
18
  const { deployConfigure } = require('./commands/deploy-configure');
@@ -1,6 +1,9 @@
1
1
  const fs = require('fs-extra');
2
+ const { glob } = require('node:fs');
2
3
  const path = require('path');
3
- const { glob } = require('glob');
4
+
5
+ const EXCLUDED_DIRS = new Set(['node_modules', '.git', '.next', 'dist', 'build']);
6
+ const BINARY_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.ico', '.pdf', '.woff', '.woff2', '.ttf', '.eot']);
4
7
 
5
8
  /**
6
9
  * Replace template variables in all files within a directory
@@ -9,31 +12,23 @@ const { glob } = require('glob');
9
12
  */
10
13
  async function replaceVariables(directory, variables) {
11
14
  // Find all files (excluding node_modules, .git, binary files)
12
- const files = await glob('**/*', {
13
- cwd: directory,
14
- nodir: true,
15
- dot: true, // Include hidden files/directories like .vitepress
16
- ignore: [
17
- '**/node_modules/**',
18
- '**/.git/**',
19
- '**/.next/**',
20
- '**/dist/**',
21
- '**/build/**',
22
- '**/*.png',
23
- '**/*.jpg',
24
- '**/*.jpeg',
25
- '**/*.gif',
26
- '**/*.ico',
27
- '**/*.pdf',
28
- '**/*.woff',
29
- '**/*.woff2',
30
- '**/*.ttf',
31
- '**/*.eot'
32
- ]
15
+ const files = await new Promise((resolve, reject) => {
16
+ glob('**/*', {
17
+ cwd: directory,
18
+ exclude: (name) => EXCLUDED_DIRS.has(name),
19
+ }, (err, matches) => err ? reject(err) : resolve(matches));
20
+ });
21
+
22
+ const filtered = files.filter(f => {
23
+ const ext = path.extname(f).toLowerCase();
24
+ return !BINARY_EXTENSIONS.has(ext);
33
25
  });
34
26
 
35
- for (const file of files) {
27
+ for (const file of filtered) {
36
28
  const filePath = path.join(directory, file);
29
+ // Skip directories (fs.glob includes them unlike third-party glob packages)
30
+ const stat = await fs.stat(filePath);
31
+ if (stat.isDirectory()) continue;
37
32
  await replaceVariablesInFile(filePath, variables);
38
33
  }
39
34
  }