From 648e87fa2e0380de935429a56d11e22d9b0e15c8 Mon Sep 17 00:00:00 2001 From: George Fu Date: Wed, 3 Sep 2025 13:09:36 -0400 Subject: [PATCH 1/3] chore(packages): enforce consistent-type-imports --- .changeset/slow-flowers-hang.md | 49 +++++++++++++++++++ .eslintrc.js | 1 + .../NodeUseDualstackEndpointConfigOptions.ts | 2 +- .../NodeUseFipsEndpointConfigOptions.ts | 2 +- .../resolveCustomEndpointsConfig.ts | 4 +- .../endpointsConfig/resolveEndpointsConfig.ts | 2 +- .../utils/getEndpointFromRegion.ts | 2 +- .../src/regionConfig/config.ts | 2 +- .../src/regionConfig/resolveRegionConfig.ts | 2 +- .../src/regionInfo/EndpointVariant.ts | 2 +- .../src/regionInfo/PartitionHash.ts | 2 +- .../src/regionInfo/RegionHash.ts | 2 +- .../getHostnameFromVariants.spec.ts | 5 +- .../src/regionInfo/getHostnameFromVariants.ts | 2 +- .../src/regionInfo/getRegionInfo.spec.ts | 4 +- .../src/regionInfo/getRegionInfo.ts | 6 +-- .../regionInfo/getResolvedPartition.spec.ts | 2 +- .../src/regionInfo/getResolvedPartition.ts | 2 +- packages/core/src/getSmithyContext.ts | 3 +- .../getHttpAuthSchemeEndpointRuleSetPlugin.ts | 5 +- .../getHttpAuthSchemePlugin.ts | 5 +- .../httpAuthSchemeMiddleware.ts | 2 +- .../resolveAuthOptions.spec.ts | 2 +- .../resolveAuthOptions.ts | 2 +- .../getHttpSigningMiddleware.ts | 2 +- .../httpSigningMiddleware.ts | 2 +- packages/core/src/normalizeProvider.ts | 2 +- .../src/pagination/createPaginator.spec.ts | 2 +- packages/core/src/setFeature.spec.ts | 2 +- .../cbor/SmithyRpcV2CborProtocol.spec.ts | 2 +- .../cbor/SmithyRpcV2CborProtocol.ts | 3 +- .../core/src/submodules/cbor/cbor-decode.ts | 14 +++--- .../core/src/submodules/cbor/cbor-encode.ts | 3 +- .../core/src/submodules/cbor/parseCborBody.ts | 3 +- .../event-streams/EventStreamSerde.spec.ts | 2 +- .../event-streams/EventStreamSerde.ts | 3 +- .../protocols/collect-stream-body.ts | 2 +- .../serde/determineTimestampFormat.ts | 3 +- .../src/submodules/schema/TypeRegistry.ts | 2 +- .../schema/middleware/getSchemaSerdePlugin.ts | 2 +- .../schemaDeserializationMiddleware.spec.ts | 2 +- .../schemaDeserializationMiddleware.ts | 2 +- .../schemaSerializationMiddleware.spec.ts | 2 +- .../schemaSerializationMiddleware.ts | 4 +- .../schema/schemas/NormalizedSchema.spec.ts | 2 +- .../submodules/schema/schemas/schemas.spec.ts | 2 +- .../DefaultIdentityProviderConfig.ts | 2 +- .../httpAuthSchemes/httpApiKeyAuth.ts | 3 +- .../httpAuthSchemes/httpBearerAuth.ts | 2 +- .../httpAuthSchemes/noAuth.ts | 2 +- .../memoizeIdentityProvider.ts | 2 +- .../src/config/EndpointConfigOptions.ts | 2 +- .../src/config/EndpointModeConfigOptions.ts | 2 +- .../src/fromContainerMetadata.spec.ts | 3 +- .../src/fromContainerMetadata.ts | 7 +-- .../src/fromInstanceMetadata.ts | 9 ++-- .../remoteProvider/ImdsCredentials.spec.ts | 5 +- .../src/remoteProvider/ImdsCredentials.ts | 2 +- .../src/remoteProvider/RemoteProviderInit.ts | 2 +- .../src/remoteProvider/httpRequest.ts | 3 +- .../credential-provider-imds/src/types.ts | 2 +- ...xtendedInstanceMetadataCredentials.spec.ts | 2 +- .../getExtendedInstanceMetadataCredentials.ts | 4 +- .../src/utils/getInstanceMetadataEndpoint.ts | 2 +- .../src/utils/staticStabilityProvider.spec.ts | 2 +- .../src/utils/staticStabilityProvider.ts | 4 +- .../eventstream-codec/src/EventStreamCodec.ts | 4 +- .../src/HeaderMarshaller.spec.ts | 2 +- .../eventstream-codec/src/HeaderMarshaller.ts | 2 +- packages/eventstream-codec/src/Int64.ts | 2 +- packages/eventstream-codec/src/Message.ts | 2 +- .../src/MessageDecoderStream.spec.ts | 2 +- .../src/MessageDecoderStream.ts | 2 +- .../src/MessageEncoderStream.ts | 2 +- .../src/SmithyMessageDecoderStream.ts | 2 +- .../src/SmithyMessageEncoderStream.spec.ts | 2 +- .../src/SmithyMessageEncoderStream.ts | 2 +- .../src/TestVectors.fixture.ts | 2 +- .../src/vectorTypes.fixture.ts | 2 +- .../src/EventStreamMarshaller.ts | 2 +- .../eventstream-serde-browser/src/provider.ts | 2 +- .../src/EventStreamSerdeConfig.ts | 2 +- .../src/EventStreamMarshaller.ts | 2 +- .../eventstream-serde-node/src/provider.ts | 2 +- packages/eventstream-serde-node/src/utils.ts | 2 +- .../src/EventStreamMarshaller.ts | 2 +- .../src/getChunkedStream.spec.ts | 3 +- .../src/getUnmarshalledStream.spec.ts | 2 +- .../src/getUnmarshalledStream.ts | 4 +- .../src/provider.ts | 2 +- .../src/HttpAuthScheme.ts | 6 +-- .../src/HttpAuthSchemeProvider.ts | 4 +- .../src/HttpSigner.ts | 2 +- .../src/IdentityProviderConfig.ts | 4 +- .../src/SigV4Signer.ts | 4 +- .../src/apiKeyIdentity.ts | 2 +- .../src/endpointRuleSet.ts | 9 ++-- .../src/httpApiKeyAuth.ts | 6 +-- .../src/httpBearerAuth.ts | 6 +-- .../src/memoizeIdentityProvider.ts | 2 +- .../getHttpAuthSchemeEndpointRuleSetPlugin.ts | 14 ++++-- .../getHttpAuthSchemePlugin.ts | 14 ++++-- .../httpAuthSchemeMiddleware.ts | 8 +-- .../getHttpSigningMiddleware.ts | 2 +- .../httpSigningMiddleware.ts | 4 +- .../src/noAuth.ts | 4 +- .../src/tokenIdentity.ts | 2 +- .../fetch-http-handler/src/create-request.ts | 2 +- .../src/fetch-http-handler.browser.spec.ts | 2 +- .../src/fetch-http-handler.ts | 5 +- .../src/stream-collector.ts | 2 +- packages/hash-blob-browser/src/index.ts | 2 +- packages/hash-node/src/index.ts | 8 +-- .../hash-stream-node/src/HashCalculator.ts | 5 +- .../hash-stream-node/src/fileStreamHasher.ts | 7 +-- .../src/readableStreamHasher.spec.ts | 2 +- .../src/readableStreamHasher.ts | 4 +- .../invalid-dependency/src/invalidProvider.ts | 2 +- packages/md5-js/src/index.ts | 2 +- .../applyMd5BodyChecksumMiddleware.spec.ts | 2 +- .../src/applyMd5BodyChecksumMiddleware.ts | 4 +- .../src/md5Configuration.ts | 2 +- ...REQUEST_COMPRESSION_CONFIG_OPTIONS.spec.ts | 3 +- ...ABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.ts | 2 +- ...PRESSION_SIZE_BYTES_CONFIG_OPTIONS.spec.ts | 3 +- ...N_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.ts | 2 +- .../src/compressStream.browser.spec.ts | 3 +- .../src/compressStream.spec.ts | 3 +- .../src/compressStream.ts | 2 +- .../src/compressString.browser.spec.ts | 3 +- .../src/compressString.spec.ts | 3 +- .../src/compressionMiddleware.spec.ts | 3 +- .../src/compressionMiddleware.ts | 7 +-- .../src/configurations.ts | 2 +- .../src/getCompressionPlugin.spec.ts | 2 +- .../src/getCompressionPlugin.ts | 7 +-- .../src/isStreaming.spec.ts | 3 +- .../src/resolveCompressionConfig.spec.ts | 2 +- .../src/resolveCompressionConfig.ts | 2 +- .../middleware-content-length/src/index.ts | 2 +- .../createConfigValueProvider.spec.ts | 2 +- .../src/adaptors/createConfigValueProvider.ts | 2 +- .../adaptors/getEndpointFromInstructions.ts | 6 +-- .../src/adaptors/getEndpointUrlConfig.ts | 2 +- .../src/adaptors/toEndpointV1.ts | 2 +- .../src/endpointMiddleware.ts | 6 +-- .../src/getEndpointPlugin.ts | 6 +-- .../src/resolveEndpointConfig.ts | 2 +- .../src/resolveEndpointRequiredConfig.ts | 2 +- .../src/service-customizations/s3.ts | 2 +- .../src/AdaptiveRetryStrategy.spec.ts | 5 +- .../src/AdaptiveRetryStrategy.ts | 8 +-- .../src/StandardRetryStrategy.spec.ts | 2 +- .../src/StandardRetryStrategy.ts | 6 +-- .../middleware-retry/src/configurations.ts | 4 +- .../src/defaultRetryQuota.spec.ts | 2 +- .../middleware-retry/src/defaultRetryQuota.ts | 4 +- .../src/omitRetryHeadersMiddleware.spec.ts | 2 +- .../src/omitRetryHeadersMiddleware.ts | 2 +- .../middleware-retry/src/retryDecider.spec.ts | 2 +- packages/middleware-retry/src/retryDecider.ts | 2 +- .../src/retryMiddleware.spec.ts | 2 +- .../middleware-retry/src/retryMiddleware.ts | 4 +- packages/middleware-retry/src/types.ts | 2 +- packages/middleware-retry/src/util.ts | 2 +- .../src/deserializerMiddleware.spec.ts | 2 +- .../src/deserializerMiddleware.ts | 2 +- packages/middleware-serde/src/serdePlugin.ts | 2 +- .../src/serializerMiddleware.spec.ts | 2 +- .../src/serializerMiddleware.ts | 2 +- .../src/MiddlewareStack.spec.ts | 2 +- .../middleware-stack/src/MiddlewareStack.ts | 4 +- packages/middleware-stack/src/types.ts | 2 +- .../src/configLoader.spec.ts | 5 +- .../node-config-provider/src/configLoader.ts | 11 +++-- packages/node-config-provider/src/fromEnv.ts | 2 +- .../src/fromSharedConfigFiles.spec.ts | 5 +- .../src/fromSharedConfigFiles.ts | 5 +- .../node-config-provider/src/fromStatic.ts | 2 +- .../src/get-transformed-headers.ts | 4 +- .../src/node-http-handler.mock-server.spec.ts | 8 +-- .../src/node-http-handler.ts | 8 +-- .../src/node-http2-connection-manager.ts | 9 ++-- .../src/node-http2-connection-pool.ts | 4 +- .../src/node-http2-handler.spec.ts | 11 +++-- .../src/node-http2-handler.ts | 8 +-- .../node-http-handler/src/readable.mock.ts | 3 +- packages/node-http-handler/src/server.mock.ts | 11 +++-- .../src/set-connection-timeout.ts | 2 +- .../src/set-socket-keep-alive.spec.ts | 2 +- .../src/set-socket-keep-alive.ts | 2 +- .../src/set-socket-timeout.ts | 2 +- .../src/stream-collector/index.ts | 4 +- .../src/stream-collector/readable.mock.ts | 3 +- .../src/write-request-body.ts | 6 +-- .../src/CredentialsProviderError.ts | 3 +- .../property-provider/src/ProviderError.ts | 2 +- .../src/TokenProviderError.ts | 3 +- packages/property-provider/src/chain.ts | 2 +- packages/property-provider/src/fromStatic.ts | 2 +- .../property-provider/src/memoize.spec.ts | 3 +- packages/property-provider/src/memoize.ts | 2 +- packages/protocol-http/src/Field.ts | 3 +- packages/protocol-http/src/Fields.ts | 4 +- .../extensions/httpExtensionConfiguration.ts | 2 +- .../protocol-http/src/httpRequest.spec.ts | 5 +- packages/protocol-http/src/httpRequest.ts | 3 +- packages/protocol-http/src/httpResponse.ts | 2 +- packages/protocol-http/src/types.ts | 2 +- packages/querystring-builder/src/index.ts | 2 +- packages/querystring-parser/src/index.spec.ts | 2 +- packages/querystring-parser/src/index.ts | 2 +- .../src/index.ts | 3 +- .../src/sdk-client-toc-plugin.ts | 12 +++-- .../src/utils.ts | 2 +- .../src/index.spec.ts | 2 +- .../service-error-classification/src/index.ts | 2 +- .../src/getConfigData.ts | 3 +- .../src/getHomeDir.spec.ts | 3 +- .../src/getSsoSessionData.ts | 3 +- .../src/loadSharedConfigFiles.ts | 2 +- .../src/loadSsoSessionData.ts | 2 +- .../src/mergeConfigFiles.ts | 2 +- .../shared-ini-file-loader/src/parseIni.ts | 3 +- .../src/parseKnownFiles.ts | 5 +- packages/shared-ini-file-loader/src/types.ts | 2 +- packages/signature-v4/src/SignatureV4.spec.ts | 5 +- packages/signature-v4/src/SignatureV4.ts | 5 +- packages/signature-v4/src/SignatureV4Base.ts | 2 +- .../src/credentialDerivation.spec.ts | 2 +- .../signature-v4/src/credentialDerivation.ts | 2 +- .../src/getCanonicalHeaders.spec.ts | 2 +- .../signature-v4/src/getCanonicalHeaders.ts | 2 +- .../signature-v4/src/getCanonicalQuery.ts | 2 +- packages/signature-v4/src/getPayloadHash.ts | 2 +- packages/signature-v4/src/headerUtil.ts | 2 +- packages/signature-v4/src/suite.fixture.ts | 2 +- .../signature-v4a/src/SignatureV4a.spec.ts | 2 +- packages/signature-v4a/src/SignatureV4a.ts | 5 +- .../signature-v4a/src/credentialDerivation.ts | 2 +- packages/smithy-client/src/NoOpLogger.ts | 2 +- packages/smithy-client/src/client.ts | 2 +- .../src/create-aggregated-client.ts | 2 +- .../src/default-error-handler.ts | 2 +- packages/smithy-client/src/exceptions.spec.ts | 3 +- packages/smithy-client/src/exceptions.ts | 2 +- .../defaultExtensionConfiguration.ts | 6 ++- .../smithy-client/src/extensions/retry.ts | 2 +- .../smithy-client/src/object-mapping.spec.ts | 3 +- packages/types/src/auth/HttpAuthScheme.ts | 8 +-- .../types/src/auth/HttpAuthSchemeProvider.ts | 4 +- packages/types/src/auth/HttpSigner.ts | 4 +- .../types/src/auth/IdentityProviderConfig.ts | 4 +- .../src/blob/blob-payload-input-types.ts | 2 +- packages/types/src/checksum.ts | 2 +- packages/types/src/client.ts | 8 +-- packages/types/src/command.ts | 4 +- packages/types/src/connection/manager.ts | 4 +- packages/types/src/encode.ts | 2 +- packages/types/src/endpoint.ts | 2 +- .../types/src/endpoints/EndpointRuleObject.ts | 4 +- .../types/src/endpoints/ErrorRuleObject.ts | 2 +- packages/types/src/endpoints/RuleSetObject.ts | 2 +- .../types/src/endpoints/TreeRuleObject.ts | 6 +-- packages/types/src/endpoints/shared.ts | 2 +- packages/types/src/eventStream.ts | 6 +-- packages/types/src/extensions/checksum.ts | 4 +- .../extensions/defaultClientConfiguration.ts | 3 +- .../defaultExtensionConfiguration.ts | 4 +- packages/types/src/extensions/retry.ts | 4 +- packages/types/src/http.ts | 4 +- .../src/http/httpHandlerInitialization.ts | 4 +- packages/types/src/identity/apiKeyIdentity.ts | 2 +- .../src/identity/awsCredentialIdentity.ts | 2 +- packages/types/src/identity/tokenIdentity.ts | 2 +- packages/types/src/retry.ts | 2 +- packages/types/src/serde.ts | 8 +-- packages/types/src/shapes.ts | 4 +- packages/types/src/signature.ts | 4 +- packages/types/src/stream.ts | 6 +-- .../types/src/transform/no-undefined.spec.ts | 4 +- packages/types/src/uri.ts | 2 +- packages/types/src/util.ts | 6 +-- packages/types/src/waiter.ts | 2 +- packages/url-parser/src/index.spec.ts | 2 +- packages/url-parser/src/index.ts | 2 +- .../src/booleanSelector.ts | 2 +- .../src/numberSelector.ts | 2 +- .../src/defaultsModeConfig.ts | 2 +- .../util-endpoints/src/debug/toDebugString.ts | 6 +-- .../src/getEndpointUrlConfig.ts | 4 +- .../util-endpoints/src/lib/parseURL.spec.ts | 3 +- packages/util-endpoints/src/lib/parseURL.ts | 3 +- .../src/resolveEndpoint.spec.ts | 3 +- .../util-endpoints/src/resolveEndpoint.ts | 5 +- .../src/types/EndpointFunctions.ts | 2 +- .../src/types/EndpointRuleObject.ts | 2 +- .../src/types/ErrorRuleObject.ts | 2 +- .../util-endpoints/src/types/RuleSetObject.ts | 2 +- .../src/types/TreeRuleObject.ts | 2 +- packages/util-endpoints/src/types/shared.ts | 2 +- .../util-endpoints/src/utils/callFunction.ts | 2 +- .../src/utils/customEndpointFunctions.ts | 2 +- .../src/utils/evaluateCondition.spec.ts | 3 +- .../src/utils/evaluateCondition.ts | 3 +- .../src/utils/evaluateConditions.spec.ts | 2 +- .../src/utils/evaluateConditions.ts | 2 +- .../src/utils/evaluateEndpointRule.spec.ts | 4 +- .../src/utils/evaluateEndpointRule.ts | 4 +- .../src/utils/evaluateErrorRule.spec.ts | 3 +- .../src/utils/evaluateErrorRule.ts | 3 +- .../src/utils/evaluateExpression.ts | 3 +- .../src/utils/evaluateRules.spec.ts | 3 +- .../util-endpoints/src/utils/evaluateRules.ts | 5 +- .../src/utils/evaluateTemplate.ts | 2 +- .../src/utils/evaluateTreeRule.spec.ts | 2 +- .../src/utils/evaluateTreeRule.ts | 4 +- .../src/utils/getEndpointHeaders.ts | 3 +- .../src/utils/getEndpointProperties.ts | 2 +- .../src/utils/getEndpointProperty.ts | 5 +- .../src/utils/getEndpointUrl.ts | 2 +- .../src/utils/getReferenceValue.ts | 2 +- .../util-middleware/src/getSmithyContext.ts | 3 +- .../util-middleware/src/normalizeProvider.ts | 2 +- .../src/AdaptiveRetryStrategy.spec.ts | 4 +- .../util-retry/src/AdaptiveRetryStrategy.ts | 4 +- packages/util-retry/src/DefaultRateLimiter.ts | 2 +- .../src/StandardRetryStrategy.spec.ts | 2 +- .../util-retry/src/StandardRetryStrategy.ts | 2 +- .../src/defaultRetryBackoffStrategy.ts | 2 +- packages/util-retry/src/defaultRetryToken.ts | 2 +- .../src/getAwsChunkedEncodingStream.ts | 2 +- .../src/sdk-stream-mixin.ts | 2 +- .../src/getAwsChunkedEncodingStream.ts | 2 +- .../util-stream-node/src/sdk-stream-mixin.ts | 2 +- .../src/checksum/ChecksumStream.browser.ts | 2 +- .../src/checksum/ChecksumStream.ts | 5 +- .../createChecksumStream.browser.spec.ts | 2 +- .../checksum/createChecksumStream.browser.ts | 3 +- .../src/checksum/createChecksumStream.spec.ts | 2 +- .../src/checksum/createChecksumStream.ts | 8 +-- .../getAwsChunkedEncodingStream.browser.ts | 2 +- .../src/getAwsChunkedEncodingStream.ts | 2 +- packages/util-stream/src/headStream.ts | 3 +- .../src/sdk-stream-mixin.browser.spec.ts | 2 +- .../src/sdk-stream-mixin.browser.ts | 2 +- .../util-stream/src/sdk-stream-mixin.spec.ts | 5 +- packages/util-stream/src/sdk-stream-mixin.ts | 2 +- .../util-stream/src/util-stream.integ.spec.ts | 5 +- packages/util-waiter/src/createWaiter.spec.ts | 3 +- packages/util-waiter/src/createWaiter.ts | 5 +- packages/util-waiter/src/poller.spec.ts | 3 +- packages/util-waiter/src/poller.ts | 3 +- .../util-waiter/src/utils/validate.spec.ts | 2 +- packages/util-waiter/src/utils/validate.ts | 2 +- packages/util-waiter/src/waiter.ts | 2 +- 356 files changed, 670 insertions(+), 521 deletions(-) create mode 100644 .changeset/slow-flowers-hang.md diff --git a/.changeset/slow-flowers-hang.md b/.changeset/slow-flowers-hang.md new file mode 100644 index 00000000000..91c8435d6e1 --- /dev/null +++ b/.changeset/slow-flowers-hang.md @@ -0,0 +1,49 @@ +--- +"@smithy/service-client-documentation-generator": patch +"@smithy/eventstream-serde-config-resolver": patch +"@smithy/experimental-identity-and-auth": patch +"@smithy/middleware-apply-body-checksum": patch +"@smithy/service-error-classification": patch +"@smithy/eventstream-serde-universal": patch +"@smithy/eventstream-serde-browser": patch +"@smithy/middleware-content-length": patch +"@smithy/credential-provider-imds": patch +"@smithy/util-defaults-mode-node": patch +"@smithy/eventstream-serde-node": patch +"@smithy/middleware-compression": patch +"@smithy/shared-ini-file-loader": patch +"@smithy/node-config-provider": patch +"@smithy/util-config-provider": patch +"@smithy/middleware-endpoint": patch +"@smithy/querystring-builder": patch +"@smithy/util-stream-browser": patch +"@smithy/fetch-http-handler": patch +"@smithy/invalid-dependency": patch +"@smithy/querystring-parser": patch +"@smithy/eventstream-codec": patch +"@smithy/hash-blob-browser": patch +"@smithy/node-http-handler": patch +"@smithy/property-provider": patch +"@smithy/hash-stream-node": patch +"@smithy/middleware-retry": patch +"@smithy/middleware-serde": patch +"@smithy/middleware-stack": patch +"@smithy/util-stream-node": patch +"@smithy/config-resolver": patch +"@smithy/util-middleware": patch +"@smithy/util-endpoints": patch +"@smithy/protocol-http": patch +"@smithy/signature-v4a": patch +"@smithy/smithy-client": patch +"@smithy/signature-v4": patch +"@smithy/util-stream": patch +"@smithy/util-waiter": patch +"@smithy/url-parser": patch +"@smithy/util-retry": patch +"@smithy/hash-node": patch +"@smithy/md5-js": patch +"@smithy/types": patch +"@smithy/core": patch +--- + +enforce consistent-type-imports diff --git a/.eslintrc.js b/.eslintrc.js index 41e87377ed7..44459ba1224 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,5 +34,6 @@ module.exports = { /** Errors */ "simple-import-sort/imports": "error", + "@typescript-eslint/consistent-type-imports": "error", }, }; diff --git a/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts b/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts index cdd5fa79c2a..70a1cc83440 100644 --- a/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts +++ b/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import { booleanSelector, SelectorType } from "@smithy/util-config-provider"; /** diff --git a/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts b/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts index 334bde6d7b0..976ec963e96 100644 --- a/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts +++ b/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import { booleanSelector, SelectorType } from "@smithy/util-config-provider"; /** diff --git a/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts b/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts index a088f64f0c9..76aa572a24b 100644 --- a/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts +++ b/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts @@ -1,7 +1,7 @@ -import { Endpoint, Provider, UrlParser } from "@smithy/types"; +import type { Endpoint, Provider, UrlParser } from "@smithy/types"; import { normalizeProvider } from "@smithy/util-middleware"; -import { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig"; +import type { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig"; /** * @public diff --git a/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts b/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts index 27a37ac4548..15fb3100900 100644 --- a/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts +++ b/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts @@ -1,4 +1,4 @@ -import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; +import type { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; import { normalizeProvider } from "@smithy/util-middleware"; import { getEndpointFromRegion } from "./utils/getEndpointFromRegion"; diff --git a/packages/config-resolver/src/endpointsConfig/utils/getEndpointFromRegion.ts b/packages/config-resolver/src/endpointsConfig/utils/getEndpointFromRegion.ts index b5320ea0a1a..90c996428d3 100644 --- a/packages/config-resolver/src/endpointsConfig/utils/getEndpointFromRegion.ts +++ b/packages/config-resolver/src/endpointsConfig/utils/getEndpointFromRegion.ts @@ -1,4 +1,4 @@ -import { Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; +import type { Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; interface GetEndpointFromRegionOptions { region: Provider; diff --git a/packages/config-resolver/src/regionConfig/config.ts b/packages/config-resolver/src/regionConfig/config.ts index 95428045597..69c60977ecb 100644 --- a/packages/config-resolver/src/regionConfig/config.ts +++ b/packages/config-resolver/src/regionConfig/config.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider"; /** * @internal diff --git a/packages/config-resolver/src/regionConfig/resolveRegionConfig.ts b/packages/config-resolver/src/regionConfig/resolveRegionConfig.ts index 86b18771c93..894287fe957 100644 --- a/packages/config-resolver/src/regionConfig/resolveRegionConfig.ts +++ b/packages/config-resolver/src/regionConfig/resolveRegionConfig.ts @@ -1,4 +1,4 @@ -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; import { getRealRegion } from "./getRealRegion"; import { isFipsRegion } from "./isFipsRegion"; diff --git a/packages/config-resolver/src/regionInfo/EndpointVariant.ts b/packages/config-resolver/src/regionInfo/EndpointVariant.ts index dc741ac774f..b4b96521c18 100644 --- a/packages/config-resolver/src/regionInfo/EndpointVariant.ts +++ b/packages/config-resolver/src/regionInfo/EndpointVariant.ts @@ -1,4 +1,4 @@ -import { EndpointVariantTag } from "./EndpointVariantTag"; +import type { EndpointVariantTag } from "./EndpointVariantTag"; /** * Provides hostname information for specific host label. diff --git a/packages/config-resolver/src/regionInfo/PartitionHash.ts b/packages/config-resolver/src/regionInfo/PartitionHash.ts index 6fe01e5d0c6..4fb6b468c50 100644 --- a/packages/config-resolver/src/regionInfo/PartitionHash.ts +++ b/packages/config-resolver/src/regionInfo/PartitionHash.ts @@ -1,4 +1,4 @@ -import { EndpointVariant } from "./EndpointVariant"; +import type { EndpointVariant } from "./EndpointVariant"; /** * The hash of partition with the information specific to that partition. diff --git a/packages/config-resolver/src/regionInfo/RegionHash.ts b/packages/config-resolver/src/regionInfo/RegionHash.ts index 39421a8f45a..686d1353383 100644 --- a/packages/config-resolver/src/regionInfo/RegionHash.ts +++ b/packages/config-resolver/src/regionInfo/RegionHash.ts @@ -1,4 +1,4 @@ -import { EndpointVariant } from "./EndpointVariant"; +import type { EndpointVariant } from "./EndpointVariant"; /** * The hash of region with the information specific to that region. diff --git a/packages/config-resolver/src/regionInfo/getHostnameFromVariants.spec.ts b/packages/config-resolver/src/regionInfo/getHostnameFromVariants.spec.ts index 60e9279256f..511d5c81ee5 100644 --- a/packages/config-resolver/src/regionInfo/getHostnameFromVariants.spec.ts +++ b/packages/config-resolver/src/regionInfo/getHostnameFromVariants.spec.ts @@ -1,7 +1,8 @@ import { describe, expect, test as it } from "vitest"; -import { EndpointVariant } from "./EndpointVariant"; -import { getHostnameFromVariants, GetHostnameFromVariantsOptions } from "./getHostnameFromVariants"; +import type { EndpointVariant } from "./EndpointVariant"; +import type { GetHostnameFromVariantsOptions } from "./getHostnameFromVariants"; +import { getHostnameFromVariants } from "./getHostnameFromVariants"; describe(getHostnameFromVariants.name, () => { const getMockHostname = (options: GetHostnameFromVariantsOptions) => JSON.stringify(options); diff --git a/packages/config-resolver/src/regionInfo/getHostnameFromVariants.ts b/packages/config-resolver/src/regionInfo/getHostnameFromVariants.ts index 0952f4307e7..9b6bf8fd1fb 100644 --- a/packages/config-resolver/src/regionInfo/getHostnameFromVariants.ts +++ b/packages/config-resolver/src/regionInfo/getHostnameFromVariants.ts @@ -1,4 +1,4 @@ -import { EndpointVariant } from "./EndpointVariant"; +import type { EndpointVariant } from "./EndpointVariant"; /** * @internal diff --git a/packages/config-resolver/src/regionInfo/getRegionInfo.spec.ts b/packages/config-resolver/src/regionInfo/getRegionInfo.spec.ts index 7181bca07a7..c8d64b8b71f 100644 --- a/packages/config-resolver/src/regionInfo/getRegionInfo.spec.ts +++ b/packages/config-resolver/src/regionInfo/getRegionInfo.spec.ts @@ -5,8 +5,8 @@ import { getRegionInfo } from "./getRegionInfo"; import { getResolvedHostname } from "./getResolvedHostname"; import { getResolvedPartition } from "./getResolvedPartition"; import { getResolvedSigningRegion } from "./getResolvedSigningRegion"; -import { PartitionHash } from "./PartitionHash"; -import { RegionHash } from "./RegionHash"; +import type { PartitionHash } from "./PartitionHash"; +import type { RegionHash } from "./RegionHash"; vi.mock("./getHostnameFromVariants"); vi.mock("./getResolvedHostname"); diff --git a/packages/config-resolver/src/regionInfo/getRegionInfo.ts b/packages/config-resolver/src/regionInfo/getRegionInfo.ts index 63f2b4071a6..0f6894e26ed 100644 --- a/packages/config-resolver/src/regionInfo/getRegionInfo.ts +++ b/packages/config-resolver/src/regionInfo/getRegionInfo.ts @@ -1,11 +1,11 @@ -import { RegionInfo } from "@smithy/types"; +import type { RegionInfo } from "@smithy/types"; import { getHostnameFromVariants } from "./getHostnameFromVariants"; import { getResolvedHostname } from "./getResolvedHostname"; import { getResolvedPartition } from "./getResolvedPartition"; import { getResolvedSigningRegion } from "./getResolvedSigningRegion"; -import { PartitionHash } from "./PartitionHash"; -import { RegionHash } from "./RegionHash"; +import type { PartitionHash } from "./PartitionHash"; +import type { RegionHash } from "./RegionHash"; /** * @internal diff --git a/packages/config-resolver/src/regionInfo/getResolvedPartition.spec.ts b/packages/config-resolver/src/regionInfo/getResolvedPartition.spec.ts index 7f02e4b48ef..6cbf5fadc9a 100644 --- a/packages/config-resolver/src/regionInfo/getResolvedPartition.spec.ts +++ b/packages/config-resolver/src/regionInfo/getResolvedPartition.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, test as it } from "vitest"; import { getResolvedPartition } from "./getResolvedPartition"; -import { PartitionHash } from "./PartitionHash"; +import type { PartitionHash } from "./PartitionHash"; describe(getResolvedPartition.name, () => { const mockRegion = "mockRegion"; diff --git a/packages/config-resolver/src/regionInfo/getResolvedPartition.ts b/packages/config-resolver/src/regionInfo/getResolvedPartition.ts index 516d16bed12..80541fe77a1 100644 --- a/packages/config-resolver/src/regionInfo/getResolvedPartition.ts +++ b/packages/config-resolver/src/regionInfo/getResolvedPartition.ts @@ -1,4 +1,4 @@ -import { PartitionHash } from "./PartitionHash"; +import type { PartitionHash } from "./PartitionHash"; /** * @internal diff --git a/packages/core/src/getSmithyContext.ts b/packages/core/src/getSmithyContext.ts index 70ad89bcf81..5f604cb0836 100644 --- a/packages/core/src/getSmithyContext.ts +++ b/packages/core/src/getSmithyContext.ts @@ -1,4 +1,5 @@ -import { HandlerExecutionContext, SMITHY_CONTEXT_KEY } from "@smithy/types"; +import type { HandlerExecutionContext } from "@smithy/types"; +import { SMITHY_CONTEXT_KEY } from "@smithy/types"; /** * @internal diff --git a/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts b/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts index dad45ffc170..f364e90d25a 100644 --- a/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts +++ b/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts @@ -1,4 +1,4 @@ -import { +import type { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, @@ -8,7 +8,8 @@ import { SerializeHandlerOptions, } from "@smithy/types"; -import { httpAuthSchemeMiddleware, PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import type { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; /** * @internal diff --git a/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts b/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts index 919b569da16..d38eb5f7dc8 100644 --- a/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts +++ b/packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts @@ -1,5 +1,5 @@ import { serializerMiddlewareOption } from "@smithy/middleware-serde"; -import { +import type { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, @@ -9,7 +9,8 @@ import { SerializeHandlerOptions, } from "@smithy/types"; -import { httpAuthSchemeMiddleware, PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import type { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; /** * @internal diff --git a/packages/core/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts b/packages/core/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts index b66024f1359..1a2d463d851 100644 --- a/packages/core/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts +++ b/packages/core/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts @@ -1,4 +1,4 @@ -import { +import type { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeId, diff --git a/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.spec.ts b/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.spec.ts index 4dd5f8f7ba1..2c9a136dd26 100644 --- a/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.spec.ts +++ b/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.spec.ts @@ -1,4 +1,4 @@ -import { HttpAuthOption } from "@smithy/types"; +import type { HttpAuthOption } from "@smithy/types"; import { describe, expect, it } from "vitest"; import { resolveAuthOptions } from "./resolveAuthOptions"; diff --git a/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.ts b/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.ts index 1fd3d88e129..43949a492df 100644 --- a/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.ts +++ b/packages/core/src/middleware-http-auth-scheme/resolveAuthOptions.ts @@ -1,4 +1,4 @@ -import { HttpAuthOption } from "@smithy/types"; +import type { HttpAuthOption } from "@smithy/types"; /** * Resolves list of auth options based on the supported ones, vs the preference list. diff --git a/packages/core/src/middleware-http-signing/getHttpSigningMiddleware.ts b/packages/core/src/middleware-http-signing/getHttpSigningMiddleware.ts index 396b22d88a6..721cd602c68 100644 --- a/packages/core/src/middleware-http-signing/getHttpSigningMiddleware.ts +++ b/packages/core/src/middleware-http-signing/getHttpSigningMiddleware.ts @@ -1,4 +1,4 @@ -import { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; +import type { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; import { httpSigningMiddleware } from "./httpSigningMiddleware"; diff --git a/packages/core/src/middleware-http-signing/httpSigningMiddleware.ts b/packages/core/src/middleware-http-signing/httpSigningMiddleware.ts index 94be3dc0e86..94b6f87aea0 100644 --- a/packages/core/src/middleware-http-signing/httpSigningMiddleware.ts +++ b/packages/core/src/middleware-http-signing/httpSigningMiddleware.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { HttpRequest } from "@smithy/protocol-http"; -import { +import type { ErrorHandler, FinalizeHandler, FinalizeHandlerArguments, diff --git a/packages/core/src/normalizeProvider.ts b/packages/core/src/normalizeProvider.ts index 00693049620..3ac1342da1a 100644 --- a/packages/core/src/normalizeProvider.ts +++ b/packages/core/src/normalizeProvider.ts @@ -1,4 +1,4 @@ -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; /** * @internal diff --git a/packages/core/src/pagination/createPaginator.spec.ts b/packages/core/src/pagination/createPaginator.spec.ts index 25767c4eaa7..e371c572d7f 100644 --- a/packages/core/src/pagination/createPaginator.spec.ts +++ b/packages/core/src/pagination/createPaginator.spec.ts @@ -1,4 +1,4 @@ -import { PaginationConfiguration } from "@smithy/types"; +import type { PaginationConfiguration } from "@smithy/types"; import { afterEach, describe, expect, test as it, vi } from "vitest"; import { createPaginator } from "./createPaginator"; diff --git a/packages/core/src/setFeature.spec.ts b/packages/core/src/setFeature.spec.ts index 86dfa779a2b..922114e7914 100644 --- a/packages/core/src/setFeature.spec.ts +++ b/packages/core/src/setFeature.spec.ts @@ -1,4 +1,4 @@ -import { HandlerExecutionContext } from "@smithy/types"; +import type { HandlerExecutionContext } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { setFeature } from "./setFeature"; diff --git a/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.spec.ts b/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.spec.ts index 8906feeed96..37eca9a4c63 100644 --- a/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.spec.ts +++ b/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.spec.ts @@ -1,6 +1,6 @@ import { error, list, map, op, SCHEMA, struct, TypeRegistry } from "@smithy/core/schema"; import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { ResponseMetadata, RetryableTrait, SchemaRef } from "@smithy/types"; +import type { ResponseMetadata, RetryableTrait, SchemaRef } from "@smithy/types"; import { beforeEach, describe, expect, test as it } from "vitest"; import { cbor } from "./cbor"; diff --git a/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.ts b/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.ts index 63fe378e10f..8b83922109f 100644 --- a/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.ts +++ b/packages/core/src/submodules/cbor/SmithyRpcV2CborProtocol.ts @@ -1,5 +1,6 @@ import { RpcProtocol } from "@smithy/core/protocols"; -import { deref, ErrorSchema, NormalizedSchema, OperationSchema, TypeRegistry } from "@smithy/core/schema"; +import type { ErrorSchema, OperationSchema } from "@smithy/core/schema"; +import { deref, NormalizedSchema, TypeRegistry } from "@smithy/core/schema"; import type { EndpointBearer, HandlerExecutionContext, diff --git a/packages/core/src/submodules/cbor/cbor-decode.ts b/packages/core/src/submodules/cbor/cbor-decode.ts index 107b6feb04f..067f2eb5deb 100644 --- a/packages/core/src/submodules/cbor/cbor-decode.ts +++ b/packages/core/src/submodules/cbor/cbor-decode.ts @@ -1,8 +1,7 @@ import { nv } from "@smithy/core/serde"; import { toUtf8 } from "@smithy/util-utf8"; -import { - alloc, +import type { CborArgumentLength, CborArgumentLengthOffset, CborListType, @@ -10,11 +9,17 @@ import { CborOffset, CborUnstructuredByteStringType, CborValueType, + Float32, + Uint8, + Uint32, + Uint64, +} from "./cbor-types"; +import { + alloc, extendedFloat16, extendedFloat32, extendedFloat64, extendedOneByte, - Float32, majorList, majorMap, majorNegativeInt64, @@ -28,9 +33,6 @@ import { specialTrue, specialUndefined, tag, - Uint8, - Uint32, - Uint64, } from "./cbor-types"; const USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; diff --git a/packages/core/src/submodules/cbor/cbor-encode.ts b/packages/core/src/submodules/cbor/cbor-encode.ts index 168fe6b2cb0..067b778b3f8 100644 --- a/packages/core/src/submodules/cbor/cbor-encode.ts +++ b/packages/core/src/submodules/cbor/cbor-encode.ts @@ -1,9 +1,9 @@ import { NumericValue } from "@smithy/core/serde"; import { fromUtf8 } from "@smithy/util-utf8"; +import type { CborMajorType, Uint64 } from "./cbor-types"; import { alloc, - CborMajorType, extendedFloat16, extendedFloat32, extendedFloat64, @@ -19,7 +19,6 @@ import { specialNull, specialTrue, tagSymbol, - Uint64, } from "./cbor-types"; const USE_BUFFER = typeof Buffer !== "undefined"; diff --git a/packages/core/src/submodules/cbor/parseCborBody.ts b/packages/core/src/submodules/cbor/parseCborBody.ts index cc9d79ee664..08c6808d7f9 100644 --- a/packages/core/src/submodules/cbor/parseCborBody.ts +++ b/packages/core/src/submodules/cbor/parseCborBody.ts @@ -9,7 +9,8 @@ import type { import { calculateBodyLength } from "@smithy/util-body-length-browser"; import { cbor } from "./cbor"; -import { tag, tagSymbol } from "./cbor-types"; +import type { tagSymbol } from "./cbor-types"; +import { tag } from "./cbor-types"; /** * @internal diff --git a/packages/core/src/submodules/event-streams/EventStreamSerde.spec.ts b/packages/core/src/submodules/event-streams/EventStreamSerde.spec.ts index 44a5cf7fa4e..0b8fef2098f 100644 --- a/packages/core/src/submodules/event-streams/EventStreamSerde.spec.ts +++ b/packages/core/src/submodules/event-streams/EventStreamSerde.spec.ts @@ -2,7 +2,7 @@ import { cbor, CborCodec, dateToTag } from "@smithy/core/cbor"; import { NormalizedSchema, SCHEMA, sim, struct } from "@smithy/core/schema"; import { EventStreamMarshaller } from "@smithy/eventstream-serde-node"; import { HttpResponse } from "@smithy/protocol-http"; -import { Message as EventMessage } from "@smithy/types"; +import type { Message as EventMessage } from "@smithy/types"; import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; import { describe, expect, test as it } from "vitest"; diff --git a/packages/core/src/submodules/event-streams/EventStreamSerde.ts b/packages/core/src/submodules/event-streams/EventStreamSerde.ts index 9cc3a2f59b9..7bff737f50b 100644 --- a/packages/core/src/submodules/event-streams/EventStreamSerde.ts +++ b/packages/core/src/submodules/event-streams/EventStreamSerde.ts @@ -1,4 +1,5 @@ -import { NormalizedSchema, SCHEMA } from "@smithy/core/schema"; +import type { NormalizedSchema } from "@smithy/core/schema"; +import { SCHEMA } from "@smithy/core/schema"; import type { EventStreamMarshaller, HttpRequest as IHttpRequest, diff --git a/packages/core/src/submodules/protocols/collect-stream-body.ts b/packages/core/src/submodules/protocols/collect-stream-body.ts index a20b5211b5e..763d025daf9 100644 --- a/packages/core/src/submodules/protocols/collect-stream-body.ts +++ b/packages/core/src/submodules/protocols/collect-stream-body.ts @@ -1,4 +1,4 @@ -import { SerdeContext } from "@smithy/types"; +import type { SerdeContext } from "@smithy/types"; import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; /** diff --git a/packages/core/src/submodules/protocols/serde/determineTimestampFormat.ts b/packages/core/src/submodules/protocols/serde/determineTimestampFormat.ts index e8a48c63cd1..ce05f1ff82c 100644 --- a/packages/core/src/submodules/protocols/serde/determineTimestampFormat.ts +++ b/packages/core/src/submodules/protocols/serde/determineTimestampFormat.ts @@ -1,4 +1,5 @@ -import { NormalizedSchema, SCHEMA } from "@smithy/core/schema"; +import type { NormalizedSchema } from "@smithy/core/schema"; +import { SCHEMA } from "@smithy/core/schema"; import type { CodecSettings, TimestampDateTimeSchema, diff --git a/packages/core/src/submodules/schema/TypeRegistry.ts b/packages/core/src/submodules/schema/TypeRegistry.ts index 55c151e9423..a8b8034058b 100644 --- a/packages/core/src/submodules/schema/TypeRegistry.ts +++ b/packages/core/src/submodules/schema/TypeRegistry.ts @@ -1,6 +1,6 @@ import type { Schema as ISchema } from "@smithy/types"; -import { ErrorSchema } from "./schemas/ErrorSchema"; +import type { ErrorSchema } from "./schemas/ErrorSchema"; /** * A way to look up schema by their ShapeId values. diff --git a/packages/core/src/submodules/schema/middleware/getSchemaSerdePlugin.ts b/packages/core/src/submodules/schema/middleware/getSchemaSerdePlugin.ts index a16171d1c82..107f9f5073c 100644 --- a/packages/core/src/submodules/schema/middleware/getSchemaSerdePlugin.ts +++ b/packages/core/src/submodules/schema/middleware/getSchemaSerdePlugin.ts @@ -7,7 +7,7 @@ import type { SerializeHandlerOptions, } from "@smithy/types"; -import { PreviouslyResolved } from "./schema-middleware-types"; +import type { PreviouslyResolved } from "./schema-middleware-types"; import { schemaDeserializationMiddleware } from "./schemaDeserializationMiddleware"; import { schemaSerializationMiddleware } from "./schemaSerializationMiddleware"; diff --git a/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.spec.ts b/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.spec.ts index 47e16f65931..d9149301efa 100644 --- a/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.spec.ts +++ b/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.spec.ts @@ -1,5 +1,5 @@ import { HttpResponse } from "@smithy/protocol-http"; -import { SchemaRef } from "@smithy/types"; +import type { SchemaRef } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { schemaDeserializationMiddleware } from "./schemaDeserializationMiddleware"; diff --git a/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.ts b/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.ts index 5281e4b1b6a..57032e13edf 100644 --- a/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.ts +++ b/packages/core/src/submodules/schema/middleware/schemaDeserializationMiddleware.ts @@ -8,7 +8,7 @@ import type { } from "@smithy/types"; import { getSmithyContext } from "@smithy/util-middleware"; -import { PreviouslyResolved } from "./schema-middleware-types"; +import type { PreviouslyResolved } from "./schema-middleware-types"; /** * @internal diff --git a/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.spec.ts b/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.spec.ts index 8ea05e91f72..7d7a2fdebaf 100644 --- a/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.spec.ts +++ b/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.spec.ts @@ -1,4 +1,4 @@ -import { SchemaRef } from "@smithy/types"; +import type { SchemaRef } from "@smithy/types"; import { beforeEach, describe, expect, test as it, vi } from "vitest"; import { schemaSerializationMiddleware } from "./schemaSerializationMiddleware"; diff --git a/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.ts b/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.ts index fc4cb35d655..b94000adc61 100644 --- a/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.ts +++ b/packages/core/src/submodules/schema/middleware/schemaSerializationMiddleware.ts @@ -1,4 +1,4 @@ -import { +import type { Endpoint, EndpointBearer, HandlerExecutionContext, @@ -9,7 +9,7 @@ import { } from "@smithy/types"; import { getSmithyContext } from "@smithy/util-middleware"; -import { PreviouslyResolved } from "./schema-middleware-types"; +import type { PreviouslyResolved } from "./schema-middleware-types"; /** * @internal diff --git a/packages/core/src/submodules/schema/schemas/NormalizedSchema.spec.ts b/packages/core/src/submodules/schema/schemas/NormalizedSchema.spec.ts index 0ac6744900e..778798c9674 100644 --- a/packages/core/src/submodules/schema/schemas/NormalizedSchema.spec.ts +++ b/packages/core/src/submodules/schema/schemas/NormalizedSchema.spec.ts @@ -1,4 +1,4 @@ -import { MemberSchema } from "@smithy/types"; +import type { MemberSchema } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { list } from "./ListSchema"; diff --git a/packages/core/src/submodules/schema/schemas/schemas.spec.ts b/packages/core/src/submodules/schema/schemas/schemas.spec.ts index d1589f59557..a39e17a96e6 100644 --- a/packages/core/src/submodules/schema/schemas/schemas.spec.ts +++ b/packages/core/src/submodules/schema/schemas/schemas.spec.ts @@ -1,4 +1,4 @@ -import { SchemaRef, SchemaTraits } from "@smithy/types"; +import type { SchemaRef, SchemaTraits } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { TypeRegistry } from "../TypeRegistry"; diff --git a/packages/core/src/util-identity-and-auth/DefaultIdentityProviderConfig.ts b/packages/core/src/util-identity-and-auth/DefaultIdentityProviderConfig.ts index be4721e98a0..524ef68010a 100644 --- a/packages/core/src/util-identity-and-auth/DefaultIdentityProviderConfig.ts +++ b/packages/core/src/util-identity-and-auth/DefaultIdentityProviderConfig.ts @@ -1,4 +1,4 @@ -import { HttpAuthSchemeId, Identity, IdentityProvider, IdentityProviderConfig } from "@smithy/types"; +import type { HttpAuthSchemeId, Identity, IdentityProvider, IdentityProviderConfig } from "@smithy/types"; /** * Default implementation of IdentityProviderConfig diff --git a/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts b/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts index 1b2aa329867..6b22c281333 100644 --- a/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts +++ b/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts @@ -1,5 +1,6 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { ApiKeyIdentity, HttpApiKeyAuthLocation, HttpRequest as IHttpRequest, HttpSigner } from "@smithy/types"; +import type { ApiKeyIdentity, HttpRequest as IHttpRequest, HttpSigner } from "@smithy/types"; +import { HttpApiKeyAuthLocation } from "@smithy/types"; /** * @internal diff --git a/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts b/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts index 7d2c5fef3d2..e8052613ea7 100644 --- a/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts +++ b/packages/core/src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { HttpRequest } from "@smithy/protocol-http"; -import { HttpRequest as IHttpRequest, HttpSigner, TokenIdentity } from "@smithy/types"; +import type { HttpRequest as IHttpRequest, HttpSigner, TokenIdentity } from "@smithy/types"; /** * @internal diff --git a/packages/core/src/util-identity-and-auth/httpAuthSchemes/noAuth.ts b/packages/core/src/util-identity-and-auth/httpAuthSchemes/noAuth.ts index 441f67f849d..08b9211318c 100644 --- a/packages/core/src/util-identity-and-auth/httpAuthSchemes/noAuth.ts +++ b/packages/core/src/util-identity-and-auth/httpAuthSchemes/noAuth.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { HttpRequest, HttpSigner, Identity } from "@smithy/types"; +import type { HttpRequest, HttpSigner, Identity } from "@smithy/types"; /** * Signer for the synthetic @smithy.api#noAuth auth scheme. diff --git a/packages/core/src/util-identity-and-auth/memoizeIdentityProvider.ts b/packages/core/src/util-identity-and-auth/memoizeIdentityProvider.ts index 01e85304275..326a67b7078 100644 --- a/packages/core/src/util-identity-and-auth/memoizeIdentityProvider.ts +++ b/packages/core/src/util-identity-and-auth/memoizeIdentityProvider.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "@smithy/types"; +import type { Identity, IdentityProvider } from "@smithy/types"; /** * @internal diff --git a/packages/credential-provider-imds/src/config/EndpointConfigOptions.ts b/packages/credential-provider-imds/src/config/EndpointConfigOptions.ts index a6a8ee9aa05..fb9b04da8ee 100644 --- a/packages/credential-provider-imds/src/config/EndpointConfigOptions.ts +++ b/packages/credential-provider-imds/src/config/EndpointConfigOptions.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; /** * @internal diff --git a/packages/credential-provider-imds/src/config/EndpointModeConfigOptions.ts b/packages/credential-provider-imds/src/config/EndpointModeConfigOptions.ts index 6c620e53b26..318a26deba2 100644 --- a/packages/credential-provider-imds/src/config/EndpointModeConfigOptions.ts +++ b/packages/credential-provider-imds/src/config/EndpointModeConfigOptions.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import { EndpointMode } from "./EndpointMode"; diff --git a/packages/credential-provider-imds/src/fromContainerMetadata.spec.ts b/packages/credential-provider-imds/src/fromContainerMetadata.spec.ts index 6db7c175876..4c44308afa3 100644 --- a/packages/credential-provider-imds/src/fromContainerMetadata.spec.ts +++ b/packages/credential-provider-imds/src/fromContainerMetadata.spec.ts @@ -7,7 +7,8 @@ import { fromContainerMetadata, } from "./fromContainerMetadata"; import { httpRequest } from "./remoteProvider/httpRequest"; -import { fromImdsCredentials, ImdsCredentials } from "./remoteProvider/ImdsCredentials"; +import type { ImdsCredentials } from "./remoteProvider/ImdsCredentials"; +import { fromImdsCredentials } from "./remoteProvider/ImdsCredentials"; const mockHttpRequest = httpRequest; vi.mock("./remoteProvider/httpRequest"); diff --git a/packages/credential-provider-imds/src/fromContainerMetadata.ts b/packages/credential-provider-imds/src/fromContainerMetadata.ts index 2cfdff55568..2e9189767e8 100644 --- a/packages/credential-provider-imds/src/fromContainerMetadata.ts +++ b/packages/credential-provider-imds/src/fromContainerMetadata.ts @@ -1,11 +1,12 @@ import { CredentialsProviderError } from "@smithy/property-provider"; -import { AwsCredentialIdentityProvider, Logger } from "@smithy/types"; -import { RequestOptions } from "http"; +import type { AwsCredentialIdentityProvider, Logger } from "@smithy/types"; +import type { RequestOptions } from "http"; import { parse } from "url"; import { httpRequest } from "./remoteProvider/httpRequest"; import { fromImdsCredentials, isImdsCredentials } from "./remoteProvider/ImdsCredentials"; -import { providerConfigFromInit, RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +import type { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +import { providerConfigFromInit } from "./remoteProvider/RemoteProviderInit"; import { retry } from "./remoteProvider/retry"; /** diff --git a/packages/credential-provider-imds/src/fromInstanceMetadata.ts b/packages/credential-provider-imds/src/fromInstanceMetadata.ts index b1fca9f047e..9974026b8c5 100644 --- a/packages/credential-provider-imds/src/fromInstanceMetadata.ts +++ b/packages/credential-provider-imds/src/fromInstanceMetadata.ts @@ -1,14 +1,15 @@ import { loadConfig } from "@smithy/node-config-provider"; import { CredentialsProviderError } from "@smithy/property-provider"; -import { AwsCredentialIdentity, Provider } from "@smithy/types"; -import { RequestOptions } from "http"; +import type { AwsCredentialIdentity, Provider } from "@smithy/types"; +import type { RequestOptions } from "http"; import { InstanceMetadataV1FallbackError } from "./error/InstanceMetadataV1FallbackError"; import { httpRequest } from "./remoteProvider/httpRequest"; import { fromImdsCredentials, isImdsCredentials } from "./remoteProvider/ImdsCredentials"; -import { providerConfigFromInit, RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +import type { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +import { providerConfigFromInit } from "./remoteProvider/RemoteProviderInit"; import { retry } from "./remoteProvider/retry"; -import { InstanceMetadataCredentials } from "./types"; +import type { InstanceMetadataCredentials } from "./types"; import { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; import { staticStabilityProvider } from "./utils/staticStabilityProvider"; diff --git a/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.spec.ts b/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.spec.ts index 5d539d98850..0d8816c111c 100644 --- a/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.spec.ts +++ b/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.spec.ts @@ -1,7 +1,8 @@ -import { AwsCredentialIdentity } from "@smithy/types"; +import type { AwsCredentialIdentity } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; -import { fromImdsCredentials, ImdsCredentials, isImdsCredentials } from "./ImdsCredentials"; +import type { ImdsCredentials } from "./ImdsCredentials"; +import { fromImdsCredentials, isImdsCredentials } from "./ImdsCredentials"; const creds: ImdsCredentials = Object.freeze({ AccessKeyId: "foo", diff --git a/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.ts b/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.ts index 53cc160db1d..eb6bea8a043 100644 --- a/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.ts +++ b/packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.ts @@ -1,4 +1,4 @@ -import { AwsCredentialIdentity } from "@smithy/types"; +import type { AwsCredentialIdentity } from "@smithy/types"; /** * @internal diff --git a/packages/credential-provider-imds/src/remoteProvider/RemoteProviderInit.ts b/packages/credential-provider-imds/src/remoteProvider/RemoteProviderInit.ts index a6b5751cfa8..ab0f98019c9 100644 --- a/packages/credential-provider-imds/src/remoteProvider/RemoteProviderInit.ts +++ b/packages/credential-provider-imds/src/remoteProvider/RemoteProviderInit.ts @@ -1,4 +1,4 @@ -import { Logger } from "@smithy/types"; +import type { Logger } from "@smithy/types"; /** * @internal diff --git a/packages/credential-provider-imds/src/remoteProvider/httpRequest.ts b/packages/credential-provider-imds/src/remoteProvider/httpRequest.ts index d11894fe603..c13f09deeb9 100644 --- a/packages/credential-provider-imds/src/remoteProvider/httpRequest.ts +++ b/packages/credential-provider-imds/src/remoteProvider/httpRequest.ts @@ -1,6 +1,7 @@ import { ProviderError } from "@smithy/property-provider"; import { Buffer } from "buffer"; -import { IncomingMessage, request, RequestOptions } from "http"; +import type { IncomingMessage, RequestOptions } from "http"; +import { request } from "http"; /** * @internal diff --git a/packages/credential-provider-imds/src/types.ts b/packages/credential-provider-imds/src/types.ts index 2286bccd96f..a508e8d0bbf 100644 --- a/packages/credential-provider-imds/src/types.ts +++ b/packages/credential-provider-imds/src/types.ts @@ -1,4 +1,4 @@ -import { AwsCredentialIdentity } from "@smithy/types"; +import type { AwsCredentialIdentity } from "@smithy/types"; /** * @internal diff --git a/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.spec.ts b/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.spec.ts index 77bd19b888b..82c5a299ba7 100644 --- a/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.spec.ts +++ b/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.spec.ts @@ -1,4 +1,4 @@ -import { Logger } from "@smithy/types"; +import type { Logger } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { getExtendedInstanceMetadataCredentials } from "./getExtendedInstanceMetadataCredentials"; diff --git a/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.ts b/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.ts index d85901adb53..c60900166cf 100644 --- a/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.ts +++ b/packages/credential-provider-imds/src/utils/getExtendedInstanceMetadataCredentials.ts @@ -1,6 +1,6 @@ -import { Logger } from "@smithy/types"; +import type { Logger } from "@smithy/types"; -import { InstanceMetadataCredentials } from "../types"; +import type { InstanceMetadataCredentials } from "../types"; const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; const STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; diff --git a/packages/credential-provider-imds/src/utils/getInstanceMetadataEndpoint.ts b/packages/credential-provider-imds/src/utils/getInstanceMetadataEndpoint.ts index 04545852e4f..8a079244d1f 100644 --- a/packages/credential-provider-imds/src/utils/getInstanceMetadataEndpoint.ts +++ b/packages/credential-provider-imds/src/utils/getInstanceMetadataEndpoint.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { loadConfig } from "@smithy/node-config-provider"; -import { Endpoint } from "@smithy/types"; +import type { Endpoint } from "@smithy/types"; import { parseUrl } from "@smithy/url-parser"; import { Endpoint as InstanceMetadataEndpoint } from "../config/Endpoint"; diff --git a/packages/credential-provider-imds/src/utils/staticStabilityProvider.spec.ts b/packages/credential-provider-imds/src/utils/staticStabilityProvider.spec.ts index 27be18a9e8e..6701417938d 100644 --- a/packages/credential-provider-imds/src/utils/staticStabilityProvider.spec.ts +++ b/packages/credential-provider-imds/src/utils/staticStabilityProvider.spec.ts @@ -1,4 +1,4 @@ -import { Logger } from "@smithy/types"; +import type { Logger } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { getExtendedInstanceMetadataCredentials } from "./getExtendedInstanceMetadataCredentials"; diff --git a/packages/credential-provider-imds/src/utils/staticStabilityProvider.ts b/packages/credential-provider-imds/src/utils/staticStabilityProvider.ts index fe9e9f6603d..cf0a1cf0f82 100644 --- a/packages/credential-provider-imds/src/utils/staticStabilityProvider.ts +++ b/packages/credential-provider-imds/src/utils/staticStabilityProvider.ts @@ -1,6 +1,6 @@ -import { Logger, Provider } from "@smithy/types"; +import type { Logger, Provider } from "@smithy/types"; -import { InstanceMetadataCredentials } from "../types"; +import type { InstanceMetadataCredentials } from "../types"; import { getExtendedInstanceMetadataCredentials } from "./getExtendedInstanceMetadataCredentials"; /** diff --git a/packages/eventstream-codec/src/EventStreamCodec.ts b/packages/eventstream-codec/src/EventStreamCodec.ts index f3ef3636578..25e0602c447 100644 --- a/packages/eventstream-codec/src/EventStreamCodec.ts +++ b/packages/eventstream-codec/src/EventStreamCodec.ts @@ -1,5 +1,5 @@ import { Crc32 } from "@aws-crypto/crc32"; -import { +import type { AvailableMessage, AvailableMessages, Message, @@ -7,7 +7,7 @@ import { MessageEncoder, MessageHeaders, } from "@smithy/types"; -import { Decoder, Encoder } from "@smithy/types"; +import type { Decoder, Encoder } from "@smithy/types"; import { HeaderMarshaller } from "./HeaderMarshaller"; import { splitMessage } from "./splitMessage"; diff --git a/packages/eventstream-codec/src/HeaderMarshaller.spec.ts b/packages/eventstream-codec/src/HeaderMarshaller.spec.ts index 897e93b9949..f72ef1b3b1d 100644 --- a/packages/eventstream-codec/src/HeaderMarshaller.spec.ts +++ b/packages/eventstream-codec/src/HeaderMarshaller.spec.ts @@ -1,4 +1,4 @@ -import { MessageHeaders } from "@smithy/types"; +import type { MessageHeaders } from "@smithy/types"; import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; import { describe, expect, test as it } from "vitest"; diff --git a/packages/eventstream-codec/src/HeaderMarshaller.ts b/packages/eventstream-codec/src/HeaderMarshaller.ts index e93db024919..c09055a7db1 100644 --- a/packages/eventstream-codec/src/HeaderMarshaller.ts +++ b/packages/eventstream-codec/src/HeaderMarshaller.ts @@ -1,4 +1,4 @@ -import { Decoder, Encoder, MessageHeaders, MessageHeaderValue } from "@smithy/types"; +import type { Decoder, Encoder, MessageHeaders, MessageHeaderValue } from "@smithy/types"; import { fromHex, toHex } from "@smithy/util-hex-encoding"; import { Int64 } from "./Int64"; diff --git a/packages/eventstream-codec/src/Int64.ts b/packages/eventstream-codec/src/Int64.ts index 66d983f8139..43294f590bb 100644 --- a/packages/eventstream-codec/src/Int64.ts +++ b/packages/eventstream-codec/src/Int64.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ -import { Int64 as IInt64 } from "@smithy/types"; +import type { Int64 as IInt64 } from "@smithy/types"; import { toHex } from "@smithy/util-hex-encoding"; export interface Int64 extends IInt64 {} diff --git a/packages/eventstream-codec/src/Message.ts b/packages/eventstream-codec/src/Message.ts index f14596dfebe..e2b294f032a 100644 --- a/packages/eventstream-codec/src/Message.ts +++ b/packages/eventstream-codec/src/Message.ts @@ -1,4 +1,4 @@ -import { Int64 } from "./Int64"; +import type { Int64 } from "./Int64"; /** * An event stream message. The headers and body properties will always be diff --git a/packages/eventstream-codec/src/MessageDecoderStream.spec.ts b/packages/eventstream-codec/src/MessageDecoderStream.spec.ts index 070d5e8fb11..33cc84f759f 100644 --- a/packages/eventstream-codec/src/MessageDecoderStream.spec.ts +++ b/packages/eventstream-codec/src/MessageDecoderStream.spec.ts @@ -1,4 +1,4 @@ -import { Message } from "@smithy/types"; +import type { Message } from "@smithy/types"; import { describe, expect, test as it, vi } from "vitest"; import { MessageDecoderStream } from "./MessageDecoderStream"; diff --git a/packages/eventstream-codec/src/MessageDecoderStream.ts b/packages/eventstream-codec/src/MessageDecoderStream.ts index a1d0120d91e..7e239bd3f0d 100644 --- a/packages/eventstream-codec/src/MessageDecoderStream.ts +++ b/packages/eventstream-codec/src/MessageDecoderStream.ts @@ -1,4 +1,4 @@ -import { Message, MessageDecoder } from "@smithy/types"; +import type { Message, MessageDecoder } from "@smithy/types"; /** * @internal diff --git a/packages/eventstream-codec/src/MessageEncoderStream.ts b/packages/eventstream-codec/src/MessageEncoderStream.ts index 606aff94f53..b7752db7893 100644 --- a/packages/eventstream-codec/src/MessageEncoderStream.ts +++ b/packages/eventstream-codec/src/MessageEncoderStream.ts @@ -1,4 +1,4 @@ -import { Message, MessageEncoder } from "@smithy/types"; +import type { Message, MessageEncoder } from "@smithy/types"; /** * @internal diff --git a/packages/eventstream-codec/src/SmithyMessageDecoderStream.ts b/packages/eventstream-codec/src/SmithyMessageDecoderStream.ts index 18e86f65c44..a5ee683c4f9 100644 --- a/packages/eventstream-codec/src/SmithyMessageDecoderStream.ts +++ b/packages/eventstream-codec/src/SmithyMessageDecoderStream.ts @@ -1,4 +1,4 @@ -import { Message } from "@smithy/types"; +import type { Message } from "@smithy/types"; /** * @internal diff --git a/packages/eventstream-codec/src/SmithyMessageEncoderStream.spec.ts b/packages/eventstream-codec/src/SmithyMessageEncoderStream.spec.ts index 36d981142ad..97379de6cd5 100644 --- a/packages/eventstream-codec/src/SmithyMessageEncoderStream.spec.ts +++ b/packages/eventstream-codec/src/SmithyMessageEncoderStream.spec.ts @@ -1,4 +1,4 @@ -import { Message } from "@smithy/types"; +import type { Message } from "@smithy/types"; import { describe, expect, test as it, vi } from "vitest"; import { SmithyMessageEncoderStream } from "./SmithyMessageEncoderStream"; diff --git a/packages/eventstream-codec/src/SmithyMessageEncoderStream.ts b/packages/eventstream-codec/src/SmithyMessageEncoderStream.ts index a0e855d1b05..16a90b2c221 100644 --- a/packages/eventstream-codec/src/SmithyMessageEncoderStream.ts +++ b/packages/eventstream-codec/src/SmithyMessageEncoderStream.ts @@ -1,4 +1,4 @@ -import { Message } from "@smithy/types"; +import type { Message } from "@smithy/types"; /** * @internal diff --git a/packages/eventstream-codec/src/TestVectors.fixture.ts b/packages/eventstream-codec/src/TestVectors.fixture.ts index c83ca5c37ad..e9066f83ef7 100644 --- a/packages/eventstream-codec/src/TestVectors.fixture.ts +++ b/packages/eventstream-codec/src/TestVectors.fixture.ts @@ -1,5 +1,5 @@ import { Int64 } from "./Int64"; -import { TestVectors } from "./vectorTypes.fixture"; +import type { TestVectors } from "./vectorTypes.fixture"; export const vectors: TestVectors = { all_headers: { diff --git a/packages/eventstream-codec/src/vectorTypes.fixture.ts b/packages/eventstream-codec/src/vectorTypes.fixture.ts index b1cfdcab08f..8342de27bfd 100644 --- a/packages/eventstream-codec/src/vectorTypes.fixture.ts +++ b/packages/eventstream-codec/src/vectorTypes.fixture.ts @@ -1,4 +1,4 @@ -import { Message } from "./Message"; +import type { Message } from "./Message"; export interface NegativeTestVector { expectation: "failure"; diff --git a/packages/eventstream-serde-browser/src/EventStreamMarshaller.ts b/packages/eventstream-serde-browser/src/EventStreamMarshaller.ts index 4ba40db85c7..92b21630f3b 100644 --- a/packages/eventstream-serde-browser/src/EventStreamMarshaller.ts +++ b/packages/eventstream-serde-browser/src/EventStreamMarshaller.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ import { EventStreamMarshaller as UniversalEventStreamMarshaller } from "@smithy/eventstream-serde-universal"; -import { Decoder, Encoder, EventStreamMarshaller as IEventStreamMarshaller, Message } from "@smithy/types"; +import type { Decoder, Encoder, EventStreamMarshaller as IEventStreamMarshaller, Message } from "@smithy/types"; import { iterableToReadableStream, readableStreamtoIterable } from "./utils"; diff --git a/packages/eventstream-serde-browser/src/provider.ts b/packages/eventstream-serde-browser/src/provider.ts index 07ac96ff124..770c8744e69 100644 --- a/packages/eventstream-serde-browser/src/provider.ts +++ b/packages/eventstream-serde-browser/src/provider.ts @@ -1,4 +1,4 @@ -import { Decoder, Encoder, EventSigner, EventStreamSerdeProvider, Provider } from "@smithy/types"; +import type { Decoder, Encoder, EventSigner, EventStreamSerdeProvider, Provider } from "@smithy/types"; import { EventStreamMarshaller } from "./EventStreamMarshaller"; diff --git a/packages/eventstream-serde-config-resolver/src/EventStreamSerdeConfig.ts b/packages/eventstream-serde-config-resolver/src/EventStreamSerdeConfig.ts index e96f296d43e..8665fd65ed1 100644 --- a/packages/eventstream-serde-config-resolver/src/EventStreamSerdeConfig.ts +++ b/packages/eventstream-serde-config-resolver/src/EventStreamSerdeConfig.ts @@ -1,4 +1,4 @@ -import { EventStreamMarshaller, EventStreamSerdeProvider } from "@smithy/types"; +import type { EventStreamMarshaller, EventStreamSerdeProvider } from "@smithy/types"; /** * @public diff --git a/packages/eventstream-serde-node/src/EventStreamMarshaller.ts b/packages/eventstream-serde-node/src/EventStreamMarshaller.ts index 18f467fa6ac..6a0a14892c5 100644 --- a/packages/eventstream-serde-node/src/EventStreamMarshaller.ts +++ b/packages/eventstream-serde-node/src/EventStreamMarshaller.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ import { EventStreamMarshaller as UniversalEventStreamMarshaller } from "@smithy/eventstream-serde-universal"; -import { Decoder, Encoder, EventStreamMarshaller as IEventStreamMarshaller, Message } from "@smithy/types"; +import type { Decoder, Encoder, EventStreamMarshaller as IEventStreamMarshaller, Message } from "@smithy/types"; import { Readable } from "stream"; import { readabletoIterable } from "./utils"; diff --git a/packages/eventstream-serde-node/src/provider.ts b/packages/eventstream-serde-node/src/provider.ts index 1eab10753a0..488deeb28bc 100644 --- a/packages/eventstream-serde-node/src/provider.ts +++ b/packages/eventstream-serde-node/src/provider.ts @@ -1,4 +1,4 @@ -import { Decoder, Encoder, EventSigner, EventStreamSerdeProvider, Provider } from "@smithy/types"; +import type { Decoder, Encoder, EventSigner, EventStreamSerdeProvider, Provider } from "@smithy/types"; import { EventStreamMarshaller } from "./EventStreamMarshaller"; diff --git a/packages/eventstream-serde-node/src/utils.ts b/packages/eventstream-serde-node/src/utils.ts index 2c799cd729a..5c91db1c631 100644 --- a/packages/eventstream-serde-node/src/utils.ts +++ b/packages/eventstream-serde-node/src/utils.ts @@ -1,4 +1,4 @@ -import { Readable } from "stream"; +import type { Readable } from "stream"; /** * Convert object stream piped in into an async iterable. This diff --git a/packages/eventstream-serde-universal/src/EventStreamMarshaller.ts b/packages/eventstream-serde-universal/src/EventStreamMarshaller.ts index fe51a2ba55a..c949f2d0ad3 100644 --- a/packages/eventstream-serde-universal/src/EventStreamMarshaller.ts +++ b/packages/eventstream-serde-universal/src/EventStreamMarshaller.ts @@ -6,7 +6,7 @@ import { SmithyMessageDecoderStream, SmithyMessageEncoderStream, } from "@smithy/eventstream-codec"; -import { Decoder, Encoder, EventStreamMarshaller as IEventStreamMarshaller, Message } from "@smithy/types"; +import type { Decoder, Encoder, EventStreamMarshaller as IEventStreamMarshaller, Message } from "@smithy/types"; import { getChunkedStream } from "./getChunkedStream"; import { getMessageUnmarshaller } from "./getUnmarshalledStream"; diff --git a/packages/eventstream-serde-universal/src/getChunkedStream.spec.ts b/packages/eventstream-serde-universal/src/getChunkedStream.spec.ts index b6c6620b8b7..a12eb80cbd1 100644 --- a/packages/eventstream-serde-universal/src/getChunkedStream.spec.ts +++ b/packages/eventstream-serde-universal/src/getChunkedStream.spec.ts @@ -1,4 +1,5 @@ -import { Readable, ReadableOptions } from "stream"; +import type { ReadableOptions } from "stream"; +import { Readable } from "stream"; import { describe, expect, test as it } from "vitest"; import { getChunkedStream } from "./getChunkedStream"; diff --git a/packages/eventstream-serde-universal/src/getUnmarshalledStream.spec.ts b/packages/eventstream-serde-universal/src/getUnmarshalledStream.spec.ts index 8e9c7620d40..f5dafa81034 100644 --- a/packages/eventstream-serde-universal/src/getUnmarshalledStream.spec.ts +++ b/packages/eventstream-serde-universal/src/getUnmarshalledStream.spec.ts @@ -1,5 +1,5 @@ import { EventStreamCodec } from "@smithy/eventstream-codec"; -import { Message } from "@smithy/types"; +import type { Message } from "@smithy/types"; import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; import { describe, expect, test as it } from "vitest"; diff --git a/packages/eventstream-serde-universal/src/getUnmarshalledStream.ts b/packages/eventstream-serde-universal/src/getUnmarshalledStream.ts index 6ff58d95f4e..3f8168926b3 100644 --- a/packages/eventstream-serde-universal/src/getUnmarshalledStream.ts +++ b/packages/eventstream-serde-universal/src/getUnmarshalledStream.ts @@ -1,5 +1,5 @@ -import { EventStreamCodec } from "@smithy/eventstream-codec"; -import { Encoder, Message } from "@smithy/types"; +import type { EventStreamCodec } from "@smithy/eventstream-codec"; +import type { Encoder, Message } from "@smithy/types"; /** * @internal diff --git a/packages/eventstream-serde-universal/src/provider.ts b/packages/eventstream-serde-universal/src/provider.ts index 1eab10753a0..488deeb28bc 100644 --- a/packages/eventstream-serde-universal/src/provider.ts +++ b/packages/eventstream-serde-universal/src/provider.ts @@ -1,4 +1,4 @@ -import { Decoder, Encoder, EventSigner, EventStreamSerdeProvider, Provider } from "@smithy/types"; +import type { Decoder, Encoder, EventSigner, EventStreamSerdeProvider, Provider } from "@smithy/types"; import { EventStreamMarshaller } from "./EventStreamMarshaller"; diff --git a/packages/experimental-identity-and-auth/src/HttpAuthScheme.ts b/packages/experimental-identity-and-auth/src/HttpAuthScheme.ts index 364ab0923f6..25b02c3ee71 100644 --- a/packages/experimental-identity-and-auth/src/HttpAuthScheme.ts +++ b/packages/experimental-identity-and-auth/src/HttpAuthScheme.ts @@ -1,7 +1,7 @@ -import { HandlerExecutionContext, Identity, IdentityProvider } from "@smithy/types"; +import type { HandlerExecutionContext, Identity, IdentityProvider } from "@smithy/types"; -import { HttpSigner } from "./HttpSigner"; -import { IdentityProviderConfig } from "./IdentityProviderConfig"; +import type { HttpSigner } from "./HttpSigner"; +import type { IdentityProviderConfig } from "./IdentityProviderConfig"; /** * ID for {@link HttpAuthScheme} diff --git a/packages/experimental-identity-and-auth/src/HttpAuthSchemeProvider.ts b/packages/experimental-identity-and-auth/src/HttpAuthSchemeProvider.ts index c77cac5576e..5bb04bb0c4a 100644 --- a/packages/experimental-identity-and-auth/src/HttpAuthSchemeProvider.ts +++ b/packages/experimental-identity-and-auth/src/HttpAuthSchemeProvider.ts @@ -1,6 +1,6 @@ -import { HandlerExecutionContext } from "@smithy/types"; +import type { HandlerExecutionContext } from "@smithy/types"; -import { HttpAuthOption } from "./HttpAuthScheme"; +import type { HttpAuthOption } from "./HttpAuthScheme"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/HttpSigner.ts b/packages/experimental-identity-and-auth/src/HttpSigner.ts index afb2ac30ab4..d4cd005f024 100644 --- a/packages/experimental-identity-and-auth/src/HttpSigner.ts +++ b/packages/experimental-identity-and-auth/src/HttpSigner.ts @@ -1,4 +1,4 @@ -import { HttpRequest, Identity } from "@smithy/types"; +import type { HttpRequest, Identity } from "@smithy/types"; /** * Interface to sign identity and signing properties. diff --git a/packages/experimental-identity-and-auth/src/IdentityProviderConfig.ts b/packages/experimental-identity-and-auth/src/IdentityProviderConfig.ts index 1507cbb2d73..2c4a6f7cab1 100644 --- a/packages/experimental-identity-and-auth/src/IdentityProviderConfig.ts +++ b/packages/experimental-identity-and-auth/src/IdentityProviderConfig.ts @@ -1,6 +1,6 @@ -import { Identity, IdentityProvider } from "@smithy/types"; +import type { Identity, IdentityProvider } from "@smithy/types"; -import { HttpAuthSchemeId } from "./HttpAuthScheme"; +import type { HttpAuthSchemeId } from "./HttpAuthScheme"; /** * Interface to get an IdentityProvider for a specified HttpAuthScheme diff --git a/packages/experimental-identity-and-auth/src/SigV4Signer.ts b/packages/experimental-identity-and-auth/src/SigV4Signer.ts index 34afaae403b..f47f7fc1395 100644 --- a/packages/experimental-identity-and-auth/src/SigV4Signer.ts +++ b/packages/experimental-identity-and-auth/src/SigV4Signer.ts @@ -1,8 +1,8 @@ import { HttpRequest } from "@smithy/protocol-http"; import { SignatureV4 } from "@smithy/signature-v4"; -import { AwsCredentialIdentity, HttpRequest as IHttpRequest } from "@smithy/types"; +import type { AwsCredentialIdentity, HttpRequest as IHttpRequest } from "@smithy/types"; -import { HttpSigner } from "./HttpSigner"; +import type { HttpSigner } from "./HttpSigner"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/apiKeyIdentity.ts b/packages/experimental-identity-and-auth/src/apiKeyIdentity.ts index 0a75b0e5f18..99f3db62012 100644 --- a/packages/experimental-identity-and-auth/src/apiKeyIdentity.ts +++ b/packages/experimental-identity-and-auth/src/apiKeyIdentity.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "@smithy/types"; +import type { Identity, IdentityProvider } from "@smithy/types"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/endpointRuleSet.ts b/packages/experimental-identity-and-auth/src/endpointRuleSet.ts index c68a2ae9d6f..1f012d18987 100644 --- a/packages/experimental-identity-and-auth/src/endpointRuleSet.ts +++ b/packages/experimental-identity-and-auth/src/endpointRuleSet.ts @@ -1,9 +1,10 @@ -import { EndpointParameterInstructions, resolveParams } from "@smithy/middleware-endpoint"; -import { EndpointParameters, EndpointV2, HandlerExecutionContext, Logger } from "@smithy/types"; +import type { EndpointParameterInstructions } from "@smithy/middleware-endpoint"; +import { resolveParams } from "@smithy/middleware-endpoint"; +import type { EndpointParameters, EndpointV2, HandlerExecutionContext, Logger } from "@smithy/types"; import { getSmithyContext } from "@smithy/util-middleware"; -import { HttpAuthOption } from "./HttpAuthScheme"; -import { +import type { HttpAuthOption } from "./HttpAuthScheme"; +import type { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, diff --git a/packages/experimental-identity-and-auth/src/httpApiKeyAuth.ts b/packages/experimental-identity-and-auth/src/httpApiKeyAuth.ts index ca72570a3b9..27fb84c6652 100644 --- a/packages/experimental-identity-and-auth/src/httpApiKeyAuth.ts +++ b/packages/experimental-identity-and-auth/src/httpApiKeyAuth.ts @@ -1,8 +1,8 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { HttpRequest as IHttpRequest } from "@smithy/types"; +import type { HttpRequest as IHttpRequest } from "@smithy/types"; -import { ApiKeyIdentity } from "./apiKeyIdentity"; -import { HttpSigner } from "./HttpSigner"; +import type { ApiKeyIdentity } from "./apiKeyIdentity"; +import type { HttpSigner } from "./HttpSigner"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/httpBearerAuth.ts b/packages/experimental-identity-and-auth/src/httpBearerAuth.ts index 249f54d29a6..10223e8e7c8 100644 --- a/packages/experimental-identity-and-auth/src/httpBearerAuth.ts +++ b/packages/experimental-identity-and-auth/src/httpBearerAuth.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { HttpRequest } from "@smithy/protocol-http"; -import { HttpRequest as IHttpRequest } from "@smithy/types"; +import type { HttpRequest as IHttpRequest } from "@smithy/types"; -import { HttpSigner } from "./HttpSigner"; -import { TokenIdentity } from "./tokenIdentity"; +import type { HttpSigner } from "./HttpSigner"; +import type { TokenIdentity } from "./tokenIdentity"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/memoizeIdentityProvider.ts b/packages/experimental-identity-and-auth/src/memoizeIdentityProvider.ts index 01e85304275..326a67b7078 100644 --- a/packages/experimental-identity-and-auth/src/memoizeIdentityProvider.ts +++ b/packages/experimental-identity-and-auth/src/memoizeIdentityProvider.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "@smithy/types"; +import type { Identity, IdentityProvider } from "@smithy/types"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts b/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts index 99a67a4761f..202302ba450 100644 --- a/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts +++ b/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts @@ -1,9 +1,15 @@ import { endpointMiddlewareOptions } from "@smithy/middleware-endpoint"; -import { HandlerExecutionContext, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import type { + HandlerExecutionContext, + Pluggable, + RelativeMiddlewareOptions, + SerializeHandlerOptions, +} from "@smithy/types"; -import { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider } from "../HttpAuthSchemeProvider"; -import { IdentityProviderConfig } from "../IdentityProviderConfig"; -import { httpAuthSchemeMiddleware, PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import type { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider } from "../HttpAuthSchemeProvider"; +import type { IdentityProviderConfig } from "../IdentityProviderConfig"; +import type { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts b/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts index e7c72c2cc9e..b9ac5a75767 100644 --- a/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts +++ b/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts @@ -1,9 +1,15 @@ import { serializerMiddlewareOption } from "@smithy/middleware-serde"; -import { HandlerExecutionContext, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import type { + HandlerExecutionContext, + Pluggable, + RelativeMiddlewareOptions, + SerializeHandlerOptions, +} from "@smithy/types"; -import { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider } from "../HttpAuthSchemeProvider"; -import { IdentityProviderConfig } from "../IdentityProviderConfig"; -import { httpAuthSchemeMiddleware, PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import type { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider } from "../HttpAuthSchemeProvider"; +import type { IdentityProviderConfig } from "../IdentityProviderConfig"; +import type { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts b/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts index 77c81b17455..4d6e49aee49 100644 --- a/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts +++ b/packages/experimental-identity-and-auth/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts @@ -1,4 +1,4 @@ -import { +import type { HandlerExecutionContext, SerializeHandler, SerializeHandlerArguments, @@ -8,13 +8,13 @@ import { } from "@smithy/types"; import { getSmithyContext } from "@smithy/util-middleware"; -import { HttpAuthScheme, HttpAuthSchemeId, SelectedHttpAuthScheme } from "../HttpAuthScheme"; -import { +import type { HttpAuthScheme, HttpAuthSchemeId, SelectedHttpAuthScheme } from "../HttpAuthScheme"; +import type { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, } from "../HttpAuthSchemeProvider"; -import { IdentityProviderConfig } from "../IdentityProviderConfig"; +import type { IdentityProviderConfig } from "../IdentityProviderConfig"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/middleware-http-signing/getHttpSigningMiddleware.ts b/packages/experimental-identity-and-auth/src/middleware-http-signing/getHttpSigningMiddleware.ts index 1f167e8202b..0e03c711742 100644 --- a/packages/experimental-identity-and-auth/src/middleware-http-signing/getHttpSigningMiddleware.ts +++ b/packages/experimental-identity-and-auth/src/middleware-http-signing/getHttpSigningMiddleware.ts @@ -1,5 +1,5 @@ import { retryMiddlewareOptions } from "@smithy/middleware-retry"; -import { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; +import type { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; import { httpSigningMiddleware } from "./httpSigningMiddleware"; diff --git a/packages/experimental-identity-and-auth/src/middleware-http-signing/httpSigningMiddleware.ts b/packages/experimental-identity-and-auth/src/middleware-http-signing/httpSigningMiddleware.ts index 97914732ba2..0cf65a3f383 100644 --- a/packages/experimental-identity-and-auth/src/middleware-http-signing/httpSigningMiddleware.ts +++ b/packages/experimental-identity-and-auth/src/middleware-http-signing/httpSigningMiddleware.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { HttpRequest } from "@smithy/protocol-http"; -import { +import type { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, @@ -10,7 +10,7 @@ import { } from "@smithy/types"; import { getSmithyContext } from "@smithy/util-middleware"; -import { SelectedHttpAuthScheme } from "../HttpAuthScheme"; +import type { SelectedHttpAuthScheme } from "../HttpAuthScheme"; /** * @internal diff --git a/packages/experimental-identity-and-auth/src/noAuth.ts b/packages/experimental-identity-and-auth/src/noAuth.ts index 067ef326737..2c81c7197d1 100644 --- a/packages/experimental-identity-and-auth/src/noAuth.ts +++ b/packages/experimental-identity-and-auth/src/noAuth.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { HttpRequest, Identity } from "@smithy/types"; +import type { HttpRequest, Identity } from "@smithy/types"; -import { HttpSigner } from "./HttpSigner"; +import type { HttpSigner } from "./HttpSigner"; /** * Signer for the synthetic @smithy.api#noAuth auth scheme. diff --git a/packages/experimental-identity-and-auth/src/tokenIdentity.ts b/packages/experimental-identity-and-auth/src/tokenIdentity.ts index 86c72c8fd27..76e6d5cb4f0 100644 --- a/packages/experimental-identity-and-auth/src/tokenIdentity.ts +++ b/packages/experimental-identity-and-auth/src/tokenIdentity.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "@smithy/types"; +import type { Identity, IdentityProvider } from "@smithy/types"; /** * @internal diff --git a/packages/fetch-http-handler/src/create-request.ts b/packages/fetch-http-handler/src/create-request.ts index ce95e3d289d..7d014382169 100644 --- a/packages/fetch-http-handler/src/create-request.ts +++ b/packages/fetch-http-handler/src/create-request.ts @@ -1,4 +1,4 @@ -import { AdditionalRequestParameters } from "./fetch-http-handler"; +import type { AdditionalRequestParameters } from "./fetch-http-handler"; /** * @internal diff --git a/packages/fetch-http-handler/src/fetch-http-handler.browser.spec.ts b/packages/fetch-http-handler/src/fetch-http-handler.browser.spec.ts index 779a140ed72..4672b34ab63 100644 --- a/packages/fetch-http-handler/src/fetch-http-handler.browser.spec.ts +++ b/packages/fetch-http-handler/src/fetch-http-handler.browser.spec.ts @@ -1,5 +1,5 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { QueryParameterBag } from "@smithy/types"; +import type { QueryParameterBag } from "@smithy/types"; import { afterEach, beforeAll, describe, expect, test as it, vi } from "vitest"; import { createRequest } from "./create-request"; diff --git a/packages/fetch-http-handler/src/fetch-http-handler.ts b/packages/fetch-http-handler/src/fetch-http-handler.ts index 6db27e1ba72..536799aa4fc 100644 --- a/packages/fetch-http-handler/src/fetch-http-handler.ts +++ b/packages/fetch-http-handler/src/fetch-http-handler.ts @@ -1,7 +1,8 @@ -import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { HttpHandler, HttpRequest } from "@smithy/protocol-http"; +import { HttpResponse } from "@smithy/protocol-http"; import { buildQueryString } from "@smithy/querystring-builder"; import type { FetchHttpHandlerOptions } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions, Provider } from "@smithy/types"; +import type { HeaderBag, HttpHandlerOptions, Provider } from "@smithy/types"; import { createRequest } from "./create-request"; import { requestTimeout as requestTimeoutFn } from "./request-timeout"; diff --git a/packages/fetch-http-handler/src/stream-collector.ts b/packages/fetch-http-handler/src/stream-collector.ts index 071a70fc961..df5288b07fd 100644 --- a/packages/fetch-http-handler/src/stream-collector.ts +++ b/packages/fetch-http-handler/src/stream-collector.ts @@ -1,4 +1,4 @@ -import { StreamCollector } from "@smithy/types"; +import type { StreamCollector } from "@smithy/types"; import { fromBase64 } from "@smithy/util-base64"; export const streamCollector: StreamCollector = async (stream: Blob | ReadableStream): Promise => { diff --git a/packages/hash-blob-browser/src/index.ts b/packages/hash-blob-browser/src/index.ts index d84d90047a2..e8e055fafc2 100644 --- a/packages/hash-blob-browser/src/index.ts +++ b/packages/hash-blob-browser/src/index.ts @@ -1,5 +1,5 @@ import { blobReader } from "@smithy/chunked-blob-reader"; -import { ChecksumConstructor, HashConstructor, StreamHasher } from "@smithy/types"; +import type { ChecksumConstructor, HashConstructor, StreamHasher } from "@smithy/types"; /** * @internal diff --git a/packages/hash-node/src/index.ts b/packages/hash-node/src/index.ts index e710a5c1ea6..d850ea2b078 100644 --- a/packages/hash-node/src/index.ts +++ b/packages/hash-node/src/index.ts @@ -1,8 +1,10 @@ -import { Checksum, SourceData } from "@smithy/types"; -import { fromArrayBuffer, fromString, StringEncoding } from "@smithy/util-buffer-from"; +import type { Checksum, SourceData } from "@smithy/types"; +import type { StringEncoding } from "@smithy/util-buffer-from"; +import { fromArrayBuffer, fromString } from "@smithy/util-buffer-from"; import { toUint8Array } from "@smithy/util-utf8"; import { Buffer } from "buffer"; -import { createHash, createHmac, Hash as NodeHash, Hmac } from "crypto"; +import type { Hash as NodeHash, Hmac } from "crypto"; +import { createHash, createHmac } from "crypto"; /** * @internal diff --git a/packages/hash-stream-node/src/HashCalculator.ts b/packages/hash-stream-node/src/HashCalculator.ts index 191f5bef6bd..97e21d962fd 100644 --- a/packages/hash-stream-node/src/HashCalculator.ts +++ b/packages/hash-stream-node/src/HashCalculator.ts @@ -1,6 +1,7 @@ -import { Checksum, Hash } from "@smithy/types"; +import type { Checksum, Hash } from "@smithy/types"; import { toUint8Array } from "@smithy/util-utf8"; -import { Writable, WritableOptions } from "stream"; +import type { WritableOptions } from "stream"; +import { Writable } from "stream"; /** * @internal diff --git a/packages/hash-stream-node/src/fileStreamHasher.ts b/packages/hash-stream-node/src/fileStreamHasher.ts index 06b1e319b94..a44e21aa9a1 100644 --- a/packages/hash-stream-node/src/fileStreamHasher.ts +++ b/packages/hash-stream-node/src/fileStreamHasher.ts @@ -1,6 +1,7 @@ -import { HashConstructor, StreamHasher } from "@smithy/types"; -import { createReadStream, ReadStream } from "fs"; -import { Readable } from "stream"; +import type { HashConstructor, StreamHasher } from "@smithy/types"; +import type { ReadStream } from "fs"; +import { createReadStream } from "fs"; +import type { Readable } from "stream"; import { HashCalculator } from "./HashCalculator"; diff --git a/packages/hash-stream-node/src/readableStreamHasher.spec.ts b/packages/hash-stream-node/src/readableStreamHasher.spec.ts index 219c32f1295..e3ff6d4aa08 100644 --- a/packages/hash-stream-node/src/readableStreamHasher.spec.ts +++ b/packages/hash-stream-node/src/readableStreamHasher.spec.ts @@ -1,4 +1,4 @@ -import { Hash } from "@smithy/types"; +import type { Hash } from "@smithy/types"; import { Readable, Writable } from "stream"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; diff --git a/packages/hash-stream-node/src/readableStreamHasher.ts b/packages/hash-stream-node/src/readableStreamHasher.ts index a6779ef289f..a7c47c5bea2 100644 --- a/packages/hash-stream-node/src/readableStreamHasher.ts +++ b/packages/hash-stream-node/src/readableStreamHasher.ts @@ -1,5 +1,5 @@ -import { HashConstructor, StreamHasher } from "@smithy/types"; -import { Readable } from "stream"; +import type { HashConstructor, StreamHasher } from "@smithy/types"; +import type { Readable } from "stream"; import { HashCalculator } from "./HashCalculator"; diff --git a/packages/invalid-dependency/src/invalidProvider.ts b/packages/invalid-dependency/src/invalidProvider.ts index a363275949a..39360d497be 100644 --- a/packages/invalid-dependency/src/invalidProvider.ts +++ b/packages/invalid-dependency/src/invalidProvider.ts @@ -1,4 +1,4 @@ -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; /** * @internal */ diff --git a/packages/md5-js/src/index.ts b/packages/md5-js/src/index.ts index 30a77911202..7f155b34fbd 100644 --- a/packages/md5-js/src/index.ts +++ b/packages/md5-js/src/index.ts @@ -1,4 +1,4 @@ -import { Checksum, SourceData } from "@smithy/types"; +import type { Checksum, SourceData } from "@smithy/types"; import { fromUtf8 } from "@smithy/util-utf8"; import { BLOCK_SIZE, DIGEST_LENGTH, INIT } from "./constants"; diff --git a/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.spec.ts b/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.spec.ts index 95b04cdbbe0..bf4b4c24a4c 100644 --- a/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.spec.ts +++ b/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.spec.ts @@ -1,5 +1,5 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { ChecksumConstructor } from "@smithy/types"; +import type { ChecksumConstructor } from "@smithy/types"; import { beforeEach, describe, expect, test as it, vi } from "vitest"; import { applyMd5BodyChecksumMiddleware } from "./applyMd5BodyChecksumMiddleware"; diff --git a/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.ts b/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.ts index e2d9e8f17f9..ce4b4ca87f3 100644 --- a/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.ts +++ b/packages/middleware-apply-body-checksum/src/applyMd5BodyChecksumMiddleware.ts @@ -1,6 +1,6 @@ import { isArrayBuffer } from "@smithy/is-array-buffer"; import { HttpRequest } from "@smithy/protocol-http"; -import { +import type { BuildHandler, BuildHandlerArguments, BuildHandlerOptions, @@ -11,7 +11,7 @@ import { Pluggable, } from "@smithy/types"; -import { Md5BodyChecksumResolvedConfig } from "./md5Configuration"; +import type { Md5BodyChecksumResolvedConfig } from "./md5Configuration"; export const applyMd5BodyChecksumMiddleware = (options: Md5BodyChecksumResolvedConfig): BuildMiddleware => diff --git a/packages/middleware-apply-body-checksum/src/md5Configuration.ts b/packages/middleware-apply-body-checksum/src/md5Configuration.ts index 720c20dded2..8951089c694 100644 --- a/packages/middleware-apply-body-checksum/src/md5Configuration.ts +++ b/packages/middleware-apply-body-checksum/src/md5Configuration.ts @@ -1,4 +1,4 @@ -import { ChecksumConstructor, Encoder, HashConstructor, StreamHasher } from "@smithy/types"; +import type { ChecksumConstructor, Encoder, HashConstructor, StreamHasher } from "@smithy/types"; /** * @public diff --git a/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.spec.ts b/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.spec.ts index 40be7973ae3..b75ab321ab5 100644 --- a/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.spec.ts +++ b/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, afterEach, describe, expect } from "vitest"; - import { booleanSelector, SelectorType } from "@smithy/util-config-provider"; +import { afterEach, describe, expect,test as it, vi } from "vitest"; import { DEFAULT_DISABLE_REQUEST_COMPRESSION, diff --git a/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.ts b/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.ts index 4f70b873bcf..e24e4c31285 100644 --- a/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.ts +++ b/packages/middleware-compression/src/NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import { booleanSelector, SelectorType } from "@smithy/util-config-provider"; /** diff --git a/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.spec.ts b/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.spec.ts index 7c8765122a4..d9dbf6ddc4e 100644 --- a/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.spec.ts +++ b/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, afterEach, describe, expect } from "vitest"; - import { numberSelector, SelectorType } from "@smithy/util-config-provider"; +import { afterEach, describe, expect,test as it, vi } from "vitest"; import { DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, diff --git a/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.ts b/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.ts index 1974423b478..98beab85ed3 100644 --- a/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.ts +++ b/packages/middleware-compression/src/NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import { numberSelector, SelectorType } from "@smithy/util-config-provider"; /** diff --git a/packages/middleware-compression/src/compressStream.browser.spec.ts b/packages/middleware-compression/src/compressStream.browser.spec.ts index 73f35b001fb..5cd50525622 100644 --- a/packages/middleware-compression/src/compressStream.browser.spec.ts +++ b/packages/middleware-compression/src/compressStream.browser.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, beforeEach, afterEach, describe, expect } from "vitest"; - import { AsyncGzip } from "fflate"; +import { afterEach, beforeEach, describe, expect,test as it, vi } from "vitest"; import { ReadableStream } from "web-streams-polyfill"; import { compressStream } from "./compressStream.browser"; diff --git a/packages/middleware-compression/src/compressStream.spec.ts b/packages/middleware-compression/src/compressStream.spec.ts index 2df87215b97..8893dc94ec1 100644 --- a/packages/middleware-compression/src/compressStream.spec.ts +++ b/packages/middleware-compression/src/compressStream.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, beforeEach, afterEach, describe, expect } from "vitest"; - import { Readable } from "stream"; +import { afterEach, beforeEach, describe, expect,test as it, vi } from "vitest"; import { createGzip } from "zlib"; import { compressStream } from "./compressStream"; diff --git a/packages/middleware-compression/src/compressStream.ts b/packages/middleware-compression/src/compressStream.ts index 44e0bacad4b..4bae2e3cf7f 100644 --- a/packages/middleware-compression/src/compressStream.ts +++ b/packages/middleware-compression/src/compressStream.ts @@ -1,4 +1,4 @@ -import { Readable } from "stream"; +import type { Readable } from "stream"; import { createGzip } from "zlib"; export const compressStream = async (body: Readable): Promise => body.pipe(createGzip()); diff --git a/packages/middleware-compression/src/compressString.browser.spec.ts b/packages/middleware-compression/src/compressString.browser.spec.ts index 9d0e3125d29..833c9e7e2bb 100644 --- a/packages/middleware-compression/src/compressString.browser.spec.ts +++ b/packages/middleware-compression/src/compressString.browser.spec.ts @@ -1,7 +1,6 @@ -import { test as it, vi, beforeEach, afterEach, describe, expect } from "vitest"; - import { toUint8Array } from "@smithy/util-utf8"; import { gzip } from "fflate"; +import { afterEach, beforeEach, describe, expect,test as it, vi } from "vitest"; import { compressString } from "./compressString.browser"; diff --git a/packages/middleware-compression/src/compressString.spec.ts b/packages/middleware-compression/src/compressString.spec.ts index f1a8f090393..0d0f5152f0e 100644 --- a/packages/middleware-compression/src/compressString.spec.ts +++ b/packages/middleware-compression/src/compressString.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, beforeEach, afterEach, describe, expect } from "vitest"; - import { toUint8Array } from "@smithy/util-utf8"; +import { afterEach, beforeEach, describe, expect,test as it, vi } from "vitest"; import { gzip } from "zlib"; import { compressString } from "./compressString"; diff --git a/packages/middleware-compression/src/compressionMiddleware.spec.ts b/packages/middleware-compression/src/compressionMiddleware.spec.ts index 8c207ebc29a..4e54de33cda 100644 --- a/packages/middleware-compression/src/compressionMiddleware.spec.ts +++ b/packages/middleware-compression/src/compressionMiddleware.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, beforeEach, afterEach, describe, expect } from "vitest"; - import { HttpRequest } from "@smithy/protocol-http"; +import { afterEach, beforeEach, describe, expect,test as it, vi } from "vitest"; import { compressionMiddleware } from "./compressionMiddleware"; import { compressStream } from "./compressStream"; diff --git a/packages/middleware-compression/src/compressionMiddleware.ts b/packages/middleware-compression/src/compressionMiddleware.ts index 8063fbc5ead..a17b926a9f4 100644 --- a/packages/middleware-compression/src/compressionMiddleware.ts +++ b/packages/middleware-compression/src/compressionMiddleware.ts @@ -1,6 +1,6 @@ import { setFeature } from "@smithy/core"; import { HttpRequest } from "@smithy/protocol-http"; -import { +import type { AbsoluteLocation, BuildHandler, BuildHandlerArguments, @@ -13,8 +13,9 @@ import { import { compressStream } from "./compressStream"; import { compressString } from "./compressString"; -import { CompressionPreviouslyResolved, CompressionResolvedConfig } from "./configurations"; -import { CLIENT_SUPPORTED_ALGORITHMS, CompressionAlgorithm } from "./constants"; +import type { CompressionPreviouslyResolved, CompressionResolvedConfig } from "./configurations"; +import type { CompressionAlgorithm } from "./constants"; +import { CLIENT_SUPPORTED_ALGORITHMS } from "./constants"; import { isStreaming } from "./isStreaming"; /** diff --git a/packages/middleware-compression/src/configurations.ts b/packages/middleware-compression/src/configurations.ts index 21de20c24ae..51b73e48386 100644 --- a/packages/middleware-compression/src/configurations.ts +++ b/packages/middleware-compression/src/configurations.ts @@ -1,4 +1,4 @@ -import { BodyLengthCalculator, Provider } from "@smithy/types"; +import type { BodyLengthCalculator, Provider } from "@smithy/types"; /** * @public diff --git a/packages/middleware-compression/src/getCompressionPlugin.spec.ts b/packages/middleware-compression/src/getCompressionPlugin.spec.ts index 95572933ab5..d5e04ef7699 100644 --- a/packages/middleware-compression/src/getCompressionPlugin.spec.ts +++ b/packages/middleware-compression/src/getCompressionPlugin.spec.ts @@ -1,4 +1,4 @@ -import { test as it, vi, describe, expect } from "vitest"; +import { describe, expect,test as it, vi } from "vitest"; import { compressionMiddleware, compressionMiddlewareOptions } from "./compressionMiddleware"; import { getCompressionPlugin } from "./getCompressionPlugin"; diff --git a/packages/middleware-compression/src/getCompressionPlugin.ts b/packages/middleware-compression/src/getCompressionPlugin.ts index 37557b17065..26426279ea4 100644 --- a/packages/middleware-compression/src/getCompressionPlugin.ts +++ b/packages/middleware-compression/src/getCompressionPlugin.ts @@ -1,11 +1,12 @@ -import { Pluggable } from "@smithy/types"; +import type { Pluggable } from "@smithy/types"; +import type { + CompressionMiddlewareConfig} from "./compressionMiddleware"; import { compressionMiddleware, - CompressionMiddlewareConfig, compressionMiddlewareOptions, } from "./compressionMiddleware"; -import { CompressionPreviouslyResolved, CompressionResolvedConfig } from "./configurations"; +import type { CompressionPreviouslyResolved, CompressionResolvedConfig } from "./configurations"; /** * @internal diff --git a/packages/middleware-compression/src/isStreaming.spec.ts b/packages/middleware-compression/src/isStreaming.spec.ts index b71dd0c940b..681b4f17d60 100644 --- a/packages/middleware-compression/src/isStreaming.spec.ts +++ b/packages/middleware-compression/src/isStreaming.spec.ts @@ -1,6 +1,5 @@ -import { test as it, vi, beforeEach, afterEach, describe, expect } from "vitest"; - import { isArrayBuffer } from "@smithy/is-array-buffer"; +import { afterEach, beforeEach, describe, expect,test as it, vi } from "vitest"; import { isStreaming } from "./isStreaming"; diff --git a/packages/middleware-compression/src/resolveCompressionConfig.spec.ts b/packages/middleware-compression/src/resolveCompressionConfig.spec.ts index 6923c9bc731..607bef6730d 100644 --- a/packages/middleware-compression/src/resolveCompressionConfig.spec.ts +++ b/packages/middleware-compression/src/resolveCompressionConfig.spec.ts @@ -1,4 +1,4 @@ -import { test as it, vi, describe, expect } from "vitest"; +import { describe, expect,test as it, vi } from "vitest"; import { resolveCompressionConfig } from "./resolveCompressionConfig"; diff --git a/packages/middleware-compression/src/resolveCompressionConfig.ts b/packages/middleware-compression/src/resolveCompressionConfig.ts index cfc9c8b2e03..b7c3a2eabee 100644 --- a/packages/middleware-compression/src/resolveCompressionConfig.ts +++ b/packages/middleware-compression/src/resolveCompressionConfig.ts @@ -1,6 +1,6 @@ import { normalizeProvider } from "@smithy/util-middleware"; -import { CompressionInputConfig, CompressionResolvedConfig } from "./configurations"; +import type { CompressionInputConfig, CompressionResolvedConfig } from "./configurations"; /** * @internal diff --git a/packages/middleware-content-length/src/index.ts b/packages/middleware-content-length/src/index.ts index a7e6fd93f02..812980c9b78 100644 --- a/packages/middleware-content-length/src/index.ts +++ b/packages/middleware-content-length/src/index.ts @@ -1,5 +1,5 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { +import type { BodyLengthCalculator, BuildHandler, BuildHandlerArguments, diff --git a/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.spec.ts b/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.spec.ts index e34401d1876..1c7e6a06bd1 100644 --- a/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.spec.ts +++ b/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.spec.ts @@ -1,4 +1,4 @@ -import { Endpoint } from "@smithy/types"; +import type { Endpoint } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { createConfigValueProvider } from "./createConfigValueProvider"; diff --git a/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.ts b/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.ts index 8a9ce4b423f..b6197422d6f 100644 --- a/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.ts +++ b/packages/middleware-endpoint/src/adaptors/createConfigValueProvider.ts @@ -1,4 +1,4 @@ -import { Endpoint, EndpointV2 } from "@smithy/types"; +import type { Endpoint, EndpointV2 } from "@smithy/types"; /** * Normalize some key of the client config to an async provider. diff --git a/packages/middleware-endpoint/src/adaptors/getEndpointFromInstructions.ts b/packages/middleware-endpoint/src/adaptors/getEndpointFromInstructions.ts index 0889ea27151..4c3be0f276b 100644 --- a/packages/middleware-endpoint/src/adaptors/getEndpointFromInstructions.ts +++ b/packages/middleware-endpoint/src/adaptors/getEndpointFromInstructions.ts @@ -1,8 +1,8 @@ -import { EndpointParameters, EndpointV2, HandlerExecutionContext } from "@smithy/types"; +import type { EndpointParameters, EndpointV2, HandlerExecutionContext } from "@smithy/types"; -import { EndpointResolvedConfig } from "../resolveEndpointConfig"; +import type { EndpointResolvedConfig } from "../resolveEndpointConfig"; import { resolveParamsForS3 } from "../service-customizations"; -import { EndpointParameterInstructions } from "../types"; +import type { EndpointParameterInstructions } from "../types"; import { createConfigValueProvider } from "./createConfigValueProvider"; import { getEndpointFromConfig } from "./getEndpointFromConfig"; import { toEndpointV1 } from "./toEndpointV1"; diff --git a/packages/middleware-endpoint/src/adaptors/getEndpointUrlConfig.ts b/packages/middleware-endpoint/src/adaptors/getEndpointUrlConfig.ts index c045529ad6e..182b1ec4f1d 100644 --- a/packages/middleware-endpoint/src/adaptors/getEndpointUrlConfig.ts +++ b/packages/middleware-endpoint/src/adaptors/getEndpointUrlConfig.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import { CONFIG_PREFIX_SEPARATOR } from "@smithy/shared-ini-file-loader"; const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; diff --git a/packages/middleware-endpoint/src/adaptors/toEndpointV1.ts b/packages/middleware-endpoint/src/adaptors/toEndpointV1.ts index 171c7edb26f..dbbb238afcb 100644 --- a/packages/middleware-endpoint/src/adaptors/toEndpointV1.ts +++ b/packages/middleware-endpoint/src/adaptors/toEndpointV1.ts @@ -1,4 +1,4 @@ -import { Endpoint, EndpointV2 } from "@smithy/types"; +import type { Endpoint, EndpointV2 } from "@smithy/types"; import { parseUrl } from "@smithy/url-parser"; /** diff --git a/packages/middleware-endpoint/src/endpointMiddleware.ts b/packages/middleware-endpoint/src/endpointMiddleware.ts index 0b7b1066049..745bcc1b219 100644 --- a/packages/middleware-endpoint/src/endpointMiddleware.ts +++ b/packages/middleware-endpoint/src/endpointMiddleware.ts @@ -1,5 +1,5 @@ import { setFeature } from "@smithy/core"; -import { +import type { AuthScheme, EndpointParameters, EndpointV2, @@ -14,8 +14,8 @@ import { import { getSmithyContext } from "@smithy/util-middleware"; import { getEndpointFromInstructions } from "./adaptors/getEndpointFromInstructions"; -import { EndpointResolvedConfig } from "./resolveEndpointConfig"; -import { EndpointParameterInstructions } from "./types"; +import type { EndpointResolvedConfig } from "./resolveEndpointConfig"; +import type { EndpointParameterInstructions } from "./types"; /** * @internal diff --git a/packages/middleware-endpoint/src/getEndpointPlugin.ts b/packages/middleware-endpoint/src/getEndpointPlugin.ts index 8dcdd1b1445..ba21bc80567 100644 --- a/packages/middleware-endpoint/src/getEndpointPlugin.ts +++ b/packages/middleware-endpoint/src/getEndpointPlugin.ts @@ -1,9 +1,9 @@ import { serializerMiddlewareOption } from "@smithy/middleware-serde"; -import { EndpointParameters, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import type { EndpointParameters, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; import { endpointMiddleware } from "./endpointMiddleware"; -import { EndpointResolvedConfig } from "./resolveEndpointConfig"; -import { EndpointParameterInstructions } from "./types"; +import type { EndpointResolvedConfig } from "./resolveEndpointConfig"; +import type { EndpointParameterInstructions } from "./types"; /** * @internal diff --git a/packages/middleware-endpoint/src/resolveEndpointConfig.ts b/packages/middleware-endpoint/src/resolveEndpointConfig.ts index bbc3dd14bf2..25c0a135470 100644 --- a/packages/middleware-endpoint/src/resolveEndpointConfig.ts +++ b/packages/middleware-endpoint/src/resolveEndpointConfig.ts @@ -1,4 +1,4 @@ -import { Endpoint, EndpointParameters, EndpointV2, Logger, Provider, UrlParser } from "@smithy/types"; +import type { Endpoint, EndpointParameters, EndpointV2, Logger, Provider, UrlParser } from "@smithy/types"; import { normalizeProvider } from "@smithy/util-middleware"; import { getEndpointFromConfig } from "./adaptors/getEndpointFromConfig"; diff --git a/packages/middleware-endpoint/src/resolveEndpointRequiredConfig.ts b/packages/middleware-endpoint/src/resolveEndpointRequiredConfig.ts index cdc95aa5b60..68df2b3cf72 100644 --- a/packages/middleware-endpoint/src/resolveEndpointRequiredConfig.ts +++ b/packages/middleware-endpoint/src/resolveEndpointRequiredConfig.ts @@ -1,4 +1,4 @@ -import { Endpoint, EndpointV2, Provider } from "@smithy/types"; +import type { Endpoint, EndpointV2, Provider } from "@smithy/types"; /** * This is an additional config resolver layer for clients using the default diff --git a/packages/middleware-endpoint/src/service-customizations/s3.ts b/packages/middleware-endpoint/src/service-customizations/s3.ts index fbf15633a73..8a5431c4bad 100644 --- a/packages/middleware-endpoint/src/service-customizations/s3.ts +++ b/packages/middleware-endpoint/src/service-customizations/s3.ts @@ -1,4 +1,4 @@ -import { EndpointParameters } from "@smithy/types"; +import type { EndpointParameters } from "@smithy/types"; /** * @internal diff --git a/packages/middleware-retry/src/AdaptiveRetryStrategy.spec.ts b/packages/middleware-retry/src/AdaptiveRetryStrategy.spec.ts index 8320881788c..ab5c5ed0617 100644 --- a/packages/middleware-retry/src/AdaptiveRetryStrategy.spec.ts +++ b/packages/middleware-retry/src/AdaptiveRetryStrategy.spec.ts @@ -1,9 +1,10 @@ -import { DefaultRateLimiter, RateLimiter, RETRY_MODES } from "@smithy/util-retry"; +import type { RateLimiter } from "@smithy/util-retry"; +import { DefaultRateLimiter, RETRY_MODES } from "@smithy/util-retry"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { AdaptiveRetryStrategy } from "./AdaptiveRetryStrategy"; import { StandardRetryStrategy } from "./StandardRetryStrategy"; -import { RetryQuota } from "./types"; +import type { RetryQuota } from "./types"; vi.mock("./StandardRetryStrategy"); vi.mock("@smithy/util-retry"); diff --git a/packages/middleware-retry/src/AdaptiveRetryStrategy.ts b/packages/middleware-retry/src/AdaptiveRetryStrategy.ts index 0c96b2f01ad..86e57684663 100644 --- a/packages/middleware-retry/src/AdaptiveRetryStrategy.ts +++ b/packages/middleware-retry/src/AdaptiveRetryStrategy.ts @@ -1,7 +1,9 @@ -import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider } from "@smithy/types"; -import { DefaultRateLimiter, RateLimiter, RETRY_MODES } from "@smithy/util-retry"; +import type { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider } from "@smithy/types"; +import type { RateLimiter } from "@smithy/util-retry"; +import { DefaultRateLimiter, RETRY_MODES } from "@smithy/util-retry"; -import { StandardRetryStrategy, StandardRetryStrategyOptions } from "./StandardRetryStrategy"; +import type { StandardRetryStrategyOptions } from "./StandardRetryStrategy"; +import { StandardRetryStrategy } from "./StandardRetryStrategy"; /** * @public diff --git a/packages/middleware-retry/src/StandardRetryStrategy.spec.ts b/packages/middleware-retry/src/StandardRetryStrategy.spec.ts index 1c5a59c7af1..393806643fe 100644 --- a/packages/middleware-retry/src/StandardRetryStrategy.spec.ts +++ b/packages/middleware-retry/src/StandardRetryStrategy.spec.ts @@ -14,7 +14,7 @@ import { getDefaultRetryQuota } from "./defaultRetryQuota"; import { defaultDelayDecider } from "./delayDecider"; import { defaultRetryDecider } from "./retryDecider"; import { StandardRetryStrategy } from "./StandardRetryStrategy"; -import { RetryQuota } from "./types"; +import type { RetryQuota } from "./types"; vi.mock("@smithy/service-error-classification"); vi.mock("./delayDecider"); diff --git a/packages/middleware-retry/src/StandardRetryStrategy.ts b/packages/middleware-retry/src/StandardRetryStrategy.ts index 74d265fbe4f..2b2ff8d5fd3 100644 --- a/packages/middleware-retry/src/StandardRetryStrategy.ts +++ b/packages/middleware-retry/src/StandardRetryStrategy.ts @@ -1,7 +1,7 @@ import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { isThrottlingError } from "@smithy/service-error-classification"; -import { SdkError } from "@smithy/types"; -import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider, RetryStrategy } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; +import type { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider, RetryStrategy } from "@smithy/types"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_DELAY_BASE, @@ -16,7 +16,7 @@ import { v4 } from "uuid"; import { getDefaultRetryQuota } from "./defaultRetryQuota"; import { defaultDelayDecider } from "./delayDecider"; import { defaultRetryDecider } from "./retryDecider"; -import { DelayDecider, RetryDecider, RetryQuota } from "./types"; +import type { DelayDecider, RetryDecider, RetryQuota } from "./types"; import { asSdkError } from "./util"; /** diff --git a/packages/middleware-retry/src/configurations.ts b/packages/middleware-retry/src/configurations.ts index 5a98a313a09..d4fa987a19f 100644 --- a/packages/middleware-retry/src/configurations.ts +++ b/packages/middleware-retry/src/configurations.ts @@ -1,5 +1,5 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; -import { Provider, RetryStrategy, RetryStrategyV2 } from "@smithy/types"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { Provider, RetryStrategy, RetryStrategyV2 } from "@smithy/types"; import { normalizeProvider } from "@smithy/util-middleware"; import { AdaptiveRetryStrategy, diff --git a/packages/middleware-retry/src/defaultRetryQuota.spec.ts b/packages/middleware-retry/src/defaultRetryQuota.spec.ts index 40afcdca047..72f8c8927a9 100644 --- a/packages/middleware-retry/src/defaultRetryQuota.spec.ts +++ b/packages/middleware-retry/src/defaultRetryQuota.spec.ts @@ -1,4 +1,4 @@ -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; import { INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT, RETRY_COST, TIMEOUT_RETRY_COST } from "@smithy/util-retry"; import { describe, expect, test as it } from "vitest"; diff --git a/packages/middleware-retry/src/defaultRetryQuota.ts b/packages/middleware-retry/src/defaultRetryQuota.ts index eb5c5a4f36c..3b0b50d040d 100644 --- a/packages/middleware-retry/src/defaultRetryQuota.ts +++ b/packages/middleware-retry/src/defaultRetryQuota.ts @@ -1,7 +1,7 @@ -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; import { NO_RETRY_INCREMENT, RETRY_COST, TIMEOUT_RETRY_COST } from "@smithy/util-retry"; -import { RetryQuota } from "./types"; +import type { RetryQuota } from "./types"; /** * @internal diff --git a/packages/middleware-retry/src/omitRetryHeadersMiddleware.spec.ts b/packages/middleware-retry/src/omitRetryHeadersMiddleware.spec.ts index ba5a83a9957..474a2a5165e 100644 --- a/packages/middleware-retry/src/omitRetryHeadersMiddleware.spec.ts +++ b/packages/middleware-retry/src/omitRetryHeadersMiddleware.spec.ts @@ -1,5 +1,5 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { FinalizeHandlerArguments, MiddlewareStack } from "@smithy/types"; +import type { FinalizeHandlerArguments, MiddlewareStack } from "@smithy/types"; import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry"; import { afterEach, describe, expect, test as it, vi } from "vitest"; diff --git a/packages/middleware-retry/src/omitRetryHeadersMiddleware.ts b/packages/middleware-retry/src/omitRetryHeadersMiddleware.ts index 174de4f8941..78bd8fc2edd 100644 --- a/packages/middleware-retry/src/omitRetryHeadersMiddleware.ts +++ b/packages/middleware-retry/src/omitRetryHeadersMiddleware.ts @@ -1,5 +1,5 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { +import type { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, diff --git a/packages/middleware-retry/src/retryDecider.spec.ts b/packages/middleware-retry/src/retryDecider.spec.ts index 0120d49149c..12f81de7164 100644 --- a/packages/middleware-retry/src/retryDecider.spec.ts +++ b/packages/middleware-retry/src/retryDecider.spec.ts @@ -4,7 +4,7 @@ import { isThrottlingError, isTransientError, } from "@smithy/service-error-classification"; -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { defaultRetryDecider } from "./retryDecider"; diff --git a/packages/middleware-retry/src/retryDecider.ts b/packages/middleware-retry/src/retryDecider.ts index b2957a7a9c8..01bc09f22c7 100644 --- a/packages/middleware-retry/src/retryDecider.ts +++ b/packages/middleware-retry/src/retryDecider.ts @@ -4,7 +4,7 @@ import { isThrottlingError, isTransientError, } from "@smithy/service-error-classification"; -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; /** * @internal diff --git a/packages/middleware-retry/src/retryMiddleware.spec.ts b/packages/middleware-retry/src/retryMiddleware.spec.ts index f13081505a2..0ec5a947204 100644 --- a/packages/middleware-retry/src/retryMiddleware.spec.ts +++ b/packages/middleware-retry/src/retryMiddleware.spec.ts @@ -1,6 +1,6 @@ import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { isServerError, isThrottlingError, isTransientError } from "@smithy/service-error-classification"; -import { FinalizeHandlerArguments, HandlerExecutionContext, MiddlewareStack } from "@smithy/types"; +import type { FinalizeHandlerArguments, HandlerExecutionContext, MiddlewareStack } from "@smithy/types"; import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry"; import { v4 } from "uuid"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; diff --git a/packages/middleware-retry/src/retryMiddleware.ts b/packages/middleware-retry/src/retryMiddleware.ts index bde5cf3000c..c0a3a6ad838 100644 --- a/packages/middleware-retry/src/retryMiddleware.ts +++ b/packages/middleware-retry/src/retryMiddleware.ts @@ -1,7 +1,7 @@ import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { isServerError, isThrottlingError, isTransientError } from "@smithy/service-error-classification"; import { NoOpLogger } from "@smithy/smithy-client"; -import { +import type { AbsoluteLocation, FinalizeHandler, FinalizeHandlerArguments, @@ -20,7 +20,7 @@ import { import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry"; import { v4 } from "uuid"; -import { RetryResolvedConfig } from "./configurations"; +import type { RetryResolvedConfig } from "./configurations"; import { isStreamingPayload } from "./isStreamingPayload/isStreamingPayload"; import { asSdkError } from "./util"; diff --git a/packages/middleware-retry/src/types.ts b/packages/middleware-retry/src/types.ts index ef5c1b1b065..4f6176d702f 100644 --- a/packages/middleware-retry/src/types.ts +++ b/packages/middleware-retry/src/types.ts @@ -1,4 +1,4 @@ -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; /** * Determines whether an error is retryable based on the number of retries diff --git a/packages/middleware-retry/src/util.ts b/packages/middleware-retry/src/util.ts index 93f0c6c51ee..e93f5653013 100644 --- a/packages/middleware-retry/src/util.ts +++ b/packages/middleware-retry/src/util.ts @@ -1,4 +1,4 @@ -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; export const asSdkError = (error: unknown): SdkError => { if (error instanceof Error) return error; diff --git a/packages/middleware-serde/src/deserializerMiddleware.spec.ts b/packages/middleware-serde/src/deserializerMiddleware.spec.ts index 0541c5bf317..4d6693d012a 100644 --- a/packages/middleware-serde/src/deserializerMiddleware.spec.ts +++ b/packages/middleware-serde/src/deserializerMiddleware.spec.ts @@ -1,5 +1,5 @@ import { HttpResponse } from "@smithy/protocol-http"; -import { EndpointBearer, SerdeFunctions } from "@smithy/types"; +import type { EndpointBearer, SerdeFunctions } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { deserializerMiddleware } from "./deserializerMiddleware"; diff --git a/packages/middleware-serde/src/deserializerMiddleware.ts b/packages/middleware-serde/src/deserializerMiddleware.ts index 6e11ee84f12..a5e5ae571a0 100644 --- a/packages/middleware-serde/src/deserializerMiddleware.ts +++ b/packages/middleware-serde/src/deserializerMiddleware.ts @@ -1,5 +1,5 @@ import { HttpResponse } from "@smithy/protocol-http"; -import { +import type { DeserializeHandler, DeserializeHandlerArguments, DeserializeHandlerOutput, diff --git a/packages/middleware-serde/src/serdePlugin.ts b/packages/middleware-serde/src/serdePlugin.ts index fb40c1d502d..378a872251a 100644 --- a/packages/middleware-serde/src/serdePlugin.ts +++ b/packages/middleware-serde/src/serdePlugin.ts @@ -1,4 +1,4 @@ -import { +import type { DeserializeHandlerOptions, Endpoint, MetadataBearer, diff --git a/packages/middleware-serde/src/serializerMiddleware.spec.ts b/packages/middleware-serde/src/serializerMiddleware.spec.ts index 3e2977f89f7..5af19cd26e7 100644 --- a/packages/middleware-serde/src/serializerMiddleware.spec.ts +++ b/packages/middleware-serde/src/serializerMiddleware.spec.ts @@ -1,4 +1,4 @@ -import { EndpointBearer, SerdeFunctions } from "@smithy/types"; +import type { EndpointBearer, SerdeFunctions } from "@smithy/types"; import { beforeEach, describe, expect, test as it, vi } from "vitest"; import { serializerMiddleware } from "./serializerMiddleware"; diff --git a/packages/middleware-serde/src/serializerMiddleware.ts b/packages/middleware-serde/src/serializerMiddleware.ts index 917ff41841d..50a43bb262a 100644 --- a/packages/middleware-serde/src/serializerMiddleware.ts +++ b/packages/middleware-serde/src/serializerMiddleware.ts @@ -1,4 +1,4 @@ -import { +import type { Endpoint, HandlerExecutionContext, Provider, diff --git a/packages/middleware-stack/src/MiddlewareStack.spec.ts b/packages/middleware-stack/src/MiddlewareStack.spec.ts index d3c8ce7a3c8..28aaa4a2c6f 100644 --- a/packages/middleware-stack/src/MiddlewareStack.spec.ts +++ b/packages/middleware-stack/src/MiddlewareStack.spec.ts @@ -1,4 +1,4 @@ -import { +import type { DeserializeHandlerArguments, DeserializeMiddleware, FinalizeHandler, diff --git a/packages/middleware-stack/src/MiddlewareStack.ts b/packages/middleware-stack/src/MiddlewareStack.ts index d80c7a6c8ce..72dc9524f25 100644 --- a/packages/middleware-stack/src/MiddlewareStack.ts +++ b/packages/middleware-stack/src/MiddlewareStack.ts @@ -1,4 +1,4 @@ -import { +import type { AbsoluteLocation, DeserializeHandler, Handler, @@ -13,7 +13,7 @@ import { Step, } from "@smithy/types"; -import { AbsoluteMiddlewareEntry, MiddlewareEntry, Normalized, RelativeMiddlewareEntry } from "./types"; +import type { AbsoluteMiddlewareEntry, MiddlewareEntry, Normalized, RelativeMiddlewareEntry } from "./types"; const getAllAliases = (name: string | undefined, aliases: Array | undefined) => { const _aliases = []; diff --git a/packages/middleware-stack/src/types.ts b/packages/middleware-stack/src/types.ts index 129d6901f72..3995c1bce9a 100644 --- a/packages/middleware-stack/src/types.ts +++ b/packages/middleware-stack/src/types.ts @@ -1,4 +1,4 @@ -import { AbsoluteLocation, HandlerOptions, MiddlewareType, Priority, RelativeLocation, Step } from "@smithy/types"; +import type { AbsoluteLocation, HandlerOptions, MiddlewareType, Priority, RelativeLocation, Step } from "@smithy/types"; export interface MiddlewareEntry extends HandlerOptions { middleware: MiddlewareType; diff --git a/packages/node-config-provider/src/configLoader.spec.ts b/packages/node-config-provider/src/configLoader.spec.ts index e37a112297d..30c94467bbf 100644 --- a/packages/node-config-provider/src/configLoader.spec.ts +++ b/packages/node-config-provider/src/configLoader.spec.ts @@ -1,10 +1,11 @@ import { chain, fromStatic, memoize } from "@smithy/property-provider"; -import { Profile } from "@smithy/types"; +import type { Profile } from "@smithy/types"; import { afterEach, describe, expect, test as it, vi } from "vitest"; import { loadConfig } from "./configLoader"; import { fromEnv } from "./fromEnv"; -import { fromSharedConfigFiles, SharedConfigInit } from "./fromSharedConfigFiles"; +import type { SharedConfigInit } from "./fromSharedConfigFiles"; +import { fromSharedConfigFiles } from "./fromSharedConfigFiles"; vi.mock("./fromEnv"); vi.mock("./fromSharedConfigFiles"); diff --git a/packages/node-config-provider/src/configLoader.ts b/packages/node-config-provider/src/configLoader.ts index 741166c84d2..15a9dc8f50c 100644 --- a/packages/node-config-provider/src/configLoader.ts +++ b/packages/node-config-provider/src/configLoader.ts @@ -1,9 +1,12 @@ import { chain, memoize } from "@smithy/property-provider"; -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; -import { EnvOptions, fromEnv, GetterFromEnv } from "./fromEnv"; -import { fromSharedConfigFiles, GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles"; -import { fromStatic, FromStaticConfig } from "./fromStatic"; +import type { EnvOptions, GetterFromEnv } from "./fromEnv"; +import { fromEnv } from "./fromEnv"; +import type { GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles"; +import { fromSharedConfigFiles } from "./fromSharedConfigFiles"; +import type { FromStaticConfig } from "./fromStatic"; +import { fromStatic } from "./fromStatic"; /** * @internal diff --git a/packages/node-config-provider/src/fromEnv.ts b/packages/node-config-provider/src/fromEnv.ts index ce3754f2e3e..7d8ec305d44 100644 --- a/packages/node-config-provider/src/fromEnv.ts +++ b/packages/node-config-provider/src/fromEnv.ts @@ -1,5 +1,5 @@ import { CredentialsProviderError } from "@smithy/property-provider"; -import { Logger, Provider } from "@smithy/types"; +import type { Logger, Provider } from "@smithy/types"; import { getSelectorName } from "./getSelectorName"; diff --git a/packages/node-config-provider/src/fromSharedConfigFiles.spec.ts b/packages/node-config-provider/src/fromSharedConfigFiles.spec.ts index 72c257f72ef..ec6a17d3e93 100644 --- a/packages/node-config-provider/src/fromSharedConfigFiles.spec.ts +++ b/packages/node-config-provider/src/fromSharedConfigFiles.spec.ts @@ -1,9 +1,10 @@ import { CredentialsProviderError } from "@smithy/property-provider"; import { getProfileName, loadSharedConfigFiles } from "@smithy/shared-ini-file-loader"; -import { ParsedIniData, Profile } from "@smithy/types"; +import type { ParsedIniData, Profile } from "@smithy/types"; import { beforeEach, describe, expect, test as it, vi } from "vitest"; -import { fromSharedConfigFiles, GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles"; +import type { GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles"; +import { fromSharedConfigFiles } from "./fromSharedConfigFiles"; vi.mock("@smithy/shared-ini-file-loader", () => ({ getProfileName: vi.fn(), diff --git a/packages/node-config-provider/src/fromSharedConfigFiles.ts b/packages/node-config-provider/src/fromSharedConfigFiles.ts index 8b999dbd487..9964be1eeb5 100644 --- a/packages/node-config-provider/src/fromSharedConfigFiles.ts +++ b/packages/node-config-provider/src/fromSharedConfigFiles.ts @@ -1,6 +1,7 @@ import { CredentialsProviderError } from "@smithy/property-provider"; -import { getProfileName, loadSharedConfigFiles, SourceProfileInit } from "@smithy/shared-ini-file-loader"; -import { ParsedIniData, Profile, Provider } from "@smithy/types"; +import type { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { getProfileName, loadSharedConfigFiles } from "@smithy/shared-ini-file-loader"; +import type { ParsedIniData, Profile, Provider } from "@smithy/types"; import { getSelectorName } from "./getSelectorName"; diff --git a/packages/node-config-provider/src/fromStatic.ts b/packages/node-config-provider/src/fromStatic.ts index 28f4fe846c1..ff567252c23 100644 --- a/packages/node-config-provider/src/fromStatic.ts +++ b/packages/node-config-provider/src/fromStatic.ts @@ -1,5 +1,5 @@ import { fromStatic as convertToProvider } from "@smithy/property-provider"; -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; /** * @internal diff --git a/packages/node-http-handler/src/get-transformed-headers.ts b/packages/node-http-handler/src/get-transformed-headers.ts index 51dd29fb48c..d4fba8be7fd 100644 --- a/packages/node-http-handler/src/get-transformed-headers.ts +++ b/packages/node-http-handler/src/get-transformed-headers.ts @@ -1,5 +1,5 @@ -import { HeaderBag } from "@smithy/types"; -import { IncomingHttpHeaders } from "http2"; +import type { HeaderBag } from "@smithy/types"; +import type { IncomingHttpHeaders } from "http2"; const getTransformedHeaders = (headers: IncomingHttpHeaders) => { const transformedHeaders: HeaderBag = {}; diff --git a/packages/node-http-handler/src/node-http-handler.mock-server.spec.ts b/packages/node-http-handler/src/node-http-handler.mock-server.spec.ts index 1280c5eba99..e35f53a5555 100644 --- a/packages/node-http-handler/src/node-http-handler.mock-server.spec.ts +++ b/packages/node-http-handler/src/node-http-handler.mock-server.spec.ts @@ -1,8 +1,10 @@ import { AbortController } from "@smithy/abort-controller"; import { HttpRequest } from "@smithy/protocol-http"; -import http, { Server as HttpServer } from "http"; -import https, { Server as HttpsServer } from "https"; -import { AddressInfo } from "net"; +import type { Server as HttpServer } from "http"; +import http from "http"; +import type { Server as HttpsServer } from "https"; +import https from "https"; +import type { AddressInfo } from "net"; import { afterAll, afterEach, beforeAll, describe, expect, test as it, vi } from "vitest"; import { NodeHttpHandler } from "./node-http-handler"; diff --git a/packages/node-http-handler/src/node-http-handler.ts b/packages/node-http-handler/src/node-http-handler.ts index ec008d358a8..adad3b87bae 100644 --- a/packages/node-http-handler/src/node-http-handler.ts +++ b/packages/node-http-handler/src/node-http-handler.ts @@ -1,9 +1,11 @@ -import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { HttpHandler, HttpRequest } from "@smithy/protocol-http"; +import { HttpResponse } from "@smithy/protocol-http"; import { buildQueryString } from "@smithy/querystring-builder"; import type { Logger, NodeHttpHandlerOptions } from "@smithy/types"; -import { HttpHandlerOptions, Provider } from "@smithy/types"; +import type { HttpHandlerOptions, Provider } from "@smithy/types"; import { Agent as hAgent, request as hRequest } from "http"; -import { Agent as hsAgent, request as hsRequest, RequestOptions } from "https"; +import type { RequestOptions } from "https"; +import { Agent as hsAgent, request as hsRequest } from "https"; import { NODEJS_TIMEOUT_ERROR_CODES } from "./constants"; import { getTransformedHeaders } from "./get-transformed-headers"; diff --git a/packages/node-http-handler/src/node-http2-connection-manager.ts b/packages/node-http-handler/src/node-http2-connection-manager.ts index 130e3084710..bd26c82be59 100644 --- a/packages/node-http-handler/src/node-http2-connection-manager.ts +++ b/packages/node-http-handler/src/node-http2-connection-manager.ts @@ -1,7 +1,8 @@ -import { RequestContext } from "@smithy/types"; -import { ConnectConfiguration } from "@smithy/types"; -import { ConnectionManager, ConnectionManagerConfiguration } from "@smithy/types"; -import http2, { ClientHttp2Session } from "http2"; +import type { RequestContext } from "@smithy/types"; +import type { ConnectConfiguration } from "@smithy/types"; +import type { ConnectionManager, ConnectionManagerConfiguration } from "@smithy/types"; +import type { ClientHttp2Session } from "http2"; +import http2 from "http2"; import { NodeHttp2ConnectionPool } from "./node-http2-connection-pool"; diff --git a/packages/node-http-handler/src/node-http2-connection-pool.ts b/packages/node-http-handler/src/node-http2-connection-pool.ts index 3afb4961f38..76965831789 100644 --- a/packages/node-http-handler/src/node-http2-connection-pool.ts +++ b/packages/node-http-handler/src/node-http2-connection-pool.ts @@ -1,5 +1,5 @@ -import { ConnectionPool } from "@smithy/types"; -import { ClientHttp2Session } from "http2"; +import type { ConnectionPool } from "@smithy/types"; +import type { ClientHttp2Session } from "http2"; export class NodeHttp2ConnectionPool implements ConnectionPool { private sessions: ClientHttp2Session[] = []; diff --git a/packages/node-http-handler/src/node-http2-handler.spec.ts b/packages/node-http-handler/src/node-http2-handler.spec.ts index 85114b95d05..a20b1127ec9 100644 --- a/packages/node-http-handler/src/node-http2-handler.spec.ts +++ b/packages/node-http-handler/src/node-http2-handler.spec.ts @@ -1,15 +1,18 @@ import { AbortController } from "@smithy/abort-controller"; -import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { Mutable } from "@smithy/types"; +import type { HttpResponse } from "@smithy/protocol-http"; +import { HttpRequest } from "@smithy/protocol-http"; +import type { Mutable } from "@smithy/types"; import { rejects } from "assert"; import getPort, { portNumbers } from "get-port"; -import http2, { ClientHttp2Session, ClientHttp2Stream, constants, Http2Server, Http2Session, Http2Stream } from "http2"; +import type { ClientHttp2Session, ClientHttp2Stream, Http2Server, Http2Session, Http2Stream } from "http2"; +import http2, { constants } from "http2"; import { Duplex } from "stream"; import { promisify } from "util"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { NodeHttp2ConnectionPool } from "./node-http2-connection-pool"; -import { NodeHttp2Handler, NodeHttp2HandlerOptions } from "./node-http2-handler"; +import type { NodeHttp2HandlerOptions } from "./node-http2-handler"; +import { NodeHttp2Handler } from "./node-http2-handler"; import { createMockHttp2Server, createResponseFunction, createResponseFunctionWithDelay } from "./server.mock"; import { timing } from "./timing"; diff --git a/packages/node-http-handler/src/node-http2-handler.ts b/packages/node-http-handler/src/node-http2-handler.ts index 822103a5d03..e195de4efee 100644 --- a/packages/node-http-handler/src/node-http2-handler.ts +++ b/packages/node-http-handler/src/node-http2-handler.ts @@ -1,7 +1,9 @@ -import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { HttpHandler, HttpRequest } from "@smithy/protocol-http"; +import { HttpResponse } from "@smithy/protocol-http"; import { buildQueryString } from "@smithy/querystring-builder"; -import { ConnectConfiguration, HttpHandlerOptions, Provider, RequestContext } from "@smithy/types"; -import { ClientHttp2Session, constants } from "http2"; +import type { ConnectConfiguration, HttpHandlerOptions, Provider, RequestContext } from "@smithy/types"; +import type { ClientHttp2Session } from "http2"; +import { constants } from "http2"; import { getTransformedHeaders } from "./get-transformed-headers"; import { NodeHttp2ConnectionManager } from "./node-http2-connection-manager"; diff --git a/packages/node-http-handler/src/readable.mock.ts b/packages/node-http-handler/src/readable.mock.ts index c8605e50cdd..91a7bb556e7 100644 --- a/packages/node-http-handler/src/readable.mock.ts +++ b/packages/node-http-handler/src/readable.mock.ts @@ -1,4 +1,5 @@ -import { Readable, ReadableOptions } from "stream"; +import type { ReadableOptions } from "stream"; +import { Readable } from "stream"; export interface ReadFromBuffersOptions extends ReadableOptions { buffers: Buffer[]; diff --git a/packages/node-http-handler/src/server.mock.ts b/packages/node-http-handler/src/server.mock.ts index a904cd0034e..7544c0edf68 100644 --- a/packages/node-http-handler/src/server.mock.ts +++ b/packages/node-http-handler/src/server.mock.ts @@ -1,8 +1,11 @@ -import { HeaderBag, HttpResponse, NodeJsRuntimeBlobTypes } from "@smithy/types"; +import type { HeaderBag, HttpResponse, NodeJsRuntimeBlobTypes } from "@smithy/types"; import { readFileSync } from "fs"; -import { createServer as createHttpServer, IncomingMessage, Server as HttpServer, ServerResponse } from "http"; -import { createServer as createHttp2Server, Http2Server } from "http2"; -import { createServer as createHttpsServer, Server as HttpsServer } from "https"; +import type { IncomingMessage, Server as HttpServer, ServerResponse } from "http"; +import { createServer as createHttpServer } from "http"; +import type { Http2Server } from "http2"; +import { createServer as createHttp2Server } from "http2"; +import type { Server as HttpsServer } from "https"; +import { createServer as createHttpsServer } from "https"; import { join } from "path"; import { Readable } from "stream"; diff --git a/packages/node-http-handler/src/set-connection-timeout.ts b/packages/node-http-handler/src/set-connection-timeout.ts index 7eed13c90cb..05211a0155e 100644 --- a/packages/node-http-handler/src/set-connection-timeout.ts +++ b/packages/node-http-handler/src/set-connection-timeout.ts @@ -1,4 +1,4 @@ -import { ClientRequest } from "http"; +import type { ClientRequest } from "http"; import { timing } from "./timing"; diff --git a/packages/node-http-handler/src/set-socket-keep-alive.spec.ts b/packages/node-http-handler/src/set-socket-keep-alive.spec.ts index 0666cc13f72..07bc355d24c 100644 --- a/packages/node-http-handler/src/set-socket-keep-alive.spec.ts +++ b/packages/node-http-handler/src/set-socket-keep-alive.spec.ts @@ -1,5 +1,5 @@ import { EventEmitter } from "events"; -import { ClientRequest } from "http"; +import type { ClientRequest } from "http"; import { Socket } from "net"; import { beforeEach, describe, expect, test as it, vi } from "vitest"; diff --git a/packages/node-http-handler/src/set-socket-keep-alive.ts b/packages/node-http-handler/src/set-socket-keep-alive.ts index bfdc2ea365d..39473a8c2af 100644 --- a/packages/node-http-handler/src/set-socket-keep-alive.ts +++ b/packages/node-http-handler/src/set-socket-keep-alive.ts @@ -1,4 +1,4 @@ -import { ClientRequest } from "http"; +import type { ClientRequest } from "http"; import { timing } from "./timing"; diff --git a/packages/node-http-handler/src/set-socket-timeout.ts b/packages/node-http-handler/src/set-socket-timeout.ts index 2cb756f5d71..02e0ef104df 100644 --- a/packages/node-http-handler/src/set-socket-timeout.ts +++ b/packages/node-http-handler/src/set-socket-timeout.ts @@ -1,4 +1,4 @@ -import { ClientRequest } from "http"; +import type { ClientRequest } from "http"; import { DEFAULT_REQUEST_TIMEOUT } from "./node-http-handler"; import { timing } from "./timing"; diff --git a/packages/node-http-handler/src/stream-collector/index.ts b/packages/node-http-handler/src/stream-collector/index.ts index 152854420da..a635ad74843 100644 --- a/packages/node-http-handler/src/stream-collector/index.ts +++ b/packages/node-http-handler/src/stream-collector/index.ts @@ -1,5 +1,5 @@ -import { StreamCollector } from "@smithy/types"; -import { Readable } from "stream"; +import type { StreamCollector } from "@smithy/types"; +import type { Readable } from "stream"; import type { ReadableStream as IReadableStream } from "stream/web"; import { Collector } from "./collector"; diff --git a/packages/node-http-handler/src/stream-collector/readable.mock.ts b/packages/node-http-handler/src/stream-collector/readable.mock.ts index eec3624809e..b526247821e 100644 --- a/packages/node-http-handler/src/stream-collector/readable.mock.ts +++ b/packages/node-http-handler/src/stream-collector/readable.mock.ts @@ -1,4 +1,5 @@ -import { Readable, ReadableOptions } from "stream"; +import type { ReadableOptions } from "stream"; +import { Readable } from "stream"; export interface ReadFromBuffersOptions extends ReadableOptions { buffers: Buffer[]; diff --git a/packages/node-http-handler/src/write-request-body.ts b/packages/node-http-handler/src/write-request-body.ts index d07281130e6..cc7d389b0af 100644 --- a/packages/node-http-handler/src/write-request-body.ts +++ b/packages/node-http-handler/src/write-request-body.ts @@ -1,6 +1,6 @@ -import { HttpRequest } from "@smithy/types"; -import { ClientRequest } from "http"; -import { ClientHttp2Stream } from "http2"; +import type { HttpRequest } from "@smithy/types"; +import type { ClientRequest } from "http"; +import type { ClientHttp2Stream } from "http2"; import { Readable } from "stream"; import { timing } from "./timing"; diff --git a/packages/property-provider/src/CredentialsProviderError.ts b/packages/property-provider/src/CredentialsProviderError.ts index 75067619f95..2d9098d2a3b 100644 --- a/packages/property-provider/src/CredentialsProviderError.ts +++ b/packages/property-provider/src/CredentialsProviderError.ts @@ -1,4 +1,5 @@ -import { ProviderError, ProviderErrorOptionsType } from "./ProviderError"; +import type { ProviderErrorOptionsType } from "./ProviderError"; +import { ProviderError } from "./ProviderError"; /** * @public diff --git a/packages/property-provider/src/ProviderError.ts b/packages/property-provider/src/ProviderError.ts index f239daf5c90..bed60fa11b6 100644 --- a/packages/property-provider/src/ProviderError.ts +++ b/packages/property-provider/src/ProviderError.ts @@ -1,4 +1,4 @@ -import { Logger } from "@smithy/types"; +import type { Logger } from "@smithy/types"; /** * @public diff --git a/packages/property-provider/src/TokenProviderError.ts b/packages/property-provider/src/TokenProviderError.ts index 6799830c7f0..48e7914f5e7 100644 --- a/packages/property-provider/src/TokenProviderError.ts +++ b/packages/property-provider/src/TokenProviderError.ts @@ -1,4 +1,5 @@ -import { ProviderError, ProviderErrorOptionsType } from "./ProviderError"; +import type { ProviderErrorOptionsType } from "./ProviderError"; +import { ProviderError } from "./ProviderError"; /** * @public diff --git a/packages/property-provider/src/chain.ts b/packages/property-provider/src/chain.ts index c4a379ce03f..420f7b85400 100755 --- a/packages/property-provider/src/chain.ts +++ b/packages/property-provider/src/chain.ts @@ -1,4 +1,4 @@ -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; import { ProviderError } from "./ProviderError"; diff --git a/packages/property-provider/src/fromStatic.ts b/packages/property-provider/src/fromStatic.ts index d8b9ee51db9..ec3d6301933 100644 --- a/packages/property-provider/src/fromStatic.ts +++ b/packages/property-provider/src/fromStatic.ts @@ -1,4 +1,4 @@ -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; /** * @internal diff --git a/packages/property-provider/src/memoize.spec.ts b/packages/property-provider/src/memoize.spec.ts index 634c5c7e1cf..d6adf8bf0aa 100644 --- a/packages/property-provider/src/memoize.spec.ts +++ b/packages/property-provider/src/memoize.spec.ts @@ -1,4 +1,5 @@ -import { afterEach, beforeEach, describe, expect, Mock, test as it, vi } from "vitest"; +import type { Mock } from "vitest"; +import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { memoize } from "./memoize"; diff --git a/packages/property-provider/src/memoize.ts b/packages/property-provider/src/memoize.ts index 4321a46d064..2d900414a01 100755 --- a/packages/property-provider/src/memoize.ts +++ b/packages/property-provider/src/memoize.ts @@ -1,4 +1,4 @@ -import { MemoizedProvider, Provider } from "@smithy/types"; +import type { MemoizedProvider, Provider } from "@smithy/types"; interface MemoizeOverload { /** diff --git a/packages/protocol-http/src/Field.ts b/packages/protocol-http/src/Field.ts index 8f1bc407c5b..70782fc64cd 100644 --- a/packages/protocol-http/src/Field.ts +++ b/packages/protocol-http/src/Field.ts @@ -1,4 +1,5 @@ -import { FieldOptions, FieldPosition } from "@smithy/types"; +import type { FieldOptions } from "@smithy/types"; +import { FieldPosition } from "@smithy/types"; /** * A name-value pair representing a single field diff --git a/packages/protocol-http/src/Fields.ts b/packages/protocol-http/src/Fields.ts index 8ca4e0a73df..e51af5fa010 100644 --- a/packages/protocol-http/src/Fields.ts +++ b/packages/protocol-http/src/Fields.ts @@ -1,6 +1,6 @@ -import { FieldPosition } from "@smithy/types"; +import type { FieldPosition } from "@smithy/types"; -import { Field } from "./Field"; +import type { Field } from "./Field"; export type FieldsOptions = { fields?: Field[]; encoding?: string }; diff --git a/packages/protocol-http/src/extensions/httpExtensionConfiguration.ts b/packages/protocol-http/src/extensions/httpExtensionConfiguration.ts index e4ba3b3ef71..74f81bc208d 100644 --- a/packages/protocol-http/src/extensions/httpExtensionConfiguration.ts +++ b/packages/protocol-http/src/extensions/httpExtensionConfiguration.ts @@ -1,4 +1,4 @@ -import { HttpHandler } from "../httpHandler"; +import type { HttpHandler } from "../httpHandler"; /** * @internal diff --git a/packages/protocol-http/src/httpRequest.spec.ts b/packages/protocol-http/src/httpRequest.spec.ts index 5c7c2680334..a071b98caa3 100644 --- a/packages/protocol-http/src/httpRequest.spec.ts +++ b/packages/protocol-http/src/httpRequest.spec.ts @@ -1,7 +1,8 @@ -import { QueryParameterBag } from "@smithy/types"; +import type { QueryParameterBag } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; -import { HttpRequest, IHttpRequest } from "./httpRequest"; +import type { IHttpRequest } from "./httpRequest"; +import { HttpRequest } from "./httpRequest"; describe("HttpRequest", () => { const httpRequest: IHttpRequest = { diff --git a/packages/protocol-http/src/httpRequest.ts b/packages/protocol-http/src/httpRequest.ts index 6c44bb977c9..8bd13d8fddc 100644 --- a/packages/protocol-http/src/httpRequest.ts +++ b/packages/protocol-http/src/httpRequest.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ -import { HeaderBag, HttpMessage, HttpRequest as IHttpRequest, QueryParameterBag, URI } from "@smithy/types"; +import type { HeaderBag, HttpMessage, QueryParameterBag, URI } from "@smithy/types"; +import { HttpRequest as IHttpRequest } from "@smithy/types"; type HttpRequestOptions = Partial & Partial & { method?: string }; diff --git a/packages/protocol-http/src/httpResponse.ts b/packages/protocol-http/src/httpResponse.ts index 5fe507777d3..024adeba14d 100644 --- a/packages/protocol-http/src/httpResponse.ts +++ b/packages/protocol-http/src/httpResponse.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ -import { HeaderBag, HttpMessage, HttpResponse as IHttpResponse } from "@smithy/types"; +import type { HeaderBag, HttpMessage, HttpResponse as IHttpResponse } from "@smithy/types"; type HttpResponseOptions = Partial & { statusCode: number; diff --git a/packages/protocol-http/src/types.ts b/packages/protocol-http/src/types.ts index d8b8899fc3e..323cb3be150 100644 --- a/packages/protocol-http/src/types.ts +++ b/packages/protocol-http/src/types.ts @@ -1,4 +1,4 @@ -import { +import type { FieldOptions as __FieldOptions, FieldPosition as __FieldPosition, HeaderBag as __HeaderBag, diff --git a/packages/querystring-builder/src/index.ts b/packages/querystring-builder/src/index.ts index 87598eb594b..d8f994a9a43 100644 --- a/packages/querystring-builder/src/index.ts +++ b/packages/querystring-builder/src/index.ts @@ -1,4 +1,4 @@ -import { QueryParameterBag } from "@smithy/types"; +import type { QueryParameterBag } from "@smithy/types"; import { escapeUri } from "@smithy/util-uri-escape"; /** diff --git a/packages/querystring-parser/src/index.spec.ts b/packages/querystring-parser/src/index.spec.ts index 3d8573e24eb..a1316f7feb7 100644 --- a/packages/querystring-parser/src/index.spec.ts +++ b/packages/querystring-parser/src/index.spec.ts @@ -1,4 +1,4 @@ -import { QueryParameterBag } from "@smithy/types"; +import type { QueryParameterBag } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { parseQueryString } from "./"; diff --git a/packages/querystring-parser/src/index.ts b/packages/querystring-parser/src/index.ts index 64d7f5dc97a..83e5fbcea03 100644 --- a/packages/querystring-parser/src/index.ts +++ b/packages/querystring-parser/src/index.ts @@ -1,4 +1,4 @@ -import { QueryParameterBag } from "@smithy/types"; +import type { QueryParameterBag } from "@smithy/types"; /** * @internal diff --git a/packages/service-client-documentation-generator/src/index.ts b/packages/service-client-documentation-generator/src/index.ts index 3da32d4b4c3..9ac5780d44f 100644 --- a/packages/service-client-documentation-generator/src/index.ts +++ b/packages/service-client-documentation-generator/src/index.ts @@ -1,4 +1,5 @@ -import { Application, ParameterType } from "typedoc"; +import type { Application } from "typedoc"; +import { ParameterType } from "typedoc"; import { SdkClientTocPlugin } from "./sdk-client-toc-plugin"; diff --git a/packages/service-client-documentation-generator/src/sdk-client-toc-plugin.ts b/packages/service-client-documentation-generator/src/sdk-client-toc-plugin.ts index 194cf52f2f9..92df67e37c3 100644 --- a/packages/service-client-documentation-generator/src/sdk-client-toc-plugin.ts +++ b/packages/service-client-documentation-generator/src/sdk-client-toc-plugin.ts @@ -1,19 +1,21 @@ import { dirname } from "path"; -import { - BindOption, - ContainerReflection, +import type { Context, - Converter, DeclarationReflection, Logger, Options, ProjectReflection, ReferenceType, + Renderer, +} from "typedoc"; +import { + BindOption, + ContainerReflection, + Converter, ReflectionCategory, ReflectionFlag, ReflectionGroup, ReflectionKind, - Renderer, } from "typedoc"; import { isClientModel } from "./utils"; diff --git a/packages/service-client-documentation-generator/src/utils.ts b/packages/service-client-documentation-generator/src/utils.ts index 2b007bcd44b..327b9da423e 100644 --- a/packages/service-client-documentation-generator/src/utils.ts +++ b/packages/service-client-documentation-generator/src/utils.ts @@ -1,5 +1,5 @@ import { sep } from "path"; -import { Reflection } from "typedoc"; +import type { Reflection } from "typedoc"; /** * @internal diff --git a/packages/service-error-classification/src/index.spec.ts b/packages/service-error-classification/src/index.spec.ts index 9effb09781c..ead2243257f 100644 --- a/packages/service-error-classification/src/index.spec.ts +++ b/packages/service-error-classification/src/index.spec.ts @@ -1,4 +1,4 @@ -import { RetryableTrait, SdkError } from "@smithy/types"; +import type { RetryableTrait, SdkError } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { diff --git a/packages/service-error-classification/src/index.ts b/packages/service-error-classification/src/index.ts index eeebbcaa849..d4a98484c21 100644 --- a/packages/service-error-classification/src/index.ts +++ b/packages/service-error-classification/src/index.ts @@ -1,4 +1,4 @@ -import { SdkError } from "@smithy/types"; +import type { SdkError } from "@smithy/types"; import { CLOCK_SKEW_ERROR_CODES, diff --git a/packages/shared-ini-file-loader/src/getConfigData.ts b/packages/shared-ini-file-loader/src/getConfigData.ts index 556c65fb913..8cc394f5398 100644 --- a/packages/shared-ini-file-loader/src/getConfigData.ts +++ b/packages/shared-ini-file-loader/src/getConfigData.ts @@ -1,4 +1,5 @@ -import { IniSectionType, ParsedIniData } from "@smithy/types"; +import type { ParsedIniData } from "@smithy/types"; +import { IniSectionType } from "@smithy/types"; import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles"; diff --git a/packages/shared-ini-file-loader/src/getHomeDir.spec.ts b/packages/shared-ini-file-loader/src/getHomeDir.spec.ts index 02280232d8e..0e78f337db2 100644 --- a/packages/shared-ini-file-loader/src/getHomeDir.spec.ts +++ b/packages/shared-ini-file-loader/src/getHomeDir.spec.ts @@ -1,6 +1,7 @@ import { homedir } from "os"; import { sep } from "path"; -import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, Mock, test as it, vi } from "vitest"; +import type { Mock } from "vitest"; +import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test as it, vi } from "vitest"; import { getHomeDir } from "./getHomeDir"; diff --git a/packages/shared-ini-file-loader/src/getSsoSessionData.ts b/packages/shared-ini-file-loader/src/getSsoSessionData.ts index f8400fe489c..827f534eecd 100644 --- a/packages/shared-ini-file-loader/src/getSsoSessionData.ts +++ b/packages/shared-ini-file-loader/src/getSsoSessionData.ts @@ -1,4 +1,5 @@ -import { IniSectionType, ParsedIniData } from "@smithy/types"; +import type { ParsedIniData } from "@smithy/types"; +import { IniSectionType } from "@smithy/types"; import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles"; diff --git a/packages/shared-ini-file-loader/src/loadSharedConfigFiles.ts b/packages/shared-ini-file-loader/src/loadSharedConfigFiles.ts index 35f36533873..cf10c46ec2a 100644 --- a/packages/shared-ini-file-loader/src/loadSharedConfigFiles.ts +++ b/packages/shared-ini-file-loader/src/loadSharedConfigFiles.ts @@ -1,4 +1,4 @@ -import { Logger, SharedConfigFiles } from "@smithy/types"; +import type { Logger, SharedConfigFiles } from "@smithy/types"; import { join } from "path"; import { getConfigData } from "./getConfigData"; diff --git a/packages/shared-ini-file-loader/src/loadSsoSessionData.ts b/packages/shared-ini-file-loader/src/loadSsoSessionData.ts index 7c0f9dc7d4d..029ebd04b06 100644 --- a/packages/shared-ini-file-loader/src/loadSsoSessionData.ts +++ b/packages/shared-ini-file-loader/src/loadSsoSessionData.ts @@ -1,4 +1,4 @@ -import { ParsedIniData } from "@smithy/types"; +import type { ParsedIniData } from "@smithy/types"; import { getConfigFilepath } from "./getConfigFilepath"; import { getSsoSessionData } from "./getSsoSessionData"; diff --git a/packages/shared-ini-file-loader/src/mergeConfigFiles.ts b/packages/shared-ini-file-loader/src/mergeConfigFiles.ts index f516775856f..76292e43885 100644 --- a/packages/shared-ini-file-loader/src/mergeConfigFiles.ts +++ b/packages/shared-ini-file-loader/src/mergeConfigFiles.ts @@ -1,4 +1,4 @@ -import { ParsedIniData } from "@smithy/types"; +import type { ParsedIniData } from "@smithy/types"; /** * Merge multiple profile config files such that settings each file are kept together diff --git a/packages/shared-ini-file-loader/src/parseIni.ts b/packages/shared-ini-file-loader/src/parseIni.ts index b8c932c108a..dfb01f1e542 100644 --- a/packages/shared-ini-file-loader/src/parseIni.ts +++ b/packages/shared-ini-file-loader/src/parseIni.ts @@ -1,4 +1,5 @@ -import { IniSectionType, ParsedIniData } from "@smithy/types"; +import type { ParsedIniData } from "@smithy/types"; +import { IniSectionType } from "@smithy/types"; import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles"; diff --git a/packages/shared-ini-file-loader/src/parseKnownFiles.ts b/packages/shared-ini-file-loader/src/parseKnownFiles.ts index 062e27c3b8f..ef97aeabb1f 100644 --- a/packages/shared-ini-file-loader/src/parseKnownFiles.ts +++ b/packages/shared-ini-file-loader/src/parseKnownFiles.ts @@ -1,6 +1,7 @@ -import { ParsedIniData } from "@smithy/types"; +import type { ParsedIniData } from "@smithy/types"; -import { loadSharedConfigFiles, SharedConfigInit } from "./loadSharedConfigFiles"; +import type { SharedConfigInit } from "./loadSharedConfigFiles"; +import { loadSharedConfigFiles } from "./loadSharedConfigFiles"; import { mergeConfigFiles } from "./mergeConfigFiles"; /** diff --git a/packages/shared-ini-file-loader/src/types.ts b/packages/shared-ini-file-loader/src/types.ts index aefc42d31c2..e0471ee5962 100644 --- a/packages/shared-ini-file-loader/src/types.ts +++ b/packages/shared-ini-file-loader/src/types.ts @@ -1,4 +1,4 @@ -import { +import type { ParsedIniData as __ParsedIniData, Profile as __Profile, SharedConfigFiles as __SharedConfigFiles, diff --git a/packages/signature-v4/src/SignatureV4.spec.ts b/packages/signature-v4/src/SignatureV4.spec.ts index 3106ddae54a..aa3096e5ca3 100644 --- a/packages/signature-v4/src/SignatureV4.spec.ts +++ b/packages/signature-v4/src/SignatureV4.spec.ts @@ -1,7 +1,8 @@ import { Sha256 } from "@aws-crypto/sha256-js"; import { HttpRequest } from "@smithy/protocol-http"; -import { AwsCredentialIdentity, SignableMessage, TimestampHeaderValue } from "@smithy/types"; -import { afterEach, beforeEach, describe, expect, MockInstance, test as it, vi } from "vitest"; +import type { AwsCredentialIdentity, SignableMessage, TimestampHeaderValue } from "@smithy/types"; +import type { MockInstance } from "vitest"; +import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { ALGORITHM_IDENTIFIER, diff --git a/packages/signature-v4/src/SignatureV4.ts b/packages/signature-v4/src/SignatureV4.ts index b04b7c16d5e..03afa7603d6 100644 --- a/packages/signature-v4/src/SignatureV4.ts +++ b/packages/signature-v4/src/SignatureV4.ts @@ -1,4 +1,4 @@ -import { +import type { AwsCredentialIdentity, EventSigner, EventSigningArguments, @@ -40,7 +40,8 @@ import { HeaderFormatter } from "./HeaderFormatter"; import { hasHeader } from "./headerUtil"; import { moveHeadersToQuery } from "./moveHeadersToQuery"; import { prepareRequest } from "./prepareRequest"; -import { SignatureV4Base, SignatureV4CryptoInit, SignatureV4Init } from "./SignatureV4Base"; +import type { SignatureV4CryptoInit, SignatureV4Init } from "./SignatureV4Base"; +import { SignatureV4Base } from "./SignatureV4Base"; /** * @public diff --git a/packages/signature-v4/src/SignatureV4Base.ts b/packages/signature-v4/src/SignatureV4Base.ts index fe533d4807b..66ad87c609a 100644 --- a/packages/signature-v4/src/SignatureV4Base.ts +++ b/packages/signature-v4/src/SignatureV4Base.ts @@ -1,4 +1,4 @@ -import { +import type { AwsCredentialIdentity, ChecksumConstructor, DateInput, diff --git a/packages/signature-v4/src/credentialDerivation.spec.ts b/packages/signature-v4/src/credentialDerivation.spec.ts index 3596f269227..60f2d1c36e1 100644 --- a/packages/signature-v4/src/credentialDerivation.spec.ts +++ b/packages/signature-v4/src/credentialDerivation.spec.ts @@ -1,5 +1,5 @@ import { Sha256 } from "@aws-crypto/sha256-js"; -import { AwsCredentialIdentity } from "@smithy/types"; +import type { AwsCredentialIdentity } from "@smithy/types"; import { toHex } from "@smithy/util-hex-encoding"; import { beforeEach, describe, expect, test as it, vi } from "vitest"; diff --git a/packages/signature-v4/src/credentialDerivation.ts b/packages/signature-v4/src/credentialDerivation.ts index 43c4df7b0bc..d85345481e1 100644 --- a/packages/signature-v4/src/credentialDerivation.ts +++ b/packages/signature-v4/src/credentialDerivation.ts @@ -1,4 +1,4 @@ -import { AwsCredentialIdentity, ChecksumConstructor, HashConstructor, SourceData } from "@smithy/types"; +import type { AwsCredentialIdentity, ChecksumConstructor, HashConstructor, SourceData } from "@smithy/types"; import { toHex } from "@smithy/util-hex-encoding"; import { toUint8Array } from "@smithy/util-utf8"; diff --git a/packages/signature-v4/src/getCanonicalHeaders.spec.ts b/packages/signature-v4/src/getCanonicalHeaders.spec.ts index 2c0b1f6e853..79e406b2e70 100644 --- a/packages/signature-v4/src/getCanonicalHeaders.spec.ts +++ b/packages/signature-v4/src/getCanonicalHeaders.spec.ts @@ -1,5 +1,5 @@ import { HttpRequest } from "@smithy/protocol-http"; -import { HeaderBag } from "@smithy/types"; +import type { HeaderBag } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { ALWAYS_UNSIGNABLE_HEADERS } from "./constants"; diff --git a/packages/signature-v4/src/getCanonicalHeaders.ts b/packages/signature-v4/src/getCanonicalHeaders.ts index 99b4c2493be..33b6df934e6 100644 --- a/packages/signature-v4/src/getCanonicalHeaders.ts +++ b/packages/signature-v4/src/getCanonicalHeaders.ts @@ -1,4 +1,4 @@ -import { HeaderBag, HttpRequest } from "@smithy/types"; +import type { HeaderBag, HttpRequest } from "@smithy/types"; import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from "./constants"; diff --git a/packages/signature-v4/src/getCanonicalQuery.ts b/packages/signature-v4/src/getCanonicalQuery.ts index 93daf27f1a0..e5455b85ed2 100644 --- a/packages/signature-v4/src/getCanonicalQuery.ts +++ b/packages/signature-v4/src/getCanonicalQuery.ts @@ -1,4 +1,4 @@ -import { HttpRequest } from "@smithy/types"; +import type { HttpRequest } from "@smithy/types"; import { escapeUri } from "@smithy/util-uri-escape"; import { SIGNATURE_HEADER } from "./constants"; diff --git a/packages/signature-v4/src/getPayloadHash.ts b/packages/signature-v4/src/getPayloadHash.ts index 29121a59031..4b6d1caa022 100644 --- a/packages/signature-v4/src/getPayloadHash.ts +++ b/packages/signature-v4/src/getPayloadHash.ts @@ -1,5 +1,5 @@ import { isArrayBuffer } from "@smithy/is-array-buffer"; -import { ChecksumConstructor, HashConstructor, HttpRequest } from "@smithy/types"; +import type { ChecksumConstructor, HashConstructor, HttpRequest } from "@smithy/types"; import { toHex } from "@smithy/util-hex-encoding"; import { toUint8Array } from "@smithy/util-utf8"; diff --git a/packages/signature-v4/src/headerUtil.ts b/packages/signature-v4/src/headerUtil.ts index a56d22b6792..d4d571d2b35 100644 --- a/packages/signature-v4/src/headerUtil.ts +++ b/packages/signature-v4/src/headerUtil.ts @@ -1,4 +1,4 @@ -import { HeaderBag } from "@smithy/types"; +import type { HeaderBag } from "@smithy/types"; export const hasHeader = (soughtHeader: string, headers: HeaderBag): boolean => { soughtHeader = soughtHeader.toLowerCase(); diff --git a/packages/signature-v4/src/suite.fixture.ts b/packages/signature-v4/src/suite.fixture.ts index d1bf6b86b96..4c686b6227f 100644 --- a/packages/signature-v4/src/suite.fixture.ts +++ b/packages/signature-v4/src/suite.fixture.ts @@ -1,4 +1,4 @@ -import { HttpRequest } from "@smithy/types"; +import type { HttpRequest } from "@smithy/types"; export interface TestCase { name: string; diff --git a/packages/signature-v4a/src/SignatureV4a.spec.ts b/packages/signature-v4a/src/SignatureV4a.spec.ts index d8461dea256..07ec833587a 100644 --- a/packages/signature-v4a/src/SignatureV4a.spec.ts +++ b/packages/signature-v4a/src/SignatureV4a.spec.ts @@ -1,5 +1,5 @@ import { Sha256 } from "@aws-crypto/sha256-js"; -import { AwsCredentialIdentity, HttpRequest } from "@smithy/types"; +import type { AwsCredentialIdentity, HttpRequest } from "@smithy/types"; import { describe, expect, it } from "vitest"; import { SignatureV4a } from "./SignatureV4a"; diff --git a/packages/signature-v4a/src/SignatureV4a.ts b/packages/signature-v4a/src/SignatureV4a.ts index 45ce922a8ba..d0d240a733f 100644 --- a/packages/signature-v4a/src/SignatureV4a.ts +++ b/packages/signature-v4a/src/SignatureV4a.ts @@ -1,3 +1,4 @@ +import type { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; import { ALGORITHM_IDENTIFIER_V4A, AMZ_DATE_HEADER, @@ -9,8 +10,8 @@ import { getCanonicalHeaders } from "@smithy/signature-v4"; import { getPayloadHash } from "@smithy/signature-v4"; import { hasHeader } from "@smithy/signature-v4"; import { prepareRequest } from "@smithy/signature-v4"; -import { SignatureV4Base, SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; -import { HttpRequest, RequestSigner, RequestSigningArguments } from "@smithy/types"; +import { SignatureV4Base } from "@smithy/signature-v4"; +import type { HttpRequest, RequestSigner, RequestSigningArguments } from "@smithy/types"; import { toHex } from "@smithy/util-hex-encoding"; import { toUint8Array } from "@smithy/util-utf8"; diff --git a/packages/signature-v4a/src/credentialDerivation.ts b/packages/signature-v4a/src/credentialDerivation.ts index 8397509588d..31119ce15ac 100644 --- a/packages/signature-v4a/src/credentialDerivation.ts +++ b/packages/signature-v4a/src/credentialDerivation.ts @@ -1,5 +1,5 @@ import { ALGORITHM_IDENTIFIER_V4A, KEY_TYPE_IDENTIFIER } from "@smithy/signature-v4"; -import { ChecksumConstructor, HashConstructor } from "@smithy/types"; +import type { ChecksumConstructor, HashConstructor } from "@smithy/types"; import { toUint8Array } from "@smithy/util-utf8"; import { N_MINUS_TWO, ONE_AS_4_BYTES, TWOFIFTYSIX_AS_4_BYTES } from "./constants"; diff --git a/packages/smithy-client/src/NoOpLogger.ts b/packages/smithy-client/src/NoOpLogger.ts index d7456dea127..5dc487c5c47 100644 --- a/packages/smithy-client/src/NoOpLogger.ts +++ b/packages/smithy-client/src/NoOpLogger.ts @@ -1,4 +1,4 @@ -import { Logger } from "@smithy/types"; +import type { Logger } from "@smithy/types"; /** * @internal diff --git a/packages/smithy-client/src/client.ts b/packages/smithy-client/src/client.ts index bd05e65faa7..d7026dbd8c0 100644 --- a/packages/smithy-client/src/client.ts +++ b/packages/smithy-client/src/client.ts @@ -1,5 +1,5 @@ import { constructStack } from "@smithy/middleware-stack"; -import { +import type { Client as IClient, Command, FetchHttpHandlerOptions, diff --git a/packages/smithy-client/src/create-aggregated-client.ts b/packages/smithy-client/src/create-aggregated-client.ts index 4b38851ea68..db958596608 100644 --- a/packages/smithy-client/src/create-aggregated-client.ts +++ b/packages/smithy-client/src/create-aggregated-client.ts @@ -1,4 +1,4 @@ -import { Client } from "./client"; +import type { Client } from "./client"; /** * @internal diff --git a/packages/smithy-client/src/default-error-handler.ts b/packages/smithy-client/src/default-error-handler.ts index f5483babcb5..98f3c394ec1 100644 --- a/packages/smithy-client/src/default-error-handler.ts +++ b/packages/smithy-client/src/default-error-handler.ts @@ -1,4 +1,4 @@ -import { HttpResponse, ResponseMetadata } from "@smithy/types"; +import type { HttpResponse, ResponseMetadata } from "@smithy/types"; import { decorateServiceException } from "./exceptions"; diff --git a/packages/smithy-client/src/exceptions.spec.ts b/packages/smithy-client/src/exceptions.spec.ts index e0f23aeaa8b..043fbc3ca1f 100644 --- a/packages/smithy-client/src/exceptions.spec.ts +++ b/packages/smithy-client/src/exceptions.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, test as it } from "vitest"; -import { decorateServiceException, ExceptionOptionType, ServiceException } from "./exceptions"; +import type { ExceptionOptionType } from "./exceptions"; +import { decorateServiceException, ServiceException } from "./exceptions"; it("ServiceException extends from Error", () => { expect( diff --git a/packages/smithy-client/src/exceptions.ts b/packages/smithy-client/src/exceptions.ts index b0878bb52fa..3f1518ab629 100644 --- a/packages/smithy-client/src/exceptions.ts +++ b/packages/smithy-client/src/exceptions.ts @@ -1,4 +1,4 @@ -import { HttpResponse, MetadataBearer, ResponseMetadata, RetryableTrait, SmithyException } from "@smithy/types"; +import type { HttpResponse, MetadataBearer, ResponseMetadata, RetryableTrait, SmithyException } from "@smithy/types"; /** * The type of the exception class constructor parameter. The returned type contains the properties diff --git a/packages/smithy-client/src/extensions/defaultExtensionConfiguration.ts b/packages/smithy-client/src/extensions/defaultExtensionConfiguration.ts index 5572294f841..f6da47d6dff 100644 --- a/packages/smithy-client/src/extensions/defaultExtensionConfiguration.ts +++ b/packages/smithy-client/src/extensions/defaultExtensionConfiguration.ts @@ -1,7 +1,9 @@ import type { DefaultExtensionConfiguration } from "@smithy/types"; -import { getChecksumConfiguration, PartialChecksumRuntimeConfigType, resolveChecksumRuntimeConfig } from "./checksum"; -import { getRetryConfiguration, PartialRetryRuntimeConfigType, resolveRetryRuntimeConfig } from "./retry"; +import type { PartialChecksumRuntimeConfigType } from "./checksum"; +import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from "./checksum"; +import type { PartialRetryRuntimeConfigType } from "./retry"; +import { getRetryConfiguration, resolveRetryRuntimeConfig } from "./retry"; /** * @internal diff --git a/packages/smithy-client/src/extensions/retry.ts b/packages/smithy-client/src/extensions/retry.ts index a7734d9e00e..f3623048aad 100644 --- a/packages/smithy-client/src/extensions/retry.ts +++ b/packages/smithy-client/src/extensions/retry.ts @@ -1,4 +1,4 @@ -import { Provider, RetryStrategy, RetryStrategyConfiguration, RetryStrategyV2 } from "@smithy/types"; +import type { Provider, RetryStrategy, RetryStrategyConfiguration, RetryStrategyV2 } from "@smithy/types"; /** * @internal diff --git a/packages/smithy-client/src/object-mapping.spec.ts b/packages/smithy-client/src/object-mapping.spec.ts index 578e7923208..8f7acea2901 100644 --- a/packages/smithy-client/src/object-mapping.spec.ts +++ b/packages/smithy-client/src/object-mapping.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, test as it } from "vitest"; -import { map, ObjectMappingInstructions, SourceMappingInstructions, take } from "./object-mapping"; +import type { ObjectMappingInstructions, SourceMappingInstructions } from "./object-mapping"; +import { map, take } from "./object-mapping"; describe("object mapping", () => { const example: ObjectMappingInstructions = { diff --git a/packages/types/src/auth/HttpAuthScheme.ts b/packages/types/src/auth/HttpAuthScheme.ts index 4e519c24c99..292d8f9873a 100644 --- a/packages/types/src/auth/HttpAuthScheme.ts +++ b/packages/types/src/auth/HttpAuthScheme.ts @@ -1,7 +1,7 @@ -import { Identity, IdentityProvider } from "../identity/identity"; -import { HandlerExecutionContext } from "../middleware"; -import { HttpSigner } from "./HttpSigner"; -import { IdentityProviderConfig } from "./IdentityProviderConfig"; +import type { Identity, IdentityProvider } from "../identity/identity"; +import type { HandlerExecutionContext } from "../middleware"; +import type { HttpSigner } from "./HttpSigner"; +import type { IdentityProviderConfig } from "./IdentityProviderConfig"; /** * ID for {@link HttpAuthScheme} diff --git a/packages/types/src/auth/HttpAuthSchemeProvider.ts b/packages/types/src/auth/HttpAuthSchemeProvider.ts index b675bd74f03..e26b81f6af2 100644 --- a/packages/types/src/auth/HttpAuthSchemeProvider.ts +++ b/packages/types/src/auth/HttpAuthSchemeProvider.ts @@ -1,5 +1,5 @@ -import { HandlerExecutionContext } from "../middleware"; -import { HttpAuthOption } from "./HttpAuthScheme"; +import type { HandlerExecutionContext } from "../middleware"; +import type { HttpAuthOption } from "./HttpAuthScheme"; /** * @internal diff --git a/packages/types/src/auth/HttpSigner.ts b/packages/types/src/auth/HttpSigner.ts index cde31cc23e2..eac2d2daafe 100644 --- a/packages/types/src/auth/HttpSigner.ts +++ b/packages/types/src/auth/HttpSigner.ts @@ -1,5 +1,5 @@ -import { HttpRequest, HttpResponse } from "../http"; -import { Identity } from "../identity/identity"; +import type { HttpRequest, HttpResponse } from "../http"; +import type { Identity } from "../identity/identity"; /** * @internal diff --git a/packages/types/src/auth/IdentityProviderConfig.ts b/packages/types/src/auth/IdentityProviderConfig.ts index cd0e59b9fb6..84d25a95edb 100644 --- a/packages/types/src/auth/IdentityProviderConfig.ts +++ b/packages/types/src/auth/IdentityProviderConfig.ts @@ -1,5 +1,5 @@ -import { Identity, IdentityProvider } from "../identity/identity"; -import { HttpAuthSchemeId } from "./HttpAuthScheme"; +import type { Identity, IdentityProvider } from "../identity/identity"; +import type { HttpAuthSchemeId } from "./HttpAuthScheme"; /** * Interface to get an IdentityProvider for a specified HttpAuthScheme diff --git a/packages/types/src/blob/blob-payload-input-types.ts b/packages/types/src/blob/blob-payload-input-types.ts index 9e29c067f39..0bf5effb6ab 100644 --- a/packages/types/src/blob/blob-payload-input-types.ts +++ b/packages/types/src/blob/blob-payload-input-types.ts @@ -1,4 +1,4 @@ -import { Readable } from "stream"; +import type { Readable } from "stream"; import type { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; diff --git a/packages/types/src/checksum.ts b/packages/types/src/checksum.ts index 5d1324ee18a..22c3406c6dd 100644 --- a/packages/types/src/checksum.ts +++ b/packages/types/src/checksum.ts @@ -1,4 +1,4 @@ -import { SourceData } from "./crypto"; +import type { SourceData } from "./crypto"; /** * @public diff --git a/packages/types/src/client.ts b/packages/types/src/client.ts index 9d6454bb802..3b6f24571d7 100644 --- a/packages/types/src/client.ts +++ b/packages/types/src/client.ts @@ -1,7 +1,7 @@ -import { Command } from "./command"; -import { MiddlewareStack } from "./middleware"; -import { MetadataBearer } from "./response"; -import { OptionalParameter } from "./util"; +import type { Command } from "./command"; +import type { MiddlewareStack } from "./middleware"; +import type { MetadataBearer } from "./response"; +import type { OptionalParameter } from "./util"; /** * @public diff --git a/packages/types/src/command.ts b/packages/types/src/command.ts index c093da829f9..c8e0a0fbbbe 100644 --- a/packages/types/src/command.ts +++ b/packages/types/src/command.ts @@ -1,5 +1,5 @@ -import { Handler, MiddlewareStack } from "./middleware"; -import { MetadataBearer } from "./response"; +import type { Handler, MiddlewareStack } from "./middleware"; +import type { MetadataBearer } from "./response"; /** * @public diff --git a/packages/types/src/connection/manager.ts b/packages/types/src/connection/manager.ts index e1f3878f6b7..5e7ecc5d8fa 100644 --- a/packages/types/src/connection/manager.ts +++ b/packages/types/src/connection/manager.ts @@ -1,5 +1,5 @@ -import { RequestContext } from "../transfer"; -import { ConnectConfiguration } from "./config"; +import type { RequestContext } from "../transfer"; +import type { ConnectConfiguration } from "./config"; /** * @public diff --git a/packages/types/src/encode.ts b/packages/types/src/encode.ts index c6dfb8f341c..d32aa2af9da 100644 --- a/packages/types/src/encode.ts +++ b/packages/types/src/encode.ts @@ -1,4 +1,4 @@ -import { Message } from "./eventStream"; +import type { Message } from "./eventStream"; /** * @public diff --git a/packages/types/src/endpoint.ts b/packages/types/src/endpoint.ts index 99add6935a0..fed1164f0ac 100644 --- a/packages/types/src/endpoint.ts +++ b/packages/types/src/endpoint.ts @@ -1,4 +1,4 @@ -import { AuthScheme } from "./auth/auth"; +import type { AuthScheme } from "./auth/auth"; /** * @public diff --git a/packages/types/src/endpoints/EndpointRuleObject.ts b/packages/types/src/endpoints/EndpointRuleObject.ts index a7e698cd227..b446c05bf5e 100644 --- a/packages/types/src/endpoints/EndpointRuleObject.ts +++ b/packages/types/src/endpoints/EndpointRuleObject.ts @@ -1,5 +1,5 @@ -import { EndpointObjectProperty } from "../endpoint"; -import { ConditionObject, Expression } from "./shared"; +import type { EndpointObjectProperty } from "../endpoint"; +import type { ConditionObject, Expression } from "./shared"; /** * @public diff --git a/packages/types/src/endpoints/ErrorRuleObject.ts b/packages/types/src/endpoints/ErrorRuleObject.ts index 97b1ee83490..c3621f977be 100644 --- a/packages/types/src/endpoints/ErrorRuleObject.ts +++ b/packages/types/src/endpoints/ErrorRuleObject.ts @@ -1,4 +1,4 @@ -import { ConditionObject, Expression } from "./shared"; +import type { ConditionObject, Expression } from "./shared"; /** * @public diff --git a/packages/types/src/endpoints/RuleSetObject.ts b/packages/types/src/endpoints/RuleSetObject.ts index ed7e10fc515..c91618f979a 100644 --- a/packages/types/src/endpoints/RuleSetObject.ts +++ b/packages/types/src/endpoints/RuleSetObject.ts @@ -1,4 +1,4 @@ -import { RuleSetRules } from "./TreeRuleObject"; +import type { RuleSetRules } from "./TreeRuleObject"; /** * @public diff --git a/packages/types/src/endpoints/TreeRuleObject.ts b/packages/types/src/endpoints/TreeRuleObject.ts index c4b1d7ce5dd..f21e74cb0be 100644 --- a/packages/types/src/endpoints/TreeRuleObject.ts +++ b/packages/types/src/endpoints/TreeRuleObject.ts @@ -1,6 +1,6 @@ -import { EndpointRuleObject } from "./EndpointRuleObject"; -import { ErrorRuleObject } from "./ErrorRuleObject"; -import { ConditionObject } from "./shared"; +import type { EndpointRuleObject } from "./EndpointRuleObject"; +import type { ErrorRuleObject } from "./ErrorRuleObject"; +import type { ConditionObject } from "./shared"; /** * @public diff --git a/packages/types/src/endpoints/shared.ts b/packages/types/src/endpoints/shared.ts index 21229fe7aa0..82a71c2f506 100644 --- a/packages/types/src/endpoints/shared.ts +++ b/packages/types/src/endpoints/shared.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logger"; +import type { Logger } from "../logger"; /** * @public diff --git a/packages/types/src/eventStream.ts b/packages/types/src/eventStream.ts index 5d6bf4526d5..5c7996be7a7 100644 --- a/packages/types/src/eventStream.ts +++ b/packages/types/src/eventStream.ts @@ -1,11 +1,11 @@ -import { HttpRequest } from "./http"; -import { +import type { HttpRequest } from "./http"; +import type { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext, } from "./middleware"; -import { MetadataBearer } from "./response"; +import type { MetadataBearer } from "./response"; /** * @public * diff --git a/packages/types/src/extensions/checksum.ts b/packages/types/src/extensions/checksum.ts index 9861e90f638..39c4fb20623 100644 --- a/packages/types/src/extensions/checksum.ts +++ b/packages/types/src/extensions/checksum.ts @@ -1,5 +1,5 @@ -import { ChecksumConstructor } from "../checksum"; -import { HashConstructor } from "../crypto"; +import type { ChecksumConstructor } from "../checksum"; +import type { HashConstructor } from "../crypto"; /** * @internal diff --git a/packages/types/src/extensions/defaultClientConfiguration.ts b/packages/types/src/extensions/defaultClientConfiguration.ts index 892fad85b9d..b314214bc55 100644 --- a/packages/types/src/extensions/defaultClientConfiguration.ts +++ b/packages/types/src/extensions/defaultClientConfiguration.ts @@ -1,4 +1,5 @@ -import { ChecksumConfiguration, getChecksumConfiguration, resolveChecksumRuntimeConfig } from "./checksum"; +import type { ChecksumConfiguration } from "./checksum"; +import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from "./checksum"; /** * @deprecated will be replaced by DefaultExtensionConfiguration. diff --git a/packages/types/src/extensions/defaultExtensionConfiguration.ts b/packages/types/src/extensions/defaultExtensionConfiguration.ts index 3aefdbf6e84..f42e9f387a9 100644 --- a/packages/types/src/extensions/defaultExtensionConfiguration.ts +++ b/packages/types/src/extensions/defaultExtensionConfiguration.ts @@ -1,5 +1,5 @@ -import { ChecksumConfiguration } from "./checksum"; -import { RetryStrategyConfiguration } from "./retry"; +import type { ChecksumConfiguration } from "./checksum"; +import type { RetryStrategyConfiguration } from "./retry"; /** * @internal diff --git a/packages/types/src/extensions/retry.ts b/packages/types/src/extensions/retry.ts index 9e3badf5bcd..ece856f6314 100644 --- a/packages/types/src/extensions/retry.ts +++ b/packages/types/src/extensions/retry.ts @@ -1,5 +1,5 @@ -import { RetryStrategyV2 } from "../retry"; -import { Provider, RetryStrategy } from "../util"; +import type { RetryStrategyV2 } from "../retry"; +import type { Provider, RetryStrategy } from "../util"; /** * A configuration interface with methods called by runtime extension diff --git a/packages/types/src/http.ts b/packages/types/src/http.ts index df73aefa396..cdff22eb5a2 100644 --- a/packages/types/src/http.ts +++ b/packages/types/src/http.ts @@ -1,5 +1,5 @@ -import { AbortSignal as DeprecatedAbortSignal } from "./abort"; -import { URI } from "./uri"; +import type { AbortSignal as DeprecatedAbortSignal } from "./abort"; +import type { URI } from "./uri"; /** * @public diff --git a/packages/types/src/http/httpHandlerInitialization.ts b/packages/types/src/http/httpHandlerInitialization.ts index fb37ac0ad5c..0c7400f4575 100644 --- a/packages/types/src/http/httpHandlerInitialization.ts +++ b/packages/types/src/http/httpHandlerInitialization.ts @@ -1,8 +1,8 @@ import type { Agent as hAgent, AgentOptions as hAgentOptions } from "http"; import type { Agent as hsAgent, AgentOptions as hsAgentOptions } from "https"; -import { HttpRequest as IHttpRequest } from "../http"; -import { Logger } from "../logger"; +import type { HttpRequest as IHttpRequest } from "../http"; +import type { Logger } from "../logger"; /** * diff --git a/packages/types/src/identity/apiKeyIdentity.ts b/packages/types/src/identity/apiKeyIdentity.ts index 8a3b295abcd..2e806a262d7 100644 --- a/packages/types/src/identity/apiKeyIdentity.ts +++ b/packages/types/src/identity/apiKeyIdentity.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "../identity/identity"; +import type { Identity, IdentityProvider } from "../identity/identity"; /** * @public diff --git a/packages/types/src/identity/awsCredentialIdentity.ts b/packages/types/src/identity/awsCredentialIdentity.ts index eeb41143000..7ba43c79509 100644 --- a/packages/types/src/identity/awsCredentialIdentity.ts +++ b/packages/types/src/identity/awsCredentialIdentity.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "./identity"; +import type { Identity, IdentityProvider } from "./identity"; /** * @public diff --git a/packages/types/src/identity/tokenIdentity.ts b/packages/types/src/identity/tokenIdentity.ts index 9cee4947c16..3af9ca1cd66 100644 --- a/packages/types/src/identity/tokenIdentity.ts +++ b/packages/types/src/identity/tokenIdentity.ts @@ -1,4 +1,4 @@ -import { Identity, IdentityProvider } from "../identity/identity"; +import type { Identity, IdentityProvider } from "../identity/identity"; /** * @internal diff --git a/packages/types/src/retry.ts b/packages/types/src/retry.ts index 312342f8d28..a5e61489519 100644 --- a/packages/types/src/retry.ts +++ b/packages/types/src/retry.ts @@ -1,4 +1,4 @@ -import { SdkError } from "./shapes"; +import type { SdkError } from "./shapes"; /** * @public diff --git a/packages/types/src/serde.ts b/packages/types/src/serde.ts index 18822f64d07..8cb265f6dc8 100644 --- a/packages/types/src/serde.ts +++ b/packages/types/src/serde.ts @@ -1,7 +1,7 @@ -import { Endpoint } from "./http"; -import { ClientProtocol } from "./schema/schema"; -import { RequestHandler } from "./transfer"; -import { Decoder, Encoder, Provider } from "./util"; +import type { Endpoint } from "./http"; +import type { ClientProtocol } from "./schema/schema"; +import type { RequestHandler } from "./transfer"; +import type { Decoder, Encoder, Provider } from "./util"; /** * @public diff --git a/packages/types/src/shapes.ts b/packages/types/src/shapes.ts index 924ca2f327c..fd2f8be22ff 100644 --- a/packages/types/src/shapes.ts +++ b/packages/types/src/shapes.ts @@ -1,5 +1,5 @@ -import { HttpResponse } from "./http"; -import { MetadataBearer } from "./response"; +import type { HttpResponse } from "./http"; +import type { MetadataBearer } from "./response"; /** * @public diff --git a/packages/types/src/signature.ts b/packages/types/src/signature.ts index 0ed7afd7005..bc094e83209 100644 --- a/packages/types/src/signature.ts +++ b/packages/types/src/signature.ts @@ -1,5 +1,5 @@ -import { Message } from "./eventStream"; -import { HttpRequest } from "./http"; +import type { Message } from "./eventStream"; +import type { HttpRequest } from "./http"; /** * @public diff --git a/packages/types/src/stream.ts b/packages/types/src/stream.ts index 375f09a5f4d..9512e2fcf2b 100644 --- a/packages/types/src/stream.ts +++ b/packages/types/src/stream.ts @@ -1,6 +1,6 @@ -import { ChecksumConstructor } from "./checksum"; -import { HashConstructor, StreamHasher } from "./crypto"; -import { BodyLengthCalculator, Encoder } from "./util"; +import type { ChecksumConstructor } from "./checksum"; +import type { HashConstructor, StreamHasher } from "./crypto"; +import type { BodyLengthCalculator, Encoder } from "./util"; /** * @public diff --git a/packages/types/src/transform/no-undefined.spec.ts b/packages/types/src/transform/no-undefined.spec.ts index a7dfe22b2b4..263a444f602 100644 --- a/packages/types/src/transform/no-undefined.spec.ts +++ b/packages/types/src/transform/no-undefined.spec.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import type { Client } from "../client"; -import { CommandIO } from "../command"; +import type { CommandIO } from "../command"; import type { HttpHandlerOptions } from "../http"; import type { MetadataBearer } from "../response"; -import { DocumentType } from "../shapes"; +import type { DocumentType } from "../shapes"; import type { Exact } from "./exact"; import type { AssertiveClient, NoUndefined, UncheckedClient } from "./no-undefined"; diff --git a/packages/types/src/uri.ts b/packages/types/src/uri.ts index 3aff9296a3f..1472f6d1876 100644 --- a/packages/types/src/uri.ts +++ b/packages/types/src/uri.ts @@ -1,4 +1,4 @@ -import { QueryParameterBag } from "./http"; +import type { QueryParameterBag } from "./http"; /** * @internal diff --git a/packages/types/src/util.ts b/packages/types/src/util.ts index 101df49de03..6841b6b650d 100644 --- a/packages/types/src/util.ts +++ b/packages/types/src/util.ts @@ -1,6 +1,6 @@ -import { Endpoint } from "./http"; -import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware"; -import { MetadataBearer } from "./response"; +import type { Endpoint } from "./http"; +import type { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware"; +import type { MetadataBearer } from "./response"; /** * @public diff --git a/packages/types/src/waiter.ts b/packages/types/src/waiter.ts index 5ceec0e770e..31f8682ce70 100644 --- a/packages/types/src/waiter.ts +++ b/packages/types/src/waiter.ts @@ -1,4 +1,4 @@ -import { AbortController as DeprecatedAbortController } from "./abort"; +import type { AbortController as DeprecatedAbortController } from "./abort"; /** * @public diff --git a/packages/url-parser/src/index.spec.ts b/packages/url-parser/src/index.spec.ts index 5e1855e883c..22d8fe656b2 100644 --- a/packages/url-parser/src/index.spec.ts +++ b/packages/url-parser/src/index.spec.ts @@ -1,4 +1,4 @@ -import { Endpoint } from "@smithy/types"; +import type { Endpoint } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { parseUrl } from "."; diff --git a/packages/url-parser/src/index.ts b/packages/url-parser/src/index.ts index 4a4aaf37072..65fcf6208aa 100644 --- a/packages/url-parser/src/index.ts +++ b/packages/url-parser/src/index.ts @@ -1,5 +1,5 @@ import { parseQueryString } from "@smithy/querystring-parser"; -import { Endpoint, QueryParameterBag, UrlParser } from "@smithy/types"; +import type { Endpoint, QueryParameterBag, UrlParser } from "@smithy/types"; /** * @internal diff --git a/packages/util-config-provider/src/booleanSelector.ts b/packages/util-config-provider/src/booleanSelector.ts index 056044fa005..710aa8899ef 100644 --- a/packages/util-config-provider/src/booleanSelector.ts +++ b/packages/util-config-provider/src/booleanSelector.ts @@ -1,4 +1,4 @@ -import { SelectorType } from "./types"; +import type { SelectorType } from "./types"; /** * Returns boolean value true/false for string value "true"/"false", diff --git a/packages/util-config-provider/src/numberSelector.ts b/packages/util-config-provider/src/numberSelector.ts index 3c74dd85546..afd02da631b 100644 --- a/packages/util-config-provider/src/numberSelector.ts +++ b/packages/util-config-provider/src/numberSelector.ts @@ -1,4 +1,4 @@ -import { SelectorType } from "./types"; +import type { SelectorType } from "./types"; /** * Returns number value for string value, if the string is defined in obj[key]. diff --git a/packages/util-defaults-mode-node/src/defaultsModeConfig.ts b/packages/util-defaults-mode-node/src/defaultsModeConfig.ts index ecf13f8ea55..2a425a46ef5 100644 --- a/packages/util-defaults-mode-node/src/defaultsModeConfig.ts +++ b/packages/util-defaults-mode-node/src/defaultsModeConfig.ts @@ -1,4 +1,4 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; import type { DefaultsMode } from "@smithy/smithy-client"; const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; diff --git a/packages/util-endpoints/src/debug/toDebugString.ts b/packages/util-endpoints/src/debug/toDebugString.ts index af46897d4d5..d4d966cc755 100644 --- a/packages/util-endpoints/src/debug/toDebugString.ts +++ b/packages/util-endpoints/src/debug/toDebugString.ts @@ -1,7 +1,7 @@ -import { EndpointParameters, EndpointV2 } from "@smithy/types"; +import type { EndpointParameters, EndpointV2 } from "@smithy/types"; -import { GetAttrValue } from "../lib"; -import { EndpointObject, FunctionObject, FunctionReturn } from "../types"; +import type { GetAttrValue } from "../lib"; +import type { EndpointObject, FunctionObject, FunctionReturn } from "../types"; export function toDebugString(input: EndpointParameters): string; export function toDebugString(input: EndpointV2): string; diff --git a/packages/util-endpoints/src/getEndpointUrlConfig.ts b/packages/util-endpoints/src/getEndpointUrlConfig.ts index e24c22a91c6..94d120267b2 100644 --- a/packages/util-endpoints/src/getEndpointUrlConfig.ts +++ b/packages/util-endpoints/src/getEndpointUrlConfig.ts @@ -1,5 +1,5 @@ -import { LoadedConfigSelectors } from "@smithy/node-config-provider"; -import { IniSection } from "@smithy/types"; +import type { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { IniSection } from "@smithy/types"; const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; const CONFIG_ENDPOINT_URL = "endpoint_url"; diff --git a/packages/util-endpoints/src/lib/parseURL.spec.ts b/packages/util-endpoints/src/lib/parseURL.spec.ts index 0943a35c23e..24cb7e01d89 100644 --- a/packages/util-endpoints/src/lib/parseURL.spec.ts +++ b/packages/util-endpoints/src/lib/parseURL.spec.ts @@ -1,4 +1,5 @@ -import { Endpoint, EndpointURL, EndpointURLScheme } from "@smithy/types"; +import type { Endpoint, EndpointURL } from "@smithy/types"; +import { EndpointURLScheme } from "@smithy/types"; import { describe, expect, test as it } from "vitest"; import { parseURL } from "./parseURL"; diff --git a/packages/util-endpoints/src/lib/parseURL.ts b/packages/util-endpoints/src/lib/parseURL.ts index 95364ffe297..0fb70d62cf7 100644 --- a/packages/util-endpoints/src/lib/parseURL.ts +++ b/packages/util-endpoints/src/lib/parseURL.ts @@ -1,4 +1,5 @@ -import { Endpoint, EndpointURL, EndpointURLScheme } from "@smithy/types"; +import type { Endpoint, EndpointURL } from "@smithy/types"; +import { EndpointURLScheme } from "@smithy/types"; import { isIpAddress } from "./isIpAddress"; diff --git a/packages/util-endpoints/src/resolveEndpoint.spec.ts b/packages/util-endpoints/src/resolveEndpoint.spec.ts index 71769c589f1..86fc713df62 100644 --- a/packages/util-endpoints/src/resolveEndpoint.spec.ts +++ b/packages/util-endpoints/src/resolveEndpoint.spec.ts @@ -2,7 +2,8 @@ import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest" /* eslint-disable @typescript-eslint/no-unused-vars */ import { resolveEndpoint } from "./resolveEndpoint"; -import { EndpointError, EndpointParams, ParameterObject, RuleSetObject } from "./types"; +import type { EndpointParams, ParameterObject, RuleSetObject } from "./types"; +import { EndpointError } from "./types"; import { evaluateRules } from "./utils"; vi.mock("./utils"); diff --git a/packages/util-endpoints/src/resolveEndpoint.ts b/packages/util-endpoints/src/resolveEndpoint.ts index ad426404233..a5d0738bb66 100644 --- a/packages/util-endpoints/src/resolveEndpoint.ts +++ b/packages/util-endpoints/src/resolveEndpoint.ts @@ -1,7 +1,8 @@ -import { EndpointV2 } from "@smithy/types"; +import type { EndpointV2 } from "@smithy/types"; import { debugId, toDebugString } from "./debug"; -import { EndpointError, EndpointResolverOptions, RuleSetObject } from "./types"; +import type { EndpointResolverOptions, RuleSetObject } from "./types"; +import { EndpointError } from "./types"; import { evaluateRules } from "./utils"; /** diff --git a/packages/util-endpoints/src/types/EndpointFunctions.ts b/packages/util-endpoints/src/types/EndpointFunctions.ts index 5887578f25e..1835dddfdde 100644 --- a/packages/util-endpoints/src/types/EndpointFunctions.ts +++ b/packages/util-endpoints/src/types/EndpointFunctions.ts @@ -1,3 +1,3 @@ -import { FunctionReturn } from "./shared"; +import type { FunctionReturn } from "./shared"; export type EndpointFunctions = Record FunctionReturn>; diff --git a/packages/util-endpoints/src/types/EndpointRuleObject.ts b/packages/util-endpoints/src/types/EndpointRuleObject.ts index afbf7a748d6..e4a208c875a 100644 --- a/packages/util-endpoints/src/types/EndpointRuleObject.ts +++ b/packages/util-endpoints/src/types/EndpointRuleObject.ts @@ -1,4 +1,4 @@ -import { +import type { EndpointObject as __EndpointObject, EndpointObjectHeaders as __EndpointObjectHeaders, EndpointObjectProperties as __EndpointObjectProperties, diff --git a/packages/util-endpoints/src/types/ErrorRuleObject.ts b/packages/util-endpoints/src/types/ErrorRuleObject.ts index 2fc5d057128..87948b7522c 100644 --- a/packages/util-endpoints/src/types/ErrorRuleObject.ts +++ b/packages/util-endpoints/src/types/ErrorRuleObject.ts @@ -1,3 +1,3 @@ -import { ErrorRuleObject as __ErrorRuleObject } from "@smithy/types"; +import type { ErrorRuleObject as __ErrorRuleObject } from "@smithy/types"; export type ErrorRuleObject = __ErrorRuleObject; diff --git a/packages/util-endpoints/src/types/RuleSetObject.ts b/packages/util-endpoints/src/types/RuleSetObject.ts index 5c74769fedf..063b8005342 100644 --- a/packages/util-endpoints/src/types/RuleSetObject.ts +++ b/packages/util-endpoints/src/types/RuleSetObject.ts @@ -1,4 +1,4 @@ -import { +import type { DeprecatedObject as __DeprecatedObject, ParameterObject as __ParameterObject, RuleSetObject as __RuleSetObject, diff --git a/packages/util-endpoints/src/types/TreeRuleObject.ts b/packages/util-endpoints/src/types/TreeRuleObject.ts index 9b937c0acff..34760eeb731 100644 --- a/packages/util-endpoints/src/types/TreeRuleObject.ts +++ b/packages/util-endpoints/src/types/TreeRuleObject.ts @@ -1,4 +1,4 @@ -import { RuleSetRules as __RuleSetRules, TreeRuleObject as __TreeRuleObject } from "@smithy/types"; +import type { RuleSetRules as __RuleSetRules, TreeRuleObject as __TreeRuleObject } from "@smithy/types"; export type RuleSetRules = __RuleSetRules; diff --git a/packages/util-endpoints/src/types/shared.ts b/packages/util-endpoints/src/types/shared.ts index 7d1d07e93d6..3e3500c12aa 100644 --- a/packages/util-endpoints/src/types/shared.ts +++ b/packages/util-endpoints/src/types/shared.ts @@ -1,4 +1,4 @@ -import { EndpointARN, EndpointPartition, Logger } from "@smithy/types"; +import type { EndpointARN, EndpointPartition, Logger } from "@smithy/types"; export type ReferenceObject = { ref: string }; diff --git a/packages/util-endpoints/src/utils/callFunction.ts b/packages/util-endpoints/src/utils/callFunction.ts index 6e4faf492b2..aafdcaa4b8d 100644 --- a/packages/util-endpoints/src/utils/callFunction.ts +++ b/packages/util-endpoints/src/utils/callFunction.ts @@ -1,4 +1,4 @@ -import { EvaluateOptions, Expression, FunctionObject, FunctionReturn } from "../types"; +import type { EvaluateOptions, Expression, FunctionObject, FunctionReturn } from "../types"; import { customEndpointFunctions } from "./customEndpointFunctions"; import { endpointFunctions } from "./endpointFunctions"; import { evaluateExpression } from "./evaluateExpression"; diff --git a/packages/util-endpoints/src/utils/customEndpointFunctions.ts b/packages/util-endpoints/src/utils/customEndpointFunctions.ts index b7c1ca4be79..777c878a51e 100644 --- a/packages/util-endpoints/src/utils/customEndpointFunctions.ts +++ b/packages/util-endpoints/src/utils/customEndpointFunctions.ts @@ -1,3 +1,3 @@ -import { EndpointFunctions } from "../types/EndpointFunctions"; +import type { EndpointFunctions } from "../types/EndpointFunctions"; export const customEndpointFunctions: { [key: string]: EndpointFunctions } = {}; diff --git a/packages/util-endpoints/src/utils/evaluateCondition.spec.ts b/packages/util-endpoints/src/utils/evaluateCondition.spec.ts index fc3167c5c49..21da8759888 100644 --- a/packages/util-endpoints/src/utils/evaluateCondition.spec.ts +++ b/packages/util-endpoints/src/utils/evaluateCondition.spec.ts @@ -1,7 +1,8 @@ import { describe, expect, test as it, vi } from "vitest"; import { debugId, toDebugString } from "../debug"; -import { EndpointError, EvaluateOptions } from "../types"; +import type { EvaluateOptions } from "../types"; +import { EndpointError } from "../types"; import { callFunction } from "./callFunction"; import { evaluateCondition } from "./evaluateCondition"; diff --git a/packages/util-endpoints/src/utils/evaluateCondition.ts b/packages/util-endpoints/src/utils/evaluateCondition.ts index 45d5f1b12a7..c7b0d9a09cb 100644 --- a/packages/util-endpoints/src/utils/evaluateCondition.ts +++ b/packages/util-endpoints/src/utils/evaluateCondition.ts @@ -1,5 +1,6 @@ import { debugId, toDebugString } from "../debug"; -import { ConditionObject, EndpointError, EvaluateOptions } from "../types"; +import type { ConditionObject, EvaluateOptions } from "../types"; +import { EndpointError } from "../types"; import { callFunction } from "./callFunction"; export const evaluateCondition = ({ assign, ...fnArgs }: ConditionObject, options: EvaluateOptions) => { diff --git a/packages/util-endpoints/src/utils/evaluateConditions.spec.ts b/packages/util-endpoints/src/utils/evaluateConditions.spec.ts index 91665b624b8..57cfcda036f 100644 --- a/packages/util-endpoints/src/utils/evaluateConditions.spec.ts +++ b/packages/util-endpoints/src/utils/evaluateConditions.spec.ts @@ -1,7 +1,7 @@ import { afterEach, describe, expect, test as it, vi } from "vitest"; import { debugId, toDebugString } from "../debug"; -import { ConditionObject, EvaluateOptions } from "../types"; +import type { ConditionObject, EvaluateOptions } from "../types"; import { evaluateCondition } from "./evaluateCondition"; import { evaluateConditions } from "./evaluateConditions"; diff --git a/packages/util-endpoints/src/utils/evaluateConditions.ts b/packages/util-endpoints/src/utils/evaluateConditions.ts index 70b7d30e0fc..4c97d49a515 100644 --- a/packages/util-endpoints/src/utils/evaluateConditions.ts +++ b/packages/util-endpoints/src/utils/evaluateConditions.ts @@ -1,5 +1,5 @@ import { debugId, toDebugString } from "../debug"; -import { ConditionObject, EvaluateOptions, FunctionReturn } from "../types"; +import type { ConditionObject, EvaluateOptions, FunctionReturn } from "../types"; import { evaluateCondition } from "./evaluateCondition"; export const evaluateConditions = (conditions: ConditionObject[] = [], options: EvaluateOptions) => { diff --git a/packages/util-endpoints/src/utils/evaluateEndpointRule.spec.ts b/packages/util-endpoints/src/utils/evaluateEndpointRule.spec.ts index c53427024e5..8ed7b6144a5 100644 --- a/packages/util-endpoints/src/utils/evaluateEndpointRule.spec.ts +++ b/packages/util-endpoints/src/utils/evaluateEndpointRule.spec.ts @@ -1,8 +1,8 @@ -import { EvaluateOptions } from "@smithy/types"; +import type { EvaluateOptions } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { debugId, toDebugString } from "../debug"; -import { ConditionObject, EndpointRuleObject } from "../types"; +import type { ConditionObject, EndpointRuleObject } from "../types"; import { evaluateConditions } from "./evaluateConditions"; import { evaluateEndpointRule } from "./evaluateEndpointRule"; import { getEndpointHeaders } from "./getEndpointHeaders"; diff --git a/packages/util-endpoints/src/utils/evaluateEndpointRule.ts b/packages/util-endpoints/src/utils/evaluateEndpointRule.ts index 0e59cb4c452..c25e8ac0dd1 100644 --- a/packages/util-endpoints/src/utils/evaluateEndpointRule.ts +++ b/packages/util-endpoints/src/utils/evaluateEndpointRule.ts @@ -1,7 +1,7 @@ -import { EndpointV2 } from "@smithy/types"; +import type { EndpointV2 } from "@smithy/types"; import { debugId, toDebugString } from "../debug"; -import { EndpointRuleObject, EvaluateOptions } from "../types"; +import type { EndpointRuleObject, EvaluateOptions } from "../types"; import { evaluateConditions } from "./evaluateConditions"; import { getEndpointHeaders } from "./getEndpointHeaders"; import { getEndpointProperties } from "./getEndpointProperties"; diff --git a/packages/util-endpoints/src/utils/evaluateErrorRule.spec.ts b/packages/util-endpoints/src/utils/evaluateErrorRule.spec.ts index 422fd679a83..b39822037a2 100644 --- a/packages/util-endpoints/src/utils/evaluateErrorRule.spec.ts +++ b/packages/util-endpoints/src/utils/evaluateErrorRule.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, test as it, vi } from "vitest"; -import { EndpointError, ErrorRuleObject } from "../types"; +import type { ErrorRuleObject } from "../types"; +import { EndpointError } from "../types"; import { evaluateConditions } from "./evaluateConditions"; import { evaluateErrorRule } from "./evaluateErrorRule"; import { evaluateExpression } from "./evaluateExpression"; diff --git a/packages/util-endpoints/src/utils/evaluateErrorRule.ts b/packages/util-endpoints/src/utils/evaluateErrorRule.ts index 78a8a3c97f7..4a212518b43 100644 --- a/packages/util-endpoints/src/utils/evaluateErrorRule.ts +++ b/packages/util-endpoints/src/utils/evaluateErrorRule.ts @@ -1,4 +1,5 @@ -import { EndpointError, ErrorRuleObject, EvaluateOptions } from "../types"; +import type { ErrorRuleObject, EvaluateOptions } from "../types"; +import { EndpointError } from "../types"; import { evaluateConditions } from "./evaluateConditions"; import { evaluateExpression } from "./evaluateExpression"; diff --git a/packages/util-endpoints/src/utils/evaluateExpression.ts b/packages/util-endpoints/src/utils/evaluateExpression.ts index 470b1267604..c3cdffc50be 100644 --- a/packages/util-endpoints/src/utils/evaluateExpression.ts +++ b/packages/util-endpoints/src/utils/evaluateExpression.ts @@ -1,4 +1,5 @@ -import { EndpointError, EvaluateOptions, Expression, FunctionObject, ReferenceObject } from "../types"; +import type { EvaluateOptions, Expression, FunctionObject, ReferenceObject } from "../types"; +import { EndpointError } from "../types"; import { callFunction } from "./callFunction"; import { evaluateTemplate } from "./evaluateTemplate"; import { getReferenceValue } from "./getReferenceValue"; diff --git a/packages/util-endpoints/src/utils/evaluateRules.spec.ts b/packages/util-endpoints/src/utils/evaluateRules.spec.ts index b99f16c9cfe..f8dea4e0da9 100644 --- a/packages/util-endpoints/src/utils/evaluateRules.spec.ts +++ b/packages/util-endpoints/src/utils/evaluateRules.spec.ts @@ -1,6 +1,7 @@ import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; -import { EndpointError, EndpointRuleObject, ErrorRuleObject, TreeRuleObject } from "../types"; +import type { EndpointRuleObject, ErrorRuleObject, TreeRuleObject } from "../types"; +import { EndpointError } from "../types"; import { evaluateEndpointRule } from "./evaluateEndpointRule"; import { evaluateErrorRule } from "./evaluateErrorRule"; import { evaluateRules } from "./evaluateRules"; diff --git a/packages/util-endpoints/src/utils/evaluateRules.ts b/packages/util-endpoints/src/utils/evaluateRules.ts index 357ee2d6703..3920d1cc6df 100644 --- a/packages/util-endpoints/src/utils/evaluateRules.ts +++ b/packages/util-endpoints/src/utils/evaluateRules.ts @@ -1,6 +1,7 @@ -import { EndpointV2 } from "@smithy/types"; +import type { EndpointV2 } from "@smithy/types"; -import { EndpointError, EvaluateOptions, RuleSetRules } from "../types"; +import type { EvaluateOptions, RuleSetRules } from "../types"; +import { EndpointError } from "../types"; import { evaluateEndpointRule } from "./evaluateEndpointRule"; import { evaluateErrorRule } from "./evaluateErrorRule"; import { evaluateTreeRule } from "./evaluateTreeRule"; diff --git a/packages/util-endpoints/src/utils/evaluateTemplate.ts b/packages/util-endpoints/src/utils/evaluateTemplate.ts index 4e03a9602e6..75cad355231 100644 --- a/packages/util-endpoints/src/utils/evaluateTemplate.ts +++ b/packages/util-endpoints/src/utils/evaluateTemplate.ts @@ -1,5 +1,5 @@ import { getAttr } from "../lib"; -import { EvaluateOptions } from "../types"; +import type { EvaluateOptions } from "../types"; export const evaluateTemplate = (template: string, options: EvaluateOptions) => { const evaluatedTemplateArr: string[] = []; diff --git a/packages/util-endpoints/src/utils/evaluateTreeRule.spec.ts b/packages/util-endpoints/src/utils/evaluateTreeRule.spec.ts index 16aafd2b3bf..0fe6efa9447 100644 --- a/packages/util-endpoints/src/utils/evaluateTreeRule.spec.ts +++ b/packages/util-endpoints/src/utils/evaluateTreeRule.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, test as it, vi } from "vitest"; -import { TreeRuleObject } from "../types"; +import type { TreeRuleObject } from "../types"; import { evaluateConditions } from "./evaluateConditions"; import { evaluateRules } from "./evaluateRules"; import { evaluateTreeRule } from "./evaluateTreeRule"; diff --git a/packages/util-endpoints/src/utils/evaluateTreeRule.ts b/packages/util-endpoints/src/utils/evaluateTreeRule.ts index 6c3ec2f09a7..ae0f54b8353 100644 --- a/packages/util-endpoints/src/utils/evaluateTreeRule.ts +++ b/packages/util-endpoints/src/utils/evaluateTreeRule.ts @@ -1,6 +1,6 @@ -import { EndpointV2 } from "@smithy/types"; +import type { EndpointV2 } from "@smithy/types"; -import { EvaluateOptions, TreeRuleObject } from "../types"; +import type { EvaluateOptions, TreeRuleObject } from "../types"; import { evaluateConditions } from "./evaluateConditions"; import { evaluateRules } from "./evaluateRules"; diff --git a/packages/util-endpoints/src/utils/getEndpointHeaders.ts b/packages/util-endpoints/src/utils/getEndpointHeaders.ts index e349fdaf60f..c2f62da79b1 100644 --- a/packages/util-endpoints/src/utils/getEndpointHeaders.ts +++ b/packages/util-endpoints/src/utils/getEndpointHeaders.ts @@ -1,4 +1,5 @@ -import { EndpointError, EndpointObjectHeaders, EvaluateOptions } from "../types"; +import type { EndpointObjectHeaders, EvaluateOptions } from "../types"; +import { EndpointError } from "../types"; import { evaluateExpression } from "./evaluateExpression"; export const getEndpointHeaders = (headers: EndpointObjectHeaders, options: EvaluateOptions) => diff --git a/packages/util-endpoints/src/utils/getEndpointProperties.ts b/packages/util-endpoints/src/utils/getEndpointProperties.ts index 6b1249c41d2..da0e667ef30 100644 --- a/packages/util-endpoints/src/utils/getEndpointProperties.ts +++ b/packages/util-endpoints/src/utils/getEndpointProperties.ts @@ -1,4 +1,4 @@ -import { EndpointObjectProperties, EvaluateOptions } from "../types"; +import type { EndpointObjectProperties, EvaluateOptions } from "../types"; import { getEndpointProperty } from "./getEndpointProperty"; export const getEndpointProperties = (properties: EndpointObjectProperties, options: EvaluateOptions) => diff --git a/packages/util-endpoints/src/utils/getEndpointProperty.ts b/packages/util-endpoints/src/utils/getEndpointProperty.ts index 5739b648b00..20bd0d6ef8c 100644 --- a/packages/util-endpoints/src/utils/getEndpointProperty.ts +++ b/packages/util-endpoints/src/utils/getEndpointProperty.ts @@ -1,6 +1,7 @@ -import { EndpointObjectProperty } from "@smithy/types"; +import type { EndpointObjectProperty } from "@smithy/types"; -import { EndpointError, EvaluateOptions } from "../types"; +import type { EvaluateOptions } from "../types"; +import { EndpointError } from "../types"; import { evaluateTemplate } from "./evaluateTemplate"; import { getEndpointProperties } from "./getEndpointProperties"; diff --git a/packages/util-endpoints/src/utils/getEndpointUrl.ts b/packages/util-endpoints/src/utils/getEndpointUrl.ts index ca3478826d2..865d59ccdf4 100644 --- a/packages/util-endpoints/src/utils/getEndpointUrl.ts +++ b/packages/util-endpoints/src/utils/getEndpointUrl.ts @@ -1,4 +1,4 @@ -import { EvaluateOptions, Expression } from "../types"; +import type { EvaluateOptions, Expression } from "../types"; import { EndpointError } from "../types"; import { evaluateExpression } from "./evaluateExpression"; diff --git a/packages/util-endpoints/src/utils/getReferenceValue.ts b/packages/util-endpoints/src/utils/getReferenceValue.ts index 43f817f81f9..b77eeef7113 100644 --- a/packages/util-endpoints/src/utils/getReferenceValue.ts +++ b/packages/util-endpoints/src/utils/getReferenceValue.ts @@ -1,4 +1,4 @@ -import { EvaluateOptions, ReferenceObject } from "../types"; +import type { EvaluateOptions, ReferenceObject } from "../types"; export const getReferenceValue = ({ ref }: ReferenceObject, options: EvaluateOptions) => { const referenceRecord = { diff --git a/packages/util-middleware/src/getSmithyContext.ts b/packages/util-middleware/src/getSmithyContext.ts index 70ad89bcf81..5f604cb0836 100644 --- a/packages/util-middleware/src/getSmithyContext.ts +++ b/packages/util-middleware/src/getSmithyContext.ts @@ -1,4 +1,5 @@ -import { HandlerExecutionContext, SMITHY_CONTEXT_KEY } from "@smithy/types"; +import type { HandlerExecutionContext } from "@smithy/types"; +import { SMITHY_CONTEXT_KEY } from "@smithy/types"; /** * @internal diff --git a/packages/util-middleware/src/normalizeProvider.ts b/packages/util-middleware/src/normalizeProvider.ts index 00693049620..3ac1342da1a 100644 --- a/packages/util-middleware/src/normalizeProvider.ts +++ b/packages/util-middleware/src/normalizeProvider.ts @@ -1,4 +1,4 @@ -import { Provider } from "@smithy/types"; +import type { Provider } from "@smithy/types"; /** * @internal diff --git a/packages/util-retry/src/AdaptiveRetryStrategy.spec.ts b/packages/util-retry/src/AdaptiveRetryStrategy.spec.ts index 5dd2b30ae02..b32a72932e7 100644 --- a/packages/util-retry/src/AdaptiveRetryStrategy.spec.ts +++ b/packages/util-retry/src/AdaptiveRetryStrategy.spec.ts @@ -1,11 +1,11 @@ -import { RetryErrorInfo, StandardRetryToken } from "@smithy/types"; +import type { RetryErrorInfo, StandardRetryToken } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { AdaptiveRetryStrategy } from "./AdaptiveRetryStrategy"; import { RETRY_MODES } from "./config"; import { DefaultRateLimiter } from "./DefaultRateLimiter"; import { StandardRetryStrategy } from "./StandardRetryStrategy"; -import { RateLimiter } from "./types"; +import type { RateLimiter } from "./types"; vi.mock("./StandardRetryStrategy"); vi.mock("./DefaultRateLimiter"); diff --git a/packages/util-retry/src/AdaptiveRetryStrategy.ts b/packages/util-retry/src/AdaptiveRetryStrategy.ts index b838e92266b..f416de09ad8 100644 --- a/packages/util-retry/src/AdaptiveRetryStrategy.ts +++ b/packages/util-retry/src/AdaptiveRetryStrategy.ts @@ -1,9 +1,9 @@ -import { Provider, RetryErrorInfo, RetryStrategyV2, RetryToken, StandardRetryToken } from "@smithy/types"; +import type { Provider, RetryErrorInfo, RetryStrategyV2, RetryToken, StandardRetryToken } from "@smithy/types"; import { RETRY_MODES } from "./config"; import { DefaultRateLimiter } from "./DefaultRateLimiter"; import { StandardRetryStrategy } from "./StandardRetryStrategy"; -import { RateLimiter } from "./types"; +import type { RateLimiter } from "./types"; /** * @public diff --git a/packages/util-retry/src/DefaultRateLimiter.ts b/packages/util-retry/src/DefaultRateLimiter.ts index f450fb91d77..dc345d9b1db 100644 --- a/packages/util-retry/src/DefaultRateLimiter.ts +++ b/packages/util-retry/src/DefaultRateLimiter.ts @@ -1,6 +1,6 @@ import { isThrottlingError } from "@smithy/service-error-classification"; -import { RateLimiter } from "./types"; +import type { RateLimiter } from "./types"; /** * @public diff --git a/packages/util-retry/src/StandardRetryStrategy.spec.ts b/packages/util-retry/src/StandardRetryStrategy.spec.ts index 43deee9c768..76f9455fa2c 100644 --- a/packages/util-retry/src/StandardRetryStrategy.spec.ts +++ b/packages/util-retry/src/StandardRetryStrategy.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { RetryErrorInfo, RetryErrorType } from "@smithy/types"; +import type { RetryErrorInfo, RetryErrorType } from "@smithy/types"; import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { RETRY_MODES } from "./config"; diff --git a/packages/util-retry/src/StandardRetryStrategy.ts b/packages/util-retry/src/StandardRetryStrategy.ts index d04b916be16..0ccb7c6f2c7 100644 --- a/packages/util-retry/src/StandardRetryStrategy.ts +++ b/packages/util-retry/src/StandardRetryStrategy.ts @@ -1,4 +1,4 @@ -import { Provider, RetryErrorInfo, RetryErrorType, RetryStrategyV2, StandardRetryToken } from "@smithy/types"; +import type { Provider, RetryErrorInfo, RetryErrorType, RetryStrategyV2, StandardRetryToken } from "@smithy/types"; import { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from "./config"; import { diff --git a/packages/util-retry/src/defaultRetryBackoffStrategy.ts b/packages/util-retry/src/defaultRetryBackoffStrategy.ts index 51057bca133..f944c4c91c7 100644 --- a/packages/util-retry/src/defaultRetryBackoffStrategy.ts +++ b/packages/util-retry/src/defaultRetryBackoffStrategy.ts @@ -1,4 +1,4 @@ -import { StandardRetryBackoffStrategy } from "@smithy/types"; +import type { StandardRetryBackoffStrategy } from "@smithy/types"; import { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY } from "./constants"; diff --git a/packages/util-retry/src/defaultRetryToken.ts b/packages/util-retry/src/defaultRetryToken.ts index 4d081d35ece..79777ba6e13 100644 --- a/packages/util-retry/src/defaultRetryToken.ts +++ b/packages/util-retry/src/defaultRetryToken.ts @@ -1,4 +1,4 @@ -import { StandardRetryToken } from "@smithy/types"; +import type { StandardRetryToken } from "@smithy/types"; import { MAXIMUM_RETRY_DELAY } from "./constants"; diff --git a/packages/util-stream-browser/src/getAwsChunkedEncodingStream.ts b/packages/util-stream-browser/src/getAwsChunkedEncodingStream.ts index e29a47fa504..5058755a988 100644 --- a/packages/util-stream-browser/src/getAwsChunkedEncodingStream.ts +++ b/packages/util-stream-browser/src/getAwsChunkedEncodingStream.ts @@ -1,4 +1,4 @@ -import { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; +import type { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; /** * @internal diff --git a/packages/util-stream-browser/src/sdk-stream-mixin.ts b/packages/util-stream-browser/src/sdk-stream-mixin.ts index 5fd86aabc05..890ec06edee 100644 --- a/packages/util-stream-browser/src/sdk-stream-mixin.ts +++ b/packages/util-stream-browser/src/sdk-stream-mixin.ts @@ -1,5 +1,5 @@ import { streamCollector } from "@smithy/fetch-http-handler"; -import { SdkStream, SdkStreamMixin } from "@smithy/types"; +import type { SdkStream, SdkStreamMixin } from "@smithy/types"; import { toBase64 } from "@smithy/util-base64"; import { toHex } from "@smithy/util-hex-encoding"; import { toUtf8 } from "@smithy/util-utf8"; diff --git a/packages/util-stream-node/src/getAwsChunkedEncodingStream.ts b/packages/util-stream-node/src/getAwsChunkedEncodingStream.ts index 7254d273836..896db996b06 100644 --- a/packages/util-stream-node/src/getAwsChunkedEncodingStream.ts +++ b/packages/util-stream-node/src/getAwsChunkedEncodingStream.ts @@ -1,4 +1,4 @@ -import { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; +import type { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; import { Readable } from "stream"; /** diff --git a/packages/util-stream-node/src/sdk-stream-mixin.ts b/packages/util-stream-node/src/sdk-stream-mixin.ts index 09672275ec2..bee2c0fb25e 100644 --- a/packages/util-stream-node/src/sdk-stream-mixin.ts +++ b/packages/util-stream-node/src/sdk-stream-mixin.ts @@ -1,5 +1,5 @@ import { streamCollector } from "@smithy/node-http-handler"; -import { SdkStream, SdkStreamMixin } from "@smithy/types"; +import type { SdkStream, SdkStreamMixin } from "@smithy/types"; import { fromArrayBuffer } from "@smithy/util-buffer-from"; import { Readable } from "stream"; import { TextDecoder } from "util"; diff --git a/packages/util-stream/src/checksum/ChecksumStream.browser.ts b/packages/util-stream/src/checksum/ChecksumStream.browser.ts index 18628dbc42c..e63104fcd00 100644 --- a/packages/util-stream/src/checksum/ChecksumStream.browser.ts +++ b/packages/util-stream/src/checksum/ChecksumStream.browser.ts @@ -1,4 +1,4 @@ -import { Checksum, Encoder } from "@smithy/types"; +import type { Checksum, Encoder } from "@smithy/types"; /** * @internal diff --git a/packages/util-stream/src/checksum/ChecksumStream.ts b/packages/util-stream/src/checksum/ChecksumStream.ts index 769d0076d5e..def4c1d8c76 100644 --- a/packages/util-stream/src/checksum/ChecksumStream.ts +++ b/packages/util-stream/src/checksum/ChecksumStream.ts @@ -1,6 +1,7 @@ -import { Checksum, Encoder } from "@smithy/types"; +import type { Checksum, Encoder } from "@smithy/types"; import { toBase64 } from "@smithy/util-base64"; -import { Duplex, Readable } from "stream"; +import type { Readable } from "stream"; +import { Duplex } from "stream"; /** * @internal diff --git a/packages/util-stream/src/checksum/createChecksumStream.browser.spec.ts b/packages/util-stream/src/checksum/createChecksumStream.browser.spec.ts index 13263d96565..29e2e2e00a2 100644 --- a/packages/util-stream/src/checksum/createChecksumStream.browser.spec.ts +++ b/packages/util-stream/src/checksum/createChecksumStream.browser.spec.ts @@ -1,4 +1,4 @@ -import { Checksum } from "@smithy/types"; +import type { Checksum } from "@smithy/types"; import { toBase64 } from "@smithy/util-base64"; import { toUtf8 } from "@smithy/util-utf8"; import { describe, expect, test as it } from "vitest"; diff --git a/packages/util-stream/src/checksum/createChecksumStream.browser.ts b/packages/util-stream/src/checksum/createChecksumStream.browser.ts index 6ca56bab956..6028555da7b 100644 --- a/packages/util-stream/src/checksum/createChecksumStream.browser.ts +++ b/packages/util-stream/src/checksum/createChecksumStream.browser.ts @@ -1,7 +1,8 @@ import { toBase64 } from "@smithy/util-base64"; import { isReadableStream } from "../stream-type-check"; -import { ChecksumStream, ChecksumStreamInit } from "./ChecksumStream.browser"; +import type { ChecksumStreamInit } from "./ChecksumStream.browser"; +import { ChecksumStream } from "./ChecksumStream.browser"; /** * @internal diff --git a/packages/util-stream/src/checksum/createChecksumStream.spec.ts b/packages/util-stream/src/checksum/createChecksumStream.spec.ts index ad34a1d706a..c3d0ac3a4b4 100644 --- a/packages/util-stream/src/checksum/createChecksumStream.spec.ts +++ b/packages/util-stream/src/checksum/createChecksumStream.spec.ts @@ -1,4 +1,4 @@ -import { Checksum } from "@smithy/types"; +import type { Checksum } from "@smithy/types"; import { toBase64 } from "@smithy/util-base64"; import { toUtf8 } from "@smithy/util-utf8"; import { Readable } from "stream"; diff --git a/packages/util-stream/src/checksum/createChecksumStream.ts b/packages/util-stream/src/checksum/createChecksumStream.ts index 348c8e8b860..e941c9d3a65 100644 --- a/packages/util-stream/src/checksum/createChecksumStream.ts +++ b/packages/util-stream/src/checksum/createChecksumStream.ts @@ -1,8 +1,10 @@ -import { Readable } from "stream"; +import type { Readable } from "stream"; import { isReadableStream } from "../stream-type-check"; -import { ChecksumStream, ChecksumStreamInit } from "./ChecksumStream"; -import { createChecksumStream as createChecksumStreamWeb, ReadableStreamType } from "./createChecksumStream.browser"; +import type { ChecksumStreamInit } from "./ChecksumStream"; +import { ChecksumStream } from "./ChecksumStream"; +import type { ReadableStreamType } from "./createChecksumStream.browser"; +import { createChecksumStream as createChecksumStreamWeb } from "./createChecksumStream.browser"; /** * @internal diff --git a/packages/util-stream/src/getAwsChunkedEncodingStream.browser.ts b/packages/util-stream/src/getAwsChunkedEncodingStream.browser.ts index e29a47fa504..5058755a988 100644 --- a/packages/util-stream/src/getAwsChunkedEncodingStream.browser.ts +++ b/packages/util-stream/src/getAwsChunkedEncodingStream.browser.ts @@ -1,4 +1,4 @@ -import { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; +import type { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; /** * @internal diff --git a/packages/util-stream/src/getAwsChunkedEncodingStream.ts b/packages/util-stream/src/getAwsChunkedEncodingStream.ts index 7254d273836..896db996b06 100644 --- a/packages/util-stream/src/getAwsChunkedEncodingStream.ts +++ b/packages/util-stream/src/getAwsChunkedEncodingStream.ts @@ -1,4 +1,4 @@ -import { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; +import type { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; import { Readable } from "stream"; /** diff --git a/packages/util-stream/src/headStream.ts b/packages/util-stream/src/headStream.ts index bdfee37d5f4..a0eb20645b6 100644 --- a/packages/util-stream/src/headStream.ts +++ b/packages/util-stream/src/headStream.ts @@ -1,4 +1,5 @@ -import { Readable, Writable } from "stream"; +import type { Readable } from "stream"; +import { Writable } from "stream"; import { headStream as headWebStream } from "./headStream.browser"; import { isReadableStream } from "./stream-type-check"; diff --git a/packages/util-stream/src/sdk-stream-mixin.browser.spec.ts b/packages/util-stream/src/sdk-stream-mixin.browser.spec.ts index 1f157f22b06..5dadf7ce38b 100644 --- a/packages/util-stream/src/sdk-stream-mixin.browser.spec.ts +++ b/packages/util-stream/src/sdk-stream-mixin.browser.spec.ts @@ -1,5 +1,5 @@ import { streamCollector } from "@smithy/fetch-http-handler"; -import { SdkStreamMixin } from "@smithy/types"; +import type { SdkStreamMixin } from "@smithy/types"; import { toBase64 } from "@smithy/util-base64"; import { toHex } from "@smithy/util-hex-encoding"; import { toUtf8 } from "@smithy/util-utf8"; diff --git a/packages/util-stream/src/sdk-stream-mixin.browser.ts b/packages/util-stream/src/sdk-stream-mixin.browser.ts index f91252527c0..ce4198c9841 100644 --- a/packages/util-stream/src/sdk-stream-mixin.browser.ts +++ b/packages/util-stream/src/sdk-stream-mixin.browser.ts @@ -1,5 +1,5 @@ import { streamCollector } from "@smithy/fetch-http-handler"; -import { SdkStream, SdkStreamMixin } from "@smithy/types"; +import type { SdkStream, SdkStreamMixin } from "@smithy/types"; import { toBase64 } from "@smithy/util-base64"; import { toHex } from "@smithy/util-hex-encoding"; import { toUtf8 } from "@smithy/util-utf8"; diff --git a/packages/util-stream/src/sdk-stream-mixin.spec.ts b/packages/util-stream/src/sdk-stream-mixin.spec.ts index 25d718af059..39b2dc5321f 100644 --- a/packages/util-stream/src/sdk-stream-mixin.spec.ts +++ b/packages/util-stream/src/sdk-stream-mixin.spec.ts @@ -1,6 +1,7 @@ -import { SdkStreamMixin } from "@smithy/types"; +import type { SdkStreamMixin } from "@smithy/types"; import { fromArrayBuffer } from "@smithy/util-buffer-from"; -import { PassThrough, Readable, Writable } from "stream"; +import type { Writable } from "stream"; +import { PassThrough, Readable } from "stream"; import { afterAll, beforeAll, beforeEach, describe, expect, test as it, vi } from "vitest"; import { sdkStreamMixin } from "./sdk-stream-mixin"; diff --git a/packages/util-stream/src/sdk-stream-mixin.ts b/packages/util-stream/src/sdk-stream-mixin.ts index 0796725056b..485772bcdad 100644 --- a/packages/util-stream/src/sdk-stream-mixin.ts +++ b/packages/util-stream/src/sdk-stream-mixin.ts @@ -1,5 +1,5 @@ import { streamCollector } from "@smithy/node-http-handler"; -import { SdkStream, SdkStreamMixin } from "@smithy/types"; +import type { SdkStream, SdkStreamMixin } from "@smithy/types"; import { fromArrayBuffer } from "@smithy/util-buffer-from"; import { Readable } from "stream"; diff --git a/packages/util-stream/src/util-stream.integ.spec.ts b/packages/util-stream/src/util-stream.integ.spec.ts index 09591c004f0..12d460f2d3c 100644 --- a/packages/util-stream/src/util-stream.integ.spec.ts +++ b/packages/util-stream/src/util-stream.integ.spec.ts @@ -1,5 +1,6 @@ -import { HttpHandler, HttpResponse } from "@smithy/protocol-http"; -import { HttpRequest as IHttpRequest } from "@smithy/types"; +import type { HttpHandler } from "@smithy/protocol-http"; +import { HttpResponse } from "@smithy/protocol-http"; +import type { HttpRequest as IHttpRequest } from "@smithy/types"; import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; import { fromUtf8 } from "@smithy/util-utf8"; import { Readable } from "stream"; diff --git a/packages/util-waiter/src/createWaiter.spec.ts b/packages/util-waiter/src/createWaiter.spec.ts index 5391205f61d..9ca08e17397 100644 --- a/packages/util-waiter/src/createWaiter.spec.ts +++ b/packages/util-waiter/src/createWaiter.spec.ts @@ -1,7 +1,8 @@ import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest"; import { createWaiter } from "./createWaiter"; -import { WaiterOptions, WaiterState } from "./waiter"; +import type { WaiterOptions } from "./waiter"; +import { WaiterState } from "./waiter"; vi.mock("./utils/validate", () => ({ validateWaiterOptions: vi.fn(), diff --git a/packages/util-waiter/src/createWaiter.ts b/packages/util-waiter/src/createWaiter.ts index 5b3ae20f2fb..235c27e5470 100644 --- a/packages/util-waiter/src/createWaiter.ts +++ b/packages/util-waiter/src/createWaiter.ts @@ -1,8 +1,9 @@ -import { AbortSignal as DeprecatedAbortSignal } from "@smithy/types"; +import type { AbortSignal as DeprecatedAbortSignal } from "@smithy/types"; import { runPolling } from "./poller"; import { validateWaiterOptions } from "./utils"; -import { WaiterOptions, WaiterResult, waiterServiceDefaults, WaiterState } from "./waiter"; +import type { WaiterOptions, WaiterResult } from "./waiter"; +import { waiterServiceDefaults, WaiterState } from "./waiter"; const abortTimeout = ( abortSignal: AbortSignal | DeprecatedAbortSignal diff --git a/packages/util-waiter/src/poller.spec.ts b/packages/util-waiter/src/poller.spec.ts index 355f772af1d..21d88adfa85 100644 --- a/packages/util-waiter/src/poller.spec.ts +++ b/packages/util-waiter/src/poller.spec.ts @@ -3,7 +3,8 @@ import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest" import { runPolling } from "./poller"; import { sleep } from "./utils/sleep"; -import { WaiterOptions, WaiterState } from "./waiter"; +import type { WaiterOptions } from "./waiter"; +import { WaiterState } from "./waiter"; vi.mock("./utils/sleep"); diff --git a/packages/util-waiter/src/poller.ts b/packages/util-waiter/src/poller.ts index 7fea53a9f77..3260ea79577 100644 --- a/packages/util-waiter/src/poller.ts +++ b/packages/util-waiter/src/poller.ts @@ -1,5 +1,6 @@ import { sleep } from "./utils/sleep"; -import { WaiterOptions, WaiterResult, WaiterState } from "./waiter"; +import type { WaiterOptions, WaiterResult } from "./waiter"; +import { WaiterState } from "./waiter"; /** * @internal diff --git a/packages/util-waiter/src/utils/validate.spec.ts b/packages/util-waiter/src/utils/validate.spec.ts index cdfed3da37d..136a2179abf 100644 --- a/packages/util-waiter/src/utils/validate.spec.ts +++ b/packages/util-waiter/src/utils/validate.spec.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, test as it } from "vitest"; -import { WaiterOptions } from "../waiter"; +import type { WaiterOptions } from "../waiter"; import { validateWaiterOptions } from "./validate"; describe(validateWaiterOptions.name, () => { diff --git a/packages/util-waiter/src/utils/validate.ts b/packages/util-waiter/src/utils/validate.ts index 84b4e759936..1d9d56ebc0e 100644 --- a/packages/util-waiter/src/utils/validate.ts +++ b/packages/util-waiter/src/utils/validate.ts @@ -1,4 +1,4 @@ -import { WaiterOptions } from "../waiter"; +import type { WaiterOptions } from "../waiter"; /** * @internal diff --git a/packages/util-waiter/src/waiter.ts b/packages/util-waiter/src/waiter.ts index 0bb1f6471eb..734dffca9c8 100644 --- a/packages/util-waiter/src/waiter.ts +++ b/packages/util-waiter/src/waiter.ts @@ -1,4 +1,4 @@ -import { WaiterConfiguration as WaiterConfiguration__ } from "@smithy/types"; +import type { WaiterConfiguration as WaiterConfiguration__ } from "@smithy/types"; /** * @internal From 364b0f01d41135eb477dcf766a1c0ecacf2719d9 Mon Sep 17 00:00:00 2001 From: George Fu Date: Wed, 3 Sep 2025 13:29:25 -0400 Subject: [PATCH 2/3] lint server libs --- .../server-apigateway/src/lambda.ts | 7 ++++--- .../server-common/src/httpbinding/mux.ts | 4 ++-- smithy-typescript-ssdk-libs/server-common/src/index.ts | 6 +++--- .../server-common/src/unique.spec.ts | 3 ++- .../server-common/src/validation/index.spec.ts | 9 +++++---- .../server-common/src/validation/index.ts | 2 +- .../server-common/src/validation/validators.spec.ts | 3 ++- .../server-common/src/validation/validators.ts | 7 ++++--- .../server-node/src/index.spec.ts | 5 +++-- smithy-typescript-ssdk-libs/server-node/src/node.ts | 10 ++++++---- 10 files changed, 32 insertions(+), 24 deletions(-) diff --git a/smithy-typescript-ssdk-libs/server-apigateway/src/lambda.ts b/smithy-typescript-ssdk-libs/server-apigateway/src/lambda.ts index e2d8fefc197..9be4412b935 100644 --- a/smithy-typescript-ssdk-libs/server-apigateway/src/lambda.ts +++ b/smithy-typescript-ssdk-libs/server-apigateway/src/lambda.ts @@ -13,9 +13,10 @@ * permissions and limitations under the License. */ -import { HeaderBag, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { QueryParameterBag } from "@smithy/types"; -import { +import type { HeaderBag, HttpResponse } from "@smithy/protocol-http"; +import { HttpRequest } from "@smithy/protocol-http"; +import type { QueryParameterBag } from "@smithy/types"; +import type { APIGatewayProxyEvent, APIGatewayProxyEventHeaders, APIGatewayProxyEventMultiValueHeaders, diff --git a/smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.ts b/smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.ts index c1a5877d539..0763f7d6584 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.ts @@ -13,9 +13,9 @@ * permissions and limitations under the License. */ -import { HttpRequest } from "@smithy/protocol-http"; +import type { HttpRequest } from "@smithy/protocol-http"; -import { Mux, ServiceCoordinate } from ".."; +import type { Mux, ServiceCoordinate } from ".."; export interface PathLiteralSegment { type: "path_literal"; diff --git a/smithy-typescript-ssdk-libs/server-common/src/index.ts b/smithy-typescript-ssdk-libs/server-common/src/index.ts index 933334368c4..63f7855c356 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/index.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/index.ts @@ -19,10 +19,10 @@ export * from "./errors"; export * from "./validation"; export * from "./unique"; -import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { SerdeContext } from "@smithy/types"; +import type { HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { SerdeContext } from "@smithy/types"; -import { ServiceException } from "./errors"; +import type { ServiceException } from "./errors"; export type Operation = (input: I, context: Context) => Promise; diff --git a/smithy-typescript-ssdk-libs/server-common/src/unique.spec.ts b/smithy-typescript-ssdk-libs/server-common/src/unique.spec.ts index a98c6f28dd7..5018c146570 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/unique.spec.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/unique.spec.ts @@ -15,7 +15,8 @@ import * as util from "util"; -import { findDuplicates, Input } from "./unique"; +import type { Input } from "./unique"; +import { findDuplicates } from "./unique"; describe("findDuplicates", () => { describe("finds duplicates in", () => { diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts index 1d4d725332b..03ba16205db 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts @@ -13,15 +13,16 @@ * permissions and limitations under the License. */ -import { +import type { EnumValidationFailure, - generateValidationMessage, IntegerEnumValidationFailure, LengthValidationFailure, PatternValidationFailure, RangeValidationFailure, - RequiredValidationFailure, - UniqueItemsValidationFailure, + UniqueItemsValidationFailure} from "./index"; +import { + generateValidationMessage, + RequiredValidationFailure } from "./index"; describe("message formatting", () => { diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/index.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/index.ts index df311119d28..7aaad0e80e0 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/index.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/index.ts @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -import { ServiceException } from "../errors"; +import type { ServiceException } from "../errors"; export * from "./validators"; diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts index 05d07bf4b02..c5d9f8729cb 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts @@ -13,6 +13,8 @@ * permissions and limitations under the License. */ +import type { + SingleConstraintValidator} from "./validators"; import { CompositeValidator, EnumValidator, @@ -21,7 +23,6 @@ import { PatternValidator, RangeValidator, SensitiveConstraintValidator, - SingleConstraintValidator, UniqueItemsValidator, } from "./validators"; diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts index 9d60b2ca2e1..5c05e3d7731 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts @@ -16,15 +16,16 @@ import { RE2 } from "re2-wasm"; import { findDuplicates } from "../unique"; -import { +import type { EnumValidationFailure, IntegerEnumValidationFailure, LengthValidationFailure, PatternValidationFailure, RangeValidationFailure, - RequiredValidationFailure, UniqueItemsValidationFailure, - ValidationFailure, + ValidationFailure} from "."; +import { + RequiredValidationFailure } from "."; export class CompositeValidator implements MultiConstraintValidator { diff --git a/smithy-typescript-ssdk-libs/server-node/src/index.spec.ts b/smithy-typescript-ssdk-libs/server-node/src/index.spec.ts index 8d999d127da..c10a8b839bf 100644 --- a/smithy-typescript-ssdk-libs/server-node/src/index.spec.ts +++ b/smithy-typescript-ssdk-libs/server-node/src/index.spec.ts @@ -4,10 +4,11 @@ */ import { mkdtemp } from "fs/promises"; -import { createServer, IncomingMessage, request, RequestOptions, Server, ServerResponse } from "http"; +import type { IncomingMessage, RequestOptions, Server, ServerResponse } from "http"; +import { createServer, request } from "http"; import * as os from "os"; import * as path from "path"; -import { Readable } from "stream"; +import type { Readable } from "stream"; import { convertRequest } from "./node"; diff --git a/smithy-typescript-ssdk-libs/server-node/src/node.ts b/smithy-typescript-ssdk-libs/server-node/src/node.ts index ee2751b1446..8792f33d3a7 100644 --- a/smithy-typescript-ssdk-libs/server-node/src/node.ts +++ b/smithy-typescript-ssdk-libs/server-node/src/node.ts @@ -3,10 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { HeaderBag, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { QueryParameterBag } from "@smithy/types"; -import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "http"; -import { URL, URLSearchParams } from "url"; +import type { HeaderBag, HttpResponse } from "@smithy/protocol-http"; +import { HttpRequest } from "@smithy/protocol-http"; +import type { QueryParameterBag } from "@smithy/types"; +import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "http"; +import type { URLSearchParams } from "url"; +import { URL } from "url"; function convertHeaders(headers: IncomingHttpHeaders): HeaderBag { // TODO make this proper From 498c66222f26ce948463a622d37068a3f52d4303 Mon Sep 17 00:00:00 2001 From: George Fu Date: Wed, 3 Sep 2025 13:31:30 -0400 Subject: [PATCH 3/3] lint private util --- private/util-test/src/test-http-handler.ts | 4 ++-- .../server-common/src/validation/index.spec.ts | 6 ++---- .../server-common/src/validation/validators.spec.ts | 3 +-- .../server-common/src/validation/validators.ts | 5 ++--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/private/util-test/src/test-http-handler.ts b/private/util-test/src/test-http-handler.ts index 94d8765576f..f3ddd6cff7e 100644 --- a/private/util-test/src/test-http-handler.ts +++ b/private/util-test/src/test-http-handler.ts @@ -1,5 +1,5 @@ -import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { Client, RequestHandler, RequestHandlerOutput } from "@smithy/types"; +import type { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { Client, RequestHandler, RequestHandlerOutput } from "@smithy/types"; import { expect } from "vitest"; /** diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts index 03ba16205db..13136d8c530 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/index.spec.ts @@ -19,11 +19,9 @@ import type { LengthValidationFailure, PatternValidationFailure, RangeValidationFailure, - UniqueItemsValidationFailure} from "./index"; -import { - generateValidationMessage, - RequiredValidationFailure + UniqueItemsValidationFailure, } from "./index"; +import { generateValidationMessage, RequiredValidationFailure } from "./index"; describe("message formatting", () => { it("does not return very large inputs", () => { diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts index c5d9f8729cb..7db745e29b4 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.spec.ts @@ -13,8 +13,7 @@ * permissions and limitations under the License. */ -import type { - SingleConstraintValidator} from "./validators"; +import type { SingleConstraintValidator } from "./validators"; import { CompositeValidator, EnumValidator, diff --git a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts index 5c05e3d7731..51b8e504986 100644 --- a/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts +++ b/smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts @@ -23,10 +23,9 @@ import type { PatternValidationFailure, RangeValidationFailure, UniqueItemsValidationFailure, - ValidationFailure} from "."; -import { - RequiredValidationFailure + ValidationFailure, } from "."; +import { RequiredValidationFailure } from "."; export class CompositeValidator implements MultiConstraintValidator { private readonly validators: SingleConstraintValidator[];