@uglyunicorn/pie 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +21 -1
  2. package/body.txt +0 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ Validate payloads with your schema, seal with a public key, and open with the ma
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- bun add @uglyunicorn/pie valibot
12
+ bun add @uglyunicorn/pie valibot hpke
13
13
  # or: npm install @uglyunicorn/pie valibot
14
14
  ```
15
15
 
@@ -64,3 +64,23 @@ Output:
64
64
  "weight": 70
65
65
  }
66
66
  ```
67
+
68
+ ```ts
69
+ const decryptContext = envelopeContext({ in: keyPair });
70
+
71
+ const decrypted = await v.parseAsync(userProfileSchema(decryptContext), sealed);
72
+ console.log(decrypted);
73
+ ```
74
+
75
+ Output:
76
+
77
+ ```json
78
+ {
79
+ "identity": {
80
+ "name": "John Doe",
81
+ "email": "john.doe@example.com"
82
+ },
83
+ "height": 180,
84
+ "weight": 70
85
+ }
86
+ ```
package/body.txt CHANGED
@@ -1,5 +0,0 @@
1
- * Add CI workflows, build scripts, and schema/readme updates
2
-
3
- * fix: standardize YAML formatting and improve coverage check regex
4
-
5
- * docs: add Codecov badge to README for coverage tracking
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uglyunicorn/pie",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "scripts": {