@reventlessdev/reventless-core 3.0.0-alpha.314 → 3.0.0-alpha.315
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/CHANGELOG.md +20 -0
- package/package.json +8 -8
- package/tests/pii/AesGcmTest.res.mjs +42 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.315 (2026-10-29)
|
|
7
|
+
|
|
8
|
+
* feat(ppx)!: `@pii` marks a value about a person, and an event reads it as `Pii.t` ([37174c1](https://github.com/ReventlessDev/reventless-core/commit/37174c10eb80e9e3adbb93a52ad7a9ef5def7100))
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **bindings:** AES-256-GCM in rescript-node and a KMS client in rescript-aws-sdk ([4c57d9a](https://github.com/ReventlessDev/reventless-core/commit/4c57d9a4572b8d4986670f923b57e5b81912e857))
|
|
12
|
+
* **core:** no log line prints a personal value ([af03709](https://github.com/ReventlessDev/reventless-core/commit/af037090770992c254e5dc69ab71ef251bad2db9))
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* the ledger's events carry `address: Pii.t<Email.t>`. Pattern-match
|
|
17
|
+
`Value(address)` where the address is read.
|
|
18
|
+
|
|
19
|
+
The published per-platform PPX binary does not know `@pii` until it is republished.
|
|
20
|
+
|
|
21
|
+
Step PD2 of docs/plans/a-personal-field-is-marked-redacted-and-encrypted-at-the-seam.md.
|
|
22
|
+
Claude-Session: https://claude.ai/code/session_01HiQfdxVEsHwLHRoHSUcus1
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# 3.0.0-alpha.314 (2026-10-29)
|
|
7
27
|
|
|
8
28
|
* feat(ppx)!: `@pii` marks a value about a person, and an event reads it as `Pii.t` ([37174c1](https://github.com/ReventlessDev/reventless-core/commit/37174c10eb80e9e3adbb93a52ad7a9ef5def7100))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.315",
|
|
4
4
|
"description": "Core package for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"sury": "11.0.0",
|
|
30
30
|
"uuid": "^13.0.0",
|
|
31
31
|
"@reventlessdev/rescript-effect": "1.0.0-alpha.1",
|
|
32
|
-
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.
|
|
33
|
-
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.15",
|
|
32
|
+
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.24",
|
|
34
33
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.13",
|
|
35
|
-
"@reventlessdev/rescript-node": "2.0.0-alpha.
|
|
34
|
+
"@reventlessdev/rescript-node": "2.0.0-alpha.24",
|
|
35
|
+
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.15",
|
|
36
36
|
"@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
|
|
37
|
-
"@reventlessdev/
|
|
38
|
-
"@reventlessdev/reventless-infra": "3.0.0-alpha.211",
|
|
39
|
-
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
37
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.212",
|
|
40
38
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.42",
|
|
41
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.
|
|
39
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.183",
|
|
40
|
+
"@reventlessdev/rescript-ssh2": "2.0.0-alpha.25",
|
|
41
|
+
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"rescript": "12.3.1",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as NodeCrypto from "@reventlessdev/rescript-node/src/NodeCrypto.res.mjs";
|
|
4
|
+
import * as Stdlib_Result from "@rescript/runtime/lib/es6/Stdlib_Result.js";
|
|
5
|
+
|
|
6
|
+
let key = NodeCrypto.aesKey();
|
|
7
|
+
|
|
8
|
+
globalThis.describe("NodeCrypto AES-256-GCM", () => {
|
|
9
|
+
globalThis.test("round-trips, and never repeats a ciphertext", () => {
|
|
10
|
+
let a = NodeCrypto.aesGcmEncrypt(key, undefined, "Ada Lovelace");
|
|
11
|
+
let b = NodeCrypto.aesGcmEncrypt(key, undefined, "Ada Lovelace");
|
|
12
|
+
globalThis.expect(a === b).toBe(false);
|
|
13
|
+
globalThis.expect(NodeCrypto.aesGcmDecrypt(key, undefined, a)).toEqual({
|
|
14
|
+
TAG: "Ok",
|
|
15
|
+
_0: "Ada Lovelace"
|
|
16
|
+
});
|
|
17
|
+
globalThis.expect(a.includes("Ada")).toBe(false);
|
|
18
|
+
});
|
|
19
|
+
globalThis.test("a tampered value does not open", () => {
|
|
20
|
+
let sealed = NodeCrypto.aesGcmEncrypt(key, undefined, "Ada Lovelace");
|
|
21
|
+
let flipped = sealed.charAt(20) === "A" ? "B" : "A";
|
|
22
|
+
let tampered = sealed.slice(0, 20) + flipped + sealed.slice(21);
|
|
23
|
+
globalThis.expect(Stdlib_Result.isError(NodeCrypto.aesGcmDecrypt(key, undefined, tampered))).toBe(true);
|
|
24
|
+
});
|
|
25
|
+
globalThis.test("another key, or another aad, does not open it", () => {
|
|
26
|
+
let sealed = NodeCrypto.aesGcmEncrypt(key, "member-1/name", "Ada");
|
|
27
|
+
globalThis.expect(Stdlib_Result.isError(NodeCrypto.aesGcmDecrypt(NodeCrypto.aesKey(), "member-1/name", sealed))).toBe(true);
|
|
28
|
+
globalThis.expect(Stdlib_Result.isError(NodeCrypto.aesGcmDecrypt(key, "member-2/name", sealed))).toBe(true);
|
|
29
|
+
globalThis.expect(NodeCrypto.aesGcmDecrypt(key, "member-1/name", sealed)).toEqual({
|
|
30
|
+
TAG: "Ok",
|
|
31
|
+
_0: "Ada"
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
globalThis.test("a value too short to hold a nonce and a tag is refused", () => {
|
|
35
|
+
globalThis.expect(Stdlib_Result.isError(NodeCrypto.aesGcmDecrypt(key, undefined, "AAAA"))).toBe(true);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
key,
|
|
41
|
+
}
|
|
42
|
+
/* key Not a pure module */
|