@hugoalh/github-sodium 2.0.1 → 2.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 +48 -25
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
# GitHub Sodium (NodeJS)
|
|
2
2
|
|
|
3
3
|
[`GitHubSodium.NodeJS`](https://github.com/hugoalh-studio/github-sodium-nodejs)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[) | **Pre** () |
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
[](https://github.com/hugoalh-studio/github-sodium-nodejs/stargazers)
|
|
8
|
+
[](https://github.com/hugoalh-studio/github-sodium-nodejs/graphs/contributors)
|
|
9
|
+
[](https://github.com/hugoalh-studio/github-sodium-nodejs/issues)
|
|
10
|
+
[](https://github.com/hugoalh-studio/github-sodium-nodejs/pulls)
|
|
11
|
+
[](https://github.com/hugoalh-studio/github-sodium-nodejs/discussions)
|
|
12
|
+
[](https://www.codefactor.io/repository/github/hugoalh-studio/github-sodium-nodejs)
|
|
13
|
+
|
|
14
|
+
| **Releases** | **Latest** () | **Pre** () |
|
|
17
15
|
|:-:|:-:|:-:|
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
16
|
+
| [](https://github.com/hugoalh-studio/github-sodium-nodejs/releases)  |  |  |
|
|
17
|
+
| [](https://www.npmjs.com/package/@hugoalh/github-sodium)  |  |  |
|
|
20
18
|
|
|
21
19
|
## 📝 Description
|
|
22
20
|
|
|
23
|
-
A NodeJS module to provide an easier sodium for GitHub
|
|
21
|
+
A NodeJS module to provide an easier sodium for GitHub secrets.
|
|
24
22
|
|
|
25
|
-
This project is based on `libsodium.js` ([GitHub](https://github.com/jedisct1/libsodium.js))([NPM](https://www.npmjs.com/package/libsodium))(for ModuleJS) and `tweetsodium` ([GitHub](https://github.com/github/tweetsodium))([NPM](https://www.npmjs.com/package/tweetsodium))(for CommonJS) with optimization for GitHub
|
|
23
|
+
This project is based on `libsodium.js` ([GitHub](https://github.com/jedisct1/libsodium.js))([NPM](https://www.npmjs.com/package/libsodium))(for ModuleJS) and `tweetsodium` ([GitHub](https://github.com/github/tweetsodium))([NPM](https://www.npmjs.com/package/tweetsodium))(for CommonJS) with optimization for GitHub secrets.
|
|
26
24
|
|
|
27
25
|
## 📚 Documentation
|
|
28
26
|
|
|
@@ -30,20 +28,21 @@ This project is based on `libsodium.js` ([GitHub](https://github.com/jedisct1/li
|
|
|
30
28
|
|
|
31
29
|
#### Install
|
|
32
30
|
|
|
33
|
-
- NodeJS >=
|
|
34
|
-
- NPM >= v6.14.8
|
|
31
|
+
- NodeJS >= v10.13.0
|
|
35
32
|
|
|
36
33
|
```sh
|
|
37
34
|
npm install @hugoalh/github-sodium
|
|
38
35
|
```
|
|
39
36
|
|
|
40
|
-
#### Use
|
|
37
|
+
#### Use
|
|
38
|
+
|
|
39
|
+
##### CommonJS
|
|
41
40
|
|
|
42
41
|
```js
|
|
43
42
|
const githubSodium = require("@hugoalh/github-sodium");
|
|
44
43
|
```
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
##### ModuleJS
|
|
47
46
|
|
|
48
47
|
```js
|
|
49
48
|
/* Either */
|
|
@@ -56,13 +55,37 @@ import { ... } from "@hugoalh/github-sodium";// Part / Tree-shake
|
|
|
56
55
|
|
|
57
56
|
#### Class
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
<ul>
|
|
59
|
+
<li><code>GitHubSodiumSealer</code></li>
|
|
60
|
+
<ul>
|
|
61
|
+
<li>
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
@constructor(publicKey: string): GitHubSodiumSealer
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</li>
|
|
68
|
+
<li>
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
encrypt(value: string): string
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
</li>
|
|
75
|
+
</ul>
|
|
76
|
+
</ul>
|
|
62
77
|
|
|
63
78
|
#### Function
|
|
64
79
|
|
|
65
|
-
|
|
80
|
+
<ul>
|
|
81
|
+
<li>
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
seal(publicKey: string, value: string): string
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
66
89
|
|
|
67
90
|
### Example
|
|
68
91
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hugoalh/github-sodium",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A module to provide an easier sodium for GitHub secret.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -24,16 +24,15 @@
|
|
|
24
24
|
"url": "git+https://github.com/hugoalh-studio/github-sodium-nodejs.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@hugoalh/advanced-determine": "^7.1.
|
|
27
|
+
"@hugoalh/advanced-determine": "^7.1.5",
|
|
28
28
|
"libsodium-wrappers": "^0.7.10",
|
|
29
|
-
"tweetsodium": "
|
|
29
|
+
"tweetsodium": "0.0.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/libsodium-wrappers": "^0.7.9"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": ">=
|
|
36
|
-
"npm": ">= 6.14.8"
|
|
35
|
+
"node": ">=10.13.0"
|
|
37
36
|
},
|
|
38
37
|
"private": false
|
|
39
38
|
}
|