request-wallet-sign 0.1.0 → 0.1.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/index.js +12 -4
- package/package.json +27 -8
package/bin/index.js
CHANGED
|
@@ -1132,10 +1132,18 @@ export async function run(argv) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
1134
|
// ── Entry point ───────────────────────────────────────────────────────────────
|
|
1135
|
-
// Only execute when run directly (not when imported by tests).
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1135
|
+
// Only execute when run directly (not when imported by tests). Resolve symlinks
|
|
1136
|
+
// on both sides: when launched via an installed bin (npx / global install),
|
|
1137
|
+
// process.argv[1] is a symlink in node_modules/.bin whose realpath is this file,
|
|
1138
|
+
// while import.meta.url is already the resolved path — comparing them raw fails.
|
|
1139
|
+
import { realpathSync } from 'node:fs';
|
|
1140
|
+
import { fileURLToPath } from 'node:url';
|
|
1141
|
+
|
|
1142
|
+
let isMain = false;
|
|
1143
|
+
try {
|
|
1144
|
+
isMain = !!process.argv[1] &&
|
|
1145
|
+
realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
|
|
1146
|
+
} catch { isMain = false; }
|
|
1139
1147
|
|
|
1140
1148
|
if (isMain) {
|
|
1141
1149
|
run(process.argv);
|
package/package.json
CHANGED
|
@@ -1,19 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "request-wallet-sign",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Let AI agents surface wallet signing requests to users via a local browser page",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"engines": {
|
|
7
|
-
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=18"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"request-wallet-sign": "./bin/index.js"
|
|
11
|
+
},
|
|
8
12
|
"scripts": {
|
|
9
13
|
"test": "node --test",
|
|
10
14
|
"prepublishOnly": "node --test"
|
|
11
15
|
},
|
|
12
|
-
"files": [
|
|
13
|
-
|
|
16
|
+
"files": [
|
|
17
|
+
"bin/index.js"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [
|
|
20
|
+
"wallet",
|
|
21
|
+
"ethereum",
|
|
22
|
+
"signing",
|
|
23
|
+
"agent",
|
|
24
|
+
"cli",
|
|
25
|
+
"clear-signing",
|
|
26
|
+
"erc-7730"
|
|
27
|
+
],
|
|
14
28
|
"author": "Elliott Alexander",
|
|
15
29
|
"license": "MIT",
|
|
16
|
-
"repository": {
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/escottalexander/request-wallet-sign.git"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/escottalexander/request-wallet-sign#readme",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/escottalexander/request-wallet-sign/issues"
|
|
37
|
+
}
|
|
19
38
|
}
|