@cipherstash/stack 0.14.0 → 0.15.1
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 +17 -0
- package/dist/drizzle/index.cjs +4 -2
- package/dist/drizzle/index.cjs.map +1 -1
- package/dist/drizzle/index.js +4 -2
- package/dist/drizzle/index.js.map +1 -1
- package/dist/identity/index.js +63 -3
- package/dist/identity/index.js.map +1 -1
- package/dist/index.cjs +6 -365
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -5
- package/package.json +1 -1
- package/dist/chunk-GXGEW6T4.js +0 -68
- package/dist/chunk-GXGEW6T4.js.map +0 -1
- package/dist/chunk-XTKLRDGJ.js +0 -357
- package/dist/chunk-XTKLRDGJ.js.map +0 -1
- package/dist/secrets/index.cjs +0 -3143
- package/dist/secrets/index.cjs.map +0 -1
- package/dist/secrets/index.d.cts +0 -225
- package/dist/secrets/index.d.ts +0 -225
- package/dist/secrets/index.js +0 -14
- package/dist/secrets/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @cipherstash/stack
|
|
2
2
|
|
|
3
|
+
## 0.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8513705: Fix mangled `eql_v2_encrypted` type in drizzle-kit migrations.
|
|
8
|
+
|
|
9
|
+
- `@cipherstash/stack/drizzle`'s `encryptedType` now returns the bare `eql_v2_encrypted` identifier from its Drizzle `customType.dataType()` callback. Returning the schema-qualified `"public"."eql_v2_encrypted"` (0.15.0) triggered a drizzle-kit quirk that wraps the return value in double-quotes and prepends `"{typeSchema}".` in ALTER COLUMN output — producing `"undefined".""public"."eql_v2_encrypted""`, which Postgres cannot parse.
|
|
10
|
+
- `stash db install` / `stash wizard`'s migration rewriter now matches all four forms drizzle-kit may emit (`eql_v2_encrypted`, `"public"."eql_v2_encrypted"`, `"undefined"."eql_v2_encrypted"`, `"undefined".""public"."eql_v2_encrypted""`) and rewrites each into the safe `ADD COLUMN … DROP COLUMN … RENAME COLUMN` sequence.
|
|
11
|
+
|
|
12
|
+
Users on 0.15.0 who hit this in generated migrations should upgrade and re-run `npx drizzle-kit generate` + `stash db install` (or re-run the wizard).
|
|
13
|
+
|
|
14
|
+
## 0.15.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- 1929c8f: Mark secrets as a coming soon feature and remove existing SDK integration.
|
|
19
|
+
|
|
3
20
|
## 0.14.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/drizzle/index.cjs
CHANGED
|
@@ -1486,11 +1486,12 @@ function createEncryptionOperators(encryptionClient) {
|
|
|
1486
1486
|
}
|
|
1487
1487
|
|
|
1488
1488
|
// src/drizzle/index.ts
|
|
1489
|
+
var EQL_ENCRYPTED_DATA_TYPE = "eql_v2_encrypted";
|
|
1489
1490
|
var columnConfigMap = /* @__PURE__ */ new Map();
|
|
1490
1491
|
var encryptedType = (name, config) => {
|
|
1491
1492
|
const customColumnType = (0, import_pg_core.customType)({
|
|
1492
1493
|
dataType() {
|
|
1493
|
-
return
|
|
1494
|
+
return EQL_ENCRYPTED_DATA_TYPE;
|
|
1494
1495
|
},
|
|
1495
1496
|
toDriver(value) {
|
|
1496
1497
|
const jsonStr = JSON.stringify(value);
|
|
@@ -1530,7 +1531,8 @@ var encryptedType = (name, config) => {
|
|
|
1530
1531
|
function getEncryptedColumnConfig(columnName, column) {
|
|
1531
1532
|
if (column && typeof column === "object") {
|
|
1532
1533
|
const columnAny = column;
|
|
1533
|
-
const
|
|
1534
|
+
const isEncryptedTypeString = (value) => value === EQL_ENCRYPTED_DATA_TYPE || value === '"public"."eql_v2_encrypted"';
|
|
1535
|
+
const isEncrypted = isEncryptedTypeString(columnAny.sqlName) || isEncryptedTypeString(columnAny.dataType) || columnAny.dataType && typeof columnAny.dataType === "function" && isEncryptedTypeString(columnAny.dataType());
|
|
1534
1536
|
if (isEncrypted) {
|
|
1535
1537
|
if (columnAny._encryptionConfig) {
|
|
1536
1538
|
return columnAny._encryptionConfig;
|