@api-client/core 0.20.10 → 0.21.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/CHANGELOG.md +12 -0
- package/bin/test.ts +0 -16
- package/build/src/browser.d.ts +0 -19
- package/build/src/browser.d.ts.map +1 -1
- package/build/src/browser.js +0 -31
- package/build/src/browser.js.map +1 -1
- package/build/src/events/EventTypes.d.ts +0 -40
- package/build/src/events/EventTypes.d.ts.map +1 -1
- package/build/src/events/EventTypes.js +0 -8
- package/build/src/events/EventTypes.js.map +1 -1
- package/build/src/events/Events.d.ts +0 -20
- package/build/src/events/Events.d.ts.map +1 -1
- package/build/src/events/Events.js +0 -8
- package/build/src/events/Events.js.map +1 -1
- package/build/src/events/index.d.ts +0 -3
- package/build/src/events/index.d.ts.map +1 -1
- package/build/src/events/index.js.map +1 -1
- package/build/src/index.d.ts +0 -31
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +0 -55
- package/build/src/index.js.map +1 -1
- package/build/src/lib/headers/Headers.d.ts +0 -9
- package/build/src/lib/headers/Headers.d.ts.map +1 -1
- package/build/src/lib/headers/Headers.js +0 -20
- package/build/src/lib/headers/Headers.js.map +1 -1
- package/build/src/mocking/lib/File.d.ts.map +1 -1
- package/build/src/mocking/lib/File.js +3 -5
- package/build/src/mocking/lib/File.js.map +1 -1
- package/build/src/mocking/lib/Trash.d.ts.map +1 -1
- package/build/src/mocking/lib/Trash.js +2 -8
- package/build/src/mocking/lib/Trash.js.map +1 -1
- package/build/src/models/Folder.d.ts +1 -1
- package/build/src/models/Folder.d.ts.map +1 -1
- package/build/src/models/Folder.js +3 -3
- package/build/src/models/Folder.js.map +1 -1
- package/build/src/models/index.d.ts +1 -51
- package/build/src/models/index.d.ts.map +1 -1
- package/build/src/models/index.js +1 -56
- package/build/src/models/index.js.map +1 -1
- package/build/src/models/kinds.d.ts +1 -6
- package/build/src/models/kinds.d.ts.map +1 -1
- package/build/src/models/kinds.js +1 -6
- package/build/src/models/kinds.js.map +1 -1
- package/build/src/sdk/AiSdk.d.ts +4 -4
- package/build/src/sdk/AiSdk.d.ts.map +1 -1
- package/build/src/sdk/AiSdk.js +2 -2
- package/build/src/sdk/AiSdk.js.map +1 -1
- package/build/src/sdk/DataCatalogSdk.d.ts +5 -5
- package/build/src/sdk/DataCatalogSdk.d.ts.map +1 -1
- package/build/src/sdk/DataCatalogSdk.js +1 -1
- package/build/src/sdk/DataCatalogSdk.js.map +1 -1
- package/build/src/sdk/DeploymentsSdk.d.ts +2 -2
- package/build/src/sdk/DeploymentsSdk.d.ts.map +1 -1
- package/build/src/sdk/DeploymentsSdk.js +2 -2
- package/build/src/sdk/DeploymentsSdk.js.map +1 -1
- package/build/src/sdk/FilesSdk.d.ts +8 -8
- package/build/src/sdk/FilesSdk.d.ts.map +1 -1
- package/build/src/sdk/FilesSdk.js +3 -3
- package/build/src/sdk/FilesSdk.js.map +1 -1
- package/build/src/sdk/GroupsSdk.d.ts +2 -2
- package/build/src/sdk/GroupsSdk.d.ts.map +1 -1
- package/build/src/sdk/GroupsSdk.js +1 -1
- package/build/src/sdk/GroupsSdk.js.map +1 -1
- package/build/src/sdk/HttpNode.js +1 -1
- package/build/src/sdk/HttpNode.js.map +1 -1
- package/build/src/sdk/HttpWeb.d.ts +1 -0
- package/build/src/sdk/HttpWeb.d.ts.map +1 -1
- package/build/src/sdk/HttpWeb.js +28 -3
- package/build/src/sdk/HttpWeb.js.map +1 -1
- package/build/src/sdk/OrganizationsSdk.d.ts +5 -5
- package/build/src/sdk/OrganizationsSdk.d.ts.map +1 -1
- package/build/src/sdk/OrganizationsSdk.js +1 -1
- package/build/src/sdk/OrganizationsSdk.js.map +1 -1
- package/build/src/sdk/RevisionsSdk.d.ts +2 -2
- package/build/src/sdk/RevisionsSdk.d.ts.map +1 -1
- package/build/src/sdk/RevisionsSdk.js +1 -1
- package/build/src/sdk/RevisionsSdk.js.map +1 -1
- package/build/src/sdk/RouteBuilder.d.ts +3 -3
- package/build/src/sdk/RouteBuilder.d.ts.map +1 -1
- package/build/src/sdk/RouteBuilder.js.map +1 -1
- package/build/src/sdk/Sdk.d.ts +1 -21
- package/build/src/sdk/Sdk.d.ts.map +1 -1
- package/build/src/sdk/Sdk.js +0 -15
- package/build/src/sdk/Sdk.js.map +1 -1
- package/build/src/sdk/SdkBase.d.ts +3 -3
- package/build/src/sdk/SdkBase.d.ts.map +1 -1
- package/build/src/sdk/SdkBase.js +1 -1
- package/build/src/sdk/SdkBase.js.map +1 -1
- package/build/src/sdk/SdkMock.d.ts +2 -2
- package/build/src/sdk/SdkMock.d.ts.map +1 -1
- package/build/src/sdk/SdkMock.js +6 -6
- package/build/src/sdk/SdkMock.js.map +1 -1
- package/build/src/sdk/SdkNetworkMock.d.ts +323 -0
- package/build/src/sdk/SdkNetworkMock.d.ts.map +1 -0
- package/build/src/sdk/SdkNetworkMock.js +1196 -0
- package/build/src/sdk/SdkNetworkMock.js.map +1 -0
- package/build/src/sdk/SharedSdk.d.ts +2 -2
- package/build/src/sdk/SharedSdk.d.ts.map +1 -1
- package/build/src/sdk/SharedSdk.js +1 -1
- package/build/src/sdk/SharedSdk.js.map +1 -1
- package/build/src/sdk/StoreSdkNode.d.ts +0 -2
- package/build/src/sdk/StoreSdkNode.d.ts.map +1 -1
- package/build/src/sdk/StoreSdkNode.js +0 -2
- package/build/src/sdk/StoreSdkNode.js.map +1 -1
- package/build/src/sdk/StoreSdkWeb.d.ts +0 -2
- package/build/src/sdk/StoreSdkWeb.d.ts.map +1 -1
- package/build/src/sdk/StoreSdkWeb.js +0 -2
- package/build/src/sdk/StoreSdkWeb.js.map +1 -1
- package/build/src/sdk/TrashSdk.d.ts +2 -2
- package/build/src/sdk/TrashSdk.d.ts.map +1 -1
- package/build/src/sdk/TrashSdk.js +1 -1
- package/build/src/sdk/TrashSdk.js.map +1 -1
- package/build/src/sdk/UsersSdk.d.ts +1 -1
- package/build/src/sdk/UsersSdk.d.ts.map +1 -1
- package/build/src/sdk/UsersSdk.js +1 -1
- package/build/src/sdk/UsersSdk.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -0
- package/eslint.config.js +0 -4
- package/knip.json +10 -0
- package/lupa.config.ts +43 -0
- package/package.json +25 -67
- package/src/events/EventTypes.ts +0 -8
- package/src/events/Events.ts +0 -8
- package/src/lib/headers/Headers.ts +0 -22
- package/src/mocking/lib/File.ts +3 -6
- package/src/mocking/lib/Trash.ts +2 -8
- package/src/models/Folder.ts +3 -3
- package/src/models/kinds.ts +1 -6
- package/src/sdk/AiSdk.ts +6 -6
- package/src/sdk/DataCatalogSdk.ts +6 -6
- package/src/sdk/DeploymentsSdk.ts +3 -3
- package/src/sdk/FilesSdk.ts +10 -10
- package/src/sdk/GroupsSdk.ts +3 -3
- package/src/sdk/HttpNode.ts +1 -1
- package/src/sdk/HttpWeb.ts +28 -3
- package/src/sdk/OrganizationsSdk.ts +6 -6
- package/src/sdk/RevisionsSdk.ts +3 -3
- package/src/sdk/RouteBuilder.ts +3 -3
- package/src/sdk/Sdk.ts +1 -22
- package/src/sdk/SdkBase.ts +3 -3
- package/src/sdk/SdkMock.ts +11 -11
- package/src/sdk/SdkNetworkMock.ts +1607 -0
- package/src/sdk/SharedSdk.ts +3 -3
- package/src/sdk/StoreSdkNode.ts +0 -3
- package/src/sdk/StoreSdkWeb.ts +0 -3
- package/src/sdk/TrashSdk.ts +3 -3
- package/src/sdk/UsersSdk.ts +2 -2
- package/tests/client/env.ts +11 -0
- package/tests/client/lib/dom_purify.spec.ts +12 -0
- package/tests/client/sdk/DataCatalog.spec.ts +565 -0
- package/tests/client/sdk/Deployments.spec.ts +214 -0
- package/tests/client/sdk/FilesSdk.spec.ts +716 -0
- package/tests/client/sdk/groups.spec.ts +244 -0
- package/tests/client/sdk/network-mock/ai-mock.spec.ts +124 -0
- package/tests/client/sdk/network-mock/deployments-mock.spec.ts +182 -0
- package/tests/client/sdk/network-mock/files-mock.spec.ts +119 -0
- package/tests/client/sdk/network-mock/groups-mock.spec.ts +83 -0
- package/tests/client/sdk/network-mock/organizations-mock.spec.ts +129 -0
- package/tests/client/sdk/network-mock/shared-mock.spec.ts +25 -0
- package/tests/client/sdk/network-mock/trash-mock.spec.ts +43 -0
- package/tests/client/sdk/network-mock/users-mock.spec.ts +79 -0
- package/tests/client/sdk/organizations.spec.ts +2468 -0
- package/tests/client/src/platform.spec.ts +14 -0
- package/tests/unit/mocking/current/File.spec.ts +5 -5
- package/tests/unit/mocking/current/Trash.spec.ts +5 -5
- package/tests/unit/modeling/RuntimeApiModel.spec.ts +24 -4
- package/tests/unit/models/File/createFileCapabilities.spec.ts +3 -2
- package/tsconfig.build.json +8 -0
- package/RELEASE.md +0 -163
- package/RELEASE_SETUP.md +0 -237
- package/TESTING_SETUP.md +0 -198
- package/Testing.md +0 -21
- package/amf-models/dialects/ApiProjectVocabulary.yaml +0 -233
- package/amf-models/dialects/Environment.yaml +0 -38
- package/amf-models/dialects/HttpProject.yaml +0 -55
- package/amf-models/dialects/License.yaml +0 -31
- package/amf-models/dialects/ProjectFolder.yaml +0 -43
- package/amf-models/dialects/ProjectItem.yaml +0 -22
- package/amf-models/dialects/ProjectRequest.yaml +0 -23
- package/amf-models/dialects/ProjectSchema.yaml +0 -36
- package/amf-models/dialects/Property.yaml +0 -43
- package/amf-models/dialects/Provider.yaml +0 -32
- package/amf-models/dialects/Server.yaml +0 -31
- package/amf-models/dialects/Thing.yaml +0 -28
- package/bin/context.ts +0 -22
- package/bin/server.ts +0 -83
- package/build/src/authorization/AuthorizationError.d.ts +0 -24
- package/build/src/authorization/AuthorizationError.d.ts.map +0 -1
- package/build/src/authorization/AuthorizationError.js +0 -32
- package/build/src/authorization/AuthorizationError.js.map +0 -1
- package/build/src/authorization/CustomParameters.d.ts +0 -25
- package/build/src/authorization/CustomParameters.d.ts.map +0 -1
- package/build/src/authorization/CustomParameters.js +0 -61
- package/build/src/authorization/CustomParameters.js.map +0 -1
- package/build/src/authorization/OAuth2Authorization.d.ts +0 -333
- package/build/src/authorization/OAuth2Authorization.d.ts.map +0 -1
- package/build/src/authorization/OAuth2Authorization.js +0 -963
- package/build/src/authorization/OAuth2Authorization.js.map +0 -1
- package/build/src/authorization/OidcAuthorization.d.ts +0 -36
- package/build/src/authorization/OidcAuthorization.d.ts.map +0 -1
- package/build/src/authorization/OidcAuthorization.js +0 -146
- package/build/src/authorization/OidcAuthorization.js.map +0 -1
- package/build/src/authorization/Utils.d.ts +0 -52
- package/build/src/authorization/Utils.d.ts.map +0 -1
- package/build/src/authorization/Utils.js +0 -130
- package/build/src/authorization/Utils.js.map +0 -1
- package/build/src/authorization/index.d.ts +0 -10
- package/build/src/authorization/index.d.ts.map +0 -1
- package/build/src/authorization/index.js +0 -10
- package/build/src/authorization/index.js.map +0 -1
- package/build/src/authorization/lib/IframeAuthorization.d.ts +0 -54
- package/build/src/authorization/lib/IframeAuthorization.d.ts.map +0 -1
- package/build/src/authorization/lib/IframeAuthorization.js +0 -115
- package/build/src/authorization/lib/IframeAuthorization.js.map +0 -1
- package/build/src/authorization/lib/KnownGrants.d.ts +0 -7
- package/build/src/authorization/lib/KnownGrants.d.ts.map +0 -1
- package/build/src/authorization/lib/KnownGrants.js +0 -7
- package/build/src/authorization/lib/KnownGrants.js.map +0 -1
- package/build/src/authorization/lib/PopupAuthorization.d.ts +0 -42
- package/build/src/authorization/lib/PopupAuthorization.d.ts.map +0 -1
- package/build/src/authorization/lib/PopupAuthorization.js +0 -73
- package/build/src/authorization/lib/PopupAuthorization.js.map +0 -1
- package/build/src/authorization/lib/SecurityProcessor.d.ts +0 -67
- package/build/src/authorization/lib/SecurityProcessor.d.ts.map +0 -1
- package/build/src/authorization/lib/SecurityProcessor.js +0 -245
- package/build/src/authorization/lib/SecurityProcessor.js.map +0 -1
- package/build/src/authorization/lib/Tokens.d.ts +0 -56
- package/build/src/authorization/lib/Tokens.d.ts.map +0 -1
- package/build/src/authorization/lib/Tokens.js +0 -121
- package/build/src/authorization/lib/Tokens.js.map +0 -1
- package/build/src/authorization/lib/Utils.d.ts +0 -45
- package/build/src/authorization/lib/Utils.d.ts.map +0 -1
- package/build/src/authorization/lib/Utils.js +0 -91
- package/build/src/authorization/lib/Utils.js.map +0 -1
- package/build/src/authorization/types.d.ts +0 -196
- package/build/src/authorization/types.d.ts.map +0 -1
- package/build/src/authorization/types.js +0 -2
- package/build/src/authorization/types.js.map +0 -1
- package/build/src/cookies/CookieJar.d.ts +0 -24
- package/build/src/cookies/CookieJar.d.ts.map +0 -1
- package/build/src/cookies/CookieJar.js +0 -3
- package/build/src/cookies/CookieJar.js.map +0 -1
- package/build/src/cookies/CookieParser.d.ts +0 -81
- package/build/src/cookies/CookieParser.d.ts.map +0 -1
- package/build/src/cookies/CookieParser.js +0 -333
- package/build/src/cookies/CookieParser.js.map +0 -1
- package/build/src/cookies/InMemoryCookieJar.d.ts +0 -13
- package/build/src/cookies/InMemoryCookieJar.d.ts.map +0 -1
- package/build/src/cookies/InMemoryCookieJar.js +0 -68
- package/build/src/cookies/InMemoryCookieJar.js.map +0 -1
- package/build/src/cookies/Punycode.d.ts +0 -13
- package/build/src/cookies/Punycode.d.ts.map +0 -1
- package/build/src/cookies/Punycode.js +0 -127
- package/build/src/cookies/Punycode.js.map +0 -1
- package/build/src/data/DataExtractor.d.ts +0 -66
- package/build/src/data/DataExtractor.d.ts.map +0 -1
- package/build/src/data/DataExtractor.js +0 -178
- package/build/src/data/DataExtractor.js.map +0 -1
- package/build/src/data/DataReader.d.ts +0 -11
- package/build/src/data/DataReader.d.ts.map +0 -1
- package/build/src/data/DataReader.js +0 -4
- package/build/src/data/DataReader.js.map +0 -1
- package/build/src/data/JmespathReader.d.ts +0 -13
- package/build/src/data/JmespathReader.d.ts.map +0 -1
- package/build/src/data/JmespathReader.js +0 -27
- package/build/src/data/JmespathReader.js.map +0 -1
- package/build/src/data/Json2Xml.d.ts +0 -86
- package/build/src/data/Json2Xml.d.ts.map +0 -1
- package/build/src/data/Json2Xml.js +0 -187
- package/build/src/data/Json2Xml.js.map +0 -1
- package/build/src/data/JsonReader.d.ts +0 -9
- package/build/src/data/JsonReader.d.ts.map +0 -1
- package/build/src/data/JsonReader.js +0 -40
- package/build/src/data/JsonReader.js.map +0 -1
- package/build/src/data/PayloadPointer.d.ts +0 -22
- package/build/src/data/PayloadPointer.d.ts.map +0 -1
- package/build/src/data/PayloadPointer.js +0 -48
- package/build/src/data/PayloadPointer.js.map +0 -1
- package/build/src/data/RequestDataExtractor.d.ts +0 -49
- package/build/src/data/RequestDataExtractor.d.ts.map +0 -1
- package/build/src/data/RequestDataExtractor.js +0 -111
- package/build/src/data/RequestDataExtractor.js.map +0 -1
- package/build/src/data/UrlEncodedReader.d.ts +0 -13
- package/build/src/data/UrlEncodedReader.d.ts.map +0 -1
- package/build/src/data/UrlEncodedReader.js +0 -21
- package/build/src/data/UrlEncodedReader.js.map +0 -1
- package/build/src/data/XmlReader.d.ts +0 -15
- package/build/src/data/XmlReader.d.ts.map +0 -1
- package/build/src/data/XmlReader.js +0 -122
- package/build/src/data/XmlReader.js.map +0 -1
- package/build/src/data/index.d.ts +0 -10
- package/build/src/data/index.d.ts.map +0 -1
- package/build/src/data/index.js +0 -10
- package/build/src/data/index.js.map +0 -1
- package/build/src/events/authorization/AuthorizationEventTypes.d.ts +0 -23
- package/build/src/events/authorization/AuthorizationEventTypes.d.ts.map +0 -1
- package/build/src/events/authorization/AuthorizationEventTypes.js +0 -23
- package/build/src/events/authorization/AuthorizationEventTypes.js.map +0 -1
- package/build/src/events/authorization/AuthorizationEvents.d.ts +0 -35
- package/build/src/events/authorization/AuthorizationEvents.d.ts.map +0 -1
- package/build/src/events/authorization/AuthorizationEvents.js +0 -55
- package/build/src/events/authorization/AuthorizationEvents.js.map +0 -1
- package/build/src/events/cookies/CookieEventTypes.d.ts +0 -14
- package/build/src/events/cookies/CookieEventTypes.d.ts.map +0 -1
- package/build/src/events/cookies/CookieEventTypes.js +0 -14
- package/build/src/events/cookies/CookieEventTypes.js.map +0 -1
- package/build/src/events/cookies/CookieEvents.d.ts +0 -92
- package/build/src/events/cookies/CookieEvents.d.ts.map +0 -1
- package/build/src/events/cookies/CookieEvents.js +0 -128
- package/build/src/events/cookies/CookieEvents.js.map +0 -1
- package/build/src/events/environment/EnvironmentEventTypes.d.ts +0 -4
- package/build/src/events/environment/EnvironmentEventTypes.d.ts.map +0 -1
- package/build/src/events/environment/EnvironmentEventTypes.js +0 -4
- package/build/src/events/environment/EnvironmentEventTypes.js.map +0 -1
- package/build/src/events/environment/EnvironmentEvents.d.ts +0 -16
- package/build/src/events/environment/EnvironmentEvents.d.ts.map +0 -1
- package/build/src/events/environment/EnvironmentEvents.js +0 -20
- package/build/src/events/environment/EnvironmentEvents.js.map +0 -1
- package/build/src/events/transport/TransportEventTypes.d.ts +0 -30
- package/build/src/events/transport/TransportEventTypes.d.ts.map +0 -1
- package/build/src/events/transport/TransportEventTypes.js +0 -31
- package/build/src/events/transport/TransportEventTypes.js.map +0 -1
- package/build/src/events/transport/TransportEvents.d.ts +0 -63
- package/build/src/events/transport/TransportEvents.d.ts.map +0 -1
- package/build/src/events/transport/TransportEvents.js +0 -77
- package/build/src/events/transport/TransportEvents.js.map +0 -1
- package/build/src/legacy.d.ts +0 -40
- package/build/src/legacy.d.ts.map +0 -1
- package/build/src/legacy.js +0 -40
- package/build/src/legacy.js.map +0 -1
- package/build/src/lib/Buffer.d.ts +0 -21
- package/build/src/lib/Buffer.d.ts.map +0 -1
- package/build/src/lib/Buffer.js +0 -57
- package/build/src/lib/Buffer.js.map +0 -1
- package/build/src/lib/definitions/HttpDefinitions.d.ts +0 -35
- package/build/src/lib/definitions/HttpDefinitions.d.ts.map +0 -1
- package/build/src/lib/definitions/HttpDefinitions.js +0 -59
- package/build/src/lib/definitions/HttpDefinitions.js.map +0 -1
- package/build/src/lib/fs/Fs.d.ts +0 -53
- package/build/src/lib/fs/Fs.d.ts.map +0 -1
- package/build/src/lib/fs/Fs.js +0 -245
- package/build/src/lib/fs/Fs.js.map +0 -1
- package/build/src/lib/headers/HeadersData.d.ts +0 -36
- package/build/src/lib/headers/HeadersData.d.ts.map +0 -1
- package/build/src/lib/headers/HeadersData.js +0 -657
- package/build/src/lib/headers/HeadersData.js.map +0 -1
- package/build/src/lib/parsers/UriTemplate.d.ts +0 -110
- package/build/src/lib/parsers/UriTemplate.d.ts.map +0 -1
- package/build/src/lib/parsers/UriTemplate.js +0 -437
- package/build/src/lib/parsers/UriTemplate.js.map +0 -1
- package/build/src/lib/parsers/UrlEncoder.d.ts +0 -57
- package/build/src/lib/parsers/UrlEncoder.d.ts.map +0 -1
- package/build/src/lib/parsers/UrlEncoder.js +0 -125
- package/build/src/lib/parsers/UrlEncoder.js.map +0 -1
- package/build/src/lib/parsers/UrlParser.d.ts +0 -105
- package/build/src/lib/parsers/UrlParser.d.ts.map +0 -1
- package/build/src/lib/parsers/UrlParser.js +0 -190
- package/build/src/lib/parsers/UrlParser.js.map +0 -1
- package/build/src/lib/parsers/UrlProcessor.d.ts +0 -285
- package/build/src/lib/parsers/UrlProcessor.d.ts.map +0 -1
- package/build/src/lib/parsers/UrlProcessor.js +0 -763
- package/build/src/lib/parsers/UrlProcessor.js.map +0 -1
- package/build/src/lib/parsers/UrlValueParser.d.ts +0 -93
- package/build/src/lib/parsers/UrlValueParser.d.ts.map +0 -1
- package/build/src/lib/parsers/UrlValueParser.js +0 -172
- package/build/src/lib/parsers/UrlValueParser.js.map +0 -1
- package/build/src/lib/timers/Timers.d.ts +0 -15
- package/build/src/lib/timers/Timers.d.ts.map +0 -1
- package/build/src/lib/timers/Timers.js +0 -28
- package/build/src/lib/timers/Timers.js.map +0 -1
- package/build/src/lib/transformers/PayloadSerializer.d.ts +0 -221
- package/build/src/lib/transformers/PayloadSerializer.d.ts.map +0 -1
- package/build/src/lib/transformers/PayloadSerializer.js +0 -423
- package/build/src/lib/transformers/PayloadSerializer.js.map +0 -1
- package/build/src/mocking/LegacyInterfaces.d.ts +0 -47
- package/build/src/mocking/LegacyInterfaces.d.ts.map +0 -1
- package/build/src/mocking/LegacyInterfaces.js +0 -2
- package/build/src/mocking/LegacyInterfaces.js.map +0 -1
- package/build/src/mocking/LegacyMock.d.ts +0 -25
- package/build/src/mocking/LegacyMock.d.ts.map +0 -1
- package/build/src/mocking/LegacyMock.js +0 -34
- package/build/src/mocking/LegacyMock.js.map +0 -1
- package/build/src/mocking/ProjectMock.d.ts +0 -27
- package/build/src/mocking/ProjectMock.d.ts.map +0 -1
- package/build/src/mocking/ProjectMock.js +0 -31
- package/build/src/mocking/ProjectMock.js.map +0 -1
- package/build/src/mocking/legacy/Authorization.d.ts +0 -21
- package/build/src/mocking/legacy/Authorization.d.ts.map +0 -1
- package/build/src/mocking/legacy/Authorization.js +0 -35
- package/build/src/mocking/legacy/Authorization.js.map +0 -1
- package/build/src/mocking/legacy/Certificates.d.ts +0 -57
- package/build/src/mocking/legacy/Certificates.d.ts.map +0 -1
- package/build/src/mocking/legacy/Certificates.js +0 -128
- package/build/src/mocking/legacy/Certificates.js.map +0 -1
- package/build/src/mocking/legacy/Cookies.d.ts +0 -22
- package/build/src/mocking/legacy/Cookies.d.ts.map +0 -1
- package/build/src/mocking/legacy/Cookies.js +0 -48
- package/build/src/mocking/legacy/Cookies.js.map +0 -1
- package/build/src/mocking/legacy/HostRules.d.ts +0 -23
- package/build/src/mocking/legacy/HostRules.d.ts.map +0 -1
- package/build/src/mocking/legacy/HostRules.js +0 -40
- package/build/src/mocking/legacy/HostRules.js.map +0 -1
- package/build/src/mocking/legacy/Http.d.ts +0 -85
- package/build/src/mocking/legacy/Http.d.ts.map +0 -1
- package/build/src/mocking/legacy/Http.js +0 -199
- package/build/src/mocking/legacy/Http.js.map +0 -1
- package/build/src/mocking/legacy/HttpResponse.d.ts +0 -24
- package/build/src/mocking/legacy/HttpResponse.d.ts.map +0 -1
- package/build/src/mocking/legacy/HttpResponse.js +0 -98
- package/build/src/mocking/legacy/HttpResponse.js.map +0 -1
- package/build/src/mocking/legacy/RestApi.d.ts +0 -16
- package/build/src/mocking/legacy/RestApi.d.ts.map +0 -1
- package/build/src/mocking/legacy/RestApi.js +0 -63
- package/build/src/mocking/legacy/RestApi.js.map +0 -1
- package/build/src/mocking/legacy/Urls.d.ts +0 -22
- package/build/src/mocking/legacy/Urls.d.ts.map +0 -1
- package/build/src/mocking/legacy/Urls.js +0 -41
- package/build/src/mocking/legacy/Urls.js.map +0 -1
- package/build/src/mocking/legacy/Variables.d.ts +0 -19
- package/build/src/mocking/legacy/Variables.d.ts.map +0 -1
- package/build/src/mocking/legacy/Variables.js +0 -51
- package/build/src/mocking/legacy/Variables.js.map +0 -1
- package/build/src/mocking/lib/Certificates.d.ts +0 -28
- package/build/src/mocking/lib/Certificates.d.ts.map +0 -1
- package/build/src/mocking/lib/Certificates.js +0 -55
- package/build/src/mocking/lib/Certificates.js.map +0 -1
- package/build/src/mocking/lib/History.d.ts +0 -75
- package/build/src/mocking/lib/History.d.ts.map +0 -1
- package/build/src/mocking/lib/History.js +0 -128
- package/build/src/mocking/lib/History.js.map +0 -1
- package/build/src/mocking/lib/HostRules.d.ts +0 -23
- package/build/src/mocking/lib/HostRules.d.ts.map +0 -1
- package/build/src/mocking/lib/HostRules.js +0 -40
- package/build/src/mocking/lib/HostRules.js.map +0 -1
- package/build/src/mocking/lib/Request.d.ts +0 -44
- package/build/src/mocking/lib/Request.d.ts.map +0 -1
- package/build/src/mocking/lib/Request.js +0 -70
- package/build/src/mocking/lib/Request.js.map +0 -1
- package/build/src/mocking/lib/Response.d.ts +0 -38
- package/build/src/mocking/lib/Response.d.ts.map +0 -1
- package/build/src/mocking/lib/Response.js +0 -99
- package/build/src/mocking/lib/Response.js.map +0 -1
- package/build/src/mocking/lib/Url.d.ts +0 -22
- package/build/src/mocking/lib/Url.d.ts.map +0 -1
- package/build/src/mocking/lib/Url.js +0 -40
- package/build/src/mocking/lib/Url.js.map +0 -1
- package/build/src/models/Authorization.d.ts +0 -452
- package/build/src/models/Authorization.d.ts.map +0 -1
- package/build/src/models/Authorization.js +0 -2
- package/build/src/models/Authorization.js.map +0 -1
- package/build/src/models/AuthorizationData.d.ts +0 -30
- package/build/src/models/AuthorizationData.d.ts.map +0 -1
- package/build/src/models/AuthorizationData.js +0 -59
- package/build/src/models/AuthorizationData.js.map +0 -1
- package/build/src/models/CertificateFile.d.ts +0 -19
- package/build/src/models/CertificateFile.d.ts.map +0 -1
- package/build/src/models/CertificateFile.js +0 -70
- package/build/src/models/CertificateFile.js.map +0 -1
- package/build/src/models/ClientCertificate.d.ts +0 -188
- package/build/src/models/ClientCertificate.d.ts.map +0 -1
- package/build/src/models/ClientCertificate.js +0 -193
- package/build/src/models/ClientCertificate.js.map +0 -1
- package/build/src/models/Environment.d.ts +0 -134
- package/build/src/models/Environment.d.ts.map +0 -1
- package/build/src/models/Environment.js +0 -256
- package/build/src/models/Environment.js.map +0 -1
- package/build/src/models/ErrorResponse.d.ts +0 -37
- package/build/src/models/ErrorResponse.d.ts.map +0 -1
- package/build/src/models/ErrorResponse.js +0 -103
- package/build/src/models/ErrorResponse.js.map +0 -1
- package/build/src/models/HeadersArray.d.ts +0 -22
- package/build/src/models/HeadersArray.d.ts.map +0 -1
- package/build/src/models/HeadersArray.js +0 -58
- package/build/src/models/HeadersArray.js.map +0 -1
- package/build/src/models/HostRule.d.ts +0 -87
- package/build/src/models/HostRule.d.ts.map +0 -1
- package/build/src/models/HostRule.js +0 -142
- package/build/src/models/HostRule.js.map +0 -1
- package/build/src/models/HttpCookie.d.ts +0 -175
- package/build/src/models/HttpCookie.d.ts.map +0 -1
- package/build/src/models/HttpCookie.js +0 -343
- package/build/src/models/HttpCookie.js.map +0 -1
- package/build/src/models/HttpHistory.d.ts +0 -143
- package/build/src/models/HttpHistory.d.ts.map +0 -1
- package/build/src/models/HttpHistory.js +0 -179
- package/build/src/models/HttpHistory.js.map +0 -1
- package/build/src/models/HttpProject.d.ts +0 -540
- package/build/src/models/HttpProject.d.ts.map +0 -1
- package/build/src/models/HttpProject.js +0 -1237
- package/build/src/models/HttpProject.js.map +0 -1
- package/build/src/models/HttpRequest.d.ts +0 -88
- package/build/src/models/HttpRequest.d.ts.map +0 -1
- package/build/src/models/HttpRequest.js +0 -127
- package/build/src/models/HttpRequest.js.map +0 -1
- package/build/src/models/HttpResponse.d.ts +0 -54
- package/build/src/models/HttpResponse.d.ts.map +0 -1
- package/build/src/models/HttpResponse.js +0 -114
- package/build/src/models/HttpResponse.js.map +0 -1
- package/build/src/models/License.d.ts +0 -53
- package/build/src/models/License.d.ts.map +0 -1
- package/build/src/models/License.js +0 -91
- package/build/src/models/License.js.map +0 -1
- package/build/src/models/Project.d.ts +0 -27
- package/build/src/models/Project.d.ts.map +0 -1
- package/build/src/models/Project.js +0 -81
- package/build/src/models/Project.js.map +0 -1
- package/build/src/models/ProjectDefinitionProperty.d.ts +0 -35
- package/build/src/models/ProjectDefinitionProperty.d.ts.map +0 -1
- package/build/src/models/ProjectDefinitionProperty.js +0 -2
- package/build/src/models/ProjectDefinitionProperty.js.map +0 -1
- package/build/src/models/ProjectExecution.d.ts +0 -116
- package/build/src/models/ProjectExecution.d.ts.map +0 -1
- package/build/src/models/ProjectExecution.js +0 -147
- package/build/src/models/ProjectExecution.js.map +0 -1
- package/build/src/models/ProjectFolder.d.ts +0 -219
- package/build/src/models/ProjectFolder.d.ts.map +0 -1
- package/build/src/models/ProjectFolder.js +0 -341
- package/build/src/models/ProjectFolder.js.map +0 -1
- package/build/src/models/ProjectItem.d.ts +0 -68
- package/build/src/models/ProjectItem.d.ts.map +0 -1
- package/build/src/models/ProjectItem.js +0 -139
- package/build/src/models/ProjectItem.js.map +0 -1
- package/build/src/models/ProjectParent.d.ts +0 -27
- package/build/src/models/ProjectParent.d.ts.map +0 -1
- package/build/src/models/ProjectParent.js +0 -19
- package/build/src/models/ProjectParent.js.map +0 -1
- package/build/src/models/ProjectRequest.d.ts +0 -203
- package/build/src/models/ProjectRequest.d.ts.map +0 -1
- package/build/src/models/ProjectRequest.js +0 -440
- package/build/src/models/ProjectRequest.js.map +0 -1
- package/build/src/models/ProjectSchema.d.ts +0 -106
- package/build/src/models/ProjectSchema.d.ts.map +0 -1
- package/build/src/models/ProjectSchema.js +0 -156
- package/build/src/models/ProjectSchema.js.map +0 -1
- package/build/src/models/Property.d.ts +0 -140
- package/build/src/models/Property.d.ts.map +0 -1
- package/build/src/models/Property.js +0 -427
- package/build/src/models/Property.js.map +0 -1
- package/build/src/models/Provider.d.ts +0 -54
- package/build/src/models/Provider.d.ts.map +0 -1
- package/build/src/models/Provider.js +0 -75
- package/build/src/models/Provider.js.map +0 -1
- package/build/src/models/Request.d.ts +0 -175
- package/build/src/models/Request.d.ts.map +0 -1
- package/build/src/models/Request.js +0 -398
- package/build/src/models/Request.js.map +0 -1
- package/build/src/models/RequestAuthorization.d.ts +0 -58
- package/build/src/models/RequestAuthorization.d.ts.map +0 -1
- package/build/src/models/RequestAuthorization.js +0 -88
- package/build/src/models/RequestAuthorization.js.map +0 -1
- package/build/src/models/RequestConfig.d.ts +0 -174
- package/build/src/models/RequestConfig.d.ts.map +0 -1
- package/build/src/models/RequestConfig.js +0 -274
- package/build/src/models/RequestConfig.js.map +0 -1
- package/build/src/models/RequestLog.d.ts +0 -88
- package/build/src/models/RequestLog.d.ts.map +0 -1
- package/build/src/models/RequestLog.js +0 -158
- package/build/src/models/RequestLog.js.map +0 -1
- package/build/src/models/RequestTime.d.ts +0 -35
- package/build/src/models/RequestTime.d.ts.map +0 -1
- package/build/src/models/RequestTime.js +0 -89
- package/build/src/models/RequestTime.js.map +0 -1
- package/build/src/models/RequestUiMeta.d.ts +0 -166
- package/build/src/models/RequestUiMeta.d.ts.map +0 -1
- package/build/src/models/RequestUiMeta.js +0 -110
- package/build/src/models/RequestUiMeta.js.map +0 -1
- package/build/src/models/RequestsSize.d.ts +0 -33
- package/build/src/models/RequestsSize.d.ts.map +0 -1
- package/build/src/models/RequestsSize.js +0 -50
- package/build/src/models/RequestsSize.js.map +0 -1
- package/build/src/models/Response.d.ts +0 -61
- package/build/src/models/Response.d.ts.map +0 -1
- package/build/src/models/Response.js +0 -140
- package/build/src/models/Response.js.map +0 -1
- package/build/src/models/ResponseAuthorization.d.ts +0 -55
- package/build/src/models/ResponseAuthorization.d.ts.map +0 -1
- package/build/src/models/ResponseAuthorization.js +0 -82
- package/build/src/models/ResponseAuthorization.js.map +0 -1
- package/build/src/models/ResponseRedirect.d.ts +0 -72
- package/build/src/models/ResponseRedirect.d.ts.map +0 -1
- package/build/src/models/ResponseRedirect.js +0 -125
- package/build/src/models/ResponseRedirect.js.map +0 -1
- package/build/src/models/SentRequest.d.ts +0 -61
- package/build/src/models/SentRequest.d.ts.map +0 -1
- package/build/src/models/SentRequest.js +0 -91
- package/build/src/models/SentRequest.js.map +0 -1
- package/build/src/models/SerializablePayload.d.ts +0 -60
- package/build/src/models/SerializablePayload.d.ts.map +0 -1
- package/build/src/models/SerializablePayload.js +0 -79
- package/build/src/models/SerializablePayload.js.map +0 -1
- package/build/src/models/Server.d.ts +0 -89
- package/build/src/models/Server.d.ts.map +0 -1
- package/build/src/models/Server.js +0 -151
- package/build/src/models/Server.js.map +0 -1
- package/build/src/models/Url.d.ts +0 -50
- package/build/src/models/Url.d.ts.map +0 -1
- package/build/src/models/Url.js +0 -69
- package/build/src/models/Url.js.map +0 -1
- package/build/src/models/http-flows/AssertionError.d.ts +0 -37
- package/build/src/models/http-flows/AssertionError.d.ts.map +0 -1
- package/build/src/models/http-flows/AssertionError.js +0 -35
- package/build/src/models/http-flows/AssertionError.js.map +0 -1
- package/build/src/models/http-flows/HttpAssertion.d.ts +0 -86
- package/build/src/models/http-flows/HttpAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/HttpAssertion.js +0 -53
- package/build/src/models/http-flows/HttpAssertion.js.map +0 -1
- package/build/src/models/http-flows/HttpFlows.d.ts +0 -78
- package/build/src/models/http-flows/HttpFlows.d.ts.map +0 -1
- package/build/src/models/http-flows/HttpFlows.js +0 -35
- package/build/src/models/http-flows/HttpFlows.js.map +0 -1
- package/build/src/models/http-flows/HttpStep.d.ts +0 -30
- package/build/src/models/http-flows/HttpStep.d.ts.map +0 -1
- package/build/src/models/http-flows/HttpStep.js +0 -30
- package/build/src/models/http-flows/HttpStep.js.map +0 -1
- package/build/src/models/http-flows/LegacyTranslator.d.ts +0 -18
- package/build/src/models/http-flows/LegacyTranslator.d.ts.map +0 -1
- package/build/src/models/http-flows/LegacyTranslator.js +0 -278
- package/build/src/models/http-flows/LegacyTranslator.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/EqualAssertion.d.ts +0 -75
- package/build/src/models/http-flows/steps/assertion/EqualAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/EqualAssertion.js +0 -79
- package/build/src/models/http-flows/steps/assertion/EqualAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/GreaterThanAssertion.d.ts +0 -35
- package/build/src/models/http-flows/steps/assertion/GreaterThanAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/GreaterThanAssertion.js +0 -59
- package/build/src/models/http-flows/steps/assertion/GreaterThanAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/IncludesAssertion.d.ts +0 -27
- package/build/src/models/http-flows/steps/assertion/IncludesAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/IncludesAssertion.js +0 -45
- package/build/src/models/http-flows/steps/assertion/IncludesAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/IsEmptyAssertion.d.ts +0 -19
- package/build/src/models/http-flows/steps/assertion/IsEmptyAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/IsEmptyAssertion.js +0 -29
- package/build/src/models/http-flows/steps/assertion/IsEmptyAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/IsNotEmptyAssertion.d.ts +0 -19
- package/build/src/models/http-flows/steps/assertion/IsNotEmptyAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/IsNotEmptyAssertion.js +0 -29
- package/build/src/models/http-flows/steps/assertion/IsNotEmptyAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/LengthOfAssertion.d.ts +0 -27
- package/build/src/models/http-flows/steps/assertion/LengthOfAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/LengthOfAssertion.js +0 -45
- package/build/src/models/http-flows/steps/assertion/LengthOfAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/LessThanAssertion.d.ts +0 -35
- package/build/src/models/http-flows/steps/assertion/LessThanAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/LessThanAssertion.js +0 -59
- package/build/src/models/http-flows/steps/assertion/LessThanAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/MatchesAssertion.d.ts +0 -27
- package/build/src/models/http-flows/steps/assertion/MatchesAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/MatchesAssertion.js +0 -45
- package/build/src/models/http-flows/steps/assertion/MatchesAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/MatchesSchemaAssertion.d.ts +0 -39
- package/build/src/models/http-flows/steps/assertion/MatchesSchemaAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/MatchesSchemaAssertion.js +0 -60
- package/build/src/models/http-flows/steps/assertion/MatchesSchemaAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotEqualAssertion.d.ts +0 -75
- package/build/src/models/http-flows/steps/assertion/NotEqualAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotEqualAssertion.js +0 -79
- package/build/src/models/http-flows/steps/assertion/NotEqualAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotIncludesAssertion.d.ts +0 -27
- package/build/src/models/http-flows/steps/assertion/NotIncludesAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotIncludesAssertion.js +0 -45
- package/build/src/models/http-flows/steps/assertion/NotIncludesAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotOkAssertion.d.ts +0 -19
- package/build/src/models/http-flows/steps/assertion/NotOkAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotOkAssertion.js +0 -29
- package/build/src/models/http-flows/steps/assertion/NotOkAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotToBeAssertion.d.ts +0 -28
- package/build/src/models/http-flows/steps/assertion/NotToBeAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/NotToBeAssertion.js +0 -45
- package/build/src/models/http-flows/steps/assertion/NotToBeAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/OkAssertion.d.ts +0 -19
- package/build/src/models/http-flows/steps/assertion/OkAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/OkAssertion.js +0 -29
- package/build/src/models/http-flows/steps/assertion/OkAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/ToBeAssertion.d.ts +0 -34
- package/build/src/models/http-flows/steps/assertion/ToBeAssertion.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/ToBeAssertion.js +0 -53
- package/build/src/models/http-flows/steps/assertion/ToBeAssertion.js.map +0 -1
- package/build/src/models/http-flows/steps/assertion/index.d.ts +0 -16
- package/build/src/models/http-flows/steps/assertion/index.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/assertion/index.js +0 -16
- package/build/src/models/http-flows/steps/assertion/index.js.map +0 -1
- package/build/src/models/http-flows/steps/data/DeleteCookieStep.d.ts +0 -49
- package/build/src/models/http-flows/steps/data/DeleteCookieStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/DeleteCookieStep.js +0 -73
- package/build/src/models/http-flows/steps/data/DeleteCookieStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/DeleteVariableStep.d.ts +0 -37
- package/build/src/models/http-flows/steps/data/DeleteVariableStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/DeleteVariableStep.js +0 -45
- package/build/src/models/http-flows/steps/data/DeleteVariableStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/ReadDataSourceStep.d.ts +0 -54
- package/build/src/models/http-flows/steps/data/ReadDataSourceStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/ReadDataSourceStep.js +0 -60
- package/build/src/models/http-flows/steps/data/ReadDataSourceStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/ReadDataStep.d.ts +0 -68
- package/build/src/models/http-flows/steps/data/ReadDataStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/ReadDataStep.js +0 -78
- package/build/src/models/http-flows/steps/data/ReadDataStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/ReadValueStep.d.ts +0 -46
- package/build/src/models/http-flows/steps/data/ReadValueStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/ReadValueStep.js +0 -53
- package/build/src/models/http-flows/steps/data/ReadValueStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/SetCookieStep.d.ts +0 -102
- package/build/src/models/http-flows/steps/data/SetCookieStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/SetCookieStep.js +0 -139
- package/build/src/models/http-flows/steps/data/SetCookieStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/SetDataStep.d.ts +0 -78
- package/build/src/models/http-flows/steps/data/SetDataStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/SetDataStep.js +0 -70
- package/build/src/models/http-flows/steps/data/SetDataStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/SetVariableStep.d.ts +0 -41
- package/build/src/models/http-flows/steps/data/SetVariableStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/SetVariableStep.js +0 -45
- package/build/src/models/http-flows/steps/data/SetVariableStep.js.map +0 -1
- package/build/src/models/http-flows/steps/data/index.d.ts +0 -9
- package/build/src/models/http-flows/steps/data/index.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/data/index.js +0 -9
- package/build/src/models/http-flows/steps/data/index.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/AsLowerCaseStep.d.ts +0 -19
- package/build/src/models/http-flows/steps/transformation/AsLowerCaseStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/AsLowerCaseStep.js +0 -29
- package/build/src/models/http-flows/steps/transformation/AsLowerCaseStep.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/AsNumberStep.d.ts +0 -19
- package/build/src/models/http-flows/steps/transformation/AsNumberStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/AsNumberStep.js +0 -29
- package/build/src/models/http-flows/steps/transformation/AsNumberStep.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/AsUpperCaseStep.d.ts +0 -19
- package/build/src/models/http-flows/steps/transformation/AsUpperCaseStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/AsUpperCaseStep.js +0 -29
- package/build/src/models/http-flows/steps/transformation/AsUpperCaseStep.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/RoundStep.d.ts +0 -44
- package/build/src/models/http-flows/steps/transformation/RoundStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/RoundStep.js +0 -53
- package/build/src/models/http-flows/steps/transformation/RoundStep.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/SubstringStep.d.ts +0 -41
- package/build/src/models/http-flows/steps/transformation/SubstringStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/SubstringStep.js +0 -67
- package/build/src/models/http-flows/steps/transformation/SubstringStep.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/TrimStep.d.ts +0 -21
- package/build/src/models/http-flows/steps/transformation/TrimStep.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/TrimStep.js +0 -30
- package/build/src/models/http-flows/steps/transformation/TrimStep.js.map +0 -1
- package/build/src/models/http-flows/steps/transformation/index.d.ts +0 -7
- package/build/src/models/http-flows/steps/transformation/index.d.ts.map +0 -1
- package/build/src/models/http-flows/steps/transformation/index.js +0 -7
- package/build/src/models/http-flows/steps/transformation/index.js.map +0 -1
- package/build/src/models/legacy/DataExport.d.ts +0 -243
- package/build/src/models/legacy/DataExport.d.ts.map +0 -1
- package/build/src/models/legacy/DataExport.js +0 -2
- package/build/src/models/legacy/DataExport.js.map +0 -1
- package/build/src/models/legacy/Normalizer.d.ts +0 -12
- package/build/src/models/legacy/Normalizer.d.ts.map +0 -1
- package/build/src/models/legacy/Normalizer.js +0 -98
- package/build/src/models/legacy/Normalizer.js.map +0 -1
- package/build/src/models/legacy/actions/Actions.d.ts +0 -259
- package/build/src/models/legacy/actions/Actions.d.ts.map +0 -1
- package/build/src/models/legacy/actions/Actions.js +0 -2
- package/build/src/models/legacy/actions/Actions.js.map +0 -1
- package/build/src/models/legacy/authorization/Authorization.d.ts +0 -542
- package/build/src/models/legacy/authorization/Authorization.d.ts.map +0 -1
- package/build/src/models/legacy/authorization/Authorization.js +0 -2
- package/build/src/models/legacy/authorization/Authorization.js.map +0 -1
- package/build/src/models/legacy/models/ApiTypes.d.ts +0 -193
- package/build/src/models/legacy/models/ApiTypes.d.ts.map +0 -1
- package/build/src/models/legacy/models/ApiTypes.js +0 -2
- package/build/src/models/legacy/models/ApiTypes.js.map +0 -1
- package/build/src/models/legacy/models/ArcLegacyProject.d.ts +0 -38
- package/build/src/models/legacy/models/ArcLegacyProject.d.ts.map +0 -1
- package/build/src/models/legacy/models/ArcLegacyProject.js +0 -2
- package/build/src/models/legacy/models/ArcLegacyProject.js.map +0 -1
- package/build/src/models/legacy/models/AuthData.d.ts +0 -15
- package/build/src/models/legacy/models/AuthData.d.ts.map +0 -1
- package/build/src/models/legacy/models/AuthData.js +0 -2
- package/build/src/models/legacy/models/AuthData.js.map +0 -1
- package/build/src/models/legacy/models/ClientCertificate.d.ts +0 -90
- package/build/src/models/legacy/models/ClientCertificate.d.ts.map +0 -1
- package/build/src/models/legacy/models/ClientCertificate.js +0 -2
- package/build/src/models/legacy/models/ClientCertificate.js.map +0 -1
- package/build/src/models/legacy/models/Cookies.d.ts +0 -53
- package/build/src/models/legacy/models/Cookies.d.ts.map +0 -1
- package/build/src/models/legacy/models/Cookies.js +0 -2
- package/build/src/models/legacy/models/Cookies.js.map +0 -1
- package/build/src/models/legacy/models/HostRule.d.ts +0 -34
- package/build/src/models/legacy/models/HostRule.d.ts.map +0 -1
- package/build/src/models/legacy/models/HostRule.js +0 -2
- package/build/src/models/legacy/models/HostRule.js.map +0 -1
- package/build/src/models/legacy/models/RestApi.d.ts +0 -48
- package/build/src/models/legacy/models/RestApi.d.ts.map +0 -1
- package/build/src/models/legacy/models/RestApi.js +0 -2
- package/build/src/models/legacy/models/RestApi.js.map +0 -1
- package/build/src/models/legacy/models/UrlHistory.d.ts +0 -33
- package/build/src/models/legacy/models/UrlHistory.d.ts.map +0 -1
- package/build/src/models/legacy/models/UrlHistory.js +0 -2
- package/build/src/models/legacy/models/UrlHistory.js.map +0 -1
- package/build/src/models/legacy/models/Variable.d.ts +0 -37
- package/build/src/models/legacy/models/Variable.d.ts.map +0 -1
- package/build/src/models/legacy/models/Variable.js +0 -2
- package/build/src/models/legacy/models/Variable.js.map +0 -1
- package/build/src/models/legacy/models/base.d.ts +0 -91
- package/build/src/models/legacy/models/base.d.ts.map +0 -1
- package/build/src/models/legacy/models/base.js +0 -2
- package/build/src/models/legacy/models/base.js.map +0 -1
- package/build/src/models/legacy/request/ArcRequest.d.ts +0 -387
- package/build/src/models/legacy/request/ArcRequest.d.ts.map +0 -1
- package/build/src/models/legacy/request/ArcRequest.js +0 -2
- package/build/src/models/legacy/request/ArcRequest.js.map +0 -1
- package/build/src/models/legacy/request/ArcResponse.d.ts +0 -166
- package/build/src/models/legacy/request/ArcResponse.d.ts.map +0 -1
- package/build/src/models/legacy/request/ArcResponse.js +0 -2
- package/build/src/models/legacy/request/ArcResponse.js.map +0 -1
- package/build/src/models/legacy/request/HistoryData.d.ts +0 -45
- package/build/src/models/legacy/request/HistoryData.d.ts.map +0 -1
- package/build/src/models/legacy/request/HistoryData.js +0 -2
- package/build/src/models/legacy/request/HistoryData.js.map +0 -1
- package/build/src/models/legacy/request/Legacy.d.ts +0 -43
- package/build/src/models/legacy/request/Legacy.d.ts.map +0 -1
- package/build/src/models/legacy/request/Legacy.js +0 -2
- package/build/src/models/legacy/request/Legacy.js.map +0 -1
- package/build/src/models/legacy/request/RequestBody.d.ts +0 -83
- package/build/src/models/legacy/request/RequestBody.d.ts.map +0 -1
- package/build/src/models/legacy/request/RequestBody.js +0 -2
- package/build/src/models/legacy/request/RequestBody.js.map +0 -1
- package/build/src/models/transformers/ArcDexieTransformer.d.ts +0 -109
- package/build/src/models/transformers/ArcDexieTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/ArcDexieTransformer.js +0 -249
- package/build/src/models/transformers/ArcDexieTransformer.js.map +0 -1
- package/build/src/models/transformers/ArcLegacyNormalizer.d.ts +0 -43
- package/build/src/models/transformers/ArcLegacyNormalizer.d.ts.map +0 -1
- package/build/src/models/transformers/ArcLegacyNormalizer.js +0 -79
- package/build/src/models/transformers/ArcLegacyNormalizer.js.map +0 -1
- package/build/src/models/transformers/ArcLegacyTransformer.d.ts +0 -86
- package/build/src/models/transformers/ArcLegacyTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/ArcLegacyTransformer.js +0 -151
- package/build/src/models/transformers/ArcLegacyTransformer.js.map +0 -1
- package/build/src/models/transformers/ArcPouchTransformer.d.ts +0 -46
- package/build/src/models/transformers/ArcPouchTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/ArcPouchTransformer.js +0 -170
- package/build/src/models/transformers/ArcPouchTransformer.js.map +0 -1
- package/build/src/models/transformers/BaseTransformer.d.ts +0 -49
- package/build/src/models/transformers/BaseTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/BaseTransformer.js +0 -104
- package/build/src/models/transformers/BaseTransformer.js.map +0 -1
- package/build/src/models/transformers/ImportUtils.d.ts +0 -45
- package/build/src/models/transformers/ImportUtils.d.ts.map +0 -1
- package/build/src/models/transformers/ImportUtils.js +0 -131
- package/build/src/models/transformers/ImportUtils.js.map +0 -1
- package/build/src/models/transformers/LegacyDataExportToApiProject.d.ts +0 -16
- package/build/src/models/transformers/LegacyDataExportToApiProject.d.ts.map +0 -1
- package/build/src/models/transformers/LegacyDataExportToApiProject.js +0 -70
- package/build/src/models/transformers/LegacyDataExportToApiProject.js.map +0 -1
- package/build/src/models/transformers/LegacyExportProcessor.d.ts +0 -48
- package/build/src/models/transformers/LegacyExportProcessor.d.ts.map +0 -1
- package/build/src/models/transformers/LegacyExportProcessor.js +0 -214
- package/build/src/models/transformers/LegacyExportProcessor.js.map +0 -1
- package/build/src/models/transformers/PostmanBackupTransformer.d.ts +0 -97
- package/build/src/models/transformers/PostmanBackupTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/PostmanBackupTransformer.js +0 -185
- package/build/src/models/transformers/PostmanBackupTransformer.js.map +0 -1
- package/build/src/models/transformers/PostmanDataTransformer.d.ts +0 -10
- package/build/src/models/transformers/PostmanDataTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/PostmanDataTransformer.js +0 -50
- package/build/src/models/transformers/PostmanDataTransformer.js.map +0 -1
- package/build/src/models/transformers/PostmanTransformer.d.ts +0 -50
- package/build/src/models/transformers/PostmanTransformer.d.ts.map +0 -1
- package/build/src/models/transformers/PostmanTransformer.js +0 -90
- package/build/src/models/transformers/PostmanTransformer.js.map +0 -1
- package/build/src/models/transformers/PostmanV21Transformer.d.ts +0 -129
- package/build/src/models/transformers/PostmanV21Transformer.d.ts.map +0 -1
- package/build/src/models/transformers/PostmanV21Transformer.js +0 -196
- package/build/src/models/transformers/PostmanV21Transformer.js.map +0 -1
- package/build/src/models/transformers/PostmanV2Transformer.d.ts +0 -129
- package/build/src/models/transformers/PostmanV2Transformer.d.ts.map +0 -1
- package/build/src/models/transformers/PostmanV2Transformer.js +0 -196
- package/build/src/models/transformers/PostmanV2Transformer.js.map +0 -1
- package/build/src/models/transformers/har.d.ts +0 -858
- package/build/src/models/transformers/har.d.ts.map +0 -1
- package/build/src/models/transformers/har.js +0 -2
- package/build/src/models/transformers/har.js.map +0 -1
- package/build/src/proxy/HttpProjectProxy.d.ts +0 -42
- package/build/src/proxy/HttpProjectProxy.d.ts.map +0 -1
- package/build/src/proxy/HttpProjectProxy.js +0 -132
- package/build/src/proxy/HttpProjectProxy.js.map +0 -1
- package/build/src/proxy/Proxy.d.ts +0 -27
- package/build/src/proxy/Proxy.d.ts.map +0 -1
- package/build/src/proxy/Proxy.js +0 -7
- package/build/src/proxy/Proxy.js.map +0 -1
- package/build/src/proxy/ProxyService.d.ts +0 -24
- package/build/src/proxy/ProxyService.d.ts.map +0 -1
- package/build/src/proxy/ProxyService.js +0 -29
- package/build/src/proxy/ProxyService.js.map +0 -1
- package/build/src/proxy/RequestProxy.d.ts +0 -52
- package/build/src/proxy/RequestProxy.d.ts.map +0 -1
- package/build/src/proxy/RequestProxy.js +0 -56
- package/build/src/proxy/RequestProxy.js.map +0 -1
- package/build/src/runtime/http-engine/CoreEngine.d.ts +0 -299
- package/build/src/runtime/http-engine/CoreEngine.d.ts.map +0 -1
- package/build/src/runtime/http-engine/CoreEngine.js +0 -928
- package/build/src/runtime/http-engine/CoreEngine.js.map +0 -1
- package/build/src/runtime/http-engine/CoreEngine2.d.ts +0 -2
- package/build/src/runtime/http-engine/CoreEngine2.d.ts.map +0 -1
- package/build/src/runtime/http-engine/CoreEngine2.js +0 -2
- package/build/src/runtime/http-engine/CoreEngine2.js.map +0 -1
- package/build/src/runtime/http-engine/FormData.d.ts +0 -50
- package/build/src/runtime/http-engine/FormData.d.ts.map +0 -1
- package/build/src/runtime/http-engine/FormData.js +0 -167
- package/build/src/runtime/http-engine/FormData.js.map +0 -1
- package/build/src/runtime/http-engine/HttpErrorCodes.d.ts +0 -4
- package/build/src/runtime/http-engine/HttpErrorCodes.d.ts.map +0 -1
- package/build/src/runtime/http-engine/HttpErrorCodes.js +0 -166
- package/build/src/runtime/http-engine/HttpErrorCodes.js.map +0 -1
- package/build/src/runtime/http-engine/PayloadSupport.d.ts +0 -19
- package/build/src/runtime/http-engine/PayloadSupport.d.ts.map +0 -1
- package/build/src/runtime/http-engine/PayloadSupport.js +0 -80
- package/build/src/runtime/http-engine/PayloadSupport.js.map +0 -1
- package/build/src/runtime/http-engine/RequestUtils.d.ts +0 -66
- package/build/src/runtime/http-engine/RequestUtils.d.ts.map +0 -1
- package/build/src/runtime/http-engine/RequestUtils.js +0 -143
- package/build/src/runtime/http-engine/RequestUtils.js.map +0 -1
- package/build/src/runtime/http-engine/auth/AuthManager.d.ts +0 -73
- package/build/src/runtime/http-engine/auth/AuthManager.d.ts.map +0 -1
- package/build/src/runtime/http-engine/auth/AuthManager.js +0 -186
- package/build/src/runtime/http-engine/auth/AuthManager.js.map +0 -1
- package/build/src/runtime/http-engine/auth/index.d.ts +0 -2
- package/build/src/runtime/http-engine/auth/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/auth/index.js +0 -2
- package/build/src/runtime/http-engine/auth/index.js.map +0 -1
- package/build/src/runtime/http-engine/certificates/CertificateManager.d.ts +0 -11
- package/build/src/runtime/http-engine/certificates/CertificateManager.d.ts.map +0 -1
- package/build/src/runtime/http-engine/certificates/CertificateManager.js +0 -76
- package/build/src/runtime/http-engine/certificates/CertificateManager.js.map +0 -1
- package/build/src/runtime/http-engine/certificates/index.d.ts +0 -2
- package/build/src/runtime/http-engine/certificates/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/certificates/index.js +0 -2
- package/build/src/runtime/http-engine/certificates/index.js.map +0 -1
- package/build/src/runtime/http-engine/compression/CompressionManager.d.ts +0 -25
- package/build/src/runtime/http-engine/compression/CompressionManager.d.ts.map +0 -1
- package/build/src/runtime/http-engine/compression/CompressionManager.js +0 -89
- package/build/src/runtime/http-engine/compression/CompressionManager.js.map +0 -1
- package/build/src/runtime/http-engine/compression/index.d.ts +0 -2
- package/build/src/runtime/http-engine/compression/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/compression/index.js +0 -2
- package/build/src/runtime/http-engine/compression/index.js.map +0 -1
- package/build/src/runtime/http-engine/connections/ConnectionManager.d.ts +0 -57
- package/build/src/runtime/http-engine/connections/ConnectionManager.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/ConnectionManager.js +0 -78
- package/build/src/runtime/http-engine/connections/ConnectionManager.js.map +0 -1
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.d.ts +0 -70
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.js +0 -184
- package/build/src/runtime/http-engine/connections/DigestAuthHandler.js.map +0 -1
- package/build/src/runtime/http-engine/connections/DirectConnection.d.ts +0 -22
- package/build/src/runtime/http-engine/connections/DirectConnection.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/DirectConnection.js +0 -111
- package/build/src/runtime/http-engine/connections/DirectConnection.js.map +0 -1
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.d.ts +0 -60
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.js +0 -138
- package/build/src/runtime/http-engine/connections/ProxyAuthHandler.js.map +0 -1
- package/build/src/runtime/http-engine/connections/ProxyConnection.d.ts +0 -14
- package/build/src/runtime/http-engine/connections/ProxyConnection.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/ProxyConnection.js +0 -47
- package/build/src/runtime/http-engine/connections/ProxyConnection.js.map +0 -1
- package/build/src/runtime/http-engine/connections/TunnelConnection.d.ts +0 -13
- package/build/src/runtime/http-engine/connections/TunnelConnection.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/TunnelConnection.js +0 -175
- package/build/src/runtime/http-engine/connections/TunnelConnection.js.map +0 -1
- package/build/src/runtime/http-engine/connections/index.d.ts +0 -7
- package/build/src/runtime/http-engine/connections/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/connections/index.js +0 -7
- package/build/src/runtime/http-engine/connections/index.js.map +0 -1
- package/build/src/runtime/http-engine/constants.d.ts +0 -69
- package/build/src/runtime/http-engine/constants.d.ts.map +0 -1
- package/build/src/runtime/http-engine/constants.js +0 -90
- package/build/src/runtime/http-engine/constants.js.map +0 -1
- package/build/src/runtime/http-engine/cookies/CookieProcessor.d.ts +0 -5
- package/build/src/runtime/http-engine/cookies/CookieProcessor.d.ts.map +0 -1
- package/build/src/runtime/http-engine/cookies/CookieProcessor.js +0 -20
- package/build/src/runtime/http-engine/cookies/CookieProcessor.js.map +0 -1
- package/build/src/runtime/http-engine/cookies/index.d.ts +0 -2
- package/build/src/runtime/http-engine/cookies/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/cookies/index.js +0 -2
- package/build/src/runtime/http-engine/cookies/index.js.map +0 -1
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.d.ts +0 -156
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.d.ts.map +0 -1
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.js +0 -227
- package/build/src/runtime/http-engine/errors/HttpEngineErrors.js.map +0 -1
- package/build/src/runtime/http-engine/errors/index.d.ts +0 -2
- package/build/src/runtime/http-engine/errors/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/errors/index.js +0 -2
- package/build/src/runtime/http-engine/errors/index.js.map +0 -1
- package/build/src/runtime/http-engine/message/MessageBuilder.d.ts +0 -66
- package/build/src/runtime/http-engine/message/MessageBuilder.d.ts.map +0 -1
- package/build/src/runtime/http-engine/message/MessageBuilder.js +0 -161
- package/build/src/runtime/http-engine/message/MessageBuilder.js.map +0 -1
- package/build/src/runtime/http-engine/message/MessageProcessor.d.ts +0 -27
- package/build/src/runtime/http-engine/message/MessageProcessor.d.ts.map +0 -1
- package/build/src/runtime/http-engine/message/MessageProcessor.js +0 -51
- package/build/src/runtime/http-engine/message/MessageProcessor.js.map +0 -1
- package/build/src/runtime/http-engine/message/index.d.ts +0 -3
- package/build/src/runtime/http-engine/message/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/message/index.js +0 -3
- package/build/src/runtime/http-engine/message/index.js.map +0 -1
- package/build/src/runtime/http-engine/ntlm/Des.d.ts +0 -5
- package/build/src/runtime/http-engine/ntlm/Des.d.ts.map +0 -1
- package/build/src/runtime/http-engine/ntlm/Des.js +0 -361
- package/build/src/runtime/http-engine/ntlm/Des.js.map +0 -1
- package/build/src/runtime/http-engine/ntlm/MD4.d.ts +0 -14
- package/build/src/runtime/http-engine/ntlm/MD4.d.ts.map +0 -1
- package/build/src/runtime/http-engine/ntlm/MD4.js +0 -122
- package/build/src/runtime/http-engine/ntlm/MD4.js.map +0 -1
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.d.ts +0 -21
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.d.ts.map +0 -1
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.js +0 -163
- package/build/src/runtime/http-engine/ntlm/NtlmAuth.js.map +0 -1
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.d.ts +0 -11
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.d.ts.map +0 -1
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.js +0 -58
- package/build/src/runtime/http-engine/ntlm/NtlmMessage.js.map +0 -1
- package/build/src/runtime/http-engine/parsers/BodyParser.d.ts +0 -39
- package/build/src/runtime/http-engine/parsers/BodyParser.d.ts.map +0 -1
- package/build/src/runtime/http-engine/parsers/BodyParser.js +0 -145
- package/build/src/runtime/http-engine/parsers/BodyParser.js.map +0 -1
- package/build/src/runtime/http-engine/parsers/HeadersParser.d.ts +0 -29
- package/build/src/runtime/http-engine/parsers/HeadersParser.d.ts.map +0 -1
- package/build/src/runtime/http-engine/parsers/HeadersParser.js +0 -88
- package/build/src/runtime/http-engine/parsers/HeadersParser.js.map +0 -1
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.d.ts +0 -91
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.d.ts.map +0 -1
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.js +0 -236
- package/build/src/runtime/http-engine/parsers/HttpResponseParser.js.map +0 -1
- package/build/src/runtime/http-engine/parsers/StatusParser.d.ts +0 -20
- package/build/src/runtime/http-engine/parsers/StatusParser.d.ts.map +0 -1
- package/build/src/runtime/http-engine/parsers/StatusParser.js +0 -51
- package/build/src/runtime/http-engine/parsers/StatusParser.js.map +0 -1
- package/build/src/runtime/http-engine/parsers/index.d.ts +0 -5
- package/build/src/runtime/http-engine/parsers/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/parsers/index.js +0 -5
- package/build/src/runtime/http-engine/parsers/index.js.map +0 -1
- package/build/src/runtime/http-engine/response/ResponseProcessor.d.ts +0 -22
- package/build/src/runtime/http-engine/response/ResponseProcessor.d.ts.map +0 -1
- package/build/src/runtime/http-engine/response/ResponseProcessor.js +0 -25
- package/build/src/runtime/http-engine/response/ResponseProcessor.js.map +0 -1
- package/build/src/runtime/http-engine/response/index.d.ts +0 -2
- package/build/src/runtime/http-engine/response/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/response/index.js +0 -2
- package/build/src/runtime/http-engine/response/index.js.map +0 -1
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.d.ts +0 -7
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.d.ts.map +0 -1
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.js +0 -40
- package/build/src/runtime/http-engine/statistics/StatisticsProcessor.js.map +0 -1
- package/build/src/runtime/http-engine/statistics/index.d.ts +0 -2
- package/build/src/runtime/http-engine/statistics/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/statistics/index.js +0 -2
- package/build/src/runtime/http-engine/statistics/index.js.map +0 -1
- package/build/src/runtime/http-engine/url/UrlProcessor.d.ts +0 -24
- package/build/src/runtime/http-engine/url/UrlProcessor.d.ts.map +0 -1
- package/build/src/runtime/http-engine/url/UrlProcessor.js +0 -50
- package/build/src/runtime/http-engine/url/UrlProcessor.js.map +0 -1
- package/build/src/runtime/http-engine/url/index.d.ts +0 -2
- package/build/src/runtime/http-engine/url/index.d.ts.map +0 -1
- package/build/src/runtime/http-engine/url/index.js +0 -2
- package/build/src/runtime/http-engine/url/index.js.map +0 -1
- package/build/src/runtime/http-runner/ConditionCheck.d.ts +0 -75
- package/build/src/runtime/http-runner/ConditionCheck.d.ts.map +0 -1
- package/build/src/runtime/http-runner/ConditionCheck.js +0 -185
- package/build/src/runtime/http-runner/ConditionCheck.js.map +0 -1
- package/build/src/runtime/http-runner/HttpAssertionRunner.d.ts +0 -26
- package/build/src/runtime/http-runner/HttpAssertionRunner.d.ts.map +0 -1
- package/build/src/runtime/http-runner/HttpAssertionRunner.js +0 -180
- package/build/src/runtime/http-runner/HttpAssertionRunner.js.map +0 -1
- package/build/src/runtime/http-runner/HttpFlowRunner.d.ts +0 -21
- package/build/src/runtime/http-runner/HttpFlowRunner.d.ts.map +0 -1
- package/build/src/runtime/http-runner/HttpFlowRunner.js +0 -74
- package/build/src/runtime/http-runner/HttpFlowRunner.js.map +0 -1
- package/build/src/runtime/http-runner/HttpFlows.d.ts +0 -120
- package/build/src/runtime/http-runner/HttpFlows.d.ts.map +0 -1
- package/build/src/runtime/http-runner/HttpFlows.js +0 -568
- package/build/src/runtime/http-runner/HttpFlows.js.map +0 -1
- package/build/src/runtime/http-runner/HttpRequestRunner.d.ts +0 -148
- package/build/src/runtime/http-runner/HttpRequestRunner.d.ts.map +0 -1
- package/build/src/runtime/http-runner/HttpRequestRunner.js +0 -380
- package/build/src/runtime/http-runner/HttpRequestRunner.js.map +0 -1
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.d.ts +0 -26
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.d.ts.map +0 -1
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.js +0 -2
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.js.map +0 -1
- package/build/src/runtime/http-runner/RequestCookiesProcessor.d.ts +0 -26
- package/build/src/runtime/http-runner/RequestCookiesProcessor.d.ts.map +0 -1
- package/build/src/runtime/http-runner/RequestCookiesProcessor.js +0 -66
- package/build/src/runtime/http-runner/RequestCookiesProcessor.js.map +0 -1
- package/build/src/runtime/node/BaseRunner.d.ts +0 -21
- package/build/src/runtime/node/BaseRunner.d.ts.map +0 -1
- package/build/src/runtime/node/BaseRunner.js +0 -27
- package/build/src/runtime/node/BaseRunner.js.map +0 -1
- package/build/src/runtime/node/InteropInterfaces.d.ts +0 -136
- package/build/src/runtime/node/InteropInterfaces.d.ts.map +0 -1
- package/build/src/runtime/node/InteropInterfaces.js +0 -2
- package/build/src/runtime/node/InteropInterfaces.js.map +0 -1
- package/build/src/runtime/node/ProjectParallelRunner.d.ts +0 -96
- package/build/src/runtime/node/ProjectParallelRunner.d.ts.map +0 -1
- package/build/src/runtime/node/ProjectParallelRunner.js +0 -253
- package/build/src/runtime/node/ProjectParallelRunner.js.map +0 -1
- package/build/src/runtime/node/ProjectRequestRunner.d.ts +0 -109
- package/build/src/runtime/node/ProjectRequestRunner.d.ts.map +0 -1
- package/build/src/runtime/node/ProjectRequestRunner.js +0 -300
- package/build/src/runtime/node/ProjectRequestRunner.js.map +0 -1
- package/build/src/runtime/node/ProjectRunner.d.ts +0 -192
- package/build/src/runtime/node/ProjectRunner.d.ts.map +0 -1
- package/build/src/runtime/node/ProjectRunner.js +0 -304
- package/build/src/runtime/node/ProjectRunner.js.map +0 -1
- package/build/src/runtime/node/ProjectRunnerWorker.d.ts +0 -2
- package/build/src/runtime/node/ProjectRunnerWorker.d.ts.map +0 -1
- package/build/src/runtime/node/ProjectRunnerWorker.js +0 -77
- package/build/src/runtime/node/ProjectRunnerWorker.js.map +0 -1
- package/build/src/runtime/node/ProjectSerialRunner.d.ts +0 -12
- package/build/src/runtime/node/ProjectSerialRunner.d.ts.map +0 -1
- package/build/src/runtime/node/ProjectSerialRunner.js +0 -37
- package/build/src/runtime/node/ProjectSerialRunner.js.map +0 -1
- package/build/src/runtime/node/enums.d.ts +0 -9
- package/build/src/runtime/node/enums.d.ts.map +0 -1
- package/build/src/runtime/node/enums.js +0 -10
- package/build/src/runtime/node/enums.js.map +0 -1
- package/build/src/runtime/reporters/ProjectRunCliReporter.d.ts +0 -8
- package/build/src/runtime/reporters/ProjectRunCliReporter.d.ts.map +0 -1
- package/build/src/runtime/reporters/ProjectRunCliReporter.js +0 -75
- package/build/src/runtime/reporters/ProjectRunCliReporter.js.map +0 -1
- package/build/src/runtime/reporters/Reporter.d.ts +0 -36
- package/build/src/runtime/reporters/Reporter.d.ts.map +0 -1
- package/build/src/runtime/reporters/Reporter.js +0 -98
- package/build/src/runtime/reporters/Reporter.js.map +0 -1
- package/build/src/runtime/variables/Cache.d.ts +0 -24
- package/build/src/runtime/variables/Cache.d.ts.map +0 -1
- package/build/src/runtime/variables/Cache.js +0 -51
- package/build/src/runtime/variables/Cache.js.map +0 -1
- package/build/src/runtime/variables/EvalFunctions.d.ts +0 -59
- package/build/src/runtime/variables/EvalFunctions.d.ts.map +0 -1
- package/build/src/runtime/variables/EvalFunctions.js +0 -126
- package/build/src/runtime/variables/EvalFunctions.js.map +0 -1
- package/build/src/runtime/variables/ProjectVariables.d.ts +0 -6
- package/build/src/runtime/variables/ProjectVariables.d.ts.map +0 -1
- package/build/src/runtime/variables/ProjectVariables.js +0 -7
- package/build/src/runtime/variables/ProjectVariables.js.map +0 -1
- package/build/src/runtime/variables/VariablesProcessor.d.ts +0 -169
- package/build/src/runtime/variables/VariablesProcessor.d.ts.map +0 -1
- package/build/src/runtime/variables/VariablesProcessor.js +0 -518
- package/build/src/runtime/variables/VariablesProcessor.js.map +0 -1
- package/build/src/runtime/variables/VariablesTokenizer.d.ts +0 -27
- package/build/src/runtime/variables/VariablesTokenizer.d.ts.map +0 -1
- package/build/src/runtime/variables/VariablesTokenizer.js +0 -53
- package/build/src/runtime/variables/VariablesTokenizer.js.map +0 -1
- package/build/src/sdk/HistorySdk.d.ts +0 -60
- package/build/src/sdk/HistorySdk.d.ts.map +0 -1
- package/build/src/sdk/HistorySdk.js +0 -243
- package/build/src/sdk/HistorySdk.js.map +0 -1
- package/build/src/sdk/ProjectExecutionsSdk.d.ts +0 -56
- package/build/src/sdk/ProjectExecutionsSdk.d.ts.map +0 -1
- package/build/src/sdk/ProjectExecutionsSdk.js +0 -114
- package/build/src/sdk/ProjectExecutionsSdk.js.map +0 -1
- package/build/src/sdk/WsClient.d.ts +0 -25
- package/build/src/sdk/WsClient.d.ts.map +0 -1
- package/build/src/sdk/WsClient.js +0 -4
- package/build/src/sdk/WsClient.js.map +0 -1
- package/build/src/sdk/WsClientNode.d.ts +0 -25
- package/build/src/sdk/WsClientNode.d.ts.map +0 -1
- package/build/src/sdk/WsClientNode.js +0 -66
- package/build/src/sdk/WsClientNode.js.map +0 -1
- package/build/src/sdk/WsClientWeb.d.ts +0 -24
- package/build/src/sdk/WsClientWeb.d.ts.map +0 -1
- package/build/src/sdk/WsClientWeb.js +0 -73
- package/build/src/sdk/WsClientWeb.js.map +0 -1
- package/build/src/testing/TestCliHelper.d.ts +0 -30
- package/build/src/testing/TestCliHelper.d.ts.map +0 -1
- package/build/src/testing/TestCliHelper.js +0 -83
- package/build/src/testing/TestCliHelper.js.map +0 -1
- package/build/src/testing/getPort.d.ts +0 -52
- package/build/src/testing/getPort.d.ts.map +0 -1
- package/build/src/testing/getPort.js +0 -169
- package/build/src/testing/getPort.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -1
- package/noop.ts +0 -3
- package/oauth-popup.html +0 -33
- package/skills-lock.json +0 -10
- package/src/authorization/AuthorizationError.ts +0 -32
- package/src/authorization/CustomParameters.ts +0 -66
- package/src/authorization/OAuth2Authorization.ts +0 -1013
- package/src/authorization/OidcAuthorization.ts +0 -158
- package/src/authorization/Utils.ts +0 -136
- package/src/authorization/lib/IframeAuthorization.ts +0 -127
- package/src/authorization/lib/KnownGrants.ts +0 -6
- package/src/authorization/lib/PopupAuthorization.ts +0 -80
- package/src/authorization/lib/SecurityProcessor.ts +0 -294
- package/src/authorization/lib/Tokens.ts +0 -135
- package/src/authorization/lib/Utils.ts +0 -95
- package/src/authorization/types.ts +0 -197
- package/src/cookies/CookieJar.ts +0 -26
- package/src/cookies/CookieParser.ts +0 -353
- package/src/cookies/InMemoryCookieJar.ts +0 -70
- package/src/cookies/Punycode.ts +0 -134
- package/src/data/DataExtractor.ts +0 -200
- package/src/data/DataReader.ts +0 -11
- package/src/data/JmespathReader.ts +0 -26
- package/src/data/Json2Xml.ts +0 -192
- package/src/data/JsonReader.ts +0 -41
- package/src/data/PayloadPointer.ts +0 -50
- package/src/data/RequestDataExtractor.ts +0 -124
- package/src/data/UrlEncodedReader.ts +0 -21
- package/src/data/XmlReader.ts +0 -128
- package/src/events/authorization/AuthorizationEventTypes.ts +0 -22
- package/src/events/authorization/AuthorizationEvents.ts +0 -74
- package/src/events/cookies/CookieEventTypes.ts +0 -13
- package/src/events/cookies/CookieEvents.ts +0 -168
- package/src/events/environment/EnvironmentEventTypes.ts +0 -3
- package/src/events/environment/EnvironmentEvents.ts +0 -25
- package/src/events/transport/TransportEventTypes.ts +0 -32
- package/src/events/transport/TransportEvents.ts +0 -105
- package/src/lib/Buffer.ts +0 -62
- package/src/lib/definitions/HttpDefinitions.ts +0 -68
- package/src/lib/fs/Fs.ts +0 -258
- package/src/lib/headers/HeadersData.ts +0 -692
- package/src/lib/parsers/UriTemplate.ts +0 -533
- package/src/lib/parsers/UrlEncoder.ts +0 -129
- package/src/lib/parsers/UrlParser.ts +0 -202
- package/src/lib/parsers/UrlProcessor.ts +0 -882
- package/src/lib/parsers/UrlValueParser.ts +0 -213
- package/src/lib/timers/Timers.ts +0 -27
- package/src/lib/transformers/PayloadSerializer.ts +0 -538
- package/src/mocking/LegacyInterfaces.ts +0 -51
- package/src/mocking/LegacyMock.ts +0 -37
- package/src/mocking/ProjectMock.ts +0 -38
- package/src/mocking/README.md +0 -40
- package/src/mocking/legacy/Authorization.ts +0 -40
- package/src/mocking/legacy/Certificates.ts +0 -148
- package/src/mocking/legacy/Cookies.ts +0 -53
- package/src/mocking/legacy/HostRules.ts +0 -45
- package/src/mocking/legacy/Http.ts +0 -248
- package/src/mocking/legacy/HttpResponse.ts +0 -107
- package/src/mocking/legacy/RestApi.ts +0 -70
- package/src/mocking/legacy/Urls.ts +0 -46
- package/src/mocking/legacy/Variables.ts +0 -54
- package/src/mocking/lib/Certificates.ts +0 -64
- package/src/mocking/lib/History.ts +0 -187
- package/src/mocking/lib/HostRules.ts +0 -45
- package/src/mocking/lib/Request.ts +0 -100
- package/src/mocking/lib/Response.ts +0 -121
- package/src/mocking/lib/Url.ts +0 -45
- package/src/models/Authorization.ts +0 -502
- package/src/models/AuthorizationData.ts +0 -67
- package/src/models/CertificateFile.ts +0 -79
- package/src/models/ClientCertificate.ts +0 -328
- package/src/models/Environment.ts +0 -309
- package/src/models/ErrorResponse.ts +0 -115
- package/src/models/HeadersArray.ts +0 -63
- package/src/models/HostRule.ts +0 -178
- package/src/models/HttpCookie.ts +0 -459
- package/src/models/HttpHistory.ts +0 -256
- package/src/models/HttpProject.ts +0 -1533
- package/src/models/HttpRequest.ts +0 -166
- package/src/models/HttpResponse.ts +0 -136
- package/src/models/License.ts +0 -113
- package/src/models/Project.ts +0 -93
- package/src/models/ProjectDefinitionProperty.ts +0 -40
- package/src/models/ProjectExecution.ts +0 -225
- package/src/models/ProjectFolder.ts +0 -440
- package/src/models/ProjectItem.ts +0 -158
- package/src/models/ProjectParent.ts +0 -34
- package/src/models/ProjectRequest.ts +0 -522
- package/src/models/ProjectSchema.ts +0 -202
- package/src/models/Property.ts +0 -517
- package/src/models/Provider.ts +0 -99
- package/src/models/Request.ts +0 -475
- package/src/models/RequestAuthorization.ts +0 -122
- package/src/models/RequestConfig.ts +0 -368
- package/src/models/RequestLog.ts +0 -193
- package/src/models/RequestTime.ts +0 -105
- package/src/models/RequestUiMeta.ts +0 -248
- package/src/models/RequestsSize.ts +0 -63
- package/src/models/Response.ts +0 -163
- package/src/models/ResponseAuthorization.ts +0 -104
- package/src/models/ResponseRedirect.ts +0 -156
- package/src/models/SentRequest.ts +0 -122
- package/src/models/SerializablePayload.ts +0 -122
- package/src/models/Server.ts +0 -183
- package/src/models/Url.ts +0 -87
- package/src/models/http-flows/AssertionError.ts +0 -57
- package/src/models/http-flows/HttpAssertion.ts +0 -90
- package/src/models/http-flows/HttpFlows.ts +0 -82
- package/src/models/http-flows/HttpStep.ts +0 -50
- package/src/models/http-flows/LegacyTranslator.ts +0 -303
- package/src/models/http-flows/steps/assertion/EqualAssertion.ts +0 -124
- package/src/models/http-flows/steps/assertion/GreaterThanAssertion.ts +0 -81
- package/src/models/http-flows/steps/assertion/IncludesAssertion.ts +0 -62
- package/src/models/http-flows/steps/assertion/IsEmptyAssertion.ts +0 -41
- package/src/models/http-flows/steps/assertion/IsNotEmptyAssertion.ts +0 -41
- package/src/models/http-flows/steps/assertion/LengthOfAssertion.ts +0 -62
- package/src/models/http-flows/steps/assertion/LessThanAssertion.ts +0 -81
- package/src/models/http-flows/steps/assertion/MatchesAssertion.ts +0 -62
- package/src/models/http-flows/steps/assertion/MatchesSchemaAssertion.ts +0 -87
- package/src/models/http-flows/steps/assertion/NotEqualAssertion.ts +0 -124
- package/src/models/http-flows/steps/assertion/NotIncludesAssertion.ts +0 -62
- package/src/models/http-flows/steps/assertion/NotOkAssertion.ts +0 -41
- package/src/models/http-flows/steps/assertion/NotToBeAssertion.ts +0 -63
- package/src/models/http-flows/steps/assertion/OkAssertion.ts +0 -41
- package/src/models/http-flows/steps/assertion/ToBeAssertion.ts +0 -70
- package/src/models/http-flows/steps/data/DeleteCookieStep.ts +0 -108
- package/src/models/http-flows/steps/data/DeleteVariableStep.ts +0 -78
- package/src/models/http-flows/steps/data/ReadDataSourceStep.ts +0 -104
- package/src/models/http-flows/steps/data/ReadDataStep.ts +0 -133
- package/src/models/http-flows/steps/data/ReadValueStep.ts +0 -89
- package/src/models/http-flows/steps/data/SetCookieStep.ts +0 -208
- package/src/models/http-flows/steps/data/SetDataStep.ts +0 -125
- package/src/models/http-flows/steps/data/SetVariableStep.ts +0 -82
- package/src/models/http-flows/steps/transformation/AsLowerCaseStep.ts +0 -41
- package/src/models/http-flows/steps/transformation/AsNumberStep.ts +0 -41
- package/src/models/http-flows/steps/transformation/AsUpperCaseStep.ts +0 -41
- package/src/models/http-flows/steps/transformation/RoundStep.ts +0 -87
- package/src/models/http-flows/steps/transformation/SubstringStep.ts +0 -96
- package/src/models/http-flows/steps/transformation/TrimStep.ts +0 -43
- package/src/models/legacy/DataExport.ts +0 -254
- package/src/models/legacy/Normalizer.ts +0 -107
- package/src/models/legacy/actions/Actions.ts +0 -277
- package/src/models/legacy/authorization/Authorization.ts +0 -581
- package/src/models/legacy/models/ApiTypes.ts +0 -202
- package/src/models/legacy/models/ArcLegacyProject.ts +0 -38
- package/src/models/legacy/models/AuthData.ts +0 -15
- package/src/models/legacy/models/ClientCertificate.ts +0 -93
- package/src/models/legacy/models/Cookies.ts +0 -52
- package/src/models/legacy/models/HostRule.ts +0 -35
- package/src/models/legacy/models/RestApi.ts +0 -49
- package/src/models/legacy/models/UrlHistory.ts +0 -33
- package/src/models/legacy/models/Variable.ts +0 -40
- package/src/models/legacy/models/base.ts +0 -95
- package/src/models/legacy/request/ArcRequest.ts +0 -405
- package/src/models/legacy/request/ArcResponse.ts +0 -177
- package/src/models/legacy/request/HistoryData.ts +0 -47
- package/src/models/legacy/request/RequestBody.ts +0 -87
- package/src/models/transformers/ArcDexieTransformer.ts +0 -323
- package/src/models/transformers/ArcLegacyNormalizer.ts +0 -84
- package/src/models/transformers/ArcLegacyTransformer.ts +0 -196
- package/src/models/transformers/ArcPouchTransformer.ts +0 -184
- package/src/models/transformers/BaseTransformer.ts +0 -113
- package/src/models/transformers/ImportUtils.ts +0 -135
- package/src/models/transformers/LegacyDataExportToApiProject.ts +0 -76
- package/src/models/transformers/LegacyExportProcessor.ts +0 -248
- package/src/models/transformers/PostmanBackupTransformer.ts +0 -303
- package/src/models/transformers/PostmanDataTransformer.ts +0 -54
- package/src/models/transformers/PostmanTransformer.ts +0 -113
- package/src/models/transformers/PostmanV21Transformer.ts +0 -317
- package/src/models/transformers/PostmanV2Transformer.ts +0 -317
- package/src/models/transformers/har.ts +0 -865
- package/src/proxy/HttpProjectProxy.ts +0 -169
- package/src/proxy/Proxy.ts +0 -30
- package/src/proxy/ProxyService.ts +0 -37
- package/src/proxy/RequestProxy.ts +0 -101
- package/src/proxy/readme.md +0 -8
- package/src/runtime/http-engine/CoreEngine.ts +0 -1084
- package/src/runtime/http-engine/CoreEngine2.ts +0 -0
- package/src/runtime/http-engine/FormData.ts +0 -200
- package/src/runtime/http-engine/HttpErrorCodes.ts +0 -176
- package/src/runtime/http-engine/PayloadSupport.ts +0 -93
- package/src/runtime/http-engine/RequestUtils.ts +0 -162
- package/src/runtime/http-engine/auth/AuthManager.ts +0 -242
- package/src/runtime/http-engine/certificates/CertificateManager.ts +0 -74
- package/src/runtime/http-engine/compression/CompressionManager.ts +0 -99
- package/src/runtime/http-engine/connections/ConnectionManager.ts +0 -123
- package/src/runtime/http-engine/connections/DigestAuthHandler.ts +0 -238
- package/src/runtime/http-engine/connections/DirectConnection.ts +0 -138
- package/src/runtime/http-engine/connections/ProxyAuthHandler.ts +0 -179
- package/src/runtime/http-engine/connections/ProxyConnection.ts +0 -55
- package/src/runtime/http-engine/connections/TunnelConnection.ts +0 -192
- package/src/runtime/http-engine/constants.ts +0 -103
- package/src/runtime/http-engine/cookies/CookieProcessor.ts +0 -25
- package/src/runtime/http-engine/errors/HttpEngineErrors.ts +0 -319
- package/src/runtime/http-engine/message/MessageBuilder.ts +0 -201
- package/src/runtime/http-engine/message/MessageProcessor.ts +0 -73
- package/src/runtime/http-engine/ntlm/Des.ts +0 -372
- package/src/runtime/http-engine/ntlm/MD4.ts +0 -137
- package/src/runtime/http-engine/ntlm/NtlmAuth.ts +0 -187
- package/src/runtime/http-engine/ntlm/NtlmMessage.ts +0 -64
- package/src/runtime/http-engine/parsers/BodyParser.ts +0 -171
- package/src/runtime/http-engine/parsers/HeadersParser.ts +0 -103
- package/src/runtime/http-engine/parsers/HttpResponseParser.ts +0 -280
- package/src/runtime/http-engine/parsers/StatusParser.ts +0 -69
- package/src/runtime/http-engine/response/ResponseProcessor.ts +0 -46
- package/src/runtime/http-engine/statistics/StatisticsProcessor.ts +0 -52
- package/src/runtime/http-engine/url/UrlProcessor.ts +0 -55
- package/src/runtime/http-runner/ConditionCheck.ts +0 -193
- package/src/runtime/http-runner/HttpAssertionRunner.ts +0 -204
- package/src/runtime/http-runner/HttpFlowRunner.ts +0 -105
- package/src/runtime/http-runner/HttpFlows.ts +0 -649
- package/src/runtime/http-runner/HttpRequestRunner.ts +0 -427
- package/src/runtime/http-runner/HttpRuntimeEnvironment.ts +0 -27
- package/src/runtime/http-runner/RequestCookiesProcessor.ts +0 -80
- package/src/runtime/node/BaseRunner.ts +0 -29
- package/src/runtime/node/InteropInterfaces.ts +0 -143
- package/src/runtime/node/ProjectParallelRunner.ts +0 -321
- package/src/runtime/node/ProjectRequestRunner.ts +0 -364
- package/src/runtime/node/ProjectRunner.ts +0 -395
- package/src/runtime/node/ProjectRunnerWorker.ts +0 -83
- package/src/runtime/node/ProjectSerialRunner.ts +0 -37
- package/src/runtime/node/enums.ts +0 -8
- package/src/runtime/reporters/ProjectRunCliReporter.ts +0 -81
- package/src/runtime/reporters/Reporter.ts +0 -113
- package/src/runtime/variables/Cache.ts +0 -53
- package/src/runtime/variables/EvalFunctions.ts +0 -135
- package/src/runtime/variables/ProjectVariables.ts +0 -5
- package/src/runtime/variables/VariablesProcessor.ts +0 -555
- package/src/runtime/variables/VariablesTokenizer.ts +0 -55
- package/src/sdk/HistorySdk.ts +0 -272
- package/src/sdk/ProjectExecutionsSdk.ts +0 -135
- package/src/sdk/WsClient.ts +0 -28
- package/src/sdk/WsClientNode.ts +0 -68
- package/src/sdk/WsClientWeb.ts +0 -75
- package/src/testing/TestCliHelper.ts +0 -93
- package/src/testing/getPort.ts +0 -215
- package/tests/resources/http/drive-list.ts +0 -575
- package/tests/resources/http/html.html +0 -317
- package/tests/resources/http/jpeg.jpg +0 -0
- package/tests/resources/http/json.json +0 -187
- package/tests/resources/http/png.png +0 -0
- package/tests/resources/http/svg.svg +0 -3
- package/tests/resources/http/webp.webp +0 -0
- package/tests/resources/http/xml.xml +0 -211
- package/tests/resources/ssl/cert-auth-server/alice-password.p12 +0 -0
- package/tests/resources/ssl/cert-auth-server/alice-password.txt +0 -1
- package/tests/resources/ssl/cert-auth-server/alice.p12 +0 -0
- package/tests/resources/ssl/cert-auth-server/alice_cert.pem +0 -28
- package/tests/resources/ssl/cert-auth-server/alice_csr.pem +0 -26
- package/tests/resources/ssl/cert-auth-server/alice_key.pem +0 -52
- package/tests/resources/ssl/cert-auth-server/bob-password.txt +0 -1
- package/tests/resources/ssl/cert-auth-server/bob.p12 +0 -0
- package/tests/resources/ssl/cert-auth-server/bob_cert.pem +0 -27
- package/tests/resources/ssl/cert-auth-server/bob_csr.pem +0 -26
- package/tests/resources/ssl/cert-auth-server/bob_key.pem +0 -52
- package/tests/resources/ssl/cert-auth-server/create.sh +0 -17
- package/tests/resources/ssl/cert-auth-server/server_cert.pem +0 -31
- package/tests/resources/ssl/cert-auth-server/server_key.pem +0 -52
- package/tests/resources/ssl/certs/ca.cert.pem +0 -23
- package/tests/resources/ssl/certs/ca.privkey.pem +0 -27
- package/tests/resources/ssl/certs/ca.srl +0 -1
- package/tests/resources/ssl/certs/cert.pem +0 -20
- package/tests/resources/ssl/certs/csr.pem +0 -17
- package/tests/resources/ssl/certs/fullchain.pem +0 -43
- package/tests/resources/ssl/certs/privkey.pem +0 -27
- package/tests/resources/ssl/certs/root-ca.crt +0 -0
- package/tests/servers/ExpressServer.ts +0 -124
- package/tests/servers/ProxyServer.ts +0 -374
- package/tests/servers/cert-helper.ts +0 -2
- package/tests/servers/express-routes/ApiEndpoint.ts +0 -24
- package/tests/servers/express-routes/BaseApi.ts +0 -106
- package/tests/servers/express-routes/BasicAuthRoute.ts +0 -36
- package/tests/servers/express-routes/BearerAuthRoute.ts +0 -35
- package/tests/servers/express-routes/CertificatesApi.ts +0 -46
- package/tests/servers/express-routes/CompressApi.ts +0 -71
- package/tests/servers/express-routes/CookieApi.ts +0 -20
- package/tests/servers/express-routes/DelayRoute.ts +0 -28
- package/tests/servers/express-routes/GetApi.ts +0 -58
- package/tests/servers/express-routes/HeadersApi.ts +0 -17
- package/tests/servers/express-routes/ImagesApi.ts +0 -44
- package/tests/servers/express-routes/NTLMRoute.ts +0 -29
- package/tests/servers/express-routes/PostApi.ts +0 -31
- package/tests/servers/express-routes/QueryParamsApi.ts +0 -17
- package/tests/servers/express-routes/RedirectsApi.ts +0 -139
- package/tests/servers/express-routes/ResponsesApi.ts +0 -68
- package/tests/servers/express-routes/StatusCodeApi.ts +0 -38
- package/tests/servers/express-routes/StreamApi.ts +0 -60
- package/tests/servers/express-routes/TestsApi.ts +0 -47
- package/tests/servers/oauth2mock/ServerMock.js +0 -454
- package/tests/servers/ssl.ts +0 -93
- package/tests/unit/authorization/SecurityProcessor.spec.ts +0 -538
- package/tests/unit/cookies/CookieParser.spec.ts +0 -354
- package/tests/unit/cookies/InMemoryCookieJar.spec.ts +0 -112
- package/tests/unit/data/JmesparthReader.spec.ts +0 -36
- package/tests/unit/data/Json2Xml.spec.ts +0 -178
- package/tests/unit/data/JsonReader.spec.ts +0 -82
- package/tests/unit/data/PayloadPointer.spec.ts +0 -56
- package/tests/unit/data/RequestDataExtractor.spec.ts +0 -469
- package/tests/unit/data/UrlEncodedReader.spec.ts +0 -12
- package/tests/unit/data/XmlReader.spec.ts +0 -84
- package/tests/unit/events/authorization.spec.ts +0 -150
- package/tests/unit/events/cookie.spec.ts +0 -274
- package/tests/unit/events/transport.spec.ts +0 -139
- package/tests/unit/legacy-transformers/ARC-legacy-import.spec.ts +0 -150
- package/tests/unit/legacy-transformers/ArcDexieTransformer.spec.ts +0 -194
- package/tests/unit/legacy-transformers/ArcLegacyTransformer.spec.ts +0 -112
- package/tests/unit/legacy-transformers/ArcPouchTransformer.spec.ts +0 -245
- package/tests/unit/legacy-transformers/DataTestHelper.ts +0 -50
- package/tests/unit/legacy-transformers/LegacyExportProcessor.spec.ts +0 -450
- package/tests/unit/legacy-transformers/data/arc-pouchdb.json +0 -396
- package/tests/unit/legacy-transformers/data/dexie-data-export.json +0 -890
- package/tests/unit/legacy-transformers/data/dexie-history-export.json +0 -877
- package/tests/unit/legacy-transformers/data/dexie-saved-export.json +0 -385
- package/tests/unit/legacy-transformers/data/legacy-data-import.json +0 -51
- package/tests/unit/legacy-transformers/data/legacy-request-import.json +0 -20
- package/tests/unit/legacy-transformers/data/pouch-data-export.json +0 -242
- package/tests/unit/lib/UriTemplate.spec.ts +0 -418
- package/tests/unit/lib/UrlEncoder.spec.ts +0 -36
- package/tests/unit/lib/UrlParser.spec.ts +0 -359
- package/tests/unit/lib/UrlProcessor.spec.ts +0 -894
- package/tests/unit/lib/buffer.spec.ts +0 -33
- package/tests/unit/lib/payload_serializer.spec.ts +0 -171
- package/tests/unit/mocking/current/Certificates.spec.ts +0 -96
- package/tests/unit/mocking/current/HostRules.spec.ts +0 -59
- package/tests/unit/mocking/current/Urls.spec.ts +0 -58
- package/tests/unit/mocking/legacy/ArcMock.spec.ts +0 -16
- package/tests/unit/mocking/legacy/Authorization.spec.ts +0 -57
- package/tests/unit/mocking/legacy/Certificates.spec.ts +0 -185
- package/tests/unit/mocking/legacy/Cookies.spec.ts +0 -67
- package/tests/unit/mocking/legacy/HostRules.spec.ts +0 -59
- package/tests/unit/mocking/legacy/Http.spec.ts +0 -533
- package/tests/unit/mocking/legacy/RestApi.spec.ts +0 -132
- package/tests/unit/mocking/legacy/Urls.spec.ts +0 -57
- package/tests/unit/mocking/legacy/Variables.spec.ts +0 -73
- package/tests/unit/models/Certificate/from_name.spec.ts +0 -21
- package/tests/unit/models/Project/consume.spec.ts +0 -16
- package/tests/unit/models/Project/create.spec.ts +0 -132
- package/tests/unit/models/certificate.spec.ts +0 -257
- package/tests/unit/models/environment.spec.ts +0 -574
- package/tests/unit/models/error_response.spec.ts +0 -183
- package/tests/unit/models/headers_array.spec.ts +0 -86
- package/tests/unit/models/host_rule.spec.ts +0 -196
- package/tests/unit/models/http-actions/assertion/equal_assertion.spec.ts +0 -103
- package/tests/unit/models/http-actions/assertion/greater_than_assertion.spec.ts +0 -91
- package/tests/unit/models/http-actions/assertion/includes_assertion.spec.ts +0 -71
- package/tests/unit/models/http-actions/assertion/less_than_assertion.spec.ts +0 -91
- package/tests/unit/models/http-actions/assertion/matches_assertion.spec.ts +0 -71
- package/tests/unit/models/http-actions/assertion/matches_schema_assertion.spec.ts +0 -117
- package/tests/unit/models/http-actions/assertion/not_equal_assertion.spec.ts +0 -103
- package/tests/unit/models/http-actions/assertion/not_includes_assertion.spec.ts +0 -71
- package/tests/unit/models/http-actions/assertion/not_ok_assertion.spec.ts +0 -47
- package/tests/unit/models/http-actions/assertion/not_to_be_assertion.spec.ts +0 -72
- package/tests/unit/models/http-actions/assertion/ok_assertion.spec.ts +0 -44
- package/tests/unit/models/http-actions/assertion/to_be_assertion.spec.ts +0 -71
- package/tests/unit/models/http-actions/transformation/as_lower_case_step.spec.ts +0 -47
- package/tests/unit/models/http-actions/transformation/as_number_step.spec.ts +0 -47
- package/tests/unit/models/http-actions/transformation/as_upper_case_step.spec.ts +0 -47
- package/tests/unit/models/http-actions/transformation/round_step.spec.ts +0 -69
- package/tests/unit/models/http-actions/transformation/substring_step.spec.ts +0 -85
- package/tests/unit/models/http-actions/transformation/trim_step.spec.ts +0 -44
- package/tests/unit/models/http_cookie.spec.ts +0 -516
- package/tests/unit/models/http_history.spec.ts +0 -443
- package/tests/unit/models/http_project.spec.ts +0 -2424
- package/tests/unit/models/http_request.spec.ts +0 -365
- package/tests/unit/models/http_response.spec.ts +0 -289
- package/tests/unit/models/license.spec.ts +0 -108
- package/tests/unit/models/project_folder.spec.ts +0 -926
- package/tests/unit/models/project_item.spec.ts +0 -137
- package/tests/unit/models/project_request.spec.ts +0 -1047
- package/tests/unit/models/project_schema.spec.ts +0 -236
- package/tests/unit/models/property.spec.ts +0 -625
- package/tests/unit/models/provider.spec.ts +0 -102
- package/tests/unit/models/request.spec.ts +0 -1206
- package/tests/unit/models/request_log.spec.ts +0 -308
- package/tests/unit/models/request_time.spec.ts +0 -138
- package/tests/unit/models/response.spec.ts +0 -384
- package/tests/unit/models/response_redirect.spec.ts +0 -303
- package/tests/unit/models/sent_request.spec.ts +0 -206
- package/tests/unit/models/server.spec.ts +0 -195
- package/tests/unit/postman-transformers/PostmanTransformer.spec.ts +0 -418
- package/tests/unit/postman-transformers/data/Backup.postman_dump.json +0 -750
- package/tests/unit/postman-transformers/data/HTTPBin.postman_collection-2.0.json +0 -508
- package/tests/unit/postman-transformers/data/HTTPBin.postman_collection-2.1.json +0 -542
- package/tests/unit/runtime/http-engine/HttpResponseParser.spec.ts +0 -337
- package/tests/unit/runtime/http-engine/abort.spec.ts +0 -83
- package/tests/unit/runtime/http-engine/auth.spec.ts +0 -52
- package/tests/unit/runtime/http-engine/certificates/CertificateManager.spec.ts +0 -482
- package/tests/unit/runtime/http-engine/certificates.spec.ts +0 -180
- package/tests/unit/runtime/http-engine/cleanup.spec.ts +0 -44
- package/tests/unit/runtime/http-engine/compression/CompressionManager.spec.ts +0 -498
- package/tests/unit/runtime/http-engine/compression.spec.ts +0 -114
- package/tests/unit/runtime/http-engine/connections/ConnectionManager.spec.ts +0 -379
- package/tests/unit/runtime/http-engine/connections/DigestAuthHandler.spec.ts +0 -164
- package/tests/unit/runtime/http-engine/core_engine.spec.ts +0 -560
- package/tests/unit/runtime/http-engine/engine_statuses.spec.ts +0 -58
- package/tests/unit/runtime/http-engine/events.spec.ts +0 -50
- package/tests/unit/runtime/http-engine/form_data.spec.ts +0 -112
- package/tests/unit/runtime/http-engine/headers.spec.ts +0 -149
- package/tests/unit/runtime/http-engine/hosts.spec.ts +0 -29
- package/tests/unit/runtime/http-engine/http-get.spec.ts +0 -36
- package/tests/unit/runtime/http-engine/http-post.spec.ts +0 -72
- package/tests/unit/runtime/http-engine/logger.spec.ts +0 -24
- package/tests/unit/runtime/http-engine/message.spec.ts +0 -184
- package/tests/unit/runtime/http-engine/params.spec.ts +0 -388
- package/tests/unit/runtime/http-engine/payload_support.spec.ts +0 -127
- package/tests/unit/runtime/http-engine/proxy.spec.ts +0 -522
- package/tests/unit/runtime/http-engine/redirects.spec.ts +0 -217
- package/tests/unit/runtime/http-engine/request_utils.spec.ts +0 -176
- package/tests/unit/runtime/http-engine/responses.spec.ts +0 -272
- package/tests/unit/runtime/http-engine/timeout.spec.ts +0 -33
- package/tests/unit/runtime/http-engine/timings.spec.ts +0 -50
- package/tests/unit/runtime/proxy/HttpProjectProxy.spec.ts +0 -241
- package/tests/unit/runtime/proxy/RequestProxy.spec.ts +0 -130
- package/tests/unit/runtime/reporters/project_run_cli_reporter.spec.ts +0 -62
- package/tests/unit/runtime/runners/http_assertion_runner.spec.ts +0 -1303
- package/tests/unit/runtime/runners/http_flow_runner.spec.ts +0 -1174
- package/tests/unit/runtime/runners/parallel_runner.spec.ts +0 -365
- package/tests/unit/runtime/runners/project_runner.spec.ts +0 -839
- package/tests/unit/runtime/runners/request_runner.spec.ts +0 -933
- package/tests/unit/runtime/runners/serial_runner.spec.ts +0 -629
- package/tests/unit/runtime/variables/cache.spec.ts +0 -95
- package/tests/unit/runtime/variables/eval_functions.spec.ts +0 -66
- package/tests/unit/runtime/variables/variables_processor.spec.ts +0 -563
- package/tests/unit/src/Platform.spec.ts +0 -24
- package/tsconfig.browser.json +0 -33
- package/tsconfig.node.json +0 -34
- /package/{API_MODELING_EXPLAINER.md → architecture/API_MODELING_EXPLAINER.md} +0 -0
- /package/{DATA_MODELING_EXPLAINER.md → architecture/DATA_MODELING_EXPLAINER.md} +0 -0
|
@@ -1,2424 +0,0 @@
|
|
|
1
|
-
import { test } from '@japa/runner'
|
|
2
|
-
import sinon from 'sinon'
|
|
3
|
-
import {
|
|
4
|
-
HttpProjectKind,
|
|
5
|
-
HttpProject,
|
|
6
|
-
IHttpProject,
|
|
7
|
-
IProjectFolderIteratorResult,
|
|
8
|
-
Certificate,
|
|
9
|
-
Environment,
|
|
10
|
-
LicenseKind,
|
|
11
|
-
ProjectFolderKind,
|
|
12
|
-
ProjectRequest,
|
|
13
|
-
ProjectSchema,
|
|
14
|
-
ProviderKind,
|
|
15
|
-
ServerKind,
|
|
16
|
-
ThingKind,
|
|
17
|
-
} from '../../../src/models/index.js'
|
|
18
|
-
import { ArcLegacyProject, ARCSavedRequest, LegacyMock } from '../../../src/legacy.js'
|
|
19
|
-
|
|
20
|
-
const generator = new LegacyMock()
|
|
21
|
-
|
|
22
|
-
test.group('Default project initialization', () => {
|
|
23
|
-
test('initializes a default project', ({ assert }) => {
|
|
24
|
-
const result = new HttpProject()
|
|
25
|
-
assert.equal(result.kind, HttpProjectKind, 'sets the kind property')
|
|
26
|
-
assert.typeOf(result.definitions, 'object', 'sets the definitions property')
|
|
27
|
-
assert.deepEqual(result.definitions.environments, [], 'sets the definitions.environments property')
|
|
28
|
-
assert.deepEqual(result.definitions.folders, [], 'sets the definitions.folders property')
|
|
29
|
-
assert.deepEqual(result.definitions.requests, [], 'sets the definitions.requests property')
|
|
30
|
-
assert.deepEqual(result.definitions.schemas, [], 'sets the definitions.schemas property')
|
|
31
|
-
assert.deepEqual(result.definitions.certificates, [], 'sets the definitions.certificates property')
|
|
32
|
-
assert.deepEqual(result.items, [], 'sets the items property')
|
|
33
|
-
const { info } = result
|
|
34
|
-
assert.typeOf(info, 'EventTarget', 'sets the default info property')
|
|
35
|
-
assert.equal(info.kind, ThingKind, 'sets the info.kind property')
|
|
36
|
-
assert.equal(info.name, '', 'sets the info.name property')
|
|
37
|
-
assert.isUndefined(result.license, 'has no license property')
|
|
38
|
-
assert.isUndefined(result.provider, 'has no provider property')
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
test('sets initEnvironments', ({ assert }) => {
|
|
42
|
-
const result = new HttpProject(undefined, [
|
|
43
|
-
{
|
|
44
|
-
key: 'a',
|
|
45
|
-
kind: 'Core#Environment',
|
|
46
|
-
info: {
|
|
47
|
-
kind: ThingKind,
|
|
48
|
-
name: 'test',
|
|
49
|
-
},
|
|
50
|
-
variables: [],
|
|
51
|
-
server: {
|
|
52
|
-
kind: ServerKind,
|
|
53
|
-
uri: 'https://api.com',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
])
|
|
57
|
-
const envs = result.getEnvironments()
|
|
58
|
-
assert.typeOf(envs, 'array')
|
|
59
|
-
assert.lengthOf(envs, 1)
|
|
60
|
-
assert.equal(envs[0].info.name, 'test')
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
test('passed in constructor environments override project environments', ({ assert }) => {
|
|
64
|
-
const schema = new HttpProject({
|
|
65
|
-
definitions: {
|
|
66
|
-
environments: [
|
|
67
|
-
{
|
|
68
|
-
key: 'b',
|
|
69
|
-
kind: 'Core#Environment',
|
|
70
|
-
info: {
|
|
71
|
-
kind: ThingKind,
|
|
72
|
-
name: 'test b',
|
|
73
|
-
},
|
|
74
|
-
variables: [],
|
|
75
|
-
server: {
|
|
76
|
-
kind: ServerKind,
|
|
77
|
-
uri: 'https://domain.com',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
info: {
|
|
83
|
-
kind: ThingKind,
|
|
84
|
-
name: 'Project',
|
|
85
|
-
},
|
|
86
|
-
items: [],
|
|
87
|
-
key: 'abc',
|
|
88
|
-
kind: HttpProjectKind,
|
|
89
|
-
}).toJSON()
|
|
90
|
-
const result = new HttpProject(schema, [
|
|
91
|
-
{
|
|
92
|
-
key: 'a',
|
|
93
|
-
kind: 'Core#Environment',
|
|
94
|
-
info: {
|
|
95
|
-
kind: ThingKind,
|
|
96
|
-
name: 'test',
|
|
97
|
-
},
|
|
98
|
-
variables: [],
|
|
99
|
-
server: {
|
|
100
|
-
kind: ServerKind,
|
|
101
|
-
uri: 'https://api.com',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
])
|
|
105
|
-
const envs = result.getEnvironments()
|
|
106
|
-
assert.typeOf(envs, 'array')
|
|
107
|
-
assert.lengthOf(envs, 1)
|
|
108
|
-
assert.equal(envs[0].info.name, 'test')
|
|
109
|
-
})
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
test.group('From schema initialization', (group) => {
|
|
113
|
-
let base: IHttpProject
|
|
114
|
-
group.each.setup(() => {
|
|
115
|
-
base = {
|
|
116
|
-
kind: HttpProjectKind,
|
|
117
|
-
key: 'abc',
|
|
118
|
-
definitions: {},
|
|
119
|
-
items: [],
|
|
120
|
-
info: {
|
|
121
|
-
kind: ThingKind,
|
|
122
|
-
name: '',
|
|
123
|
-
},
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
test('sets the info', ({ assert }) => {
|
|
128
|
-
const init: IHttpProject = {
|
|
129
|
-
...base,
|
|
130
|
-
...{
|
|
131
|
-
info: {
|
|
132
|
-
kind: ThingKind,
|
|
133
|
-
name: 'Test project',
|
|
134
|
-
description: 'Project description',
|
|
135
|
-
version: '1.2.3',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
}
|
|
139
|
-
const project = new HttpProject(init)
|
|
140
|
-
const { info } = project
|
|
141
|
-
assert.equal(info.kind, ThingKind, 'sets the info.kind property')
|
|
142
|
-
assert.equal(info.name, 'Test project', 'sets the info.name property')
|
|
143
|
-
assert.equal(info.description, 'Project description', 'sets the info.description property')
|
|
144
|
-
assert.equal(info.version, '1.2.3', 'sets the info.version property')
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
test('sets the provider', ({ assert }) => {
|
|
148
|
-
const init: IHttpProject = {
|
|
149
|
-
...base,
|
|
150
|
-
...{
|
|
151
|
-
provider: {
|
|
152
|
-
kind: ProviderKind,
|
|
153
|
-
name: 'Test Provider',
|
|
154
|
-
email: 'a@b.c',
|
|
155
|
-
url: 'https://test.com',
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
}
|
|
159
|
-
const project = new HttpProject(init)
|
|
160
|
-
const { provider } = project
|
|
161
|
-
assert.typeOf(provider, 'object', 'has the provider')
|
|
162
|
-
assert.equal(provider!.kind, ProviderKind, 'sets the provider.kind property')
|
|
163
|
-
assert.equal(provider!.name, 'Test Provider', 'sets the provider.name property')
|
|
164
|
-
assert.equal(provider!.email, 'a@b.c', 'sets the provider.email property')
|
|
165
|
-
assert.equal(provider!.url, 'https://test.com', 'sets the provider.url property')
|
|
166
|
-
})
|
|
167
|
-
|
|
168
|
-
test('sets the license', ({ assert }) => {
|
|
169
|
-
const init: IHttpProject = {
|
|
170
|
-
...base,
|
|
171
|
-
...{
|
|
172
|
-
license: {
|
|
173
|
-
kind: LicenseKind,
|
|
174
|
-
name: 'Test License',
|
|
175
|
-
content: 'test content',
|
|
176
|
-
url: 'https://test.com',
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
}
|
|
180
|
-
const project = new HttpProject(init)
|
|
181
|
-
const { license } = project
|
|
182
|
-
assert.typeOf(license, 'object', 'has the license')
|
|
183
|
-
assert.equal(license!.kind, LicenseKind, 'sets the license.kind property')
|
|
184
|
-
assert.equal(license!.name, 'Test License', 'sets the license.name property')
|
|
185
|
-
assert.equal(license!.content, 'test content', 'sets the license.content property')
|
|
186
|
-
assert.equal(license!.url, 'https://test.com', 'sets the license.url property')
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
test('sets the items', ({ assert }) => {
|
|
190
|
-
const init: IHttpProject = {
|
|
191
|
-
...base,
|
|
192
|
-
...{
|
|
193
|
-
items: [
|
|
194
|
-
{
|
|
195
|
-
kind: ProjectFolderKind,
|
|
196
|
-
key: '123456',
|
|
197
|
-
},
|
|
198
|
-
],
|
|
199
|
-
},
|
|
200
|
-
}
|
|
201
|
-
const project = new HttpProject(init)
|
|
202
|
-
const { items } = project
|
|
203
|
-
assert.typeOf(items, 'array', 'has the items')
|
|
204
|
-
assert.lengthOf(items, 1, 'has a single item')
|
|
205
|
-
const [item] = items
|
|
206
|
-
assert.equal(item.kind, ProjectFolderKind, 'sets the item.kind property')
|
|
207
|
-
assert.equal(item.key, '123456', 'sets the item.key property')
|
|
208
|
-
})
|
|
209
|
-
|
|
210
|
-
test('sets the definitions.folders', ({ assert }) => {
|
|
211
|
-
const init: IHttpProject = {
|
|
212
|
-
...base,
|
|
213
|
-
...{
|
|
214
|
-
definitions: {
|
|
215
|
-
folders: [
|
|
216
|
-
{
|
|
217
|
-
key: '123456',
|
|
218
|
-
kind: ProjectFolderKind,
|
|
219
|
-
created: 1234567,
|
|
220
|
-
updated: 98765,
|
|
221
|
-
info: {
|
|
222
|
-
kind: ThingKind,
|
|
223
|
-
name: 'test',
|
|
224
|
-
},
|
|
225
|
-
items: [],
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
},
|
|
229
|
-
},
|
|
230
|
-
}
|
|
231
|
-
const project = new HttpProject(init)
|
|
232
|
-
const { definitions } = project
|
|
233
|
-
assert.typeOf(definitions.folders, 'array', 'has the items')
|
|
234
|
-
assert.lengthOf(definitions.folders, 1, 'has a single item')
|
|
235
|
-
const [item] = definitions.folders
|
|
236
|
-
assert.equal(item.kind, ProjectFolderKind, 'sets the item.kind property')
|
|
237
|
-
assert.equal(item.key, '123456', 'sets the item.key property')
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
test('sets the definitions.requests', ({ assert }) => {
|
|
241
|
-
const request = ProjectRequest.fromUrl('https://api.com', new HttpProject())
|
|
242
|
-
const init: IHttpProject = {
|
|
243
|
-
...base,
|
|
244
|
-
...{
|
|
245
|
-
definitions: {
|
|
246
|
-
requests: [request.toJSON()],
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
}
|
|
250
|
-
const project = new HttpProject(init)
|
|
251
|
-
const { definitions } = project
|
|
252
|
-
assert.typeOf(definitions.requests, 'array', 'has the items')
|
|
253
|
-
assert.lengthOf(definitions.requests, 1, 'has a single item')
|
|
254
|
-
const [item] = definitions.requests
|
|
255
|
-
assert.equal(item.key, request.key, 'sets the request instance')
|
|
256
|
-
})
|
|
257
|
-
|
|
258
|
-
test('sets the definitions.certificates', ({ assert }) => {
|
|
259
|
-
const cert = Certificate.fromP12('value')
|
|
260
|
-
const init: IHttpProject = {
|
|
261
|
-
...base,
|
|
262
|
-
...{
|
|
263
|
-
definitions: {
|
|
264
|
-
certificates: [cert.toJSON()],
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
}
|
|
268
|
-
const project = new HttpProject(init)
|
|
269
|
-
const { definitions } = project
|
|
270
|
-
assert.typeOf(definitions.certificates, 'array', 'has the definitions')
|
|
271
|
-
assert.lengthOf(definitions.certificates, 1, 'has a single definition')
|
|
272
|
-
const [item] = definitions.certificates
|
|
273
|
-
assert.equal(item.key, cert.key, 'sets the request instance')
|
|
274
|
-
})
|
|
275
|
-
})
|
|
276
|
-
|
|
277
|
-
test.group('From JSON string initialization', () => {
|
|
278
|
-
test('restores project data from JSON string', ({ assert }) => {
|
|
279
|
-
const orig = new HttpProject()
|
|
280
|
-
orig.info.name = 'a project'
|
|
281
|
-
orig.addFolder('folder')
|
|
282
|
-
orig.addRequest('https://api.com')
|
|
283
|
-
const str = JSON.stringify(orig)
|
|
284
|
-
const result = new HttpProject(str)
|
|
285
|
-
|
|
286
|
-
assert.equal(result.key, orig.key, 'restores the key')
|
|
287
|
-
assert.equal(result.info.name, orig.info.name, 'restores the info object')
|
|
288
|
-
assert.ok(result.findFolder('folder'), 'restores a folder')
|
|
289
|
-
assert.ok(result.findRequest('https://api.com'), 'restores a request')
|
|
290
|
-
})
|
|
291
|
-
})
|
|
292
|
-
|
|
293
|
-
test.group('HttpProject.fromName()', () => {
|
|
294
|
-
test('creates an empty project with a name', ({ assert }) => {
|
|
295
|
-
const project = HttpProject.fromName('Test project')
|
|
296
|
-
assert.equal(project.kind, HttpProjectKind, 'sets the kind property')
|
|
297
|
-
assert.deepEqual(project.definitions.environments, [], 'sets the definitions.environments property')
|
|
298
|
-
assert.deepEqual(project.definitions.folders, [], 'sets the definitions.folders property')
|
|
299
|
-
assert.deepEqual(project.definitions.requests, [], 'sets the definitions.requests property')
|
|
300
|
-
assert.deepEqual(project.definitions.schemas, [], 'sets the definitions.schemas property')
|
|
301
|
-
assert.deepEqual(project.definitions.certificates, [], 'sets the definitions.certificates property')
|
|
302
|
-
assert.deepEqual(project.items, [], 'sets the items property')
|
|
303
|
-
const { info } = project
|
|
304
|
-
assert.typeOf(info, 'EventTarget', 'sets the default info property')
|
|
305
|
-
assert.equal(info.kind, ThingKind, 'sets the info.kind property')
|
|
306
|
-
assert.equal(info.name, 'Test project', 'sets the info.name property')
|
|
307
|
-
assert.isUndefined(project.license, 'has no license property')
|
|
308
|
-
assert.isUndefined(project.provider, 'has no provider property')
|
|
309
|
-
})
|
|
310
|
-
})
|
|
311
|
-
|
|
312
|
-
test.group('HttpProject.fromLegacy()', () => {
|
|
313
|
-
test('sets the name', async ({ assert }) => {
|
|
314
|
-
const init: ArcLegacyProject = {
|
|
315
|
-
name: 'abc',
|
|
316
|
-
}
|
|
317
|
-
const result = await HttpProject.fromLegacy(init, [])
|
|
318
|
-
assert.equal(result.info.name, 'abc')
|
|
319
|
-
})
|
|
320
|
-
|
|
321
|
-
test('sets the description', async ({ assert }) => {
|
|
322
|
-
const init: ArcLegacyProject = {
|
|
323
|
-
name: 'abc',
|
|
324
|
-
description: 'test',
|
|
325
|
-
}
|
|
326
|
-
const result = await HttpProject.fromLegacy(init, [])
|
|
327
|
-
assert.equal(result.info.description, 'test')
|
|
328
|
-
})
|
|
329
|
-
|
|
330
|
-
test('adds the requests', async ({ assert }) => {
|
|
331
|
-
const init: ArcLegacyProject = {
|
|
332
|
-
name: 'abc',
|
|
333
|
-
description: 'test',
|
|
334
|
-
requests: ['1'],
|
|
335
|
-
}
|
|
336
|
-
const requests: ARCSavedRequest[] = [
|
|
337
|
-
{
|
|
338
|
-
method: 'PUT',
|
|
339
|
-
name: 'r1',
|
|
340
|
-
url: 'https://',
|
|
341
|
-
_id: '1',
|
|
342
|
-
},
|
|
343
|
-
]
|
|
344
|
-
const result = await HttpProject.fromLegacy(init, requests)
|
|
345
|
-
const projectRequests = result.listRequests()
|
|
346
|
-
assert.lengthOf(projectRequests, 1, 'has a single request')
|
|
347
|
-
assert.equal(projectRequests[0].info.name, 'r1')
|
|
348
|
-
})
|
|
349
|
-
|
|
350
|
-
test('ignores missing requests', async ({ assert }) => {
|
|
351
|
-
const init: ArcLegacyProject = {
|
|
352
|
-
name: 'abc',
|
|
353
|
-
description: 'test',
|
|
354
|
-
requests: ['1', '2'],
|
|
355
|
-
}
|
|
356
|
-
const requests: ARCSavedRequest[] = [
|
|
357
|
-
{
|
|
358
|
-
method: 'PUT',
|
|
359
|
-
name: 'r1',
|
|
360
|
-
url: 'https://',
|
|
361
|
-
_id: '1',
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
method: 'DELETE',
|
|
365
|
-
name: 'r3',
|
|
366
|
-
url: 'https://api.com',
|
|
367
|
-
_id: '3',
|
|
368
|
-
},
|
|
369
|
-
]
|
|
370
|
-
const result = await HttpProject.fromLegacy(init, requests)
|
|
371
|
-
const projectRequests = result.listRequests()
|
|
372
|
-
assert.lengthOf(projectRequests, 1, 'has a single request')
|
|
373
|
-
assert.equal(projectRequests[0].info.name, 'r1')
|
|
374
|
-
})
|
|
375
|
-
})
|
|
376
|
-
|
|
377
|
-
test.group('HttpProject.fromInitOptions()', () => {
|
|
378
|
-
test('sets the name', ({ assert }) => {
|
|
379
|
-
const result = HttpProject.fromInitOptions({
|
|
380
|
-
name: 'abc',
|
|
381
|
-
})
|
|
382
|
-
assert.equal(result.info.name, 'abc')
|
|
383
|
-
})
|
|
384
|
-
})
|
|
385
|
-
|
|
386
|
-
test.group('toJSON()', (group) => {
|
|
387
|
-
let project: HttpProject
|
|
388
|
-
group.each.setup(() => {
|
|
389
|
-
project = new HttpProject()
|
|
390
|
-
})
|
|
391
|
-
|
|
392
|
-
test('sets the kind', ({ assert }) => {
|
|
393
|
-
const result = project.toJSON()
|
|
394
|
-
assert.equal(result.kind, HttpProjectKind)
|
|
395
|
-
})
|
|
396
|
-
|
|
397
|
-
test('sets the key', ({ assert }) => {
|
|
398
|
-
const result = project.toJSON()
|
|
399
|
-
assert.equal(result.key, project.key)
|
|
400
|
-
})
|
|
401
|
-
|
|
402
|
-
test('sets the info object', ({ assert }) => {
|
|
403
|
-
project.info.name = 'a'
|
|
404
|
-
const result = project.toJSON()
|
|
405
|
-
assert.equal(result.info.name, 'a')
|
|
406
|
-
})
|
|
407
|
-
|
|
408
|
-
test('sets the empty definitions', ({ assert }) => {
|
|
409
|
-
const result = project.toJSON()
|
|
410
|
-
assert.deepEqual(result.definitions, {})
|
|
411
|
-
})
|
|
412
|
-
|
|
413
|
-
test('sets the empty items', ({ assert }) => {
|
|
414
|
-
const result = project.toJSON()
|
|
415
|
-
assert.deepEqual(result.items, [])
|
|
416
|
-
})
|
|
417
|
-
|
|
418
|
-
test('does not set empty provider', ({ assert }) => {
|
|
419
|
-
const result = project.toJSON()
|
|
420
|
-
assert.isUndefined(result.provider)
|
|
421
|
-
})
|
|
422
|
-
|
|
423
|
-
test('does not set empty license', ({ assert }) => {
|
|
424
|
-
const result = project.toJSON()
|
|
425
|
-
assert.isUndefined(result.license)
|
|
426
|
-
})
|
|
427
|
-
|
|
428
|
-
test('serializes the items', ({ assert }) => {
|
|
429
|
-
const f1 = project.addFolder('f1')
|
|
430
|
-
const result = project.toJSON()
|
|
431
|
-
assert.lengthOf(result.items, 1)
|
|
432
|
-
assert.equal(result.items[0].key, f1.key)
|
|
433
|
-
})
|
|
434
|
-
|
|
435
|
-
test('serializes the definitions.environments', ({ assert }) => {
|
|
436
|
-
const e1 = project.addEnvironment('e1')
|
|
437
|
-
const result = project.toJSON()
|
|
438
|
-
assert.lengthOf(result.definitions.environments!, 1)
|
|
439
|
-
assert.equal(result.definitions.environments![0].key, e1.key)
|
|
440
|
-
})
|
|
441
|
-
|
|
442
|
-
test('serializes the definitions.requests', ({ assert }) => {
|
|
443
|
-
const r1 = project.addRequest('r1')
|
|
444
|
-
const result = project.toJSON()
|
|
445
|
-
assert.lengthOf(result.definitions.requests!, 1)
|
|
446
|
-
assert.equal(result.definitions.requests![0].key, r1.key)
|
|
447
|
-
})
|
|
448
|
-
|
|
449
|
-
test('serializes the definitions.folders', ({ assert }) => {
|
|
450
|
-
const f1 = project.addFolder('f1')
|
|
451
|
-
const result = project.toJSON()
|
|
452
|
-
assert.lengthOf(result.definitions.folders!, 1)
|
|
453
|
-
assert.equal(result.definitions.folders![0].key, f1.key)
|
|
454
|
-
})
|
|
455
|
-
|
|
456
|
-
test('serializes the definitions.certificates', ({ assert }) => {
|
|
457
|
-
const c1 = Certificate.fromP12('value')
|
|
458
|
-
project.addCertificate(c1)
|
|
459
|
-
const result = project.toJSON()
|
|
460
|
-
assert.lengthOf(result.definitions.certificates!, 1)
|
|
461
|
-
assert.equal(result.definitions.certificates![0].key, c1.key)
|
|
462
|
-
})
|
|
463
|
-
})
|
|
464
|
-
|
|
465
|
-
test.group('addFolder()', () => {
|
|
466
|
-
test('returns a key of the inserted folder', ({ assert }) => {
|
|
467
|
-
const project = new HttpProject()
|
|
468
|
-
const created = project.addFolder('A folder')
|
|
469
|
-
assert.typeOf(created, 'object', 'returns an object')
|
|
470
|
-
})
|
|
471
|
-
|
|
472
|
-
test('adds the folder to the items array', ({ assert }) => {
|
|
473
|
-
const project = new HttpProject()
|
|
474
|
-
const created = project.addFolder('A folder')
|
|
475
|
-
const { items } = project
|
|
476
|
-
assert.lengthOf(items, 1, 'items has a single object')
|
|
477
|
-
const [item] = items
|
|
478
|
-
|
|
479
|
-
assert.equal(item.key, created.key, 'has the key')
|
|
480
|
-
assert.equal(item.kind, ProjectFolderKind, 'has the kind')
|
|
481
|
-
})
|
|
482
|
-
|
|
483
|
-
test('adds the definition', ({ assert }) => {
|
|
484
|
-
const project = new HttpProject()
|
|
485
|
-
const created = project.addFolder('A folder')
|
|
486
|
-
const { definitions } = project
|
|
487
|
-
assert.lengthOf(definitions.folders, 1, 'has the definition')
|
|
488
|
-
const folder = definitions.folders[0]
|
|
489
|
-
|
|
490
|
-
assert.equal(folder.kind, ProjectFolderKind, 'has the kind')
|
|
491
|
-
assert.equal(folder.key, created.key, 'has the key')
|
|
492
|
-
|
|
493
|
-
const { info } = folder
|
|
494
|
-
assert.typeOf(info, 'EventTarget', 'has the info object')
|
|
495
|
-
assert.equal(info.kind, ThingKind, 'has the info.kind property')
|
|
496
|
-
assert.equal(info.name, 'A folder', 'has the info.name property')
|
|
497
|
-
|
|
498
|
-
assert.typeOf(folder.created, 'number', 'has the created property')
|
|
499
|
-
assert.typeOf(folder.updated, 'number', 'has the updated property')
|
|
500
|
-
assert.equal(folder.created, folder.updated, 'the updated and created properties equal')
|
|
501
|
-
|
|
502
|
-
assert.deepEqual(folder.items, [], 'has empty items')
|
|
503
|
-
})
|
|
504
|
-
|
|
505
|
-
test('adds multiple folders', ({ assert }) => {
|
|
506
|
-
const project = new HttpProject()
|
|
507
|
-
const created1 = project.addFolder('f1')
|
|
508
|
-
const created2 = project.addFolder('f2')
|
|
509
|
-
const created3 = project.addFolder('f3')
|
|
510
|
-
assert.lengthOf(project.items, 3, 'has all items')
|
|
511
|
-
assert.equal(project.items[0].key, created1.key, 'has item #1')
|
|
512
|
-
assert.equal(project.items[1].key, created2.key, 'has item #2')
|
|
513
|
-
assert.equal(project.items[2].key, created3.key, 'has item #3')
|
|
514
|
-
})
|
|
515
|
-
|
|
516
|
-
test('adds a folder of a folder', ({ assert }) => {
|
|
517
|
-
const project = new HttpProject()
|
|
518
|
-
const created1 = project.addFolder('f1')
|
|
519
|
-
const folder = project.findFolder(created1.key)!
|
|
520
|
-
const created2 = folder.addFolder('inception')
|
|
521
|
-
assert.lengthOf(project.items, 1, 'project has a single item')
|
|
522
|
-
assert.lengthOf(project.definitions.folders, 2, 'project has a two definitions')
|
|
523
|
-
|
|
524
|
-
const theFolder = project.definitions.folders[1]
|
|
525
|
-
assert.equal(theFolder.key, created2.key, 'adds the sub folder definition to the project')
|
|
526
|
-
assert.equal(theFolder.info.name, 'inception', 'sub-folder has the name')
|
|
527
|
-
})
|
|
528
|
-
|
|
529
|
-
test('ignores adding when the folder already exists', ({ assert }) => {
|
|
530
|
-
const project = new HttpProject()
|
|
531
|
-
const created1 = project.addFolder('f1')
|
|
532
|
-
const created2 = project.addFolder('f1', { skipExisting: true })
|
|
533
|
-
assert.deepEqual(created1, created2)
|
|
534
|
-
})
|
|
535
|
-
|
|
536
|
-
test('adds a folder on a specific position', ({ assert }) => {
|
|
537
|
-
const project = new HttpProject()
|
|
538
|
-
project.addFolder('f1')
|
|
539
|
-
project.addFolder('f2')
|
|
540
|
-
project.addFolder('f3')
|
|
541
|
-
const inserted = project.addFolder('f4', { index: 1 })
|
|
542
|
-
assert.equal(project.items[1].key, inserted.key)
|
|
543
|
-
})
|
|
544
|
-
})
|
|
545
|
-
|
|
546
|
-
test.group('findFolder()', () => {
|
|
547
|
-
test('returns undefine when no definitions', ({ assert }) => {
|
|
548
|
-
const project = new HttpProject()
|
|
549
|
-
const result = project.findFolder('abc')
|
|
550
|
-
assert.isUndefined(result)
|
|
551
|
-
})
|
|
552
|
-
|
|
553
|
-
test('finds the folder by the name', ({ assert }) => {
|
|
554
|
-
const project = new HttpProject()
|
|
555
|
-
const created = project.addFolder('abc')
|
|
556
|
-
const result = project.findFolder('abc')
|
|
557
|
-
assert.deepEqual(result, created)
|
|
558
|
-
})
|
|
559
|
-
|
|
560
|
-
test('finds the folder by the key', ({ assert }) => {
|
|
561
|
-
const project = new HttpProject()
|
|
562
|
-
const created = project.addFolder('abc')
|
|
563
|
-
const result = project.findFolder(created.key)
|
|
564
|
-
assert.deepEqual(result, created)
|
|
565
|
-
})
|
|
566
|
-
|
|
567
|
-
test('returns undefined for the keyOnly option', ({ assert }) => {
|
|
568
|
-
const project = new HttpProject()
|
|
569
|
-
project.addFolder('abc')
|
|
570
|
-
const result = project.findFolder('abc', { keyOnly: true })
|
|
571
|
-
assert.isUndefined(result)
|
|
572
|
-
})
|
|
573
|
-
|
|
574
|
-
test('returns a folder only', ({ assert }) => {
|
|
575
|
-
const project = new HttpProject()
|
|
576
|
-
const request = ProjectRequest.fromName('abc', project)
|
|
577
|
-
project.addRequest(request)
|
|
578
|
-
const created = project.addFolder('abc')
|
|
579
|
-
const result = project.findFolder('abc')
|
|
580
|
-
assert.deepEqual(result, created)
|
|
581
|
-
})
|
|
582
|
-
})
|
|
583
|
-
|
|
584
|
-
test.group('removeFolder()', () => {
|
|
585
|
-
test('removes the folder from the project', ({ assert }) => {
|
|
586
|
-
const name = 'abc'
|
|
587
|
-
const project = new HttpProject()
|
|
588
|
-
const created = project.addFolder(name)
|
|
589
|
-
project.removeFolder(created.key)
|
|
590
|
-
const result = project.findFolder(name)
|
|
591
|
-
assert.isUndefined(result)
|
|
592
|
-
})
|
|
593
|
-
|
|
594
|
-
test('removes the folder from the project items', ({ assert }) => {
|
|
595
|
-
const name = 'abc'
|
|
596
|
-
const project = new HttpProject()
|
|
597
|
-
const created = project.addFolder(name)
|
|
598
|
-
assert.lengthOf(project.items, 1, 'has an item')
|
|
599
|
-
project.removeFolder(created.key)
|
|
600
|
-
project.findFolder(name)
|
|
601
|
-
assert.deepEqual(project.items, [], 'the items is empty')
|
|
602
|
-
})
|
|
603
|
-
|
|
604
|
-
test('removes the folder from the definitions', ({ assert }) => {
|
|
605
|
-
const name = 'abc'
|
|
606
|
-
const project = new HttpProject()
|
|
607
|
-
const created = project.addFolder(name)
|
|
608
|
-
assert.lengthOf(project.definitions.folders, 1, 'has a definition')
|
|
609
|
-
project.removeFolder(created.key)
|
|
610
|
-
project.findFolder(name)
|
|
611
|
-
assert.deepEqual(project.definitions.folders, [], 'the definitions is empty')
|
|
612
|
-
})
|
|
613
|
-
|
|
614
|
-
test('removes the folder from a parent folder', ({ assert }) => {
|
|
615
|
-
const name = 'abc'
|
|
616
|
-
const project = new HttpProject()
|
|
617
|
-
const parent = project.addFolder('parent')
|
|
618
|
-
const created = project.addFolder(name, { parent: parent.key })
|
|
619
|
-
project.removeFolder(created.key)
|
|
620
|
-
const result = project.findFolder(name)
|
|
621
|
-
assert.isUndefined(result)
|
|
622
|
-
})
|
|
623
|
-
|
|
624
|
-
test('removes the folder from the parent folder items', ({ assert }) => {
|
|
625
|
-
const name = 'abc'
|
|
626
|
-
const project = new HttpProject()
|
|
627
|
-
const parent = project.addFolder('parent')
|
|
628
|
-
const created = project.addFolder(name, { parent: parent.key })
|
|
629
|
-
assert.lengthOf(parent.items, 1, 'has an item')
|
|
630
|
-
project.removeFolder(created.key)
|
|
631
|
-
project.findFolder(name)
|
|
632
|
-
assert.deepEqual(parent.items, [], 'the items is empty')
|
|
633
|
-
})
|
|
634
|
-
|
|
635
|
-
test('removes the folder from the definitions', ({ assert }) => {
|
|
636
|
-
const name = 'abc'
|
|
637
|
-
const project = new HttpProject()
|
|
638
|
-
const parent = project.addFolder('parent')
|
|
639
|
-
const created = project.addFolder(name, { parent: parent.key })
|
|
640
|
-
assert.lengthOf(project.definitions.folders, 2, 'has 2 definitions')
|
|
641
|
-
project.removeFolder(created.key)
|
|
642
|
-
project.findFolder(name)
|
|
643
|
-
assert.lengthOf(project.definitions.folders, 1, 'has 1 definition')
|
|
644
|
-
})
|
|
645
|
-
|
|
646
|
-
test('throws an error when folder is not found', ({ assert }) => {
|
|
647
|
-
const project = new HttpProject()
|
|
648
|
-
assert.throws(() => {
|
|
649
|
-
project.removeFolder('hello')
|
|
650
|
-
})
|
|
651
|
-
})
|
|
652
|
-
|
|
653
|
-
test('does not throw with the safe option', ({ assert }) => {
|
|
654
|
-
const project = new HttpProject()
|
|
655
|
-
assert.doesNotThrow(() => {
|
|
656
|
-
project.removeFolder('hello', { safe: true })
|
|
657
|
-
})
|
|
658
|
-
})
|
|
659
|
-
|
|
660
|
-
test('calls detachedCallback() on the folder', ({ assert }) => {
|
|
661
|
-
const project = new HttpProject()
|
|
662
|
-
const created = project.addFolder('test')
|
|
663
|
-
const spy = sinon.spy(created, 'detachedCallback')
|
|
664
|
-
project.removeFolder(created.key)
|
|
665
|
-
assert.isTrue(spy.calledOnce)
|
|
666
|
-
})
|
|
667
|
-
|
|
668
|
-
test('removes requests from the folder', ({ assert }) => {
|
|
669
|
-
const project = new HttpProject()
|
|
670
|
-
const parent = project.addFolder('f1')
|
|
671
|
-
parent.addRequest('r1')
|
|
672
|
-
parent.addRequest('r2')
|
|
673
|
-
parent.remove()
|
|
674
|
-
|
|
675
|
-
assert.deepEqual(project.items, [])
|
|
676
|
-
assert.deepEqual(project.definitions.folders, [])
|
|
677
|
-
})
|
|
678
|
-
|
|
679
|
-
test('removes folders from the folder', ({ assert }) => {
|
|
680
|
-
const project = new HttpProject()
|
|
681
|
-
const parent = project.addFolder('f1')
|
|
682
|
-
parent.addFolder('f2')
|
|
683
|
-
parent.addFolder('f3')
|
|
684
|
-
parent.remove()
|
|
685
|
-
|
|
686
|
-
assert.deepEqual(project.items, [])
|
|
687
|
-
assert.deepEqual(project.definitions.folders, [])
|
|
688
|
-
})
|
|
689
|
-
|
|
690
|
-
test('deeply removes folders and request from the folder', ({ assert }) => {
|
|
691
|
-
const project = new HttpProject()
|
|
692
|
-
const parent = project.addFolder('f1')
|
|
693
|
-
parent.addFolder('f2')
|
|
694
|
-
const f3 = parent.addFolder('f3')
|
|
695
|
-
f3.addRequest('r1')
|
|
696
|
-
f3.addRequest('r2')
|
|
697
|
-
parent.remove()
|
|
698
|
-
const otherFolder = project.addFolder('f4')
|
|
699
|
-
const otherRequest = project.addRequest('r3')
|
|
700
|
-
|
|
701
|
-
assert.lengthOf(project.items, 2, 'has the remaining items')
|
|
702
|
-
assert.deepEqual(project.definitions.folders, [otherFolder])
|
|
703
|
-
assert.deepEqual(project.definitions.requests, [otherRequest])
|
|
704
|
-
})
|
|
705
|
-
})
|
|
706
|
-
|
|
707
|
-
test.group('findParent()', () => {
|
|
708
|
-
test('finds a parent for a root level folder', ({ assert }) => {
|
|
709
|
-
const project = new HttpProject()
|
|
710
|
-
const created = project.addFolder('test')
|
|
711
|
-
const parent = project.findParent(created.key)
|
|
712
|
-
assert.deepEqual(parent, project)
|
|
713
|
-
})
|
|
714
|
-
|
|
715
|
-
test('finds a parent for a root level request', ({ assert }) => {
|
|
716
|
-
const project = new HttpProject()
|
|
717
|
-
const request = ProjectRequest.fromName('request', project)
|
|
718
|
-
const created = project.addRequest(request)
|
|
719
|
-
const parent = project.findParent(created.key)
|
|
720
|
-
assert.deepEqual(parent, project)
|
|
721
|
-
})
|
|
722
|
-
|
|
723
|
-
test('finds a parent for a sub-folder', ({ assert }) => {
|
|
724
|
-
const project = new HttpProject()
|
|
725
|
-
const folder = project.addFolder('parent')
|
|
726
|
-
const created = project.addFolder('test', { parent: folder.key })
|
|
727
|
-
const parent = project.findParent(created.key)
|
|
728
|
-
assert.deepEqual(parent, folder)
|
|
729
|
-
})
|
|
730
|
-
|
|
731
|
-
test('finds a parent for a root level request', ({ assert }) => {
|
|
732
|
-
const project = new HttpProject()
|
|
733
|
-
const folder = project.addFolder('parent')
|
|
734
|
-
const request = ProjectRequest.fromName('request', project)
|
|
735
|
-
const created = project.addRequest(request, { parent: folder.key })
|
|
736
|
-
const parent = project.findParent(created.key)
|
|
737
|
-
assert.deepEqual(parent, folder)
|
|
738
|
-
})
|
|
739
|
-
|
|
740
|
-
test('returns undefined when not found', ({ assert }) => {
|
|
741
|
-
const project = new HttpProject()
|
|
742
|
-
const folder = project.addFolder('parent')
|
|
743
|
-
project.addFolder('test', { parent: folder.key })
|
|
744
|
-
const parent = project.findParent('other')
|
|
745
|
-
assert.isUndefined(parent)
|
|
746
|
-
})
|
|
747
|
-
})
|
|
748
|
-
|
|
749
|
-
test.group('moveFolder()', (group) => {
|
|
750
|
-
let project: HttpProject
|
|
751
|
-
group.each.setup(() => {
|
|
752
|
-
project = new HttpProject()
|
|
753
|
-
const folder1 = project.addFolder('folder1')
|
|
754
|
-
const folder2 = project.addFolder('folder2')
|
|
755
|
-
project.addFolder('folder3', { parent: folder2.key })
|
|
756
|
-
const request1 = ProjectRequest.fromName('request1', project)
|
|
757
|
-
const request2 = ProjectRequest.fromName('request2', project)
|
|
758
|
-
const request3 = ProjectRequest.fromName('request3', project)
|
|
759
|
-
const request4 = ProjectRequest.fromName('request4', project)
|
|
760
|
-
project.addRequest(request1)
|
|
761
|
-
folder1.addRequest(request2)
|
|
762
|
-
folder1.addRequest(request3)
|
|
763
|
-
folder1.addRequest(request4)
|
|
764
|
-
})
|
|
765
|
-
|
|
766
|
-
test('moves a folder to an index position inside the project root', ({ assert }) => {
|
|
767
|
-
const moved = project.findFolder('folder1')!
|
|
768
|
-
const indexBefore = project.items.findIndex((i) => i.key === moved.key)
|
|
769
|
-
assert.equal(indexBefore, 0, 'the item is on position 0 initially')
|
|
770
|
-
project.moveFolder(moved.key, { index: 1 })
|
|
771
|
-
const index = project.items.findIndex((i) => i.key === moved.key)
|
|
772
|
-
assert.equal(index, 1, 'is moved to a new position')
|
|
773
|
-
})
|
|
774
|
-
|
|
775
|
-
test('moves a folder to the end inside the project root', ({ assert }) => {
|
|
776
|
-
const moved = project.findFolder('folder1')!
|
|
777
|
-
const indexBefore = project.items.findIndex((i) => i.key === moved.key)
|
|
778
|
-
assert.equal(indexBefore, 0, 'the item is on position 0 initially')
|
|
779
|
-
project.moveFolder(moved.key)
|
|
780
|
-
const index = project.items.findIndex((i) => i.key === moved.key)
|
|
781
|
-
assert.equal(index, 2, 'is moved to the end')
|
|
782
|
-
})
|
|
783
|
-
|
|
784
|
-
test('moves a folder to another folder', ({ assert }) => {
|
|
785
|
-
const oldParent = project.findFolder('folder2')!
|
|
786
|
-
const moved = project.findFolder('folder3')!
|
|
787
|
-
const target = project.findFolder('folder1')!
|
|
788
|
-
assert.isTrue(
|
|
789
|
-
oldParent.items.some((i) => i.key === moved.key),
|
|
790
|
-
'the old parent has the item'
|
|
791
|
-
)
|
|
792
|
-
assert.isFalse(
|
|
793
|
-
target.items.some((i) => i.key === moved.key),
|
|
794
|
-
"the target doesn't have the moved item"
|
|
795
|
-
)
|
|
796
|
-
project.moveFolder(moved.key, { parent: target.key })
|
|
797
|
-
assert.isFalse(
|
|
798
|
-
oldParent.items.some((i) => i.key === moved.key),
|
|
799
|
-
'the item is removed from the old parent'
|
|
800
|
-
)
|
|
801
|
-
assert.equal(target.items[target.items.length - 1].key, moved.key, 'the item is inserted at the end of the target')
|
|
802
|
-
})
|
|
803
|
-
|
|
804
|
-
test('moves a folder to another folder into a position', ({ assert }) => {
|
|
805
|
-
const moved = project.findFolder('folder3')!
|
|
806
|
-
const target = project.findFolder('folder1')!
|
|
807
|
-
project.moveFolder(moved.key, { parent: target.key, index: 1 })
|
|
808
|
-
assert.equal(target.items[1].key, moved.key, 'the item is inserted at the position')
|
|
809
|
-
})
|
|
810
|
-
|
|
811
|
-
test('moves a folder to the project root', ({ assert }) => {
|
|
812
|
-
const moved = project.findFolder('folder3')!
|
|
813
|
-
project.moveFolder(moved.key)
|
|
814
|
-
assert.equal(project.items[project.items.length - 1].key, moved.key)
|
|
815
|
-
})
|
|
816
|
-
|
|
817
|
-
test('moves a folder to the project root at position', ({ assert }) => {
|
|
818
|
-
const moved = project.findFolder('folder3')!
|
|
819
|
-
project.moveFolder(moved.key, { index: 1 })
|
|
820
|
-
assert.equal(project.items[1].key, moved.key)
|
|
821
|
-
})
|
|
822
|
-
|
|
823
|
-
test('throws when moving into a position that is out of bounds', ({ assert }) => {
|
|
824
|
-
const moved = project.findFolder('folder3')!
|
|
825
|
-
assert.throws(
|
|
826
|
-
() => {
|
|
827
|
-
project.moveFolder(moved.key, { index: 5 })
|
|
828
|
-
},
|
|
829
|
-
RangeError,
|
|
830
|
-
'Index out of bounds. Maximum index is 3.'
|
|
831
|
-
)
|
|
832
|
-
})
|
|
833
|
-
|
|
834
|
-
test('throws when the folder is not found', ({ assert }) => {
|
|
835
|
-
assert.throws(
|
|
836
|
-
() => {
|
|
837
|
-
project.moveFolder('unknown')
|
|
838
|
-
},
|
|
839
|
-
Error,
|
|
840
|
-
'Unable to locate the folder unknown'
|
|
841
|
-
)
|
|
842
|
-
})
|
|
843
|
-
|
|
844
|
-
test('throws when the parent is not found', ({ assert }) => {
|
|
845
|
-
const moved = project.findFolder('folder3')!
|
|
846
|
-
assert.throws(
|
|
847
|
-
() => {
|
|
848
|
-
project.moveFolder(moved.key, { parent: 'unknown' })
|
|
849
|
-
},
|
|
850
|
-
Error,
|
|
851
|
-
'Unable to locate the new parent folder unknown'
|
|
852
|
-
)
|
|
853
|
-
})
|
|
854
|
-
|
|
855
|
-
test('throws when moving a parent to its child', ({ assert }) => {
|
|
856
|
-
const parent = project.findFolder('folder2')!
|
|
857
|
-
const child = project.findFolder('folder3')!
|
|
858
|
-
assert.throws(
|
|
859
|
-
() => {
|
|
860
|
-
project.moveFolder(parent.key, { parent: child.key })
|
|
861
|
-
},
|
|
862
|
-
RangeError,
|
|
863
|
-
'Unable to move a folder to its child.'
|
|
864
|
-
)
|
|
865
|
-
})
|
|
866
|
-
})
|
|
867
|
-
|
|
868
|
-
test.group('hasChild()', (group) => {
|
|
869
|
-
let project: HttpProject
|
|
870
|
-
group.each.setup(() => {
|
|
871
|
-
project = new HttpProject()
|
|
872
|
-
const folder1 = project.addFolder('folder1')
|
|
873
|
-
const folder2 = project.addFolder('folder2', { parent: folder1.key })
|
|
874
|
-
const folder3 = project.addFolder('folder3', { parent: folder2.key })
|
|
875
|
-
project.addFolder('folder4')
|
|
876
|
-
const request1 = ProjectRequest.fromName('request1', project)
|
|
877
|
-
const request2 = ProjectRequest.fromName('request2', project)
|
|
878
|
-
const request3 = ProjectRequest.fromName('request3', project)
|
|
879
|
-
const request4 = ProjectRequest.fromName('request4', project)
|
|
880
|
-
project.addRequest(request1)
|
|
881
|
-
folder1.addRequest(request2)
|
|
882
|
-
folder1.addRequest(request3)
|
|
883
|
-
folder3.addRequest(request4)
|
|
884
|
-
})
|
|
885
|
-
|
|
886
|
-
test('returns true when the project has a child request (direct)', ({ assert }) => {
|
|
887
|
-
const request = project.findRequest('request1')!
|
|
888
|
-
const result = project.hasChild(request.key)
|
|
889
|
-
assert.isTrue(result)
|
|
890
|
-
})
|
|
891
|
-
|
|
892
|
-
test('returns true when the project has a child request (indirect)', ({ assert }) => {
|
|
893
|
-
const request = project.findRequest('request4')!
|
|
894
|
-
const result = project.hasChild(request.key)
|
|
895
|
-
assert.isTrue(result)
|
|
896
|
-
})
|
|
897
|
-
|
|
898
|
-
test('returns true when the project has a child folder (direct)', ({ assert }) => {
|
|
899
|
-
const folder = project.findFolder('folder1')!
|
|
900
|
-
const result = project.hasChild(folder.key)
|
|
901
|
-
assert.isTrue(result)
|
|
902
|
-
})
|
|
903
|
-
|
|
904
|
-
test('returns true when the project has a child folder (indirect)', ({ assert }) => {
|
|
905
|
-
const folder = project.findFolder('folder3')!
|
|
906
|
-
const result = project.hasChild(folder.key)
|
|
907
|
-
assert.isTrue(result)
|
|
908
|
-
})
|
|
909
|
-
|
|
910
|
-
test('returns true when a folder has a child request (direct)', ({ assert }) => {
|
|
911
|
-
const parent = project.findFolder('folder1')!
|
|
912
|
-
const request = project.findRequest('request2')!
|
|
913
|
-
const result = project.hasChild(request.key, parent.key)
|
|
914
|
-
assert.isTrue(result)
|
|
915
|
-
})
|
|
916
|
-
|
|
917
|
-
test('returns true when a folder has a child request (indirect)', ({ assert }) => {
|
|
918
|
-
const parent = project.findFolder('folder1')!
|
|
919
|
-
const request = project.findRequest('request4')!
|
|
920
|
-
const result = project.hasChild(request.key, parent.key)
|
|
921
|
-
assert.isTrue(result)
|
|
922
|
-
})
|
|
923
|
-
|
|
924
|
-
test('returns true when a folder has a child folder (direct)', ({ assert }) => {
|
|
925
|
-
const parent = project.findFolder('folder1')!
|
|
926
|
-
const folder = project.findFolder('folder2')!
|
|
927
|
-
const result = project.hasChild(folder.key, parent.key)
|
|
928
|
-
assert.isTrue(result)
|
|
929
|
-
})
|
|
930
|
-
|
|
931
|
-
test('returns true when a folder has a child request (indirect)', ({ assert }) => {
|
|
932
|
-
const parent = project.findFolder('folder1')!
|
|
933
|
-
const folder = project.findFolder('folder3')!
|
|
934
|
-
const result = project.hasChild(folder.key, parent.key)
|
|
935
|
-
assert.isTrue(result)
|
|
936
|
-
})
|
|
937
|
-
|
|
938
|
-
test('returns false when the folder has no a folder as a child', ({ assert }) => {
|
|
939
|
-
const parent = project.findFolder('folder1')!
|
|
940
|
-
const folder = project.findFolder('folder4')!
|
|
941
|
-
const result = project.hasChild(folder.key, parent.key)
|
|
942
|
-
assert.isFalse(result)
|
|
943
|
-
})
|
|
944
|
-
|
|
945
|
-
test('returns false when the project has no folder as a child', ({ assert }) => {
|
|
946
|
-
const result = project.hasChild('unknown')
|
|
947
|
-
assert.isFalse(result)
|
|
948
|
-
})
|
|
949
|
-
|
|
950
|
-
test('returns false when a folder has no request as a child', ({ assert }) => {
|
|
951
|
-
const parent = project.findFolder('folder1')!
|
|
952
|
-
const request = project.findRequest('request1')!
|
|
953
|
-
const result = project.hasChild(request.key, parent.key)
|
|
954
|
-
assert.isFalse(result)
|
|
955
|
-
})
|
|
956
|
-
})
|
|
957
|
-
|
|
958
|
-
test.group('addRequest()', () => {
|
|
959
|
-
test('adds an instance of the request', ({ assert }) => {
|
|
960
|
-
const project = new HttpProject()
|
|
961
|
-
const request = ProjectRequest.fromName('test', project)
|
|
962
|
-
const created = project.addRequest(request)
|
|
963
|
-
assert.deepEqual(created, request)
|
|
964
|
-
|
|
965
|
-
assert.lengthOf(project.definitions.requests, 1, 'has one definition')
|
|
966
|
-
assert.deepEqual(project.definitions.requests[0], created, "inserts the definition into project's definitions")
|
|
967
|
-
assert.equal(project.items[0].key, created.key, 'the project has the item')
|
|
968
|
-
|
|
969
|
-
assert.equal(created.getParent()!.kind, HttpProjectKind, 'the request has the parent as the project')
|
|
970
|
-
})
|
|
971
|
-
|
|
972
|
-
test('adds the request from the schema', ({ assert }) => {
|
|
973
|
-
const project = new HttpProject()
|
|
974
|
-
const request = ProjectRequest.fromName('test', project)
|
|
975
|
-
const schema = request.toJSON()
|
|
976
|
-
const created = project.addRequest(schema)
|
|
977
|
-
|
|
978
|
-
assert.deepEqual(created, request)
|
|
979
|
-
|
|
980
|
-
assert.lengthOf(project.definitions.requests, 1, 'has one definition')
|
|
981
|
-
assert.deepEqual(project.definitions.requests[0], created, "inserts the definition into project's definitions")
|
|
982
|
-
assert.equal(project.items[0].key, created.key, 'the project has the item')
|
|
983
|
-
|
|
984
|
-
assert.equal(created.getParent()!.kind, HttpProjectKind, 'the request has the parent as the project')
|
|
985
|
-
})
|
|
986
|
-
|
|
987
|
-
test('adds the request to a folder', ({ assert }) => {
|
|
988
|
-
const project = new HttpProject()
|
|
989
|
-
const folder = project.addFolder('a folder')
|
|
990
|
-
|
|
991
|
-
const request = ProjectRequest.fromName('test', project)
|
|
992
|
-
const created = project.addRequest(request, { parent: folder.key })
|
|
993
|
-
|
|
994
|
-
assert.lengthOf(project.definitions.requests, 1, 'has the request definition')
|
|
995
|
-
assert.deepEqual(project.definitions.requests[0], created, "inserts the definition into project's definitions")
|
|
996
|
-
assert.lengthOf(folder.items, 1, 'the folder has a single item')
|
|
997
|
-
assert.equal(folder.items[0].key, created.key, 'the folder has the item')
|
|
998
|
-
|
|
999
|
-
assert.deepEqual(created.getParent(), folder, 'the request has the parent as the folder')
|
|
1000
|
-
})
|
|
1001
|
-
|
|
1002
|
-
test('adds the key if missing', ({ assert }) => {
|
|
1003
|
-
const project = new HttpProject()
|
|
1004
|
-
const request = ProjectRequest.fromName('test', project)
|
|
1005
|
-
const schema = request.toJSON()
|
|
1006
|
-
// @ts-expect-error Used in testing
|
|
1007
|
-
delete schema.key
|
|
1008
|
-
const created = project.addRequest(schema)
|
|
1009
|
-
|
|
1010
|
-
assert.typeOf(created.key, 'string', 'has a new key')
|
|
1011
|
-
})
|
|
1012
|
-
|
|
1013
|
-
test('calls the attachedCallback() on the request', ({ assert }) => {
|
|
1014
|
-
const project = new HttpProject()
|
|
1015
|
-
const request = ProjectRequest.fromName('test', project)
|
|
1016
|
-
const spy = sinon.spy(request, 'attachedCallback')
|
|
1017
|
-
project.addRequest(request)
|
|
1018
|
-
|
|
1019
|
-
assert.isTrue(spy.calledOnce)
|
|
1020
|
-
})
|
|
1021
|
-
|
|
1022
|
-
test('throws when parent folder not found', ({ assert }) => {
|
|
1023
|
-
const project = new HttpProject()
|
|
1024
|
-
const request = ProjectRequest.fromName('test', project)
|
|
1025
|
-
|
|
1026
|
-
assert.throws(
|
|
1027
|
-
() => {
|
|
1028
|
-
project.addRequest(request, { parent: 'unknown' })
|
|
1029
|
-
},
|
|
1030
|
-
Error,
|
|
1031
|
-
'Unable to find the parent folder unknown.'
|
|
1032
|
-
)
|
|
1033
|
-
})
|
|
1034
|
-
|
|
1035
|
-
test('throws when index out of bounds', ({ assert }) => {
|
|
1036
|
-
const project = new HttpProject()
|
|
1037
|
-
const request = ProjectRequest.fromName('test', project)
|
|
1038
|
-
|
|
1039
|
-
assert.throws(
|
|
1040
|
-
() => {
|
|
1041
|
-
project.addRequest(request, { index: 1 })
|
|
1042
|
-
},
|
|
1043
|
-
RangeError,
|
|
1044
|
-
'Index out of bounds. Maximum index is 0.'
|
|
1045
|
-
)
|
|
1046
|
-
})
|
|
1047
|
-
})
|
|
1048
|
-
|
|
1049
|
-
test.group('findRequest()', () => {
|
|
1050
|
-
test('returns undefined when no definitions', ({ assert }) => {
|
|
1051
|
-
const project = new HttpProject()
|
|
1052
|
-
const result = project.findRequest('abc')
|
|
1053
|
-
assert.isUndefined(result)
|
|
1054
|
-
})
|
|
1055
|
-
|
|
1056
|
-
test('finds the request by the name', ({ assert }) => {
|
|
1057
|
-
const project = new HttpProject()
|
|
1058
|
-
const created = ProjectRequest.fromName('abc', project)
|
|
1059
|
-
project.addRequest(created)
|
|
1060
|
-
const result = project.findRequest('abc')
|
|
1061
|
-
assert.deepEqual(result, created)
|
|
1062
|
-
})
|
|
1063
|
-
|
|
1064
|
-
test('finds the request by the key', ({ assert }) => {
|
|
1065
|
-
const project = new HttpProject()
|
|
1066
|
-
const created = ProjectRequest.fromName('abc', project)
|
|
1067
|
-
project.addRequest(created)
|
|
1068
|
-
const result = project.findRequest(created.key)
|
|
1069
|
-
assert.deepEqual(result, created)
|
|
1070
|
-
})
|
|
1071
|
-
|
|
1072
|
-
test('returns undefined for the keyOnly option', ({ assert }) => {
|
|
1073
|
-
const project = new HttpProject()
|
|
1074
|
-
project.addRequest(ProjectRequest.fromName('abc', project))
|
|
1075
|
-
const result = project.findRequest('abc', { keyOnly: true })
|
|
1076
|
-
assert.isUndefined(result)
|
|
1077
|
-
})
|
|
1078
|
-
|
|
1079
|
-
test('returns a request only', ({ assert }) => {
|
|
1080
|
-
const project = new HttpProject()
|
|
1081
|
-
project.addFolder('abc')
|
|
1082
|
-
const request = ProjectRequest.fromName('abc', project)
|
|
1083
|
-
project.addRequest(request)
|
|
1084
|
-
const result = project.findRequest('abc')
|
|
1085
|
-
assert.deepEqual(result, request)
|
|
1086
|
-
})
|
|
1087
|
-
})
|
|
1088
|
-
|
|
1089
|
-
test.group('removeRequest()', () => {
|
|
1090
|
-
test('removes the request from the project', ({ assert }) => {
|
|
1091
|
-
const name = 'abc'
|
|
1092
|
-
const project = new HttpProject()
|
|
1093
|
-
const created = ProjectRequest.fromName(name, project)
|
|
1094
|
-
project.addRequest(created)
|
|
1095
|
-
project.removeRequest(created.key)
|
|
1096
|
-
const result = project.findRequest(name)
|
|
1097
|
-
assert.isUndefined(result)
|
|
1098
|
-
})
|
|
1099
|
-
|
|
1100
|
-
test('removes the request from the project items', ({ assert }) => {
|
|
1101
|
-
const project = new HttpProject()
|
|
1102
|
-
const created = ProjectRequest.fromName('test', project)
|
|
1103
|
-
project.addRequest(created)
|
|
1104
|
-
assert.lengthOf(project.items, 1, 'has an item')
|
|
1105
|
-
project.removeRequest(created.key)
|
|
1106
|
-
assert.deepEqual(project.items, [], 'the items is empty')
|
|
1107
|
-
})
|
|
1108
|
-
|
|
1109
|
-
test('removes the request from the definitions', ({ assert }) => {
|
|
1110
|
-
const project = new HttpProject()
|
|
1111
|
-
const created = ProjectRequest.fromName('test', project)
|
|
1112
|
-
project.addRequest(created)
|
|
1113
|
-
assert.lengthOf(project.definitions.requests, 1, 'has a definition')
|
|
1114
|
-
project.removeRequest(created.key)
|
|
1115
|
-
assert.deepEqual(project.definitions.requests, [], 'the definitions is empty')
|
|
1116
|
-
})
|
|
1117
|
-
|
|
1118
|
-
test('removes the request from a parent folder', ({ assert }) => {
|
|
1119
|
-
const name = 'abc'
|
|
1120
|
-
const project = new HttpProject()
|
|
1121
|
-
const parent = project.addFolder('parent')
|
|
1122
|
-
const created = ProjectRequest.fromName(name, project)
|
|
1123
|
-
project.addRequest(created, { parent: parent.key })
|
|
1124
|
-
project.removeRequest(created.key)
|
|
1125
|
-
const result = project.findRequest(name)
|
|
1126
|
-
assert.isUndefined(result)
|
|
1127
|
-
})
|
|
1128
|
-
|
|
1129
|
-
test('removes the request from the parent folder items', ({ assert }) => {
|
|
1130
|
-
const name = 'abc'
|
|
1131
|
-
const project = new HttpProject()
|
|
1132
|
-
const parent = project.addFolder('parent')
|
|
1133
|
-
const created = ProjectRequest.fromName(name, project)
|
|
1134
|
-
project.addRequest(created, { parent: parent.key })
|
|
1135
|
-
assert.lengthOf(parent.items, 1, 'has an item')
|
|
1136
|
-
project.removeRequest(created.key)
|
|
1137
|
-
assert.deepEqual(parent.items, [], 'the items is empty')
|
|
1138
|
-
})
|
|
1139
|
-
|
|
1140
|
-
test('removes the request from the definitions', ({ assert }) => {
|
|
1141
|
-
const name = 'abc'
|
|
1142
|
-
const project = new HttpProject()
|
|
1143
|
-
const parent = project.addFolder('parent')
|
|
1144
|
-
const created = ProjectRequest.fromName(name, project)
|
|
1145
|
-
project.addRequest(created, { parent: parent.key })
|
|
1146
|
-
assert.lengthOf(project.definitions.requests, 1, 'has 1 definition')
|
|
1147
|
-
project.removeRequest(created.key)
|
|
1148
|
-
assert.lengthOf(project.definitions.requests, 0, 'has 0 definitions')
|
|
1149
|
-
})
|
|
1150
|
-
|
|
1151
|
-
test('throws an error when the request is not found', ({ assert }) => {
|
|
1152
|
-
const project = new HttpProject()
|
|
1153
|
-
assert.throws(() => {
|
|
1154
|
-
project.removeRequest('hello')
|
|
1155
|
-
})
|
|
1156
|
-
})
|
|
1157
|
-
|
|
1158
|
-
test('does not throw with the safe option', ({ assert }) => {
|
|
1159
|
-
const project = new HttpProject()
|
|
1160
|
-
assert.doesNotThrow(() => {
|
|
1161
|
-
project.removeRequest('hello', { safe: true })
|
|
1162
|
-
})
|
|
1163
|
-
})
|
|
1164
|
-
|
|
1165
|
-
test('calls detachedCallback() on the request', ({ assert }) => {
|
|
1166
|
-
const project = new HttpProject()
|
|
1167
|
-
const created = ProjectRequest.fromName('test', project)
|
|
1168
|
-
project.addRequest(created)
|
|
1169
|
-
const spy = sinon.spy(created, 'detachedCallback')
|
|
1170
|
-
project.removeRequest(created.key)
|
|
1171
|
-
assert.isTrue(spy.calledOnce)
|
|
1172
|
-
})
|
|
1173
|
-
})
|
|
1174
|
-
|
|
1175
|
-
test.group('moveRequest()', (group) => {
|
|
1176
|
-
let project: HttpProject
|
|
1177
|
-
group.each.setup(() => {
|
|
1178
|
-
project = new HttpProject()
|
|
1179
|
-
const folder1 = project.addFolder('folder1')
|
|
1180
|
-
const folder2 = project.addFolder('folder2')
|
|
1181
|
-
project.addFolder('folder3', { parent: folder2.key })
|
|
1182
|
-
const request1 = ProjectRequest.fromName('request1', project)
|
|
1183
|
-
const request2 = ProjectRequest.fromName('request2', project)
|
|
1184
|
-
const request3 = ProjectRequest.fromName('request3', project)
|
|
1185
|
-
const request4 = ProjectRequest.fromName('request4', project)
|
|
1186
|
-
project.addRequest(request1)
|
|
1187
|
-
folder1.addRequest(request2)
|
|
1188
|
-
folder1.addRequest(request3)
|
|
1189
|
-
folder1.addRequest(request4)
|
|
1190
|
-
})
|
|
1191
|
-
|
|
1192
|
-
test('moves a request to the end of project root from a folder', ({ assert }) => {
|
|
1193
|
-
const oldParent = project.findFolder('folder1')!
|
|
1194
|
-
const moved = project.findRequest('request2')!
|
|
1195
|
-
assert.isTrue(
|
|
1196
|
-
oldParent.items.some((i) => i.key === moved.key),
|
|
1197
|
-
'the old parent has the request'
|
|
1198
|
-
)
|
|
1199
|
-
project.moveRequest(moved.key)
|
|
1200
|
-
assert.isFalse(
|
|
1201
|
-
oldParent.items.some((i) => i.key === moved.key),
|
|
1202
|
-
'removes the request from the old parent'
|
|
1203
|
-
)
|
|
1204
|
-
assert.equal(project.items[project.items.length - 1].key, moved.key, 'project has the request')
|
|
1205
|
-
})
|
|
1206
|
-
|
|
1207
|
-
test('moves a request to the specific position of the project root from a folder', ({ assert }) => {
|
|
1208
|
-
const moved = project.findRequest('request2')!
|
|
1209
|
-
project.moveRequest(moved.key, { index: 0 })
|
|
1210
|
-
assert.equal(project.items[0].key, moved.key)
|
|
1211
|
-
})
|
|
1212
|
-
|
|
1213
|
-
test('moves a request from the project root to a folder at the end', ({ assert }) => {
|
|
1214
|
-
const moved = project.findRequest('request1')!
|
|
1215
|
-
const parent = project.findFolder('folder2')!
|
|
1216
|
-
project.moveRequest(moved.key, { parent: parent.key })
|
|
1217
|
-
assert.isFalse(
|
|
1218
|
-
project.items.some((i) => i.key === moved.key),
|
|
1219
|
-
"removes the request from the project's root"
|
|
1220
|
-
)
|
|
1221
|
-
assert.equal(parent.items[parent.items.length - 1].key, moved.key, 'the parent has the request')
|
|
1222
|
-
})
|
|
1223
|
-
|
|
1224
|
-
test('moves a request from the project root to a folder at a position', ({ assert }) => {
|
|
1225
|
-
const moved = project.findRequest('request1')!
|
|
1226
|
-
const parent = project.findFolder('folder1')!
|
|
1227
|
-
project.moveRequest(moved.key, { parent: parent.key, index: 1 })
|
|
1228
|
-
assert.isFalse(
|
|
1229
|
-
project.items.some((i) => i.key === moved.key),
|
|
1230
|
-
"removes the request from the project's root"
|
|
1231
|
-
)
|
|
1232
|
-
assert.equal(parent.items[1].key, moved.key, 'the parent has the request')
|
|
1233
|
-
})
|
|
1234
|
-
|
|
1235
|
-
test('moves a request from a folder to a folder at the end', ({ assert }) => {
|
|
1236
|
-
const moved = project.findRequest('request1')!
|
|
1237
|
-
const oldParent = project.findFolder('folder1')!
|
|
1238
|
-
const parent = project.findFolder('folder2')!
|
|
1239
|
-
project.moveRequest(moved.key, { parent: parent.key })
|
|
1240
|
-
assert.isFalse(
|
|
1241
|
-
oldParent.items.some((i) => i.key === moved.key),
|
|
1242
|
-
'removes the request from the old parent'
|
|
1243
|
-
)
|
|
1244
|
-
assert.equal(parent.items[parent.items.length - 1].key, moved.key, 'the parent has the request')
|
|
1245
|
-
})
|
|
1246
|
-
|
|
1247
|
-
test('moves a request from a folder root to a folder at a position', ({ assert }) => {
|
|
1248
|
-
const moved = project.findRequest('request1')!
|
|
1249
|
-
const parent = project.findFolder('folder2')!
|
|
1250
|
-
project.moveRequest(moved.key, { parent: parent.key, index: 0 })
|
|
1251
|
-
assert.equal(parent.items[0].key, moved.key, 'the parent has the request')
|
|
1252
|
-
})
|
|
1253
|
-
|
|
1254
|
-
test('calls the detachedCallback() on the request', ({ assert }) => {
|
|
1255
|
-
const moved = project.findRequest('request2')!
|
|
1256
|
-
const spy = sinon.spy(moved, 'detachedCallback')
|
|
1257
|
-
project.moveRequest(moved.key)
|
|
1258
|
-
assert.isTrue(spy.calledOnce)
|
|
1259
|
-
})
|
|
1260
|
-
|
|
1261
|
-
test('calls the attachedCallback() on the request', ({ assert }) => {
|
|
1262
|
-
const moved = project.findRequest('request2')!
|
|
1263
|
-
const spy = sinon.spy(moved, 'attachedCallback')
|
|
1264
|
-
project.moveRequest(moved.key)
|
|
1265
|
-
assert.isTrue(spy.calledOnce)
|
|
1266
|
-
})
|
|
1267
|
-
|
|
1268
|
-
test('throws when moving into a position that is out of bounds', ({ assert }) => {
|
|
1269
|
-
const moved = project.findRequest('request2')!
|
|
1270
|
-
const parent = project.findFolder('folder3')!
|
|
1271
|
-
assert.throws(
|
|
1272
|
-
() => {
|
|
1273
|
-
project.moveRequest(moved.key, { parent: parent.key, index: 5 })
|
|
1274
|
-
},
|
|
1275
|
-
RangeError,
|
|
1276
|
-
'Index out of bounds. Maximum index is 0.'
|
|
1277
|
-
)
|
|
1278
|
-
})
|
|
1279
|
-
|
|
1280
|
-
test('throws when the request is not found', ({ assert }) => {
|
|
1281
|
-
assert.throws(
|
|
1282
|
-
() => {
|
|
1283
|
-
project.moveRequest('unknown')
|
|
1284
|
-
},
|
|
1285
|
-
Error,
|
|
1286
|
-
'Unable to locate the request unknown'
|
|
1287
|
-
)
|
|
1288
|
-
})
|
|
1289
|
-
|
|
1290
|
-
test('throws when the parent is not found', ({ assert }) => {
|
|
1291
|
-
const moved = project.findRequest('request2')!
|
|
1292
|
-
assert.throws(
|
|
1293
|
-
() => {
|
|
1294
|
-
project.moveRequest(moved.key, { parent: 'unknown' })
|
|
1295
|
-
},
|
|
1296
|
-
Error,
|
|
1297
|
-
'Unable to locate the new parent folder unknown'
|
|
1298
|
-
)
|
|
1299
|
-
})
|
|
1300
|
-
})
|
|
1301
|
-
|
|
1302
|
-
test.group('addLegacyRequest()', () => {
|
|
1303
|
-
test('adds a legacy history request', async ({ assert }) => {
|
|
1304
|
-
const project = new HttpProject()
|
|
1305
|
-
const request = generator.http.history()
|
|
1306
|
-
const created = await project.addLegacyRequest(request)
|
|
1307
|
-
assert.ok(created, 'returns the created request')
|
|
1308
|
-
assert.lengthOf(project.definitions.requests, 1, 'has one definition')
|
|
1309
|
-
|
|
1310
|
-
assert.deepEqual(project.definitions.requests[0], created, "inserts the definition into project's definitions")
|
|
1311
|
-
assert.equal(project.items[0].key, created.key, 'the project has the item')
|
|
1312
|
-
|
|
1313
|
-
assert.equal(created.getParent()!.kind, HttpProjectKind, 'the request has the parent as the project')
|
|
1314
|
-
|
|
1315
|
-
assert.equal(created.expects.url, request.url, 'has the URL')
|
|
1316
|
-
assert.equal(created.info.name, 'Unnamed request', 'has the default name')
|
|
1317
|
-
})
|
|
1318
|
-
|
|
1319
|
-
test('adds a legacy saved request', async ({ assert }) => {
|
|
1320
|
-
const project = new HttpProject()
|
|
1321
|
-
const request = generator.http.saved()
|
|
1322
|
-
const created = await project.addLegacyRequest(request)
|
|
1323
|
-
assert.ok(created, 'returns the created request')
|
|
1324
|
-
assert.lengthOf(project.definitions.requests, 1, 'has one definition')
|
|
1325
|
-
|
|
1326
|
-
assert.deepEqual(project.definitions.requests[0], created, "inserts the definition into project's definitions")
|
|
1327
|
-
assert.equal(project.items[0].key, created.key, 'the project has the item')
|
|
1328
|
-
|
|
1329
|
-
assert.equal(created.getParent()!.kind, HttpProjectKind, 'the request has the parent as the project')
|
|
1330
|
-
|
|
1331
|
-
assert.equal(created.expects.url, request.url, 'has the URL')
|
|
1332
|
-
assert.equal(created.info.name, request.name, 'has the name')
|
|
1333
|
-
})
|
|
1334
|
-
})
|
|
1335
|
-
|
|
1336
|
-
test.group('listFolderItems()', () => {
|
|
1337
|
-
test('returns empty array when no items', ({ assert }) => {
|
|
1338
|
-
const project = new HttpProject()
|
|
1339
|
-
const result = project.listFolderItems()
|
|
1340
|
-
assert.deepEqual(result, [])
|
|
1341
|
-
})
|
|
1342
|
-
|
|
1343
|
-
test('ignores request items', ({ assert }) => {
|
|
1344
|
-
const project = new HttpProject()
|
|
1345
|
-
const request = ProjectRequest.fromName('name', project)
|
|
1346
|
-
project.addRequest(request)
|
|
1347
|
-
const result = project.listFolderItems()
|
|
1348
|
-
assert.deepEqual(result, [])
|
|
1349
|
-
})
|
|
1350
|
-
|
|
1351
|
-
test('returns folders', ({ assert }) => {
|
|
1352
|
-
const project = new HttpProject()
|
|
1353
|
-
const request = ProjectRequest.fromName('name', project)
|
|
1354
|
-
project.addRequest(request)
|
|
1355
|
-
const folder = project.addFolder('a folder')
|
|
1356
|
-
const result = project.listFolderItems()
|
|
1357
|
-
assert.lengthOf(result, 1, 'has a single result')
|
|
1358
|
-
assert.equal(result[0].key, folder.key)
|
|
1359
|
-
})
|
|
1360
|
-
})
|
|
1361
|
-
|
|
1362
|
-
test.group('listRequestItems()', () => {
|
|
1363
|
-
test('returns empty array when no items', ({ assert }) => {
|
|
1364
|
-
const project = new HttpProject()
|
|
1365
|
-
const result = project.listRequestItems()
|
|
1366
|
-
assert.deepEqual(result, [])
|
|
1367
|
-
})
|
|
1368
|
-
|
|
1369
|
-
test('ignores folder items', ({ assert }) => {
|
|
1370
|
-
const project = new HttpProject()
|
|
1371
|
-
project.addFolder('a folder')
|
|
1372
|
-
const result = project.listRequestItems()
|
|
1373
|
-
assert.deepEqual(result, [])
|
|
1374
|
-
})
|
|
1375
|
-
|
|
1376
|
-
test('returns requests', ({ assert }) => {
|
|
1377
|
-
const project = new HttpProject()
|
|
1378
|
-
const request = ProjectRequest.fromName('name', project)
|
|
1379
|
-
project.addRequest(request)
|
|
1380
|
-
project.addFolder('a folder')
|
|
1381
|
-
const result = project.listRequestItems()
|
|
1382
|
-
assert.lengthOf(result, 1, 'has a single result')
|
|
1383
|
-
assert.equal(result[0].key, request.key)
|
|
1384
|
-
})
|
|
1385
|
-
})
|
|
1386
|
-
|
|
1387
|
-
test.group('listFolders()', () => {
|
|
1388
|
-
test('lists folders from the project', ({ assert }) => {
|
|
1389
|
-
const project = new HttpProject()
|
|
1390
|
-
const f1 = project.addFolder('f1')
|
|
1391
|
-
const f2 = project.addFolder('f2')
|
|
1392
|
-
f2.addFolder('f3')
|
|
1393
|
-
project.addRequest(ProjectRequest.fromName('r1', project))
|
|
1394
|
-
const result = project.listFolders()
|
|
1395
|
-
assert.lengthOf(result, 2, 'has both folders')
|
|
1396
|
-
assert.equal(result[0].key, f1.key)
|
|
1397
|
-
assert.equal(result[1].key, f2.key)
|
|
1398
|
-
})
|
|
1399
|
-
|
|
1400
|
-
test('lists folders from a folder', ({ assert }) => {
|
|
1401
|
-
const project = new HttpProject()
|
|
1402
|
-
project.addFolder('f1')
|
|
1403
|
-
const f2 = project.addFolder('f2')
|
|
1404
|
-
const f3 = f2.addFolder('f3')
|
|
1405
|
-
f2.addRequest(ProjectRequest.fromName('r1', project))
|
|
1406
|
-
const result = project.listFolders({ folder: f2.key })
|
|
1407
|
-
assert.lengthOf(result, 1, 'has a single folder')
|
|
1408
|
-
assert.equal(result[0].key, f3.key)
|
|
1409
|
-
})
|
|
1410
|
-
|
|
1411
|
-
test('returns empty list when no items', ({ assert }) => {
|
|
1412
|
-
const project = new HttpProject()
|
|
1413
|
-
const f1 = project.addFolder('f1')
|
|
1414
|
-
const result = project.listFolders({ folder: f1.key })
|
|
1415
|
-
assert.deepEqual(result, [])
|
|
1416
|
-
})
|
|
1417
|
-
|
|
1418
|
-
test('throws when parent folder not found', ({ assert }) => {
|
|
1419
|
-
const project = new HttpProject()
|
|
1420
|
-
assert.throws(
|
|
1421
|
-
() => {
|
|
1422
|
-
project.listFolders({ folder: 'unknown' })
|
|
1423
|
-
},
|
|
1424
|
-
Error,
|
|
1425
|
-
'Unable to find the folder unknown.'
|
|
1426
|
-
)
|
|
1427
|
-
})
|
|
1428
|
-
})
|
|
1429
|
-
|
|
1430
|
-
test.group('listRequests()', () => {
|
|
1431
|
-
test('lists requests from the project', ({ assert }) => {
|
|
1432
|
-
const project = new HttpProject()
|
|
1433
|
-
const folder = project.addFolder('f1')
|
|
1434
|
-
const request = ProjectRequest.fromName('r1', project)
|
|
1435
|
-
project.addRequest(request)
|
|
1436
|
-
project.addRequest(ProjectRequest.fromName('r2', project), { parent: folder.key })
|
|
1437
|
-
const result = project.listRequests()
|
|
1438
|
-
assert.lengthOf(result, 1, 'has a single request')
|
|
1439
|
-
assert.equal(result[0].key, request.key)
|
|
1440
|
-
})
|
|
1441
|
-
|
|
1442
|
-
test('lists requests from a folder', ({ assert }) => {
|
|
1443
|
-
const project = new HttpProject()
|
|
1444
|
-
const folder = project.addFolder('f1')
|
|
1445
|
-
const request = ProjectRequest.fromName('r1', project)
|
|
1446
|
-
project.addRequest(ProjectRequest.fromName('r2', project))
|
|
1447
|
-
project.addRequest(request, { parent: folder.key })
|
|
1448
|
-
const result = project.listRequests(folder.key)
|
|
1449
|
-
assert.lengthOf(result, 1, 'has a single folder')
|
|
1450
|
-
assert.equal(result[0].key, request.key)
|
|
1451
|
-
})
|
|
1452
|
-
|
|
1453
|
-
test('returns empty list when no items', ({ assert }) => {
|
|
1454
|
-
const project = new HttpProject()
|
|
1455
|
-
const f1 = project.addFolder('f1')
|
|
1456
|
-
const result = project.listRequests(f1.key)
|
|
1457
|
-
assert.deepEqual(result, [])
|
|
1458
|
-
})
|
|
1459
|
-
|
|
1460
|
-
test('throws when parent folder not found', ({ assert }) => {
|
|
1461
|
-
const project = new HttpProject()
|
|
1462
|
-
assert.throws(
|
|
1463
|
-
() => {
|
|
1464
|
-
project.listRequests('unknown')
|
|
1465
|
-
},
|
|
1466
|
-
Error,
|
|
1467
|
-
'Unable to find the folder unknown.'
|
|
1468
|
-
)
|
|
1469
|
-
})
|
|
1470
|
-
})
|
|
1471
|
-
|
|
1472
|
-
test.group('listDefinitions()', () => {
|
|
1473
|
-
test('returns all definitions for a project root', ({ assert }) => {
|
|
1474
|
-
const project = new HttpProject()
|
|
1475
|
-
const folder = project.addFolder('f1')
|
|
1476
|
-
const request = ProjectRequest.fromName('name', project)
|
|
1477
|
-
project.addRequest(request)
|
|
1478
|
-
const result = project.listDefinitions()
|
|
1479
|
-
assert.lengthOf(result, 2, 'has both definitions')
|
|
1480
|
-
assert.equal(result[0].key, folder.key, 'has the folder')
|
|
1481
|
-
assert.equal(result[1].key, request.key, 'has the request')
|
|
1482
|
-
})
|
|
1483
|
-
|
|
1484
|
-
test('returns only the project definitions', ({ assert }) => {
|
|
1485
|
-
const project = new HttpProject()
|
|
1486
|
-
const folder = project.addFolder('f1')
|
|
1487
|
-
const request = ProjectRequest.fromName('name', project)
|
|
1488
|
-
project.addRequest(request)
|
|
1489
|
-
|
|
1490
|
-
project.addFolder('other', { parent: folder.key })
|
|
1491
|
-
project.addRequest(ProjectRequest.fromName('other', project), { parent: folder.key })
|
|
1492
|
-
|
|
1493
|
-
const result = project.listDefinitions()
|
|
1494
|
-
assert.lengthOf(result, 2, 'has both definitions')
|
|
1495
|
-
assert.equal(result[0].key, folder.key, 'has the folder')
|
|
1496
|
-
assert.equal(result[1].key, request.key, 'has the request')
|
|
1497
|
-
})
|
|
1498
|
-
|
|
1499
|
-
test('returns all definitions for a folder', ({ assert }) => {
|
|
1500
|
-
const project = new HttpProject()
|
|
1501
|
-
const folder = project.addFolder('f1')
|
|
1502
|
-
const request = ProjectRequest.fromName('name', project)
|
|
1503
|
-
project.addRequest(request, { parent: folder.key })
|
|
1504
|
-
const sub = folder.addFolder('sub')
|
|
1505
|
-
sub.addFolder('sub-sub')
|
|
1506
|
-
|
|
1507
|
-
const result = project.listDefinitions(folder.key)
|
|
1508
|
-
assert.lengthOf(result, 2, 'has both definitions')
|
|
1509
|
-
assert.equal(result[0].key, request.key, 'has the request')
|
|
1510
|
-
assert.equal(result[1].key, sub.key, 'has the folder')
|
|
1511
|
-
})
|
|
1512
|
-
})
|
|
1513
|
-
|
|
1514
|
-
test.group('getParent()', () => {
|
|
1515
|
-
test('always returns undefined', ({ assert }) => {
|
|
1516
|
-
const project = new HttpProject()
|
|
1517
|
-
const result = project.getParent()
|
|
1518
|
-
assert.isUndefined(result)
|
|
1519
|
-
})
|
|
1520
|
-
})
|
|
1521
|
-
|
|
1522
|
-
test.group('getProject()', () => {
|
|
1523
|
-
test('always returns the project', ({ assert }) => {
|
|
1524
|
-
const project = new HttpProject()
|
|
1525
|
-
const result = project.getProject()
|
|
1526
|
-
assert.isTrue(result === project)
|
|
1527
|
-
})
|
|
1528
|
-
})
|
|
1529
|
-
|
|
1530
|
-
test.group('attachedCallback()', () => {
|
|
1531
|
-
// for code coverage
|
|
1532
|
-
test('is called', () => {
|
|
1533
|
-
const project = new HttpProject()
|
|
1534
|
-
project.attachedCallback()
|
|
1535
|
-
})
|
|
1536
|
-
})
|
|
1537
|
-
|
|
1538
|
-
test.group('detachedCallback()', () => {
|
|
1539
|
-
// for code coverage
|
|
1540
|
-
test('is called', () => {
|
|
1541
|
-
const project = new HttpProject()
|
|
1542
|
-
project.detachedCallback()
|
|
1543
|
-
})
|
|
1544
|
-
})
|
|
1545
|
-
|
|
1546
|
-
test.group('addEnvironment()', (group) => {
|
|
1547
|
-
let project: HttpProject
|
|
1548
|
-
group.each.setup(() => {
|
|
1549
|
-
project = HttpProject.fromName('test')
|
|
1550
|
-
})
|
|
1551
|
-
|
|
1552
|
-
test('adds environment by name', ({ assert }) => {
|
|
1553
|
-
const created = project.addEnvironment('test')
|
|
1554
|
-
assert.deepEqual(project.definitions.environments, [created])
|
|
1555
|
-
})
|
|
1556
|
-
|
|
1557
|
-
test('adds environment from an instance', ({ assert }) => {
|
|
1558
|
-
const env = Environment.fromName('test')
|
|
1559
|
-
project.addEnvironment(env)
|
|
1560
|
-
assert.deepEqual(project.definitions.environments, [env])
|
|
1561
|
-
})
|
|
1562
|
-
|
|
1563
|
-
test('adds environment from a schema', ({ assert }) => {
|
|
1564
|
-
const env = Environment.fromName('test')
|
|
1565
|
-
project.addEnvironment(env.toJSON())
|
|
1566
|
-
assert.deepEqual(project.definitions.environments, [env])
|
|
1567
|
-
})
|
|
1568
|
-
|
|
1569
|
-
test('creates environment array when missing', ({ assert }) => {
|
|
1570
|
-
// @ts-expect-error Used in testing
|
|
1571
|
-
delete project.definitions.environments
|
|
1572
|
-
const created = project.addEnvironment('test')
|
|
1573
|
-
assert.deepEqual(project.definitions.environments, [created])
|
|
1574
|
-
})
|
|
1575
|
-
|
|
1576
|
-
test('adds missing keys', ({ assert }) => {
|
|
1577
|
-
const env = Environment.fromName('test')
|
|
1578
|
-
// @ts-expect-error Used in testing
|
|
1579
|
-
delete env.key
|
|
1580
|
-
project.addEnvironment(env)
|
|
1581
|
-
const envs = project.getEnvironments()
|
|
1582
|
-
assert.typeOf(envs[0].key, 'string')
|
|
1583
|
-
})
|
|
1584
|
-
|
|
1585
|
-
test('adds the environment to the list of project items', ({ assert }) => {
|
|
1586
|
-
const e1 = project.addEnvironment('e1')
|
|
1587
|
-
assert.lengthOf(project.items, 1)
|
|
1588
|
-
assert.equal(project.items[0].key, e1.key)
|
|
1589
|
-
})
|
|
1590
|
-
|
|
1591
|
-
test('adds the environment to a folder', ({ assert }) => {
|
|
1592
|
-
const f1 = project.addFolder('f1')
|
|
1593
|
-
const e1 = project.addEnvironment('e1', { parent: f1.key })
|
|
1594
|
-
assert.deepEqual(project.definitions.environments, [e1], 'has the env definition on the project')
|
|
1595
|
-
assert.lengthOf(project.items, 1, 'project has only folder item')
|
|
1596
|
-
assert.deepEqual(f1.items[0].key, e1.key)
|
|
1597
|
-
})
|
|
1598
|
-
})
|
|
1599
|
-
|
|
1600
|
-
test.group('readEnvironments()', (group) => {
|
|
1601
|
-
let project: HttpProject
|
|
1602
|
-
group.each.setup(() => {
|
|
1603
|
-
project = new HttpProject()
|
|
1604
|
-
})
|
|
1605
|
-
|
|
1606
|
-
test('reads environments from the project without subfolders without the name', async ({ assert }) => {
|
|
1607
|
-
project.addEnvironment('a')
|
|
1608
|
-
project.addEnvironment('b')
|
|
1609
|
-
|
|
1610
|
-
const envs = project.readEnvironments()
|
|
1611
|
-
assert.lengthOf(envs, 2, 'has both environments')
|
|
1612
|
-
})
|
|
1613
|
-
|
|
1614
|
-
test('reads environments from the project without subfolders with the name', async ({ assert }) => {
|
|
1615
|
-
project.addEnvironment('a')
|
|
1616
|
-
project.addEnvironment('b')
|
|
1617
|
-
|
|
1618
|
-
const envs = project.readEnvironments({ nameOrKey: 'b' })
|
|
1619
|
-
assert.lengthOf(envs, 1, 'has the project environment')
|
|
1620
|
-
assert.equal(envs[0].info.name, 'b', 'has the first environment')
|
|
1621
|
-
})
|
|
1622
|
-
|
|
1623
|
-
test('reads environments from a folder', async ({ assert }) => {
|
|
1624
|
-
project.addEnvironment('a')
|
|
1625
|
-
const f = project.addFolder('folder')
|
|
1626
|
-
f.addEnvironment('b')
|
|
1627
|
-
f.addEnvironment('c')
|
|
1628
|
-
const envs = project.readEnvironments({ parent: f.key })
|
|
1629
|
-
assert.lengthOf(envs, 3, 'has all environments')
|
|
1630
|
-
assert.equal(envs[0].info.name, 'a', 'has the first environment')
|
|
1631
|
-
assert.equal(envs[1].info.name, 'c', 'has the second environment')
|
|
1632
|
-
assert.equal(envs[2].info.name, 'b', 'has the third environment')
|
|
1633
|
-
})
|
|
1634
|
-
|
|
1635
|
-
test('skips folders without environments', async ({ assert }) => {
|
|
1636
|
-
project.addEnvironment('a')
|
|
1637
|
-
const f1 = project.addFolder('folder 1')
|
|
1638
|
-
const f2 = f1.addFolder('folder 2')
|
|
1639
|
-
f2.addEnvironment('b')
|
|
1640
|
-
|
|
1641
|
-
const envs = project.readEnvironments({ parent: f2.key })
|
|
1642
|
-
assert.lengthOf(envs, 2, 'has all environments')
|
|
1643
|
-
assert.equal(envs[0].info.name, 'a', 'has the first environment')
|
|
1644
|
-
assert.equal(envs[1].info.name, 'b', 'has the second environment')
|
|
1645
|
-
})
|
|
1646
|
-
|
|
1647
|
-
test('stops reading when "encapsulated is set"', async ({ assert }) => {
|
|
1648
|
-
project.addEnvironment('a')
|
|
1649
|
-
const f1 = project.addFolder('folder 1')
|
|
1650
|
-
const f2 = f1.addFolder('folder 2')
|
|
1651
|
-
f1.addEnvironment('b')
|
|
1652
|
-
const env = f2.addEnvironment('c')
|
|
1653
|
-
env.encapsulated = true
|
|
1654
|
-
|
|
1655
|
-
const envs = project.readEnvironments({ parent: f2.key })
|
|
1656
|
-
assert.lengthOf(envs, 1, 'has a single environment')
|
|
1657
|
-
assert.equal(envs[0].info.name, 'c', 'has the folder environment')
|
|
1658
|
-
})
|
|
1659
|
-
|
|
1660
|
-
test('returns empty list when unknown parent', async ({ assert }) => {
|
|
1661
|
-
project.addEnvironment('a')
|
|
1662
|
-
const f = project.addFolder('folder 1')
|
|
1663
|
-
f.addEnvironment('b')
|
|
1664
|
-
const envs = project.readEnvironments({ parent: 'some' })
|
|
1665
|
-
assert.lengthOf(envs, 0)
|
|
1666
|
-
})
|
|
1667
|
-
|
|
1668
|
-
test('lists all applicable environments to a request in a folder', ({ assert }) => {
|
|
1669
|
-
project.addEnvironment('e1')
|
|
1670
|
-
const f1 = project.addFolder('f1')
|
|
1671
|
-
f1.addEnvironment('e2')
|
|
1672
|
-
const f2 = f1.addFolder('f2')
|
|
1673
|
-
f2.addEnvironment('e3')
|
|
1674
|
-
const r1 = f2.addRequest('r1')
|
|
1675
|
-
const result = r1.readEnvironments()
|
|
1676
|
-
assert.lengthOf(result, 3, 'has all environments')
|
|
1677
|
-
assert.equal(result[0].info.name, 'e1', 'has the first environment')
|
|
1678
|
-
assert.equal(result[1].info.name, 'e2', 'has the second environment')
|
|
1679
|
-
assert.equal(result[2].info.name, 'e3', 'has the third environment')
|
|
1680
|
-
})
|
|
1681
|
-
|
|
1682
|
-
test('lists all applicable environments to a request in a folder with encapsulate', ({ assert }) => {
|
|
1683
|
-
project.addEnvironment('e1')
|
|
1684
|
-
const f1 = project.addFolder('f1')
|
|
1685
|
-
const e2 = f1.addEnvironment('e2')
|
|
1686
|
-
e2.encapsulated = true
|
|
1687
|
-
const f2 = f1.addFolder('f2')
|
|
1688
|
-
f2.addEnvironment('e3')
|
|
1689
|
-
const r1 = f2.addRequest('r1')
|
|
1690
|
-
const result = r1.readEnvironments()
|
|
1691
|
-
assert.lengthOf(result, 2, 'has all environments')
|
|
1692
|
-
assert.equal(result[0].info.name, 'e2', 'has the second environment')
|
|
1693
|
-
assert.equal(result[1].info.name, 'e3', 'has the third environment')
|
|
1694
|
-
})
|
|
1695
|
-
})
|
|
1696
|
-
|
|
1697
|
-
test.group('listEnvironments()', (group) => {
|
|
1698
|
-
let project: HttpProject
|
|
1699
|
-
group.each.setup(() => {
|
|
1700
|
-
project = new HttpProject()
|
|
1701
|
-
})
|
|
1702
|
-
|
|
1703
|
-
test('returns environments defined in the project only', ({ assert }) => {
|
|
1704
|
-
const f1 = project.addFolder('f1')
|
|
1705
|
-
f1.addEnvironment('e1')
|
|
1706
|
-
const e2 = project.addEnvironment('e2')
|
|
1707
|
-
|
|
1708
|
-
const result = project.listEnvironments()
|
|
1709
|
-
assert.deepEqual(result, [e2])
|
|
1710
|
-
})
|
|
1711
|
-
|
|
1712
|
-
test('returns environments defined in a folder', ({ assert }) => {
|
|
1713
|
-
const f1 = project.addFolder('f1')
|
|
1714
|
-
const e1 = f1.addEnvironment('e1')
|
|
1715
|
-
project.addEnvironment('e2')
|
|
1716
|
-
|
|
1717
|
-
const result = project.listEnvironments({ parent: f1.key })
|
|
1718
|
-
assert.deepEqual(result, [e1])
|
|
1719
|
-
})
|
|
1720
|
-
})
|
|
1721
|
-
|
|
1722
|
-
test.group('getEnvironments()', () => {
|
|
1723
|
-
test('returns class initialization environments', ({ assert }) => {
|
|
1724
|
-
const result = new HttpProject(undefined, [
|
|
1725
|
-
{
|
|
1726
|
-
key: 'a',
|
|
1727
|
-
kind: 'Core#Environment',
|
|
1728
|
-
info: {
|
|
1729
|
-
kind: ThingKind,
|
|
1730
|
-
name: 'test',
|
|
1731
|
-
},
|
|
1732
|
-
variables: [],
|
|
1733
|
-
server: {
|
|
1734
|
-
kind: ServerKind,
|
|
1735
|
-
uri: 'https://api.com',
|
|
1736
|
-
},
|
|
1737
|
-
},
|
|
1738
|
-
])
|
|
1739
|
-
const envs = result.getEnvironments()
|
|
1740
|
-
assert.typeOf(envs, 'array')
|
|
1741
|
-
assert.lengthOf(envs, 1)
|
|
1742
|
-
assert.equal(envs[0].info.name, 'test')
|
|
1743
|
-
})
|
|
1744
|
-
|
|
1745
|
-
test('returns environments when no initialization environments', ({ assert }) => {
|
|
1746
|
-
const project = new HttpProject()
|
|
1747
|
-
const f1 = project.addFolder('f1')
|
|
1748
|
-
f1.addEnvironment('e1')
|
|
1749
|
-
const e2 = project.addEnvironment('e2')
|
|
1750
|
-
|
|
1751
|
-
const result = project.getEnvironments()
|
|
1752
|
-
assert.deepEqual(result, [e2])
|
|
1753
|
-
})
|
|
1754
|
-
})
|
|
1755
|
-
|
|
1756
|
-
test.group('findEnvironment()', () => {
|
|
1757
|
-
test('returns the environment from the project root', ({ assert }) => {
|
|
1758
|
-
const project = new HttpProject()
|
|
1759
|
-
project.addEnvironment('e1')
|
|
1760
|
-
const env = project.addEnvironment('e2')
|
|
1761
|
-
const result = project.findEnvironment(env.key)
|
|
1762
|
-
assert.deepEqual(result, env)
|
|
1763
|
-
})
|
|
1764
|
-
|
|
1765
|
-
test('returns the environment from a folder', ({ assert }) => {
|
|
1766
|
-
const project = new HttpProject()
|
|
1767
|
-
project.addEnvironment('e1')
|
|
1768
|
-
const f1 = project.addFolder('f1')
|
|
1769
|
-
const env = f1.addEnvironment('e2')
|
|
1770
|
-
const result = project.findEnvironment(env.key)
|
|
1771
|
-
assert.deepEqual(result, env)
|
|
1772
|
-
})
|
|
1773
|
-
})
|
|
1774
|
-
|
|
1775
|
-
test.group('removeEnvironment()', (group) => {
|
|
1776
|
-
let project: HttpProject
|
|
1777
|
-
group.each.setup(() => {
|
|
1778
|
-
project = new HttpProject()
|
|
1779
|
-
})
|
|
1780
|
-
|
|
1781
|
-
test('removes the environment from the definitions when in project root', ({ assert }) => {
|
|
1782
|
-
const e1 = project.addEnvironment('e1')
|
|
1783
|
-
project.removeEnvironment(e1.key)
|
|
1784
|
-
assert.deepEqual(project.definitions.environments, [])
|
|
1785
|
-
})
|
|
1786
|
-
|
|
1787
|
-
test('removes the environment from the definitions when in a folder', ({ assert }) => {
|
|
1788
|
-
const f1 = project.addFolder('f1')
|
|
1789
|
-
const e1 = f1.addEnvironment('e1')
|
|
1790
|
-
project.removeEnvironment(e1.key, { parent: f1.key })
|
|
1791
|
-
assert.deepEqual(project.definitions.environments, [])
|
|
1792
|
-
})
|
|
1793
|
-
|
|
1794
|
-
test('does nothing when the environment does not belong to the folder', ({ assert }) => {
|
|
1795
|
-
const f1 = project.addFolder('f1')
|
|
1796
|
-
const f2 = f1.addFolder('f2')
|
|
1797
|
-
const e1 = f2.addEnvironment('e1')
|
|
1798
|
-
project.removeEnvironment(e1.key, { parent: f1.key })
|
|
1799
|
-
assert.isNotEmpty(project.definitions.environments)
|
|
1800
|
-
})
|
|
1801
|
-
|
|
1802
|
-
test('returns the removed environment', ({ assert }) => {
|
|
1803
|
-
const e1 = project.addEnvironment('e1')
|
|
1804
|
-
const result = project.removeEnvironment(e1.key)
|
|
1805
|
-
assert.deepEqual(result, e1)
|
|
1806
|
-
})
|
|
1807
|
-
|
|
1808
|
-
test('removes the environment from the project items', ({ assert }) => {
|
|
1809
|
-
const e1 = project.addEnvironment('e1')
|
|
1810
|
-
project.removeEnvironment(e1.key)
|
|
1811
|
-
assert.deepEqual(project.items, [])
|
|
1812
|
-
})
|
|
1813
|
-
|
|
1814
|
-
test('removes the environment from the folder items', ({ assert }) => {
|
|
1815
|
-
const f1 = project.addFolder('f1')
|
|
1816
|
-
const e1 = f1.addEnvironment('e1')
|
|
1817
|
-
project.removeEnvironment(e1.key, { parent: f1.key })
|
|
1818
|
-
assert.deepEqual(f1.items, [])
|
|
1819
|
-
})
|
|
1820
|
-
})
|
|
1821
|
-
|
|
1822
|
-
test.group('clone()', (group) => {
|
|
1823
|
-
let project: HttpProject
|
|
1824
|
-
group.each.setup(() => {
|
|
1825
|
-
project = HttpProject.fromName('a project')
|
|
1826
|
-
})
|
|
1827
|
-
|
|
1828
|
-
test('clones the project', ({ assert }) => {
|
|
1829
|
-
project.addRequest('https://domain.com')
|
|
1830
|
-
project.addFolder('test')
|
|
1831
|
-
const copy = project.clone()
|
|
1832
|
-
|
|
1833
|
-
assert.equal(copy.kind, HttpProjectKind)
|
|
1834
|
-
assert.equal(copy.info.name, 'a project')
|
|
1835
|
-
|
|
1836
|
-
assert.lengthOf(copy.listFolders(), 1, 'has the folder')
|
|
1837
|
-
assert.lengthOf(copy.listRequests(), 1, 'has the requests')
|
|
1838
|
-
|
|
1839
|
-
project.info.name = 'updated'
|
|
1840
|
-
assert.equal(copy.info.name, 'a project')
|
|
1841
|
-
})
|
|
1842
|
-
|
|
1843
|
-
test('recreates the project key', ({ assert }) => {
|
|
1844
|
-
const copy = project.clone()
|
|
1845
|
-
|
|
1846
|
-
assert.typeOf(copy.key, 'string')
|
|
1847
|
-
assert.notEqual(copy.key, project.key)
|
|
1848
|
-
})
|
|
1849
|
-
|
|
1850
|
-
test('recreates folder keys', ({ assert }) => {
|
|
1851
|
-
const f = project.addFolder('test')
|
|
1852
|
-
const copy = project.clone()
|
|
1853
|
-
|
|
1854
|
-
const [folder] = copy.listFolders()
|
|
1855
|
-
assert.typeOf(folder.key, 'string')
|
|
1856
|
-
assert.notEqual(folder.key, f.key)
|
|
1857
|
-
})
|
|
1858
|
-
|
|
1859
|
-
test('recreates requests keys', ({ assert }) => {
|
|
1860
|
-
const r = project.addRequest('https://domain.com')
|
|
1861
|
-
const copy = project.clone()
|
|
1862
|
-
|
|
1863
|
-
const [request] = copy.listRequests()
|
|
1864
|
-
assert.typeOf(request.key, 'string')
|
|
1865
|
-
assert.notEqual(request.key, r.key)
|
|
1866
|
-
})
|
|
1867
|
-
|
|
1868
|
-
test('updates the keys in folder items', ({ assert }) => {
|
|
1869
|
-
const f = project.addFolder('f1')
|
|
1870
|
-
const r = f.addRequest('https://domain.com')
|
|
1871
|
-
r.info.name = 'r1'
|
|
1872
|
-
const copy = project.clone()
|
|
1873
|
-
|
|
1874
|
-
const request = copy.findRequest('r1')!
|
|
1875
|
-
const folder = copy.findFolder('f1')!
|
|
1876
|
-
assert.ok(request, 'has copied request')
|
|
1877
|
-
assert.ok(folder, 'has copied folder')
|
|
1878
|
-
|
|
1879
|
-
assert.lengthOf(folder.items, 1, 'folder has the item')
|
|
1880
|
-
assert.equal(folder.items[0].key, request.key, 'the item has the reference key')
|
|
1881
|
-
})
|
|
1882
|
-
|
|
1883
|
-
test('updates keys for environments', ({ assert }) => {
|
|
1884
|
-
const env = project.addEnvironment('test')
|
|
1885
|
-
const copy = project.clone()
|
|
1886
|
-
|
|
1887
|
-
assert.typeOf(copy.definitions.environments[0].key, 'string')
|
|
1888
|
-
assert.notEqual(copy.definitions.environments[0].key, env.key)
|
|
1889
|
-
})
|
|
1890
|
-
|
|
1891
|
-
test('updates keys for schemas', ({ assert }) => {
|
|
1892
|
-
const schema = ProjectSchema.fromName('s1')
|
|
1893
|
-
project.definitions.schemas.push(schema)
|
|
1894
|
-
const copy = project.clone()
|
|
1895
|
-
|
|
1896
|
-
assert.typeOf(copy.definitions.schemas[0].key, 'string')
|
|
1897
|
-
assert.notEqual(copy.definitions.schemas[0].key, schema.key)
|
|
1898
|
-
})
|
|
1899
|
-
|
|
1900
|
-
test('updates keys for certificates', ({ assert }) => {
|
|
1901
|
-
const cert = Certificate.fromP12('value')
|
|
1902
|
-
project.definitions.certificates.push(cert)
|
|
1903
|
-
const copy = project.clone()
|
|
1904
|
-
|
|
1905
|
-
assert.typeOf(copy.definitions.certificates[0].key, 'string')
|
|
1906
|
-
assert.notEqual(copy.definitions.certificates[0].key, cert.key)
|
|
1907
|
-
})
|
|
1908
|
-
|
|
1909
|
-
test('does not update keys when configured', ({ assert }) => {
|
|
1910
|
-
const f = project.addFolder('test')
|
|
1911
|
-
const r = project.addRequest('https://domain.com')
|
|
1912
|
-
const env = project.addEnvironment('test')
|
|
1913
|
-
const schema = ProjectSchema.fromName('s1')
|
|
1914
|
-
project.definitions.schemas.push(schema)
|
|
1915
|
-
const cert = Certificate.fromP12('value')
|
|
1916
|
-
project.definitions.certificates.push(cert)
|
|
1917
|
-
const copy = project.clone({ withoutRevalidate: true })
|
|
1918
|
-
|
|
1919
|
-
assert.equal(copy.key, project.key)
|
|
1920
|
-
assert.equal(copy.definitions.schemas[0].key, schema.key)
|
|
1921
|
-
assert.equal(copy.definitions.certificates[0].key, cert.key)
|
|
1922
|
-
const [folder] = copy.listFolders()
|
|
1923
|
-
assert.equal(folder.key, f.key)
|
|
1924
|
-
const [request] = copy.listRequests()
|
|
1925
|
-
assert.equal(request.key, r.key)
|
|
1926
|
-
assert.equal(copy.definitions.environments[0].key, env.key)
|
|
1927
|
-
})
|
|
1928
|
-
})
|
|
1929
|
-
|
|
1930
|
-
test.group('HttpProject.clone()', () => {
|
|
1931
|
-
test('clones a project', ({ assert }) => {
|
|
1932
|
-
const project = HttpProject.fromName('a project')
|
|
1933
|
-
const copy = HttpProject.clone(project.toJSON())
|
|
1934
|
-
assert.equal(copy.info.name, 'a project')
|
|
1935
|
-
})
|
|
1936
|
-
})
|
|
1937
|
-
|
|
1938
|
-
test.group('toString()', () => {
|
|
1939
|
-
test('serializes the project', ({ assert }) => {
|
|
1940
|
-
const project = HttpProject.fromName('a project')
|
|
1941
|
-
const str = project.toString()
|
|
1942
|
-
assert.typeOf(str, 'string', 'produces a string')
|
|
1943
|
-
const obj = JSON.parse(str)
|
|
1944
|
-
assert.equal(obj.info.name, 'a project')
|
|
1945
|
-
})
|
|
1946
|
-
})
|
|
1947
|
-
|
|
1948
|
-
test.group('addSchema()', () => {
|
|
1949
|
-
test('adds an instance of the schema', ({ assert }) => {
|
|
1950
|
-
const project = new HttpProject()
|
|
1951
|
-
const schema = ProjectSchema.fromName('test')
|
|
1952
|
-
const created = project.addSchema(schema)
|
|
1953
|
-
assert.deepEqual(created, schema)
|
|
1954
|
-
|
|
1955
|
-
assert.lengthOf(project.definitions.schemas, 1, 'has one schema')
|
|
1956
|
-
assert.equal(project.definitions.schemas[0].key, created.key, 'the project has the schema')
|
|
1957
|
-
})
|
|
1958
|
-
|
|
1959
|
-
test('adds by a schema', ({ assert }) => {
|
|
1960
|
-
const project = new HttpProject()
|
|
1961
|
-
const schema = ProjectSchema.fromName('test')
|
|
1962
|
-
const created = project.addSchema(schema.toJSON())
|
|
1963
|
-
assert.deepEqual(created, schema)
|
|
1964
|
-
|
|
1965
|
-
assert.lengthOf(project.definitions.schemas, 1, 'has one schema')
|
|
1966
|
-
assert.equal(project.definitions.schemas[0].key, created.key, 'the project has the schema')
|
|
1967
|
-
})
|
|
1968
|
-
|
|
1969
|
-
test('adds by name', ({ assert }) => {
|
|
1970
|
-
const project = new HttpProject()
|
|
1971
|
-
const created = project.addSchema('test schema')
|
|
1972
|
-
assert.equal(created.name, 'test schema')
|
|
1973
|
-
|
|
1974
|
-
assert.lengthOf(project.definitions.schemas, 1, 'has one schema')
|
|
1975
|
-
assert.equal(project.definitions.schemas[0].key, created.key, 'the project has the schema')
|
|
1976
|
-
})
|
|
1977
|
-
|
|
1978
|
-
test('inserts schema at position', ({ assert }) => {
|
|
1979
|
-
const project = new HttpProject()
|
|
1980
|
-
project.addSchema('schema 1')
|
|
1981
|
-
project.addSchema('schema 2')
|
|
1982
|
-
const key = project.addSchema('schema 3', { index: 1 }).key
|
|
1983
|
-
assert.equal(project.definitions.schemas[1].key, key)
|
|
1984
|
-
})
|
|
1985
|
-
})
|
|
1986
|
-
|
|
1987
|
-
test.group('listSchemas()', () => {
|
|
1988
|
-
test('returns empty array when no schemas', ({ assert }) => {
|
|
1989
|
-
const project = new HttpProject()
|
|
1990
|
-
// @ts-expect-error Used in testing
|
|
1991
|
-
delete project.definitions.schemas
|
|
1992
|
-
const result = project.listSchemas()
|
|
1993
|
-
assert.deepEqual(result, [])
|
|
1994
|
-
})
|
|
1995
|
-
|
|
1996
|
-
test('returns created schemas', ({ assert }) => {
|
|
1997
|
-
const project = new HttpProject()
|
|
1998
|
-
project.addSchema('s1')
|
|
1999
|
-
project.addSchema('s2')
|
|
2000
|
-
const result = project.listSchemas()
|
|
2001
|
-
assert.lengthOf(result, 2)
|
|
2002
|
-
})
|
|
2003
|
-
})
|
|
2004
|
-
|
|
2005
|
-
test.group('requestIterator()', () => {
|
|
2006
|
-
test('iterates over requests in the project', ({ assert }) => {
|
|
2007
|
-
const project = new HttpProject()
|
|
2008
|
-
const r1 = project.addRequest('r1')
|
|
2009
|
-
const r2 = project.addRequest('r2')
|
|
2010
|
-
const r3 = project.addRequest('r3')
|
|
2011
|
-
|
|
2012
|
-
const result: ProjectRequest[] = []
|
|
2013
|
-
|
|
2014
|
-
for (const request of project.requestIterator()) {
|
|
2015
|
-
result.push(request)
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
assert.deepEqual(result, [r1, r2, r3])
|
|
2019
|
-
})
|
|
2020
|
-
|
|
2021
|
-
test('iterates over requests in a folder (parent option)', ({ assert }) => {
|
|
2022
|
-
const project = new HttpProject()
|
|
2023
|
-
const f1 = project.addFolder('f1')
|
|
2024
|
-
const r1 = f1.addRequest('r1')
|
|
2025
|
-
const r2 = f1.addRequest('r2')
|
|
2026
|
-
const r3 = f1.addRequest('r3')
|
|
2027
|
-
|
|
2028
|
-
const result: ProjectRequest[] = []
|
|
2029
|
-
|
|
2030
|
-
for (const request of project.requestIterator({ parent: f1.key })) {
|
|
2031
|
-
result.push(request)
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
assert.deepEqual(result, [r1, r2, r3])
|
|
2035
|
-
})
|
|
2036
|
-
|
|
2037
|
-
test('iterates over requests in the project and a folder (recursive)', ({ assert }) => {
|
|
2038
|
-
const project = new HttpProject()
|
|
2039
|
-
const r1 = project.addRequest('r1')
|
|
2040
|
-
const f1 = project.addFolder('f1')
|
|
2041
|
-
const r2 = f1.addRequest('r2')
|
|
2042
|
-
const r3 = f1.addRequest('r3')
|
|
2043
|
-
const result: ProjectRequest[] = []
|
|
2044
|
-
for (const request of project.requestIterator({ recursive: true })) {
|
|
2045
|
-
result.push(request)
|
|
2046
|
-
}
|
|
2047
|
-
assert.deepEqual(result, [r1, r2, r3])
|
|
2048
|
-
})
|
|
2049
|
-
|
|
2050
|
-
test('respects the recursive order', ({ assert }) => {
|
|
2051
|
-
const project = new HttpProject()
|
|
2052
|
-
const r1 = project.addRequest('r1')
|
|
2053
|
-
const f1 = project.addFolder('f1')
|
|
2054
|
-
const r2 = f1.addRequest('r2')
|
|
2055
|
-
const r3 = project.addRequest('r3')
|
|
2056
|
-
const result: ProjectRequest[] = []
|
|
2057
|
-
for (const request of project.requestIterator({ recursive: true })) {
|
|
2058
|
-
result.push(request)
|
|
2059
|
-
}
|
|
2060
|
-
assert.deepEqual(result, [r1, r2, r3])
|
|
2061
|
-
})
|
|
2062
|
-
|
|
2063
|
-
test('iterates over a deep structure', ({ assert }) => {
|
|
2064
|
-
const project = new HttpProject()
|
|
2065
|
-
const r1 = project.addRequest('r1')
|
|
2066
|
-
const f1 = project.addFolder('f1')
|
|
2067
|
-
const f2 = f1.addFolder('f2')
|
|
2068
|
-
const r2 = f1.addRequest('r2')
|
|
2069
|
-
const r3 = f2.addRequest('r3')
|
|
2070
|
-
const result: ProjectRequest[] = []
|
|
2071
|
-
for (const request of project.requestIterator({ recursive: true })) {
|
|
2072
|
-
result.push(request)
|
|
2073
|
-
}
|
|
2074
|
-
assert.deepEqual(result, [r1, r3, r2])
|
|
2075
|
-
})
|
|
2076
|
-
|
|
2077
|
-
test('respects the ignore option with a request name', ({ assert }) => {
|
|
2078
|
-
const project = new HttpProject()
|
|
2079
|
-
const r1 = project.addRequest('r1')
|
|
2080
|
-
r1.info.name = 'r1name'
|
|
2081
|
-
const r2 = project.addRequest('r2')
|
|
2082
|
-
const r3 = project.addRequest('r3')
|
|
2083
|
-
const result: ProjectRequest[] = []
|
|
2084
|
-
for (const request of project.requestIterator({ ignore: ['r1name'] })) {
|
|
2085
|
-
result.push(request)
|
|
2086
|
-
}
|
|
2087
|
-
assert.deepEqual(result, [r2, r3])
|
|
2088
|
-
})
|
|
2089
|
-
|
|
2090
|
-
test('respects the ignore option with a request key', ({ assert }) => {
|
|
2091
|
-
const project = new HttpProject()
|
|
2092
|
-
const r1 = project.addRequest('r1')
|
|
2093
|
-
const r2 = project.addRequest('r2')
|
|
2094
|
-
const r3 = project.addRequest('r3')
|
|
2095
|
-
const result: ProjectRequest[] = []
|
|
2096
|
-
for (const request of project.requestIterator({ ignore: [r1.key] })) {
|
|
2097
|
-
result.push(request)
|
|
2098
|
-
}
|
|
2099
|
-
assert.deepEqual(result, [r2, r3])
|
|
2100
|
-
})
|
|
2101
|
-
|
|
2102
|
-
test('ignores entire folders with the key', ({ assert }) => {
|
|
2103
|
-
const project = new HttpProject()
|
|
2104
|
-
const r1 = project.addRequest('r1')
|
|
2105
|
-
const f1 = project.addFolder('f1')
|
|
2106
|
-
f1.addRequest('r2')
|
|
2107
|
-
f1.addRequest('r3')
|
|
2108
|
-
const result: ProjectRequest[] = []
|
|
2109
|
-
for (const request of project.requestIterator({ ignore: [f1.key], recursive: true })) {
|
|
2110
|
-
result.push(request)
|
|
2111
|
-
}
|
|
2112
|
-
assert.deepEqual(result, [r1])
|
|
2113
|
-
})
|
|
2114
|
-
|
|
2115
|
-
test('ignores entire folders with the name', ({ assert }) => {
|
|
2116
|
-
const project = new HttpProject()
|
|
2117
|
-
const r1 = project.addRequest('r1')
|
|
2118
|
-
const f1 = project.addFolder('f1')
|
|
2119
|
-
f1.addRequest('r2')
|
|
2120
|
-
f1.addRequest('r3')
|
|
2121
|
-
const result: ProjectRequest[] = []
|
|
2122
|
-
for (const request of project.requestIterator({ ignore: ['f1'], recursive: true })) {
|
|
2123
|
-
result.push(request)
|
|
2124
|
-
}
|
|
2125
|
-
assert.deepEqual(result, [r1])
|
|
2126
|
-
})
|
|
2127
|
-
|
|
2128
|
-
test('includes only requested items from the project root by name', ({ assert }) => {
|
|
2129
|
-
const project = new HttpProject()
|
|
2130
|
-
const r1 = project.addRequest('r1')
|
|
2131
|
-
r1.info.name = 'r1name'
|
|
2132
|
-
project.addRequest('r2')
|
|
2133
|
-
project.addRequest('r3')
|
|
2134
|
-
const result: ProjectRequest[] = []
|
|
2135
|
-
for (const request of project.requestIterator({ requests: ['r1name'] })) {
|
|
2136
|
-
result.push(request)
|
|
2137
|
-
}
|
|
2138
|
-
assert.deepEqual(result, [r1])
|
|
2139
|
-
})
|
|
2140
|
-
|
|
2141
|
-
test('includes only requested items from the project root by key', ({ assert }) => {
|
|
2142
|
-
const project = new HttpProject()
|
|
2143
|
-
const r1 = project.addRequest('r1')
|
|
2144
|
-
project.addRequest('r2')
|
|
2145
|
-
project.addRequest('r3')
|
|
2146
|
-
const result: ProjectRequest[] = []
|
|
2147
|
-
for (const request of project.requestIterator({ requests: [r1.key] })) {
|
|
2148
|
-
result.push(request)
|
|
2149
|
-
}
|
|
2150
|
-
assert.deepEqual(result, [r1])
|
|
2151
|
-
})
|
|
2152
|
-
|
|
2153
|
-
test('includes only requested items recursive', ({ assert }) => {
|
|
2154
|
-
const project = new HttpProject()
|
|
2155
|
-
const r1 = project.addRequest('r1')
|
|
2156
|
-
const f1 = project.addFolder('f1')
|
|
2157
|
-
const r2 = f1.addRequest('r2')
|
|
2158
|
-
project.addRequest('r3')
|
|
2159
|
-
const result: ProjectRequest[] = []
|
|
2160
|
-
for (const request of project.requestIterator({ requests: [r1.key, r2.key], recursive: true })) {
|
|
2161
|
-
result.push(request)
|
|
2162
|
-
}
|
|
2163
|
-
assert.deepEqual(result, [r1, r2])
|
|
2164
|
-
})
|
|
2165
|
-
|
|
2166
|
-
test('recursively iterates the project object', ({ assert }) => {
|
|
2167
|
-
const project = new HttpProject()
|
|
2168
|
-
const r1 = project.addRequest('r1')
|
|
2169
|
-
const f1 = project.addFolder('f1')
|
|
2170
|
-
const r2 = f1.addRequest('r2')
|
|
2171
|
-
const r3 = project.addRequest('r3')
|
|
2172
|
-
const result: ProjectRequest[] = []
|
|
2173
|
-
for (const request of project) {
|
|
2174
|
-
result.push(request)
|
|
2175
|
-
}
|
|
2176
|
-
assert.deepEqual(result, [r1, r2, r3])
|
|
2177
|
-
})
|
|
2178
|
-
})
|
|
2179
|
-
|
|
2180
|
-
test.group('[Symbol.iterator]', () => {
|
|
2181
|
-
test('iterates recursively', ({ assert }) => {
|
|
2182
|
-
const project = new HttpProject()
|
|
2183
|
-
const r1 = project.addRequest('r1')
|
|
2184
|
-
const f1 = project.addFolder('f1')
|
|
2185
|
-
const r2 = f1.addRequest('r2')
|
|
2186
|
-
const r3 = project.addRequest('r3')
|
|
2187
|
-
const result: ProjectRequest[] = []
|
|
2188
|
-
for (const request of project) {
|
|
2189
|
-
result.push(request)
|
|
2190
|
-
}
|
|
2191
|
-
assert.deepEqual(result, [r1, r2, r3])
|
|
2192
|
-
})
|
|
2193
|
-
})
|
|
2194
|
-
|
|
2195
|
-
test.group('folderIterator()', () => {
|
|
2196
|
-
test('iterates over folders in the project', ({ assert }) => {
|
|
2197
|
-
const project = new HttpProject()
|
|
2198
|
-
const f1 = project.addFolder('f1')
|
|
2199
|
-
const f2 = project.addFolder('f2')
|
|
2200
|
-
const f3 = project.addFolder('f3')
|
|
2201
|
-
|
|
2202
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2203
|
-
|
|
2204
|
-
for (const folder of project.folderIterator()) {
|
|
2205
|
-
result.push(folder)
|
|
2206
|
-
}
|
|
2207
|
-
|
|
2208
|
-
assert.deepEqual(result[0].folder, f1)
|
|
2209
|
-
assert.deepEqual(result[1].folder, f2)
|
|
2210
|
-
assert.deepEqual(result[2].folder, f3)
|
|
2211
|
-
|
|
2212
|
-
assert.isUndefined(result[0].parent)
|
|
2213
|
-
assert.isUndefined(result[1].parent)
|
|
2214
|
-
assert.isUndefined(result[2].parent)
|
|
2215
|
-
|
|
2216
|
-
assert.equal(result[0].indent, 0)
|
|
2217
|
-
assert.equal(result[1].indent, 0)
|
|
2218
|
-
assert.equal(result[2].indent, 0)
|
|
2219
|
-
})
|
|
2220
|
-
|
|
2221
|
-
test('iterates over folders in a folder', ({ assert }) => {
|
|
2222
|
-
const project = new HttpProject()
|
|
2223
|
-
const f1 = project.addFolder('f1')
|
|
2224
|
-
const f2 = f1.addFolder('f2')
|
|
2225
|
-
const f3 = f1.addFolder('f3')
|
|
2226
|
-
|
|
2227
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2228
|
-
|
|
2229
|
-
for (const folder of project.folderIterator({ parent: f1.key })) {
|
|
2230
|
-
result.push(folder)
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
assert.deepEqual(result[0].folder, f2)
|
|
2234
|
-
assert.deepEqual(result[1].folder, f3)
|
|
2235
|
-
|
|
2236
|
-
assert.equal(result[0].parent, f1.key)
|
|
2237
|
-
assert.equal(result[1].parent, f1.key)
|
|
2238
|
-
|
|
2239
|
-
assert.equal(result[0].indent, 0, 'has no relative indent')
|
|
2240
|
-
assert.equal(result[1].indent, 0, 'has no relative indent')
|
|
2241
|
-
})
|
|
2242
|
-
|
|
2243
|
-
test('iterates over folders recursively', ({ assert }) => {
|
|
2244
|
-
const project = new HttpProject()
|
|
2245
|
-
const f1 = project.addFolder('f1')
|
|
2246
|
-
const f2 = f1.addFolder('f2')
|
|
2247
|
-
const f3 = f2.addFolder('f3')
|
|
2248
|
-
|
|
2249
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2250
|
-
|
|
2251
|
-
for (const folder of project.folderIterator({ recursive: true })) {
|
|
2252
|
-
result.push(folder)
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
assert.deepEqual(result[0].folder, f1)
|
|
2256
|
-
assert.deepEqual(result[1].folder, f2)
|
|
2257
|
-
assert.deepEqual(result[2].folder, f3)
|
|
2258
|
-
|
|
2259
|
-
assert.isUndefined(result[0].parent)
|
|
2260
|
-
assert.equal(result[1].parent, f1.key)
|
|
2261
|
-
assert.equal(result[2].parent, f2.key)
|
|
2262
|
-
|
|
2263
|
-
assert.equal(result[0].indent, 0, 'has no relative indent')
|
|
2264
|
-
assert.equal(result[1].indent, 1, 'has relative indent')
|
|
2265
|
-
assert.equal(result[2].indent, 2, 'has relative indent')
|
|
2266
|
-
})
|
|
2267
|
-
|
|
2268
|
-
test('preserves the order', ({ assert }) => {
|
|
2269
|
-
const project = new HttpProject()
|
|
2270
|
-
const f1 = project.addFolder('f1')
|
|
2271
|
-
const f2 = f1.addFolder('f2')
|
|
2272
|
-
const f3 = project.addFolder('f3')
|
|
2273
|
-
const f4 = f1.addFolder('f4')
|
|
2274
|
-
|
|
2275
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2276
|
-
|
|
2277
|
-
for (const folder of project.folderIterator({ recursive: true })) {
|
|
2278
|
-
result.push(folder)
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
assert.deepEqual(result[0].folder, f1, '#1 is f1')
|
|
2282
|
-
assert.deepEqual(result[1].folder, f2, '#2 is f2')
|
|
2283
|
-
assert.deepEqual(result[2].folder, f4, '#3 is f4')
|
|
2284
|
-
assert.deepEqual(result[3].folder, f3, '#4 is f3')
|
|
2285
|
-
})
|
|
2286
|
-
|
|
2287
|
-
test('ignores folders', ({ assert }) => {
|
|
2288
|
-
const project = new HttpProject()
|
|
2289
|
-
const f1 = project.addFolder('f1')
|
|
2290
|
-
const f2 = project.addFolder('f2')
|
|
2291
|
-
const f3 = project.addFolder('f3')
|
|
2292
|
-
|
|
2293
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2294
|
-
|
|
2295
|
-
for (const folder of project.folderIterator({ ignore: [f2.key, f3.key] })) {
|
|
2296
|
-
result.push(folder)
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
assert.lengthOf(result, 1, 'has only one element')
|
|
2300
|
-
|
|
2301
|
-
assert.deepEqual(result[0].folder, f1)
|
|
2302
|
-
})
|
|
2303
|
-
|
|
2304
|
-
test('ignores folders with recursive', ({ assert }) => {
|
|
2305
|
-
const project = new HttpProject()
|
|
2306
|
-
const f1 = project.addFolder('f1')
|
|
2307
|
-
const f2 = project.addFolder('f2')
|
|
2308
|
-
const f3 = f2.addFolder('f3')
|
|
2309
|
-
|
|
2310
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2311
|
-
|
|
2312
|
-
for (const folder of project.folderIterator({ ignore: [f3.key], recursive: true })) {
|
|
2313
|
-
result.push(folder)
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
assert.lengthOf(result, 2, 'has only one element')
|
|
2317
|
-
|
|
2318
|
-
assert.deepEqual(result[0].folder, f1)
|
|
2319
|
-
assert.deepEqual(result[1].folder, f2)
|
|
2320
|
-
})
|
|
2321
|
-
|
|
2322
|
-
test('ignores sub-folders with recursive', ({ assert }) => {
|
|
2323
|
-
const project = new HttpProject()
|
|
2324
|
-
const f1 = project.addFolder('f1')
|
|
2325
|
-
const f2 = project.addFolder('f2')
|
|
2326
|
-
f1.addFolder('f3')
|
|
2327
|
-
|
|
2328
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2329
|
-
|
|
2330
|
-
for (const folder of project.folderIterator({ ignore: [f1.key], recursive: true })) {
|
|
2331
|
-
result.push(folder)
|
|
2332
|
-
}
|
|
2333
|
-
assert.lengthOf(result, 1, 'has only one element')
|
|
2334
|
-
assert.deepEqual(result[0].folder, f2)
|
|
2335
|
-
})
|
|
2336
|
-
|
|
2337
|
-
test('ignores requests', ({ assert }) => {
|
|
2338
|
-
const project = new HttpProject()
|
|
2339
|
-
const f1 = project.addFolder('f1')
|
|
2340
|
-
project.addRequest('r1')
|
|
2341
|
-
|
|
2342
|
-
const result: IProjectFolderIteratorResult[] = []
|
|
2343
|
-
|
|
2344
|
-
for (const folder of project.folderIterator()) {
|
|
2345
|
-
result.push(folder)
|
|
2346
|
-
}
|
|
2347
|
-
assert.lengthOf(result, 1, 'has only one element')
|
|
2348
|
-
assert.deepEqual(result[0].folder, f1)
|
|
2349
|
-
})
|
|
2350
|
-
})
|
|
2351
|
-
|
|
2352
|
-
test.group('addCertificate()', () => {
|
|
2353
|
-
test('adds a certificate instance', ({ assert }) => {
|
|
2354
|
-
const cert = Certificate.fromP12('value')
|
|
2355
|
-
const project = new HttpProject()
|
|
2356
|
-
const created = project.addCertificate(cert)
|
|
2357
|
-
assert.deepEqual(created, cert)
|
|
2358
|
-
|
|
2359
|
-
assert.lengthOf(project.definitions.certificates, 1, 'has one certificate')
|
|
2360
|
-
assert.equal(project.definitions.certificates[0].key, created.key, 'the project has the certificate')
|
|
2361
|
-
})
|
|
2362
|
-
|
|
2363
|
-
test('adds by the schema', ({ assert }) => {
|
|
2364
|
-
const project = new HttpProject()
|
|
2365
|
-
const cert = Certificate.fromP12('value')
|
|
2366
|
-
const created = project.addCertificate(cert.toJSON())
|
|
2367
|
-
assert.deepEqual(created, cert)
|
|
2368
|
-
|
|
2369
|
-
assert.lengthOf(project.definitions.certificates, 1, 'has one certificate')
|
|
2370
|
-
assert.equal(project.definitions.certificates[0].key, created.key, 'the project has the certificate')
|
|
2371
|
-
})
|
|
2372
|
-
})
|
|
2373
|
-
|
|
2374
|
-
test.group('removeCertificate()', (group) => {
|
|
2375
|
-
let project: HttpProject
|
|
2376
|
-
let cert: Certificate
|
|
2377
|
-
group.each.setup(() => {
|
|
2378
|
-
cert = Certificate.fromP12('value')
|
|
2379
|
-
project = new HttpProject()
|
|
2380
|
-
project.addCertificate(cert)
|
|
2381
|
-
})
|
|
2382
|
-
|
|
2383
|
-
test('removes the certificate from the project', ({ assert }) => {
|
|
2384
|
-
project.removeCertificate(cert.key)
|
|
2385
|
-
assert.lengthOf(project.definitions.certificates, 0, 'has no certificates')
|
|
2386
|
-
})
|
|
2387
|
-
|
|
2388
|
-
test('returns the removed certificate', ({ assert }) => {
|
|
2389
|
-
const result = project.removeCertificate(cert.key)
|
|
2390
|
-
assert.deepEqual(result, cert)
|
|
2391
|
-
})
|
|
2392
|
-
|
|
2393
|
-
test('returns undefined when no certificate', ({ assert }) => {
|
|
2394
|
-
const result = project.removeCertificate('other')
|
|
2395
|
-
assert.isUndefined(result)
|
|
2396
|
-
})
|
|
2397
|
-
|
|
2398
|
-
test('removes only the requested certificate', ({ assert }) => {
|
|
2399
|
-
const c2 = Certificate.fromP12('value')
|
|
2400
|
-
project.addCertificate(c2)
|
|
2401
|
-
project.removeCertificate(cert.key)
|
|
2402
|
-
assert.deepEqual(project.definitions.certificates, [c2])
|
|
2403
|
-
})
|
|
2404
|
-
})
|
|
2405
|
-
|
|
2406
|
-
test.group('findCertificate()', (group) => {
|
|
2407
|
-
let project: HttpProject
|
|
2408
|
-
let cert: Certificate
|
|
2409
|
-
group.each.setup(() => {
|
|
2410
|
-
cert = Certificate.fromP12('value')
|
|
2411
|
-
project = new HttpProject()
|
|
2412
|
-
project.addCertificate(cert)
|
|
2413
|
-
})
|
|
2414
|
-
|
|
2415
|
-
test('returns the certificate', ({ assert }) => {
|
|
2416
|
-
const result = project.findCertificate(cert.key)
|
|
2417
|
-
assert.deepEqual(result, cert)
|
|
2418
|
-
})
|
|
2419
|
-
|
|
2420
|
-
test('returns undefined when no certificate', ({ assert }) => {
|
|
2421
|
-
const result = project.findCertificate('other')
|
|
2422
|
-
assert.isUndefined(result)
|
|
2423
|
-
})
|
|
2424
|
-
})
|