@noormdev/cli 1.0.0-alpha.7 → 1.0.0-alpha.9

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.
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-GQBL2JPZ.js";import"./chunk-PJYMXUBP.js";import"./chunk-CTFIMWJ7.js";import"./chunk-UR6MHSHU.js";export{g as deleteVaultSecret,e as getAllVaultSecrets,b as getVaultKey,d as getVaultSecret,i as getVaultStatus,a as initializeVault,f as listVaultSecretKeys,c as setVaultSecret,h as vaultSecretExists};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noormdev/cli",
3
- "version": "1.0.0-alpha.7",
3
+ "version": "1.0.0-alpha.9",
4
4
  "description": "Database schema & changeset manager CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  "better-sqlite3": "^12.5.0"
19
19
  },
20
20
  "engines": {
21
- "node": ">=18"
21
+ "node": ">=22.13"
22
22
  },
23
23
  "keywords": [
24
24
  "database",
@@ -7,7 +7,7 @@
7
7
  * creates a symlink in /usr/local/bin so `noorm` works across version switches.
8
8
  */
9
9
 
10
- import { symlink, unlink, readlink } from 'fs/promises';
10
+ import { symlink, unlink, readlink, readFile, writeFile } from 'fs/promises';
11
11
  import { existsSync } from 'fs';
12
12
  import { dirname, resolve } from 'path';
13
13
  import { fileURLToPath } from 'url';
@@ -32,6 +32,32 @@ async function main() {
32
32
 
33
33
  }
34
34
 
35
+ // Update hashbang in dist/index.js with current Node path
36
+ if (existsSync(SOURCE)) {
37
+
38
+ try {
39
+
40
+ const nodeLocation = process.execPath;
41
+ const content = await readFile(SOURCE, 'utf8');
42
+ const lines = content.split('\n');
43
+
44
+ if (lines[0].startsWith('#!')) {
45
+
46
+ lines[0] = `#!${nodeLocation} --experimental-strip-types`;
47
+ await writeFile(SOURCE, lines.join('\n'), 'utf8');
48
+ console.log(`✓ Updated hashbang to use /usr/bin/env ${nodeLocation}`);
49
+
50
+ }
51
+
52
+ }
53
+ catch (err) {
54
+
55
+ console.error('Error updating hashbang:', err.message);
56
+
57
+ }
58
+
59
+ }
60
+
35
61
  // Check if symlink already exists and points to correct location
36
62
  if (existsSync(BIN_PATH)) {
37
63