@api-client/core 0.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.md +69 -0
- package/amf-models/dialects/ApiProjectVocabulary.yaml +233 -0
- package/amf-models/dialects/Environment.yaml +38 -0
- package/amf-models/dialects/HttpProject.yaml +55 -0
- package/amf-models/dialects/License.yaml +31 -0
- package/amf-models/dialects/ProjectFolder.yaml +43 -0
- package/amf-models/dialects/ProjectItem.yaml +22 -0
- package/amf-models/dialects/ProjectRequest.yaml +23 -0
- package/amf-models/dialects/ProjectSchema.yaml +36 -0
- package/amf-models/dialects/Property.yaml +43 -0
- package/amf-models/dialects/Provider.yaml +32 -0
- package/amf-models/dialects/Server.yaml +31 -0
- package/amf-models/dialects/Thing.yaml +28 -0
- package/build/browser.d.ts +79 -0
- package/build/browser.js +92 -0
- package/build/browser.js.map +1 -0
- package/build/index.d.ts +89 -0
- package/build/index.js +108 -0
- package/build/index.js.map +1 -0
- package/build/src/data/DataReader.d.ts +10 -0
- package/build/src/data/DataReader.js +4 -0
- package/build/src/data/DataReader.js.map +1 -0
- package/build/src/data/DataUtils.d.ts +40 -0
- package/build/src/data/DataUtils.js +106 -0
- package/build/src/data/DataUtils.js.map +1 -0
- package/build/src/data/JmesparthReader.d.ts +12 -0
- package/build/src/data/JmesparthReader.js +27 -0
- package/build/src/data/JmesparthReader.js.map +1 -0
- package/build/src/data/Json2Xml.d.ts +84 -0
- package/build/src/data/Json2Xml.js +185 -0
- package/build/src/data/Json2Xml.js.map +1 -0
- package/build/src/data/JsonReader.d.ts +8 -0
- package/build/src/data/JsonReader.js +40 -0
- package/build/src/data/JsonReader.js.map +1 -0
- package/build/src/data/PayloadPointer.d.ts +19 -0
- package/build/src/data/PayloadPointer.js +46 -0
- package/build/src/data/PayloadPointer.js.map +1 -0
- package/build/src/data/RequestDataExtractor.d.ts +44 -0
- package/build/src/data/RequestDataExtractor.js +126 -0
- package/build/src/data/RequestDataExtractor.js.map +1 -0
- package/build/src/data/UrlEncodedReader.d.ts +11 -0
- package/build/src/data/UrlEncodedReader.js +20 -0
- package/build/src/data/UrlEncodedReader.js.map +1 -0
- package/build/src/data/XmlReader.d.ts +14 -0
- package/build/src/data/XmlReader.js +97 -0
- package/build/src/data/XmlReader.js.map +1 -0
- package/build/src/events/BaseEvents.d.ts +208 -0
- package/build/src/events/BaseEvents.js +117 -0
- package/build/src/events/BaseEvents.js.map +1 -0
- package/build/src/events/CustomEvent.d.ts +2 -0
- package/build/src/events/CustomEvent.js +24 -0
- package/build/src/events/CustomEvent.js.map +1 -0
- package/build/src/events/EventTypes.d.ts +91 -0
- package/build/src/events/EventTypes.js +19 -0
- package/build/src/events/EventTypes.js.map +1 -0
- package/build/src/events/Events.d.ts +20 -0
- package/build/src/events/Events.js +19 -0
- package/build/src/events/Events.js.map +1 -0
- package/build/src/events/authorization/AuthorizationEventTypes.d.ts +22 -0
- package/build/src/events/authorization/AuthorizationEventTypes.js +23 -0
- package/build/src/events/authorization/AuthorizationEventTypes.js.map +1 -0
- package/build/src/events/authorization/AuthorizationEvents.d.ts +34 -0
- package/build/src/events/authorization/AuthorizationEvents.js +55 -0
- package/build/src/events/authorization/AuthorizationEvents.js.map +1 -0
- package/build/src/events/cookies/CookieEventTypes.d.ts +13 -0
- package/build/src/events/cookies/CookieEventTypes.js +14 -0
- package/build/src/events/cookies/CookieEventTypes.js.map +1 -0
- package/build/src/events/cookies/CookieEvents.d.ts +90 -0
- package/build/src/events/cookies/CookieEvents.js +126 -0
- package/build/src/events/cookies/CookieEvents.js.map +1 -0
- package/build/src/events/encryption/EncryptionEventTypes.d.ts +4 -0
- package/build/src/events/encryption/EncryptionEventTypes.js +5 -0
- package/build/src/events/encryption/EncryptionEventTypes.js.map +1 -0
- package/build/src/events/encryption/EncryptionEvents.d.ts +36 -0
- package/build/src/events/encryption/EncryptionEvents.js +35 -0
- package/build/src/events/encryption/EncryptionEvents.js.map +1 -0
- package/build/src/events/environment/EnvironmentEventTypes.d.ts +3 -0
- package/build/src/events/environment/EnvironmentEventTypes.js +4 -0
- package/build/src/events/environment/EnvironmentEventTypes.js.map +1 -0
- package/build/src/events/environment/EnvironmentEvents.d.ts +15 -0
- package/build/src/events/environment/EnvironmentEvents.js +19 -0
- package/build/src/events/environment/EnvironmentEvents.js.map +1 -0
- package/build/src/events/models/ClientCertificateEvents.d.ts +56 -0
- package/build/src/events/models/ClientCertificateEvents.js +80 -0
- package/build/src/events/models/ClientCertificateEvents.js.map +1 -0
- package/build/src/events/models/ModelEventTypes.d.ts +47 -0
- package/build/src/events/models/ModelEventTypes.js +48 -0
- package/build/src/events/models/ModelEventTypes.js.map +1 -0
- package/build/src/events/models/ModelEvents.d.ts +6 -0
- package/build/src/events/models/ModelEvents.js +7 -0
- package/build/src/events/models/ModelEvents.js.map +1 -0
- package/build/src/events/models/ProjectEvents.d.ts +221 -0
- package/build/src/events/models/ProjectEvents.js +254 -0
- package/build/src/events/models/ProjectEvents.js.map +1 -0
- package/build/src/events/process/ProcessEventTypes.d.ts +5 -0
- package/build/src/events/process/ProcessEventTypes.js +6 -0
- package/build/src/events/process/ProcessEventTypes.js.map +1 -0
- package/build/src/events/process/ProcessEvents.d.ts +42 -0
- package/build/src/events/process/ProcessEvents.js +59 -0
- package/build/src/events/process/ProcessEvents.js.map +1 -0
- package/build/src/events/reporting/ReportingEventTypes.d.ts +3 -0
- package/build/src/events/reporting/ReportingEventTypes.js +4 -0
- package/build/src/events/reporting/ReportingEventTypes.js.map +1 -0
- package/build/src/events/reporting/ReportingEvents.d.ts +16 -0
- package/build/src/events/reporting/ReportingEvents.js +22 -0
- package/build/src/events/reporting/ReportingEvents.js.map +1 -0
- package/build/src/events/telemetry/TelemetryEventTypes.d.ts +10 -0
- package/build/src/events/telemetry/TelemetryEventTypes.js +11 -0
- package/build/src/events/telemetry/TelemetryEventTypes.js.map +1 -0
- package/build/src/events/telemetry/TelemetryEvents.d.ts +89 -0
- package/build/src/events/telemetry/TelemetryEvents.js +109 -0
- package/build/src/events/telemetry/TelemetryEvents.js.map +1 -0
- package/build/src/lib/cookies/Cookie.d.ts +123 -0
- package/build/src/lib/cookies/Cookie.js +257 -0
- package/build/src/lib/cookies/Cookie.js.map +1 -0
- package/build/src/lib/cookies/Cookies.d.ts +90 -0
- package/build/src/lib/cookies/Cookies.js +310 -0
- package/build/src/lib/cookies/Cookies.js.map +1 -0
- package/build/src/lib/cookies/Utils.d.ts +47 -0
- package/build/src/lib/cookies/Utils.js +163 -0
- package/build/src/lib/cookies/Utils.js.map +1 -0
- package/build/src/lib/headers/Headers.d.ts +67 -0
- package/build/src/lib/headers/Headers.js +202 -0
- package/build/src/lib/headers/Headers.js.map +1 -0
- package/build/src/lib/logging/DefaultLogger.d.ts +8 -0
- package/build/src/lib/logging/DefaultLogger.js +19 -0
- package/build/src/lib/logging/DefaultLogger.js.map +1 -0
- package/build/src/lib/logging/DummyLogger.d.ts +8 -0
- package/build/src/lib/logging/DummyLogger.js +21 -0
- package/build/src/lib/logging/DummyLogger.js.map +1 -0
- package/build/src/lib/logging/Logger.d.ts +14 -0
- package/build/src/lib/logging/Logger.js +3 -0
- package/build/src/lib/logging/Logger.js.map +1 -0
- package/build/src/lib/transformers/PayloadSerializer.d.ts +145 -0
- package/build/src/lib/transformers/PayloadSerializer.js +264 -0
- package/build/src/lib/transformers/PayloadSerializer.js.map +1 -0
- package/build/src/lib/transformers/Utils.d.ts +7 -0
- package/build/src/lib/transformers/Utils.js +19 -0
- package/build/src/lib/transformers/Utils.js.map +1 -0
- package/build/src/lib/uuid.d.ts +8 -0
- package/build/src/lib/uuid.js +38 -0
- package/build/src/lib/uuid.js.map +1 -0
- package/build/src/mocking/LegacyInterfaces.d.ts +47 -0
- package/build/src/mocking/LegacyInterfaces.js +2 -0
- package/build/src/mocking/LegacyInterfaces.js.map +1 -0
- package/build/src/mocking/LegacyMock.d.ts +24 -0
- package/build/src/mocking/LegacyMock.js +34 -0
- package/build/src/mocking/LegacyMock.js.map +1 -0
- package/build/src/mocking/legacy/Authorization.d.ts +19 -0
- package/build/src/mocking/legacy/Authorization.js +34 -0
- package/build/src/mocking/legacy/Authorization.js.map +1 -0
- package/build/src/mocking/legacy/Certificates.d.ts +54 -0
- package/build/src/mocking/legacy/Certificates.js +125 -0
- package/build/src/mocking/legacy/Certificates.js.map +1 -0
- package/build/src/mocking/legacy/Cookies.d.ts +19 -0
- package/build/src/mocking/legacy/Cookies.js +46 -0
- package/build/src/mocking/legacy/Cookies.js.map +1 -0
- package/build/src/mocking/legacy/HostRules.d.ts +20 -0
- package/build/src/mocking/legacy/HostRules.js +38 -0
- package/build/src/mocking/legacy/HostRules.js.map +1 -0
- package/build/src/mocking/legacy/Http.d.ts +78 -0
- package/build/src/mocking/legacy/Http.js +192 -0
- package/build/src/mocking/legacy/Http.js.map +1 -0
- package/build/src/mocking/legacy/HttpResponse.d.ts +22 -0
- package/build/src/mocking/legacy/HttpResponse.js +98 -0
- package/build/src/mocking/legacy/HttpResponse.js.map +1 -0
- package/build/src/mocking/legacy/RestApi.d.ts +13 -0
- package/build/src/mocking/legacy/RestApi.js +61 -0
- package/build/src/mocking/legacy/RestApi.js.map +1 -0
- package/build/src/mocking/legacy/Urls.d.ts +19 -0
- package/build/src/mocking/legacy/Urls.js +39 -0
- package/build/src/mocking/legacy/Urls.js.map +1 -0
- package/build/src/mocking/legacy/Variables.d.ts +17 -0
- package/build/src/mocking/legacy/Variables.js +50 -0
- package/build/src/mocking/legacy/Variables.js.map +1 -0
- package/build/src/models/ArcResponse.d.ts +63 -0
- package/build/src/models/ArcResponse.js +142 -0
- package/build/src/models/ArcResponse.js.map +1 -0
- package/build/src/models/Authorization.d.ts +452 -0
- package/build/src/models/Authorization.js +2 -0
- package/build/src/models/Authorization.js.map +1 -0
- package/build/src/models/AuthorizationData.d.ts +27 -0
- package/build/src/models/AuthorizationData.js +52 -0
- package/build/src/models/AuthorizationData.js.map +1 -0
- package/build/src/models/Backend.d.ts +71 -0
- package/build/src/models/Backend.js +2 -0
- package/build/src/models/Backend.js.map +1 -0
- package/build/src/models/ClientCertificate.d.ts +65 -0
- package/build/src/models/ClientCertificate.js +2 -0
- package/build/src/models/ClientCertificate.js.map +1 -0
- package/build/src/models/Environment.d.ts +125 -0
- package/build/src/models/Environment.js +215 -0
- package/build/src/models/Environment.js.map +1 -0
- package/build/src/models/ErrorResponse.d.ts +35 -0
- package/build/src/models/ErrorResponse.js +88 -0
- package/build/src/models/ErrorResponse.js.map +1 -0
- package/build/src/models/HistoryIndex.d.ts +43 -0
- package/build/src/models/HistoryIndex.js +53 -0
- package/build/src/models/HistoryIndex.js.map +1 -0
- package/build/src/models/HistoryRequest.d.ts +13 -0
- package/build/src/models/HistoryRequest.js +25 -0
- package/build/src/models/HistoryRequest.js.map +1 -0
- package/build/src/models/HostRule.d.ts +78 -0
- package/build/src/models/HostRule.js +134 -0
- package/build/src/models/HostRule.js.map +1 -0
- package/build/src/models/HttpCookie.d.ts +123 -0
- package/build/src/models/HttpCookie.js +209 -0
- package/build/src/models/HttpCookie.js.map +1 -0
- package/build/src/models/HttpProject.d.ts +455 -0
- package/build/src/models/HttpProject.js +987 -0
- package/build/src/models/HttpProject.js.map +1 -0
- package/build/src/models/HttpProjectListItem.d.ts +23 -0
- package/build/src/models/HttpProjectListItem.js +2 -0
- package/build/src/models/HttpProjectListItem.js.map +1 -0
- package/build/src/models/HttpRequest.d.ts +69 -0
- package/build/src/models/HttpRequest.js +92 -0
- package/build/src/models/HttpRequest.js.map +1 -0
- package/build/src/models/HttpResponse.d.ts +59 -0
- package/build/src/models/HttpResponse.js +116 -0
- package/build/src/models/HttpResponse.js.map +1 -0
- package/build/src/models/License.d.ts +52 -0
- package/build/src/models/License.js +91 -0
- package/build/src/models/License.js.map +1 -0
- package/build/src/models/ProjectDefinitionProperty.d.ts +34 -0
- package/build/src/models/ProjectDefinitionProperty.js +2 -0
- package/build/src/models/ProjectDefinitionProperty.js.map +1 -0
- package/build/src/models/ProjectFolder.d.ts +213 -0
- package/build/src/models/ProjectFolder.js +314 -0
- package/build/src/models/ProjectFolder.js.map +1 -0
- package/build/src/models/ProjectItem.d.ts +59 -0
- package/build/src/models/ProjectItem.js +119 -0
- package/build/src/models/ProjectItem.js.map +1 -0
- package/build/src/models/ProjectParent.d.ts +58 -0
- package/build/src/models/ProjectParent.js +77 -0
- package/build/src/models/ProjectParent.js.map +1 -0
- package/build/src/models/ProjectRequest.d.ts +118 -0
- package/build/src/models/ProjectRequest.js +238 -0
- package/build/src/models/ProjectRequest.js.map +1 -0
- package/build/src/models/ProjectSchema.d.ts +105 -0
- package/build/src/models/ProjectSchema.js +156 -0
- package/build/src/models/ProjectSchema.js.map +1 -0
- package/build/src/models/Property.d.ts +130 -0
- package/build/src/models/Property.js +392 -0
- package/build/src/models/Property.js.map +1 -0
- package/build/src/models/Provider.d.ts +52 -0
- package/build/src/models/Provider.js +75 -0
- package/build/src/models/Provider.js.map +1 -0
- package/build/src/models/Request.d.ts +157 -0
- package/build/src/models/Request.js +398 -0
- package/build/src/models/Request.js.map +1 -0
- package/build/src/models/RequestActions.d.ts +67 -0
- package/build/src/models/RequestActions.js +116 -0
- package/build/src/models/RequestActions.js.map +1 -0
- package/build/src/models/RequestAuthorization.d.ts +59 -0
- package/build/src/models/RequestAuthorization.js +85 -0
- package/build/src/models/RequestAuthorization.js.map +1 -0
- package/build/src/models/RequestConfig.d.ts +161 -0
- package/build/src/models/RequestConfig.js +246 -0
- package/build/src/models/RequestConfig.js.map +1 -0
- package/build/src/models/RequestLog.d.ts +70 -0
- package/build/src/models/RequestLog.js +133 -0
- package/build/src/models/RequestLog.js.map +1 -0
- package/build/src/models/RequestTime.d.ts +36 -0
- package/build/src/models/RequestTime.js +91 -0
- package/build/src/models/RequestTime.js.map +1 -0
- package/build/src/models/RequestUiMeta.d.ts +169 -0
- package/build/src/models/RequestUiMeta.js +120 -0
- package/build/src/models/RequestUiMeta.js.map +1 -0
- package/build/src/models/RequestsSize.d.ts +34 -0
- package/build/src/models/RequestsSize.js +52 -0
- package/build/src/models/RequestsSize.js.map +1 -0
- package/build/src/models/ResponseAuthorization.d.ts +54 -0
- package/build/src/models/ResponseAuthorization.js +82 -0
- package/build/src/models/ResponseAuthorization.js.map +1 -0
- package/build/src/models/ResponseRedirect.d.ts +73 -0
- package/build/src/models/ResponseRedirect.js +126 -0
- package/build/src/models/ResponseRedirect.js.map +1 -0
- package/build/src/models/RevisionInfo.d.ts +36 -0
- package/build/src/models/RevisionInfo.js +2 -0
- package/build/src/models/RevisionInfo.js.map +1 -0
- package/build/src/models/SentRequest.d.ts +62 -0
- package/build/src/models/SentRequest.js +93 -0
- package/build/src/models/SentRequest.js.map +1 -0
- package/build/src/models/SerializablePayload.d.ts +30 -0
- package/build/src/models/SerializablePayload.js +66 -0
- package/build/src/models/SerializablePayload.js.map +1 -0
- package/build/src/models/Server.d.ts +76 -0
- package/build/src/models/Server.js +121 -0
- package/build/src/models/Server.js.map +1 -0
- package/build/src/models/Thing.d.ts +56 -0
- package/build/src/models/Thing.js +85 -0
- package/build/src/models/Thing.js.map +1 -0
- package/build/src/models/Url.d.ts +51 -0
- package/build/src/models/Url.js +71 -0
- package/build/src/models/Url.js.map +1 -0
- package/build/src/models/User.d.ts +110 -0
- package/build/src/models/User.js +2 -0
- package/build/src/models/User.js.map +1 -0
- package/build/src/models/WebApi.d.ts +119 -0
- package/build/src/models/WebApi.js +175 -0
- package/build/src/models/WebApi.js.map +1 -0
- package/build/src/models/WebApiIndex.d.ts +70 -0
- package/build/src/models/WebApiIndex.js +72 -0
- package/build/src/models/WebApiIndex.js.map +1 -0
- package/build/src/models/Workspace.d.ts +98 -0
- package/build/src/models/Workspace.js +139 -0
- package/build/src/models/Workspace.js.map +1 -0
- package/build/src/models/actions/Action.d.ts +75 -0
- package/build/src/models/actions/Action.js +188 -0
- package/build/src/models/actions/Action.js.map +1 -0
- package/build/src/models/actions/ActionView.d.ts +15 -0
- package/build/src/models/actions/ActionView.js +33 -0
- package/build/src/models/actions/ActionView.js.map +1 -0
- package/build/src/models/actions/Condition.d.ts +81 -0
- package/build/src/models/actions/Condition.js +185 -0
- package/build/src/models/actions/Condition.js.map +1 -0
- package/build/src/models/actions/ConditionView.d.ts +17 -0
- package/build/src/models/actions/ConditionView.js +34 -0
- package/build/src/models/actions/ConditionView.js.map +1 -0
- package/build/src/models/actions/Enums.d.ts +26 -0
- package/build/src/models/actions/Enums.js +31 -0
- package/build/src/models/actions/Enums.js.map +1 -0
- package/build/src/models/actions/RunnableAction.d.ts +59 -0
- package/build/src/models/actions/RunnableAction.js +106 -0
- package/build/src/models/actions/RunnableAction.js.map +1 -0
- package/build/src/models/actions/runnable/DeleteCookieAction.d.ts +44 -0
- package/build/src/models/actions/runnable/DeleteCookieAction.js +92 -0
- package/build/src/models/actions/runnable/DeleteCookieAction.js.map +1 -0
- package/build/src/models/actions/runnable/Runnable.d.ts +8 -0
- package/build/src/models/actions/runnable/Runnable.js +4 -0
- package/build/src/models/actions/runnable/Runnable.js.map +1 -0
- package/build/src/models/actions/runnable/SetCookieAction.d.ts +87 -0
- package/build/src/models/actions/runnable/SetCookieAction.js +176 -0
- package/build/src/models/actions/runnable/SetCookieAction.js.map +1 -0
- package/build/src/models/actions/runnable/SetVariableAction.d.ts +31 -0
- package/build/src/models/actions/runnable/SetVariableAction.js +63 -0
- package/build/src/models/actions/runnable/SetVariableAction.js.map +1 -0
- package/build/src/models/actions/runnable/index.d.ts +7 -0
- package/build/src/models/actions/runnable/index.js +2 -0
- package/build/src/models/actions/runnable/index.js.map +1 -0
- package/build/src/models/legacy/DataExport.d.ts +168 -0
- package/build/src/models/legacy/DataExport.js +2 -0
- package/build/src/models/legacy/DataExport.js.map +1 -0
- package/build/src/models/legacy/Normalizer.d.ts +12 -0
- package/build/src/models/legacy/Normalizer.js +104 -0
- package/build/src/models/legacy/Normalizer.js.map +1 -0
- package/build/src/models/legacy/actions/Actions.d.ts +257 -0
- package/build/src/models/legacy/actions/Actions.js +2 -0
- package/build/src/models/legacy/actions/Actions.js.map +1 -0
- package/build/src/models/legacy/authorization/Authorization.d.ts +540 -0
- package/build/src/models/legacy/authorization/Authorization.js +3 -0
- package/build/src/models/legacy/authorization/Authorization.js.map +1 -0
- package/build/src/models/legacy/models/ApiTypes.d.ts +192 -0
- package/build/src/models/legacy/models/ApiTypes.js +2 -0
- package/build/src/models/legacy/models/ApiTypes.js.map +1 -0
- package/build/src/models/legacy/models/ArcLegacyProject.d.ts +37 -0
- package/build/src/models/legacy/models/ArcLegacyProject.js +2 -0
- package/build/src/models/legacy/models/ArcLegacyProject.js.map +1 -0
- package/build/src/models/legacy/models/AuthData.d.ts +14 -0
- package/build/src/models/legacy/models/AuthData.js +2 -0
- package/build/src/models/legacy/models/AuthData.js.map +1 -0
- package/build/src/models/legacy/models/ClientCertificate.d.ts +89 -0
- package/build/src/models/legacy/models/ClientCertificate.js +2 -0
- package/build/src/models/legacy/models/ClientCertificate.js.map +1 -0
- package/build/src/models/legacy/models/Cookies.d.ts +52 -0
- package/build/src/models/legacy/models/Cookies.js +2 -0
- package/build/src/models/legacy/models/Cookies.js.map +1 -0
- package/build/src/models/legacy/models/HostRule.d.ts +33 -0
- package/build/src/models/legacy/models/HostRule.js +2 -0
- package/build/src/models/legacy/models/HostRule.js.map +1 -0
- package/build/src/models/legacy/models/RestApi.d.ts +47 -0
- package/build/src/models/legacy/models/RestApi.js +2 -0
- package/build/src/models/legacy/models/RestApi.js.map +1 -0
- package/build/src/models/legacy/models/UrlHistory.d.ts +32 -0
- package/build/src/models/legacy/models/UrlHistory.js +2 -0
- package/build/src/models/legacy/models/UrlHistory.js.map +1 -0
- package/build/src/models/legacy/models/Variable.d.ts +38 -0
- package/build/src/models/legacy/models/Variable.js +2 -0
- package/build/src/models/legacy/models/Variable.js.map +1 -0
- package/build/src/models/legacy/request/ArcRequest.d.ts +387 -0
- package/build/src/models/legacy/request/ArcRequest.js +2 -0
- package/build/src/models/legacy/request/ArcRequest.js.map +1 -0
- package/build/src/models/legacy/request/ArcResponse.d.ts +166 -0
- package/build/src/models/legacy/request/ArcResponse.js +2 -0
- package/build/src/models/legacy/request/ArcResponse.js.map +1 -0
- package/build/src/models/legacy/request/HistoryData.d.ts +45 -0
- package/build/src/models/legacy/request/HistoryData.js +2 -0
- package/build/src/models/legacy/request/HistoryData.js.map +1 -0
- package/build/src/models/legacy/request/Legacy.d.ts +43 -0
- package/build/src/models/legacy/request/Legacy.js +2 -0
- package/build/src/models/legacy/request/Legacy.js.map +1 -0
- package/build/src/models/legacy/request/RequestBody.d.ts +82 -0
- package/build/src/models/legacy/request/RequestBody.js +2 -0
- package/build/src/models/legacy/request/RequestBody.js.map +1 -0
- package/build/src/models/transformers/ArcDexieTransformer.d.ts +108 -0
- package/build/src/models/transformers/ArcDexieTransformer.js +252 -0
- package/build/src/models/transformers/ArcDexieTransformer.js.map +1 -0
- package/build/src/models/transformers/ArcLegacyNormalizer.d.ts +42 -0
- package/build/src/models/transformers/ArcLegacyNormalizer.js +80 -0
- package/build/src/models/transformers/ArcLegacyNormalizer.js.map +1 -0
- package/build/src/models/transformers/ArcLegacyTransformer.d.ts +85 -0
- package/build/src/models/transformers/ArcLegacyTransformer.js +150 -0
- package/build/src/models/transformers/ArcLegacyTransformer.js.map +1 -0
- package/build/src/models/transformers/ArcPouchTransformer.d.ts +46 -0
- package/build/src/models/transformers/ArcPouchTransformer.js +170 -0
- package/build/src/models/transformers/ArcPouchTransformer.js.map +1 -0
- package/build/src/models/transformers/BaseTransformer.d.ts +48 -0
- package/build/src/models/transformers/BaseTransformer.js +104 -0
- package/build/src/models/transformers/BaseTransformer.js.map +1 -0
- package/build/src/models/transformers/ImportUtils.d.ts +44 -0
- package/build/src/models/transformers/ImportUtils.js +135 -0
- package/build/src/models/transformers/ImportUtils.js.map +1 -0
- package/build/src/models/transformers/LegacyDataExportToApiProject.d.ts +15 -0
- package/build/src/models/transformers/LegacyDataExportToApiProject.js +70 -0
- package/build/src/models/transformers/LegacyDataExportToApiProject.js.map +1 -0
- package/build/src/models/transformers/LegacyExportProcessor.d.ts +47 -0
- package/build/src/models/transformers/LegacyExportProcessor.js +219 -0
- package/build/src/models/transformers/LegacyExportProcessor.js.map +1 -0
- package/build/src/models/transformers/PostmanBackupTransformer.d.ts +96 -0
- package/build/src/models/transformers/PostmanBackupTransformer.js +188 -0
- package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -0
- package/build/src/models/transformers/PostmanDataTransformer.d.ts +9 -0
- package/build/src/models/transformers/PostmanDataTransformer.js +46 -0
- package/build/src/models/transformers/PostmanDataTransformer.js.map +1 -0
- package/build/src/models/transformers/PostmanTransformer.d.ts +49 -0
- package/build/src/models/transformers/PostmanTransformer.js +90 -0
- package/build/src/models/transformers/PostmanTransformer.js.map +1 -0
- package/build/src/models/transformers/PostmanV21Transformer.d.ts +125 -0
- package/build/src/models/transformers/PostmanV21Transformer.js +195 -0
- package/build/src/models/transformers/PostmanV21Transformer.js.map +1 -0
- package/build/src/models/transformers/PostmanV2Transformer.d.ts +123 -0
- package/build/src/models/transformers/PostmanV2Transformer.js +195 -0
- package/build/src/models/transformers/PostmanV2Transformer.js.map +1 -0
- package/build/src/models/transformers/har.d.ts +857 -0
- package/build/src/models/transformers/har.js +2 -0
- package/build/src/models/transformers/har.js.map +1 -0
- package/build/src/runtime/actions/ActionRunner.d.ts +17 -0
- package/build/src/runtime/actions/ActionRunner.js +74 -0
- package/build/src/runtime/actions/ActionRunner.js.map +1 -0
- package/build/src/runtime/actions/ConditionRunner.d.ts +74 -0
- package/build/src/runtime/actions/ConditionRunner.js +185 -0
- package/build/src/runtime/actions/ConditionRunner.js.map +1 -0
- package/build/src/runtime/actions/RunnableCondition.d.ts +28 -0
- package/build/src/runtime/actions/RunnableCondition.js +51 -0
- package/build/src/runtime/actions/RunnableCondition.js.map +1 -0
- package/build/src/runtime/actions/runnable/ActionRunnable.d.ts +13 -0
- package/build/src/runtime/actions/runnable/ActionRunnable.js +13 -0
- package/build/src/runtime/actions/runnable/ActionRunnable.js.map +1 -0
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.d.ts +7 -0
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js +36 -0
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js.map +1 -0
- package/build/src/runtime/actions/runnable/SetCookieRunnable.d.ts +10 -0
- package/build/src/runtime/actions/runnable/SetCookieRunnable.js +89 -0
- package/build/src/runtime/actions/runnable/SetCookieRunnable.js.map +1 -0
- package/build/src/runtime/actions/runnable/SetVariableRunnable.d.ts +10 -0
- package/build/src/runtime/actions/runnable/SetVariableRunnable.js +49 -0
- package/build/src/runtime/actions/runnable/SetVariableRunnable.js.map +1 -0
- package/build/src/runtime/http-engine/ArcEngine.d.ts +218 -0
- package/build/src/runtime/http-engine/ArcEngine.js +1034 -0
- package/build/src/runtime/http-engine/ArcEngine.js.map +1 -0
- package/build/src/runtime/http-engine/Errors.d.ts +10 -0
- package/build/src/runtime/http-engine/Errors.js +14 -0
- package/build/src/runtime/http-engine/Errors.js.map +1 -0
- package/build/src/runtime/http-engine/FormData.d.ts +16 -0
- package/build/src/runtime/http-engine/FormData.js +72 -0
- package/build/src/runtime/http-engine/FormData.js.map +1 -0
- package/build/src/runtime/http-engine/HttpEngine.d.ts +294 -0
- package/build/src/runtime/http-engine/HttpEngine.js +736 -0
- package/build/src/runtime/http-engine/HttpEngine.js.map +1 -0
- package/build/src/runtime/http-engine/HttpErrorCodes.d.ts +15 -0
- package/build/src/runtime/http-engine/HttpErrorCodes.js +223 -0
- package/build/src/runtime/http-engine/HttpErrorCodes.js.map +1 -0
- package/build/src/runtime/http-engine/NodeEngine.d.ts +154 -0
- package/build/src/runtime/http-engine/NodeEngine.js +761 -0
- package/build/src/runtime/http-engine/NodeEngine.js.map +1 -0
- package/build/src/runtime/http-engine/NodeEngineDirect.d.ts +113 -0
- package/build/src/runtime/http-engine/NodeEngineDirect.js +443 -0
- package/build/src/runtime/http-engine/NodeEngineDirect.js.map +1 -0
- package/build/src/runtime/http-engine/PayloadSupport.d.ts +26 -0
- package/build/src/runtime/http-engine/PayloadSupport.js +78 -0
- package/build/src/runtime/http-engine/PayloadSupport.js.map +1 -0
- package/build/src/runtime/http-engine/RequestUtils.d.ts +66 -0
- package/build/src/runtime/http-engine/RequestUtils.js +144 -0
- package/build/src/runtime/http-engine/RequestUtils.js.map +1 -0
- package/build/src/runtime/http-engine/ntlm/Des.d.ts +4 -0
- package/build/src/runtime/http-engine/ntlm/Des.js +343 -0
- package/build/src/runtime/http-engine/ntlm/Des.js.map +1 -0
- package/build/src/runtime/http-engine/ntlm/MD4.d.ts +13 -0
- package/build/src/runtime/http-engine/ntlm/MD4.js +120 -0
- package/build/src/runtime/http-engine/ntlm/MD4.js.map +1 -0
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.d.ts +26 -0
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.js +159 -0
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.js.map +1 -0
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.d.ts +10 -0
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.js +51 -0
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.js.map +1 -0
- package/build/src/runtime/modules/BasicAuthCache.d.ts +39 -0
- package/build/src/runtime/modules/BasicAuthCache.js +125 -0
- package/build/src/runtime/modules/BasicAuthCache.js.map +1 -0
- package/build/src/runtime/modules/ExecutionResponse.d.ts +4 -0
- package/build/src/runtime/modules/ExecutionResponse.js +6 -0
- package/build/src/runtime/modules/ExecutionResponse.js.map +1 -0
- package/build/src/runtime/modules/ModulesRegistry.d.ts +93 -0
- package/build/src/runtime/modules/ModulesRegistry.js +69 -0
- package/build/src/runtime/modules/ModulesRegistry.js.map +1 -0
- package/build/src/runtime/modules/RequestAuthorization.d.ts +6 -0
- package/build/src/runtime/modules/RequestAuthorization.js +114 -0
- package/build/src/runtime/modules/RequestAuthorization.js.map +1 -0
- package/build/src/runtime/modules/RequestCookies.d.ts +17 -0
- package/build/src/runtime/modules/RequestCookies.js +133 -0
- package/build/src/runtime/modules/RequestCookies.js.map +1 -0
- package/build/src/runtime/node/ProjectRunner.d.ts +125 -0
- package/build/src/runtime/node/ProjectRunner.js +178 -0
- package/build/src/runtime/node/ProjectRunner.js.map +1 -0
- package/build/src/runtime/node/RequestFactory.d.ts +139 -0
- package/build/src/runtime/node/RequestFactory.js +397 -0
- package/build/src/runtime/node/RequestFactory.js.map +1 -0
- package/build/src/runtime/node/VariablesStore.d.ts +9 -0
- package/build/src/runtime/node/VariablesStore.js +19 -0
- package/build/src/runtime/node/VariablesStore.js.map +1 -0
- package/build/src/runtime/variables/Cache.d.ts +23 -0
- package/build/src/runtime/variables/Cache.js +51 -0
- package/build/src/runtime/variables/Cache.js.map +1 -0
- package/build/src/runtime/variables/EvalFunctions.d.ts +58 -0
- package/build/src/runtime/variables/EvalFunctions.js +123 -0
- package/build/src/runtime/variables/EvalFunctions.js.map +1 -0
- package/build/src/runtime/variables/ProjectVariables.d.ts +5 -0
- package/build/src/runtime/variables/ProjectVariables.js +6 -0
- package/build/src/runtime/variables/ProjectVariables.js.map +1 -0
- package/build/src/runtime/variables/VariablesProcessor.d.ts +165 -0
- package/build/src/runtime/variables/VariablesProcessor.js +515 -0
- package/build/src/runtime/variables/VariablesProcessor.js.map +1 -0
- package/build/src/runtime/variables/VariablesTokenizer.d.ts +26 -0
- package/build/src/runtime/variables/VariablesTokenizer.js +53 -0
- package/build/src/runtime/variables/VariablesTokenizer.js.map +1 -0
- package/package.json +97 -0
- package/readme.md +51 -0
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
+
import { URL } from 'url';
|
|
4
|
+
import http from 'http';
|
|
5
|
+
import https from 'https';
|
|
6
|
+
import { HttpEngine } from './HttpEngine.js';
|
|
7
|
+
import { ArcResponse } from '../../models/ArcResponse.js';
|
|
8
|
+
import { Headers } from '../../lib/headers/Headers.js';
|
|
9
|
+
import { PayloadSupport } from './PayloadSupport.js';
|
|
10
|
+
import { addContentLength, getPort } from './RequestUtils.js';
|
|
11
|
+
import { NetError } from './Errors.js';
|
|
12
|
+
import { NtlmAuth } from './ntlm/NtlmAuth.js';
|
|
13
|
+
export class NodeEngine extends HttpEngine {
|
|
14
|
+
responseReported = false;
|
|
15
|
+
_sentHttpMessage;
|
|
16
|
+
client;
|
|
17
|
+
receivingResponse = false;
|
|
18
|
+
constructor(request, opts = {}) {
|
|
19
|
+
super(request, opts);
|
|
20
|
+
this._connectHandler = this._connectHandler.bind(this);
|
|
21
|
+
this._secureConnectHandler = this._secureConnectHandler.bind(this);
|
|
22
|
+
this._responseHandler = this._responseHandler.bind(this);
|
|
23
|
+
this._timeoutHandler = this._timeoutHandler.bind(this);
|
|
24
|
+
this._errorHandler = this._errorHandler.bind(this);
|
|
25
|
+
this._lookupHandler = this._lookupHandler.bind(this);
|
|
26
|
+
this._closeHandler = this._closeHandler.bind(this);
|
|
27
|
+
this._socketHandler = this._socketHandler.bind(this);
|
|
28
|
+
this._sendEndHandler = this._sendEndHandler.bind(this);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Sends the request
|
|
32
|
+
*/
|
|
33
|
+
async send() {
|
|
34
|
+
this.abort();
|
|
35
|
+
this.aborted = false;
|
|
36
|
+
const promise = this.wrapExecution();
|
|
37
|
+
this.sendRequest();
|
|
38
|
+
return promise;
|
|
39
|
+
}
|
|
40
|
+
async sendRequest() {
|
|
41
|
+
try {
|
|
42
|
+
const message = await this._prepareMessage();
|
|
43
|
+
const request = this.opts.proxy ? await this._connectProxy(this.opts.proxy, message) : this._connect(message);
|
|
44
|
+
if (request) {
|
|
45
|
+
this.client = request;
|
|
46
|
+
const { timeout } = this;
|
|
47
|
+
if (timeout > 0) {
|
|
48
|
+
request.setTimeout(timeout);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
console.warn(e);
|
|
54
|
+
this.finalizeRequest(e);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Prepares the request body (the payload) and the headers.
|
|
59
|
+
*
|
|
60
|
+
* @return Resolved promise to a `Buffer`. Undefined when no message.
|
|
61
|
+
*/
|
|
62
|
+
async _prepareMessage() {
|
|
63
|
+
const { method = 'GET', headers } = this.request;
|
|
64
|
+
let { payload } = this.request;
|
|
65
|
+
if (['get', 'head'].includes(method.toLowerCase())) {
|
|
66
|
+
payload = undefined;
|
|
67
|
+
}
|
|
68
|
+
const engineHeaders = new Headers(headers);
|
|
69
|
+
this.prepareHeaders(engineHeaders);
|
|
70
|
+
let buffer;
|
|
71
|
+
if (payload) {
|
|
72
|
+
buffer = await PayloadSupport.payloadToBuffer(payload, engineHeaders);
|
|
73
|
+
if (buffer) {
|
|
74
|
+
addContentLength(method, buffer, engineHeaders);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
this._handleAuthorization(engineHeaders);
|
|
78
|
+
this.sentRequest.headers = engineHeaders.toString();
|
|
79
|
+
// if (this.auth) {
|
|
80
|
+
// // This restores altered by the authorization original headers
|
|
81
|
+
// // so it can be safe to use when redirecting
|
|
82
|
+
// if (this.auth.headers) {
|
|
83
|
+
// this.request.headers = this.auth.headers;
|
|
84
|
+
// delete this.auth.headers;
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
return buffer;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Connects to the remote machine.
|
|
91
|
+
*/
|
|
92
|
+
_connect(message) {
|
|
93
|
+
const uri = new URL(this.request.url);
|
|
94
|
+
const port = getPort(uri.port, uri.protocol);
|
|
95
|
+
if (port === 443 || uri.protocol === 'https:') {
|
|
96
|
+
return this._connectHttps(uri, message);
|
|
97
|
+
}
|
|
98
|
+
return this._connectHttp(uri, message);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Creates a connection using regular transport.
|
|
102
|
+
*/
|
|
103
|
+
_connectHttp(uri, message) {
|
|
104
|
+
if (!uri.port) {
|
|
105
|
+
uri.port = '80';
|
|
106
|
+
}
|
|
107
|
+
const options = this._createGenericOptions(uri);
|
|
108
|
+
options.agent = new http.Agent({ keepAlive: true });
|
|
109
|
+
const startTime = Date.now();
|
|
110
|
+
this.stats.startTime = startTime;
|
|
111
|
+
this.sentRequest.startTime = startTime;
|
|
112
|
+
const request = http.request(options);
|
|
113
|
+
this._setCommonListeners(request);
|
|
114
|
+
if (message) {
|
|
115
|
+
request.write(message);
|
|
116
|
+
}
|
|
117
|
+
this.stats.messageStart = Date.now();
|
|
118
|
+
request.end();
|
|
119
|
+
// This is a hack to read sent data.
|
|
120
|
+
// In the https://github.com/nodejs/node/blob/0a62026f32d513a8a5d9ed857481df5f5fa18e8b/lib/_http_outgoing.js#L960
|
|
121
|
+
// library it hold the data until it is flushed.
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
const pending = request.outputData;
|
|
124
|
+
if (Array.isArray(pending)) {
|
|
125
|
+
this._sentHttpMessage = pending;
|
|
126
|
+
}
|
|
127
|
+
try {
|
|
128
|
+
this.emit('loadstart');
|
|
129
|
+
}
|
|
130
|
+
catch (_) {
|
|
131
|
+
//
|
|
132
|
+
}
|
|
133
|
+
return request;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Creates a connection using SSL transport.
|
|
137
|
+
*/
|
|
138
|
+
_connectHttps(uri, message) {
|
|
139
|
+
if (!uri.port) {
|
|
140
|
+
uri.port = '443';
|
|
141
|
+
}
|
|
142
|
+
const options = this._createGenericOptions(uri);
|
|
143
|
+
this._addSslOptions(options);
|
|
144
|
+
const startTime = Date.now();
|
|
145
|
+
this.stats.startTime = startTime;
|
|
146
|
+
this.sentRequest.startTime = startTime;
|
|
147
|
+
const request = https.request(options);
|
|
148
|
+
this._setCommonListeners(request);
|
|
149
|
+
if (message) {
|
|
150
|
+
request.write(message);
|
|
151
|
+
}
|
|
152
|
+
this.stats.messageStart = Date.now();
|
|
153
|
+
this.stats.sentTime = this.stats.messageStart + 1;
|
|
154
|
+
request.end();
|
|
155
|
+
// This is a hack to read sent data.
|
|
156
|
+
// In the https://github.com/nodejs/node/blob/0a62026f32d513a8a5d9ed857481df5f5fa18e8b/lib/_http_outgoing.js#L960
|
|
157
|
+
// library it hold the data until it is flushed.
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
const pending = request.outputData;
|
|
160
|
+
if (Array.isArray(pending)) {
|
|
161
|
+
this._sentHttpMessage = pending;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
this.emit('loadstart');
|
|
165
|
+
}
|
|
166
|
+
catch (_) {
|
|
167
|
+
//
|
|
168
|
+
}
|
|
169
|
+
return request;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Sets listeners on a socket
|
|
173
|
+
* @param request The request object
|
|
174
|
+
*/
|
|
175
|
+
_setCommonListeners(request) {
|
|
176
|
+
// request.shouldKeepAlive = false;
|
|
177
|
+
request.once('socket', this._socketHandler);
|
|
178
|
+
request.once('error', this._errorHandler);
|
|
179
|
+
request.once('response', this._responseHandler);
|
|
180
|
+
request.once('close', this._closeHandler);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Handler for connection error.
|
|
184
|
+
*/
|
|
185
|
+
_errorHandler(e) {
|
|
186
|
+
if (this.aborted) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this._errorRequest({
|
|
190
|
+
code: e.code,
|
|
191
|
+
message: e.message,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Handler for DNS lookup.
|
|
196
|
+
*/
|
|
197
|
+
_lookupHandler() {
|
|
198
|
+
this.stats.lookupTime = Date.now();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Handler for connected event.
|
|
202
|
+
*/
|
|
203
|
+
_secureConnectHandler() {
|
|
204
|
+
this.stats.secureConnectedTime = Date.now();
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Handler for connecting event.
|
|
208
|
+
*/
|
|
209
|
+
_connectHandler() {
|
|
210
|
+
this.stats.connectedTime = Date.now();
|
|
211
|
+
this.stats.secureStartTime = Date.now();
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Handler for sending finished event
|
|
215
|
+
*/
|
|
216
|
+
_sendEndHandler() {
|
|
217
|
+
if (!this.stats.sentTime) {
|
|
218
|
+
this.stats.sentTime = Date.now();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Handler for timeout event
|
|
223
|
+
*/
|
|
224
|
+
_timeoutHandler() {
|
|
225
|
+
this._errorRequest({
|
|
226
|
+
code: 7,
|
|
227
|
+
});
|
|
228
|
+
this.abort();
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* A handler for response data event
|
|
232
|
+
*/
|
|
233
|
+
_responseHandler(res) {
|
|
234
|
+
this.receivingResponse = true;
|
|
235
|
+
this.emit('firstbyte');
|
|
236
|
+
this.stats.firstReceiveTime = Date.now();
|
|
237
|
+
this.stats.responseTime = Date.now();
|
|
238
|
+
if (this._sentHttpMessage) {
|
|
239
|
+
this.sentRequest.httpMessage = this._readSentMessage(this._sentHttpMessage);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
this.sentRequest.httpMessage = '';
|
|
243
|
+
}
|
|
244
|
+
const status = res.statusCode;
|
|
245
|
+
if (!status) {
|
|
246
|
+
this._errorRequest({
|
|
247
|
+
message: 'The response has no status.',
|
|
248
|
+
});
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const headers = this.computeResponseHeaders(res);
|
|
252
|
+
const rawHeaders = headers.toString();
|
|
253
|
+
const response = ArcResponse.fromValues(status, res.statusMessage, rawHeaders);
|
|
254
|
+
this.currentResponse = response;
|
|
255
|
+
this.currentHeaders = headers;
|
|
256
|
+
const detail = {
|
|
257
|
+
returnValue: true,
|
|
258
|
+
value: rawHeaders,
|
|
259
|
+
};
|
|
260
|
+
this.emit('headersreceived', detail);
|
|
261
|
+
if (!detail.returnValue) {
|
|
262
|
+
this.abort();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
// if (status === 401 && this.auth) {
|
|
266
|
+
// switch (this.auth.method) {
|
|
267
|
+
// case 'ntlm': this._handleNtlmResponse(); break;
|
|
268
|
+
// }
|
|
269
|
+
// }
|
|
270
|
+
res.on('data', (chunk) => {
|
|
271
|
+
if (!this._rawBody) {
|
|
272
|
+
this._rawBody = chunk;
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
const endTime = Date.now();
|
|
276
|
+
this.stats.lastReceivedTime = endTime;
|
|
277
|
+
this._rawBody = Buffer.concat([this._rawBody, chunk]);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
res.once('end', () => {
|
|
281
|
+
const endTime = Date.now();
|
|
282
|
+
this.sentRequest.endTime = endTime;
|
|
283
|
+
this.stats.receivingTime = endTime;
|
|
284
|
+
this._reportResponse();
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Handler for connection close event
|
|
289
|
+
*/
|
|
290
|
+
_closeHandler() {
|
|
291
|
+
if (this.responseReported || this.receivingResponse || this.aborted || this.redirecting) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (!this.currentResponse) {
|
|
295
|
+
const e = new Error('Connection closed unexpectedly.');
|
|
296
|
+
// console.log(e.stack);
|
|
297
|
+
// console.log(this.sentRequest);
|
|
298
|
+
this._errorRequest(e);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
// There is an issue with the response. Size mismatch? Anyway,
|
|
302
|
+
// it tries to create a response from current data.
|
|
303
|
+
this.emit('loadend');
|
|
304
|
+
this._publishResponse();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
_socketHandler(socket) {
|
|
308
|
+
this.socket = socket;
|
|
309
|
+
socket.once('lookup', this._lookupHandler);
|
|
310
|
+
socket.once('connect', this._connectHandler);
|
|
311
|
+
socket.once('timeout', this._timeoutHandler);
|
|
312
|
+
socket.once('end', this._sendEndHandler);
|
|
313
|
+
socket.once('secureConnect', this._secureConnectHandler);
|
|
314
|
+
this.stats.connectionTime = Date.now();
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Creates and publishes a response.
|
|
318
|
+
*/
|
|
319
|
+
_reportResponse() {
|
|
320
|
+
const { aborted, currentResponse } = this;
|
|
321
|
+
if (aborted || !currentResponse) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const { status } = currentResponse;
|
|
325
|
+
if (status >= 300 && status < 400) {
|
|
326
|
+
if (this.followRedirects !== false && this._reportRedirect(status)) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (this.responseReported) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
this.responseReported = true;
|
|
334
|
+
this.emit('loadend');
|
|
335
|
+
this._publishResponse();
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Transforms a message from the client to a string.
|
|
339
|
+
* It uses `opts.sentMessageLimit` to limit number of data returned
|
|
340
|
+
* by the client.
|
|
341
|
+
*/
|
|
342
|
+
_readSentMessage(messages) {
|
|
343
|
+
let result = '';
|
|
344
|
+
if (typeof messages === 'string') {
|
|
345
|
+
result = messages;
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
for (let i = 0, len = messages.length; i < len; i++) {
|
|
349
|
+
const chunk = messages[i].data;
|
|
350
|
+
if (!chunk) {
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
if (typeof chunk === 'string') {
|
|
354
|
+
result += chunk;
|
|
355
|
+
}
|
|
356
|
+
else if (chunk instanceof Uint8Array) {
|
|
357
|
+
result += chunk.toString();
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
const limit = this.opts.sentMessageLimit;
|
|
362
|
+
if (limit && limit > 0 && result.length >= limit) {
|
|
363
|
+
result = result.substr(0, limit);
|
|
364
|
+
result += ' ...';
|
|
365
|
+
}
|
|
366
|
+
return result;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Connects to the remote machine via a proxy.
|
|
370
|
+
*/
|
|
371
|
+
async _connectProxy(proxy, message) {
|
|
372
|
+
const { url } = this.request;
|
|
373
|
+
const isTargetSsl = url.startsWith('https:');
|
|
374
|
+
const isProxySsl = proxy.startsWith('https:');
|
|
375
|
+
const uri = new URL(url);
|
|
376
|
+
if (!isProxySsl && !isTargetSsl) {
|
|
377
|
+
return this._proxyHttpOverHttp(uri, proxy, message);
|
|
378
|
+
}
|
|
379
|
+
if (!isProxySsl && isTargetSsl) {
|
|
380
|
+
return this._proxyHttpsOverHttp(uri, proxy, message);
|
|
381
|
+
}
|
|
382
|
+
if (isProxySsl && !isTargetSsl) {
|
|
383
|
+
return this._proxyHttpOverHttps(uri, proxy, message);
|
|
384
|
+
}
|
|
385
|
+
return this._proxyHttpsOverHttps(uri, proxy, message);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Creates a default options for a request.
|
|
389
|
+
* @param uri Instance of URL class for current URL.
|
|
390
|
+
*/
|
|
391
|
+
_createGenericOptions(uri) {
|
|
392
|
+
const result = {
|
|
393
|
+
protocol: uri.protocol,
|
|
394
|
+
host: uri.hostname,
|
|
395
|
+
// hash: uri.hash,
|
|
396
|
+
method: this.request.method.toUpperCase(),
|
|
397
|
+
};
|
|
398
|
+
result.headers = {};
|
|
399
|
+
if (uri.port) {
|
|
400
|
+
result.port = uri.port;
|
|
401
|
+
}
|
|
402
|
+
result.path = `${uri.pathname}${uri.search}`;
|
|
403
|
+
// Note, the final headers are set on the `sentRequest` object.
|
|
404
|
+
// The `request` object is not changed.
|
|
405
|
+
const headers = new Headers(this.sentRequest.headers);
|
|
406
|
+
for (const [key, value] of headers.entries()) {
|
|
407
|
+
result.headers[key] = value;
|
|
408
|
+
}
|
|
409
|
+
return result;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Adds SSL options to the request.
|
|
413
|
+
*/
|
|
414
|
+
_addSslOptions(options) {
|
|
415
|
+
if (this.opts.validateCertificates) {
|
|
416
|
+
options.checkServerIdentity = this._checkServerIdentity.bind(this);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
options.rejectUnauthorized = false;
|
|
420
|
+
options.requestOCSP = false;
|
|
421
|
+
}
|
|
422
|
+
const certs = this.opts.certificates;
|
|
423
|
+
if (Array.isArray(certs)) {
|
|
424
|
+
certs.forEach(cert => this._addClientCertificate(cert, options));
|
|
425
|
+
}
|
|
426
|
+
options.agent = new https.Agent(options);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Creates options to be set on the proxy request.
|
|
430
|
+
* It replaces the original `host` and `port` values with the ones defined
|
|
431
|
+
* for the proxy server.
|
|
432
|
+
*
|
|
433
|
+
* @param proxy The proxy URI. (e.g. 10.0.0.12:8118)
|
|
434
|
+
* @param requestUri The original request URI.
|
|
435
|
+
* @param requestOptions The original request options
|
|
436
|
+
*/
|
|
437
|
+
_createProxyOptions(proxy, requestUri, requestOptions) {
|
|
438
|
+
let proxyUrl = proxy;
|
|
439
|
+
const options = requestOptions;
|
|
440
|
+
const isSsl = proxyUrl.startsWith('https:');
|
|
441
|
+
const isHttp = proxyUrl.startsWith('http:');
|
|
442
|
+
if (!isSsl && !isHttp) {
|
|
443
|
+
proxyUrl = `http://${proxyUrl}`;
|
|
444
|
+
}
|
|
445
|
+
const proxyUri = new URL(proxyUrl);
|
|
446
|
+
if (!options.headers) {
|
|
447
|
+
options.headers = {};
|
|
448
|
+
}
|
|
449
|
+
const auth = this._proxyAuthHeader();
|
|
450
|
+
if (auth) {
|
|
451
|
+
if (!options.headers['proxy-authorization']) {
|
|
452
|
+
options.headers['proxy-authorization'] = auth;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
options.headers.host = `${requestUri.hostname}:${requestUri.port || 80}`;
|
|
456
|
+
delete options.headers.Host;
|
|
457
|
+
return {
|
|
458
|
+
...options,
|
|
459
|
+
protocol: proxyUri.protocol,
|
|
460
|
+
host: proxyUri.hostname,
|
|
461
|
+
hostname: proxyUri.hostname,
|
|
462
|
+
port: proxyUri.port || 80,
|
|
463
|
+
path: requestUri.toString(),
|
|
464
|
+
agent: false,
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Creates a connection to non-ssl target via a non-ssl proxy.
|
|
469
|
+
*
|
|
470
|
+
* @param message The message to send
|
|
471
|
+
* @param uri The target URI
|
|
472
|
+
* @param proxy The proxy URI
|
|
473
|
+
*/
|
|
474
|
+
_proxyHttpOverHttp(uri, proxy, message) {
|
|
475
|
+
const targetOptions = this._createGenericOptions(uri);
|
|
476
|
+
const options = this._createProxyOptions(proxy, uri, targetOptions);
|
|
477
|
+
const startTime = Date.now();
|
|
478
|
+
this.stats.startTime = startTime;
|
|
479
|
+
this.sentRequest.startTime = startTime;
|
|
480
|
+
const request = http.request(options);
|
|
481
|
+
this._setCommonListeners(request);
|
|
482
|
+
if (message) {
|
|
483
|
+
request.write(message);
|
|
484
|
+
}
|
|
485
|
+
this.stats.messageStart = Date.now();
|
|
486
|
+
this.stats.sentTime = this.stats.messageStart + 1;
|
|
487
|
+
request.end();
|
|
488
|
+
try {
|
|
489
|
+
this.emit('loadstart');
|
|
490
|
+
}
|
|
491
|
+
catch (_) {
|
|
492
|
+
//
|
|
493
|
+
}
|
|
494
|
+
return request;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Creates a connection to non-ssl target via an ssl proxy.
|
|
498
|
+
*
|
|
499
|
+
* @param message The message to send
|
|
500
|
+
* @param uri The target URI
|
|
501
|
+
* @param proxy The proxy URI
|
|
502
|
+
*/
|
|
503
|
+
async _proxyHttpsOverHttp(uri, proxy, message) {
|
|
504
|
+
let proxyUrl = proxy;
|
|
505
|
+
if (!proxyUrl.startsWith('http:')) {
|
|
506
|
+
proxyUrl = `http://${proxyUrl}`;
|
|
507
|
+
}
|
|
508
|
+
const proxyUri = new URL(proxyUrl);
|
|
509
|
+
const proxyPort = proxyUri.port || 80;
|
|
510
|
+
const targetPort = uri.port || 443; // target is always SSL so 443.
|
|
511
|
+
const authority = `${uri.hostname}:${targetPort}`;
|
|
512
|
+
const connectOptions = {
|
|
513
|
+
host: proxyUri.hostname,
|
|
514
|
+
port: proxyPort,
|
|
515
|
+
method: 'CONNECT',
|
|
516
|
+
path: authority,
|
|
517
|
+
headers: {
|
|
518
|
+
host: authority,
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
const auth = this._proxyAuthHeader();
|
|
522
|
+
if (auth) {
|
|
523
|
+
connectOptions.headers = {
|
|
524
|
+
'proxy-authorization': auth,
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
return new Promise((resolve, reject) => {
|
|
528
|
+
const connectRequest = http.request(connectOptions);
|
|
529
|
+
connectRequest.on('connect', (res, socket, head) => {
|
|
530
|
+
if (res.statusCode === 200) {
|
|
531
|
+
const options = this._createGenericOptions(uri);
|
|
532
|
+
this._addSslOptions(options);
|
|
533
|
+
delete options.agent;
|
|
534
|
+
const startTime = Date.now();
|
|
535
|
+
this.stats.startTime = startTime;
|
|
536
|
+
this.sentRequest.startTime = startTime;
|
|
537
|
+
const agent = new https.Agent({
|
|
538
|
+
socket,
|
|
539
|
+
});
|
|
540
|
+
const request = https.request({ ...options, agent });
|
|
541
|
+
this._connectHandler();
|
|
542
|
+
this._setCommonListeners(request);
|
|
543
|
+
if (message) {
|
|
544
|
+
request.write(message);
|
|
545
|
+
}
|
|
546
|
+
request.end();
|
|
547
|
+
this.stats.messageStart = Date.now();
|
|
548
|
+
this.stats.sentTime = this.stats.messageStart + 1;
|
|
549
|
+
resolve(request);
|
|
550
|
+
}
|
|
551
|
+
else if (res.statusCode === 401) {
|
|
552
|
+
this.currentHeaders = this.computeResponseHeaders(res);
|
|
553
|
+
const response = ArcResponse.fromValues(res.statusCode, res.statusMessage, this.currentHeaders.toString());
|
|
554
|
+
this.currentResponse = response;
|
|
555
|
+
if (head.length) {
|
|
556
|
+
this._rawBody = head;
|
|
557
|
+
this.currentResponse.payload = {
|
|
558
|
+
type: 'buffer',
|
|
559
|
+
data: [...head],
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
connectRequest.destroy();
|
|
563
|
+
resolve(undefined);
|
|
564
|
+
setTimeout(() => {
|
|
565
|
+
// const e = new NetError('The proxy requires authentication.', 127);
|
|
566
|
+
this._publishResponse();
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
connectRequest.destroy();
|
|
571
|
+
const e = new NetError('A tunnel connection through the proxy could not be established.', 111);
|
|
572
|
+
reject(e);
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
connectRequest.once('error', (err) => reject(err));
|
|
576
|
+
try {
|
|
577
|
+
this.emit('loadstart');
|
|
578
|
+
}
|
|
579
|
+
catch (_) {
|
|
580
|
+
//
|
|
581
|
+
}
|
|
582
|
+
connectRequest.end();
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Creates a connection to a non-ssl target using SSL proxy.
|
|
587
|
+
*
|
|
588
|
+
* @param proxy The proxy URI
|
|
589
|
+
*/
|
|
590
|
+
_proxyHttpOverHttps(uri, proxy, message) {
|
|
591
|
+
const targetOptions = this._createGenericOptions(uri);
|
|
592
|
+
const options = this._createProxyOptions(proxy, uri, targetOptions);
|
|
593
|
+
options.rejectUnauthorized = false;
|
|
594
|
+
// @ts-ignore
|
|
595
|
+
options.requestOCSP = false;
|
|
596
|
+
const startTime = Date.now();
|
|
597
|
+
this.stats.startTime = startTime;
|
|
598
|
+
this.sentRequest.startTime = startTime;
|
|
599
|
+
const request = https.request(options);
|
|
600
|
+
this._setCommonListeners(request);
|
|
601
|
+
if (message) {
|
|
602
|
+
request.write(message);
|
|
603
|
+
}
|
|
604
|
+
this.stats.messageStart = Date.now();
|
|
605
|
+
this.stats.sentTime = this.stats.messageStart + 1;
|
|
606
|
+
request.end();
|
|
607
|
+
// @ts-ignore
|
|
608
|
+
const pending = request.outputData;
|
|
609
|
+
if (Array.isArray(pending)) {
|
|
610
|
+
this._sentHttpMessage = pending;
|
|
611
|
+
}
|
|
612
|
+
try {
|
|
613
|
+
this.emit('loadstart');
|
|
614
|
+
}
|
|
615
|
+
catch (_) {
|
|
616
|
+
//
|
|
617
|
+
}
|
|
618
|
+
return request;
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Creates a connection to a non-ssl target using SSL proxy.
|
|
622
|
+
*
|
|
623
|
+
* @param proxy The proxy URI
|
|
624
|
+
*/
|
|
625
|
+
_proxyHttpsOverHttps(uri, proxy, message) {
|
|
626
|
+
let proxyUrl = proxy;
|
|
627
|
+
if (!proxyUrl.startsWith('https:')) {
|
|
628
|
+
proxyUrl = `https://${proxyUrl}`;
|
|
629
|
+
}
|
|
630
|
+
const proxyUri = new URL(proxyUrl);
|
|
631
|
+
const connectOptions = {
|
|
632
|
+
host: proxyUri.hostname,
|
|
633
|
+
port: proxyUri.port || 443,
|
|
634
|
+
method: 'CONNECT',
|
|
635
|
+
path: `${uri.hostname}:${uri.port || 443}`,
|
|
636
|
+
headers: {
|
|
637
|
+
host: `${uri.hostname}:${uri.port || 443}`,
|
|
638
|
+
},
|
|
639
|
+
rejectUnauthorized: false,
|
|
640
|
+
// @ts-ignore
|
|
641
|
+
requestOCSP: false,
|
|
642
|
+
};
|
|
643
|
+
const auth = this._proxyAuthHeader();
|
|
644
|
+
if (auth) {
|
|
645
|
+
connectOptions.headers = {
|
|
646
|
+
'proxy-authorization': auth,
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
const connectRequest = https.request(connectOptions);
|
|
650
|
+
connectRequest.on('connect', (res, socket) => {
|
|
651
|
+
if (res.statusCode === 200) {
|
|
652
|
+
const agent = new https.Agent({ socket });
|
|
653
|
+
const options = this._createGenericOptions(uri);
|
|
654
|
+
this._addSslOptions(options);
|
|
655
|
+
const startTime = Date.now();
|
|
656
|
+
this.stats.startTime = startTime;
|
|
657
|
+
this.sentRequest.startTime = startTime;
|
|
658
|
+
const sslRequest = https.request({ ...options, agent, protocol: 'https:' });
|
|
659
|
+
sslRequest.on('error', () => {
|
|
660
|
+
console.log('sslRequest error');
|
|
661
|
+
});
|
|
662
|
+
this._connectHandler();
|
|
663
|
+
this._setCommonListeners(sslRequest);
|
|
664
|
+
if (message) {
|
|
665
|
+
sslRequest.write(message);
|
|
666
|
+
}
|
|
667
|
+
this.stats.messageStart = Date.now();
|
|
668
|
+
this.stats.sentTime = this.stats.messageStart + 1;
|
|
669
|
+
sslRequest.end();
|
|
670
|
+
// @ts-ignore
|
|
671
|
+
const pending = sslRequest.outputData;
|
|
672
|
+
if (Array.isArray(pending)) {
|
|
673
|
+
this._sentHttpMessage = pending;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
else {
|
|
677
|
+
this._errorRequest({
|
|
678
|
+
code: 111,
|
|
679
|
+
message: 'A tunnel connection through the proxy could not be established.',
|
|
680
|
+
});
|
|
681
|
+
connectRequest.destroy();
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
connectRequest.once('error', this._errorHandler);
|
|
685
|
+
try {
|
|
686
|
+
this.emit('loadstart');
|
|
687
|
+
}
|
|
688
|
+
catch (_) {
|
|
689
|
+
//
|
|
690
|
+
}
|
|
691
|
+
connectRequest.end();
|
|
692
|
+
return connectRequest;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Alters authorization header depending on the `auth` object
|
|
696
|
+
* @param {ArcHeaders} headers A headers object where to append headers if
|
|
697
|
+
* needed
|
|
698
|
+
*/
|
|
699
|
+
_handleAuthorization(headers) {
|
|
700
|
+
const { authorization } = this.opts;
|
|
701
|
+
const enabled = Array.isArray(authorization) ? authorization.filter((i) => i.enabled) : [];
|
|
702
|
+
if (!enabled.length) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
const ntlm = enabled.find((i) => i.type === 'ntlm');
|
|
706
|
+
if (ntlm) {
|
|
707
|
+
this._authorizeNtlm(ntlm.config, headers);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Authorize the request with NTLM
|
|
712
|
+
* @param authData The credentials to use
|
|
713
|
+
* @param headers A headers object where to append headers if needed
|
|
714
|
+
*/
|
|
715
|
+
_authorizeNtlm(authData, headers) {
|
|
716
|
+
const init = { ...authData, url: this.request.url };
|
|
717
|
+
const auth = new NtlmAuth(init);
|
|
718
|
+
if (!this.auth) {
|
|
719
|
+
this.auth = {
|
|
720
|
+
method: 'ntlm',
|
|
721
|
+
state: 0,
|
|
722
|
+
headers: headers.toString(),
|
|
723
|
+
};
|
|
724
|
+
const msg = auth.createMessage1(this.uri.host);
|
|
725
|
+
headers.set('Authorization', `NTLM ${msg.toBase64()}`);
|
|
726
|
+
headers.set('Connection', 'keep-alive');
|
|
727
|
+
}
|
|
728
|
+
else if (this.auth && this.auth.state === 1) {
|
|
729
|
+
const msg = auth.createMessage3(this.auth.challengeHeader, this.uri.host);
|
|
730
|
+
this.auth.state = 2;
|
|
731
|
+
headers.set('Authorization', `NTLM ${msg.toBase64()}`);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Handles the response with NTLM authorization
|
|
736
|
+
*/
|
|
737
|
+
async _handleNtlmResponse(res) {
|
|
738
|
+
const headers = this.computeResponseHeaders(res);
|
|
739
|
+
const { auth } = this;
|
|
740
|
+
if (auth && auth.state === 0) {
|
|
741
|
+
console.log('Handling 401 2');
|
|
742
|
+
if (headers.has('www-authenticate')) {
|
|
743
|
+
auth.state = 1;
|
|
744
|
+
auth.challengeHeader = headers.get('www-authenticate');
|
|
745
|
+
this._cleanUpRedirect();
|
|
746
|
+
console.log('Preparing message');
|
|
747
|
+
const message = await this._prepareMessage();
|
|
748
|
+
console.log('The message', message);
|
|
749
|
+
if (message) {
|
|
750
|
+
console.log('writing the message');
|
|
751
|
+
this.socket?.write(message);
|
|
752
|
+
}
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
delete this.auth;
|
|
757
|
+
this.emit('loadend');
|
|
758
|
+
this._publishResponse();
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
//# sourceMappingURL=NodeEngine.js.map
|