@glash/cli 0.2.1 → 0.2.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.
package/bin/glash.mjs CHANGED
@@ -3,7 +3,7 @@ import { argv, exit } from 'node:process';
3
3
  import { parseArgs } from '../lib/args.mjs';
4
4
  import { info, fail, color } from '../lib/ui.mjs';
5
5
 
6
- const VERSION = '0.2.1';
6
+ const VERSION = '0.2.2';
7
7
 
8
8
  const sub = argv[2];
9
9
  const rest = argv.slice(3);
package/lib/zip.mjs CHANGED
@@ -18,7 +18,9 @@ export async function zipDirectory(sourceDir, outPath, { ignore = [] } = {}) {
18
18
  'node_modules/**',
19
19
  '.git/**',
20
20
  '.next/**',
21
+ '.next*/**',
21
22
  '.nuxt/**',
23
+ '.nuxt*/**',
22
24
  '.output/**',
23
25
  '.svelte-kit/**',
24
26
  '.vercel/**',
@@ -42,7 +44,7 @@ export async function zipDirectory(sourceDir, outPath, { ignore = [] } = {}) {
42
44
  '.env.production',
43
45
  '.env.development',
44
46
  ];
45
- const allIgnore = [...new Set([...defaultIgnore, ...ignore])];
47
+ const allIgnore = [...new Set([...defaultIgnore, ...loadGitignorePatterns(sourceDir), ...ignore])];
46
48
 
47
49
  archive.glob('**/*', {
48
50
  cwd: sourceDir,
@@ -53,3 +55,20 @@ export async function zipDirectory(sourceDir, outPath, { ignore = [] } = {}) {
53
55
  archive.finalize();
54
56
  });
55
57
  }
58
+
59
+ function loadGitignorePatterns(sourceDir) {
60
+ const path = join(sourceDir, '.gitignore');
61
+ if (!fs.existsSync(path)) return [];
62
+
63
+ const patterns = [];
64
+ const text = fs.readFileSync(path, 'utf8');
65
+ for (const raw of text.split(/\r?\n/)) {
66
+ const line = raw.trim();
67
+ if (!line || line.startsWith('#') || line.startsWith('!')) continue;
68
+ const normalized = line.replace(/^\/+/, '').replace(/\/+$/, '');
69
+ if (!normalized) continue;
70
+ patterns.push(normalized);
71
+ if (!/[*!?[\]{}()]/.test(normalized)) patterns.push(`${normalized}/**`);
72
+ }
73
+ return patterns;
74
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glash/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "glashDB command-line interface — deploy projects, pull source + env, manage env vars, import from Vercel.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://glashdb.com",