@cipherstash/stack 0.6.0 → 0.8.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 (57) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +8 -0
  3. package/dist/bin/stash.js +22 -3
  4. package/dist/bin/stash.js.map +1 -1
  5. package/dist/{chunk-YLISU7FD.js → chunk-3BOJHROP.js} +3 -3
  6. package/dist/{chunk-TGUELLJS.js → chunk-4C52Q5R6.js} +10 -2
  7. package/dist/chunk-4C52Q5R6.js.map +1 -0
  8. package/dist/{chunk-Y35W4WFN.js → chunk-Y3KSTOVR.js} +35 -4
  9. package/dist/chunk-Y3KSTOVR.js.map +1 -0
  10. package/dist/{client-CJueivkw.d.cts → client-CV7X5Hrt.d.cts} +7 -1
  11. package/dist/{client-hHEpZIZH.d.ts → client-_63nbmO7.d.ts} +7 -1
  12. package/dist/client.cjs +14 -3
  13. package/dist/client.cjs.map +1 -1
  14. package/dist/client.d.cts +2 -2
  15. package/dist/client.d.ts +2 -2
  16. package/dist/client.js +1 -1
  17. package/dist/drizzle/index.cjs +14 -3
  18. package/dist/drizzle/index.cjs.map +1 -1
  19. package/dist/drizzle/index.d.cts +2 -2
  20. package/dist/drizzle/index.d.ts +2 -2
  21. package/dist/drizzle/index.js +1 -1
  22. package/dist/dynamodb/index.d.cts +2 -2
  23. package/dist/dynamodb/index.d.ts +2 -2
  24. package/dist/encryption/index.cjs +19 -0
  25. package/dist/encryption/index.cjs.map +1 -1
  26. package/dist/encryption/index.d.cts +2 -2
  27. package/dist/encryption/index.d.ts +2 -2
  28. package/dist/encryption/index.js +2 -2
  29. package/dist/index.cjs +22 -3
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +3 -3
  32. package/dist/index.d.ts +3 -3
  33. package/dist/index.js +3 -3
  34. package/dist/schema/index.cjs +38 -5
  35. package/dist/schema/index.cjs.map +1 -1
  36. package/dist/schema/index.d.cts +1 -1
  37. package/dist/schema/index.d.ts +1 -1
  38. package/dist/schema/index.js +7 -3
  39. package/dist/secrets/index.cjs +22 -3
  40. package/dist/secrets/index.cjs.map +1 -1
  41. package/dist/secrets/index.d.cts +1 -1
  42. package/dist/secrets/index.d.ts +1 -1
  43. package/dist/secrets/index.js +3 -3
  44. package/dist/supabase/index.cjs +28 -5
  45. package/dist/supabase/index.cjs.map +1 -1
  46. package/dist/supabase/index.d.cts +2 -2
  47. package/dist/supabase/index.d.ts +2 -2
  48. package/dist/supabase/index.js +17 -5
  49. package/dist/supabase/index.js.map +1 -1
  50. package/dist/{types-public-07ilcGY-.d.ts → types-public-B5YxQhR6.d.cts} +25 -9
  51. package/dist/{types-public-07ilcGY-.d.cts → types-public-B5YxQhR6.d.ts} +25 -9
  52. package/dist/types-public.d.cts +1 -1
  53. package/dist/types-public.d.ts +1 -1
  54. package/package.json +1 -1
  55. package/dist/chunk-TGUELLJS.js.map +0 -1
  56. package/dist/chunk-Y35W4WFN.js.map +0 -1
  57. /package/dist/{chunk-YLISU7FD.js.map → chunk-3BOJHROP.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-CJueivkw.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-hHEpZIZH.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-TGUELLJS.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
  }
@@ -2818,6 +2829,14 @@ var EncryptionClient = class {
2818
2829
  workspaceId: this.workspaceId
2819
2830
  };
2820
2831
  }
2832
+ /**
2833
+ * Get the encrypt config object.
2834
+ *
2835
+ * @returns The encrypt config object.
2836
+ */
2837
+ getEncryptConfig() {
2838
+ return this.encryptConfig;
2839
+ }
2821
2840
  };
2822
2841
  var Encryption = async (config) => {
2823
2842
  const { schemas, config: clientConfig } = config;