keypin 0.0.0-stage → 0.0.0
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/LICENSE +21 -0
- package/README.md +104 -2
- package/chunk-9dz90rbw.js +33 -0
- package/chunk-a195bqr7.js +1960 -0
- package/main.js +49 -0
- package/package.json +23 -4
package/main.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// @bun
|
|
3
|
+
import {
|
|
4
|
+
__require,
|
|
5
|
+
installProblem
|
|
6
|
+
} from "./chunk-9dz90rbw.js";
|
|
7
|
+
|
|
8
|
+
// src/runtime.ts
|
|
9
|
+
var MIN_BUN = "1.4.4";
|
|
10
|
+
function runtimeProblem(bun, script) {
|
|
11
|
+
if (bun === undefined)
|
|
12
|
+
return `keypin runs on Bun ${MIN_BUN} or newer, not Node.`;
|
|
13
|
+
if (olderThan(bun, MIN_BUN)) {
|
|
14
|
+
return `keypin needs Bun ${MIN_BUN} or newer, because older Bun can read a keypin.toml wrong, and this is Bun ${bun}. Upgrade Bun, or run it with "bunx bun@${MIN_BUN} ${script}".`;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
function olderThan(version, minimum) {
|
|
19
|
+
const parts = (v) => v.split(/[.+-]/).slice(0, 3).map(Number);
|
|
20
|
+
const a = parts(version);
|
|
21
|
+
const b = parts(minimum);
|
|
22
|
+
for (let i = 0;i < 3; i++) {
|
|
23
|
+
const left = a[i] ?? 0;
|
|
24
|
+
const right = b[i] ?? 0;
|
|
25
|
+
if (left !== right)
|
|
26
|
+
return left < right;
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/main.ts
|
|
32
|
+
var problem = runtimeProblem(typeof Bun === "undefined" ? undefined : Bun.version, process.argv[1] ?? "keypin");
|
|
33
|
+
if (problem) {
|
|
34
|
+
process.stderr.write(`keypin: ${problem}
|
|
35
|
+
`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
var start;
|
|
39
|
+
try {
|
|
40
|
+
start = await import("./chunk-a195bqr7.js");
|
|
41
|
+
} catch (error) {
|
|
42
|
+
const hint = installProblem(error);
|
|
43
|
+
if (!hint)
|
|
44
|
+
throw error;
|
|
45
|
+
process.stderr.write(`keypin: ${hint}
|
|
46
|
+
`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
process.exitCode = await start.main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keypin",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "A map of every app key across your projects, published to the account it's pinned to. Values stay in your vault.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/caiopizzol/keypin#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/caiopizzol/keypin/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/caiopizzol/keypin.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"bin": {
|
|
16
|
+
"keypin": "main.js"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"bun": ">=1.4.4"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@1password/sdk": "0.5.0",
|
|
23
|
+
"libsodium-wrappers": "0.8.4"
|
|
24
|
+
}
|
|
25
|
+
}
|