Skip to content

Commit 78046b3

Browse files
committed
refactor: don't enable encrypted enhancement by default
1 parent 2ea8bd2 commit 78046b3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/runtime/src/enhancements/node/create-enhancement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import type { PolicyDef } from './types';
2121
/**
2222
* All enhancement kinds
2323
*/
24-
const ALL_ENHANCEMENTS: EnhancementKind[] = ['password', 'omit', 'policy', 'validation', 'delegate', 'encrypted'];
24+
const ALL_ENHANCEMENTS: EnhancementKind[] = ['password', 'omit', 'policy', 'validation', 'delegate'];
2525

2626
/**
2727
* Options for {@link createEnhancement}

tests/integration/tests/enhancements/with-encrypted/with-encrypted.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ describe('Encrypted test', () => {
2323
}`);
2424

2525
const sudoDb = enhance(undefined, { kinds: [] });
26-
const db = enhance(undefined, { encryption: { encryptionKey: 'c558Gq0YQK2QcqtkMF9BGXHCQn4dMF8w' } });
26+
const db = enhance(undefined, {
27+
kinds: ['encrypted'],
28+
encryption: { encryptionKey: 'c558Gq0YQK2QcqtkMF9BGXHCQn4dMF8w' },
29+
});
2730

2831
const create = await db.user.create({
2932
data: {
@@ -60,6 +63,7 @@ describe('Encrypted test', () => {
6063

6164
const sudoDb = enhance(undefined, { kinds: [] });
6265
const db = enhance(undefined, {
66+
kinds: ['encrypted'],
6367
encryption: {
6468
encrypt: async (model: string, field: FieldInfo, data: string) => {
6569
// Add _enc to the end of the input

0 commit comments

Comments
 (0)