@arcjet/redact-wasm 1.0.0-beta.4 → 1.0.0-beta.6
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/_virtual/arcjet_analyze_bindings_redact.component.core.js +1 -1
- package/_virtual/arcjet_analyze_bindings_redact.component.core2.js +1 -1
- package/_virtual/arcjet_analyze_bindings_redact.component.core3.js +1 -1
- package/package.json +7 -7
- package/wasm/arcjet_analyze_bindings_redact.component.core.wasm +0 -0
- package/wasm/arcjet_analyze_bindings_redact.component.core2.wasm +0 -0
- package/wasm/arcjet_analyze_bindings_redact.component.core3.wasm +0 -0
- package/wasm/arcjet_analyze_bindings_redact.component.js +14 -11
- package/wasm/arcjet_analyze_bindings_redact.component.wasm +0 -0
- package/wasm/interfaces/arcjet-redact-custom-redact.d.ts +1 -1
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* properly support consistent asset bundling techniques.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
const wasmBase64 = "data:application/wasm;base64,
|
|
27
|
+
const wasmBase64 = "data:application/wasm;base64,AGFzbQEAAAABEAJgA39/fwBgBn9/f39/fwADAwIAAQQFAXABAgIHFAMBMAAAATEAAQgkaW1wb3J0cwEACiMCDQAgACABIAJBABEAAAsTACAAIAEgAiADIAQgBUEBEQEACwAvCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQ13aXQtY29tcG9uZW50BzAuMjI4LjAAlQEEbmFtZQATEndpdC1jb21wb25lbnQ6c2hpbQF5AgA6aW5kaXJlY3QtYXJjamV0OnJlZGFjdC9jdXN0b20tcmVkYWN0LWRldGVjdC1zZW5zaXRpdmUtaW5mbwE6aW5kaXJlY3QtYXJjamV0OnJlZGFjdC9jdXN0b20tcmVkYWN0LXJlZGFjdC1zZW5zaXRpdmUtaW5mbw==";
|
|
28
28
|
/**
|
|
29
29
|
* Returns a WebAssembly.Module for an Arcjet Wasm binary, decoded from a base64
|
|
30
30
|
* Data URL.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* properly support consistent asset bundling techniques.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
const wasmBase64 = "data:application/wasm;base64,
|
|
27
|
+
const wasmBase64 = "data:application/wasm;base64,AGFzbQEAAAABEAJgA39/fwBgBn9/f39/fwACGgMAATAAAAABMQABAAgkaW1wb3J0cwFwAQICCQgBAEEACwIAAQAvCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQ13aXQtY29tcG9uZW50BzAuMjI4LjAAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM=";
|
|
28
28
|
/**
|
|
29
29
|
* Returns a WebAssembly.Module for an Arcjet Wasm binary, decoded from a base64
|
|
30
30
|
* Data URL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcjet/redact-wasm",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"description": "Arcjet sensitive information redaction detection engine",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://arcjet.com",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@arcjet/eslint-config": "1.0.0-beta.
|
|
52
|
-
"@arcjet/rollup-config": "1.0.0-beta.
|
|
53
|
-
"@arcjet/tsconfig": "1.0.0-beta.
|
|
51
|
+
"@arcjet/eslint-config": "1.0.0-beta.6",
|
|
52
|
+
"@arcjet/rollup-config": "1.0.0-beta.6",
|
|
53
|
+
"@arcjet/tsconfig": "1.0.0-beta.6",
|
|
54
54
|
"@bytecodealliance/jco": "1.5.0",
|
|
55
|
-
"@rollup/wasm-node": "4.
|
|
55
|
+
"@rollup/wasm-node": "4.40.0",
|
|
56
56
|
"@types/node": "18.18.0",
|
|
57
|
-
"eslint": "9.
|
|
57
|
+
"eslint": "9.24.0",
|
|
58
58
|
"expect": "29.7.0",
|
|
59
|
-
"typescript": "5.8.
|
|
59
|
+
"typescript": "5.8.3"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -97,7 +97,7 @@ function instantiate(getCoreModule, imports, instantiateCore = WebAssembly.insta
|
|
|
97
97
|
dataView(memory0).setInt32(arg2 + 0, result5, true);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
function trampoline1(arg0, arg1, arg2, arg3) {
|
|
100
|
+
function trampoline1(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
101
101
|
let variant1;
|
|
102
102
|
switch (arg0) {
|
|
103
103
|
case 0: {
|
|
@@ -138,17 +138,20 @@ function instantiate(getCoreModule, imports, instantiateCore = WebAssembly.insta
|
|
|
138
138
|
throw new TypeError('invalid variant discriminant for SensitiveInfoEntity');
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
var ptr2 = arg3;
|
|
142
|
+
var len2 = arg4;
|
|
143
|
+
var result2 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr2, len2));
|
|
144
|
+
const ret = redactSensitiveInfo(variant1, result2);
|
|
145
|
+
var variant4 = ret;
|
|
146
|
+
if (variant4 === null || variant4=== undefined) {
|
|
147
|
+
dataView(memory0).setInt8(arg5 + 0, 0, true);
|
|
145
148
|
} else {
|
|
146
|
-
const e =
|
|
147
|
-
dataView(memory0).setInt8(
|
|
148
|
-
var
|
|
149
|
-
var
|
|
150
|
-
dataView(memory0).setInt32(
|
|
151
|
-
dataView(memory0).setInt32(
|
|
149
|
+
const e = variant4;
|
|
150
|
+
dataView(memory0).setInt8(arg5 + 0, 1, true);
|
|
151
|
+
var ptr3 = utf8Encode(e, realloc0, memory0);
|
|
152
|
+
var len3 = utf8EncodedLen;
|
|
153
|
+
dataView(memory0).setInt32(arg5 + 8, len3, true);
|
|
154
|
+
dataView(memory0).setInt32(arg5 + 4, ptr3, true);
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
let exports2;
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export namespace ArcjetRedactCustomRedact {
|
|
2
2
|
export function detectSensitiveInfo(tokens: Array<string>): Array<SensitiveInfoEntity | undefined>;
|
|
3
|
-
export function redactSensitiveInfo(entityType: SensitiveInfoEntity): string | undefined;
|
|
3
|
+
export function redactSensitiveInfo(entityType: SensitiveInfoEntity, plaintext: string): string | undefined;
|
|
4
4
|
}
|
|
5
5
|
export type SensitiveInfoEntity = SensitiveInfoEntityEmail | SensitiveInfoEntityPhoneNumber | SensitiveInfoEntityIpAddress | SensitiveInfoEntityCreditCardNumber | SensitiveInfoEntityCustom;
|
|
6
6
|
export interface SensitiveInfoEntityEmail {
|