@oxvo/ai-live-assist 7.5.22 → 7.5.23

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.
@@ -34,7 +34,7 @@ export declare const normalizeAiGuideOpenInput: (input?: AiGuideOpenInput) => Re
34
34
  export declare const resolveAiGuideProtocolVersion: (bootstrap: Pick<BootstrapConfig, "experienceMode" | "minimumProtocolVersion" | "protocol">) => 1 | 2;
35
35
  export default class AiLiveAssist {
36
36
  private readonly options;
37
- readonly version = "7.5.22";
37
+ readonly version = "7.5.23";
38
38
  private readonly host;
39
39
  private readonly guideAdmission;
40
40
  private readonly standaloneAdmissionPending;
@@ -242,6 +242,9 @@ class RealtimeCommerce {
242
242
  }
243
243
  },
244
244
  onDisplayed: (resultSetId, products) => {
245
+ // The empty-state UI is visible, but the protocol acknowledges product cards only.
246
+ if (products.length === 0)
247
+ return;
245
248
  this.context.refresh();
246
249
  if (!isCurrent() || resultSetId !== event.catalog.resultSetId ||
247
250
  !(0, contracts_js_1.isDisplayedCommerceProducts)(event.catalog, products))
package/cjs/context.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PageContextCollector = exports.actionTargetFingerprint = void 0;
4
+ const textRedaction_generated_js_1 = require("./privacy/textRedaction.generated.js");
4
5
  const visualContext_js_1 = require("./visualContext.js");
5
6
  const MAX_TARGETS = 256;
6
7
  const MAX_TEXT_ITEMS = 256;
7
8
  const MAX_TOTAL_TEXT = 24000;
9
+ const MAX_RAW_TEXT_NODE = 96000;
8
10
  const MAX_OPTIONS = 100;
9
11
  const MAX_SELECTED_TEXT = 2000;
10
12
  const SELECTION_RETENTION_MS = 120000;
@@ -1257,22 +1259,60 @@ class PageContextCollector {
1257
1259
  const textElement = semanticTextElement && isRendered(semanticTextElement)
1258
1260
  ? semanticTextElement
1259
1261
  : node.nodeType === Node.TEXT_NODE ? parent : null;
1260
- const text = normalize(semanticTextElement?.getAttribute('aria-label') ??
1261
- (node.nodeType === Node.TEXT_NODE ? node.textContent ?? '' : ''), 500);
1262
+ const rawText = semanticTextElement?.getAttribute('aria-label') ??
1263
+ (node.nodeType === Node.TEXT_NODE ? node.textContent ?? '' : '');
1264
+ const normalizedText = normalize(rawText.slice(0, MAX_RAW_TEXT_NODE), MAX_RAW_TEXT_NODE);
1265
+ const text = normalizedText.slice(0, 500);
1262
1266
  if (parent &&
1263
1267
  textElement &&
1264
- text &&
1268
+ (text || rawText.length > MAX_RAW_TEXT_NODE) &&
1265
1269
  !parent.closest(PRIVATE_SELECTOR) &&
1266
1270
  !parent.closest('script,style,noscript,template,svg') &&
1267
1271
  !parent.closest('input,select,textarea,option') &&
1268
1272
  (!semanticTextElement || !capturedSemanticText.has(semanticTextElement)) &&
1269
- !belongsToInteractiveControl(textElement, text) &&
1273
+ !belongsToInteractiveControl(textElement, normalizedText) &&
1270
1274
  isRendered(textElement) &&
1271
1275
  sensitivityFor(textElement, nameFor(textElement)) === 'none') {
1272
1276
  const textId = this.textIds.get(node) ?? id('text');
1273
1277
  this.textIds.set(node, textId);
1274
- visibleText.push({ id: textId, text, provenance: 'page' });
1275
- totalText += text.length;
1278
+ // Fail closed on unusually large nodes instead of redacting a partial
1279
+ // credential or adding an unbounded full-node redaction pass.
1280
+ if (rawText.length > MAX_RAW_TEXT_NODE) {
1281
+ truncated = true;
1282
+ node = walker.nextNode();
1283
+ continue;
1284
+ }
1285
+ // Normalize the whole bounded node before the native text policy so
1286
+ // whitespace-separated credentials cannot evade redaction at a cut.
1287
+ const safeText = (0, textRedaction_generated_js_1.redactText)(normalizedText, MAX_TOTAL_TEXT + 1);
1288
+ let offset = 0;
1289
+ let chunkIndex = 0;
1290
+ while (offset < safeText.length && visibleText.length < MAX_TEXT_ITEMS && totalText < MAX_TOTAL_TEXT) {
1291
+ let end = Math.min(offset + 500, offset + MAX_TOTAL_TEXT - totalText, safeText.length);
1292
+ // Prefer sentence/word boundaries without reserving more payload.
1293
+ if (end < safeText.length) {
1294
+ const window = safeText.slice(offset, end);
1295
+ const sentences = Array.from(window.matchAll(/[.!?] (?=\S)/g));
1296
+ const sentenceEnd = sentences[sentences.length - 1]?.index;
1297
+ const wordEnd = window.lastIndexOf(' ');
1298
+ if (sentenceEnd !== undefined && sentenceEnd >= 249)
1299
+ end = offset + sentenceEnd + 2;
1300
+ else if (wordEnd > 0)
1301
+ end = offset + wordEnd + 1;
1302
+ }
1303
+ // A hard token/budget boundary must not split a UTF-16 pair.
1304
+ if (end < safeText.length && /[\uD800-\uDBFF]/.test(safeText[end - 1]))
1305
+ end -= 1;
1306
+ if (end === offset)
1307
+ break;
1308
+ const chunk = safeText.slice(offset, end);
1309
+ visibleText.push({ id: chunkIndex === 0 ? textId : `${textId}.${chunkIndex}`, text: chunk, provenance: 'page' });
1310
+ totalText += chunk.length;
1311
+ offset = end;
1312
+ chunkIndex += 1;
1313
+ }
1314
+ if (offset < safeText.length)
1315
+ truncated = true;
1276
1316
  if (semanticTextElement)
1277
1317
  capturedSemanticText.add(semanticTextElement);
1278
1318
  }
@@ -1,5 +1,5 @@
1
1
  import type { GuideMeasurementBridge, GuideMeasurementIntent } from './guideTypes.js';
2
- export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.22";
2
+ export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.23";
3
3
  export declare function isGuideMeasurementIntent(value: unknown): value is GuideMeasurementIntent;
4
4
  /** The managed analytics owner supplies possession; this check grants no authority. */
5
5
  export declare function currentGuideMeasurementBridge(value: unknown): value is GuideMeasurementBridge;
@@ -4,7 +4,7 @@ exports.GUIDE_MEASUREMENT_CLIENT_VERSION = void 0;
4
4
  exports.isGuideMeasurementIntent = isGuideMeasurementIntent;
5
5
  exports.currentGuideMeasurementBridge = currentGuideMeasurementBridge;
6
6
  exports.prepareGuideMeasurementBridge = prepareGuideMeasurementBridge;
7
- exports.GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.22';
7
+ exports.GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.23';
8
8
  function isGuideMeasurementIntent(value) {
9
9
  if (!value || typeof value !== 'object' || Array.isArray(value))
10
10
  return false;
@@ -1,6 +1,6 @@
1
1
  import { type LiveDuplexMediaOptions, type LiveDuplexMediaDependencies } from './liveDuplexMedia.js';
2
2
  import { type CommerceBootstrap, type CommerceContext, type CommerceCartSelection, type CommerceProduct, type CommerceContextClear, type LiveCommerceCatalog, type LiveCommerceDisplayed } from './commerce/contracts.js';
3
- export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.22";
3
+ export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.23";
4
4
  export declare const LIVE_CONTROL_CLIENT_CAPABILITIES: readonly ["live_duplex_v1", "live_local_wake_v1", "live_fragment_captions_v1"];
5
5
  declare const phases: readonly ["voice_off", "local_listening", "wake_buffering", "starting", "active", "tentative_idle", "closing", "uncertain", "muted", "suspended", "budget_blocked", "ended"];
6
6
  export type LiveControlState = {
@@ -221,6 +221,9 @@ class LiveControlChannel {
221
221
  return true;
222
222
  }
223
223
  acknowledgeCommerceCatalog(value) {
224
+ // The empty-state UI is visible, but the protocol acknowledges product cards only.
225
+ if (value.products.length === 0)
226
+ return false;
224
227
  const current = this.commerceCatalog;
225
228
  const commerce = this.options.commerce;
226
229
  if (!this.commerceNegotiated || !current || !commerce || !this.commerceTask || !(0, contracts_js_1.parseLiveCommerceCatalog)(current, commerce.bootstrap, commerce.currentContext(), this.commerceTask, this.clock.wallNow(), { cartNegotiated: this.commerceCartNegotiated }) ||
@@ -428,7 +431,7 @@ class LiveControlChannel {
428
431
  stack.pop();
429
432
  else if (data.slice((match.index ?? 0) + match[0].length).trimStart().startsWith(':')) {
430
433
  const key = JSON.parse(match[0]);
431
- const keys = stack.at(-1);
434
+ const keys = stack[stack.length - 1];
432
435
  if (!keys || keys.has(key))
433
436
  throw unavailable();
434
437
  keys.add(key);
@@ -0,0 +1 @@
1
+ export declare const redactText: (value: string, maximum?: number) => string;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ // Generated from ai-live-assist/src/security/textRedaction.ts. Do not edit.
3
+ // Source SHA256: 23840bc803a386b537b4104c4e8d92c7faa7ec0643efff8284bc825d7731e257
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.redactText = void 0;
6
+ const secretValuePatterns = [
7
+ // Compact signed JWTs remain credentials even without a Bearer prefix or a
8
+ // secret-looking field name (for example guideMeasurement.assignment).
9
+ /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(?![A-Za-z0-9_-])/g,
10
+ /\b(?:assignment[_ -]?credential|analytics[_ -]?(?:receipt|proof))["']?\s*[:=]\s*["']?[^\s,;"']{2,}["']?/gi,
11
+ /\b(?:password|passphrase|secret|token|api[_ -]?key|authorization|cookie|otp|one[- ]time(?: code)?|verification code|cvv|cvc|card number|routing number|iban|private[_ -]?key)\s*[:=]\s*["']?[^\s,;"']{2,}["']?/gi,
12
+ /\b(?:sk|rk|pk)-[A-Za-z0-9_-]{16,}\b/g,
13
+ /\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*\b/gi,
14
+ /\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/g,
15
+ /\b(?:\d[ -]*?){13,19}\b/g,
16
+ ];
17
+ const redactText = (value, maximum = 2000) => {
18
+ let redacted = value;
19
+ for (const pattern of secretValuePatterns)
20
+ redacted = redacted.replace(pattern, '[REDACTED]');
21
+ let safe = '';
22
+ for (let index = 0; index < redacted.length; index += 1) {
23
+ const character = redacted[index] ?? '';
24
+ const code = redacted.charCodeAt(index);
25
+ safe += code < 32 && ![9, 10, 13].includes(code) ? ' ' : character;
26
+ }
27
+ return safe.trim().slice(0, maximum);
28
+ };
29
+ exports.redactText = redactText;
package/cjs/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "7.5.22";
1
+ export declare const VERSION = "7.5.23";
package/cjs/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '7.5.22';
4
+ exports.VERSION = '7.5.23';
@@ -34,7 +34,7 @@ export declare const normalizeAiGuideOpenInput: (input?: AiGuideOpenInput) => Re
34
34
  export declare const resolveAiGuideProtocolVersion: (bootstrap: Pick<BootstrapConfig, "experienceMode" | "minimumProtocolVersion" | "protocol">) => 1 | 2;
35
35
  export default class AiLiveAssist {
36
36
  private readonly options;
37
- readonly version = "7.5.22";
37
+ readonly version = "7.5.23";
38
38
  private readonly host;
39
39
  private readonly guideAdmission;
40
40
  private readonly standaloneAdmissionPending;
@@ -238,6 +238,9 @@ export class RealtimeCommerce {
238
238
  }
239
239
  },
240
240
  onDisplayed: (resultSetId, products) => {
241
+ // The empty-state UI is visible, but the protocol acknowledges product cards only.
242
+ if (products.length === 0)
243
+ return;
241
244
  this.context.refresh();
242
245
  if (!isCurrent() || resultSetId !== event.catalog.resultSetId ||
243
246
  !isDisplayedCommerceProducts(event.catalog, products))
package/lib/context.js CHANGED
@@ -1,7 +1,9 @@
1
+ import { redactText } from './privacy/textRedaction.generated.js';
1
2
  import { renderSanitizedLayout } from './visualContext.js';
2
3
  const MAX_TARGETS = 256;
3
4
  const MAX_TEXT_ITEMS = 256;
4
5
  const MAX_TOTAL_TEXT = 24000;
6
+ const MAX_RAW_TEXT_NODE = 96000;
5
7
  const MAX_OPTIONS = 100;
6
8
  const MAX_SELECTED_TEXT = 2000;
7
9
  const SELECTION_RETENTION_MS = 120000;
@@ -1253,22 +1255,60 @@ export class PageContextCollector {
1253
1255
  const textElement = semanticTextElement && isRendered(semanticTextElement)
1254
1256
  ? semanticTextElement
1255
1257
  : node.nodeType === Node.TEXT_NODE ? parent : null;
1256
- const text = normalize(semanticTextElement?.getAttribute('aria-label') ??
1257
- (node.nodeType === Node.TEXT_NODE ? node.textContent ?? '' : ''), 500);
1258
+ const rawText = semanticTextElement?.getAttribute('aria-label') ??
1259
+ (node.nodeType === Node.TEXT_NODE ? node.textContent ?? '' : '');
1260
+ const normalizedText = normalize(rawText.slice(0, MAX_RAW_TEXT_NODE), MAX_RAW_TEXT_NODE);
1261
+ const text = normalizedText.slice(0, 500);
1258
1262
  if (parent &&
1259
1263
  textElement &&
1260
- text &&
1264
+ (text || rawText.length > MAX_RAW_TEXT_NODE) &&
1261
1265
  !parent.closest(PRIVATE_SELECTOR) &&
1262
1266
  !parent.closest('script,style,noscript,template,svg') &&
1263
1267
  !parent.closest('input,select,textarea,option') &&
1264
1268
  (!semanticTextElement || !capturedSemanticText.has(semanticTextElement)) &&
1265
- !belongsToInteractiveControl(textElement, text) &&
1269
+ !belongsToInteractiveControl(textElement, normalizedText) &&
1266
1270
  isRendered(textElement) &&
1267
1271
  sensitivityFor(textElement, nameFor(textElement)) === 'none') {
1268
1272
  const textId = this.textIds.get(node) ?? id('text');
1269
1273
  this.textIds.set(node, textId);
1270
- visibleText.push({ id: textId, text, provenance: 'page' });
1271
- totalText += text.length;
1274
+ // Fail closed on unusually large nodes instead of redacting a partial
1275
+ // credential or adding an unbounded full-node redaction pass.
1276
+ if (rawText.length > MAX_RAW_TEXT_NODE) {
1277
+ truncated = true;
1278
+ node = walker.nextNode();
1279
+ continue;
1280
+ }
1281
+ // Normalize the whole bounded node before the native text policy so
1282
+ // whitespace-separated credentials cannot evade redaction at a cut.
1283
+ const safeText = redactText(normalizedText, MAX_TOTAL_TEXT + 1);
1284
+ let offset = 0;
1285
+ let chunkIndex = 0;
1286
+ while (offset < safeText.length && visibleText.length < MAX_TEXT_ITEMS && totalText < MAX_TOTAL_TEXT) {
1287
+ let end = Math.min(offset + 500, offset + MAX_TOTAL_TEXT - totalText, safeText.length);
1288
+ // Prefer sentence/word boundaries without reserving more payload.
1289
+ if (end < safeText.length) {
1290
+ const window = safeText.slice(offset, end);
1291
+ const sentences = Array.from(window.matchAll(/[.!?] (?=\S)/g));
1292
+ const sentenceEnd = sentences[sentences.length - 1]?.index;
1293
+ const wordEnd = window.lastIndexOf(' ');
1294
+ if (sentenceEnd !== undefined && sentenceEnd >= 249)
1295
+ end = offset + sentenceEnd + 2;
1296
+ else if (wordEnd > 0)
1297
+ end = offset + wordEnd + 1;
1298
+ }
1299
+ // A hard token/budget boundary must not split a UTF-16 pair.
1300
+ if (end < safeText.length && /[\uD800-\uDBFF]/.test(safeText[end - 1]))
1301
+ end -= 1;
1302
+ if (end === offset)
1303
+ break;
1304
+ const chunk = safeText.slice(offset, end);
1305
+ visibleText.push({ id: chunkIndex === 0 ? textId : `${textId}.${chunkIndex}`, text: chunk, provenance: 'page' });
1306
+ totalText += chunk.length;
1307
+ offset = end;
1308
+ chunkIndex += 1;
1309
+ }
1310
+ if (offset < safeText.length)
1311
+ truncated = true;
1272
1312
  if (semanticTextElement)
1273
1313
  capturedSemanticText.add(semanticTextElement);
1274
1314
  }
@@ -1,5 +1,5 @@
1
1
  import type { GuideMeasurementBridge, GuideMeasurementIntent } from './guideTypes.js';
2
- export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.22";
2
+ export declare const GUIDE_MEASUREMENT_CLIENT_VERSION = "7.5.23";
3
3
  export declare function isGuideMeasurementIntent(value: unknown): value is GuideMeasurementIntent;
4
4
  /** The managed analytics owner supplies possession; this check grants no authority. */
5
5
  export declare function currentGuideMeasurementBridge(value: unknown): value is GuideMeasurementBridge;
@@ -1,4 +1,4 @@
1
- export const GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.22';
1
+ export const GUIDE_MEASUREMENT_CLIENT_VERSION = '7.5.23';
2
2
  export function isGuideMeasurementIntent(value) {
3
3
  if (!value || typeof value !== 'object' || Array.isArray(value))
4
4
  return false;
@@ -1,6 +1,6 @@
1
1
  import { type LiveDuplexMediaOptions, type LiveDuplexMediaDependencies } from './liveDuplexMedia.js';
2
2
  import { type CommerceBootstrap, type CommerceContext, type CommerceCartSelection, type CommerceProduct, type CommerceContextClear, type LiveCommerceCatalog, type LiveCommerceDisplayed } from './commerce/contracts.js';
3
- export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.22";
3
+ export declare const LIVE_CONTROL_CLIENT_VERSION = "7.5.23";
4
4
  export declare const LIVE_CONTROL_CLIENT_CAPABILITIES: readonly ["live_duplex_v1", "live_local_wake_v1", "live_fragment_captions_v1"];
5
5
  declare const phases: readonly ["voice_off", "local_listening", "wake_buffering", "starting", "active", "tentative_idle", "closing", "uncertain", "muted", "suspended", "budget_blocked", "ended"];
6
6
  export type LiveControlState = {
@@ -218,6 +218,9 @@ export class LiveControlChannel {
218
218
  return true;
219
219
  }
220
220
  acknowledgeCommerceCatalog(value) {
221
+ // The empty-state UI is visible, but the protocol acknowledges product cards only.
222
+ if (value.products.length === 0)
223
+ return false;
221
224
  const current = this.commerceCatalog;
222
225
  const commerce = this.options.commerce;
223
226
  if (!this.commerceNegotiated || !current || !commerce || !this.commerceTask || !parseLiveCommerceCatalog(current, commerce.bootstrap, commerce.currentContext(), this.commerceTask, this.clock.wallNow(), { cartNegotiated: this.commerceCartNegotiated }) ||
@@ -425,7 +428,7 @@ export class LiveControlChannel {
425
428
  stack.pop();
426
429
  else if (data.slice((match.index ?? 0) + match[0].length).trimStart().startsWith(':')) {
427
430
  const key = JSON.parse(match[0]);
428
- const keys = stack.at(-1);
431
+ const keys = stack[stack.length - 1];
429
432
  if (!keys || keys.has(key))
430
433
  throw unavailable();
431
434
  keys.add(key);
@@ -0,0 +1 @@
1
+ export declare const redactText: (value: string, maximum?: number) => string;
@@ -0,0 +1,25 @@
1
+ // Generated from ai-live-assist/src/security/textRedaction.ts. Do not edit.
2
+ // Source SHA256: 23840bc803a386b537b4104c4e8d92c7faa7ec0643efff8284bc825d7731e257
3
+ const secretValuePatterns = [
4
+ // Compact signed JWTs remain credentials even without a Bearer prefix or a
5
+ // secret-looking field name (for example guideMeasurement.assignment).
6
+ /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(?![A-Za-z0-9_-])/g,
7
+ /\b(?:assignment[_ -]?credential|analytics[_ -]?(?:receipt|proof))["']?\s*[:=]\s*["']?[^\s,;"']{2,}["']?/gi,
8
+ /\b(?:password|passphrase|secret|token|api[_ -]?key|authorization|cookie|otp|one[- ]time(?: code)?|verification code|cvv|cvc|card number|routing number|iban|private[_ -]?key)\s*[:=]\s*["']?[^\s,;"']{2,}["']?/gi,
9
+ /\b(?:sk|rk|pk)-[A-Za-z0-9_-]{16,}\b/g,
10
+ /\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*\b/gi,
11
+ /\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/g,
12
+ /\b(?:\d[ -]*?){13,19}\b/g,
13
+ ];
14
+ export const redactText = (value, maximum = 2000) => {
15
+ let redacted = value;
16
+ for (const pattern of secretValuePatterns)
17
+ redacted = redacted.replace(pattern, '[REDACTED]');
18
+ let safe = '';
19
+ for (let index = 0; index < redacted.length; index += 1) {
20
+ const character = redacted[index] ?? '';
21
+ const code = redacted.charCodeAt(index);
22
+ safe += code < 32 && ![9, 10, 13].includes(code) ? ' ' : character;
23
+ }
24
+ return safe.trim().slice(0, maximum);
25
+ };
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "7.5.22";
1
+ export declare const VERSION = "7.5.23";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.5.22';
1
+ export const VERSION = '7.5.23';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oxvo/ai-live-assist",
3
3
  "description": "Secure AI Guide browser plugin for OXVO Sessions.",
4
- "version": "7.5.22",
4
+ "version": "7.5.23",
5
5
  "keywords": [
6
6
  "ai-live-assist",
7
7
  "webrtc",
@@ -44,12 +44,13 @@
44
44
  "access": "public"
45
45
  },
46
46
  "scripts": {
47
- "build": "node scripts/generateLocales.mjs && rm -rf lib cjs && tsc --project tsconfig.json && tsc --project tsconfig-cjs.json && printf '{ \"type\": \"commonjs\" }\\n' > cjs/package.json",
47
+ "build": "node scripts/generateTextRedaction.mjs --check && node scripts/generateLocales.mjs && rm -rf lib cjs && tsc --project tsconfig.json && tsc --project tsconfig-cjs.json && printf '{ \"type\": \"commonjs\" }\\n' > cjs/package.json",
48
48
  "locales:generate": "node scripts/generateLocales.mjs",
49
49
  "lint": "eslint src --ext .ts --max-warnings=0",
50
- "test": "jest --coverage=false --runInBand",
51
- "test:ci": "jest --coverage=true --runInBand",
52
- "prepublishOnly": "bun run test && bun run build"
50
+ "test": "node scripts/generateTextRedaction.mjs --check && jest --coverage=false --runInBand",
51
+ "test:ci": "node scripts/generateTextRedaction.mjs --check && jest --coverage=true --runInBand",
52
+ "prepublishOnly": "bun run test && bun run build",
53
+ "text-redaction:generate": "node scripts/generateTextRedaction.mjs"
53
54
  },
54
55
  "peerDependencies": {
55
56
  "@oxvo/browser": ">=7.4.50"