Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/protect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dev": "tsup --watch",
"eql:update": "tsx ./generateEqlSchema.ts",
"eql:generate": "json2ts ./eql.schema.json --output ./src/eql.schema.ts",
"test": "vitest run",
"test": "tsc --noEmit && vitest run",
"release": "tsup"
},
"devDependencies": {
Expand All @@ -56,7 +56,7 @@
},
"dependencies": {
"@byteslice/result": "^0.2.0",
"@cipherstash/protect-ffi": "0.12.0",
"@cipherstash/protect-ffi": "0.13.0-0",
"zod": "^3.24.2"
},
"optionalDependencies": {
Expand Down
22 changes: 12 additions & 10 deletions packages/protect/src/ffi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
encrypt as ffiEncrypt,
encryptBulk as ffiEncryptBulk,
newClient,
type EncryptPayload as FFIEncryptPayload,
} from '@cipherstash/protect-ffi'
import { withResult, type Result } from '@byteslice/result'
import { type ProtectError, ProtectErrorTypes } from '..'
Expand Down Expand Up @@ -119,12 +120,11 @@ class EncryptOperation
return null
}

const val = await ffiEncrypt(
this.client,
this.plaintext,
this.column.getName(),
this.table.tableName,
)
const val = await ffiEncrypt(this.client, {
plaintext: this.plaintext,
column: this.column.getName(),
table: this.table.tableName,
})

return JSON.parse(val)
},
Expand Down Expand Up @@ -200,10 +200,12 @@ class EncryptOperationWithLockContext

const val = await ffiEncrypt(
client,
plaintext,
column.getName(),
table.tableName,
context.data.context,
{
plaintext: plaintext,
column: column.getName(),
table: table.tableName,
lockContext: context.data.context,
},
context.data.ctsToken,
)

Expand Down
2 changes: 1 addition & 1 deletion packages/protect/src/ffi/payload-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Result } from '@byteslice/result'
import type { ProtectError } from '..'
import type {
BulkDecryptPayload as InternalBulkDecryptPayload,
BulkEncryptPayload as InternalBulkEncryptPayload,
EncryptPayload as InternalBulkEncryptPayload,
} from '@cipherstash/protect-ffi'

import type { LockContext } from '../identify'
Expand Down
50 changes: 25 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading