@cipherstash/stack 0.7.0 → 0.9.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 +12 -0
- package/README.md +33 -3
- package/dist/bin/stash.js +419 -204
- package/dist/bin/stash.js.map +1 -1
- package/dist/{chunk-URZNWMOO.js → chunk-3BOJHROP.js} +3 -3
- package/dist/{chunk-H7IHWDZI.js → chunk-4C52Q5R6.js} +2 -2
- package/dist/{chunk-Y35W4WFN.js → chunk-Y3KSTOVR.js} +35 -4
- package/dist/chunk-Y3KSTOVR.js.map +1 -0
- package/dist/{client-DQMy1ux5.d.cts → client-CV7X5Hrt.d.cts} +1 -1
- package/dist/{client-zxrOpegN.d.ts → client-_63nbmO7.d.ts} +1 -1
- package/dist/client.cjs +14 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/drizzle/index.cjs +14 -3
- package/dist/drizzle/index.cjs.map +1 -1
- package/dist/drizzle/index.d.cts +2 -2
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/drizzle/index.js +1 -1
- package/dist/dynamodb/index.d.cts +2 -2
- package/dist/dynamodb/index.d.ts +2 -2
- package/dist/encryption/index.cjs +11 -0
- package/dist/encryption/index.cjs.map +1 -1
- package/dist/encryption/index.d.cts +2 -2
- package/dist/encryption/index.d.ts +2 -2
- package/dist/encryption/index.js +2 -2
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/schema/index.cjs +38 -5
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +7 -3
- package/dist/secrets/index.cjs +14 -3
- package/dist/secrets/index.cjs.map +1 -1
- package/dist/secrets/index.d.cts +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +3 -3
- package/dist/supabase/index.cjs +28 -5
- package/dist/supabase/index.cjs.map +1 -1
- package/dist/supabase/index.d.cts +2 -2
- package/dist/supabase/index.d.ts +2 -2
- package/dist/supabase/index.js +17 -5
- package/dist/supabase/index.js.map +1 -1
- package/dist/{types-public-07ilcGY-.d.ts → types-public-B5YxQhR6.d.cts} +25 -9
- package/dist/{types-public-07ilcGY-.d.cts → types-public-B5YxQhR6.d.ts} +25 -9
- package/dist/types-public.d.cts +1 -1
- package/dist/types-public.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-Y35W4WFN.js.map +0 -1
- /package/dist/{chunk-URZNWMOO.js.map → chunk-3BOJHROP.js.map} +0 -0
- /package/dist/{chunk-H7IHWDZI.js.map → chunk-4C52Q5R6.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @cipherstash/stack
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2b907a1: Improve CLI user experience for developer onboarding.
|
|
8
|
+
|
|
9
|
+
## 0.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 3414761: Fixed Supabase or wrapper to escape EQL payloads correctly.
|
|
14
|
+
|
|
3
15
|
## 0.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ if (decrypted.failure) {
|
|
|
85
85
|
- **Bulk operations** - Encrypt or decrypt thousands of values in a single ZeroKMS call (`bulkEncrypt`, `bulkDecrypt`, `bulkEncryptModels`, `bulkDecryptModels`).
|
|
86
86
|
- **Identity-aware encryption** - Tie encryption to a user's JWT via `LockContext`, so only that user can decrypt.
|
|
87
87
|
- **Secrets management** - Store, retrieve, list, and delete encrypted secrets with the `Secrets` class.
|
|
88
|
-
- **CLI (`stash`)** -
|
|
88
|
+
- **CLI (`stash`)** - Initialize projects, manage secrets, and set up encryption from the terminal.
|
|
89
89
|
- **TypeScript-first** - Strongly typed schemas, results, and model operations with full generics support.
|
|
90
90
|
|
|
91
91
|
## Schema Definition
|
|
@@ -287,6 +287,14 @@ await supabase.from("users").select().eq("email", term.data)
|
|
|
287
287
|
|
|
288
288
|
Each term in a batch can have its own `returnType`.
|
|
289
289
|
|
|
290
|
+
### Ordering Encrypted Data
|
|
291
|
+
|
|
292
|
+
**`ORDER BY` on encrypted columns requires operator family support in the database.**
|
|
293
|
+
|
|
294
|
+
On databases without operator families (e.g. Supabase, or when EQL is installed with `--exclude-operator-family`), sorting on encrypted columns is not currently supported — regardless of the client or ORM used. Sort application-side after decrypting the results as a workaround.
|
|
295
|
+
|
|
296
|
+
Operator family support for Supabase is being developed in collaboration with the Supabase and CipherStash teams and will be available in a future release.
|
|
297
|
+
|
|
290
298
|
### PostgreSQL / Drizzle Integration Pattern
|
|
291
299
|
|
|
292
300
|
Encrypted data is stored as an [EQL](https://github.com/cipherstash/encrypt-query-language) JSON payload. Install the EQL extension in PostgreSQL to enable searchable queries, then store encrypted data in `eql_v2_encrypted` columns.
|
|
@@ -422,6 +430,30 @@ await secrets.delete("DATABASE_URL")
|
|
|
422
430
|
|
|
423
431
|
The `stash` CLI is bundled with the package and available after install.
|
|
424
432
|
|
|
433
|
+
### `stash init`
|
|
434
|
+
|
|
435
|
+
Initialize CipherStash for your project with an interactive wizard.
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
npx stash init
|
|
439
|
+
npx stash init --supabase
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
The wizard will:
|
|
443
|
+
1. Choose your database connection method (Drizzle ORM, Supabase JS, Prisma, or Raw SQL)
|
|
444
|
+
2. Build an encryption schema interactively or use a placeholder, then generate the encryption client file
|
|
445
|
+
3. Install `@cipherstash/stack-forge` as a dev dependency for database tooling
|
|
446
|
+
|
|
447
|
+
After `stash init`, create a CipherStash account at [dashboard.cipherstash.com/sign-up](https://dashboard.cipherstash.com/sign-up) to get your credentials, then run `npx stash-forge setup` to configure your database connection.
|
|
448
|
+
|
|
449
|
+
| Flag | Description |
|
|
450
|
+
|------|-------------|
|
|
451
|
+
| `--supabase` | Use Supabase-specific setup flow |
|
|
452
|
+
|
|
453
|
+
### `stash secrets`
|
|
454
|
+
|
|
455
|
+
Manage encrypted secrets from the terminal.
|
|
456
|
+
|
|
425
457
|
```bash
|
|
426
458
|
npx stash secrets set -name DATABASE_URL -value "postgres://..." -environment production
|
|
427
459
|
npx stash secrets get -name DATABASE_URL -environment production
|
|
@@ -429,8 +461,6 @@ npx stash secrets list -environment production
|
|
|
429
461
|
npx stash secrets delete -name DATABASE_URL -environment production
|
|
430
462
|
```
|
|
431
463
|
|
|
432
|
-
### Commands
|
|
433
|
-
|
|
434
464
|
| Command | Flags | Aliases | Description |
|
|
435
465
|
|-----|----|-----|-------|
|
|
436
466
|
| `stash secrets set` | `-name`, `-value`, `-environment` | `-n`, `-V`, `-e` | Encrypt and store a secret |
|