@api-client/core 0.18.11 → 0.18.13
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/build/src/browser.d.ts +0 -3
- package/build/src/browser.d.ts.map +1 -1
- package/build/src/browser.js +0 -3
- package/build/src/browser.js.map +1 -1
- package/build/src/index.d.ts +2 -5
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +2 -5
- package/build/src/index.js.map +1 -1
- package/build/src/lib/logging/DefaultLogger.d.ts +14 -0
- package/build/src/lib/logging/DefaultLogger.d.ts.map +1 -1
- package/build/src/lib/logging/DefaultLogger.js +27 -0
- package/build/src/lib/logging/DefaultLogger.js.map +1 -1
- package/build/src/lib/logging/index.d.ts +4 -0
- package/build/src/lib/logging/index.d.ts.map +1 -0
- package/build/src/lib/logging/index.js +10 -0
- package/build/src/lib/logging/index.js.map +1 -0
- package/build/src/modeling/DomainModel.d.ts.map +1 -1
- package/build/src/modeling/DomainModel.js +11 -4
- package/build/src/modeling/DomainModel.js.map +1 -1
- package/build/src/models/ClientCertificate.d.ts +1 -1
- package/build/src/models/ClientCertificate.js.map +1 -1
- package/build/src/models/RequestConfig.d.ts +1 -1
- package/build/src/models/RequestConfig.js.map +1 -1
- package/build/src/models/SerializableError.d.ts +1 -1
- package/build/src/models/SerializableError.d.ts.map +1 -1
- package/build/src/models/SerializableError.js.map +1 -1
- package/build/src/proxy/RequestProxy.d.ts.map +1 -1
- package/build/src/proxy/RequestProxy.js +2 -2
- package/build/src/proxy/RequestProxy.js.map +1 -1
- package/build/src/runtime/http-engine/CoreEngine.d.ts +218 -139
- package/build/src/runtime/http-engine/CoreEngine.d.ts.map +1 -1
- package/build/src/runtime/http-engine/CoreEngine.js +716 -870
- package/build/src/runtime/http-engine/CoreEngine.js.map +1 -1
- package/build/src/runtime/http-engine/PayloadSupport.d.ts.map +1 -1
- package/build/src/runtime/http-engine/PayloadSupport.js +2 -1
- package/build/src/runtime/http-engine/PayloadSupport.js.map +1 -1
- package/build/src/runtime/http-engine/auth/AuthManager.d.ts +73 -0
- package/build/src/runtime/http-engine/auth/AuthManager.d.ts.map +1 -0
- package/build/src/runtime/http-engine/auth/AuthManager.js +186 -0
- package/build/src/runtime/http-engine/auth/AuthManager.js.map +1 -0
- package/build/src/runtime/http-engine/auth/index.d.ts +2 -0
- package/build/src/runtime/http-engine/auth/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/auth/index.js +2 -0
- package/build/src/runtime/http-engine/auth/index.js.map +1 -0
- package/build/src/runtime/http-engine/certificates/CertificateManager.d.ts +11 -0
- package/build/src/runtime/http-engine/certificates/CertificateManager.d.ts.map +1 -0
- package/build/src/runtime/http-engine/certificates/CertificateManager.js +76 -0
- package/build/src/runtime/http-engine/certificates/CertificateManager.js.map +1 -0
- package/build/src/runtime/http-engine/certificates/index.d.ts +2 -0
- package/build/src/runtime/http-engine/certificates/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/certificates/index.js +2 -0
- package/build/src/runtime/http-engine/certificates/index.js.map +1 -0
- package/build/src/runtime/http-engine/compression/CompressionManager.d.ts +25 -0
- package/build/src/runtime/http-engine/compression/CompressionManager.d.ts.map +1 -0
- package/build/src/runtime/http-engine/compression/CompressionManager.js +89 -0
- package/build/src/runtime/http-engine/compression/CompressionManager.js.map +1 -0
- package/build/src/runtime/http-engine/compression/index.d.ts +2 -0
- package/build/src/runtime/http-engine/compression/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/compression/index.js +2 -0
- package/build/src/runtime/http-engine/compression/index.js.map +1 -0
- package/build/src/runtime/http-engine/connections/ConnectionManager.d.ts +57 -0
- package/build/src/runtime/http-engine/connections/ConnectionManager.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/ConnectionManager.js +78 -0
- package/build/src/runtime/http-engine/connections/ConnectionManager.js.map +1 -0
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.d.ts +70 -0
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.js +184 -0
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.js.map +1 -0
- package/build/src/runtime/http-engine/connections/DirectConnection.d.ts +22 -0
- package/build/src/runtime/http-engine/connections/DirectConnection.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/DirectConnection.js +105 -0
- package/build/src/runtime/http-engine/connections/DirectConnection.js.map +1 -0
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.d.ts +60 -0
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.js +138 -0
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.js.map +1 -0
- package/build/src/runtime/http-engine/connections/ProxyConnection.d.ts +14 -0
- package/build/src/runtime/http-engine/connections/ProxyConnection.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/ProxyConnection.js +47 -0
- package/build/src/runtime/http-engine/connections/ProxyConnection.js.map +1 -0
- package/build/src/runtime/http-engine/connections/TunnelConnection.d.ts +13 -0
- package/build/src/runtime/http-engine/connections/TunnelConnection.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/TunnelConnection.js +175 -0
- package/build/src/runtime/http-engine/connections/TunnelConnection.js.map +1 -0
- package/build/src/runtime/http-engine/connections/index.d.ts +7 -0
- package/build/src/runtime/http-engine/connections/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/connections/index.js +7 -0
- package/build/src/runtime/http-engine/connections/index.js.map +1 -0
- package/build/src/runtime/http-engine/constants.d.ts +69 -0
- package/build/src/runtime/http-engine/constants.d.ts.map +1 -0
- package/build/src/runtime/http-engine/constants.js +90 -0
- package/build/src/runtime/http-engine/constants.js.map +1 -0
- package/build/src/runtime/http-engine/cookies/CookieProcessor.d.ts +5 -0
- package/build/src/runtime/http-engine/cookies/CookieProcessor.d.ts.map +1 -0
- package/build/src/runtime/http-engine/cookies/CookieProcessor.js +20 -0
- package/build/src/runtime/http-engine/cookies/CookieProcessor.js.map +1 -0
- package/build/src/runtime/http-engine/cookies/index.d.ts +2 -0
- package/build/src/runtime/http-engine/cookies/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/cookies/index.js +2 -0
- package/build/src/runtime/http-engine/cookies/index.js.map +1 -0
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.d.ts +156 -0
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.d.ts.map +1 -0
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.js +227 -0
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.js.map +1 -0
- package/build/src/runtime/http-engine/errors/index.d.ts +2 -0
- package/build/src/runtime/http-engine/errors/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/errors/index.js +2 -0
- package/build/src/runtime/http-engine/errors/index.js.map +1 -0
- package/build/src/runtime/http-engine/message/MessageBuilder.d.ts +66 -0
- package/build/src/runtime/http-engine/message/MessageBuilder.d.ts.map +1 -0
- package/build/src/runtime/http-engine/message/MessageBuilder.js +161 -0
- package/build/src/runtime/http-engine/message/MessageBuilder.js.map +1 -0
- package/build/src/runtime/http-engine/message/MessageProcessor.d.ts +27 -0
- package/build/src/runtime/http-engine/message/MessageProcessor.d.ts.map +1 -0
- package/build/src/runtime/http-engine/message/MessageProcessor.js +51 -0
- package/build/src/runtime/http-engine/message/MessageProcessor.js.map +1 -0
- package/build/src/runtime/http-engine/message/index.d.ts +3 -0
- package/build/src/runtime/http-engine/message/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/message/index.js +3 -0
- package/build/src/runtime/http-engine/message/index.js.map +1 -0
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.d.ts +2 -8
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.d.ts.map +1 -1
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.js +11 -5
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.js.map +1 -1
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.js +6 -6
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.js.map +1 -1
- package/build/src/runtime/http-engine/parsers/BodyParser.d.ts +39 -0
- package/build/src/runtime/http-engine/parsers/BodyParser.d.ts.map +1 -0
- package/build/src/runtime/http-engine/parsers/BodyParser.js +145 -0
- package/build/src/runtime/http-engine/parsers/BodyParser.js.map +1 -0
- package/build/src/runtime/http-engine/parsers/HeadersParser.d.ts +29 -0
- package/build/src/runtime/http-engine/parsers/HeadersParser.d.ts.map +1 -0
- package/build/src/runtime/http-engine/parsers/HeadersParser.js +88 -0
- package/build/src/runtime/http-engine/parsers/HeadersParser.js.map +1 -0
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.d.ts +91 -0
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.d.ts.map +1 -0
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.js +236 -0
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.js.map +1 -0
- package/build/src/runtime/http-engine/parsers/StatusParser.d.ts +20 -0
- package/build/src/runtime/http-engine/parsers/StatusParser.d.ts.map +1 -0
- package/build/src/runtime/http-engine/parsers/StatusParser.js +51 -0
- package/build/src/runtime/http-engine/parsers/StatusParser.js.map +1 -0
- package/build/src/runtime/http-engine/parsers/index.d.ts +5 -0
- package/build/src/runtime/http-engine/parsers/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/parsers/index.js +5 -0
- package/build/src/runtime/http-engine/parsers/index.js.map +1 -0
- package/build/src/runtime/http-engine/response/ResponseProcessor.d.ts +22 -0
- package/build/src/runtime/http-engine/response/ResponseProcessor.d.ts.map +1 -0
- package/build/src/runtime/http-engine/response/ResponseProcessor.js +25 -0
- package/build/src/runtime/http-engine/response/ResponseProcessor.js.map +1 -0
- package/build/src/runtime/http-engine/response/index.d.ts +2 -0
- package/build/src/runtime/http-engine/response/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/response/index.js +2 -0
- package/build/src/runtime/http-engine/response/index.js.map +1 -0
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.d.ts +7 -0
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.d.ts.map +1 -0
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.js +40 -0
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.js.map +1 -0
- package/build/src/runtime/http-engine/statistics/index.d.ts +2 -0
- package/build/src/runtime/http-engine/statistics/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/statistics/index.js +2 -0
- package/build/src/runtime/http-engine/statistics/index.js.map +1 -0
- package/build/src/runtime/http-engine/url/UrlProcessor.d.ts +24 -0
- package/build/src/runtime/http-engine/url/UrlProcessor.d.ts.map +1 -0
- package/build/src/runtime/http-engine/url/UrlProcessor.js +50 -0
- package/build/src/runtime/http-engine/url/UrlProcessor.js.map +1 -0
- package/build/src/runtime/http-engine/url/index.d.ts +2 -0
- package/build/src/runtime/http-engine/url/index.d.ts.map +1 -0
- package/build/src/runtime/http-engine/url/index.js +2 -0
- package/build/src/runtime/http-engine/url/index.js.map +1 -0
- package/build/src/runtime/http-runner/HttpRequestRunner.d.ts +3 -3
- package/build/src/runtime/http-runner/HttpRequestRunner.d.ts.map +1 -1
- package/build/src/runtime/http-runner/HttpRequestRunner.js.map +1 -1
- package/build/src/runtime/node/InteropInterfaces.d.ts +3 -3
- package/build/src/runtime/node/InteropInterfaces.d.ts.map +1 -1
- package/build/src/runtime/node/InteropInterfaces.js.map +1 -1
- package/build/src/runtime/node/ProjectRequestRunner.d.ts +2 -2
- package/build/src/runtime/node/ProjectRequestRunner.d.ts.map +1 -1
- package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunner.d.ts.map +1 -1
- package/build/src/runtime/node/ProjectRunner.js +2 -2
- package/build/src/runtime/node/ProjectRunner.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +24 -24
- package/package.json +2 -2
- package/src/lib/logging/DefaultLogger.ts +32 -0
- package/src/modeling/DomainModel.ts +11 -4
- package/src/models/ClientCertificate.ts +1 -1
- package/src/models/RequestConfig.ts +1 -1
- package/src/models/SerializableError.ts +1 -1
- package/src/proxy/RequestProxy.ts +2 -2
- package/src/runtime/http-engine/CoreEngine.ts +858 -893
- package/src/runtime/http-engine/PayloadSupport.ts +2 -1
- package/src/runtime/http-engine/auth/AuthManager.ts +242 -0
- package/src/runtime/http-engine/certificates/CertificateManager.ts +74 -0
- package/src/runtime/http-engine/compression/CompressionManager.ts +99 -0
- package/src/runtime/http-engine/connections/ConnectionManager.ts +123 -0
- package/src/runtime/http-engine/connections/DigestAuthHandler.ts +238 -0
- package/src/runtime/http-engine/connections/DirectConnection.ts +134 -0
- package/src/runtime/http-engine/connections/ProxyAuthHandler.ts +179 -0
- package/src/runtime/http-engine/connections/ProxyConnection.ts +55 -0
- package/src/runtime/http-engine/connections/TunnelConnection.ts +192 -0
- package/src/runtime/http-engine/constants.ts +103 -0
- package/src/runtime/http-engine/cookies/CookieProcessor.ts +25 -0
- package/src/runtime/http-engine/errors/HttpEngineErrors.ts +319 -0
- package/src/runtime/http-engine/message/MessageBuilder.ts +201 -0
- package/src/runtime/http-engine/message/MessageProcessor.ts +73 -0
- package/src/runtime/http-engine/ntlm/NtlmAuth.ts +16 -13
- package/src/runtime/http-engine/ntlm/NtlmMessage.ts +6 -6
- package/src/runtime/http-engine/parsers/BodyParser.ts +171 -0
- package/src/runtime/http-engine/parsers/HeadersParser.ts +103 -0
- package/src/runtime/http-engine/parsers/HttpResponseParser.ts +280 -0
- package/src/runtime/http-engine/parsers/StatusParser.ts +69 -0
- package/src/runtime/http-engine/response/ResponseProcessor.ts +46 -0
- package/src/runtime/http-engine/statistics/StatisticsProcessor.ts +52 -0
- package/src/runtime/http-engine/url/UrlProcessor.ts +55 -0
- package/src/runtime/http-runner/HttpRequestRunner.ts +3 -3
- package/src/runtime/node/InteropInterfaces.ts +3 -3
- package/src/runtime/node/ProjectRequestRunner.ts +2 -2
- package/src/runtime/node/ProjectRunner.ts +2 -2
- package/tests/servers/ProxyServer.ts +32 -19
- package/tests/servers/express-routes/ApiEndpoint.ts +24 -0
- package/tests/servers/express-routes/BasicAuthRoute.ts +36 -0
- package/tests/servers/express-routes/BearerAuthRoute.ts +35 -0
- package/tests/servers/express-routes/NTLMRoute.ts +2 -3
- package/tests/servers/express-routes/PostApi.ts +15 -2
- package/tests/servers/express-routes/RedirectsApi.ts +12 -1
- package/tests/servers/express-routes/ResponsesApi.ts +1 -1
- package/tests/servers/express-routes/StreamApi.ts +19 -0
- package/tests/servers/oauth2mock/ServerMock.js +1 -1
- package/tests/unit/modeling/domain_model_entities.spec.ts +306 -1
- package/tests/unit/runtime/http-engine/HttpResponseParser.spec.ts +337 -0
- package/tests/unit/runtime/http-engine/abort.spec.ts +4 -5
- package/tests/unit/runtime/http-engine/auth.spec.ts +7 -58
- package/tests/unit/runtime/http-engine/certificates/CertificateManager.spec.ts +482 -0
- package/tests/unit/runtime/http-engine/certificates.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/compression/CompressionManager.spec.ts +498 -0
- package/tests/unit/runtime/http-engine/compression.spec.ts +3 -72
- package/tests/unit/runtime/http-engine/connections/ConnectionManager.spec.ts +379 -0
- package/tests/unit/runtime/http-engine/connections/DigestAuthHandler.spec.ts +164 -0
- package/tests/unit/runtime/http-engine/core_engine.spec.ts +561 -0
- package/tests/unit/runtime/http-engine/engine_statuses.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/events.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/headers.spec.ts +2 -88
- package/tests/unit/runtime/http-engine/hosts.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/http-get.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/http-post.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/logger.spec.ts +0 -8
- package/tests/unit/runtime/http-engine/message.spec.ts +2 -194
- package/tests/unit/runtime/http-engine/params.spec.ts +4 -4
- package/tests/unit/runtime/http-engine/proxy.spec.ts +15 -14
- package/tests/unit/runtime/http-engine/redirects.spec.ts +2 -2
- package/tests/unit/runtime/http-engine/responses.spec.ts +170 -277
- package/tests/unit/runtime/http-engine/timeout.spec.ts +3 -3
- package/tests/unit/runtime/http-engine/timings.spec.ts +2 -2
- package/tests/unit/runtime/proxy/HttpProjectProxy.spec.ts +25 -28
- package/tests/unit/runtime/runners/project_runner.spec.ts +2 -2
- package/tests/unit/runtime/runners/request_runner.spec.ts +2 -2
- package/build/src/runtime/http-engine/HttpEngine.d.ts +0 -311
- package/build/src/runtime/http-engine/HttpEngine.d.ts.map +0 -1
- package/build/src/runtime/http-engine/HttpEngine.js +0 -802
- package/build/src/runtime/http-engine/HttpEngine.js.map +0 -1
- package/src/runtime/http-engine/HttpEngine.ts +0 -952
- package/tests/unit/runtime/http-engine/connecting.spec.ts +0 -140
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import nock from 'nock'
|
|
2
1
|
import { test } from '@japa/runner'
|
|
2
|
+
import sinon from 'sinon'
|
|
3
3
|
import { nanoid } from '../../../../src/nanoid.js'
|
|
4
4
|
import {
|
|
5
5
|
HttpProject,
|
|
@@ -8,29 +8,31 @@ import {
|
|
|
8
8
|
IHttpProjectProxyInit,
|
|
9
9
|
ProxyService,
|
|
10
10
|
Exception,
|
|
11
|
-
RouteBuilder,
|
|
12
11
|
} from '../../../../src/index.js'
|
|
12
|
+
import { HttpNode } from '../../../../src/sdk/HttpNode.js'
|
|
13
13
|
|
|
14
14
|
test.group('net-store project', (group) => {
|
|
15
15
|
let project: HttpProject
|
|
16
16
|
const token = 'token-test'
|
|
17
17
|
const storeHostname = 'http://localhost:1234'
|
|
18
18
|
const storeUri = `${storeHostname}/`
|
|
19
|
+
let sandbox: sinon.SinonSandbox
|
|
19
20
|
|
|
20
21
|
group.setup(async () => {
|
|
21
|
-
|
|
22
|
-
nock.activate()
|
|
23
|
-
}
|
|
22
|
+
sandbox = sinon.createSandbox()
|
|
24
23
|
})
|
|
25
24
|
|
|
26
25
|
group.teardown(async () => {
|
|
27
|
-
|
|
26
|
+
sandbox.restore()
|
|
28
27
|
})
|
|
29
28
|
|
|
30
29
|
group.each.setup(({ context }) => {
|
|
31
30
|
project = HttpProject.fromName('p1')
|
|
32
31
|
project.addRequest(`http://localhost:${context.httpConfig.httpPort}/v1/get`)
|
|
33
|
-
|
|
32
|
+
|
|
33
|
+
// Reset the sandbox before each test
|
|
34
|
+
sandbox.restore()
|
|
35
|
+
sandbox = sinon.createSandbox()
|
|
34
36
|
})
|
|
35
37
|
|
|
36
38
|
test('returns an error when no pid', async ({ assert }) => {
|
|
@@ -40,8 +42,6 @@ test.group('net-store project', (group) => {
|
|
|
40
42
|
pid: '',
|
|
41
43
|
options: {},
|
|
42
44
|
}
|
|
43
|
-
const path = RouteBuilder.fileMedia(message.organization, project.key)
|
|
44
|
-
const scope = nock(storeHostname).get(path).reply(200, project.toJSON())
|
|
45
45
|
const service = new ProxyService()
|
|
46
46
|
let error: Exception
|
|
47
47
|
try {
|
|
@@ -53,7 +53,6 @@ test.group('net-store project', (group) => {
|
|
|
53
53
|
assert.equal(error.status, 400, 'has the error code')
|
|
54
54
|
assert.equal(error.message, 'Invalid request', 'has the message')
|
|
55
55
|
assert.equal(error.help, 'The "pid" parameter is required.', 'has the detail')
|
|
56
|
-
assert.isFalse(scope.isDone(), 'did not call the store')
|
|
57
56
|
})
|
|
58
57
|
|
|
59
58
|
test('returns an error when no options', async ({ assert }) => {
|
|
@@ -63,8 +62,6 @@ test.group('net-store project', (group) => {
|
|
|
63
62
|
pid: project.key,
|
|
64
63
|
organization: nanoid(),
|
|
65
64
|
}
|
|
66
|
-
const path = RouteBuilder.fileMedia(message.organization, project.key)
|
|
67
|
-
const scope = nock(storeHostname).get(path).reply(200, project.toJSON())
|
|
68
65
|
const service = new ProxyService()
|
|
69
66
|
let error: Exception
|
|
70
67
|
try {
|
|
@@ -76,7 +73,6 @@ test.group('net-store project', (group) => {
|
|
|
76
73
|
assert.equal(error.status, 400, 'has the error code')
|
|
77
74
|
assert.equal(error.message, 'Invalid request', 'has the message')
|
|
78
75
|
assert.equal(error.help, 'The "options" parameter is required.', 'has the detail')
|
|
79
|
-
assert.isFalse(scope.isDone(), 'did not call the store')
|
|
80
76
|
})
|
|
81
77
|
|
|
82
78
|
test('returns an error when no token', async ({ assert }) => {
|
|
@@ -86,8 +82,6 @@ test.group('net-store project', (group) => {
|
|
|
86
82
|
options: {},
|
|
87
83
|
organization: nanoid(),
|
|
88
84
|
}
|
|
89
|
-
const path = RouteBuilder.fileMedia(message.organization, project.key)
|
|
90
|
-
const scope = nock(storeHostname).get(path).reply(200, project.toJSON())
|
|
91
85
|
const service = new ProxyService()
|
|
92
86
|
let error: Exception
|
|
93
87
|
try {
|
|
@@ -98,7 +92,6 @@ test.group('net-store project', (group) => {
|
|
|
98
92
|
}
|
|
99
93
|
assert.equal(error.message, 'Invalid request', 'has the message')
|
|
100
94
|
assert.equal(error.help, 'Set the authentication credentials.', 'has the detail')
|
|
101
|
-
assert.isFalse(scope.isDone(), 'did not call the store')
|
|
102
95
|
})
|
|
103
96
|
|
|
104
97
|
test('returns an error when no store URI', async ({ assert }) => {
|
|
@@ -108,8 +101,6 @@ test.group('net-store project', (group) => {
|
|
|
108
101
|
options: {},
|
|
109
102
|
organization: nanoid(),
|
|
110
103
|
}
|
|
111
|
-
const path = RouteBuilder.fileMedia(message.organization, project.key)
|
|
112
|
-
const scope = nock(storeHostname).get(path).reply(200, project.toJSON())
|
|
113
104
|
const service = new ProxyService()
|
|
114
105
|
let error: Exception
|
|
115
106
|
try {
|
|
@@ -121,7 +112,6 @@ test.group('net-store project', (group) => {
|
|
|
121
112
|
assert.equal(error.status, 400, 'has the error code')
|
|
122
113
|
assert.equal(error.message, 'Invalid request', 'has the message')
|
|
123
114
|
assert.equal(error.help, 'The store uri is missing.', 'has the detail')
|
|
124
|
-
assert.isFalse(scope.isDone(), 'did not call the store')
|
|
125
115
|
})
|
|
126
116
|
|
|
127
117
|
test('returns an error when invalid store URI', async ({ assert }) => {
|
|
@@ -131,8 +121,6 @@ test.group('net-store project', (group) => {
|
|
|
131
121
|
options: {},
|
|
132
122
|
organization: nanoid(),
|
|
133
123
|
}
|
|
134
|
-
const path = RouteBuilder.fileMedia(message.organization, project.key)
|
|
135
|
-
const scope = nock(storeHostname).get(path).reply(200, project.toJSON())
|
|
136
124
|
const service = new ProxyService()
|
|
137
125
|
let error: Exception
|
|
138
126
|
try {
|
|
@@ -144,7 +132,6 @@ test.group('net-store project', (group) => {
|
|
|
144
132
|
assert.equal(error.status, 400, 'has the error code')
|
|
145
133
|
assert.equal(error.message, 'Invalid request', 'has the message')
|
|
146
134
|
assert.equal(error.help, 'The store uri is invalid.', 'has the detail')
|
|
147
|
-
assert.isFalse(scope.isDone(), 'did not call the store')
|
|
148
135
|
})
|
|
149
136
|
|
|
150
137
|
test('returns an error when no project', async ({ assert }) => {
|
|
@@ -154,10 +141,10 @@ test.group('net-store project', (group) => {
|
|
|
154
141
|
options: {},
|
|
155
142
|
organization: nanoid(),
|
|
156
143
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
144
|
+
|
|
145
|
+
// Mock the HttpNode.get method to return a 404 error
|
|
146
|
+
const httpNodeStub = sandbox.stub(HttpNode.prototype, 'get').rejects(new Exception('Not found', { status: 404 }))
|
|
147
|
+
|
|
161
148
|
const service = new ProxyService()
|
|
162
149
|
let error: Exception
|
|
163
150
|
try {
|
|
@@ -168,6 +155,7 @@ test.group('net-store project', (group) => {
|
|
|
168
155
|
}
|
|
169
156
|
assert.equal(error.status, 400, 'has the error code')
|
|
170
157
|
assert.equal(error.message, 'Not found', 'has the message')
|
|
158
|
+
assert.isTrue(httpNodeStub.calledOnce, 'HTTP request was made')
|
|
171
159
|
})
|
|
172
160
|
|
|
173
161
|
test('proxies the project requests', async ({ assert }) => {
|
|
@@ -177,14 +165,23 @@ test.group('net-store project', (group) => {
|
|
|
177
165
|
options: {},
|
|
178
166
|
organization: nanoid(),
|
|
179
167
|
}
|
|
180
|
-
|
|
181
|
-
|
|
168
|
+
|
|
169
|
+
// Mock the HttpNode.get method to return a successful response
|
|
170
|
+
const mockHeaders = new (await import('../../../../src/lib/headers/Headers.js')).Headers()
|
|
171
|
+
mockHeaders.set('x-version', '1')
|
|
172
|
+
const httpNodeStub = sandbox.stub(HttpNode.prototype, 'get').resolves({
|
|
173
|
+
status: 200,
|
|
174
|
+
headers: mockHeaders,
|
|
175
|
+
body: JSON.stringify(project.toJSON()),
|
|
176
|
+
})
|
|
177
|
+
|
|
182
178
|
const service = new ProxyService()
|
|
183
179
|
const response = await service.proxyHttpProject(message, token, storeUri)
|
|
184
180
|
const exe = response.result
|
|
185
181
|
assert.typeOf(exe.started, 'number', 'has the response.started')
|
|
186
182
|
assert.typeOf(exe.ended, 'number', 'has the response.ended')
|
|
187
183
|
assert.typeOf(exe.iterations, 'array', 'has the response.iterations')
|
|
184
|
+
assert.isTrue(httpNodeStub.calledOnce, 'HTTP request was made')
|
|
188
185
|
})
|
|
189
186
|
})
|
|
190
187
|
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
FlowRequestDataEnum,
|
|
17
17
|
InMemoryCookieJar,
|
|
18
18
|
AmfNamespace as ns,
|
|
19
|
-
|
|
19
|
+
createLogger,
|
|
20
20
|
ProjectRequestRunner,
|
|
21
21
|
Environment,
|
|
22
22
|
IRunResult,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
IBasicAuthorization,
|
|
25
25
|
} from '../../../../src/index.js'
|
|
26
26
|
|
|
27
|
-
const logger =
|
|
27
|
+
const logger = createLogger()
|
|
28
28
|
|
|
29
29
|
test.group('Base runs', () => {
|
|
30
30
|
test('runs a request from a folder', async ({ assert, httpConfig }) => {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
FlowRequestDataEnum,
|
|
10
10
|
InMemoryCookieJar,
|
|
11
11
|
AmfNamespace as ns,
|
|
12
|
-
|
|
12
|
+
createLogger,
|
|
13
13
|
HttpRequestRunner,
|
|
14
14
|
IHttpRequest,
|
|
15
15
|
RequestLogKind,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
RequestAuthorizationKind,
|
|
25
25
|
} from '../../../../src/index.js'
|
|
26
26
|
|
|
27
|
-
const logger =
|
|
27
|
+
const logger = createLogger()
|
|
28
28
|
|
|
29
29
|
test.group('simple request run', () => {
|
|
30
30
|
test('sends a simple request', async ({ assert, httpConfig }) => {
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { URL } from 'url';
|
|
2
|
-
import tls from 'tls';
|
|
3
|
-
import net from 'net';
|
|
4
|
-
import http from 'http';
|
|
5
|
-
import { EventEmitter } from 'events';
|
|
6
|
-
import { IHttpRequest, HttpRequest } from '../../models/HttpRequest.js';
|
|
7
|
-
import { IRequestBaseConfig } from '../../models/RequestConfig.js';
|
|
8
|
-
import { IRequestAuthorization } from '../../models/RequestAuthorization.js';
|
|
9
|
-
import { HttpCertificate } from '../../models/ClientCertificate.js';
|
|
10
|
-
import { SentRequest } from '../../models/SentRequest.js';
|
|
11
|
-
import { Response } from '../../models/Response.js';
|
|
12
|
-
import { ResponseRedirect } from '../../models/ResponseRedirect.js';
|
|
13
|
-
import { RequestLog, IRequestLog } from '../../models/RequestLog.js';
|
|
14
|
-
import { RequestTime } from '../../models/RequestTime.js';
|
|
15
|
-
import { SerializableError } from '../../models/SerializableError.js';
|
|
16
|
-
import { ResponseAuthorization } from '../../models/ResponseAuthorization.js';
|
|
17
|
-
import { ILogger, Logger } from '../../lib/logging/Logger.js';
|
|
18
|
-
import { Headers } from '../../lib/headers/Headers.js';
|
|
19
|
-
import * as RequestUtils from './RequestUtils.js';
|
|
20
|
-
/**
|
|
21
|
-
* A note on cookies and redirects.
|
|
22
|
-
* The architecture here assumes running requests is a test environment.
|
|
23
|
-
* This means cookies are not processed by this class. This includes processing cookies during a redirect.
|
|
24
|
-
* The class does parse response cookies before a redirect and sets new cookies in the redirected request only
|
|
25
|
-
* if they match the domain + path. However, this class doesn't know anything about other cookies
|
|
26
|
-
* that the application may have for the domain after redirection.
|
|
27
|
-
*/
|
|
28
|
-
export interface HttpEngineOptions extends IRequestBaseConfig {
|
|
29
|
-
/**
|
|
30
|
-
* The authorization configuration to apply to the request.
|
|
31
|
-
*/
|
|
32
|
-
authorization?: IRequestAuthorization[];
|
|
33
|
-
/**
|
|
34
|
-
* Logger object.
|
|
35
|
-
*/
|
|
36
|
-
logger?: ILogger;
|
|
37
|
-
/**
|
|
38
|
-
* A certificate to use with the request.
|
|
39
|
-
*/
|
|
40
|
-
certificates?: HttpCertificate[];
|
|
41
|
-
}
|
|
42
|
-
export interface RequestStats {
|
|
43
|
-
firstReceiveTime?: number;
|
|
44
|
-
lastReceivedTime?: number;
|
|
45
|
-
messageStart?: number;
|
|
46
|
-
sentTime?: number;
|
|
47
|
-
connectionTime?: number;
|
|
48
|
-
lookupTime?: number;
|
|
49
|
-
connectedTime?: number;
|
|
50
|
-
secureStartTime?: number;
|
|
51
|
-
secureConnectedTime?: number;
|
|
52
|
-
startTime?: number;
|
|
53
|
-
responseTime?: number;
|
|
54
|
-
receivingTime?: number;
|
|
55
|
-
}
|
|
56
|
-
export interface ResponseErrorInit {
|
|
57
|
-
code?: number | string;
|
|
58
|
-
message?: string;
|
|
59
|
-
}
|
|
60
|
-
export interface BeforeRedirectDetail {
|
|
61
|
-
location: string;
|
|
62
|
-
returnValue: boolean;
|
|
63
|
-
}
|
|
64
|
-
export interface HeadersReceivedDetail {
|
|
65
|
-
value: string;
|
|
66
|
-
returnValue: boolean;
|
|
67
|
-
}
|
|
68
|
-
export interface IRequestAuthState {
|
|
69
|
-
method: 'ntlm';
|
|
70
|
-
state: number;
|
|
71
|
-
headers?: string;
|
|
72
|
-
challengeHeader?: string;
|
|
73
|
-
}
|
|
74
|
-
export declare interface HttpEngine {
|
|
75
|
-
/**
|
|
76
|
-
* Dispatched before a redirect occurs.
|
|
77
|
-
* The detail object on the listener's only argument has the `location` property
|
|
78
|
-
* with the new location for the request.
|
|
79
|
-
* When the `returnValue` is set to `false` the request is cancelled.
|
|
80
|
-
*/
|
|
81
|
-
on(event: 'beforeredirect', listener: (detail: BeforeRedirectDetail) => void): this;
|
|
82
|
-
on(event: 'loadstart' | 'firstbyte' | 'loadend', listener: () => void): this;
|
|
83
|
-
on(event: 'headersreceived', listener: (detail: HeadersReceivedDetail) => void): this;
|
|
84
|
-
/**
|
|
85
|
-
* Dispatched before a redirect occurs.
|
|
86
|
-
* The detail object on the listener's only argument has the `location` property
|
|
87
|
-
* with the new location for the request.
|
|
88
|
-
* When the `returnValue` is set to `false` the request is cancelled.
|
|
89
|
-
*/
|
|
90
|
-
once(event: 'beforeredirect', listener: (detail: BeforeRedirectDetail) => void): this;
|
|
91
|
-
once(event: 'loadstart' | 'firstbyte' | 'loadend', listener: () => void): this;
|
|
92
|
-
once(event: 'headersreceived', listener: (detail: HeadersReceivedDetail) => void): this;
|
|
93
|
-
}
|
|
94
|
-
export declare const mainPromiseSymbol: unique symbol;
|
|
95
|
-
/**
|
|
96
|
-
* The base class to make HTTP requests in API Client.
|
|
97
|
-
* This can be extended to support particular implementations.
|
|
98
|
-
*/
|
|
99
|
-
export declare abstract class HttpEngine extends EventEmitter {
|
|
100
|
-
request: HttpRequest;
|
|
101
|
-
opts: HttpEngineOptions;
|
|
102
|
-
logger: Logger;
|
|
103
|
-
/**
|
|
104
|
-
* The current sent request
|
|
105
|
-
*/
|
|
106
|
-
sentRequest: SentRequest;
|
|
107
|
-
redirects: ResponseRedirect[];
|
|
108
|
-
/**
|
|
109
|
-
* When true the request has been aborted.
|
|
110
|
-
*/
|
|
111
|
-
aborted: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Parsed value of the request URL.
|
|
114
|
-
*/
|
|
115
|
-
uri: URL;
|
|
116
|
-
socket?: net.Socket;
|
|
117
|
-
/**
|
|
118
|
-
* Host header can be different than registered URL because of
|
|
119
|
-
* `hosts` rules.
|
|
120
|
-
* If a rule changes host value of the URL the original URL host value
|
|
121
|
-
* is used when generating the request and not overwritten one.
|
|
122
|
-
* This way virtual hosts can be tested using hosts.
|
|
123
|
-
*/
|
|
124
|
-
hostHeader: string | undefined;
|
|
125
|
-
protected hostTestReg: RegExp;
|
|
126
|
-
/**
|
|
127
|
-
* Set when the request is redirected.
|
|
128
|
-
*/
|
|
129
|
-
redirecting: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* The response headers.
|
|
132
|
-
* The object may be empty when the response is not set.
|
|
133
|
-
*/
|
|
134
|
-
currentHeaders: Headers;
|
|
135
|
-
/**
|
|
136
|
-
* The response object build during the execution.
|
|
137
|
-
*/
|
|
138
|
-
currentResponse?: Response;
|
|
139
|
-
/**
|
|
140
|
-
* @return True if following redirects is allowed.
|
|
141
|
-
*/
|
|
142
|
-
get followRedirects(): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* The request timeout.
|
|
145
|
-
*/
|
|
146
|
-
get timeout(): number;
|
|
147
|
-
/**
|
|
148
|
-
* Keeps the raw body in a temporary buffer while processing the response.
|
|
149
|
-
*/
|
|
150
|
-
_rawBody?: Buffer;
|
|
151
|
-
stats: RequestStats;
|
|
152
|
-
auth?: IRequestAuthState;
|
|
153
|
-
protected mainResolver?: (log: IRequestLog) => void;
|
|
154
|
-
protected mainRejecter?: (err: SerializableError) => void;
|
|
155
|
-
[mainPromiseSymbol]?: Promise<IRequestLog>;
|
|
156
|
-
protected _signal?: AbortSignal;
|
|
157
|
-
/**
|
|
158
|
-
* The abort signal to set on this request.
|
|
159
|
-
* Aborts the request when the signal fires.
|
|
160
|
-
* @type {(AbortSignal | undefined)}
|
|
161
|
-
*/
|
|
162
|
-
get signal(): AbortSignal | undefined;
|
|
163
|
-
set signal(value: AbortSignal | undefined);
|
|
164
|
-
constructor(request: IHttpRequest, opts?: HttpEngineOptions);
|
|
165
|
-
/**
|
|
166
|
-
* Creates a logger object to log debug output.
|
|
167
|
-
*/
|
|
168
|
-
setupLogger(opts?: HttpEngineOptions): Logger;
|
|
169
|
-
/**
|
|
170
|
-
* Updates the `uri` property from current request URL
|
|
171
|
-
* @param value The request URL
|
|
172
|
-
*/
|
|
173
|
-
readUrl(value: string): URL;
|
|
174
|
-
/**
|
|
175
|
-
* Aborts current request.
|
|
176
|
-
* It emits `error` event
|
|
177
|
-
*/
|
|
178
|
-
abort(): void;
|
|
179
|
-
/**
|
|
180
|
-
* Handler for the `abort` event on the `AbortSignal`.
|
|
181
|
-
*/
|
|
182
|
-
protected _abortHandler(): void;
|
|
183
|
-
/**
|
|
184
|
-
* Sends the request.
|
|
185
|
-
*/
|
|
186
|
-
abstract send(): Promise<IRequestLog>;
|
|
187
|
-
/**
|
|
188
|
-
* Decompresses received body if `content-encoding` header is set.
|
|
189
|
-
*
|
|
190
|
-
* @param body A body buffer to decompress.
|
|
191
|
-
* @return Promise resolved to parsed body
|
|
192
|
-
*/
|
|
193
|
-
decompress(body?: Buffer): Promise<Buffer | undefined>;
|
|
194
|
-
/**
|
|
195
|
-
* Decompress body with Inflate.
|
|
196
|
-
* @param body Received response payload
|
|
197
|
-
* @return Promise resolved to decompressed buffer.
|
|
198
|
-
*/
|
|
199
|
-
inflate(body: Buffer): Promise<Buffer>;
|
|
200
|
-
/**
|
|
201
|
-
* Decompress body with ZLib.
|
|
202
|
-
* @param body Received response payload
|
|
203
|
-
* @return Promise resolved to decompressed buffer.
|
|
204
|
-
*/
|
|
205
|
-
gunzip(body: Buffer): Promise<Buffer>;
|
|
206
|
-
/**
|
|
207
|
-
* Decompress Brotli.
|
|
208
|
-
* @param body Received response payload
|
|
209
|
-
* @return Promise resolved to decompressed buffer.
|
|
210
|
-
*/
|
|
211
|
-
brotli(body: Buffer): Promise<Buffer>;
|
|
212
|
-
/**
|
|
213
|
-
* Prepares headers list to be send to the remote machine.
|
|
214
|
-
* If `defaultHeaders` option is set then it adds `user-agent` and `accept`
|
|
215
|
-
* headers.
|
|
216
|
-
* @param headers Parsed headers
|
|
217
|
-
* @param withPayload Whether the request should send a body message
|
|
218
|
-
*/
|
|
219
|
-
prepareHeaders(headers: Headers, withPayload?: boolean): void;
|
|
220
|
-
/**
|
|
221
|
-
* Cleans the state after finished.
|
|
222
|
-
*/
|
|
223
|
-
_cleanUp(): void;
|
|
224
|
-
/**
|
|
225
|
-
* Cleans up the state for redirect.
|
|
226
|
-
*/
|
|
227
|
-
_cleanUpRedirect(): void;
|
|
228
|
-
/**
|
|
229
|
-
* Reports response when redirected.
|
|
230
|
-
* @param status Received status code
|
|
231
|
-
* @return True if the request has been redirected.
|
|
232
|
-
*/
|
|
233
|
-
_reportRedirect(status: number): boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Creates a response and adds it to the redirects list and redirects
|
|
236
|
-
* the request to the new location.
|
|
237
|
-
*/
|
|
238
|
-
_redirectRequest(options: RequestUtils.RedirectOptions): Promise<void>;
|
|
239
|
-
/**
|
|
240
|
-
* @param location The redirect location.
|
|
241
|
-
* @return Redirect response object
|
|
242
|
-
*/
|
|
243
|
-
_createRedirectResponse(location: string): Promise<ResponseRedirect>;
|
|
244
|
-
/**
|
|
245
|
-
* Creates a response object
|
|
246
|
-
*
|
|
247
|
-
* @return A response object.
|
|
248
|
-
*/
|
|
249
|
-
_createResponse(): Promise<Response | undefined>;
|
|
250
|
-
/**
|
|
251
|
-
* Finishes the response with error message.
|
|
252
|
-
*/
|
|
253
|
-
_errorRequest(opts: ResponseErrorInit): void;
|
|
254
|
-
/**
|
|
255
|
-
* Generates authorization info object from response.
|
|
256
|
-
*/
|
|
257
|
-
_getAuth(): ResponseAuthorization;
|
|
258
|
-
/**
|
|
259
|
-
* Generate response object and publish it to the listeners.
|
|
260
|
-
*/
|
|
261
|
-
_publishResponse(): Promise<void>;
|
|
262
|
-
/**
|
|
263
|
-
* Creates HAR 1.2 timings object from stats.
|
|
264
|
-
* @param stats Timings object
|
|
265
|
-
*/
|
|
266
|
-
_computeStats(stats: RequestStats): RequestTime;
|
|
267
|
-
/**
|
|
268
|
-
* Handles cookie exchange when redirecting the request.
|
|
269
|
-
* @param responseCookies Cookies received in the response
|
|
270
|
-
* @param location Redirect destination
|
|
271
|
-
*/
|
|
272
|
-
_processRedirectCookies(responseCookies: string, location: string): void;
|
|
273
|
-
/**
|
|
274
|
-
* Checks certificate identity using TLS api.
|
|
275
|
-
*
|
|
276
|
-
* @param host Request host name
|
|
277
|
-
* @param cert TLS certificate info object
|
|
278
|
-
*/
|
|
279
|
-
_checkServerIdentity(host: string, cert: tls.PeerCertificate): Error | undefined;
|
|
280
|
-
/**
|
|
281
|
-
* Clears event listeners of the socket object,
|
|
282
|
-
*/
|
|
283
|
-
_clearSocketEventListeners(): void;
|
|
284
|
-
/**
|
|
285
|
-
* Adds client certificate to the request configuration options.
|
|
286
|
-
*
|
|
287
|
-
* @param certificate List of certificate configurations.
|
|
288
|
-
* @param options Request options. Cert agent options are added to this object.
|
|
289
|
-
*/
|
|
290
|
-
_addClientCertificate(certificate: HttpCertificate, options: tls.ConnectionOptions): void;
|
|
291
|
-
/**
|
|
292
|
-
* @return Proxy authorization header value, when defined.
|
|
293
|
-
*/
|
|
294
|
-
_proxyAuthHeader(): string | undefined;
|
|
295
|
-
/**
|
|
296
|
-
* Reads the raw headers from the node response and transforms them into the internal headers.
|
|
297
|
-
*/
|
|
298
|
-
computeResponseHeaders(res: http.IncomingMessage): Headers;
|
|
299
|
-
/**
|
|
300
|
-
* Called with the `send()` function to initialize the main promise returned by the send function.
|
|
301
|
-
* The send function returns a promise that is resolved when the request finish.
|
|
302
|
-
*/
|
|
303
|
-
protected wrapExecution(): Promise<IRequestLog>;
|
|
304
|
-
/**
|
|
305
|
-
* Called by the request finalizer or error finalized to report the response.
|
|
306
|
-
*
|
|
307
|
-
* @param log Either the request execution log or an error.
|
|
308
|
-
*/
|
|
309
|
-
protected finalizeRequest(log: RequestLog | SerializableError): void;
|
|
310
|
-
}
|
|
311
|
-
//# sourceMappingURL=HttpEngine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|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