@blockrun/clawrouter 0.12.305 → 0.12.307
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/dist/cli.js +16 -6
- package/dist/index.js +16 -6
- package/package.json +4 -2
package/dist/cli.js
CHANGED
|
@@ -122278,12 +122278,19 @@ function isBlockedSsrfHost(hostname3) {
|
|
|
122278
122278
|
}
|
|
122279
122279
|
const embedded = h.match(/^64:ff9b::(.+)$/) ?? h.match(/::ffff:(.+)$/);
|
|
122280
122280
|
if (embedded) {
|
|
122281
|
-
const
|
|
122281
|
+
const rawTail = embedded[1];
|
|
122282
|
+
const tail = rawTail.startsWith("0:") && (rawTail.includes(".") || rawTail.split(":").length > 2) ? rawTail.slice(2) : rawTail;
|
|
122282
122283
|
if (tail.includes(".")) return isBlockedSsrfHost(tail);
|
|
122283
122284
|
const seg = tail.split(":");
|
|
122284
122285
|
if (seg.length === 2)
|
|
122285
122286
|
return isBlockedSsrfHost(v4FromHex(parseInt(seg[0], 16), parseInt(seg[1], 16)));
|
|
122286
122287
|
}
|
|
122288
|
+
const compat = h.match(/^::(?:0:)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
|
|
122289
|
+
if (compat) return isBlockedSsrfHost(compat[1]);
|
|
122290
|
+
const compatHex = h.match(/^::([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);
|
|
122291
|
+
if (compatHex) {
|
|
122292
|
+
return isBlockedSsrfHost(v4FromHex(parseInt(compatHex[1], 16), parseInt(compatHex[2], 16)));
|
|
122293
|
+
}
|
|
122287
122294
|
return false;
|
|
122288
122295
|
}
|
|
122289
122296
|
const m = h.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
|
|
@@ -176918,8 +176925,14 @@ var require_follow_redirects = __commonJS({
|
|
|
176918
176925
|
RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
176919
176926
|
if (!options.headers) {
|
|
176920
176927
|
options.headers = {};
|
|
176928
|
+
} else if (Array.isArray(options.headers)) {
|
|
176929
|
+
var headerList = options.headers;
|
|
176930
|
+
options.headers = {};
|
|
176931
|
+
for (var i = 0; i < headerList.length; i += 2) {
|
|
176932
|
+
options.headers[headerList[i]] = headerList[i + 1];
|
|
176933
|
+
}
|
|
176921
176934
|
}
|
|
176922
|
-
if (!
|
|
176935
|
+
if (!Array.isArray(options.sensitiveHeaders)) {
|
|
176923
176936
|
options.sensitiveHeaders = [];
|
|
176924
176937
|
}
|
|
176925
176938
|
if (options.host) {
|
|
@@ -177176,9 +177189,6 @@ var require_follow_redirects = __commonJS({
|
|
|
177176
177189
|
var dot = subdomain.length - domain2.length - 1;
|
|
177177
177190
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain2);
|
|
177178
177191
|
}
|
|
177179
|
-
function isArray2(value) {
|
|
177180
|
-
return value instanceof Array;
|
|
177181
|
-
}
|
|
177182
177192
|
function isString2(value) {
|
|
177183
177193
|
return typeof value === "string" || value instanceof String;
|
|
177184
177194
|
}
|
|
@@ -177192,7 +177202,7 @@ var require_follow_redirects = __commonJS({
|
|
|
177192
177202
|
return URL3 && value instanceof URL3;
|
|
177193
177203
|
}
|
|
177194
177204
|
function escapeRegex4(regex) {
|
|
177195
|
-
return regex.replace(/[\]\\/()
|
|
177205
|
+
return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&");
|
|
177196
177206
|
}
|
|
177197
177207
|
module.exports = wrap3({ http: http5, https: https2 });
|
|
177198
177208
|
module.exports.wrap = wrap3;
|
package/dist/index.js
CHANGED
|
@@ -141440,8 +141440,14 @@ var require_follow_redirects = __commonJS({
|
|
|
141440
141440
|
RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
141441
141441
|
if (!options.headers) {
|
|
141442
141442
|
options.headers = {};
|
|
141443
|
+
} else if (Array.isArray(options.headers)) {
|
|
141444
|
+
var headerList = options.headers;
|
|
141445
|
+
options.headers = {};
|
|
141446
|
+
for (var i = 0; i < headerList.length; i += 2) {
|
|
141447
|
+
options.headers[headerList[i]] = headerList[i + 1];
|
|
141448
|
+
}
|
|
141443
141449
|
}
|
|
141444
|
-
if (!
|
|
141450
|
+
if (!Array.isArray(options.sensitiveHeaders)) {
|
|
141445
141451
|
options.sensitiveHeaders = [];
|
|
141446
141452
|
}
|
|
141447
141453
|
if (options.host) {
|
|
@@ -141698,9 +141704,6 @@ var require_follow_redirects = __commonJS({
|
|
|
141698
141704
|
var dot = subdomain.length - domain2.length - 1;
|
|
141699
141705
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain2);
|
|
141700
141706
|
}
|
|
141701
|
-
function isArray2(value) {
|
|
141702
|
-
return value instanceof Array;
|
|
141703
|
-
}
|
|
141704
141707
|
function isString2(value) {
|
|
141705
141708
|
return typeof value === "string" || value instanceof String;
|
|
141706
141709
|
}
|
|
@@ -141714,7 +141717,7 @@ var require_follow_redirects = __commonJS({
|
|
|
141714
141717
|
return URL3 && value instanceof URL3;
|
|
141715
141718
|
}
|
|
141716
141719
|
function escapeRegex4(regex) {
|
|
141717
|
-
return regex.replace(/[\]\\/()
|
|
141720
|
+
return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&");
|
|
141718
141721
|
}
|
|
141719
141722
|
module.exports = wrap3({ http: http5, https: https2 });
|
|
141720
141723
|
module.exports.wrap = wrap3;
|
|
@@ -288839,12 +288842,19 @@ function isBlockedSsrfHost(hostname3) {
|
|
|
288839
288842
|
}
|
|
288840
288843
|
const embedded = h.match(/^64:ff9b::(.+)$/) ?? h.match(/::ffff:(.+)$/);
|
|
288841
288844
|
if (embedded) {
|
|
288842
|
-
const
|
|
288845
|
+
const rawTail = embedded[1];
|
|
288846
|
+
const tail = rawTail.startsWith("0:") && (rawTail.includes(".") || rawTail.split(":").length > 2) ? rawTail.slice(2) : rawTail;
|
|
288843
288847
|
if (tail.includes(".")) return isBlockedSsrfHost(tail);
|
|
288844
288848
|
const seg = tail.split(":");
|
|
288845
288849
|
if (seg.length === 2)
|
|
288846
288850
|
return isBlockedSsrfHost(v4FromHex(parseInt(seg[0], 16), parseInt(seg[1], 16)));
|
|
288847
288851
|
}
|
|
288852
|
+
const compat = h.match(/^::(?:0:)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
|
|
288853
|
+
if (compat) return isBlockedSsrfHost(compat[1]);
|
|
288854
|
+
const compatHex = h.match(/^::([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);
|
|
288855
|
+
if (compatHex) {
|
|
288856
|
+
return isBlockedSsrfHost(v4FromHex(parseInt(compatHex[1], 16), parseInt(compatHex[2], 16)));
|
|
288857
|
+
}
|
|
288848
288858
|
return false;
|
|
288849
288859
|
}
|
|
288850
288860
|
const m = h.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/clawrouter",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.307",
|
|
4
4
|
"description": "Smart LLM router — save 84% on inference costs. 90 models (7 free). Pay by credit card (API key) or USDC (x402 wallet).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
},
|
|
130
130
|
"overrides": {
|
|
131
131
|
"axios": "$axios",
|
|
132
|
+
"follow-redirects": "1.16.2",
|
|
132
133
|
"undici": "$undici",
|
|
133
134
|
"ws": "^8.21.2",
|
|
134
135
|
"postcss": "^8.5.25",
|
|
@@ -138,11 +139,12 @@
|
|
|
138
139
|
"tar": "^7.5.22",
|
|
139
140
|
"hono": "^4.13.5",
|
|
140
141
|
"@hono/node-server": "^2.1.0",
|
|
141
|
-
"ip-address": "10.7.
|
|
142
|
+
"ip-address": "10.7.4",
|
|
142
143
|
"@solana-program/compute-budget": "^0.18.1",
|
|
143
144
|
"@solana-program/token": "^0.16.1",
|
|
144
145
|
"@solana-program/token-2022": "^0.16.1",
|
|
145
146
|
"proxy-addr": "^2.0.8",
|
|
147
|
+
"npm": "12.2.1",
|
|
146
148
|
"@x402/svm": {
|
|
147
149
|
"@solana/program-client-core": "$@solana/kit"
|
|
148
150
|
},
|