@cipherstash/stack 0.4.0 → 0.6.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/CHANGELOG.md +19 -0
- package/README.md +9 -36
- package/dist/bin/stash.js +220 -184
- package/dist/bin/stash.js.map +1 -1
- package/dist/{chunk-OAPLZLR5.js → chunk-GXGEW6T4.js} +2 -76
- package/dist/chunk-GXGEW6T4.js.map +1 -0
- package/dist/{chunk-KOU2MHXJ.js → chunk-HCL75LXQ.js} +1 -1
- package/dist/chunk-HCL75LXQ.js.map +1 -0
- package/dist/chunk-LBMC4D6D.js +19 -0
- package/dist/chunk-LBMC4D6D.js.map +1 -0
- package/dist/chunk-Q5FTQLYG.js +68 -0
- package/dist/chunk-Q5FTQLYG.js.map +1 -0
- package/dist/{chunk-WUZGKTMG.js → chunk-TGUELLJS.js} +16 -19
- package/dist/chunk-TGUELLJS.js.map +1 -0
- package/dist/chunk-YLISU7FD.js +357 -0
- package/dist/chunk-YLISU7FD.js.map +1 -0
- package/dist/{client-CrGQnSlk.d.ts → client-CJueivkw.d.cts} +36 -3
- package/dist/{client-CUGXheRq.d.cts → client-hHEpZIZH.d.ts} +36 -3
- package/dist/client.d.cts +4 -4
- package/dist/client.d.ts +4 -4
- package/dist/drizzle/index.cjs.map +1 -1
- package/dist/drizzle/index.d.cts +14 -6
- package/dist/drizzle/index.d.ts +14 -6
- package/dist/drizzle/index.js +3 -3
- package/dist/drizzle/index.js.map +1 -1
- package/dist/dynamodb/index.cjs +68 -0
- package/dist/dynamodb/index.cjs.map +1 -1
- package/dist/dynamodb/index.d.cts +4 -4
- package/dist/dynamodb/index.d.ts +4 -4
- package/dist/dynamodb/index.js +9 -0
- package/dist/dynamodb/index.js.map +1 -1
- package/dist/encryption/index.cjs +2572 -0
- package/dist/encryption/index.cjs.map +1 -0
- package/dist/encryption/index.d.cts +7 -0
- package/dist/encryption/index.d.ts +7 -0
- package/dist/encryption/index.js +17 -0
- package/dist/encryption/index.js.map +1 -0
- package/dist/errors/index.cjs +44 -0
- package/dist/errors/index.cjs.map +1 -0
- package/dist/errors/index.d.cts +94 -0
- package/dist/errors/index.d.ts +94 -0
- package/dist/errors/index.js +9 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/identity/index.cjs +21 -13
- package/dist/identity/index.cjs.map +1 -1
- package/dist/identity/index.d.cts +78 -2
- package/dist/identity/index.d.ts +78 -2
- package/dist/identity/index.js +7 -3
- package/dist/identity/index.js.map +1 -1
- package/dist/index.cjs +379 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -19
- package/dist/index.d.ts +21 -19
- package/dist/index.js +14 -8
- package/dist/schema/index.d.cts +1 -2
- package/dist/schema/index.d.ts +1 -2
- package/dist/secrets/index.cjs +70 -39
- package/dist/secrets/index.cjs.map +1 -1
- package/dist/secrets/index.d.cts +4 -6
- package/dist/secrets/index.d.ts +4 -6
- package/dist/secrets/index.js +9 -318
- package/dist/secrets/index.js.map +1 -1
- package/dist/supabase/index.cjs +84 -1
- package/dist/supabase/index.cjs.map +1 -1
- package/dist/supabase/index.d.cts +4 -4
- package/dist/supabase/index.d.ts +4 -4
- package/dist/supabase/index.js +24 -1
- package/dist/supabase/index.js.map +1 -1
- package/dist/{types-public-Wj6tB_ux.d.ts → types-public-07ilcGY-.d.cts} +1 -9
- package/dist/{types-public-Wj6tB_ux.d.cts → types-public-07ilcGY-.d.ts} +1 -9
- package/dist/types-public.cjs.map +1 -1
- package/dist/types-public.d.cts +1 -2
- package/dist/types-public.d.ts +1 -2
- package/dist/types-public.js +1 -1
- package/package.json +29 -1
- package/dist/chunk-KOU2MHXJ.js.map +0 -1
- package/dist/chunk-OAPLZLR5.js.map +0 -1
- package/dist/chunk-WUZGKTMG.js.map +0 -1
- package/dist/index-9-Ya3fDK.d.cts +0 -169
- package/dist/index-9-Ya3fDK.d.ts +0 -169
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @cipherstash/stack
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0b9fd7a: Add notes to CLI about init in prototype phase.
|
|
8
|
+
|
|
9
|
+
## 0.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- a645115: ### Documentation
|
|
14
|
+
|
|
15
|
+
- **TypeDoc**: Improved JSDoc for `Encryption()`, `EncryptOptions`, schema builders (`encryptedTable`, `encryptedColumn`, `encryptedField`, `EncryptedField`, `EncryptedTableColumn`), and `encrypt` / `bulkEncrypt` with clearer `@param`, `@returns`, `@throws`, `@example`, and `@see` links.
|
|
16
|
+
- **README**: Refreshed main repo README and Stack package readme; basic example README now uses `npm install @cipherstash/stack`, CipherStash account and dashboard credentials, and drops Stash CLI references. Added docs badge linking to cipherstash.com/docs.
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **Logging**: Logger is now used consistently across Stack client interfaces for initialization and operations.
|
|
21
|
+
|
|
3
22
|
## 0.4.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -502,48 +502,21 @@ const client2 = await Encryption({
|
|
|
502
502
|
|
|
503
503
|
### Logging
|
|
504
504
|
|
|
505
|
-
The SDK uses
|
|
505
|
+
The SDK uses structured logging across all interfaces (Encryption, Secrets, Supabase, DynamoDB). Each operation emits a single wide event with context such as the operation type, table, column, lock context status, and duration.
|
|
506
506
|
|
|
507
|
-
|
|
507
|
+
Configure the log level with the `STASH_STACK_LOG` environment variable:
|
|
508
508
|
|
|
509
509
|
```bash
|
|
510
|
-
|
|
510
|
+
STASH_STACK_LOG=error # debug | info | error (default: error)
|
|
511
511
|
```
|
|
512
512
|
|
|
513
|
-
|
|
513
|
+
| Value | What is logged |
|
|
514
|
+
| ------- | ---------------------- |
|
|
515
|
+
| `error` | Errors only (default) |
|
|
516
|
+
| `info` | Info and errors |
|
|
517
|
+
| `debug` | Debug, info, and errors |
|
|
514
518
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
```typescript
|
|
518
|
-
const client = await Encryption({
|
|
519
|
-
schemas: [users],
|
|
520
|
-
logging: {
|
|
521
|
-
enabled: true, // toggle logging on/off (default: true)
|
|
522
|
-
pretty: true, // pretty-print in development (default: auto-detected)
|
|
523
|
-
},
|
|
524
|
-
})
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
#### Log draining
|
|
528
|
-
|
|
529
|
-
Send structured logs to an external observability platform by providing a `drain` callback:
|
|
530
|
-
|
|
531
|
-
```typescript
|
|
532
|
-
import { Encryption } from "@cipherstash/stack"
|
|
533
|
-
|
|
534
|
-
const client = await Encryption({
|
|
535
|
-
schemas: [users],
|
|
536
|
-
logging: {
|
|
537
|
-
drain: (ctx) => {
|
|
538
|
-
// Forward to Axiom, Datadog, OTLP, etc.
|
|
539
|
-
fetch("https://your-service.com/logs", {
|
|
540
|
-
method: "POST",
|
|
541
|
-
body: JSON.stringify(ctx.event),
|
|
542
|
-
})
|
|
543
|
-
},
|
|
544
|
-
},
|
|
545
|
-
})
|
|
546
|
-
```
|
|
519
|
+
When `STASH_STACK_LOG` is not set, the SDK defaults to `error` (errors only).
|
|
547
520
|
|
|
548
521
|
The SDK never logs plaintext data.
|
|
549
522
|
|