@cipherstash/stack 1.0.0-rc.0 → 1.0.0-rc.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 (50) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +321 -239
  3. package/dist/adapter-kit.cjs +83 -4
  4. package/dist/adapter-kit.cjs.map +1 -1
  5. package/dist/adapter-kit.d.cts +41 -3
  6. package/dist/adapter-kit.d.ts +41 -3
  7. package/dist/adapter-kit.js +78 -3
  8. package/dist/adapter-kit.js.map +1 -1
  9. package/dist/{chunk-V2Q3NYIH.js → chunk-6SGN52W6.js} +1 -1
  10. package/dist/{chunk-V2Q3NYIH.js.map → chunk-6SGN52W6.js.map} +1 -1
  11. package/dist/{chunk-HQANMV7R.js → chunk-BCY6WB24.js} +3 -3
  12. package/dist/{chunk-HQANMV7R.js.map → chunk-BCY6WB24.js.map} +1 -1
  13. package/dist/{chunk-LBMC4D6D.js → chunk-NVKK7UDN.js} +1 -1
  14. package/dist/chunk-NVKK7UDN.js.map +1 -0
  15. package/dist/{chunk-OFQ555AX.js → chunk-Q4WTOYVI.js} +3 -3
  16. package/dist/{chunk-ZTP5QJ27.js → chunk-UI7V2QCK.js} +6 -6
  17. package/dist/{chunk-ZTP5QJ27.js.map → chunk-UI7V2QCK.js.map} +1 -1
  18. package/dist/{columns-rZc7fQHI.d.ts → columns-0lbT9stl.d.ts} +2 -2
  19. package/dist/{columns-D2_YzrCX.d.cts → columns-Bxv7Oo9o.d.cts} +2 -2
  20. package/dist/dynamodb/index.cjs +2 -2
  21. package/dist/dynamodb/index.cjs.map +1 -1
  22. package/dist/dynamodb/index.js +1 -1
  23. package/dist/encryption/index.cjs +4 -4
  24. package/dist/encryption/index.cjs.map +1 -1
  25. package/dist/encryption/index.js +4 -4
  26. package/dist/encryption/v3.cjs +4 -4
  27. package/dist/encryption/v3.cjs.map +1 -1
  28. package/dist/encryption/v3.d.cts +2 -2
  29. package/dist/encryption/v3.d.ts +2 -2
  30. package/dist/encryption/v3.js +5 -5
  31. package/dist/eql/v3/index.cjs.map +1 -1
  32. package/dist/eql/v3/index.d.cts +2 -2
  33. package/dist/eql/v3/index.d.ts +2 -2
  34. package/dist/eql/v3/index.js +1 -1
  35. package/dist/errors/index.cjs.map +1 -1
  36. package/dist/errors/index.d.cts +5 -5
  37. package/dist/errors/index.d.ts +5 -5
  38. package/dist/errors/index.js +1 -1
  39. package/dist/identity/index.cjs +2 -2
  40. package/dist/identity/index.cjs.map +1 -1
  41. package/dist/identity/index.js +3 -3
  42. package/dist/index.cjs +4 -4
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.js +4 -4
  45. package/dist/wasm-inline.d.ts +243 -58
  46. package/dist/wasm-inline.js +268 -0
  47. package/dist/wasm-inline.js.map +1 -1
  48. package/package.json +16 -16
  49. package/dist/chunk-LBMC4D6D.js.map +0 -1
  50. /package/dist/{chunk-OFQ555AX.js.map → chunk-Q4WTOYVI.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cipherstash/stack",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.2",
4
4
  "description": "CipherStash Stack for TypeScript and JavaScript",
5
5
  "keywords": [
6
6
  "encrypted",
@@ -192,24 +192,24 @@
192
192
  },
193
193
  "devDependencies": {
194
194
  "@cipherstash/eql": "3.0.0",
195
- "@clack/prompts": "^1.4.0",
196
- "@clerk/backend": "3.4.9",
197
- "@supabase/postgrest-js": "2.105.4",
198
- "@supabase/supabase-js": "^2.110.0",
195
+ "@clack/prompts": "^1.7.0",
196
+ "@clerk/backend": "3.11.2",
197
+ "@supabase/postgrest-js": "2.110.1",
198
+ "@supabase/supabase-js": "^2.110.1",
199
199
  "@types/pg": "^8.20.0",
200
200
  "@types/uuid": "^11.0.0",
201
201
  "dotenv": "17.4.2",
202
202
  "drizzle-orm": "^0.45.2",
203
203
  "execa": "^9.5.2",
204
- "fast-check": "^4.8.0",
204
+ "fast-check": "^4.9.0",
205
205
  "fta-cli": "3.0.0",
206
206
  "json-schema-to-typescript": "^15.0.2",
207
- "pg": "8.20.0",
207
+ "pg": "8.22.0",
208
208
  "postgres": "^3.4.8",
209
209
  "tsup": "8.5.1",
210
- "tsx": "4.22.1",
210
+ "tsx": "4.23.0",
211
211
  "typescript": "5.9.3",
212
- "vitest": "3.2.6"
212
+ "vitest": "3.2.7"
213
213
  },
214
214
  "publishConfig": {
215
215
  "access": "public"
@@ -219,17 +219,17 @@
219
219
  "@cipherstash/auth": "0.41.0",
220
220
  "@cipherstash/protect-ffi": "0.29.0",
221
221
  "evlog": "1.11.0",
222
- "uuid": "14.0.0",
222
+ "uuid": "14.0.1",
223
223
  "zod": "3.25.76"
224
224
  },
225
225
  "//optionalDependencies": "@cipherstash/auth ships per-platform native bindings as optional peerDependencies. pnpm does not auto-install platform-matched optional peer deps, so we declare them here as optionalDependencies — pnpm then picks the binary matching the host's os/cpu (from each sub-package's own package.json) and ignores the rest. Required because @cipherstash/stack re-exports the Node auth strategies (OidcFederationStrategy, AccessKeyStrategy, …). All seven names share a single catalog entry to keep them in lockstep.",
226
226
  "optionalDependencies": {
227
- "@cipherstash/auth-darwin-arm64": "0.41.0",
228
- "@cipherstash/auth-darwin-x64": "0.41.0",
229
- "@cipherstash/auth-linux-arm64-gnu": "0.41.0",
230
- "@cipherstash/auth-linux-x64-gnu": "0.41.0",
231
- "@cipherstash/auth-linux-x64-musl": "0.41.0",
232
- "@cipherstash/auth-win32-x64-msvc": "0.41.0"
227
+ "@cipherstash/auth-darwin-arm64": "0.42.0",
228
+ "@cipherstash/auth-darwin-x64": "0.42.0",
229
+ "@cipherstash/auth-linux-arm64-gnu": "0.42.0",
230
+ "@cipherstash/auth-linux-x64-gnu": "0.42.0",
231
+ "@cipherstash/auth-linux-x64-musl": "0.42.0",
232
+ "@cipherstash/auth-win32-x64-msvc": "0.42.0"
233
233
  },
234
234
  "engines": {
235
235
  "node": ">=22"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/errors/index.ts"],"sourcesContent":["import type { ProtectErrorCode } from '@cipherstash/protect-ffi'\n\nexport const EncryptionErrorTypes = {\n ClientInitError: 'ClientInitError',\n EncryptionError: 'EncryptionError',\n DecryptionError: 'DecryptionError',\n LockContextError: 'LockContextError',\n CtsTokenError: 'CtsTokenError',\n}\n\n/**\n * Base error interface returned by all encryption operations.\n *\n * Every operation that can fail returns `Result<T, EncryptionError>`.\n * Use the `type` field to narrow to a specific error kind, or use\n * {@link StackError} for an exhaustive discriminated union.\n *\n * @example\n * ```typescript\n * const result = await client.encrypt(value, opts)\n * if (result.failure) {\n * switch (result.failure.type) {\n * case EncryptionErrorTypes.EncryptionError:\n * console.error('Encryption failed:', result.failure.message)\n * break\n * case EncryptionErrorTypes.LockContextError:\n * console.error('Lock context issue:', result.failure.message)\n * break\n * }\n * }\n * ```\n */\nexport interface EncryptionError {\n type: (typeof EncryptionErrorTypes)[keyof typeof EncryptionErrorTypes]\n message: string\n code?: ProtectErrorCode\n}\n\n// ---------------------------------------------------------------------------\n// Specific error types (discriminated union members)\n// ---------------------------------------------------------------------------\n\nexport interface ClientInitError {\n type: typeof EncryptionErrorTypes.ClientInitError\n message: string\n}\n\nexport interface EncryptionOperationError {\n type: typeof EncryptionErrorTypes.EncryptionError\n message: string\n code?: ProtectErrorCode\n}\n\nexport interface DecryptionOperationError {\n type: typeof EncryptionErrorTypes.DecryptionError\n message: string\n code?: ProtectErrorCode\n}\n\nexport interface LockContextError {\n type: typeof EncryptionErrorTypes.LockContextError\n message: string\n}\n\nexport interface CtsTokenError {\n type: typeof EncryptionErrorTypes.CtsTokenError\n message: string\n}\n\n/**\n * Discriminated union of all specific error types.\n *\n * Use `StackError` when you need exhaustive error handling via `switch` on the `type` field.\n *\n * @example\n * ```typescript\n * function handleError(error: StackError) {\n * switch (error.type) {\n * case 'ClientInitError':\n * // re-initialize client\n * break\n * case 'EncryptionError':\n * case 'DecryptionError':\n * // log and retry\n * break\n * case 'LockContextError':\n * // re-authenticate\n * break\n * case 'CtsTokenError':\n * // refresh token\n * break\n * default:\n * error satisfies never\n * }\n * }\n * ```\n */\nexport type StackError =\n | ClientInitError\n | EncryptionOperationError\n | DecryptionOperationError\n | LockContextError\n | CtsTokenError\n\n// ---------------------------------------------------------------------------\n// Error utilities\n// ---------------------------------------------------------------------------\n\n/**\n * Safely extract an error message from an unknown thrown value.\n * Unlike `(error as Error).message`, this handles non-Error values gracefully.\n */\nexport function getErrorMessage(error: unknown): string {\n if (error instanceof Error) return error.message\n if (typeof error === 'string') return error\n return String(error)\n}\n"],"mappings":";AAEO,IAAM,uBAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,eAAe;AACjB;AAwGO,SAAS,gBAAgB,OAAwB;AACtD,MAAI,iBAAiB,MAAO,QAAO,MAAM;AACzC,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,SAAO,OAAO,KAAK;AACrB;","names":[]}