@cipherstash/stack 0.15.2 → 0.16.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 (43) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +19 -19
  3. package/dist/{chunk-46S3YFRK.js → chunk-CY5B4LIF.js} +12 -4
  4. package/dist/chunk-CY5B4LIF.js.map +1 -0
  5. package/dist/{chunk-GNLU3I27.js → chunk-JDZ2QUUF.js} +1 -1
  6. package/dist/chunk-JDZ2QUUF.js.map +1 -0
  7. package/dist/{client-Dv60lAyy.d.ts → client-BLbA6aFD.d.ts} +1 -1
  8. package/dist/{client-DQyqn0oT.d.cts → client-C_7TF8EL.d.cts} +1 -1
  9. package/dist/client.cjs.map +1 -1
  10. package/dist/client.d.cts +2 -2
  11. package/dist/client.d.ts +2 -2
  12. package/dist/client.js +1 -1
  13. package/dist/drizzle/index.cjs.map +1 -1
  14. package/dist/drizzle/index.d.cts +2 -2
  15. package/dist/drizzle/index.d.ts +2 -2
  16. package/dist/drizzle/index.js +1 -1
  17. package/dist/dynamodb/index.d.cts +2 -2
  18. package/dist/dynamodb/index.d.ts +2 -2
  19. package/dist/encryption/index.cjs +10 -2
  20. package/dist/encryption/index.cjs.map +1 -1
  21. package/dist/encryption/index.d.cts +2 -2
  22. package/dist/encryption/index.d.ts +2 -2
  23. package/dist/encryption/index.js +2 -2
  24. package/dist/index.cjs +10 -2
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +3 -3
  27. package/dist/index.d.ts +3 -3
  28. package/dist/index.js +2 -2
  29. package/dist/schema/index.cjs.map +1 -1
  30. package/dist/schema/index.d.cts +1 -1
  31. package/dist/schema/index.d.ts +1 -1
  32. package/dist/schema/index.js +1 -1
  33. package/dist/supabase/index.cjs.map +1 -1
  34. package/dist/supabase/index.d.cts +2 -2
  35. package/dist/supabase/index.d.ts +2 -2
  36. package/dist/supabase/index.js +1 -1
  37. package/dist/{types-public-DX3mGqoi.d.ts → types-public-Dv-r6Ik0.d.cts} +1 -1
  38. package/dist/{types-public-DX3mGqoi.d.cts → types-public-Dv-r6Ik0.d.ts} +1 -1
  39. package/dist/types-public.d.cts +1 -1
  40. package/dist/types-public.d.ts +1 -1
  41. package/package.json +6 -6
  42. package/dist/chunk-46S3YFRK.js.map +0 -1
  43. package/dist/chunk-GNLU3I27.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import '../errors/index.cjs';
2
- import '../types-public-DX3mGqoi.cjs';
2
+ import '../types-public-Dv-r6Ik0.cjs';
3
3
  import '@byteslice/result';
4
4
  import '@cipherstash/protect-ffi';
5
- export { E as Encryption, a as EncryptionClient, n as noClientError } from '../client-DQyqn0oT.cjs';
5
+ export { E as Encryption, a as EncryptionClient, n as noClientError } from '../client-C_7TF8EL.cjs';
6
6
  import 'zod';
7
7
  import '../identity/index.cjs';
@@ -1,7 +1,7 @@
1
1
  import '../errors/index.js';
2
- import '../types-public-DX3mGqoi.js';
2
+ import '../types-public-Dv-r6Ik0.js';
3
3
  import '@byteslice/result';
4
4
  import '@cipherstash/protect-ffi';
5
- export { E as Encryption, a as EncryptionClient, n as noClientError } from '../client-Dv60lAyy.js';
5
+ export { E as Encryption, a as EncryptionClient, n as noClientError } from '../client-BLbA6aFD.js';
6
6
  import 'zod';
7
7
  import '../identity/index.js';
@@ -2,9 +2,9 @@ import {
2
2
  Encryption,
3
3
  EncryptionClient,
4
4
  noClientError
5
- } from "../chunk-46S3YFRK.js";
5
+ } from "../chunk-CY5B4LIF.js";
6
6
  import "../chunk-4RNBI3UH.js";
7
- import "../chunk-GNLU3I27.js";
7
+ import "../chunk-JDZ2QUUF.js";
8
8
  import "../chunk-MD6742R6.js";
9
9
  import "../chunk-6FD7OBGM.js";
10
10
  import "../chunk-LBMC4D6D.js";
package/dist/index.cjs CHANGED
@@ -750,7 +750,15 @@ var logger = {
750
750
  // src/encryption/index.ts
751
751
  var import_result11 = require("@byteslice/result");
752
752
  var import_protect_ffi9 = require("@cipherstash/protect-ffi");
753
- var import_uuid = require("uuid");
753
+
754
+ // ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist-node/regex.js
755
+ var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
756
+
757
+ // ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist-node/validate.js
758
+ function validate(uuid) {
759
+ return typeof uuid === "string" && regex_default.test(uuid);
760
+ }
761
+ var validate_default = validate;
754
762
 
755
763
  // src/encryption/helpers/index.ts
756
764
  function encryptedToPgComposite(obj) {
@@ -3068,7 +3076,7 @@ var Encryption = async (config) => {
3068
3076
  "[encryption]: At least one encryptedTable must be provided to initialize the encryption client"
3069
3077
  );
3070
3078
  }
3071
- if (clientConfig?.keyset && "id" in clientConfig.keyset && !(0, import_uuid.validate)(clientConfig.keyset.id)) {
3079
+ if (clientConfig?.keyset && "id" in clientConfig.keyset && !validate_default(clientConfig.keyset.id)) {
3072
3080
  throw new Error(
3073
3081
  "[encryption]: Invalid UUID provided for keyset id. Must be a valid UUID."
3074
3082
  );