@taquito/http-utils 17.2.0 → 17.3.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.
package/LICENSE
CHANGED
|
@@ -1,7 +1,202 @@
|
|
|
1
|
-
Copyright 2019 ECAD Labs Inc
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/dist/lib/version.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "17.
|
|
6
|
+
"commitHash": "a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2",
|
|
7
|
+
"version": "17.3.0"
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
|
@@ -599,8 +599,8 @@ var STATUS_CODE;
|
|
|
599
599
|
|
|
600
600
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
601
601
|
const VERSION = {
|
|
602
|
-
"commitHash": "
|
|
603
|
-
"version": "17.
|
|
602
|
+
"commitHash": "a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2",
|
|
603
|
+
"version": "17.3.0"
|
|
604
604
|
};
|
|
605
605
|
|
|
606
606
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-http-utils.es6.js","sources":["../src/fetch-adapter.ts","../src/errors.ts","../src/status_code.ts","../src/version.ts","../src/taquito-http-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nconst settle = require('axios/lib/core/settle');\nconst buildURL = require('axios/lib/helpers/buildURL');\nconst buildFullPath = require('axios/lib/core/buildFullPath');\nconst { isUndefined, isStandardBrowserEnv, isFormData } = require('axios/lib/utils');\n\n/**\n * - Create a request object\n * - Get response body\n * - Check if timeout\n */\nexport default async function fetchAdapter(config: AxiosRequestConfig): Promise<AxiosResponse> {\n const request = createRequest(config);\n const promiseChain = [getResponse(request, config)];\n\n if (config.timeout && config.timeout > 0) {\n promiseChain.push(\n new Promise((res) => {\n setTimeout(() => {\n const message = config.timeoutErrorMessage\n ? config.timeoutErrorMessage\n : 'timeout of ' + config.timeout + 'ms exceeded';\n res(createError(message, config, 'ECONNABORTED', request));\n }, config.timeout);\n })\n );\n }\n\n const data = await Promise.race(promiseChain);\n return new Promise((resolve, reject) => {\n if (data instanceof Error) {\n reject(data);\n } else {\n const c: any = config;\n 'settle' in c && Object.prototype.toString.call(c.settle) === '[object Function]'\n ? c.settle(resolve, reject, data)\n : settle(resolve, reject, data);\n }\n });\n}\n\n/**\n * Fetch API stage two is to get response body. This function tries to retrieve\n * response body based on response's type\n */\nasync function getResponse(request: RequestInfo | URL, config: AxiosRequestConfig) {\n try {\n const stageOne = await fetch(request as any);\n\n let response: {\n ok: boolean;\n status: number;\n statusText: string;\n headers: Headers;\n config: AxiosRequestConfig;\n request: RequestInfo | URL;\n data?: unknown;\n } = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n if (stageOne.status >= 400) {\n return createError('Response Error', config, 'ERR_NETWORK', request, response);\n }\n\n response = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n\n if (stageOne.status >= 200 && stageOne.status !== 204) {\n switch (config.responseType) {\n case 'arraybuffer':\n response.data = await stageOne.arrayBuffer();\n break;\n case 'blob':\n response.data = await stageOne.blob();\n break;\n case 'json':\n response.data = await stageOne.json();\n break;\n // TODO: the next option does not exist in response type\n // case 'formData':\n // response.data = await stageOne.formData();\n // break;\n default:\n response.data = await stageOne.text();\n break;\n }\n }\n\n return response;\n } catch (e) {\n return createError('Network Error', config, 'ERR_NETWORK', request);\n }\n}\n\n/**\n * This function will create a Request object based on configuration's axios\n */\nfunction createRequest(config: AxiosRequestConfig) {\n const headers = new Headers(config.headers as any);\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password\n ? decodeURI(encodeURIComponent(config.auth.password))\n : '';\n headers.set('Authorization', `Basic ${btoa(username + ':' + password)}`);\n }\n\n const method = config.method?.toUpperCase();\n const options: RequestInit = {\n headers: headers,\n method,\n };\n if (method !== 'GET' && method !== 'HEAD') {\n options.body = config.data;\n\n // In these cases the browser will automatically set the correct Content-Type,\n // but only if that header hasn't been set yet. So that's why we're deleting it.\n if (isFormData(options.body) && isStandardBrowserEnv()) {\n headers.delete('Content-Type');\n }\n }\n const c = config as any;\n if ('mode' in c) {\n options.mode = c.mode as RequestMode;\n }\n if ('cache' in c) {\n options.cache = c.cache as RequestCache;\n }\n if ('integrity' in c) {\n options.integrity = c.integrity as string;\n }\n if ('redirect' in c) {\n options.redirect = c.redirect as RequestRedirect;\n }\n if ('referrer' in c) {\n options.referrer = c.referrer as string;\n }\n // This config is similar to XHR’s withCredentials flag, but with three available values instead of two.\n // So if withCredentials is not set, default value 'same-origin' will be used\n if (!isUndefined(c.withCredentials)) {\n options.credentials = c.withCredentials ? 'include' : 'omit';\n }\n\n const fullPath = buildFullPath(c.baseURL, c.url);\n const url = buildURL(fullPath, c.params, c.paramsSerializer);\n\n // Expected browser to throw error if there is any wrong configuration value\n return new Request(url, options);\n}\n\n/**\n * Note:\n *\n * From version >= 0.27.0, createError function is replaced by AxiosError class.\n * So I copy the old createError function here for backward compatible.\n *\n *\n *\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction createError(\n message: string,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n // TODO: this code never runs\n // if ('AxiosError' in axios && axios.AxiosError && typeof axios.AxiosError === 'function' && isConstructor(axios.AxiosError)) {\n // return new axios.AxiosError(message, axios.AxiosError[code], config, request, response);\n // }\n\n const error = new Error(message);\n return enhanceError(error, config, code, request, response);\n}\n\n/**\n *\n * Note:\n *\n * This function is for backward compatible.\n *\n *\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nfunction enhanceError(\n error: any,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: 'description' in this ? this.description : undefined,\n number: 'number' in this ? this.number : undefined,\n // Mozilla\n fileName: 'fileName' in this ? this.fileName : undefined,\n lineNumber: 'lineNumber' in this ? this.lineNumber : undefined,\n columnNumber: 'columnNumber' in this ? this.columnNumber : undefined,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null,\n };\n };\n return error;\n}\n","import { NetworkError } from '@taquito/core';\nimport { STATUS_CODE } from './status_code';\n\n/**\n * @category Error\n * @description Error that indicates a general failure in making the HTTP request\n */\nexport class HttpRequestFailed extends NetworkError {\n constructor(\n public readonly method: string,\n public readonly url: string,\n public readonly cause: Error\n ) {\n super();\n this.name = 'HttpRequestFailed';\n this.message = `${method} ${url} ${String(cause)}`;\n }\n}\n\n/**\n * @category Error\n * @description Error thrown when the endpoint returns an HTTP error to the client\n */\nexport class HttpResponseError extends NetworkError {\n constructor(\n public readonly message: string,\n public readonly status: STATUS_CODE,\n public readonly statusText: string,\n public readonly body: string,\n public readonly url: string\n ) {\n super();\n this.name = 'HttpResponse';\n }\n}\n","/**\n * Hypertext Transfer Protocol (HTTP) response status codes.\n * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}\n */\nexport enum STATUS_CODE {\n /**\n * The server has received the request headers and the client should proceed to send the request body\n * (in the case of a request for which a body needs to be sent; for example, a POST request).\n * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.\n * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request\n * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.\n */\n CONTINUE = 100,\n\n /**\n * The requester has asked the server to switch protocols and the server has agreed to do so.\n */\n SWITCHING_PROTOCOLS = 101,\n\n /**\n * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.\n * This code indicates that the server has received and is processing the request, but no response is available yet.\n * This prevents the client from timing out and assuming the request was lost.\n */\n PROCESSING = 102,\n\n /**\n * Standard response for successful HTTP requests.\n * The actual response will depend on the request method used.\n * In a GET request, the response will contain an entity corresponding to the requested resource.\n * In a POST request, the response will contain an entity describing or containing the result of the action.\n */\n OK = 200,\n\n /**\n * The request has been fulfilled, resulting in the creation of a new resource.\n */\n CREATED = 201,\n\n /**\n * The request has been accepted for processing, but the processing has not been completed.\n * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.\n */\n ACCEPTED = 202,\n\n /**\n * SINCE HTTP/1.1\n * The server is a transforming proxy that received a 200 OK from its origin,\n * but is returning a modified version of the origin's response.\n */\n NON_AUTHORITATIVE_INFORMATION = 203,\n\n /**\n * The server successfully processed the request and is not returning any content.\n */\n NO_CONTENT = 204,\n\n /**\n * The server successfully processed the request, but is not returning any content.\n * Unlike a 204 response, this response requires that the requester reset the document view.\n */\n RESET_CONTENT = 205,\n\n /**\n * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.\n * The range header is used by HTTP clients to enable resuming of interrupted downloads,\n * or split a download into multiple simultaneous streams.\n */\n PARTIAL_CONTENT = 206,\n\n /**\n * The message body that follows is an XML message and can contain a number of separate response codes,\n * depending on how many sub-requests were made.\n */\n MULTI_STATUS = 207,\n\n /**\n * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,\n * and are not being included again.\n */\n ALREADY_REPORTED = 208,\n\n /**\n * The server has fulfilled a request for the resource,\n * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\n */\n IM_USED = 226,\n\n /**\n * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).\n * For example, this code could be used to present multiple video format options,\n * to list files with different filename extensions, or to suggest word-sense disambiguation.\n */\n MULTIPLE_CHOICES = 300,\n\n /**\n * This and all future requests should be directed to the given URI.\n */\n MOVED_PERMANENTLY = 301,\n\n /**\n * This is an example of industry practice contradicting the standard.\n * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect\n * (the original describing phrase was \"Moved Temporarily\"), but popular browsers implemented 302\n * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307\n * to distinguish between the two behaviours. However, some Web applications and frameworks\n * use the 302 status code as if it were the 303.\n */\n FOUND = 302,\n\n /**\n * SINCE HTTP/1.1\n * The response to the request can be found under another URI using a GET method.\n * When received in response to a POST (or PUT/DELETE), the client should presume that\n * the server has received the data and should issue a redirect with a separate GET message.\n */\n SEE_OTHER = 303,\n\n /**\n * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.\n * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.\n */\n NOT_MODIFIED = 304,\n\n /**\n * SINCE HTTP/1.1\n * The requested resource is available only through a proxy, the address for which is provided in the response.\n * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.\n */\n USE_PROXY = 305,\n\n /**\n * No longer used. Originally meant \"Subsequent requests should use the specified proxy.\"\n */\n SWITCH_PROXY = 306,\n\n /**\n * SINCE HTTP/1.1\n * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.\n * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.\n * For example, a POST request should be repeated using another POST request.\n */\n TEMPORARY_REDIRECT = 307,\n\n /**\n * The request and all future requests should be repeated using another URI.\n * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.\n * So, for example, submitting a form to a permanently redirected resource may continue smoothly.\n */\n PERMANENT_REDIRECT = 308,\n\n /**\n * The server cannot or will not process the request due to an apparent client error\n * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).\n */\n BAD_REQUEST = 400,\n\n /**\n * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet\n * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the\n * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means\n * \"unauthenticated\",i.e. the user does not have the necessary credentials.\n */\n UNAUTHORIZED = 401,\n\n /**\n * Reserved for future use. The original intention was that this code might be used as part of some form of digital\n * cash or micro payment scheme, but that has not happened, and this code is not usually used.\n * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.\n */\n PAYMENT_REQUIRED = 402,\n\n /**\n * The request was valid, but the server is refusing action.\n * The user might not have the necessary permissions for a resource.\n */\n FORBIDDEN = 403,\n\n /**\n * The requested resource could not be found but may be available in the future.\n * Subsequent requests by the client are permissible.\n */\n NOT_FOUND = 404,\n\n /**\n * A request method is not supported for the requested resource;\n * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.\n */\n METHOD_NOT_ALLOWED = 405,\n\n /**\n * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n */\n NOT_ACCEPTABLE = 406,\n\n /**\n * The client must first authenticate itself with the proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED = 407,\n\n /**\n * The server timed out waiting for the request.\n * According to HTTP specifications:\n * \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"\n */\n REQUEST_TIMEOUT = 408,\n\n /**\n * Indicates that the request could not be processed because of conflict in the request,\n * such as an edit conflict between multiple simultaneous updates.\n */\n CONFLICT = 409,\n\n /**\n * Indicates that the resource requested is no longer available and will not be available again.\n * This should be used when a resource has been intentionally removed and the resource should be purged.\n * Upon receiving a 410 status code, the client should not request the resource in the future.\n * Clients such as search engines should remove the resource from their indices.\n * Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead.\n */\n GONE = 410,\n\n /**\n * The request did not specify the length of its content, which is required by the requested resource.\n */\n LENGTH_REQUIRED = 411,\n\n /**\n * The server does not meet one of the preconditions that the requester put on the request.\n */\n PRECONDITION_FAILED = 412,\n\n /**\n * The request is larger than the server is willing or able to process. Previously called \"Request Entity Too Large\".\n */\n PAYLOAD_TOO_LARGE = 413,\n\n /**\n * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,\n * in which case it should be converted to a POST request.\n * Called \"Request-URI Too Long\" previously.\n */\n URI_TOO_LONG = 414,\n\n /**\n * The request entity has a media type which the server or resource does not support.\n * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.\n */\n UNSUPPORTED_MEDIA_TYPE = 415,\n\n /**\n * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.\n * For example, if the client asked for a part of the file that lies beyond the end of the file.\n * Called \"Requested Range Not Satisfiable\" previously.\n */\n RANGE_NOT_SATISFIABLE = 416,\n\n /**\n * The server cannot meet the requirements of the Expect request-header field.\n */\n EXPECTATION_FAILED = 417,\n\n /**\n * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,\n * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by\n * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.\n */\n I_AM_A_TEAPOT = 418,\n\n /**\n * The request was directed at a server that is not able to produce a response (for example because a connection reuse).\n */\n MISDIRECTED_REQUEST = 421,\n\n /**\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY = 422,\n\n /**\n * The resource that is being accessed is locked.\n */\n LOCKED = 423,\n\n /**\n * The request failed due to failure of a previous request (e.g., a PROPPATCH).\n */\n FAILED_DEPENDENCY = 424,\n\n /**\n * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.\n */\n UPGRADE_REQUIRED = 426,\n\n /**\n * The origin server requires the request to be conditional.\n * Intended to prevent \"the 'lost update' problem, where a client\n * GETs a resource's state, modifies it, and PUTs it back to the server,\n * when meanwhile a third party has modified the state on the server, leading to a conflict.\"\n */\n PRECONDITION_REQUIRED = 428,\n\n /**\n * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.\n */\n TOO_MANY_REQUESTS = 429,\n\n /**\n * The server is unwilling to process the request because either an individual header field,\n * or all the header fields collectively, are too large.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE = 431,\n\n /**\n * A server operator has received a legal demand to deny access to a resource or to a set of resources\n * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS = 451,\n\n /**\n * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.\n */\n INTERNAL_SERVER_ERROR = 500,\n\n /**\n * The server either does not recognize the request method, or it lacks the ability to fulfill the request.\n * Usually this implies future availability (e.g., a new feature of a web-service API).\n */\n NOT_IMPLEMENTED = 501,\n\n /**\n * The server was acting as a gateway or proxy and received an invalid response from the upstream server.\n */\n BAD_GATEWAY = 502,\n\n /**\n * The server is currently unavailable (because it is overloaded or down for maintenance).\n * Generally, this is a temporary state.\n */\n SERVICE_UNAVAILABLE = 503,\n\n /**\n * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n */\n GATEWAY_TIMEOUT = 504,\n\n /**\n * The server does not support the HTTP protocol version used in the request\n */\n HTTP_VERSION_NOT_SUPPORTED = 505,\n\n /**\n * Transparent content negotiation for the request results in a circular reference.\n */\n VARIANT_ALSO_NEGOTIATES = 506,\n\n /**\n * The server is unable to store the representation needed to complete the request.\n */\n INSUFFICIENT_STORAGE = 507,\n\n /**\n * The server detected an infinite loop while processing the request.\n */\n LOOP_DETECTED = 508,\n\n /**\n * Further extensions to the request are required for the server to fulfill it.\n */\n NOT_EXTENDED = 510,\n\n /**\n * The client needs to authenticate to gain network access.\n * Intended for use by intercepting proxies used to control access to the network (e.g., \"captive portals\" used\n * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).\n */\n NETWORK_AUTHENTICATION_REQUIRED = 511,\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\nexport const VERSION = {\n \"commitHash\": \"b85fc404e34545a518215e449b3f1253f4520eec\",\n \"version\": \"17.2.0\"\n};\n","/**\n * @packageDocumentation\n * @module @taquito/http-utils\n */\n\nimport fetchAdapter from './fetch-adapter';\nimport { STATUS_CODE } from './status_code';\nimport axios from 'axios';\nimport { HttpRequestFailed, HttpResponseError } from './errors';\n\nconst isNode = typeof process !== 'undefined' && !!process?.versions?.node;\n\nconst adapter = isNode ? undefined : fetchAdapter;\n\nexport * from './status_code';\nexport { VERSION } from './version';\nexport { HttpRequestFailed, HttpResponseError } from './errors';\n\nenum ResponseType {\n TEXT = 'text',\n JSON = 'json',\n}\n\ntype ObjectType = Record<string, any>;\n\nexport interface HttpRequestOptions {\n url: string;\n method?: 'GET' | 'POST';\n timeout?: number;\n json?: boolean;\n query?: ObjectType;\n headers?: { [key: string]: string };\n mimeType?: string;\n}\n\nexport class HttpBackend {\n constructor(private timeout: number = 30000) {}\n\n protected serialize(obj?: ObjectType) {\n if (!obj) {\n return '';\n }\n\n const str = [];\n for (const p in obj) {\n // eslint-disable-next-line no-prototype-builtins\n if (obj.hasOwnProperty(p) && typeof obj[p] !== 'undefined') {\n const prop = typeof obj[p].toJSON === 'function' ? obj[p].toJSON() : obj[p];\n // query arguments can have no value so we need some way of handling that\n // example https://domain.com/query?all\n if (prop === null) {\n str.push(encodeURIComponent(p));\n continue;\n }\n // another use case is multiple arguments with the same name\n // they are passed as array\n if (Array.isArray(prop)) {\n prop.forEach((item) => {\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(item));\n });\n continue;\n }\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(prop));\n }\n }\n const serialized = str.join('&');\n if (serialized) {\n return `?${serialized}`;\n } else {\n return '';\n }\n }\n\n /**\n *\n * @param options contains options to be passed for the HTTP request (url, method and timeout)\n * @throws {@link HttpRequestFailed} | {@link HttpResponseError}\n */\n async createRequest<T>(\n { url, method, timeout = this.timeout, query, headers = {}, json = true }: HttpRequestOptions,\n data?: object | string\n ) {\n const urlWithQuery = url + this.serialize(query);\n let resType: ResponseType;\n let transformResponse = undefined;\n\n if (!headers['Content-Type']) {\n headers['Content-Type'] = 'application/json';\n }\n\n if (!json) {\n resType = ResponseType.TEXT;\n transformResponse = [<Type>(v: Type) => v];\n } else {\n resType = ResponseType.JSON;\n }\n\n try {\n const response = await axios.request<T>({\n url: urlWithQuery,\n method: method ?? 'GET',\n headers: headers,\n responseType: resType,\n transformResponse,\n timeout: timeout,\n data: data,\n adapter,\n });\n\n return response.data;\n } catch (err: any) {\n if ((axios.isAxiosError(err) && err.response) || (!isNode && err.response)) {\n let errorData;\n\n if (typeof err.response.data === 'object') {\n errorData = JSON.stringify(err.response.data);\n } else {\n errorData = err.response.data;\n }\n\n throw new HttpResponseError(\n `Http error response: (${err.response.status}) ${errorData}`,\n err.response.status as STATUS_CODE,\n err.response.statusText,\n errorData,\n urlWithQuery\n );\n } else {\n throw new HttpRequestFailed(String(method), urlWithQuery, err);\n }\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAKA,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC9D,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAErF;;;;AAIG;AAC2B,SAAA,YAAY,CAAC,MAA0B,EAAA;;AACnE,QAAA,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,YAAY,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;QAEpD,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC,EAAE;YACxC,YAAY,CAAC,IAAI,CACf,IAAI,OAAO,CAAC,CAAC,GAAG,KAAI;gBAClB,UAAU,CAAC,MAAK;AACd,oBAAA,MAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB;0BACtC,MAAM,CAAC,mBAAmB;0BAC1B,aAAa,GAAG,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC;AACnD,oBAAA,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;AAC7D,iBAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;aACpB,CAAC,CACH,CAAC;AACH,SAAA;QAED,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;YACrC,IA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;gBACjB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAE;AAC1E,oBAAA,IAAI,SAAS,CAAC;oBAEd,IAAI,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,EAAE;wBACzC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/C,qBAAA;AAAM,yBAAA;AACL,wBAAA,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC/B,qBAAA;AAED,oBAAA,MAAM,IAAI,iBAAiB,CACzB,CAAA,sBAAA,EAAyB,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,EAC5D,GAAG,CAAC,QAAQ,CAAC,MAAqB,EAClC,GAAG,CAAC,QAAQ,CAAC,UAAU,EACvB,SAAS,EACT,YAAY,CACb,CAAC;AACH,iBAAA;AAAM,qBAAA;AACL,oBAAA,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;AAChE,iBAAA;AACF,aAAA;SACF,CAAA,CAAA;AAAA,KAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"taquito-http-utils.es6.js","sources":["../src/fetch-adapter.ts","../src/errors.ts","../src/status_code.ts","../src/version.ts","../src/taquito-http-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nconst settle = require('axios/lib/core/settle');\nconst buildURL = require('axios/lib/helpers/buildURL');\nconst buildFullPath = require('axios/lib/core/buildFullPath');\nconst { isUndefined, isStandardBrowserEnv, isFormData } = require('axios/lib/utils');\n\n/**\n * - Create a request object\n * - Get response body\n * - Check if timeout\n */\nexport default async function fetchAdapter(config: AxiosRequestConfig): Promise<AxiosResponse> {\n const request = createRequest(config);\n const promiseChain = [getResponse(request, config)];\n\n if (config.timeout && config.timeout > 0) {\n promiseChain.push(\n new Promise((res) => {\n setTimeout(() => {\n const message = config.timeoutErrorMessage\n ? config.timeoutErrorMessage\n : 'timeout of ' + config.timeout + 'ms exceeded';\n res(createError(message, config, 'ECONNABORTED', request));\n }, config.timeout);\n })\n );\n }\n\n const data = await Promise.race(promiseChain);\n return new Promise((resolve, reject) => {\n if (data instanceof Error) {\n reject(data);\n } else {\n const c: any = config;\n 'settle' in c && Object.prototype.toString.call(c.settle) === '[object Function]'\n ? c.settle(resolve, reject, data)\n : settle(resolve, reject, data);\n }\n });\n}\n\n/**\n * Fetch API stage two is to get response body. This function tries to retrieve\n * response body based on response's type\n */\nasync function getResponse(request: RequestInfo | URL, config: AxiosRequestConfig) {\n try {\n const stageOne = await fetch(request as any);\n\n let response: {\n ok: boolean;\n status: number;\n statusText: string;\n headers: Headers;\n config: AxiosRequestConfig;\n request: RequestInfo | URL;\n data?: unknown;\n } = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n if (stageOne.status >= 400) {\n return createError('Response Error', config, 'ERR_NETWORK', request, response);\n }\n\n response = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n\n if (stageOne.status >= 200 && stageOne.status !== 204) {\n switch (config.responseType) {\n case 'arraybuffer':\n response.data = await stageOne.arrayBuffer();\n break;\n case 'blob':\n response.data = await stageOne.blob();\n break;\n case 'json':\n response.data = await stageOne.json();\n break;\n // TODO: the next option does not exist in response type\n // case 'formData':\n // response.data = await stageOne.formData();\n // break;\n default:\n response.data = await stageOne.text();\n break;\n }\n }\n\n return response;\n } catch (e) {\n return createError('Network Error', config, 'ERR_NETWORK', request);\n }\n}\n\n/**\n * This function will create a Request object based on configuration's axios\n */\nfunction createRequest(config: AxiosRequestConfig) {\n const headers = new Headers(config.headers as any);\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password\n ? decodeURI(encodeURIComponent(config.auth.password))\n : '';\n headers.set('Authorization', `Basic ${btoa(username + ':' + password)}`);\n }\n\n const method = config.method?.toUpperCase();\n const options: RequestInit = {\n headers: headers,\n method,\n };\n if (method !== 'GET' && method !== 'HEAD') {\n options.body = config.data;\n\n // In these cases the browser will automatically set the correct Content-Type,\n // but only if that header hasn't been set yet. So that's why we're deleting it.\n if (isFormData(options.body) && isStandardBrowserEnv()) {\n headers.delete('Content-Type');\n }\n }\n const c = config as any;\n if ('mode' in c) {\n options.mode = c.mode as RequestMode;\n }\n if ('cache' in c) {\n options.cache = c.cache as RequestCache;\n }\n if ('integrity' in c) {\n options.integrity = c.integrity as string;\n }\n if ('redirect' in c) {\n options.redirect = c.redirect as RequestRedirect;\n }\n if ('referrer' in c) {\n options.referrer = c.referrer as string;\n }\n // This config is similar to XHR’s withCredentials flag, but with three available values instead of two.\n // So if withCredentials is not set, default value 'same-origin' will be used\n if (!isUndefined(c.withCredentials)) {\n options.credentials = c.withCredentials ? 'include' : 'omit';\n }\n\n const fullPath = buildFullPath(c.baseURL, c.url);\n const url = buildURL(fullPath, c.params, c.paramsSerializer);\n\n // Expected browser to throw error if there is any wrong configuration value\n return new Request(url, options);\n}\n\n/**\n * Note:\n *\n * From version >= 0.27.0, createError function is replaced by AxiosError class.\n * So I copy the old createError function here for backward compatible.\n *\n *\n *\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction createError(\n message: string,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n // TODO: this code never runs\n // if ('AxiosError' in axios && axios.AxiosError && typeof axios.AxiosError === 'function' && isConstructor(axios.AxiosError)) {\n // return new axios.AxiosError(message, axios.AxiosError[code], config, request, response);\n // }\n\n const error = new Error(message);\n return enhanceError(error, config, code, request, response);\n}\n\n/**\n *\n * Note:\n *\n * This function is for backward compatible.\n *\n *\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nfunction enhanceError(\n error: any,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: 'description' in this ? this.description : undefined,\n number: 'number' in this ? this.number : undefined,\n // Mozilla\n fileName: 'fileName' in this ? this.fileName : undefined,\n lineNumber: 'lineNumber' in this ? this.lineNumber : undefined,\n columnNumber: 'columnNumber' in this ? this.columnNumber : undefined,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null,\n };\n };\n return error;\n}\n","import { NetworkError } from '@taquito/core';\nimport { STATUS_CODE } from './status_code';\n\n/**\n * @category Error\n * @description Error that indicates a general failure in making the HTTP request\n */\nexport class HttpRequestFailed extends NetworkError {\n constructor(\n public readonly method: string,\n public readonly url: string,\n public readonly cause: Error\n ) {\n super();\n this.name = 'HttpRequestFailed';\n this.message = `${method} ${url} ${String(cause)}`;\n }\n}\n\n/**\n * @category Error\n * @description Error thrown when the endpoint returns an HTTP error to the client\n */\nexport class HttpResponseError extends NetworkError {\n constructor(\n public readonly message: string,\n public readonly status: STATUS_CODE,\n public readonly statusText: string,\n public readonly body: string,\n public readonly url: string\n ) {\n super();\n this.name = 'HttpResponse';\n }\n}\n","/**\n * Hypertext Transfer Protocol (HTTP) response status codes.\n * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}\n */\nexport enum STATUS_CODE {\n /**\n * The server has received the request headers and the client should proceed to send the request body\n * (in the case of a request for which a body needs to be sent; for example, a POST request).\n * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.\n * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request\n * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.\n */\n CONTINUE = 100,\n\n /**\n * The requester has asked the server to switch protocols and the server has agreed to do so.\n */\n SWITCHING_PROTOCOLS = 101,\n\n /**\n * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.\n * This code indicates that the server has received and is processing the request, but no response is available yet.\n * This prevents the client from timing out and assuming the request was lost.\n */\n PROCESSING = 102,\n\n /**\n * Standard response for successful HTTP requests.\n * The actual response will depend on the request method used.\n * In a GET request, the response will contain an entity corresponding to the requested resource.\n * In a POST request, the response will contain an entity describing or containing the result of the action.\n */\n OK = 200,\n\n /**\n * The request has been fulfilled, resulting in the creation of a new resource.\n */\n CREATED = 201,\n\n /**\n * The request has been accepted for processing, but the processing has not been completed.\n * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.\n */\n ACCEPTED = 202,\n\n /**\n * SINCE HTTP/1.1\n * The server is a transforming proxy that received a 200 OK from its origin,\n * but is returning a modified version of the origin's response.\n */\n NON_AUTHORITATIVE_INFORMATION = 203,\n\n /**\n * The server successfully processed the request and is not returning any content.\n */\n NO_CONTENT = 204,\n\n /**\n * The server successfully processed the request, but is not returning any content.\n * Unlike a 204 response, this response requires that the requester reset the document view.\n */\n RESET_CONTENT = 205,\n\n /**\n * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.\n * The range header is used by HTTP clients to enable resuming of interrupted downloads,\n * or split a download into multiple simultaneous streams.\n */\n PARTIAL_CONTENT = 206,\n\n /**\n * The message body that follows is an XML message and can contain a number of separate response codes,\n * depending on how many sub-requests were made.\n */\n MULTI_STATUS = 207,\n\n /**\n * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,\n * and are not being included again.\n */\n ALREADY_REPORTED = 208,\n\n /**\n * The server has fulfilled a request for the resource,\n * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\n */\n IM_USED = 226,\n\n /**\n * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).\n * For example, this code could be used to present multiple video format options,\n * to list files with different filename extensions, or to suggest word-sense disambiguation.\n */\n MULTIPLE_CHOICES = 300,\n\n /**\n * This and all future requests should be directed to the given URI.\n */\n MOVED_PERMANENTLY = 301,\n\n /**\n * This is an example of industry practice contradicting the standard.\n * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect\n * (the original describing phrase was \"Moved Temporarily\"), but popular browsers implemented 302\n * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307\n * to distinguish between the two behaviours. However, some Web applications and frameworks\n * use the 302 status code as if it were the 303.\n */\n FOUND = 302,\n\n /**\n * SINCE HTTP/1.1\n * The response to the request can be found under another URI using a GET method.\n * When received in response to a POST (or PUT/DELETE), the client should presume that\n * the server has received the data and should issue a redirect with a separate GET message.\n */\n SEE_OTHER = 303,\n\n /**\n * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.\n * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.\n */\n NOT_MODIFIED = 304,\n\n /**\n * SINCE HTTP/1.1\n * The requested resource is available only through a proxy, the address for which is provided in the response.\n * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.\n */\n USE_PROXY = 305,\n\n /**\n * No longer used. Originally meant \"Subsequent requests should use the specified proxy.\"\n */\n SWITCH_PROXY = 306,\n\n /**\n * SINCE HTTP/1.1\n * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.\n * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.\n * For example, a POST request should be repeated using another POST request.\n */\n TEMPORARY_REDIRECT = 307,\n\n /**\n * The request and all future requests should be repeated using another URI.\n * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.\n * So, for example, submitting a form to a permanently redirected resource may continue smoothly.\n */\n PERMANENT_REDIRECT = 308,\n\n /**\n * The server cannot or will not process the request due to an apparent client error\n * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).\n */\n BAD_REQUEST = 400,\n\n /**\n * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet\n * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the\n * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means\n * \"unauthenticated\",i.e. the user does not have the necessary credentials.\n */\n UNAUTHORIZED = 401,\n\n /**\n * Reserved for future use. The original intention was that this code might be used as part of some form of digital\n * cash or micro payment scheme, but that has not happened, and this code is not usually used.\n * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.\n */\n PAYMENT_REQUIRED = 402,\n\n /**\n * The request was valid, but the server is refusing action.\n * The user might not have the necessary permissions for a resource.\n */\n FORBIDDEN = 403,\n\n /**\n * The requested resource could not be found but may be available in the future.\n * Subsequent requests by the client are permissible.\n */\n NOT_FOUND = 404,\n\n /**\n * A request method is not supported for the requested resource;\n * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.\n */\n METHOD_NOT_ALLOWED = 405,\n\n /**\n * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n */\n NOT_ACCEPTABLE = 406,\n\n /**\n * The client must first authenticate itself with the proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED = 407,\n\n /**\n * The server timed out waiting for the request.\n * According to HTTP specifications:\n * \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"\n */\n REQUEST_TIMEOUT = 408,\n\n /**\n * Indicates that the request could not be processed because of conflict in the request,\n * such as an edit conflict between multiple simultaneous updates.\n */\n CONFLICT = 409,\n\n /**\n * Indicates that the resource requested is no longer available and will not be available again.\n * This should be used when a resource has been intentionally removed and the resource should be purged.\n * Upon receiving a 410 status code, the client should not request the resource in the future.\n * Clients such as search engines should remove the resource from their indices.\n * Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead.\n */\n GONE = 410,\n\n /**\n * The request did not specify the length of its content, which is required by the requested resource.\n */\n LENGTH_REQUIRED = 411,\n\n /**\n * The server does not meet one of the preconditions that the requester put on the request.\n */\n PRECONDITION_FAILED = 412,\n\n /**\n * The request is larger than the server is willing or able to process. Previously called \"Request Entity Too Large\".\n */\n PAYLOAD_TOO_LARGE = 413,\n\n /**\n * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,\n * in which case it should be converted to a POST request.\n * Called \"Request-URI Too Long\" previously.\n */\n URI_TOO_LONG = 414,\n\n /**\n * The request entity has a media type which the server or resource does not support.\n * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.\n */\n UNSUPPORTED_MEDIA_TYPE = 415,\n\n /**\n * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.\n * For example, if the client asked for a part of the file that lies beyond the end of the file.\n * Called \"Requested Range Not Satisfiable\" previously.\n */\n RANGE_NOT_SATISFIABLE = 416,\n\n /**\n * The server cannot meet the requirements of the Expect request-header field.\n */\n EXPECTATION_FAILED = 417,\n\n /**\n * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,\n * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by\n * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.\n */\n I_AM_A_TEAPOT = 418,\n\n /**\n * The request was directed at a server that is not able to produce a response (for example because a connection reuse).\n */\n MISDIRECTED_REQUEST = 421,\n\n /**\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY = 422,\n\n /**\n * The resource that is being accessed is locked.\n */\n LOCKED = 423,\n\n /**\n * The request failed due to failure of a previous request (e.g., a PROPPATCH).\n */\n FAILED_DEPENDENCY = 424,\n\n /**\n * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.\n */\n UPGRADE_REQUIRED = 426,\n\n /**\n * The origin server requires the request to be conditional.\n * Intended to prevent \"the 'lost update' problem, where a client\n * GETs a resource's state, modifies it, and PUTs it back to the server,\n * when meanwhile a third party has modified the state on the server, leading to a conflict.\"\n */\n PRECONDITION_REQUIRED = 428,\n\n /**\n * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.\n */\n TOO_MANY_REQUESTS = 429,\n\n /**\n * The server is unwilling to process the request because either an individual header field,\n * or all the header fields collectively, are too large.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE = 431,\n\n /**\n * A server operator has received a legal demand to deny access to a resource or to a set of resources\n * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS = 451,\n\n /**\n * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.\n */\n INTERNAL_SERVER_ERROR = 500,\n\n /**\n * The server either does not recognize the request method, or it lacks the ability to fulfill the request.\n * Usually this implies future availability (e.g., a new feature of a web-service API).\n */\n NOT_IMPLEMENTED = 501,\n\n /**\n * The server was acting as a gateway or proxy and received an invalid response from the upstream server.\n */\n BAD_GATEWAY = 502,\n\n /**\n * The server is currently unavailable (because it is overloaded or down for maintenance).\n * Generally, this is a temporary state.\n */\n SERVICE_UNAVAILABLE = 503,\n\n /**\n * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n */\n GATEWAY_TIMEOUT = 504,\n\n /**\n * The server does not support the HTTP protocol version used in the request\n */\n HTTP_VERSION_NOT_SUPPORTED = 505,\n\n /**\n * Transparent content negotiation for the request results in a circular reference.\n */\n VARIANT_ALSO_NEGOTIATES = 506,\n\n /**\n * The server is unable to store the representation needed to complete the request.\n */\n INSUFFICIENT_STORAGE = 507,\n\n /**\n * The server detected an infinite loop while processing the request.\n */\n LOOP_DETECTED = 508,\n\n /**\n * Further extensions to the request are required for the server to fulfill it.\n */\n NOT_EXTENDED = 510,\n\n /**\n * The client needs to authenticate to gain network access.\n * Intended for use by intercepting proxies used to control access to the network (e.g., \"captive portals\" used\n * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).\n */\n NETWORK_AUTHENTICATION_REQUIRED = 511,\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\nexport const VERSION = {\n \"commitHash\": \"a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2\",\n \"version\": \"17.3.0\"\n};\n","/**\n * @packageDocumentation\n * @module @taquito/http-utils\n */\n\nimport fetchAdapter from './fetch-adapter';\nimport { STATUS_CODE } from './status_code';\nimport axios from 'axios';\nimport { HttpRequestFailed, HttpResponseError } from './errors';\n\nconst isNode = typeof process !== 'undefined' && !!process?.versions?.node;\n\nconst adapter = isNode ? undefined : fetchAdapter;\n\nexport * from './status_code';\nexport { VERSION } from './version';\nexport { HttpRequestFailed, HttpResponseError } from './errors';\n\nenum ResponseType {\n TEXT = 'text',\n JSON = 'json',\n}\n\ntype ObjectType = Record<string, any>;\n\nexport interface HttpRequestOptions {\n url: string;\n method?: 'GET' | 'POST';\n timeout?: number;\n json?: boolean;\n query?: ObjectType;\n headers?: { [key: string]: string };\n mimeType?: string;\n}\n\nexport class HttpBackend {\n constructor(private timeout: number = 30000) {}\n\n protected serialize(obj?: ObjectType) {\n if (!obj) {\n return '';\n }\n\n const str = [];\n for (const p in obj) {\n // eslint-disable-next-line no-prototype-builtins\n if (obj.hasOwnProperty(p) && typeof obj[p] !== 'undefined') {\n const prop = typeof obj[p].toJSON === 'function' ? obj[p].toJSON() : obj[p];\n // query arguments can have no value so we need some way of handling that\n // example https://domain.com/query?all\n if (prop === null) {\n str.push(encodeURIComponent(p));\n continue;\n }\n // another use case is multiple arguments with the same name\n // they are passed as array\n if (Array.isArray(prop)) {\n prop.forEach((item) => {\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(item));\n });\n continue;\n }\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(prop));\n }\n }\n const serialized = str.join('&');\n if (serialized) {\n return `?${serialized}`;\n } else {\n return '';\n }\n }\n\n /**\n *\n * @param options contains options to be passed for the HTTP request (url, method and timeout)\n * @throws {@link HttpRequestFailed} | {@link HttpResponseError}\n */\n async createRequest<T>(\n { url, method, timeout = this.timeout, query, headers = {}, json = true }: HttpRequestOptions,\n data?: object | string\n ) {\n const urlWithQuery = url + this.serialize(query);\n let resType: ResponseType;\n let transformResponse = undefined;\n\n if (!headers['Content-Type']) {\n headers['Content-Type'] = 'application/json';\n }\n\n if (!json) {\n resType = ResponseType.TEXT;\n transformResponse = [<Type>(v: Type) => v];\n } else {\n resType = ResponseType.JSON;\n }\n\n try {\n const response = await axios.request<T>({\n url: urlWithQuery,\n method: method ?? 'GET',\n headers: headers,\n responseType: resType,\n transformResponse,\n timeout: timeout,\n data: data,\n adapter,\n });\n\n return response.data;\n } catch (err: any) {\n if ((axios.isAxiosError(err) && err.response) || (!isNode && err.response)) {\n let errorData;\n\n if (typeof err.response.data === 'object') {\n errorData = JSON.stringify(err.response.data);\n } else {\n errorData = err.response.data;\n }\n\n throw new HttpResponseError(\n `Http error response: (${err.response.status}) ${errorData}`,\n err.response.status as STATUS_CODE,\n err.response.statusText,\n errorData,\n urlWithQuery\n );\n } else {\n throw new HttpRequestFailed(String(method), urlWithQuery, err);\n }\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAKA,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC9D,MAAM,EAAE,WAAW,EAAE,oBA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L,wBAAA,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC/B,qBAAA;AAED,oBAAA,MAAM,IAAI,iBAAiB,CACzB,CAAA,sBAAA,EAAyB,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,EAC5D,GAAG,CAAC,QAAQ,CAAC,MAAqB,EAClC,GAAG,CAAC,QAAQ,CAAC,UAAU,EACvB,SAAS,EACT,YAAY,CACb,CAAC;AACH,iBAAA;AAAM,qBAAA;AACL,oBAAA,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;AAChE,iBAAA;AACF,aAAA;SACF,CAAA,CAAA;AAAA,KAAA;AACF;;;;"}
|
|
@@ -606,8 +606,8 @@
|
|
|
606
606
|
|
|
607
607
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
608
608
|
const VERSION = {
|
|
609
|
-
"commitHash": "
|
|
610
|
-
"version": "17.
|
|
609
|
+
"commitHash": "a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2",
|
|
610
|
+
"version": "17.3.0"
|
|
611
611
|
};
|
|
612
612
|
|
|
613
613
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-http-utils.umd.js","sources":["../src/fetch-adapter.ts","../src/errors.ts","../src/status_code.ts","../src/version.ts","../src/taquito-http-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nconst settle = require('axios/lib/core/settle');\nconst buildURL = require('axios/lib/helpers/buildURL');\nconst buildFullPath = require('axios/lib/core/buildFullPath');\nconst { isUndefined, isStandardBrowserEnv, isFormData } = require('axios/lib/utils');\n\n/**\n * - Create a request object\n * - Get response body\n * - Check if timeout\n */\nexport default async function fetchAdapter(config: AxiosRequestConfig): Promise<AxiosResponse> {\n const request = createRequest(config);\n const promiseChain = [getResponse(request, config)];\n\n if (config.timeout && config.timeout > 0) {\n promiseChain.push(\n new Promise((res) => {\n setTimeout(() => {\n const message = config.timeoutErrorMessage\n ? config.timeoutErrorMessage\n : 'timeout of ' + config.timeout + 'ms exceeded';\n res(createError(message, config, 'ECONNABORTED', request));\n }, config.timeout);\n })\n );\n }\n\n const data = await Promise.race(promiseChain);\n return new Promise((resolve, reject) => {\n if (data instanceof Error) {\n reject(data);\n } else {\n const c: any = config;\n 'settle' in c && Object.prototype.toString.call(c.settle) === '[object Function]'\n ? c.settle(resolve, reject, data)\n : settle(resolve, reject, data);\n }\n });\n}\n\n/**\n * Fetch API stage two is to get response body. This function tries to retrieve\n * response body based on response's type\n */\nasync function getResponse(request: RequestInfo | URL, config: AxiosRequestConfig) {\n try {\n const stageOne = await fetch(request as any);\n\n let response: {\n ok: boolean;\n status: number;\n statusText: string;\n headers: Headers;\n config: AxiosRequestConfig;\n request: RequestInfo | URL;\n data?: unknown;\n } = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n if (stageOne.status >= 400) {\n return createError('Response Error', config, 'ERR_NETWORK', request, response);\n }\n\n response = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n\n if (stageOne.status >= 200 && stageOne.status !== 204) {\n switch (config.responseType) {\n case 'arraybuffer':\n response.data = await stageOne.arrayBuffer();\n break;\n case 'blob':\n response.data = await stageOne.blob();\n break;\n case 'json':\n response.data = await stageOne.json();\n break;\n // TODO: the next option does not exist in response type\n // case 'formData':\n // response.data = await stageOne.formData();\n // break;\n default:\n response.data = await stageOne.text();\n break;\n }\n }\n\n return response;\n } catch (e) {\n return createError('Network Error', config, 'ERR_NETWORK', request);\n }\n}\n\n/**\n * This function will create a Request object based on configuration's axios\n */\nfunction createRequest(config: AxiosRequestConfig) {\n const headers = new Headers(config.headers as any);\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password\n ? decodeURI(encodeURIComponent(config.auth.password))\n : '';\n headers.set('Authorization', `Basic ${btoa(username + ':' + password)}`);\n }\n\n const method = config.method?.toUpperCase();\n const options: RequestInit = {\n headers: headers,\n method,\n };\n if (method !== 'GET' && method !== 'HEAD') {\n options.body = config.data;\n\n // In these cases the browser will automatically set the correct Content-Type,\n // but only if that header hasn't been set yet. So that's why we're deleting it.\n if (isFormData(options.body) && isStandardBrowserEnv()) {\n headers.delete('Content-Type');\n }\n }\n const c = config as any;\n if ('mode' in c) {\n options.mode = c.mode as RequestMode;\n }\n if ('cache' in c) {\n options.cache = c.cache as RequestCache;\n }\n if ('integrity' in c) {\n options.integrity = c.integrity as string;\n }\n if ('redirect' in c) {\n options.redirect = c.redirect as RequestRedirect;\n }\n if ('referrer' in c) {\n options.referrer = c.referrer as string;\n }\n // This config is similar to XHR’s withCredentials flag, but with three available values instead of two.\n // So if withCredentials is not set, default value 'same-origin' will be used\n if (!isUndefined(c.withCredentials)) {\n options.credentials = c.withCredentials ? 'include' : 'omit';\n }\n\n const fullPath = buildFullPath(c.baseURL, c.url);\n const url = buildURL(fullPath, c.params, c.paramsSerializer);\n\n // Expected browser to throw error if there is any wrong configuration value\n return new Request(url, options);\n}\n\n/**\n * Note:\n *\n * From version >= 0.27.0, createError function is replaced by AxiosError class.\n * So I copy the old createError function here for backward compatible.\n *\n *\n *\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction createError(\n message: string,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n // TODO: this code never runs\n // if ('AxiosError' in axios && axios.AxiosError && typeof axios.AxiosError === 'function' && isConstructor(axios.AxiosError)) {\n // return new axios.AxiosError(message, axios.AxiosError[code], config, request, response);\n // }\n\n const error = new Error(message);\n return enhanceError(error, config, code, request, response);\n}\n\n/**\n *\n * Note:\n *\n * This function is for backward compatible.\n *\n *\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nfunction enhanceError(\n error: any,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: 'description' in this ? this.description : undefined,\n number: 'number' in this ? this.number : undefined,\n // Mozilla\n fileName: 'fileName' in this ? this.fileName : undefined,\n lineNumber: 'lineNumber' in this ? this.lineNumber : undefined,\n columnNumber: 'columnNumber' in this ? this.columnNumber : undefined,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null,\n };\n };\n return error;\n}\n","import { NetworkError } from '@taquito/core';\nimport { STATUS_CODE } from './status_code';\n\n/**\n * @category Error\n * @description Error that indicates a general failure in making the HTTP request\n */\nexport class HttpRequestFailed extends NetworkError {\n constructor(\n public readonly method: string,\n public readonly url: string,\n public readonly cause: Error\n ) {\n super();\n this.name = 'HttpRequestFailed';\n this.message = `${method} ${url} ${String(cause)}`;\n }\n}\n\n/**\n * @category Error\n * @description Error thrown when the endpoint returns an HTTP error to the client\n */\nexport class HttpResponseError extends NetworkError {\n constructor(\n public readonly message: string,\n public readonly status: STATUS_CODE,\n public readonly statusText: string,\n public readonly body: string,\n public readonly url: string\n ) {\n super();\n this.name = 'HttpResponse';\n }\n}\n","/**\n * Hypertext Transfer Protocol (HTTP) response status codes.\n * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}\n */\nexport enum STATUS_CODE {\n /**\n * The server has received the request headers and the client should proceed to send the request body\n * (in the case of a request for which a body needs to be sent; for example, a POST request).\n * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.\n * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request\n * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.\n */\n CONTINUE = 100,\n\n /**\n * The requester has asked the server to switch protocols and the server has agreed to do so.\n */\n SWITCHING_PROTOCOLS = 101,\n\n /**\n * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.\n * This code indicates that the server has received and is processing the request, but no response is available yet.\n * This prevents the client from timing out and assuming the request was lost.\n */\n PROCESSING = 102,\n\n /**\n * Standard response for successful HTTP requests.\n * The actual response will depend on the request method used.\n * In a GET request, the response will contain an entity corresponding to the requested resource.\n * In a POST request, the response will contain an entity describing or containing the result of the action.\n */\n OK = 200,\n\n /**\n * The request has been fulfilled, resulting in the creation of a new resource.\n */\n CREATED = 201,\n\n /**\n * The request has been accepted for processing, but the processing has not been completed.\n * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.\n */\n ACCEPTED = 202,\n\n /**\n * SINCE HTTP/1.1\n * The server is a transforming proxy that received a 200 OK from its origin,\n * but is returning a modified version of the origin's response.\n */\n NON_AUTHORITATIVE_INFORMATION = 203,\n\n /**\n * The server successfully processed the request and is not returning any content.\n */\n NO_CONTENT = 204,\n\n /**\n * The server successfully processed the request, but is not returning any content.\n * Unlike a 204 response, this response requires that the requester reset the document view.\n */\n RESET_CONTENT = 205,\n\n /**\n * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.\n * The range header is used by HTTP clients to enable resuming of interrupted downloads,\n * or split a download into multiple simultaneous streams.\n */\n PARTIAL_CONTENT = 206,\n\n /**\n * The message body that follows is an XML message and can contain a number of separate response codes,\n * depending on how many sub-requests were made.\n */\n MULTI_STATUS = 207,\n\n /**\n * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,\n * and are not being included again.\n */\n ALREADY_REPORTED = 208,\n\n /**\n * The server has fulfilled a request for the resource,\n * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\n */\n IM_USED = 226,\n\n /**\n * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).\n * For example, this code could be used to present multiple video format options,\n * to list files with different filename extensions, or to suggest word-sense disambiguation.\n */\n MULTIPLE_CHOICES = 300,\n\n /**\n * This and all future requests should be directed to the given URI.\n */\n MOVED_PERMANENTLY = 301,\n\n /**\n * This is an example of industry practice contradicting the standard.\n * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect\n * (the original describing phrase was \"Moved Temporarily\"), but popular browsers implemented 302\n * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307\n * to distinguish between the two behaviours. However, some Web applications and frameworks\n * use the 302 status code as if it were the 303.\n */\n FOUND = 302,\n\n /**\n * SINCE HTTP/1.1\n * The response to the request can be found under another URI using a GET method.\n * When received in response to a POST (or PUT/DELETE), the client should presume that\n * the server has received the data and should issue a redirect with a separate GET message.\n */\n SEE_OTHER = 303,\n\n /**\n * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.\n * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.\n */\n NOT_MODIFIED = 304,\n\n /**\n * SINCE HTTP/1.1\n * The requested resource is available only through a proxy, the address for which is provided in the response.\n * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.\n */\n USE_PROXY = 305,\n\n /**\n * No longer used. Originally meant \"Subsequent requests should use the specified proxy.\"\n */\n SWITCH_PROXY = 306,\n\n /**\n * SINCE HTTP/1.1\n * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.\n * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.\n * For example, a POST request should be repeated using another POST request.\n */\n TEMPORARY_REDIRECT = 307,\n\n /**\n * The request and all future requests should be repeated using another URI.\n * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.\n * So, for example, submitting a form to a permanently redirected resource may continue smoothly.\n */\n PERMANENT_REDIRECT = 308,\n\n /**\n * The server cannot or will not process the request due to an apparent client error\n * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).\n */\n BAD_REQUEST = 400,\n\n /**\n * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet\n * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the\n * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means\n * \"unauthenticated\",i.e. the user does not have the necessary credentials.\n */\n UNAUTHORIZED = 401,\n\n /**\n * Reserved for future use. The original intention was that this code might be used as part of some form of digital\n * cash or micro payment scheme, but that has not happened, and this code is not usually used.\n * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.\n */\n PAYMENT_REQUIRED = 402,\n\n /**\n * The request was valid, but the server is refusing action.\n * The user might not have the necessary permissions for a resource.\n */\n FORBIDDEN = 403,\n\n /**\n * The requested resource could not be found but may be available in the future.\n * Subsequent requests by the client are permissible.\n */\n NOT_FOUND = 404,\n\n /**\n * A request method is not supported for the requested resource;\n * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.\n */\n METHOD_NOT_ALLOWED = 405,\n\n /**\n * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n */\n NOT_ACCEPTABLE = 406,\n\n /**\n * The client must first authenticate itself with the proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED = 407,\n\n /**\n * The server timed out waiting for the request.\n * According to HTTP specifications:\n * \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"\n */\n REQUEST_TIMEOUT = 408,\n\n /**\n * Indicates that the request could not be processed because of conflict in the request,\n * such as an edit conflict between multiple simultaneous updates.\n */\n CONFLICT = 409,\n\n /**\n * Indicates that the resource requested is no longer available and will not be available again.\n * This should be used when a resource has been intentionally removed and the resource should be purged.\n * Upon receiving a 410 status code, the client should not request the resource in the future.\n * Clients such as search engines should remove the resource from their indices.\n * Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead.\n */\n GONE = 410,\n\n /**\n * The request did not specify the length of its content, which is required by the requested resource.\n */\n LENGTH_REQUIRED = 411,\n\n /**\n * The server does not meet one of the preconditions that the requester put on the request.\n */\n PRECONDITION_FAILED = 412,\n\n /**\n * The request is larger than the server is willing or able to process. Previously called \"Request Entity Too Large\".\n */\n PAYLOAD_TOO_LARGE = 413,\n\n /**\n * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,\n * in which case it should be converted to a POST request.\n * Called \"Request-URI Too Long\" previously.\n */\n URI_TOO_LONG = 414,\n\n /**\n * The request entity has a media type which the server or resource does not support.\n * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.\n */\n UNSUPPORTED_MEDIA_TYPE = 415,\n\n /**\n * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.\n * For example, if the client asked for a part of the file that lies beyond the end of the file.\n * Called \"Requested Range Not Satisfiable\" previously.\n */\n RANGE_NOT_SATISFIABLE = 416,\n\n /**\n * The server cannot meet the requirements of the Expect request-header field.\n */\n EXPECTATION_FAILED = 417,\n\n /**\n * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,\n * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by\n * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.\n */\n I_AM_A_TEAPOT = 418,\n\n /**\n * The request was directed at a server that is not able to produce a response (for example because a connection reuse).\n */\n MISDIRECTED_REQUEST = 421,\n\n /**\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY = 422,\n\n /**\n * The resource that is being accessed is locked.\n */\n LOCKED = 423,\n\n /**\n * The request failed due to failure of a previous request (e.g., a PROPPATCH).\n */\n FAILED_DEPENDENCY = 424,\n\n /**\n * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.\n */\n UPGRADE_REQUIRED = 426,\n\n /**\n * The origin server requires the request to be conditional.\n * Intended to prevent \"the 'lost update' problem, where a client\n * GETs a resource's state, modifies it, and PUTs it back to the server,\n * when meanwhile a third party has modified the state on the server, leading to a conflict.\"\n */\n PRECONDITION_REQUIRED = 428,\n\n /**\n * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.\n */\n TOO_MANY_REQUESTS = 429,\n\n /**\n * The server is unwilling to process the request because either an individual header field,\n * or all the header fields collectively, are too large.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE = 431,\n\n /**\n * A server operator has received a legal demand to deny access to a resource or to a set of resources\n * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS = 451,\n\n /**\n * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.\n */\n INTERNAL_SERVER_ERROR = 500,\n\n /**\n * The server either does not recognize the request method, or it lacks the ability to fulfill the request.\n * Usually this implies future availability (e.g., a new feature of a web-service API).\n */\n NOT_IMPLEMENTED = 501,\n\n /**\n * The server was acting as a gateway or proxy and received an invalid response from the upstream server.\n */\n BAD_GATEWAY = 502,\n\n /**\n * The server is currently unavailable (because it is overloaded or down for maintenance).\n * Generally, this is a temporary state.\n */\n SERVICE_UNAVAILABLE = 503,\n\n /**\n * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n */\n GATEWAY_TIMEOUT = 504,\n\n /**\n * The server does not support the HTTP protocol version used in the request\n */\n HTTP_VERSION_NOT_SUPPORTED = 505,\n\n /**\n * Transparent content negotiation for the request results in a circular reference.\n */\n VARIANT_ALSO_NEGOTIATES = 506,\n\n /**\n * The server is unable to store the representation needed to complete the request.\n */\n INSUFFICIENT_STORAGE = 507,\n\n /**\n * The server detected an infinite loop while processing the request.\n */\n LOOP_DETECTED = 508,\n\n /**\n * Further extensions to the request are required for the server to fulfill it.\n */\n NOT_EXTENDED = 510,\n\n /**\n * The client needs to authenticate to gain network access.\n * Intended for use by intercepting proxies used to control access to the network (e.g., \"captive portals\" used\n * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).\n */\n NETWORK_AUTHENTICATION_REQUIRED = 511,\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\nexport const VERSION = {\n \"commitHash\": \"b85fc404e34545a518215e449b3f1253f4520eec\",\n \"version\": \"17.2.0\"\n};\n","/**\n * @packageDocumentation\n * @module @taquito/http-utils\n */\n\nimport fetchAdapter from './fetch-adapter';\nimport { STATUS_CODE } from './status_code';\nimport axios from 'axios';\nimport { HttpRequestFailed, HttpResponseError } from './errors';\n\nconst isNode = typeof process !== 'undefined' && !!process?.versions?.node;\n\nconst adapter = isNode ? undefined : fetchAdapter;\n\nexport * from './status_code';\nexport { VERSION } from './version';\nexport { HttpRequestFailed, HttpResponseError } from './errors';\n\nenum ResponseType {\n TEXT = 'text',\n JSON = 'json',\n}\n\ntype ObjectType = Record<string, any>;\n\nexport interface HttpRequestOptions {\n url: string;\n method?: 'GET' | 'POST';\n timeout?: number;\n json?: boolean;\n query?: ObjectType;\n headers?: { [key: string]: string };\n mimeType?: string;\n}\n\nexport class HttpBackend {\n constructor(private timeout: number = 30000) {}\n\n protected serialize(obj?: ObjectType) {\n if (!obj) {\n return '';\n }\n\n const str = [];\n for (const p in obj) {\n // eslint-disable-next-line no-prototype-builtins\n if (obj.hasOwnProperty(p) && typeof obj[p] !== 'undefined') {\n const prop = typeof obj[p].toJSON === 'function' ? obj[p].toJSON() : obj[p];\n // query arguments can have no value so we need some way of handling that\n // example https://domain.com/query?all\n if (prop === null) {\n str.push(encodeURIComponent(p));\n continue;\n }\n // another use case is multiple arguments with the same name\n // they are passed as array\n if (Array.isArray(prop)) {\n prop.forEach((item) => {\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(item));\n });\n continue;\n }\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(prop));\n }\n }\n const serialized = str.join('&');\n if (serialized) {\n return `?${serialized}`;\n } else {\n return '';\n }\n }\n\n /**\n *\n * @param options contains options to be passed for the HTTP request (url, method and timeout)\n * @throws {@link HttpRequestFailed} | {@link HttpResponseError}\n */\n async createRequest<T>(\n { url, method, timeout = this.timeout, query, headers = {}, json = true }: HttpRequestOptions,\n data?: object | string\n ) {\n const urlWithQuery = url + this.serialize(query);\n let resType: ResponseType;\n let transformResponse = undefined;\n\n if (!headers['Content-Type']) {\n headers['Content-Type'] = 'application/json';\n }\n\n if (!json) {\n resType = ResponseType.TEXT;\n transformResponse = [<Type>(v: Type) => v];\n } else {\n resType = ResponseType.JSON;\n }\n\n try {\n const response = await axios.request<T>({\n url: urlWithQuery,\n method: method ?? 'GET',\n headers: headers,\n responseType: resType,\n transformResponse,\n timeout: timeout,\n data: data,\n adapter,\n });\n\n return response.data;\n } catch (err: any) {\n if ((axios.isAxiosError(err) && err.response) || (!isNode && err.response)) {\n let errorData;\n\n if (typeof err.response.data === 'object') {\n errorData = JSON.stringify(err.response.data);\n } else {\n errorData = err.response.data;\n }\n\n throw new HttpResponseError(\n `Http error response: (${err.response.status}) ${errorData}`,\n err.response.status as STATUS_CODE,\n err.response.statusText,\n errorData,\n urlWithQuery\n );\n } else {\n throw new HttpRequestFailed(String(method), urlWithQuery, err);\n }\n }\n }\n}\n"],"names":["NetworkError","STATUS_CODE","axios"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;IAKA,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC9D,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE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C/C,qBAAA;IAAM,yBAAA;IACL,wBAAA,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC/B,qBAAA;IAED,oBAAA,MAAM,IAAI,iBAAiB,CACzB,CAAA,sBAAA,EAAyB,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,EAC5D,GAAG,CAAC,QAAQ,CAAC,MAAqB,EAClC,GAAG,CAAC,QAAQ,CAAC,UAAU,EACvB,SAAS,EACT,YAAY,CACb,CAAC;IACH,iBAAA;IAAM,qBAAA;IACL,oBAAA,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;IAChE,iBAAA;IACF,aAAA;aACF,CAAA,CAAA;IAAA,KAAA;IACF;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taquito-http-utils.umd.js","sources":["../src/fetch-adapter.ts","../src/errors.ts","../src/status_code.ts","../src/version.ts","../src/taquito-http-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nconst settle = require('axios/lib/core/settle');\nconst buildURL = require('axios/lib/helpers/buildURL');\nconst buildFullPath = require('axios/lib/core/buildFullPath');\nconst { isUndefined, isStandardBrowserEnv, isFormData } = require('axios/lib/utils');\n\n/**\n * - Create a request object\n * - Get response body\n * - Check if timeout\n */\nexport default async function fetchAdapter(config: AxiosRequestConfig): Promise<AxiosResponse> {\n const request = createRequest(config);\n const promiseChain = [getResponse(request, config)];\n\n if (config.timeout && config.timeout > 0) {\n promiseChain.push(\n new Promise((res) => {\n setTimeout(() => {\n const message = config.timeoutErrorMessage\n ? config.timeoutErrorMessage\n : 'timeout of ' + config.timeout + 'ms exceeded';\n res(createError(message, config, 'ECONNABORTED', request));\n }, config.timeout);\n })\n );\n }\n\n const data = await Promise.race(promiseChain);\n return new Promise((resolve, reject) => {\n if (data instanceof Error) {\n reject(data);\n } else {\n const c: any = config;\n 'settle' in c && Object.prototype.toString.call(c.settle) === '[object Function]'\n ? c.settle(resolve, reject, data)\n : settle(resolve, reject, data);\n }\n });\n}\n\n/**\n * Fetch API stage two is to get response body. This function tries to retrieve\n * response body based on response's type\n */\nasync function getResponse(request: RequestInfo | URL, config: AxiosRequestConfig) {\n try {\n const stageOne = await fetch(request as any);\n\n let response: {\n ok: boolean;\n status: number;\n statusText: string;\n headers: Headers;\n config: AxiosRequestConfig;\n request: RequestInfo | URL;\n data?: unknown;\n } = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n if (stageOne.status >= 400) {\n return createError('Response Error', config, 'ERR_NETWORK', request, response);\n }\n\n response = {\n ok: stageOne.ok,\n status: stageOne.status,\n statusText: stageOne.statusText,\n headers: new Headers(stageOne.headers), // Make a copy of headers\n config: config,\n request,\n };\n\n if (stageOne.status >= 200 && stageOne.status !== 204) {\n switch (config.responseType) {\n case 'arraybuffer':\n response.data = await stageOne.arrayBuffer();\n break;\n case 'blob':\n response.data = await stageOne.blob();\n break;\n case 'json':\n response.data = await stageOne.json();\n break;\n // TODO: the next option does not exist in response type\n // case 'formData':\n // response.data = await stageOne.formData();\n // break;\n default:\n response.data = await stageOne.text();\n break;\n }\n }\n\n return response;\n } catch (e) {\n return createError('Network Error', config, 'ERR_NETWORK', request);\n }\n}\n\n/**\n * This function will create a Request object based on configuration's axios\n */\nfunction createRequest(config: AxiosRequestConfig) {\n const headers = new Headers(config.headers as any);\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password\n ? decodeURI(encodeURIComponent(config.auth.password))\n : '';\n headers.set('Authorization', `Basic ${btoa(username + ':' + password)}`);\n }\n\n const method = config.method?.toUpperCase();\n const options: RequestInit = {\n headers: headers,\n method,\n };\n if (method !== 'GET' && method !== 'HEAD') {\n options.body = config.data;\n\n // In these cases the browser will automatically set the correct Content-Type,\n // but only if that header hasn't been set yet. So that's why we're deleting it.\n if (isFormData(options.body) && isStandardBrowserEnv()) {\n headers.delete('Content-Type');\n }\n }\n const c = config as any;\n if ('mode' in c) {\n options.mode = c.mode as RequestMode;\n }\n if ('cache' in c) {\n options.cache = c.cache as RequestCache;\n }\n if ('integrity' in c) {\n options.integrity = c.integrity as string;\n }\n if ('redirect' in c) {\n options.redirect = c.redirect as RequestRedirect;\n }\n if ('referrer' in c) {\n options.referrer = c.referrer as string;\n }\n // This config is similar to XHR’s withCredentials flag, but with three available values instead of two.\n // So if withCredentials is not set, default value 'same-origin' will be used\n if (!isUndefined(c.withCredentials)) {\n options.credentials = c.withCredentials ? 'include' : 'omit';\n }\n\n const fullPath = buildFullPath(c.baseURL, c.url);\n const url = buildURL(fullPath, c.params, c.paramsSerializer);\n\n // Expected browser to throw error if there is any wrong configuration value\n return new Request(url, options);\n}\n\n/**\n * Note:\n *\n * From version >= 0.27.0, createError function is replaced by AxiosError class.\n * So I copy the old createError function here for backward compatible.\n *\n *\n *\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction createError(\n message: string,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n // TODO: this code never runs\n // if ('AxiosError' in axios && axios.AxiosError && typeof axios.AxiosError === 'function' && isConstructor(axios.AxiosError)) {\n // return new axios.AxiosError(message, axios.AxiosError[code], config, request, response);\n // }\n\n const error = new Error(message);\n return enhanceError(error, config, code, request, response);\n}\n\n/**\n *\n * Note:\n *\n * This function is for backward compatible.\n *\n *\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nfunction enhanceError(\n error: any,\n config: AxiosRequestConfig,\n code?: string,\n request?: RequestInfo | URL,\n response?: object\n) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: 'description' in this ? this.description : undefined,\n number: 'number' in this ? this.number : undefined,\n // Mozilla\n fileName: 'fileName' in this ? this.fileName : undefined,\n lineNumber: 'lineNumber' in this ? this.lineNumber : undefined,\n columnNumber: 'columnNumber' in this ? this.columnNumber : undefined,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null,\n };\n };\n return error;\n}\n","import { NetworkError } from '@taquito/core';\nimport { STATUS_CODE } from './status_code';\n\n/**\n * @category Error\n * @description Error that indicates a general failure in making the HTTP request\n */\nexport class HttpRequestFailed extends NetworkError {\n constructor(\n public readonly method: string,\n public readonly url: string,\n public readonly cause: Error\n ) {\n super();\n this.name = 'HttpRequestFailed';\n this.message = `${method} ${url} ${String(cause)}`;\n }\n}\n\n/**\n * @category Error\n * @description Error thrown when the endpoint returns an HTTP error to the client\n */\nexport class HttpResponseError extends NetworkError {\n constructor(\n public readonly message: string,\n public readonly status: STATUS_CODE,\n public readonly statusText: string,\n public readonly body: string,\n public readonly url: string\n ) {\n super();\n this.name = 'HttpResponse';\n }\n}\n","/**\n * Hypertext Transfer Protocol (HTTP) response status codes.\n * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}\n */\nexport enum STATUS_CODE {\n /**\n * The server has received the request headers and the client should proceed to send the request body\n * (in the case of a request for which a body needs to be sent; for example, a POST request).\n * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.\n * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request\n * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.\n */\n CONTINUE = 100,\n\n /**\n * The requester has asked the server to switch protocols and the server has agreed to do so.\n */\n SWITCHING_PROTOCOLS = 101,\n\n /**\n * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.\n * This code indicates that the server has received and is processing the request, but no response is available yet.\n * This prevents the client from timing out and assuming the request was lost.\n */\n PROCESSING = 102,\n\n /**\n * Standard response for successful HTTP requests.\n * The actual response will depend on the request method used.\n * In a GET request, the response will contain an entity corresponding to the requested resource.\n * In a POST request, the response will contain an entity describing or containing the result of the action.\n */\n OK = 200,\n\n /**\n * The request has been fulfilled, resulting in the creation of a new resource.\n */\n CREATED = 201,\n\n /**\n * The request has been accepted for processing, but the processing has not been completed.\n * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.\n */\n ACCEPTED = 202,\n\n /**\n * SINCE HTTP/1.1\n * The server is a transforming proxy that received a 200 OK from its origin,\n * but is returning a modified version of the origin's response.\n */\n NON_AUTHORITATIVE_INFORMATION = 203,\n\n /**\n * The server successfully processed the request and is not returning any content.\n */\n NO_CONTENT = 204,\n\n /**\n * The server successfully processed the request, but is not returning any content.\n * Unlike a 204 response, this response requires that the requester reset the document view.\n */\n RESET_CONTENT = 205,\n\n /**\n * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.\n * The range header is used by HTTP clients to enable resuming of interrupted downloads,\n * or split a download into multiple simultaneous streams.\n */\n PARTIAL_CONTENT = 206,\n\n /**\n * The message body that follows is an XML message and can contain a number of separate response codes,\n * depending on how many sub-requests were made.\n */\n MULTI_STATUS = 207,\n\n /**\n * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,\n * and are not being included again.\n */\n ALREADY_REPORTED = 208,\n\n /**\n * The server has fulfilled a request for the resource,\n * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\n */\n IM_USED = 226,\n\n /**\n * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).\n * For example, this code could be used to present multiple video format options,\n * to list files with different filename extensions, or to suggest word-sense disambiguation.\n */\n MULTIPLE_CHOICES = 300,\n\n /**\n * This and all future requests should be directed to the given URI.\n */\n MOVED_PERMANENTLY = 301,\n\n /**\n * This is an example of industry practice contradicting the standard.\n * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect\n * (the original describing phrase was \"Moved Temporarily\"), but popular browsers implemented 302\n * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307\n * to distinguish between the two behaviours. However, some Web applications and frameworks\n * use the 302 status code as if it were the 303.\n */\n FOUND = 302,\n\n /**\n * SINCE HTTP/1.1\n * The response to the request can be found under another URI using a GET method.\n * When received in response to a POST (or PUT/DELETE), the client should presume that\n * the server has received the data and should issue a redirect with a separate GET message.\n */\n SEE_OTHER = 303,\n\n /**\n * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.\n * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.\n */\n NOT_MODIFIED = 304,\n\n /**\n * SINCE HTTP/1.1\n * The requested resource is available only through a proxy, the address for which is provided in the response.\n * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.\n */\n USE_PROXY = 305,\n\n /**\n * No longer used. Originally meant \"Subsequent requests should use the specified proxy.\"\n */\n SWITCH_PROXY = 306,\n\n /**\n * SINCE HTTP/1.1\n * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.\n * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.\n * For example, a POST request should be repeated using another POST request.\n */\n TEMPORARY_REDIRECT = 307,\n\n /**\n * The request and all future requests should be repeated using another URI.\n * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.\n * So, for example, submitting a form to a permanently redirected resource may continue smoothly.\n */\n PERMANENT_REDIRECT = 308,\n\n /**\n * The server cannot or will not process the request due to an apparent client error\n * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).\n */\n BAD_REQUEST = 400,\n\n /**\n * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet\n * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the\n * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means\n * \"unauthenticated\",i.e. the user does not have the necessary credentials.\n */\n UNAUTHORIZED = 401,\n\n /**\n * Reserved for future use. The original intention was that this code might be used as part of some form of digital\n * cash or micro payment scheme, but that has not happened, and this code is not usually used.\n * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.\n */\n PAYMENT_REQUIRED = 402,\n\n /**\n * The request was valid, but the server is refusing action.\n * The user might not have the necessary permissions for a resource.\n */\n FORBIDDEN = 403,\n\n /**\n * The requested resource could not be found but may be available in the future.\n * Subsequent requests by the client are permissible.\n */\n NOT_FOUND = 404,\n\n /**\n * A request method is not supported for the requested resource;\n * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.\n */\n METHOD_NOT_ALLOWED = 405,\n\n /**\n * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n */\n NOT_ACCEPTABLE = 406,\n\n /**\n * The client must first authenticate itself with the proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED = 407,\n\n /**\n * The server timed out waiting for the request.\n * According to HTTP specifications:\n * \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"\n */\n REQUEST_TIMEOUT = 408,\n\n /**\n * Indicates that the request could not be processed because of conflict in the request,\n * such as an edit conflict between multiple simultaneous updates.\n */\n CONFLICT = 409,\n\n /**\n * Indicates that the resource requested is no longer available and will not be available again.\n * This should be used when a resource has been intentionally removed and the resource should be purged.\n * Upon receiving a 410 status code, the client should not request the resource in the future.\n * Clients such as search engines should remove the resource from their indices.\n * Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead.\n */\n GONE = 410,\n\n /**\n * The request did not specify the length of its content, which is required by the requested resource.\n */\n LENGTH_REQUIRED = 411,\n\n /**\n * The server does not meet one of the preconditions that the requester put on the request.\n */\n PRECONDITION_FAILED = 412,\n\n /**\n * The request is larger than the server is willing or able to process. Previously called \"Request Entity Too Large\".\n */\n PAYLOAD_TOO_LARGE = 413,\n\n /**\n * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,\n * in which case it should be converted to a POST request.\n * Called \"Request-URI Too Long\" previously.\n */\n URI_TOO_LONG = 414,\n\n /**\n * The request entity has a media type which the server or resource does not support.\n * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.\n */\n UNSUPPORTED_MEDIA_TYPE = 415,\n\n /**\n * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.\n * For example, if the client asked for a part of the file that lies beyond the end of the file.\n * Called \"Requested Range Not Satisfiable\" previously.\n */\n RANGE_NOT_SATISFIABLE = 416,\n\n /**\n * The server cannot meet the requirements of the Expect request-header field.\n */\n EXPECTATION_FAILED = 417,\n\n /**\n * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,\n * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by\n * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.\n */\n I_AM_A_TEAPOT = 418,\n\n /**\n * The request was directed at a server that is not able to produce a response (for example because a connection reuse).\n */\n MISDIRECTED_REQUEST = 421,\n\n /**\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY = 422,\n\n /**\n * The resource that is being accessed is locked.\n */\n LOCKED = 423,\n\n /**\n * The request failed due to failure of a previous request (e.g., a PROPPATCH).\n */\n FAILED_DEPENDENCY = 424,\n\n /**\n * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.\n */\n UPGRADE_REQUIRED = 426,\n\n /**\n * The origin server requires the request to be conditional.\n * Intended to prevent \"the 'lost update' problem, where a client\n * GETs a resource's state, modifies it, and PUTs it back to the server,\n * when meanwhile a third party has modified the state on the server, leading to a conflict.\"\n */\n PRECONDITION_REQUIRED = 428,\n\n /**\n * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.\n */\n TOO_MANY_REQUESTS = 429,\n\n /**\n * The server is unwilling to process the request because either an individual header field,\n * or all the header fields collectively, are too large.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE = 431,\n\n /**\n * A server operator has received a legal demand to deny access to a resource or to a set of resources\n * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS = 451,\n\n /**\n * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.\n */\n INTERNAL_SERVER_ERROR = 500,\n\n /**\n * The server either does not recognize the request method, or it lacks the ability to fulfill the request.\n * Usually this implies future availability (e.g., a new feature of a web-service API).\n */\n NOT_IMPLEMENTED = 501,\n\n /**\n * The server was acting as a gateway or proxy and received an invalid response from the upstream server.\n */\n BAD_GATEWAY = 502,\n\n /**\n * The server is currently unavailable (because it is overloaded or down for maintenance).\n * Generally, this is a temporary state.\n */\n SERVICE_UNAVAILABLE = 503,\n\n /**\n * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n */\n GATEWAY_TIMEOUT = 504,\n\n /**\n * The server does not support the HTTP protocol version used in the request\n */\n HTTP_VERSION_NOT_SUPPORTED = 505,\n\n /**\n * Transparent content negotiation for the request results in a circular reference.\n */\n VARIANT_ALSO_NEGOTIATES = 506,\n\n /**\n * The server is unable to store the representation needed to complete the request.\n */\n INSUFFICIENT_STORAGE = 507,\n\n /**\n * The server detected an infinite loop while processing the request.\n */\n LOOP_DETECTED = 508,\n\n /**\n * Further extensions to the request are required for the server to fulfill it.\n */\n NOT_EXTENDED = 510,\n\n /**\n * The client needs to authenticate to gain network access.\n * Intended for use by intercepting proxies used to control access to the network (e.g., \"captive portals\" used\n * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).\n */\n NETWORK_AUTHENTICATION_REQUIRED = 511,\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\nexport const VERSION = {\n \"commitHash\": \"a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2\",\n \"version\": \"17.3.0\"\n};\n","/**\n * @packageDocumentation\n * @module @taquito/http-utils\n */\n\nimport fetchAdapter from './fetch-adapter';\nimport { STATUS_CODE } from './status_code';\nimport axios from 'axios';\nimport { HttpRequestFailed, HttpResponseError } from './errors';\n\nconst isNode = typeof process !== 'undefined' && !!process?.versions?.node;\n\nconst adapter = isNode ? undefined : fetchAdapter;\n\nexport * from './status_code';\nexport { VERSION } from './version';\nexport { HttpRequestFailed, HttpResponseError } from './errors';\n\nenum ResponseType {\n TEXT = 'text',\n JSON = 'json',\n}\n\ntype ObjectType = Record<string, any>;\n\nexport interface HttpRequestOptions {\n url: string;\n method?: 'GET' | 'POST';\n timeout?: number;\n json?: boolean;\n query?: ObjectType;\n headers?: { [key: string]: string };\n mimeType?: string;\n}\n\nexport class HttpBackend {\n constructor(private timeout: number = 30000) {}\n\n protected serialize(obj?: ObjectType) {\n if (!obj) {\n return '';\n }\n\n const str = [];\n for (const p in obj) {\n // eslint-disable-next-line no-prototype-builtins\n if (obj.hasOwnProperty(p) && typeof obj[p] !== 'undefined') {\n const prop = typeof obj[p].toJSON === 'function' ? obj[p].toJSON() : obj[p];\n // query arguments can have no value so we need some way of handling that\n // example https://domain.com/query?all\n if (prop === null) {\n str.push(encodeURIComponent(p));\n continue;\n }\n // another use case is multiple arguments with the same name\n // they are passed as array\n if (Array.isArray(prop)) {\n prop.forEach((item) => {\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(item));\n });\n continue;\n }\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(prop));\n }\n }\n const serialized = str.join('&');\n if (serialized) {\n return `?${serialized}`;\n } else {\n return '';\n }\n }\n\n /**\n *\n * @param options contains options to be passed for the HTTP request (url, method and timeout)\n * @throws {@link HttpRequestFailed} | {@link HttpResponseError}\n */\n async createRequest<T>(\n { url, method, timeout = this.timeout, query, headers = {}, json = true }: HttpRequestOptions,\n data?: object | string\n ) {\n const urlWithQuery = url + this.serialize(query);\n let resType: ResponseType;\n let transformResponse = undefined;\n\n if (!headers['Content-Type']) {\n headers['Content-Type'] = 'application/json';\n }\n\n if (!json) {\n resType = ResponseType.TEXT;\n transformResponse = [<Type>(v: Type) => v];\n } else {\n resType = ResponseType.JSON;\n }\n\n try {\n const response = await axios.request<T>({\n url: urlWithQuery,\n method: method ?? 'GET',\n headers: headers,\n responseType: resType,\n transformResponse,\n timeout: timeout,\n data: data,\n adapter,\n });\n\n return response.data;\n } catch (err: any) {\n if ((axios.isAxiosError(err) && err.response) || (!isNode && err.response)) {\n let errorData;\n\n if (typeof err.response.data === 'object') {\n errorData = JSON.stringify(err.response.data);\n } else {\n errorData = err.response.data;\n }\n\n throw new HttpResponseError(\n `Http error response: (${err.response.status}) ${errorData}`,\n err.response.status as STATUS_CODE,\n err.response.statusText,\n errorData,\n urlWithQuery\n );\n } else {\n throw new HttpRequestFailed(String(method), urlWithQuery, err);\n }\n }\n }\n}\n"],"names":["NetworkError","STATUS_CODE","axios"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;IAKA,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC9D,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAErF;;;;IAIG;IAC2B,SAAA,YAAY,CAAC,MAA0B,EAAA;;IACnE,QAAA,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;YACtC,MAAM,YAAY,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;YAEpD,IAAI,MAAM,CAAC,OAAO,I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,CAAC,QAAQ,CAAC,UAAU,EACvB,SAAS,EACT,YAAY,CACb,CAAC;IACH,iBAAA;IAAM,qBAAA;IACL,oBAAA,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;IAChE,iBAAA;IACF,aAAA;aACF,CAAA,CAAA;IAAA,KAAA;IACF;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/http-utils",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@taquito/core": "^17.
|
|
62
|
+
"@taquito/core": "^17.3.0",
|
|
63
63
|
"axios": "0.26.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"ts-toolbelt": "^9.6.0",
|
|
92
92
|
"typescript": "~4.1.5"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "b7520a1c1de248e8cc1d01b4e0422bb546723563"
|
|
95
95
|
}
|