@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.
Files changed (80) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +9 -36
  3. package/dist/bin/stash.js +220 -184
  4. package/dist/bin/stash.js.map +1 -1
  5. package/dist/{chunk-OAPLZLR5.js → chunk-GXGEW6T4.js} +2 -76
  6. package/dist/chunk-GXGEW6T4.js.map +1 -0
  7. package/dist/{chunk-KOU2MHXJ.js → chunk-HCL75LXQ.js} +1 -1
  8. package/dist/chunk-HCL75LXQ.js.map +1 -0
  9. package/dist/chunk-LBMC4D6D.js +19 -0
  10. package/dist/chunk-LBMC4D6D.js.map +1 -0
  11. package/dist/chunk-Q5FTQLYG.js +68 -0
  12. package/dist/chunk-Q5FTQLYG.js.map +1 -0
  13. package/dist/{chunk-WUZGKTMG.js → chunk-TGUELLJS.js} +16 -19
  14. package/dist/chunk-TGUELLJS.js.map +1 -0
  15. package/dist/chunk-YLISU7FD.js +357 -0
  16. package/dist/chunk-YLISU7FD.js.map +1 -0
  17. package/dist/{client-CrGQnSlk.d.ts → client-CJueivkw.d.cts} +36 -3
  18. package/dist/{client-CUGXheRq.d.cts → client-hHEpZIZH.d.ts} +36 -3
  19. package/dist/client.d.cts +4 -4
  20. package/dist/client.d.ts +4 -4
  21. package/dist/drizzle/index.cjs.map +1 -1
  22. package/dist/drizzle/index.d.cts +14 -6
  23. package/dist/drizzle/index.d.ts +14 -6
  24. package/dist/drizzle/index.js +3 -3
  25. package/dist/drizzle/index.js.map +1 -1
  26. package/dist/dynamodb/index.cjs +68 -0
  27. package/dist/dynamodb/index.cjs.map +1 -1
  28. package/dist/dynamodb/index.d.cts +4 -4
  29. package/dist/dynamodb/index.d.ts +4 -4
  30. package/dist/dynamodb/index.js +9 -0
  31. package/dist/dynamodb/index.js.map +1 -1
  32. package/dist/encryption/index.cjs +2572 -0
  33. package/dist/encryption/index.cjs.map +1 -0
  34. package/dist/encryption/index.d.cts +7 -0
  35. package/dist/encryption/index.d.ts +7 -0
  36. package/dist/encryption/index.js +17 -0
  37. package/dist/encryption/index.js.map +1 -0
  38. package/dist/errors/index.cjs +44 -0
  39. package/dist/errors/index.cjs.map +1 -0
  40. package/dist/errors/index.d.cts +94 -0
  41. package/dist/errors/index.d.ts +94 -0
  42. package/dist/errors/index.js +9 -0
  43. package/dist/errors/index.js.map +1 -0
  44. package/dist/identity/index.cjs +21 -13
  45. package/dist/identity/index.cjs.map +1 -1
  46. package/dist/identity/index.d.cts +78 -2
  47. package/dist/identity/index.d.ts +78 -2
  48. package/dist/identity/index.js +7 -3
  49. package/dist/identity/index.js.map +1 -1
  50. package/dist/index.cjs +379 -41
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +21 -19
  53. package/dist/index.d.ts +21 -19
  54. package/dist/index.js +14 -8
  55. package/dist/schema/index.d.cts +1 -2
  56. package/dist/schema/index.d.ts +1 -2
  57. package/dist/secrets/index.cjs +70 -39
  58. package/dist/secrets/index.cjs.map +1 -1
  59. package/dist/secrets/index.d.cts +4 -6
  60. package/dist/secrets/index.d.ts +4 -6
  61. package/dist/secrets/index.js +9 -318
  62. package/dist/secrets/index.js.map +1 -1
  63. package/dist/supabase/index.cjs +84 -1
  64. package/dist/supabase/index.cjs.map +1 -1
  65. package/dist/supabase/index.d.cts +4 -4
  66. package/dist/supabase/index.d.ts +4 -4
  67. package/dist/supabase/index.js +24 -1
  68. package/dist/supabase/index.js.map +1 -1
  69. package/dist/{types-public-Wj6tB_ux.d.ts → types-public-07ilcGY-.d.cts} +1 -9
  70. package/dist/{types-public-Wj6tB_ux.d.cts → types-public-07ilcGY-.d.ts} +1 -9
  71. package/dist/types-public.cjs.map +1 -1
  72. package/dist/types-public.d.cts +1 -2
  73. package/dist/types-public.d.ts +1 -2
  74. package/dist/types-public.js +1 -1
  75. package/package.json +29 -1
  76. package/dist/chunk-KOU2MHXJ.js.map +0 -1
  77. package/dist/chunk-OAPLZLR5.js.map +0 -1
  78. package/dist/chunk-WUZGKTMG.js.map +0 -1
  79. package/dist/index-9-Ya3fDK.d.cts +0 -169
  80. 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 [evlog](https://github.com/HugoRCD/evlog) for structured logging. Each encryption operation emits a single wide event with context such as the operation type, table, column, lock context status, and duration.
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
- #### Environment variable
507
+ Configure the log level with the `STASH_STACK_LOG` environment variable:
508
508
 
509
509
  ```bash
510
- STASH_LOG_LEVEL=debug # debug | info | warn | error (default: info)
510
+ STASH_STACK_LOG=error # debug | info | error (default: error)
511
511
  ```
512
512
 
513
- #### Programmatic configuration
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
- Pass a `logging` option when initializing the client:
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