@mp-lb/forum-secrets 0.2.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/README.md +28 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +14786 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14721 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Doctrine Secrets
|
|
2
|
+
|
|
3
|
+
Decrypt Doctrine encrypted text files from CI or other Node.js runtimes.
|
|
4
|
+
|
|
5
|
+
## CLI
|
|
6
|
+
|
|
7
|
+
Store the external recipient secret in your CI secret manager:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
doctrine-secrets decrypt secrets.enc.json > secrets.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The CLI reads the recipient secret from `DOCTRINE_RECIPIENT_SECRET` by default.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
DOCTRINE_RECIPIENT_SECRET='doctrine-recipient-v1_...' doctrine-secrets decrypt secrets.enc.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Library
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { decryptDoctrineEncryptedFileText } from "@mp-lb/forum-secrets";
|
|
23
|
+
|
|
24
|
+
const plaintext = await decryptDoctrineEncryptedFileText({
|
|
25
|
+
encryptedText,
|
|
26
|
+
recipientSecret: process.env.DOCTRINE_RECIPIENT_SECRET!,
|
|
27
|
+
});
|
|
28
|
+
```
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|