diff --git a/.vscode/settings.json b/.vscode/settings.json index e6cb6bba58b1..de93269a3abf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "editor.tabSize": 2, - "editor.formatOnSave": true + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" } diff --git a/clients/node/client-rds-data-node/.npmignore b/clients/node/client-rds-data-node/.npmignore index 826dc842e33d..9bda6bbaa691 100644 --- a/clients/node/client-rds-data-node/.npmignore +++ b/clients/node/client-rds-data-node/.npmignore @@ -1,6 +1,4 @@ /coverage/ /docs/ -*.ts -!*.d.ts tsconfig.test.json *.tsbuildinfo \ No newline at end of file diff --git a/clients/node/client-rds-data-node/RDSDataClient.ts b/clients/node/client-rds-data-node/RDSDataClient.ts index 85c9e5a19101..557826e5cee8 100644 --- a/clients/node/client-rds-data-node/RDSDataClient.ts +++ b/clients/node/client-rds-data-node/RDSDataClient.ts @@ -1,20 +1,34 @@ import { contentLengthPlugin } from "@aws-sdk/middleware-content-length"; -import { userAgentPlugin, UserAgentConfig } from "@aws-sdk/middleware-user-agent"; +import { + userAgentPlugin, + UserAgentConfig +} from "@aws-sdk/middleware-user-agent"; import { retryPlugin, RetryConfig } from "@aws-sdk/retry-middleware"; -import { awsAuthPlugin, AwsAuthConfiguration } from "@aws-sdk/signing-middleware"; +import { + awsAuthPlugin, + AwsAuthConfiguration +} from "@aws-sdk/signing-middleware"; import { RDSDataConfiguration, - RDSDataResolvedConfiguration, - RDSRuntimeConfiguration + RDSDataResolvedConfiguration } from "./RDSDataConfiguration"; -import { RegionConfiguration, EndpointsConfig, ProtocolConfig } from '@aws-sdk/config-resolver'; -import { HttpOptions, MetadataBearer } from '@aws-sdk/types'; +import { RDSRuntimeConfiguration } from "./runtimeConfig"; +import { + RegionConfiguration, + EndpointsConfig, + ProtocolConfig +} from "@aws-sdk/config-resolver"; +import { HttpOptions, MetadataBearer } from "@aws-sdk/types"; import { Client as SmithyClient } from "@aws-sdk/smithy-client"; type InputTypesUnion = any; type OutputTypesUnion = MetadataBearer; -export class RDSDataClient extends SmithyClient { +export class RDSDataClient extends SmithyClient< + HttpOptions, + InputTypesUnion, + OutputTypesUnion +> { readonly config: RDSDataResolvedConfiguration; constructor(configuration: RDSDataConfiguration) { @@ -36,9 +50,7 @@ export class RDSDataClient extends SmithyClient; - -export const RDSRuntimeConfiguration: AWSClientRuntimeResolvedConfiguration = { - protocolDefaultProvider: (handler) => new RestJsonProtocol(handler), - signingName: "rds-data", - service: "rds-data", - httpHandler: new NodeHttpHandler(), - sha256: Hash.bind(null, "sha256"), - credentialDefaultProvider, - regionDefaultProvider, - urlParser: parseUrl, - bodyLengthChecker: calculateBodyLength, - streamCollector, - base64Decoder: fromBase64, - base64Encoder: toBase64, - utf8Decoder: fromUtf8, - utf8Encoder: toUtf8, - defaultUserAgent: defaultUserAgent(name, version) + ProtocolConfigInput +} from "@aws-sdk/config-resolver"; +import { + Credentials, + Provider, + HashConstructor, + UrlParser, + Protocol, + StreamCollector, + Decoder, + Encoder +} from "@aws-sdk/types"; +import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http"; + +export interface RDSDataRuntimeDependencies { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs + */ + httpHandler?: HttpHandler; + + /** + * A constructor for a class implementing the @aws-sdk/types.Hash interface that computes the SHA-256 HMAC or checksum of a string or binary buffer + */ + sha256?: HashConstructor; + + /** + * Default credentials provider; Not available in browser runtime + */ + credentialDefaultProvider?: (input: any) => Provider; + + /** + * Provider function that return promise of a region string + */ + regionDefaultProvider?: (input: any) => Provider; + + /** + * The function that will be used to convert strings into HTTP endpoints + */ + urlParser?: UrlParser; + + /** + * A function that can calculate the length of a request body. + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + */ + streamCollector?: StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array + */ + base64Decoder?: Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string + */ + base64Encoder?: Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array + */ + utf8Decoder?: Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string + */ + utf8Encoder?: Encoder; + + /** + * The function that will be used to populate default value in 'User-Agent' header + */ + defaultUserAgent?: string; + + /** + * The function that will be used to populate serializing protocol + */ + protocolDefaultProvider?: ( + handler: HttpHandler + ) => Protocol; + + /** + * The service name with which to sign requests. + */ + signingName?: string; + + /** + * The service name with which to construct endpoints. + */ + service?: string; } -export type RDSDataConfiguration = AWSClientRuntimeConfiguration & +export type RDSDataConfiguration = RDSDataRuntimeDependencies & AwsAuthConfigurationInput & RegionConfigurationInput & RetryConfigInput & EndpointsConfigInput & ProtocolConfigInput & - UserAgentConfigInput + UserAgentConfigInput; -export type RDSDataResolvedConfiguration = AWSClientRuntimeResolvedConfiguration & +export type RDSDataResolvedConfiguration = Required< + RDSDataRuntimeDependencies +> & AwsAuthConfiguration.Resolved & RegionConfiguration.Resolved & RetryConfig.Resolved & EndpointsConfig.Resolved & ProtocolConfig.Resolved & - UserAgentConfig.Resolved \ No newline at end of file + UserAgentConfig.Resolved; diff --git a/clients/node/client-rds-data-node/README.md b/clients/node/client-rds-data-node/README.md index 3e9a43ba51c1..3d0ab51937e3 100644 --- a/clients/node/client-rds-data-node/README.md +++ b/clients/node/client-rds-data-node/README.md @@ -6,6 +6,7 @@ ## Description Amazon RDS Data Service +

Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless DB cluster. To run these statements, you work with the Data Service API.

