Skip to content

Commit 4e7e2a4

Browse files
authored
Merge pull request #235 from cipherstash/fix-deployment
feat(protect): add client safe exports
2 parents 69e1051 + de029de commit 4e7e2a4

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

.changeset/fruity-suits-accept.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cipherstash/protect": minor
3+
---
4+
5+
Add client safe exports.

packages/protect/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
"import": "./dist/index.js",
2929
"require": "./dist/index.cjs"
3030
},
31+
"./client": {
32+
"types": "./dist/client.d.ts",
33+
"import": "./dist/client.js",
34+
"require": "./dist/client.cjs"
35+
},
3136
"./identify": {
3237
"types": "./dist/identify/index.d.ts",
3338
"import": "./dist/identify/index.js",

packages/protect/src/client.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Client-safe exports for @cipherstash/protect
3+
*
4+
* This entry point exports types and utilities that can be used in client-side code
5+
* without requiring the @cipherstash/protect-ffi native module.
6+
*
7+
* Use this import path: `@cipherstash/protect/client`
8+
*/
9+
10+
// Schema types and utilities - client-safe
11+
export { csTable, csColumn, csValue } from '@cipherstash/schema'
12+
export type {
13+
ProtectColumn,
14+
ProtectTable,
15+
ProtectTableColumn,
16+
ProtectValue,
17+
} from '@cipherstash/schema'
18+
export type { ProtectClient } from './ffi'

packages/protect/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'tsup'
22

33
export default defineConfig({
4-
entry: ['src/index.ts', 'src/identify/index.ts'],
4+
entry: ['src/index.ts', 'src/client.ts', 'src/identify/index.ts'],
55
format: ['cjs', 'esm'],
66
sourcemap: true,
77
dts: true,

0 commit comments

Comments
 (0)