@solana/rpc-transport-http
Advanced tools
Comparing version 2.0.0-experimental.7d67615 to 2.0.0-experimental.7e745d6
@@ -0,1 +1,3 @@ | ||
import { SolanaError, SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN } from '@solana/errors'; | ||
// ../build-scripts/env-shim.ts | ||
@@ -6,17 +8,2 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
var e = globalThis.fetch; | ||
// src/http-transport-errors.ts | ||
var SolanaHttpError = class extends Error { | ||
statusCode; | ||
constructor(details) { | ||
super(`HTTP error (${details.statusCode}): ${details.message}`); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.statusCode = details.statusCode; | ||
} | ||
get name() { | ||
return "SolanaHttpError"; | ||
} | ||
}; | ||
// src/http-transport-headers.ts | ||
var DISALLOWED_HEADERS = { | ||
@@ -58,5 +45,5 @@ accept: true, | ||
if (badHeaders.length > 0) { | ||
throw new Error( | ||
`${badHeaders.length > 1 ? "These headers are" : "This header is"} forbidden: \`${badHeaders.join("`, `")}\`. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.` | ||
); | ||
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN, { | ||
headers: badHeaders | ||
}); | ||
} | ||
@@ -113,3 +100,3 @@ } | ||
if (!response.ok) { | ||
throw new SolanaHttpError({ | ||
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, { | ||
message: response.statusText, | ||
@@ -116,0 +103,0 @@ statusCode: response.status |
@@ -0,1 +1,3 @@ | ||
import { SolanaError, SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN } from '@solana/errors'; | ||
// ../build-scripts/env-shim.ts | ||
@@ -6,17 +8,2 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
var e = globalThis.fetch; | ||
// src/http-transport-errors.ts | ||
var SolanaHttpError = class extends Error { | ||
statusCode; | ||
constructor(details) { | ||
super(`HTTP error (${details.statusCode}): ${details.message}`); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.statusCode = details.statusCode; | ||
} | ||
get name() { | ||
return "SolanaHttpError"; | ||
} | ||
}; | ||
// src/http-transport-headers.ts | ||
var DISALLOWED_HEADERS = { | ||
@@ -58,5 +45,5 @@ accept: true, | ||
if (badHeaders.length > 0) { | ||
throw new Error( | ||
`${badHeaders.length > 1 ? "These headers are" : "This header is"} forbidden: \`${badHeaders.join("`, `")}\`. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.` | ||
); | ||
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN, { | ||
headers: badHeaders | ||
}); | ||
} | ||
@@ -113,3 +100,3 @@ } | ||
if (!response.ok) { | ||
throw new SolanaHttpError({ | ||
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, { | ||
message: response.statusText, | ||
@@ -116,0 +103,0 @@ statusCode: response.status |
@@ -0,1 +1,2 @@ | ||
import { SolanaError, SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN } from '@solana/errors'; | ||
import { fetch } from 'undici'; | ||
@@ -5,17 +6,2 @@ | ||
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
// src/http-transport-errors.ts | ||
var SolanaHttpError = class extends Error { | ||
statusCode; | ||
constructor(details) { | ||
super(`HTTP error (${details.statusCode}): ${details.message}`); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.statusCode = details.statusCode; | ||
} | ||
get name() { | ||
return "SolanaHttpError"; | ||
} | ||
}; | ||
// src/http-transport-headers.ts | ||
var DISALLOWED_HEADERS = { | ||
@@ -57,5 +43,5 @@ accept: true, | ||
if (badHeaders.length > 0) { | ||
throw new Error( | ||
`${badHeaders.length > 1 ? "These headers are" : "This header is"} forbidden: \`${badHeaders.join("`, `")}\`. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.` | ||
); | ||
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN, { | ||
headers: badHeaders | ||
}); | ||
} | ||
@@ -105,3 +91,3 @@ } | ||
if (!response.ok) { | ||
throw new SolanaHttpError({ | ||
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, { | ||
message: response.statusText, | ||
@@ -108,0 +94,0 @@ statusCode: response.status |
{ | ||
"name": "@solana/rpc-transport-http", | ||
"version": "2.0.0-experimental.7d67615", | ||
"version": "2.0.0-experimental.7e745d6", | ||
"description": "An RPC transport that uses HTTP requests", | ||
@@ -50,3 +50,4 @@ "exports": { | ||
"undici": "^6.6.2", | ||
"@solana/rpc-spec": "2.0.0-experimental.7d67615" | ||
"@solana/errors": "2.0.0-experimental.7e745d6", | ||
"@solana/rpc-spec": "2.0.0-experimental.7e745d6" | ||
}, | ||
@@ -53,0 +54,0 @@ "bundlewatch": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79150
3
20
631
26
+ Added@solana/errors@2.0.0-experimental.7e745d6(transitive)
+ Added@solana/rpc-spec@2.0.0-experimental.7e745d6(transitive)
+ Added@solana/rpc-spec-types@2.0.0-experimental.7e745d6(transitive)
+ Addedchalk@5.4.1(transitive)
+ Addedcommander@12.1.0(transitive)
- Removed@solana/rpc-spec@2.0.0-experimental.7d67615(transitive)
- Removed@solana/rpc-spec-types@2.0.0-experimental.7d67615(transitive)