@fsg-vault/agent 1.0.4 → 1.0.6

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.
@@ -1,8 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const proxy_1 = require("./proxy");
4
- // Using node-addon-api bindings
5
- const nativeVault = require('bindings')('fsg_vault');
4
+ const path = require('path');
5
+ // Using node-addon-api bindings.
6
+ // Prebuildify may name the file '@fsg-vault+agent.node' in some environments.
7
+ let nativeVault;
8
+ try {
9
+ nativeVault = require('bindings')('fsg_vault');
10
+ }
11
+ catch (e) {
12
+ // Fallback for prebuildify scoped naming
13
+ const prebuildPath = path.join(__dirname, '..', 'prebuilds', `${process.platform}-${process.arch}`, '@fsg-vault+agent.node');
14
+ nativeVault = require(prebuildPath);
15
+ }
6
16
  // Fetching args passed from CLI
7
17
  const masterKey = process.env.FSG_MASTER_KEY;
8
18
  const ciphertext = process.env.FSG_CIPHERTEXT;
package/package.json CHANGED
@@ -1,29 +1,33 @@
1
- {
2
- "name": "@fsg-vault/agent",
3
- "version": "1.0.4",
4
- "description": "FSG Vault Agent CLI",
5
- "main": "dist/cli.js",
6
- "bin": {
7
- "fsg-vault": "./dist/cli.js",
8
- "pg-specter": "./dist/cli.js"
9
- },
10
- "files": [
11
- "dist"
12
- ],
13
- "scripts": {
14
- "build": "tsc",
15
- "prepublishOnly": "npm run build",
16
- "dev": "ts-node src/cli.ts"
17
- },
18
- "dependencies": {
19
- "bindings": "^1.5.0",
20
- "commander": "^12.1.0",
21
- "node-addon-api": "^8.0.0"
22
- },
23
- "devDependencies": {
24
- "@types/node": "^20.12.12",
25
- "node-gyp": "^10.1.0",
26
- "ts-node": "^10.9.2",
27
- "typescript": "^5.4.5"
28
- }
1
+ {
2
+ "name": "@fsg-vault/agent",
3
+ "version": "1.0.6",
4
+ "description": "FSG Vault Agent CLI",
5
+ "main": "dist/cli.js",
6
+ "bin": {
7
+ "fsg-vault": "./dist/cli.js",
8
+ "pg-specter": "./dist/cli.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "prebuilds"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc && prebuildify --napi --strip",
16
+ "prebuild": "prebuildify --napi --strip",
17
+ "install": "node -e \"process.exit(0)\"",
18
+ "prepublishOnly": "npm run build",
19
+ "dev": "ts-node src/cli.ts"
20
+ },
21
+ "dependencies": {
22
+ "bindings": "^1.5.0",
23
+ "commander": "^12.1.0"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^20.12.12",
27
+ "node-addon-api": "^8.0.0",
28
+ "node-gyp": "^10.1.0",
29
+ "prebuildify": "^6.0.1",
30
+ "ts-node": "^10.9.2",
31
+ "typescript": "^5.4.5"
32
+ }
29
33
  }