@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.
Files changed (56) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +33 -3
  3. package/dist/bin/stash.js +419 -204
  4. package/dist/bin/stash.js.map +1 -1
  5. package/dist/{chunk-URZNWMOO.js → chunk-3BOJHROP.js} +3 -3
  6. package/dist/{chunk-H7IHWDZI.js → chunk-4C52Q5R6.js} +2 -2
  7. package/dist/{chunk-Y35W4WFN.js → chunk-Y3KSTOVR.js} +35 -4
  8. package/dist/chunk-Y3KSTOVR.js.map +1 -0
  9. package/dist/{client-DQMy1ux5.d.cts → client-CV7X5Hrt.d.cts} +1 -1
  10. package/dist/{client-zxrOpegN.d.ts → client-_63nbmO7.d.ts} +1 -1
  11. package/dist/client.cjs +14 -3
  12. package/dist/client.cjs.map +1 -1
  13. package/dist/client.d.cts +2 -2
  14. package/dist/client.d.ts +2 -2
  15. package/dist/client.js +1 -1
  16. package/dist/drizzle/index.cjs +14 -3
  17. package/dist/drizzle/index.cjs.map +1 -1
  18. package/dist/drizzle/index.d.cts +2 -2
  19. package/dist/drizzle/index.d.ts +2 -2
  20. package/dist/drizzle/index.js +1 -1
  21. package/dist/dynamodb/index.d.cts +2 -2
  22. package/dist/dynamodb/index.d.ts +2 -2
  23. package/dist/encryption/index.cjs +11 -0
  24. package/dist/encryption/index.cjs.map +1 -1
  25. package/dist/encryption/index.d.cts +2 -2
  26. package/dist/encryption/index.d.ts +2 -2
  27. package/dist/encryption/index.js +2 -2
  28. package/dist/index.cjs +14 -3
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +3 -3
  31. package/dist/index.d.ts +3 -3
  32. package/dist/index.js +3 -3
  33. package/dist/schema/index.cjs +38 -5
  34. package/dist/schema/index.cjs.map +1 -1
  35. package/dist/schema/index.d.cts +1 -1
  36. package/dist/schema/index.d.ts +1 -1
  37. package/dist/schema/index.js +7 -3
  38. package/dist/secrets/index.cjs +14 -3
  39. package/dist/secrets/index.cjs.map +1 -1
  40. package/dist/secrets/index.d.cts +1 -1
  41. package/dist/secrets/index.d.ts +1 -1
  42. package/dist/secrets/index.js +3 -3
  43. package/dist/supabase/index.cjs +28 -5
  44. package/dist/supabase/index.cjs.map +1 -1
  45. package/dist/supabase/index.d.cts +2 -2
  46. package/dist/supabase/index.d.ts +2 -2
  47. package/dist/supabase/index.js +17 -5
  48. package/dist/supabase/index.js.map +1 -1
  49. package/dist/{types-public-07ilcGY-.d.ts → types-public-B5YxQhR6.d.cts} +25 -9
  50. package/dist/{types-public-07ilcGY-.d.cts → types-public-B5YxQhR6.d.ts} +25 -9
  51. package/dist/types-public.d.cts +1 -1
  52. package/dist/types-public.d.ts +1 -1
  53. package/package.json +1 -1
  54. package/dist/chunk-Y35W4WFN.js.map +0 -1
  55. /package/dist/{chunk-URZNWMOO.js.map → chunk-3BOJHROP.js.map} +0 -0
  56. /package/dist/{chunk-H7IHWDZI.js.map → chunk-4C52Q5R6.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import '../errors/index.cjs';
2
- import '../types-public-07ilcGY-.cjs';
2
+ import '../types-public-B5YxQhR6.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-DQMy1ux5.cjs';
5
+ export { E as Encryption, a as EncryptionClient, n as noClientError } from '../client-CV7X5Hrt.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-07ilcGY-.js';
2
+ import '../types-public-B5YxQhR6.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-zxrOpegN.js';
5
+ export { E as Encryption, a as EncryptionClient, n as noClientError } from '../client-_63nbmO7.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-H7IHWDZI.js";
5
+ } from "../chunk-4C52Q5R6.js";
6
6
  import "../chunk-4RNBI3UH.js";
7
- import "../chunk-Y35W4WFN.js";
7
+ import "../chunk-Y3KSTOVR.js";
8
8
  import "../chunk-HCL75LXQ.js";
9
9
  import "../chunk-GXGEW6T4.js";
10
10
  import "../chunk-Q5FTQLYG.js";
package/dist/index.cjs CHANGED
@@ -42,6 +42,17 @@ module.exports = __toCommonJS(index_exports);
42
42
 
43
43
  // src/schema/index.ts
44
44
  var import_zod = require("zod");
45
+ var eqlCastAsEnum = import_zod.z.enum([
46
+ "text",
47
+ "int",
48
+ "small_int",
49
+ "big_int",
50
+ "real",
51
+ "double",
52
+ "boolean",
53
+ "date",
54
+ "jsonb"
55
+ ]).default("text");
45
56
  var castAsEnum = import_zod.z.enum(["bigint", "boolean", "date", "number", "string", "json", "text"]).default("text");
46
57
  var tokenFilterSchema = import_zod.z.object({
47
58
  kind: import_zod.z.literal("downcase")
@@ -90,7 +101,7 @@ var EncryptedField = class {
90
101
  castAsValue;
91
102
  constructor(valueName) {
92
103
  this.valueName = valueName;
93
- this.castAsValue = "text";
104
+ this.castAsValue = "string";
94
105
  }
95
106
  /**
96
107
  * Set or override the plaintext data type for this field.
@@ -115,7 +126,7 @@ var EncryptedField = class {
115
126
  }
116
127
  build() {
117
128
  return {
118
- cast_as: this.castAsValue === "string" ? "text" : this.castAsValue,
129
+ cast_as: this.castAsValue,
119
130
  indexes: {}
120
131
  };
121
132
  }
@@ -269,7 +280,7 @@ var EncryptedColumn = class {
269
280
  }
270
281
  build() {
271
282
  return {
272
- cast_as: this.castAsValue === "string" ? "text" : this.castAsValue,
283
+ cast_as: this.castAsValue,
273
284
  indexes: this.indexesValue
274
285
  };
275
286
  }