@arcjet/redact-wasm 1.0.0-beta.10 → 1.0.0-beta.11

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.
Files changed (3) hide show
  1. package/index.d.ts +29 -2
  2. package/index.js +10 -0
  3. package/package.json +6 -7
package/index.d.ts CHANGED
@@ -1,6 +1,33 @@
1
- import type { RedactedSensitiveInfoEntity, RedactSensitiveInfoConfig, SensitiveInfoEntity } from "./wasm/arcjet_analyze_bindings_redact.component.js";
2
1
  import type { ArcjetRedactCustomRedact } from "./wasm/interfaces/arcjet-redact-custom-redact.js";
2
+ /**
3
+ * Initialize the WebAssembly.
4
+ *
5
+ * @param detect
6
+ * Custom detection function.
7
+ * @param replace
8
+ * Custom replacement function.
9
+ * @returns
10
+ * Promise to the initialized WebAssembly instance.
11
+ */
3
12
  export declare function initializeWasm(detect: CustomDetect, replace: CustomRedact): Promise<import("./wasm/arcjet_analyze_bindings_redact.component.js").Root | undefined>;
13
+ /**
14
+ * Detect sensitive info.
15
+ *
16
+ * @param tokens
17
+ * Tokens to detect in.
18
+ * @returns
19
+ * Array of detected entities.
20
+ */
4
21
  type CustomDetect = typeof ArcjetRedactCustomRedact.detectSensitiveInfo;
22
+ /**
23
+ * Redact sensitive info.
24
+ *
25
+ * @param entityType
26
+ * Entity to redact.
27
+ * @param plaintext
28
+ * The plaintext string to redact.
29
+ * @returns
30
+ * Redacted string.
31
+ */
5
32
  type CustomRedact = typeof ArcjetRedactCustomRedact.redactSensitiveInfo;
6
- export { type CustomDetect, type CustomRedact, type RedactedSensitiveInfoEntity, type RedactSensitiveInfoConfig, type SensitiveInfoEntity, };
33
+ export type { RedactedSensitiveInfoEntity, RedactSensitiveInfoConfig, SensitiveInfoEntity, } from "./wasm/arcjet_analyze_bindings_redact.component.js";
package/index.js CHANGED
@@ -18,6 +18,16 @@ async function moduleFromPath(path) {
18
18
  }
19
19
  throw new Error(`Unknown path: ${path}`);
20
20
  }
21
+ /**
22
+ * Initialize the WebAssembly.
23
+ *
24
+ * @param detect
25
+ * Custom detection function.
26
+ * @param replace
27
+ * Custom replacement function.
28
+ * @returns
29
+ * Promise to the initialized WebAssembly instance.
30
+ */
21
31
  async function initializeWasm(detect, replace) {
22
32
  const coreImports = {
23
33
  "arcjet:redact/custom-redact": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcjet/redact-wasm",
3
- "version": "1.0.0-beta.10",
3
+ "version": "1.0.0-beta.11",
4
4
  "description": "Arcjet sensitive information redaction detection engine",
5
5
  "keywords": [
6
6
  "arcjet",
@@ -58,13 +58,12 @@
58
58
  },
59
59
  "dependencies": {},
60
60
  "devDependencies": {
61
- "@arcjet/eslint-config": "1.0.0-beta.10",
62
- "@arcjet/rollup-config": "1.0.0-beta.10",
63
- "@arcjet/tsconfig": "1.0.0-beta.10",
61
+ "@arcjet/eslint-config": "1.0.0-beta.11",
62
+ "@arcjet/rollup-config": "1.0.0-beta.11",
64
63
  "@bytecodealliance/jco": "1.5.0",
65
- "@rollup/wasm-node": "4.46.2",
66
- "@types/node": "18.18.0",
67
- "eslint": "9.32.0",
64
+ "@rollup/wasm-node": "4.50.0",
65
+ "@types/node": "24.3.0",
66
+ "eslint": "9.34.0",
68
67
  "typescript": "5.9.2"
69
68
  },
70
69
  "publishConfig": {