@hugoalh/github-sodium 6.0.0 → 6.0.1
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/README.md +9 -3
- package/libsodium/cli.js +5 -1
- package/package.json +1 -1
- package/tweetsodium/cli.js +5 -1
package/README.md
CHANGED
|
@@ -76,9 +76,15 @@ This does not request any runtime permission.
|
|
|
76
76
|
|
|
77
77
|
## 🧩 CLIs
|
|
78
78
|
|
|
79
|
-
```powershell
|
|
80
|
-
ghs
|
|
81
|
-
```
|
|
79
|
+
- ```powershell
|
|
80
|
+
ghs $PublicKey $SecretValue
|
|
81
|
+
```
|
|
82
|
+
- ```powershell
|
|
83
|
+
ghs-ls $PublicKey $SecretValue
|
|
84
|
+
```
|
|
85
|
+
- ```powershell
|
|
86
|
+
ghs-ts $PublicKey $SecretValue
|
|
87
|
+
```
|
|
82
88
|
|
|
83
89
|
## ✍️ Examples
|
|
84
90
|
|
package/libsodium/cli.js
CHANGED
|
@@ -5,5 +5,9 @@ import { GitHubSodiumSealer } from "../libsodium.js";
|
|
|
5
5
|
if (!globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).main) {
|
|
6
6
|
throw new Error(`This entrypoint is for command line only!`);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const args = dntShim.Deno.args;
|
|
9
|
+
if (args.length !== 2) {
|
|
10
|
+
throw new Error(`Invalid arguments length; Expect: 2, Current: ${args.length}.`);
|
|
11
|
+
}
|
|
12
|
+
const [publicKey, secretValue] = args;
|
|
9
13
|
console.log(new GitHubSodiumSealer(publicKey).encrypt(secretValue));
|
package/package.json
CHANGED
package/tweetsodium/cli.js
CHANGED
|
@@ -5,5 +5,9 @@ import { GitHubSodiumSealer } from "../tweetsodium.js";
|
|
|
5
5
|
if (!globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).main) {
|
|
6
6
|
throw new Error(`This entrypoint is for command line only!`);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const args = dntShim.Deno.args;
|
|
9
|
+
if (args.length !== 2) {
|
|
10
|
+
throw new Error(`Invalid arguments length; Expect: 2, Current: ${args.length}.`);
|
|
11
|
+
}
|
|
12
|
+
const [publicKey, secretValue] = args;
|
|
9
13
|
console.log(new GitHubSodiumSealer(publicKey).encrypt(secretValue));
|