@solana/rpc-transport-http
Advanced tools
Comparing version 2.0.0-experimental.feaeef2 to 2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7
@@ -5,5 +5,2 @@ import { SolanaError, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN } from '@solana/errors'; | ||
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
// ../fetch-impl/dist/index.browser.js | ||
var e = globalThis.fetch; | ||
var DISALLOWED_HEADERS = { | ||
@@ -97,3 +94,3 @@ accept: true, | ||
}; | ||
const response = await e(url, requestInfo); | ||
const response = await fetch(url, requestInfo); | ||
if (!response.ok) { | ||
@@ -100,0 +97,0 @@ throw new SolanaError(SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, { |
@@ -5,5 +5,2 @@ import { SolanaError, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN } from '@solana/errors'; | ||
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
// ../fetch-impl/dist/index.browser.js | ||
var e = globalThis.fetch; | ||
var DISALLOWED_HEADERS = { | ||
@@ -97,3 +94,3 @@ accept: true, | ||
}; | ||
const response = await e(url, requestInfo); | ||
const response = await fetch(url, requestInfo); | ||
if (!response.ok) { | ||
@@ -100,0 +97,0 @@ throw new SolanaError(SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, { |
import { SolanaError, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN } from '@solana/errors'; | ||
import { fetch } from 'undici'; | ||
@@ -4,0 +3,0 @@ // ../build-scripts/env-shim.ts |
export type AllowedHttpRequestHeaders = Readonly<{ | ||
[K in DisallowedHeaders | ForbiddenHeaders as Capitalize<Lowercase<K>> | K | Lowercase<K> | Uncapitalize<K> | Uppercase<K>]?: never; | ||
} & { | ||
[headerName: string]: string; | ||
} & { | ||
[K in DisallowedHeaders | ForbiddenHeaders as K | Capitalize<Lowercase<K>> | Lowercase<K> | Uncapitalize<K> | Uppercase<K>]?: never; | ||
}>; | ||
type DisallowedHeaders = 'Accept' | 'Content-Length' | 'Content-Type' | 'Solana-Client'; | ||
type ForbiddenHeaders = 'Accept-Charset' | 'Accept-Encoding' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Connection' | 'Content-Length' | 'Cookie' | 'Date' | 'DNT' | 'Expect' | 'Host' | 'Keep-Alive' | 'Origin' | 'Permissions-Policy' | `Proxy-${string}` | `Sec-${string}` | 'Referer' | 'TE' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Via'; | ||
type ForbiddenHeaders = 'Accept-Charset' | 'Accept-Encoding' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Connection' | 'Content-Length' | 'Cookie' | 'Date' | 'DNT' | 'Expect' | 'Host' | 'Keep-Alive' | 'Origin' | 'Permissions-Policy' | 'Referer' | 'TE' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Via' | `Proxy-${string}` | `Sec-${string}`; | ||
export declare function assertIsAllowedHttpRequestHeaders(headers: Record<string, string>): asserts headers is AllowedHttpRequestHeaders; | ||
@@ -14,5 +14,5 @@ /** | ||
export declare function normalizeHeaders<T extends Record<string, string>>(headers: T): { | ||
[K in keyof T & string as Lowercase<K>]: T[K]; | ||
[K in string & keyof T as Lowercase<K>]: T[K]; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=http-transport-headers.d.ts.map |
{ | ||
"name": "@solana/rpc-transport-http", | ||
"version": "2.0.0-experimental.feaeef2", | ||
"version": "2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7", | ||
"description": "An RPC transport that uses HTTP requests", | ||
@@ -50,4 +50,4 @@ "exports": { | ||
"undici": "^6.6.2", | ||
"@solana/errors": "2.0.0-experimental.feaeef2", | ||
"@solana/rpc-spec": "2.0.0-experimental.feaeef2" | ||
"@solana/errors": "2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7", | ||
"@solana/rpc-spec": "2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7" | ||
}, | ||
@@ -63,10 +63,11 @@ "bundlewatch": { | ||
"scripts": { | ||
"benchmark": "./src/__benchmarks__/run.ts", | ||
"compile:js": "tsup --config build-scripts/tsup.config.package.ts", | ||
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs", | ||
"dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch", | ||
"publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks", | ||
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node ../../node_modules/@solana/build-scripts/add-js-extension-to-types.mjs", | ||
"dev": "jest -c ../../node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch", | ||
"publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag preview --access public --no-git-checks", | ||
"publish-packages": "pnpm prepublishOnly && pnpm publish-impl", | ||
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json", | ||
"test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent", | ||
"test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent", | ||
"test:lint": "jest -c ../../node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent", | ||
"test:prettier": "jest -c ../../node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent", | ||
"test:treeshakability:browser": "agadoo dist/index.browser.js", | ||
@@ -76,5 +77,5 @@ "test:treeshakability:native": "agadoo dist/index.native.js", | ||
"test:typecheck": "tsc --noEmit", | ||
"test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent", | ||
"test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent" | ||
"test:unit:browser": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent", | ||
"test:unit:node": "jest -c ../../node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent" | ||
} | ||
} |
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
75434
19
526
5
+ Added@solana/errors@2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7(transitive)
+ Added@solana/rpc-spec@2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7(transitive)
+ Added@solana/rpc-spec-types@2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7(transitive)
- Removed@solana/errors@2.0.0-experimental.feaeef2(transitive)
- Removed@solana/rpc-spec@2.0.0-experimental.feaeef2(transitive)
- Removed@solana/rpc-spec-types@2.0.0-experimental.feaeef2(transitive)
Updated@solana/errors@2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7
Updated@solana/rpc-spec@2.0.0-experimental-20240308012709.069e0006f493b83e842579fada1c983874f245b7