diff --git a/clients/node/client-rds-data-node/commands/ExecuteStatementCommand.ts b/clients/node/client-rds-data-node/commands/ExecuteStatementCommand.ts index 7cdbdb7e3bcd..ad9f4765b4af 100644 --- a/clients/node/client-rds-data-node/commands/ExecuteStatementCommand.ts +++ b/clients/node/client-rds-data-node/commands/ExecuteStatementCommand.ts @@ -19,7 +19,7 @@ type OutputTypesUnion = any; export class ExecuteStatementCommand extends Command< ExecuteStatementRequest, ExecuteStatementResponse - > { +> { constructor(readonly input: ExecuteStatementRequest) { super(); } @@ -28,13 +28,18 @@ export class ExecuteStatementCommand extends Command< clientStack: MiddlewareStack, configuration: RDSDataResolvedConfiguration, options?: HttpOptions - ): Handler< - ExecuteStatementRequest, - ExecuteStatementResponse - > { - const { protocol: { handler } } = configuration; + ): Handler { + const { + protocol: { handler } + } = configuration; - this.use(serdePlugin(configuration, executeStatementSerializer, executeStatementDeserializer)); + this.use( + serdePlugin( + configuration, + executeStatementSerializer, + executeStatementDeserializer + ) + ); const stack = clientStack.concat(this.middlewareStack); diff --git a/clients/node/client-rds-data-node/index.browser.ts b/clients/node/client-rds-data-node/index.browser.ts deleted file mode 100644 index f9f57b235985..000000000000 --- a/clients/node/client-rds-data-node/index.browser.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export * from "./RDSDataClient"; -export * from "./RDSDataConfiguration"; -export * from "./commands/ExecuteStatementCommand"; \ No newline at end of file diff --git a/clients/node/client-rds-data-node/package.json b/clients/node/client-rds-data-node/package.json index d0ef2e8d7968..0b02f9f33ef1 100644 --- a/clients/node/client-rds-data-node/package.json +++ b/clients/node/client-rds-data-node/package.json @@ -14,17 +14,18 @@ "test": "exit 0", "smoke-test": "npm run pretest && node ./test/smoke/index.spec.js", "build:es": "tsc -p tsconfig.es.json", - "build:browser": "rollup -c", - "build": "yarn pretest && yarn build:es && yarn build:browser" + "build": "yarn pretest && yarn build:es" }, - "main": "./index.js", + "main": "./dist/cjs/index.js", "types": "./types/index.d.ts", "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" }, "module": "./dist/es/index.js", - "browser": "./dist/browser/rds-data-browser.js", + "browser": { + "./runtimeConfig": "./runtimeConfig.browser" + }, "sideEffects": false, "license": "Apache-2.0", "dependencies": { @@ -47,6 +48,7 @@ "@aws-sdk/signature-v4": "^0.1.0-preview.7", "@aws-sdk/signing-middleware": "^0.1.0-preview.7", "@aws-sdk/stream-collector-node": "^0.1.0-preview.6", + "@aws-sdk/stream-collector-browser": "^0.1.0-preview.5", "@aws-sdk/types": "^0.1.0-preview.5", "@aws-sdk/url-parser-browser": "^0.1.0-preview.5", "@aws-sdk/url-parser-node": "^0.1.0-preview.5", @@ -64,10 +66,6 @@ "@aws-sdk/client-documentation-generator": "^0.1.0-preview.3", "@types/node": "^10.0.0", "rimraf": "^2.6.2", - "rollup-plugin-json": "^4.0.0", - "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-replace": "^2.2.0", - "rollup-plugin-sourcemaps": "^0.4.2", "typedoc": "^0.14.2", "typescript": "^3.7.0-dev.20190926" } diff --git a/clients/node/client-rds-data-node/protocol/AwsRestJson1_1.ts b/clients/node/client-rds-data-node/protocol/AwsRestJson1_1.ts index 8acb3dcaf219..0525aae2260c 100644 --- a/clients/node/client-rds-data-node/protocol/AwsRestJson1_1.ts +++ b/clients/node/client-rds-data-node/protocol/AwsRestJson1_1.ts @@ -12,11 +12,11 @@ import { } from "../models/rdsdataservice"; import { HttpRequest, HttpResponse } from "@aws-sdk/protocol-http"; import { SerializerUtils, DeserializerUtils } from "@aws-sdk/types"; -import { ResponseMetadata } from "@aws-sdk/types"; +import { ResponseMetadata, Endpoint } from "@aws-sdk/types"; export function executeStatementAwsRestJson1_1Serialize( input: ExecuteStatementRequest, - utils: SerializerUtils + utils: SerializerUtils & { endpoint: Endpoint } ): HttpRequest { let body: any = {}; if (input.resourceArn !== undefined) { @@ -40,7 +40,10 @@ export function executeStatementAwsRestJson1_1Serialize( } if (input.parameters !== undefined) { - body.parameters = sqlParameterListAwsRestJson1_1Serialize(input.parameters, utils); + body.parameters = sqlParameterListAwsRestJson1_1Serialize( + input.parameters, + utils + ); } if (input.transactionId !== undefined) { @@ -56,6 +59,7 @@ export function executeStatementAwsRestJson1_1Serialize( } return new HttpRequest({ + ...utils.endpoint, body: JSON.stringify(body), path: "/Execute", method: "POST", @@ -133,16 +137,24 @@ const sqlParameterListAwsRestJson1_1Serialize = ( utils: SerializerUtils ): Array => input && - input.map(sqlParameter => sqlParameterAwsRestJson1_1Serialize(sqlParameter, utils)); + input.map(sqlParameter => + sqlParameterAwsRestJson1_1Serialize(sqlParameter, utils) + ); -const sqlParameterAwsRestJson1_1Serialize = (input: SqlParameter, utils: SerializerUtils): any => +const sqlParameterAwsRestJson1_1Serialize = ( + input: SqlParameter, + utils: SerializerUtils +): any => input.name && input.value && { name: input.name, value: fieldAwsRestJson1_1Serialize(input.value, utils) }; -const fieldAwsRestJson1_1Serialize = (input: Field, utils: SerializerUtils): any => +const fieldAwsRestJson1_1Serialize = ( + input: Field, + utils: SerializerUtils +): any => Field.visit(input, { blobValue: value => { value; @@ -249,7 +261,10 @@ const columnMetadataListAwsRestJson1_1Deserialize = ( columnMetadataAwsRestJson1_1Deserialize(columnMetadata, utils) ); -const fieldAwsRestJson1_1Deserialize = (input: any, utils: DeserializerUtils): any => +const fieldAwsRestJson1_1Deserialize = ( + input: any, + utils: DeserializerUtils +): any => Field.visit(input, { blobValue: value => { value; @@ -280,19 +295,33 @@ const fieldAwsRestJson1_1Deserialize = (input: any, utils: DeserializerUtils): a } }); -const generatedFieldsAwsRestJson1_1Deserialize = (input: any, utils: DeserializerUtils): Array => - input && input.map((field: any) => fieldAwsRestJson1_1Deserialize(field, utils)); +const generatedFieldsAwsRestJson1_1Deserialize = ( + input: any, + utils: DeserializerUtils +): Array => + input && + input.map((field: any) => fieldAwsRestJson1_1Deserialize(field, utils)); -const recordsAwsRestJson1_1Deserialize = (input: any, utils: DeserializerUtils): Array> => +const recordsAwsRestJson1_1Deserialize = ( + input: any, + utils: DeserializerUtils +): Array> => input && input.map((recordsList: any) => recordsListAwsRestJson1_1Deserialize(recordsList, utils) ); -const recordsListAwsRestJson1_1Deserialize = (input: any, utils: DeserializerUtils): Array => - input && input.map((field: any) => fieldAwsRestJson1_1Deserialize(field, utils)); +const recordsListAwsRestJson1_1Deserialize = ( + input: any, + utils: DeserializerUtils +): Array => + input && + input.map((field: any) => fieldAwsRestJson1_1Deserialize(field, utils)); -const badRequestExceptionDeserialize = (input: any, utils: DeserializerUtils): BadRequestException => ({ +const badRequestExceptionDeserialize = ( + input: any, + utils: DeserializerUtils +): BadRequestException => ({ __type: "com.amazon.rdsdataservice#BadRequestException", $name: "BadRequestException", $fault: "client", @@ -310,7 +339,10 @@ const statementTimeoutExceptionDeserialize = ( dbConnectionId: input.dbConnectionId }); -const forbiddenExceptionDeserialize = (input: any, utils: DeserializerUtils): ForbiddenException => ({ +const forbiddenExceptionDeserialize = ( + input: any, + utils: DeserializerUtils +): ForbiddenException => ({ __type: "com.amazon.rdsdataservice#ForbiddenException", $name: "ForbiddenException", $fault: "client", diff --git a/clients/node/client-rds-data-node/protocol/ExecuteStatement.ts b/clients/node/client-rds-data-node/protocol/ExecuteStatement.ts index 804b2115e99a..498067f87428 100644 --- a/clients/node/client-rds-data-node/protocol/ExecuteStatement.ts +++ b/clients/node/client-rds-data-node/protocol/ExecuteStatement.ts @@ -33,4 +33,4 @@ export async function executeStatementDeserializer( default: throw new Error("Unknown protocol, use aws.rest-json-1.1"); } -} \ No newline at end of file +} diff --git a/clients/node/client-rds-data-node/rollup.config.js b/clients/node/client-rds-data-node/rollup.config.js deleted file mode 100644 index d305c9009c4d..000000000000 --- a/clients/node/client-rds-data-node/rollup.config.js +++ /dev/null @@ -1,145 +0,0 @@ -import sourcemaps from "rollup-plugin-sourcemaps"; -import replace from "rollup-plugin-replace"; -import resolve from "rollup-plugin-node-resolve"; -import importJson from "rollup-plugin-json"; - -const pkg = require("./package.json"); -const depNames = Object.keys(pkg.dependencies); - -export function browserConfig(test = false, production = false) { - const baseConfig = { - input: "dist/es/index.browser.js", - output: { - file: "dist/browser/rds-data-browser.js", - format: "esm", - sourcemap: true - }, - preserveSymlinks: false, - external: [...depNames], - plugins: [ - replace(dependencyReplacement.base64), - replace(dependencyReplacement.bodyLengthChecker), - replace(dependencyReplacement.credentialProvider), - replace(dependencyReplacement.httpHandler), - replace(dependencyReplacement.regionProvider), - replace(dependencyReplacement.sha256), - replace(dependencyReplacement.streamCollector), - replace(dependencyReplacement.urlParser), - replace(dependencyReplacement.userAgent), - replace(dependencyReplacement.utf8), - importJson(), - resolve(), - sourcemaps() - ] - }; - - return baseConfig; -} - -export const ReplaceLocations = { - CLIENT: "dist/es/*Client.js", - CONFIGURATION: "dist/es/*Configuration.js", -} - -export const dependencyReplacement = { - userAgent: { - include: [ReplaceLocations.CLIENT], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_util_user_agent_node from "@aws-sdk/util-user-agent-node"': - 'import * as __aws_sdk_util_user_agent_browser from "@aws-sdk/util-user-agent-browser"', - '"User-Agent": __aws_sdk_util_user_agent_node': - '"User-Agent": __aws_sdk_util_user_agent_browser' - } - }, - utf8: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_util_utf8_node from "@aws-sdk/util-utf8-node";': 'import * as __aws_sdk_util_utf8_browser from "@aws-sdk/util-utf8-browser"', - 'defaultValue: __aws_sdk_util_utf8_node': - 'defaultValue: __aws_sdk_util_utf8_browser', - } - }, - regionProvider: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_region_provider from "@aws-sdk/region-provider"': '', - 'defaultProvider: __aws_sdk_region_provider': - 'defaultProvider: {defaultProvider: __aws_sdk_invalid_dependency.invalidFunction("Credentials is required")}', - } - }, - urlParser: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_url_parser_node from "@aws-sdk/url-parser-node"': - 'import * as __aws_sdk_url_parser_browser from "@aws-sdk/url-parser-browser"', - "defaultValue: __aws_sdk_url_parser_node": - "defaultValue: __aws_sdk_url_parser_browser" - } - }, - streamCollector: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_stream_collector_node from "@aws-sdk/stream-collector-node"': - 'import * as __aws_sdk_stream_collector_browser from "@aws-sdk/stream-collector-browser"', - "defaultValue: __aws_sdk_stream_collector_node.streamCollector": - "defaultValue: __aws_sdk_stream_collector_browser.streamCollector" - } - }, - base64: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_util_base64_node from "@aws-sdk/util-base64-node"': - 'import * as __aws_sdk_util_base64_browser from "@aws-sdk/util-base64-browser"', - "defaultValue: __aws_sdk_util_base64_node": - "defaultValue: __aws_sdk_util_base64_browser" - } - }, - bodyLengthChecker: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_util_body_length_node from "@aws-sdk/util-body-length-node"': - 'import * as __aws_sdk_util_body_length_browser from "@aws-sdk/util-body-length-browser"', - "defaultValue: __aws_sdk_util_body_length_node": - "defaultValue: __aws_sdk_util_body_length_browser" - } - }, - sha256: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_hash_node from "@aws-sdk/hash-node"': - 'import * as __aws_crypto_sha256_browser from "@aws-crypto/sha256-browser"', - 'defaultValue: __aws_sdk_hash_node.Hash.bind(null, "sha256")': - "defaultValue: __aws_crypto_sha256_browser.Sha256" - } - }, - credentialProvider: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'import * as __aws_sdk_credential_provider_node from "@aws-sdk/credential-provider-node"': - 'import * as __aws_sdk_invalid_dependency from "@aws-sdk/invalid-dependency"', - "__aws_sdk_credential_provider_node.defaultProvider": - "__aws_sdk_invalid_dependency.invalidFunction('Credentials is required')" - } - }, - httpHandler: { - include: [ReplaceLocations.CONFIGURATION], - delimiters: ["", ""], - values: { - 'from "@aws-sdk/node-http-handler"': - "from '@aws-sdk/fetch-http-handler'", - "__aws_sdk_http_handler.NodeHttpHandler(configuration)": - "__aws_sdk_http_handler.FetchHttpHandler(configuration)" - } - } -} - -export default browserConfig(false, false); \ No newline at end of file diff --git a/clients/node/client-rds-data-node/runtimeConfig.browser.ts b/clients/node/client-rds-data-node/runtimeConfig.browser.ts new file mode 100644 index 000000000000..1b0b420a864b --- /dev/null +++ b/clients/node/client-rds-data-node/runtimeConfig.browser.ts @@ -0,0 +1,30 @@ +import { invalidFunction } from "@aws-sdk/invalid-dependency"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { streamCollector } from "@aws-sdk/stream-collector-browser"; +import { RestJsonProtocol } from "@aws-sdk/protocol-rest-json"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { name, version } from "./package.json"; +import { RDSDataRuntimeDependencies } from "./RDSDataConfiguration"; + +export const RDSRuntimeConfiguration: Required = { + protocolDefaultProvider: handler => new RestJsonProtocol(handler), + signingName: "rds-data", + service: "rds-data", + httpHandler: new FetchHttpHandler(), + sha256: Sha256, + credentialDefaultProvider: invalidFunction("Credential is missing") as any, + regionDefaultProvider: invalidFunction("Region is missing") as any, + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version) +}; diff --git a/clients/node/client-rds-data-node/runtimeConfig.ts b/clients/node/client-rds-data-node/runtimeConfig.ts new file mode 100644 index 000000000000..670cd8ebe69d --- /dev/null +++ b/clients/node/client-rds-data-node/runtimeConfig.ts @@ -0,0 +1,31 @@ +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NodeHttpHandler } from "@aws-sdk/node-http-handler"; +import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider"; +import { parseUrl } from "@aws-sdk/url-parser-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { streamCollector } from "@aws-sdk/stream-collector-node"; +import { RestJsonProtocol } from "@aws-sdk/protocol-rest-json"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { name, version } from "./package.json"; +import { RDSDataRuntimeDependencies } from "./RDSDataConfiguration"; + +export const RDSRuntimeConfiguration: Required = { + protocolDefaultProvider: handler => new RestJsonProtocol(handler), + signingName: "rds-data", + service: "rds-data", + httpHandler: new NodeHttpHandler(), + sha256: Hash.bind(null, "sha256"), + credentialDefaultProvider, + regionDefaultProvider, + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version) +}; diff --git a/clients/node/client-rds-data-node/tsconfig.es.json b/clients/node/client-rds-data-node/tsconfig.es.json index 7692b3069926..60e5ef3e90cd 100644 --- a/clients/node/client-rds-data-node/tsconfig.es.json +++ b/clients/node/client-rds-data-node/tsconfig.es.json @@ -15,4 +15,4 @@ ], "outDir": "dist/es" } -} \ No newline at end of file +} diff --git a/clients/node/client-rds-data-node/tsconfig.json b/clients/node/client-rds-data-node/tsconfig.json index f67fed3509bc..d0d1a7e6f04f 100644 --- a/clients/node/client-rds-data-node/tsconfig.json +++ b/clients/node/client-rds-data-node/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "alwaysStrict": true, "target": "es2017", "module": "commonjs", "declaration": true, @@ -10,7 +11,9 @@ "noEmitHelpers": true, "incremental": true, "resolveJsonModule": true, - "declarationDir": "./types" + "noUnusedLocals": true, + "declarationDir": "./types", + "outDir": "dist/cjs" }, "typedocOptions": { "exclude": "**/node_modules/**", @@ -22,4 +25,4 @@ "out": "./docs", "plugin": "@aws-sdk/client-documentation-generator" } -} \ No newline at end of file +} diff --git a/packages/config-resolver/src/EndpointsConfig.ts b/packages/config-resolver/src/EndpointsConfig.ts new file mode 100644 index 000000000000..79157e40835e --- /dev/null +++ b/packages/config-resolver/src/EndpointsConfig.ts @@ -0,0 +1,64 @@ +import { Provider, UrlParser, Endpoint } from "@aws-sdk/types"; + +export function normalizeEndpoint( + endpoint?: string | Endpoint | Provider, + urlParser?: UrlParser +): Provider { + if (typeof endpoint === "string") { + const promisified = Promise.resolve(urlParser!(endpoint)); + return () => promisified; + } else if (typeof endpoint === "object") { + const promisified = Promise.resolve(endpoint); + return () => promisified; + } + return endpoint!; +} + +export namespace EndpointsConfig { + export interface Input { + /** + * The fully qualified endpoint of the webservice. This is only required when using a custom endpoint (for example, when using a local version of S3). + */ + endpoint?: string | Endpoint | Provider; + + /** + * The endpoint provider to call if no endpoint is provided + */ + endpointProvider?: any; + + /** + * Whether TLS is enabled for requests. + */ + tls?: boolean; + } + interface PreviouslyResolved { + urlParser: UrlParser; + region: Provider; + service: string; + } + export interface Resolved extends Required { + endpoint: Provider; + } + export function resolve( + input: T & Input & PreviouslyResolved + ): T & Resolved { + const tls = input.tls || true; + const defaultProvider = (tls: boolean, region: string) => ({ + protocol: tls ? "https:" : "http:", + path: "/", + hostname: `${input.service}.${region}.amazonaws.com` + }); + const endpointProvider = input.endpointProvider || defaultProvider; + let endpoint: Provider = input.endpoint + ? normalizeEndpoint(input.endpoint, input.urlParser) + : () => input.region().then(region => endpointProvider(tls, region)); + return { + ...input, + endpointProvider, + endpoint, + tls + }; + } +} +//export separately for showing comment block in Intellisense +export type EndpointsConfigInput = EndpointsConfig.Input; diff --git a/packages/config-resolver/src/ProtocolConfig.ts b/packages/config-resolver/src/ProtocolConfig.ts new file mode 100644 index 000000000000..3851ecf3ddd7 --- /dev/null +++ b/packages/config-resolver/src/ProtocolConfig.ts @@ -0,0 +1,29 @@ +import { Protocol, HttpOptions } from "@aws-sdk/types"; +import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http"; + +export namespace ProtocolConfig { + export interface Input { + /** + * The serializing protocol to used in request + */ + protocol?: Protocol; + } + interface PreviouslyResolved { + httpHandler: HttpHandler; + protocolDefaultProvider: ( + handler: HttpHandler + ) => Protocol; + } + export type Resolved = Required; + export function resolve( + input: T & Input & PreviouslyResolved + ): T & Resolved { + return { + ...input, + protocol: + input.protocol || input.protocolDefaultProvider(input.httpHandler) + }; + } +} +//export separately for showing comment block in Intellisense +export type ProtocolConfigInput = ProtocolConfig.Input; diff --git a/packages/config-resolver/src/RegionConfig.ts b/packages/config-resolver/src/RegionConfig.ts new file mode 100644 index 000000000000..67be54fd208c --- /dev/null +++ b/packages/config-resolver/src/RegionConfig.ts @@ -0,0 +1,35 @@ +import { Provider } from "@aws-sdk/types"; + +export namespace RegionConfiguration { + export interface Input { + /** + * The AWS region to which this client will send requests + */ + region?: string | Provider; + } + interface PreviouslyResolved { + regionDefaultProvider: (input: any) => Provider; + } + export interface Resolved { + region: Provider; + } + export function resolve( + input: T & Input & PreviouslyResolved + ): T & Resolved { + let region = input.region || input.regionDefaultProvider(input as any); + return { + ...input, + region: normalizeRegion(region) + }; + } +} +//export separately for showing comment block in Intellisense +export type RegionConfigurationInput = RegionConfiguration.Input; + +function normalizeRegion(region: string | Provider): Provider { + if (typeof region === "string") { + const promisified = Promise.resolve(region); + return () => promisified; + } + return region as Provider; +} diff --git a/packages/config-resolver/src/components.ts b/packages/config-resolver/src/components.ts deleted file mode 100644 index 97052e2b54b8..000000000000 --- a/packages/config-resolver/src/components.ts +++ /dev/null @@ -1,222 +0,0 @@ -import { - Credentials, - Provider, - HashConstructor, - UrlParser, - Protocol, - HttpOptions, - StreamCollector, - Decoder, - Encoder -} from "@aws-sdk/types"; -import { - HttpEndpoint, - HttpHandler, - HttpRequest, - HttpResponse -} from "@aws-sdk/protocol-http"; - -export interface RuntimeDependencies { - /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs - */ - httpHandler?: HttpHandler; - - /** - * A constructor for a class implementing the @aws-sdk/types.Hash interface that computes the SHA-256 HMAC or checksum of a string or binary buffer - */ - sha256?: HashConstructor; - - /** - * Default credentials provider; Not available in browser runtime - */ - credentialDefaultProvider?: (input: any) => Provider; - - /** - * Provider function that return promise of a region string - */ - regionDefaultProvider?: (input: any) => Provider; - - /** - * The function that will be used to convert strings into HTTP endpoints - */ - urlParser?: UrlParser; - - /** - * A function that can calculate the length of a request body. - */ - bodyLengthChecker?: (body: any) => number | undefined; - - /** - * A function that converts a stream into an array of bytes. - */ - streamCollector?: StreamCollector; - - /** - * The function that will be used to convert a base64-encoded string to a byte array - */ - base64Decoder?: Decoder; - - /** - * The function that will be used to convert binary data to a base64-encoded string - */ - base64Encoder?: Encoder; - - /** - * The function that will be used to convert a UTF8-encoded string to a byte array - */ - utf8Decoder?: Decoder; - - /** - * The function that will be used to convert binary data to a UTF-8 encoded string - */ - utf8Encoder?: Encoder; - - /** - * The function that will be used to populate default value in 'User-Agent' header - */ - defaultUserAgent?: string; -} - -export interface AWSClientRuntimeConfiguration extends RuntimeDependencies { - /** - * The function that will be used to populate serializing protocol - */ - protocolDefaultProvider?: ( - handler: HttpHandler - ) => Protocol; - - /** - * The service name with which to sign requests. - */ - signingName?: string; - - /** - * The service name with which to construct endpoints. - */ - service?: string; -} - -export function normalizeProvider(input: T | Provider): Provider { - if (typeof input === "object") { - const promisified = Promise.resolve(input); - return () => promisified; - } - return input as Provider; -} - -export function normalizeEndpoint( - endpoint?: string | HttpEndpoint | Provider, - urlParser?: UrlParser -): Provider { - if (typeof endpoint === "string") { - const promisified = Promise.resolve(urlParser!(endpoint)); - return () => promisified; - } else if (typeof endpoint === "object") { - const promisified = Promise.resolve(endpoint); - return () => promisified; - } - return endpoint!; -} - -export namespace RegionConfiguration { - export interface Input { - /** - * The AWS region to which this client will send requests - */ - region?: string | Provider; - } - interface PreviouslyResolved { - regionDefaultProvider: (input: any) => Provider; - } - export interface Resolved { - region: Provider; - } - export function resolve( - input: T & Input & PreviouslyResolved - ): T & Resolved { - let region = input.region || input.regionDefaultProvider(input as any); - return { - ...input, - region: normalizeProvider(region) - }; - } -} -//export separately for showing comment block in Intellisense -export type RegionConfigurationInput = RegionConfiguration.Input; - -export namespace EndpointsConfig { - export interface Input { - /** - * The fully qualified endpoint of the webservice. This is only required when using a custom endpoint (for example, when using a local version of S3). - */ - endpoint?: string | HttpEndpoint | Provider; - - /** - * The endpoint provider to call if no endpoint is provided - */ - endpointProvider?: any; - - /** - * Whether TLS is enabled for requests. - */ - tls?: boolean; - } - interface PreviouslyResolved { - urlParser: UrlParser; - region: Provider; - service: string; - } - export interface Resolved extends Required { - endpoint: Provider; - } - export function resolve( - input: T & Input & PreviouslyResolved - ): T & Resolved { - const tls = input.tls || true; - const defaultProvider = (tls: boolean, region: string) => ({ - protocol: tls ? "https:" : "http:", - path: "/", - hostname: `${input.service}.${region}.amazonaws.com` - }); - const endpointProvider = input.endpointProvider || defaultProvider; - let endpoint: Provider = input.endpoint - ? normalizeEndpoint(input.endpoint, input.urlParser) - : () => input.region().then(region => endpointProvider(tls, region)); - return { - ...input, - endpointProvider, - endpoint, - tls - }; - } -} -//export separately for showing comment block in Intellisense -export type EndpointsConfigInput = EndpointsConfig.Input; - -export namespace ProtocolConfig { - export interface Input { - /** - * The serializing protocol to used in request - */ - protocol?: Protocol; - } - interface PreviouslyResolved { - httpHandler: HttpHandler; - protocolDefaultProvider: ( - handler: HttpHandler - ) => Protocol; - } - export type Resolved = Required; - export function resolve( - input: T & Input & PreviouslyResolved - ): T & Resolved { - return { - ...input, - protocol: - input.protocol || input.protocolDefaultProvider(input.httpHandler) - }; - } -} -//export separately for showing comment block in Intellisense -export type ProtocolConfigInput = ProtocolConfig.Input; diff --git a/packages/config-resolver/src/index.ts b/packages/config-resolver/src/index.ts index 40b494c5f873..629edb514c01 100644 --- a/packages/config-resolver/src/index.ts +++ b/packages/config-resolver/src/index.ts @@ -1 +1,3 @@ -export * from "./components"; +export * from "./EndpointsConfig"; +export * from "./RegionConfig"; +export * from "./ProtocolConfig"; diff --git a/packages/invalid-dependency/src/index.ts b/packages/invalid-dependency/src/index.ts index cf9d0bb000cb..b86c69139c0d 100644 --- a/packages/invalid-dependency/src/index.ts +++ b/packages/invalid-dependency/src/index.ts @@ -1,3 +1,3 @@ -export function invalidFunction(message: string) { +export const invalidFunction = (message: string) => () => { throw new Error(message); -} +}; diff --git a/packages/middleware-serde/src/serdePlugin.ts b/packages/middleware-serde/src/serdePlugin.ts index 38027c966d53..29556e0b16aa 100644 --- a/packages/middleware-serde/src/serdePlugin.ts +++ b/packages/middleware-serde/src/serdePlugin.ts @@ -4,18 +4,20 @@ import { Injectable, Protocol, MetadataBearer, - MiddlewareStack + MiddlewareStack, + EndpointBearer, + Provider } from "@aws-sdk/types"; import { deserializerMiddleware } from "./deserializerMiddleware"; import { serializerMiddleware } from "./serializerMiddleware"; export function serdePlugin< InputType extends object, - SerializerRuntimeUtils, + SerializerRuntimeUtils extends EndpointBearer, OutputType extends MetadataBearer, DeserializerRuntimeUtils >( - config: SerializerRuntimeUtils & + config: PromisifyEndpoint & DeserializerRuntimeUtils & { protocol: Protocol }, serializer: RequestSerializer, deserializer: ResponseDeserializer @@ -31,3 +33,7 @@ export function serdePlugin< }); }; } + +export type PromisifyEndpoint = { + [K in keyof T]: K extends "endpoint" ? Provider : T[K]; +}; diff --git a/packages/middleware-serde/src/serializerMiddleware.ts b/packages/middleware-serde/src/serializerMiddleware.ts index 72adf4249542..8c0fa1610f65 100644 --- a/packages/middleware-serde/src/serializerMiddleware.ts +++ b/packages/middleware-serde/src/serializerMiddleware.ts @@ -4,15 +4,17 @@ import { SerializeHandlerArguments, SerializeHandlerOutput, SerializeMiddleware, - Protocol + Protocol, + EndpointBearer } from "@aws-sdk/types"; +import { PromisifyEndpoint } from "./serdePlugin"; export function serializerMiddleware< Input extends object, Output extends object, - RuntimeUtils = any + RuntimeUtils extends EndpointBearer >( - options: { protocol: Protocol } & RuntimeUtils, + options: { protocol: Protocol } & PromisifyEndpoint, serializer: RequestSerializer ): SerializeMiddleware { return ( @@ -20,7 +22,15 @@ export function serializerMiddleware< ): SerializeHandler => async ( args: SerializeHandlerArguments ): Promise> => { - const request = options.protocol.serialize(serializer, args.input, options); + const endpointResolvedOptions = { + ...options, + endpoint: await options.endpoint() + }; + const request = options.protocol.serialize( + serializer, + args.input, + endpointResolvedOptions + ); return next({ ...args, request diff --git a/packages/types/src/client.ts b/packages/types/src/client.ts index dbff770e57e4..4bcabc6bef03 100644 --- a/packages/types/src/client.ts +++ b/packages/types/src/client.ts @@ -3,7 +3,7 @@ import { Structure } from "./protocol"; import { Provider, Decoder, Encoder, UrlParser } from "./util"; // import { StreamCollector, ResponseParser } from "./unmarshaller"; import { RequestSerializer } from "./serializer"; -import { HttpEndpoint } from "./http"; +import { Endpoint } from "./http"; import { TransferHandler } from "./transfer"; import { Command } from "./command"; import { MetadataBearer } from "./response"; @@ -77,7 +77,7 @@ export interface ClientResolvedConfigurationBase { sslEnabled?: boolean; urlParser?: UrlParser; endpointProvider?: any; - endpoint?: Provider; + endpoint?: Provider; base64Decoder?: Decoder; base64Encoder?: Encoder; utf8Decoder?: Decoder; diff --git a/packages/types/src/http.ts b/packages/types/src/http.ts index fe190e70d82a..44afa7cec2f9 100644 --- a/packages/types/src/http.ts +++ b/packages/types/src/http.ts @@ -61,7 +61,7 @@ export interface QueryParameterBag { [key: string]: string | Array | null; } -export interface HttpEndpoint { +export interface Endpoint { protocol: string; hostname: string; port?: number; @@ -75,7 +75,7 @@ export interface HttpEndpoint { */ export interface HttpRequest extends HttpMessage, - HttpEndpoint { + Endpoint { method: string; } diff --git a/packages/types/src/serializer.ts b/packages/types/src/serializer.ts index 6b2ffd78f3b8..95480de4dc64 100644 --- a/packages/types/src/serializer.ts +++ b/packages/types/src/serializer.ts @@ -1,14 +1,25 @@ import { Decoder, Encoder } from "./util"; +import { Endpoint } from "./http"; + +/** + * Interface for object requires an Endpoint set. + */ +export interface EndpointBearer { + endpoint: Endpoint; +} /** * Response deserializer util functions for AWS services */ -export interface SerializerUtils { +export interface SerializerUtils extends EndpointBearer { utf8Decoder: Decoder; base64Encoder: Encoder; } -export interface RequestSerializer { +export interface RequestSerializer< + Request, + RuntimeUtils extends EndpointBearer = any +> { /** * Converts the provided `input` into a request object * diff --git a/packages/types/src/util.ts b/packages/types/src/util.ts index 24a3c8232712..7ba9e2a0b69d 100644 --- a/packages/types/src/util.ts +++ b/packages/types/src/util.ts @@ -1,4 +1,4 @@ -import { HttpEndpoint } from "./http"; +import { Endpoint } from "./http"; import { FinalizeHandler, FinalizeHandlerArguments, @@ -77,8 +77,8 @@ export interface RetryStrategy { } /** - * Parses a URL in string form into an HttpEndpoint object. + * Parses a URL in string form into an Endpoint object. */ export interface UrlParser { - (url: string): HttpEndpoint; + (url: string): Endpoint; } diff --git a/packages/url-parser-browser/src/index.spec.ts b/packages/url-parser-browser/src/index.spec.ts index c39a8e1e541a..e9a3ba4c9c03 100644 --- a/packages/url-parser-browser/src/index.spec.ts +++ b/packages/url-parser-browser/src/index.spec.ts @@ -1,8 +1,8 @@ import { parseUrl } from "./"; -import { HttpEndpoint } from "@aws-sdk/types"; +import { Endpoint } from "@aws-sdk/types"; describe("parseUrl", () => { - const testCases = new Map([ + const testCases = new Map([ [ "https://www.example.com/path/to%20the/file.ext?snap=cr%C3%A4ckle&snap=p%C3%B4p&fizz=buzz&quux", { diff --git a/packages/url-parser-browser/src/index.ts b/packages/url-parser-browser/src/index.ts index aae556bf9b01..5c60fd615a39 100644 --- a/packages/url-parser-browser/src/index.ts +++ b/packages/url-parser-browser/src/index.ts @@ -1,7 +1,7 @@ import { parseQueryString } from "@aws-sdk/querystring-parser"; -import { HttpEndpoint, QueryParameterBag, UrlParser } from "@aws-sdk/types"; +import { Endpoint, QueryParameterBag, UrlParser } from "@aws-sdk/types"; -export const parseUrl: UrlParser = (url: string): HttpEndpoint => { +export const parseUrl: UrlParser = (url: string): Endpoint => { const { hostname, pathname, port, protocol, search } = new URL(url); let query: QueryParameterBag | undefined; diff --git a/packages/url-parser-node/src/index.spec.ts b/packages/url-parser-node/src/index.spec.ts index 848e78248b61..82aa6e3d82b5 100644 --- a/packages/url-parser-node/src/index.spec.ts +++ b/packages/url-parser-node/src/index.spec.ts @@ -1,8 +1,8 @@ import { parseUrl } from "./"; -import { HttpEndpoint } from "@aws-sdk/types"; +import { Endpoint } from "@aws-sdk/types"; describe("parseUrl", () => { - const testCases = new Map([ + const testCases = new Map([ [ "https://www.example.com/path/to%20the/file.ext?snap=cr%C3%A4ckle&snap=p%C3%B4p&fizz=buzz&quux", { diff --git a/packages/url-parser-node/src/index.ts b/packages/url-parser-node/src/index.ts index 75c150b2df1c..b4edc5141841 100644 --- a/packages/url-parser-node/src/index.ts +++ b/packages/url-parser-node/src/index.ts @@ -1,8 +1,8 @@ import { parseQueryString } from "@aws-sdk/querystring-parser"; -import { HttpEndpoint, QueryParameterBag, UrlParser } from "@aws-sdk/types"; +import { Endpoint, QueryParameterBag, UrlParser } from "@aws-sdk/types"; import { parse } from "url"; -export const parseUrl: UrlParser = (url: string): HttpEndpoint => { +export const parseUrl: UrlParser = (url: string): Endpoint => { const { hostname = "localhost", pathname = "/", diff --git a/packages/url-parser-universal/src/index.spec.ts b/packages/url-parser-universal/src/index.spec.ts index 848e78248b61..82aa6e3d82b5 100644 --- a/packages/url-parser-universal/src/index.spec.ts +++ b/packages/url-parser-universal/src/index.spec.ts @@ -1,8 +1,8 @@ import { parseUrl } from "./"; -import { HttpEndpoint } from "@aws-sdk/types"; +import { Endpoint } from "@aws-sdk/types"; describe("parseUrl", () => { - const testCases = new Map([ + const testCases = new Map([ [ "https://www.example.com/path/to%20the/file.ext?snap=cr%C3%A4ckle&snap=p%C3%B4p&fizz=buzz&quux", { diff --git a/packages/url-parser-universal/src/index.ts b/packages/url-parser-universal/src/index.ts index a42d18c91845..cfc037678a81 100644 --- a/packages/url-parser-universal/src/index.ts +++ b/packages/url-parser-universal/src/index.ts @@ -1,4 +1,4 @@ -import { HttpEndpoint, QueryParameterBag, UrlParser } from "@aws-sdk/types"; +import { UrlParser } from "@aws-sdk/types"; import { parseUrl as browserUrlParser } from "@aws-sdk/url-parser-browser"; import { parseUrl as nodeUrlParser } from "@aws-sdk/url-parser-node"; diff --git a/yarn.lock b/yarn.lock index 74e4bfcdc9af..ff7ad85bd889 100644 --- a/yarn.lock +++ b/yarn.lock @@ -123,6 +123,14 @@ "@aws-sdk/xml-body-parser" "^0.1.0-preview.6" tslib "^1.8.0" +"@aws-sdk/middleware-serializer@^0.1.0-preview.5": + version "0.1.0-preview.5" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-serializer/-/middleware-serializer-0.1.0-preview.5.tgz#00a8355abc462679580d49969eea8c8513ce4208" + integrity sha512-iDPNjWmUz81FOj+23BX/6jpCUW/JWfeNWHaQcawa7jhMCcRmnBqHl9mEvQLz8xT0qmZRXcOUPx1/P6Aebi+hoQ== + dependencies: + "@aws-sdk/types" "^0.1.0-preview.5" + tslib "^1.8.0" + "@aws-sdk/protocol-json-rpc@^0.1.0-preview.6": version "0.1.0-preview.6" resolved "https://registry.yarnpkg.com/@aws-sdk/protocol-json-rpc/-/protocol-json-rpc-0.1.0-preview.6.tgz#c21e2eb30fa59ef1ede14ef1c83112bdd0287c35" @@ -1539,13 +1547,6 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.18.2.tgz#069e7d132024d436fd1f5771f6932426a695f230" integrity sha512-2JBasa5Qaj81Qsp/dxX2Njy+MdKC767WytHUDsRM7TYEfQvKPxsnGpnCBlBS1i2Aiv1YwCpmKSbQ6O6v8TpiKg== -"@types/resolve@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== - dependencies: - "@types/node" "*" - "@types/rimraf@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" @@ -2263,11 +2264,6 @@ buffer@^5.2.1: base64-js "^1.0.2" ieee754 "^1.1.4" -builtin-modules@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" - integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -3500,11 +3496,6 @@ estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -4741,11 +4732,6 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" -is-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" - integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= - is-nan@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.2.1.tgz#9faf65b6fb6db24b7f5c0628475ea71f988401e2" @@ -5919,13 +5905,6 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== -magic-string@^0.25.2: - version "0.25.3" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" - integrity sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== - dependencies: - sourcemap-codec "^1.4.4" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -7677,7 +7656,7 @@ resolve@1.1.7, resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== @@ -7735,47 +7714,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup-plugin-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e" - integrity sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow== - dependencies: - rollup-pluginutils "^2.5.0" - -rollup-plugin-node-resolve@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" - integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - -rollup-plugin-replace@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz#f41ae5372e11e7a217cde349c8b5d5fd115e70e3" - integrity sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA== - dependencies: - magic-string "^0.25.2" - rollup-pluginutils "^2.6.0" - -rollup-plugin-sourcemaps@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz#62125aa94087aadf7b83ef4dfaf629b473135e87" - integrity sha1-YhJaqUCHqt97g+9N+vYptHMTXoc= - dependencies: - rollup-pluginutils "^2.0.1" - source-map-resolve "^0.5.0" - -rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1: - version "2.8.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -8123,11 +8061,6 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" -sourcemap-codec@^1.4.4: - version "1.4.6" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz#e30a74f0402bad09807640d39e971090a08ce1e9" - integrity sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg== - spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"