@hugoalh/github-sodium 6.0.0 → 6.0.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/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 {PublicKey} {SecretValue}
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 [publicKey = "", secretValue = ""] = dntShim.Deno.args;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hugoalh/github-sodium",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "A module to provide an easier and simplified method for encrypt GitHub secrets.",
5
5
  "keywords": [
6
6
  "github",
@@ -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 [publicKey = "", secretValue = ""] = dntShim.Deno.args;
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));