core-mb 1.0.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.
- package/.env +2 -0
- package/README.md +9 -0
- package/__unitest__/phone.number.crypto.spec.ts +69 -0
- package/__unitest__/phone.number.helper.spec.ts +30 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +131 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/phone.number.helper.ts.html +124 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/security.helper.ts.html +349 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +67 -0
- package/coverage/phone.number.helper.ts.html +124 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/security.helper.ts.html +349 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/aes.helper.d.ts +6 -0
- package/dist/aes.helper.js +105 -0
- package/dist/date.helper.d.ts +0 -0
- package/dist/date.helper.js +1 -0
- package/dist/document.helper.d.ts +0 -0
- package/dist/document.helper.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/dist/logging.helper.d.ts +0 -0
- package/dist/logging.helper.js +1 -0
- package/dist/money.helper.d.ts +0 -0
- package/dist/money.helper.js +1 -0
- package/dist/phone.number.helper.d.ts +7 -0
- package/dist/phone.number.helper.js +17 -0
- package/dist/security.helper.d.ts +16 -0
- package/dist/security.helper.js +94 -0
- package/dist/validation.helper.d.ts +0 -0
- package/dist/validation.helper.js +1 -0
- package/jest.config.js +17 -0
- package/jest.setup.ts +2 -0
- package/package.json +32 -0
- package/src/aes.helper.ts +101 -0
- package/src/date.helper.ts +0 -0
- package/src/document.helper.ts +0 -0
- package/src/index.ts +1 -0
- package/src/logging.helper.ts +0 -0
- package/src/money.helper.ts +0 -0
- package/src/phone.number.helper.ts +13 -0
- package/src/security.helper.ts +88 -0
- package/src/validation.helper.ts +0 -0
- package/test-report.html +277 -0
- package/tsconfig.json +15 -0
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Normalize to a consistent representation (approx. E.164-like):
|
|
2
|
+
* - Keep leading '+' if present
|
|
3
|
+
* - Remove spaces, dashes, parentheses
|
|
4
|
+
* - Remove any non-digit characters except leading '+'
|
|
5
|
+
* - You can adapt to your locale/validation as needed
|
|
6
|
+
*/
|
|
7
|
+
export function normalize(phoneRaw: string): string {
|
|
8
|
+
if (!phoneRaw) return "";
|
|
9
|
+
const trimmed = phoneRaw.trim();
|
|
10
|
+
const hasPlus = trimmed.startsWith("+");
|
|
11
|
+
const digitsOnly = trimmed.replace(/[^\d]/g, "");
|
|
12
|
+
return hasPlus ? `+${digitsOnly}` : digitsOnly; // store either "+855123..." or "0123..."
|
|
13
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as crypto from "crypto";
|
|
2
|
+
import { normalize } from "./phone.number.helper";
|
|
3
|
+
|
|
4
|
+
export type PhoneCipherRecord = {
|
|
5
|
+
// Base64 strings suitable for storage in text columns
|
|
6
|
+
ciphertext: string; // Encrypted phone number
|
|
7
|
+
iv: string; // Initialization Vector (nonce) for GCM (12 bytes recommended)
|
|
8
|
+
authTag: string; // Authentication tag returned by GCM (ensures integrity)
|
|
9
|
+
hmacIndex: string; // HMAC-SHA256(phoneNormalized) for search/dedup
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const aesKeyB64 = process.env.PHONE_AES_KEY;
|
|
13
|
+
const hmacKeyB64 = process.env.PHONE_HMAC_KEY;
|
|
14
|
+
|
|
15
|
+
if (!aesKeyB64 || !hmacKeyB64) {
|
|
16
|
+
throw new Error(
|
|
17
|
+
"PHONE_AES_KEY and PHONE_HMAC_KEY must be set (base64-encoded)."
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const aesKey = Buffer.from(aesKeyB64, "base64");
|
|
22
|
+
const hmacKey = Buffer.from(hmacKeyB64, "base64");
|
|
23
|
+
|
|
24
|
+
/** Create an HMAC index for lookups without revealing the number.
|
|
25
|
+
* Store this alongside the encrypted data and index it in the DB.
|
|
26
|
+
*/
|
|
27
|
+
function hmacIndex(phoneRaw: string): string {
|
|
28
|
+
const normalized = normalize(phoneRaw);
|
|
29
|
+
const h = crypto.createHmac("sha256", hmacKey);
|
|
30
|
+
h.update(normalized, "utf8");
|
|
31
|
+
return h.digest("base64");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Encrypt a phone number using AES-256-GCM.
|
|
35
|
+
* Returns base64-encoded ciphertext, iv and authTag suitable for storage.
|
|
36
|
+
*/
|
|
37
|
+
export function encrypt(
|
|
38
|
+
phoneRaw: string
|
|
39
|
+
): Omit<PhoneCipherRecord, "hmacIndex"> & { hmacIndex: string } {
|
|
40
|
+
const normalized = normalize(phoneRaw);
|
|
41
|
+
|
|
42
|
+
// 12-byte IV is recommended for GCM
|
|
43
|
+
const iv = crypto.randomBytes(12);
|
|
44
|
+
|
|
45
|
+
const cipher = crypto.createCipheriv("aes-256-gcm", aesKey, iv);
|
|
46
|
+
|
|
47
|
+
// Optional: bind additional data (AAD), e.g., tenant ID to prevent cross-tenant swaps
|
|
48
|
+
// cipher.setAAD(Buffer.from(tenantId, 'utf8'));
|
|
49
|
+
|
|
50
|
+
const ciphertextBuf = Buffer.concat([
|
|
51
|
+
cipher.update(normalized, "utf8"),
|
|
52
|
+
cipher.final(),
|
|
53
|
+
]);
|
|
54
|
+
|
|
55
|
+
const authTag = cipher.getAuthTag();
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
ciphertext: ciphertextBuf.toString("base64"),
|
|
59
|
+
iv: iv.toString("base64"),
|
|
60
|
+
authTag: authTag.toString("base64"),
|
|
61
|
+
hmacIndex: hmacIndex(normalized),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Decrypt a previously stored record. Throws if tampered.
|
|
66
|
+
* Returns the normalized phone string.
|
|
67
|
+
*/
|
|
68
|
+
export function decrypt(
|
|
69
|
+
record: Pick<PhoneCipherRecord, "ciphertext" | "iv" | "authTag">
|
|
70
|
+
): string {
|
|
71
|
+
const iv = Buffer.from(record.iv, "base64");
|
|
72
|
+
const authTag = Buffer.from(record.authTag, "base64");
|
|
73
|
+
const ciphertext = Buffer.from(record.ciphertext, "base64");
|
|
74
|
+
|
|
75
|
+
const decipher = crypto.createDecipheriv("aes-256-gcm", aesKey, iv);
|
|
76
|
+
|
|
77
|
+
// If you used setAAD on encrypt, you MUST set the same AAD here
|
|
78
|
+
// decipher.setAAD(Buffer.from(tenantId, 'utf8'));
|
|
79
|
+
|
|
80
|
+
decipher.setAuthTag(authTag);
|
|
81
|
+
|
|
82
|
+
const plaintext = Buffer.concat([
|
|
83
|
+
decipher.update(ciphertext),
|
|
84
|
+
decipher.final(),
|
|
85
|
+
]).toString("utf8");
|
|
86
|
+
|
|
87
|
+
return plaintext; // normalized phone
|
|
88
|
+
}
|
|
File without changes
|
package/test-report.html
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Test Report</title><style type="text/css">:root {
|
|
2
|
+
--text-primary: #111;
|
|
3
|
+
--text-secondary: #4f4f4f;
|
|
4
|
+
--success: #006633;
|
|
5
|
+
--success-bright: #80ffbf;
|
|
6
|
+
--danger: #cc071e;
|
|
7
|
+
--danger-bright: #fbdfe0;
|
|
8
|
+
--warning: #995c00;
|
|
9
|
+
--warning-bright: #ffeea8;
|
|
10
|
+
--panel: #eee;
|
|
11
|
+
--border: #949494;
|
|
12
|
+
--disabled: #6b6b6b;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
html,
|
|
16
|
+
body {
|
|
17
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
color: var(--text-primary);
|
|
22
|
+
}
|
|
23
|
+
body {
|
|
24
|
+
padding: 2rem 1rem;
|
|
25
|
+
}
|
|
26
|
+
.jesthtml-content {
|
|
27
|
+
margin: 0 auto;
|
|
28
|
+
max-width: 70rem;
|
|
29
|
+
}
|
|
30
|
+
header {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
}
|
|
34
|
+
#title {
|
|
35
|
+
margin: 0;
|
|
36
|
+
flex-grow: 1;
|
|
37
|
+
}
|
|
38
|
+
#logo {
|
|
39
|
+
height: 4rem;
|
|
40
|
+
}
|
|
41
|
+
#timestamp {
|
|
42
|
+
color: var(--text-secondary);
|
|
43
|
+
margin-top: 0.5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
#metadata-container {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: 2rem;
|
|
50
|
+
margin-bottom: 2rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.additional-information-container {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
gap: 0.5rem;
|
|
57
|
+
color: var(--text-secondary);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** SUMMARY */
|
|
61
|
+
#summary {
|
|
62
|
+
color: var(--text-primary);
|
|
63
|
+
display: flex;
|
|
64
|
+
font-family: monospace;
|
|
65
|
+
font-size: 1rem;
|
|
66
|
+
}
|
|
67
|
+
#summary > div {
|
|
68
|
+
margin-right: 0.5rem;
|
|
69
|
+
background: var(--panel);
|
|
70
|
+
padding: 1rem;
|
|
71
|
+
min-width: 15rem;
|
|
72
|
+
}
|
|
73
|
+
#summary > div:last-child {
|
|
74
|
+
margin-right: 0;
|
|
75
|
+
}
|
|
76
|
+
@media only screen and (max-width: 720px) {
|
|
77
|
+
#summary {
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
}
|
|
80
|
+
#summary > div {
|
|
81
|
+
margin-right: 0;
|
|
82
|
+
margin-top: 1rem;
|
|
83
|
+
}
|
|
84
|
+
#summary > div:first-child {
|
|
85
|
+
margin-top: 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.summary-total {
|
|
90
|
+
font-weight: bold;
|
|
91
|
+
margin-bottom: 0.5rem;
|
|
92
|
+
}
|
|
93
|
+
.summary-passed {
|
|
94
|
+
color: var(--success);
|
|
95
|
+
border-left: 0.4rem solid var(--success);
|
|
96
|
+
padding-left: 0.5rem;
|
|
97
|
+
margin-bottom: 0.15rem;
|
|
98
|
+
}
|
|
99
|
+
.summary-failed,
|
|
100
|
+
.summary-obsolete-snapshots {
|
|
101
|
+
color: var(--danger);
|
|
102
|
+
border-left: 0.4rem solid var(--danger);
|
|
103
|
+
padding-left: 0.5rem;
|
|
104
|
+
margin-bottom: 0.15rem;
|
|
105
|
+
}
|
|
106
|
+
.summary-pending {
|
|
107
|
+
color: var(--warning);
|
|
108
|
+
border-left: 0.4rem solid var(--warning);
|
|
109
|
+
padding-left: 0.5rem;
|
|
110
|
+
margin-bottom: 0.15rem;
|
|
111
|
+
}
|
|
112
|
+
.summary-empty {
|
|
113
|
+
color: var(--disabled);
|
|
114
|
+
border-left: 0.4rem solid var(--disabled);
|
|
115
|
+
margin-bottom: 0.15rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.test-result {
|
|
119
|
+
padding: 1rem;
|
|
120
|
+
margin-bottom: 0.25rem;
|
|
121
|
+
}
|
|
122
|
+
.test-result:last-child {
|
|
123
|
+
border: 0;
|
|
124
|
+
}
|
|
125
|
+
.test-result.passed {
|
|
126
|
+
background-color: var(--success-bright);
|
|
127
|
+
color: var(--success);
|
|
128
|
+
}
|
|
129
|
+
.test-result.failed {
|
|
130
|
+
background-color: var(--danger-bright);
|
|
131
|
+
color: var(--danger);
|
|
132
|
+
}
|
|
133
|
+
.test-result.pending {
|
|
134
|
+
background-color: var(--warning-bright);
|
|
135
|
+
color: var(--warning);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.test-info {
|
|
139
|
+
display: flex;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
}
|
|
142
|
+
.test-suitename {
|
|
143
|
+
width: 20%;
|
|
144
|
+
text-align: left;
|
|
145
|
+
font-weight: bold;
|
|
146
|
+
word-break: break-word;
|
|
147
|
+
}
|
|
148
|
+
.test-title {
|
|
149
|
+
width: 40%;
|
|
150
|
+
text-align: left;
|
|
151
|
+
font-style: italic;
|
|
152
|
+
}
|
|
153
|
+
.test-status {
|
|
154
|
+
width: 20%;
|
|
155
|
+
text-align: right;
|
|
156
|
+
}
|
|
157
|
+
.test-duration {
|
|
158
|
+
width: 10%;
|
|
159
|
+
text-align: right;
|
|
160
|
+
font-size: 0.85rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.failureMessages {
|
|
164
|
+
padding: 0 1rem;
|
|
165
|
+
margin-top: 1rem;
|
|
166
|
+
border-top: 1px dashed var(--danger);
|
|
167
|
+
}
|
|
168
|
+
.failureMessages.suiteFailure {
|
|
169
|
+
border-top: none;
|
|
170
|
+
}
|
|
171
|
+
.failureMsg {
|
|
172
|
+
white-space: pre-wrap;
|
|
173
|
+
white-space: -moz-pre-wrap;
|
|
174
|
+
white-space: -pre-wrap;
|
|
175
|
+
white-space: -o-pre-wrap;
|
|
176
|
+
word-wrap: break-word;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.suite-container {
|
|
180
|
+
margin-bottom: 1rem;
|
|
181
|
+
}
|
|
182
|
+
.suite-info {
|
|
183
|
+
padding: 1rem;
|
|
184
|
+
background-color: var(--panel);
|
|
185
|
+
color: var(--text-secondary);
|
|
186
|
+
border: 0.15rem solid;
|
|
187
|
+
border-color: var(--panel);
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
margin-bottom: 0.25rem;
|
|
191
|
+
}
|
|
192
|
+
.suite-info:hover {
|
|
193
|
+
border-color: var(--border);
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
}
|
|
196
|
+
.suite-info .suite-path {
|
|
197
|
+
word-break: break-all;
|
|
198
|
+
flex-grow: 1;
|
|
199
|
+
font-family: monospace;
|
|
200
|
+
font-size: 1rem;
|
|
201
|
+
}
|
|
202
|
+
.suite-info .suite-time {
|
|
203
|
+
margin-left: 1rem;
|
|
204
|
+
padding: 0.2rem 0.3rem;
|
|
205
|
+
font-size: 0.85rem;
|
|
206
|
+
}
|
|
207
|
+
.suite-info .suite-time.warn {
|
|
208
|
+
background-color: var(--danger);
|
|
209
|
+
color: #fff;
|
|
210
|
+
}
|
|
211
|
+
.suite-info:before {
|
|
212
|
+
content: "\2303";
|
|
213
|
+
display: inline-block;
|
|
214
|
+
margin-right: 1rem;
|
|
215
|
+
transform: rotate(180deg) translateY(0.15rem);
|
|
216
|
+
}
|
|
217
|
+
.suite-container[open] .suite-info:before {
|
|
218
|
+
transform: rotate(0deg) translateY(0.15rem);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* CONSOLE LOGS */
|
|
222
|
+
.suite-consolelog {
|
|
223
|
+
margin-bottom: 0.25rem;
|
|
224
|
+
padding: 1rem;
|
|
225
|
+
background-color: var(--panel);
|
|
226
|
+
}
|
|
227
|
+
.suite-consolelog-header {
|
|
228
|
+
font-weight: bold;
|
|
229
|
+
}
|
|
230
|
+
.suite-consolelog-item {
|
|
231
|
+
padding: 0.5rem;
|
|
232
|
+
}
|
|
233
|
+
.suite-consolelog-item pre {
|
|
234
|
+
margin: 0.5rem 0;
|
|
235
|
+
white-space: pre-wrap;
|
|
236
|
+
white-space: -moz-pre-wrap;
|
|
237
|
+
white-space: -pre-wrap;
|
|
238
|
+
white-space: -o-pre-wrap;
|
|
239
|
+
word-wrap: break-word;
|
|
240
|
+
}
|
|
241
|
+
.suite-consolelog-item-origin {
|
|
242
|
+
color: var(--text-secondary);
|
|
243
|
+
font-weight: bold;
|
|
244
|
+
}
|
|
245
|
+
.suite-consolelog-item-message {
|
|
246
|
+
color: var(--text-primary);
|
|
247
|
+
font-size: 1rem;
|
|
248
|
+
padding: 0 0.5rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* OBSOLETE SNAPSHOTS */
|
|
252
|
+
.suite-obsolete-snapshots {
|
|
253
|
+
margin-bottom: 0.25rem;
|
|
254
|
+
padding: 1rem;
|
|
255
|
+
background-color: var(--danger-bright);
|
|
256
|
+
color: var(--danger);
|
|
257
|
+
}
|
|
258
|
+
.suite-obsolete-snapshots-header {
|
|
259
|
+
font-weight: bold;
|
|
260
|
+
}
|
|
261
|
+
.suite-obsolete-snapshots-item {
|
|
262
|
+
padding: 0.5rem;
|
|
263
|
+
}
|
|
264
|
+
.suite-obsolete-snapshots-item pre {
|
|
265
|
+
margin: 0.5rem 0;
|
|
266
|
+
white-space: pre-wrap;
|
|
267
|
+
white-space: -moz-pre-wrap;
|
|
268
|
+
white-space: -pre-wrap;
|
|
269
|
+
white-space: -o-pre-wrap;
|
|
270
|
+
word-wrap: break-word;
|
|
271
|
+
}
|
|
272
|
+
.suite-obsolete-snapshots-item-message {
|
|
273
|
+
color: var(--text-primary);
|
|
274
|
+
font-size: 1rem;
|
|
275
|
+
padding: 0 0.5rem;
|
|
276
|
+
}
|
|
277
|
+
</style></head><body><main class="jesthtml-content"><header><h1 id="title">Test Report</h1></header><section id="metadata-container"><div id="timestamp">Started: 2025-08-23 13:29:58</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (2)</div><div class="summary-passed ">2 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (9)</div><div class="summary-passed ">9 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></section><details id="suite-1" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">/Volumes/Projects/RND/microservices/vieltalk-chat/core-mb/__unitest__/phone.number.helper.spec.ts</div><div class="suite-time">1.441s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.helper > normalize</div><div class="test-title">should return empty string for null/undefined/empty input</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.helper > normalize</div><div class="test-title">should keep leading + and strip non-digit characters</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.helper > normalize</div><div class="test-title">should remove all non-digits if no leading +</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.helper > normalize</div><div class="test-title">should handle already clean input</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.helper > normalize</div><div class="test-title">should not duplicate + signs</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-2" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">/Volumes/Projects/RND/microservices/vieltalk-chat/core-mb/__unitest__/phone.number.crypto.spec.ts</div><div class="suite-time">1.469s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.crypto</div><div class="test-title">should encrypt and decrypt correctly</div><div class="test-status">passed</div><div class="test-duration">0.009s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.crypto</div><div class="test-title">should produce different ciphertexts for same phone (unique IV)</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.crypto</div><div class="test-title">should throw when tampering with ciphertext</div><div class="test-status">passed</div><div class="test-duration">0.015s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">phone.number.crypto</div><div class="test-title">should throw when tampering with authTag</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div></div></details></main></body></html>
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2019",
|
|
4
|
+
"types": ["node", "jest"],
|
|
5
|
+
"module": "CommonJS",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"forceConsistentCasingInFileNames": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"],
|
|
14
|
+
"exclude": ["node_modules", "**/*.spec.ts"]
|
|
15
|
+
}
|