@reclaimprotocol/attestor-core 5.1.0-dev.1 → 5.1.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.
|
@@ -8638,7 +8638,6 @@ var adapter = {
|
|
|
8638
8638
|
};
|
|
8639
8639
|
|
|
8640
8640
|
// src/providers/http/utils.ts
|
|
8641
|
-
import RE2 from "re2";
|
|
8642
8641
|
import xpath from "xpath";
|
|
8643
8642
|
function extractHTMLElement(html2, xpathExpression, contentsOnly) {
|
|
8644
8643
|
const { start, end } = extractHTMLElementIndex(html2, xpathExpression, contentsOnly);
|
|
@@ -8805,8 +8804,16 @@ function parseHttpResponse(buff) {
|
|
|
8805
8804
|
parser.streamEnded();
|
|
8806
8805
|
return parser.res;
|
|
8807
8806
|
}
|
|
8807
|
+
var RE2;
|
|
8808
|
+
import("re2").then((m) => {
|
|
8809
|
+
RE2 = m.default;
|
|
8810
|
+
}).catch(() => {
|
|
8811
|
+
});
|
|
8808
8812
|
function makeRegex(str) {
|
|
8809
|
-
|
|
8813
|
+
if (RE2) {
|
|
8814
|
+
return RE2(str, "sgiu");
|
|
8815
|
+
}
|
|
8816
|
+
return new RegExp(str, "sgiu");
|
|
8810
8817
|
}
|
|
8811
8818
|
var TEMPLATE_START_CHARCODE = "{".charCodeAt(0);
|
|
8812
8819
|
var TEMPLATE_END_CHARCODE = "}".charCodeAt(0);
|
package/lib/index.js
CHANGED
|
@@ -6947,7 +6947,6 @@ var adapter = {
|
|
|
6947
6947
|
};
|
|
6948
6948
|
|
|
6949
6949
|
// src/providers/http/utils.ts
|
|
6950
|
-
import RE2 from "re2";
|
|
6951
6950
|
import xpath from "xpath";
|
|
6952
6951
|
function extractHTMLElement(html2, xpathExpression, contentsOnly) {
|
|
6953
6952
|
const { start, end } = extractHTMLElementIndex(html2, xpathExpression, contentsOnly);
|
|
@@ -7122,8 +7121,16 @@ function parseHttpResponse(buff) {
|
|
|
7122
7121
|
parser.streamEnded();
|
|
7123
7122
|
return parser.res;
|
|
7124
7123
|
}
|
|
7124
|
+
var RE2;
|
|
7125
|
+
import("re2").then((m) => {
|
|
7126
|
+
RE2 = m.default;
|
|
7127
|
+
}).catch(() => {
|
|
7128
|
+
});
|
|
7125
7129
|
function makeRegex(str) {
|
|
7126
|
-
|
|
7130
|
+
if (RE2) {
|
|
7131
|
+
return RE2(str, "sgiu");
|
|
7132
|
+
}
|
|
7133
|
+
return new RegExp(str, "sgiu");
|
|
7127
7134
|
}
|
|
7128
7135
|
var TEMPLATE_START_CHARCODE = "{".charCodeAt(0);
|
|
7129
7136
|
var TEMPLATE_END_CHARCODE = "}".charCodeAt(0);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '../../providers/http/patch-parse5-tree.ts';
|
|
2
|
-
import RE2 from 're2';
|
|
3
2
|
import type { ArraySlice, CompleteTLSPacket, ProviderParams, Transcript } from '../../types/index.ts';
|
|
4
3
|
import type { HttpRequest, HttpResponse } from '../../utils/index.ts';
|
|
5
4
|
export type JSONIndex = {
|
|
@@ -64,7 +63,7 @@ export declare function convertResponsePosToAbsolutePos(pos: number, bodyStartId
|
|
|
64
63
|
*/
|
|
65
64
|
export declare function getRedactionsForChunkHeaders(from: number, to: number, chunks?: ArraySlice[]): ArraySlice[];
|
|
66
65
|
export declare function parseHttpResponse(buff: Uint8Array): HttpResponse;
|
|
67
|
-
export declare function makeRegex(str: string):
|
|
66
|
+
export declare function makeRegex(str: string): RegExp;
|
|
68
67
|
/**
|
|
69
68
|
* Try to match strings that contain templates like {{param}}
|
|
70
69
|
* against redacted string that has *** instead of that param
|
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/attestor-core",
|
|
3
|
-
"version": "5.1.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
7
7
|
"#src/*.ts": "./src/*.ts",
|
|
8
8
|
"#src/*.js": "./lib/*.js"
|
|
9
9
|
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/reclaimprotocol/attestor-core"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
10
17
|
"exports": {
|
|
11
18
|
".": {
|
|
12
19
|
"types": "./lib/index.d.ts",
|
|
@@ -47,8 +54,7 @@
|
|
|
47
54
|
"start:chain": "bash ./avs/utils/anvil/start-anvil-chain-with-el-and-avs-deployed.sh",
|
|
48
55
|
"commitlint": "commitlint --edit",
|
|
49
56
|
"download:zk-files": "node node_modules/@reclaimprotocol/zk-symmetric-crypto/lib/scripts/download-files",
|
|
50
|
-
"generate:toprf-keys": "npm run run:tsc -- src/scripts/generate-toprf-keys.ts"
|
|
51
|
-
"publish:pkg": "npm publish --access public"
|
|
57
|
+
"generate:toprf-keys": "npm run run:tsc -- src/scripts/generate-toprf-keys.ts"
|
|
52
58
|
},
|
|
53
59
|
"files": [
|
|
54
60
|
"lib/*",
|
|
@@ -105,12 +111,14 @@
|
|
|
105
111
|
"parse5": "^8.0.0",
|
|
106
112
|
"parse5-htmlparser2-tree-adapter": "^8.0.0",
|
|
107
113
|
"pino": "^9.14.0",
|
|
108
|
-
"re2": "^1.24.0",
|
|
109
114
|
"serve-static": "^1.16.3",
|
|
110
115
|
"snarkjs": "^0.7.6",
|
|
111
116
|
"ws": "^8.20.0",
|
|
112
117
|
"xpath": "^0.0.34"
|
|
113
118
|
},
|
|
119
|
+
"optionalDependencies": {
|
|
120
|
+
"re2": "*"
|
|
121
|
+
},
|
|
114
122
|
"devDependencies": {
|
|
115
123
|
"@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
|
|
116
124
|
"@commitlint/cli": "^17.8.1",
|
|
@@ -134,6 +142,7 @@
|
|
|
134
142
|
"tsc-alias": "^1.8.17",
|
|
135
143
|
"typechain": "^8.3.2",
|
|
136
144
|
"typescript": "^5.9.3",
|
|
145
|
+
"re2": "^1.24.0",
|
|
137
146
|
"whatwg-url": "^14.2.0",
|
|
138
147
|
"yaml": "^2.8.3"
|
|
139
148
|
},
|