@lifeaitools/clauth 0.3.10 → 0.3.12

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/install.ps1 CHANGED
@@ -1,44 +1,44 @@
1
- # clauth installer — Windows
2
- # One-liner: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/LIFEAI/clauth/main/install.ps1'))
3
-
4
- $ErrorActionPreference = "Stop"
5
- $REPO = "https://github.com/LIFEAI/clauth.git"
6
- $DIR = "$env:USERPROFILE\.clauth"
7
-
8
- # Check git
9
- try { git --version | Out-Null } catch {
10
- Write-Host ""
11
- Write-Host " x git is required." -ForegroundColor Red
12
- Write-Host " Install from https://git-scm.com then re-run this script."
13
- Write-Host ""
14
- exit 1
15
- }
16
-
17
- # Check Node
18
- try { node --version | Out-Null } catch {
19
- Write-Host ""
20
- Write-Host " x Node.js v18+ is required." -ForegroundColor Red
21
- Write-Host " Install from https://nodejs.org then re-run this script."
22
- Write-Host ""
23
- exit 1
24
- }
25
-
26
- # Clone or update
27
- if (Test-Path "$DIR\.git") {
28
- Write-Host " Updating clauth..."
29
- Set-Location $DIR; git pull --quiet
30
- } else {
31
- Write-Host " Cloning clauth..."
32
- git clone --quiet $REPO $DIR
33
- }
34
-
35
- # Run compiled bootstrap binary
36
- $bootstrap = "$DIR\scripts\bin\bootstrap-win.exe"
37
- if (-not (Test-Path $bootstrap)) {
38
- Write-Host " x Bootstrap binary not found at $bootstrap" -ForegroundColor Red
39
- exit 1
40
- }
41
-
42
- Set-Location $DIR
43
- & $bootstrap
44
- exit $LASTEXITCODE
1
+ # clauth installer — Windows
2
+ # One-liner: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/LIFEAI/clauth/main/install.ps1'))
3
+
4
+ $ErrorActionPreference = "Stop"
5
+ $REPO = "https://github.com/LIFEAI/clauth.git"
6
+ $DIR = "$env:USERPROFILE\.clauth"
7
+
8
+ # Check git
9
+ try { git --version | Out-Null } catch {
10
+ Write-Host ""
11
+ Write-Host " x git is required." -ForegroundColor Red
12
+ Write-Host " Install from https://git-scm.com then re-run this script."
13
+ Write-Host ""
14
+ exit 1
15
+ }
16
+
17
+ # Check Node
18
+ try { node --version | Out-Null } catch {
19
+ Write-Host ""
20
+ Write-Host " x Node.js v18+ is required." -ForegroundColor Red
21
+ Write-Host " Install from https://nodejs.org then re-run this script."
22
+ Write-Host ""
23
+ exit 1
24
+ }
25
+
26
+ # Clone or update
27
+ if (Test-Path "$DIR\.git") {
28
+ Write-Host " Updating clauth..."
29
+ Set-Location $DIR; git pull --quiet
30
+ } else {
31
+ Write-Host " Cloning clauth..."
32
+ git clone --quiet $REPO $DIR
33
+ }
34
+
35
+ # Run compiled bootstrap binary
36
+ $bootstrap = "$DIR\scripts\bin\bootstrap-win.exe"
37
+ if (-not (Test-Path $bootstrap)) {
38
+ Write-Host " x Bootstrap binary not found at $bootstrap" -ForegroundColor Red
39
+ exit 1
40
+ }
41
+
42
+ Set-Location $DIR
43
+ & $bootstrap
44
+ exit $LASTEXITCODE
package/install.sh CHANGED
@@ -1,38 +1,38 @@
1
- #!/usr/bin/env bash
2
- # clauth installer
3
- set -e
4
-
5
- REPO="https://github.com/LIFEAI/clauth.git"
6
- DIR="$HOME/.clauth"
7
-
8
- # Check git
9
- if ! command -v git &>/dev/null; then
10
- echo ""; echo " x git is required."
11
- echo " Install git from https://git-scm.com then re-run this script."; echo ""
12
- exit 1
13
- fi
14
-
15
- # Check Node
16
- if ! command -v node &>/dev/null; then
17
- echo ""; echo " x Node.js v18+ is required."
18
- echo " Install from https://nodejs.org then re-run this script."; echo ""
19
- exit 1
20
- fi
21
-
22
- # Clone or update
23
- if [ -d "$DIR/.git" ]; then
24
- echo " Updating clauth..."; cd "$DIR" && git pull --quiet
25
- else
26
- echo " Cloning clauth..."; git clone --quiet "$REPO" "$DIR"
27
- fi
28
-
29
- # Run compiled bootstrap
30
- UNAME=$(uname -s | tr '[:upper:]' '[:lower:]')
31
- if [[ "$UNAME" == *"darwin"* ]]; then
32
- BOOTSTRAP="$DIR/scripts/bin/bootstrap-macos"
33
- else
34
- BOOTSTRAP="$DIR/scripts/bin/bootstrap-linux"
35
- fi
36
-
37
- chmod +x "$BOOTSTRAP"
38
- cd "$DIR" && "$BOOTSTRAP"
1
+ #!/usr/bin/env bash
2
+ # clauth installer
3
+ set -e
4
+
5
+ REPO="https://github.com/LIFEAI/clauth.git"
6
+ DIR="$HOME/.clauth"
7
+
8
+ # Check git
9
+ if ! command -v git &>/dev/null; then
10
+ echo ""; echo " x git is required."
11
+ echo " Install git from https://git-scm.com then re-run this script."; echo ""
12
+ exit 1
13
+ fi
14
+
15
+ # Check Node
16
+ if ! command -v node &>/dev/null; then
17
+ echo ""; echo " x Node.js v18+ is required."
18
+ echo " Install from https://nodejs.org then re-run this script."; echo ""
19
+ exit 1
20
+ fi
21
+
22
+ # Clone or update
23
+ if [ -d "$DIR/.git" ]; then
24
+ echo " Updating clauth..."; cd "$DIR" && git pull --quiet
25
+ else
26
+ echo " Cloning clauth..."; git clone --quiet "$REPO" "$DIR"
27
+ fi
28
+
29
+ # Run compiled bootstrap
30
+ UNAME=$(uname -s | tr '[:upper:]' '[:lower:]')
31
+ if [[ "$UNAME" == *"darwin"* ]]; then
32
+ BOOTSTRAP="$DIR/scripts/bin/bootstrap-macos"
33
+ else
34
+ BOOTSTRAP="$DIR/scripts/bin/bootstrap-linux"
35
+ fi
36
+
37
+ chmod +x "$BOOTSTRAP"
38
+ cd "$DIR" && "$BOOTSTRAP"
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "name": "@lifeaitools/clauth",
3
- "version": "0.3.10",
4
- "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
- "type": "module",
6
- "bin": {
7
- "clauth": "./cli/index.js"
8
- },
9
- "scripts": {
10
- "build": "bash scripts/build.sh"
11
- },
12
- "dependencies": {
13
- "chalk": "^5.3.0",
14
- "commander": "^12.1.0",
15
- "conf": "^13.0.0",
16
- "inquirer": "^10.1.0",
17
- "node-fetch": "^3.3.2",
18
- "ora": "^8.1.0"
19
- },
20
- "engines": {
21
- "node": ">=18.0.0"
22
- },
23
- "keywords": [
24
- "lifeai",
25
- "credentials",
26
- "vault",
27
- "cli",
28
- "prt"
29
- ],
30
- "author": "Dave Ladouceur <dave@life.ai>",
31
- "license": "MIT",
32
- "repository": {
33
- "type": "git",
34
- "url": "https://github.com/LIFEAI/clauth.git"
35
- },
36
- "devDependencies": {
37
- "javascript-obfuscator": "^5.3.0"
38
- },
39
- "files": [
40
- "cli/",
41
- "scripts/bin/",
42
- "scripts/bootstrap.cjs",
43
- "scripts/build.sh",
44
- "supabase/",
45
- ".clauth-skill/",
46
- "install.sh",
47
- "install.ps1",
48
- "README.md"
49
- ],
50
- "publishConfig": {
51
- "access": "public"
52
- },
53
- "homepage": "https://github.com/LIFEAI/clauth"
54
- }
1
+ {
2
+ "name": "@lifeaitools/clauth",
3
+ "version": "0.3.12",
4
+ "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
+ "type": "module",
6
+ "bin": {
7
+ "clauth": "./cli/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "bash scripts/build.sh"
11
+ },
12
+ "dependencies": {
13
+ "chalk": "^5.3.0",
14
+ "commander": "^12.1.0",
15
+ "conf": "^13.0.0",
16
+ "inquirer": "^10.1.0",
17
+ "node-fetch": "^3.3.2",
18
+ "ora": "^8.1.0"
19
+ },
20
+ "engines": {
21
+ "node": ">=18.0.0"
22
+ },
23
+ "keywords": [
24
+ "lifeai",
25
+ "credentials",
26
+ "vault",
27
+ "cli",
28
+ "prt"
29
+ ],
30
+ "author": "Dave Ladouceur <dave@life.ai>",
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/LIFEAI/clauth.git"
35
+ },
36
+ "devDependencies": {
37
+ "javascript-obfuscator": "^5.3.0"
38
+ },
39
+ "files": [
40
+ "cli/",
41
+ "scripts/bin/",
42
+ "scripts/bootstrap.cjs",
43
+ "scripts/build.sh",
44
+ "supabase/",
45
+ ".clauth-skill/",
46
+ "install.sh",
47
+ "install.ps1",
48
+ "README.md"
49
+ ],
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "homepage": "https://github.com/LIFEAI/clauth"
54
+ }
File without changes
File without changes
@@ -1,43 +1,43 @@
1
- // bootstrap.cjs — CommonJS, compiled to binary by pkg
2
- // Installs npm deps, links clauth, chains to: clauth install
3
- 'use strict';
4
- const { execSync, spawnSync } = require('child_process');
5
- const { join } = require('path');
6
- const ROOT = join(__dirname, '..');
7
-
8
- function run(cmd, opts) {
9
- return spawnSync(cmd, Object.assign({ shell: true, stdio: 'inherit', cwd: ROOT }, opts || {}));
10
- }
11
- function check(cmd) {
12
- try { execSync(cmd + ' --version', { stdio: 'pipe' }); return true; } catch { return false; }
13
- }
14
-
15
- console.log('\n Installing clauth runtime...\n');
16
-
17
- if (!check('git')) {
18
- console.error(' x git not found. Install from https://git-scm.com');
19
- process.exit(1);
20
- }
21
- var nodeVer = parseInt(process.version.slice(1));
22
- if (nodeVer < 18) {
23
- console.error(' x Node.js v18+ required (found ' + process.version + ')');
24
- console.error(' Install from https://nodejs.org');
25
- process.exit(1);
26
- }
27
-
28
- console.log(' -> Installing dependencies...');
29
- var inst = run('npm install --no-fund --no-audit', { stdio: ['ignore','ignore','pipe'] });
30
- if (inst.status !== 0) { console.error(' x npm install failed'); process.exit(1); }
31
- console.log(' + Dependencies ready');
32
-
33
- console.log(' -> Linking clauth command...');
34
- var lnk = run('npm link', { stdio: ['ignore','ignore','pipe'] });
35
- if (lnk.status !== 0) {
36
- var slnk = run('sudo npm link', { stdio: 'inherit' });
37
- if (slnk.status !== 0) console.warn(' ! Could not link globally — add ' + ROOT + '/node_modules/.bin to PATH');
38
- }
39
- console.log(' + clauth linked');
40
-
41
- console.log('\n -> Launching clauth install...\n');
42
- var r = run('clauth install');
43
- process.exit(r.status || 0);
1
+ // bootstrap.cjs — CommonJS, compiled to binary by pkg
2
+ // Installs npm deps, links clauth, chains to: clauth install
3
+ 'use strict';
4
+ const { execSync, spawnSync } = require('child_process');
5
+ const { join } = require('path');
6
+ const ROOT = join(__dirname, '..');
7
+
8
+ function run(cmd, opts) {
9
+ return spawnSync(cmd, Object.assign({ shell: true, stdio: 'inherit', cwd: ROOT }, opts || {}));
10
+ }
11
+ function check(cmd) {
12
+ try { execSync(cmd + ' --version', { stdio: 'pipe' }); return true; } catch { return false; }
13
+ }
14
+
15
+ console.log('\n Installing clauth runtime...\n');
16
+
17
+ if (!check('git')) {
18
+ console.error(' x git not found. Install from https://git-scm.com');
19
+ process.exit(1);
20
+ }
21
+ var nodeVer = parseInt(process.version.slice(1));
22
+ if (nodeVer < 18) {
23
+ console.error(' x Node.js v18+ required (found ' + process.version + ')');
24
+ console.error(' Install from https://nodejs.org');
25
+ process.exit(1);
26
+ }
27
+
28
+ console.log(' -> Installing dependencies...');
29
+ var inst = run('npm install --no-fund --no-audit', { stdio: ['ignore','ignore','pipe'] });
30
+ if (inst.status !== 0) { console.error(' x npm install failed'); process.exit(1); }
31
+ console.log(' + Dependencies ready');
32
+
33
+ console.log(' -> Linking clauth command...');
34
+ var lnk = run('npm link', { stdio: ['ignore','ignore','pipe'] });
35
+ if (lnk.status !== 0) {
36
+ var slnk = run('sudo npm link', { stdio: 'inherit' });
37
+ if (slnk.status !== 0) console.warn(' ! Could not link globally — add ' + ROOT + '/node_modules/.bin to PATH');
38
+ }
39
+ console.log(' + clauth linked');
40
+
41
+ console.log('\n -> Launching clauth install...\n');
42
+ var r = run('clauth install');
43
+ process.exit(r.status || 0);
package/scripts/build.sh CHANGED
@@ -1,45 +1,45 @@
1
- #!/usr/bin/env bash
2
- # scripts/build.sh — regenerate bootstrap binaries from source
3
- # Run: npm run build
4
- set -e
5
- cd "$(dirname "$0")/.."
6
-
7
- echo "→ Obfuscating bootstrap.cjs..."
8
- node -e "
9
- const J = require('javascript-obfuscator');
10
- const fs = require('fs');
11
- const src = fs.readFileSync('scripts/bootstrap.cjs', 'utf8');
12
- const out = J.obfuscate(src, {
13
- compact: true,
14
- controlFlowFlattening: true, controlFlowFlatteningThreshold: 0.75,
15
- deadCodeInjection: true, deadCodeInjectionThreshold: 0.4,
16
- identifierNamesGenerator: 'hexadecimal',
17
- rotateStringArray: true, shuffleStringArray: true,
18
- splitStrings: true, splitStringsChunkLength: 8,
19
- stringArray: true, stringArrayEncoding: ['base64'],
20
- stringArrayThreshold: 0.85,
21
- transformObjectKeys: true, target: 'node'
22
- });
23
- fs.writeFileSync('scripts/bootstrap.ob.cjs', out.getObfuscatedCode());
24
- console.log(' ✓ Obfuscated');
25
- "
26
-
27
- echo "→ Compiling binaries..."
28
- mkdir -p scripts/bin
29
- npx pkg scripts/bootstrap.ob.cjs \
30
- --targets node18-win-x64,node18-linux-x64,node18-macos-x64 \
31
- --out-path scripts/bin/tmp/ \
32
- 2>&1 | grep -v "^$" | grep -v "Warning" || true
33
-
34
- # Rename to clean names
35
- mv -f scripts/bin/tmp/bootstrap.ob-linux scripts/bin/bootstrap-linux 2>/dev/null || true
36
- mv -f scripts/bin/tmp/bootstrap.ob-macos scripts/bin/bootstrap-macos 2>/dev/null || true
37
- mv -f scripts/bin/tmp/bootstrap.ob-win.exe scripts/bin/bootstrap-win.exe 2>/dev/null || true
38
- rm -rf scripts/bin/tmp
39
- chmod +x scripts/bin/bootstrap-linux scripts/bin/bootstrap-macos 2>/dev/null || true
40
-
41
- # Clean intermediate
42
- rm -f scripts/bootstrap.ob.cjs
43
-
44
- ls -lh scripts/bin/
45
- echo "✓ Build complete"
1
+ #!/usr/bin/env bash
2
+ # scripts/build.sh — regenerate bootstrap binaries from source
3
+ # Run: npm run build
4
+ set -e
5
+ cd "$(dirname "$0")/.."
6
+
7
+ echo "→ Obfuscating bootstrap.cjs..."
8
+ node -e "
9
+ const J = require('javascript-obfuscator');
10
+ const fs = require('fs');
11
+ const src = fs.readFileSync('scripts/bootstrap.cjs', 'utf8');
12
+ const out = J.obfuscate(src, {
13
+ compact: true,
14
+ controlFlowFlattening: true, controlFlowFlatteningThreshold: 0.75,
15
+ deadCodeInjection: true, deadCodeInjectionThreshold: 0.4,
16
+ identifierNamesGenerator: 'hexadecimal',
17
+ rotateStringArray: true, shuffleStringArray: true,
18
+ splitStrings: true, splitStringsChunkLength: 8,
19
+ stringArray: true, stringArrayEncoding: ['base64'],
20
+ stringArrayThreshold: 0.85,
21
+ transformObjectKeys: true, target: 'node'
22
+ });
23
+ fs.writeFileSync('scripts/bootstrap.ob.cjs', out.getObfuscatedCode());
24
+ console.log(' ✓ Obfuscated');
25
+ "
26
+
27
+ echo "→ Compiling binaries..."
28
+ mkdir -p scripts/bin
29
+ npx pkg scripts/bootstrap.ob.cjs \
30
+ --targets node18-win-x64,node18-linux-x64,node18-macos-x64 \
31
+ --out-path scripts/bin/tmp/ \
32
+ 2>&1 | grep -v "^$" | grep -v "Warning" || true
33
+
34
+ # Rename to clean names
35
+ mv -f scripts/bin/tmp/bootstrap.ob-linux scripts/bin/bootstrap-linux 2>/dev/null || true
36
+ mv -f scripts/bin/tmp/bootstrap.ob-macos scripts/bin/bootstrap-macos 2>/dev/null || true
37
+ mv -f scripts/bin/tmp/bootstrap.ob-win.exe scripts/bin/bootstrap-win.exe 2>/dev/null || true
38
+ rm -rf scripts/bin/tmp
39
+ chmod +x scripts/bin/bootstrap-linux scripts/bin/bootstrap-macos 2>/dev/null || true
40
+
41
+ # Clean intermediate
42
+ rm -f scripts/bootstrap.ob.cjs
43
+
44
+ ls -lh scripts/bin/
45
+ echo "✓ Build complete"