diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 08df2cbb16a29..35e4711feb1b2 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -63,7 +63,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 3dd816721ca7f..98834fd677472 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -76,7 +76,7 @@ "cdk-integ-tools": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-mock-imports": "^1.3.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-apigateway/.gitignore b/packages/@aws-cdk/aws-apigateway/.gitignore index 018c65919d67c..d8a8561d50885 100644 --- a/packages/@aws-cdk/aws-apigateway/.gitignore +++ b/packages/@aws-cdk/aws-apigateway/.gitignore @@ -14,5 +14,6 @@ nyc.config.js .LAST_PACKAGE *.snk !.eslintrc.js +!jest.config.js junit.xml \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/.npmignore b/packages/@aws-cdk/aws-apigateway/.npmignore index a94c531529866..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-apigateway/.npmignore +++ b/packages/@aws-cdk/aws-apigateway/.npmignore @@ -19,6 +19,7 @@ dist tsconfig.json .eslintrc.js +jest.config.js # exclude cdk artifacts **/cdk.out diff --git a/packages/@aws-cdk/aws-apigateway/jest.config.js b/packages/@aws-cdk/aws-apigateway/jest.config.js new file mode 100644 index 0000000000000..82c5d0bb93666 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/jest.config.js @@ -0,0 +1,10 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = { + ...baseConfig, + coverageThreshold: { + global: { + branches: 80, + statements: 60, + }, + }, +}; diff --git a/packages/@aws-cdk/aws-apigateway/package.json b/packages/@aws-cdk/aws-apigateway/package.json index 5125418beaf8d..5593b569e7d15 100644 --- a/packages/@aws-cdk/aws-apigateway/package.json +++ b/packages/@aws-cdk/aws-apigateway/package.json @@ -56,7 +56,8 @@ "cloudformation": "AWS::ApiGateway", "env": { "AWSLINT_BASE_CONSTRUCT": true - } + }, + "jest": true }, "keywords": [ "aws", @@ -72,11 +73,9 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-apigateway/test/test.access-log.ts b/packages/@aws-cdk/aws-apigateway/test/access-log.test.ts similarity index 73% rename from packages/@aws-cdk/aws-apigateway/test/test.access-log.ts rename to packages/@aws-cdk/aws-apigateway/test/access-log.test.ts index 524e3cd1e13af..e7993ba7c287e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.access-log.ts +++ b/packages/@aws-cdk/aws-apigateway/test/access-log.test.ts @@ -1,15 +1,13 @@ -import { Test } from 'nodeunit'; +import '@aws-cdk/assert/jest'; import * as apigateway from '../lib'; -export = { - 'if jsonWithStandardFields method called with no parameter'(test: Test) { +describe('access log', () => { + test('if jsonWithStandardFields method called with no parameter', () => { const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields(); - test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}'); + expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}'); + }); - test.done(); - }, - - 'if jsonWithStandardFields method called with all parameters false'(test: Test) { + test('if jsonWithStandardFields method called with all parameters false', () => { const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields({ caller: false, httpMethod: false, @@ -21,19 +19,15 @@ export = { status: false, user: false, }); - test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId"}'); - - test.done(); - }, + expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId"}'); + }); - 'if clf method called'(test: Test) { + test('if clf method called', () => { const testFormat = apigateway.AccessLogFormat.clf(); - test.deepEqual(testFormat.toString(), '$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId'); + expect(testFormat.toString()).toEqual('$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId'); + }); - test.done(); - }, - - 'if custom method called'(test: Test) { + test('if custom method called', () => { const testFormat = apigateway.AccessLogFormat.custom(JSON.stringify({ requestId: apigateway.AccessLogField.contextRequestId(), sourceIp: apigateway.AccessLogField.contextIdentitySourceIp(), @@ -44,8 +38,6 @@ export = { email: apigateway.AccessLogField.contextAuthorizerClaims('email'), }, })); - test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId","sourceIp":"$context.identity.sourceIp","method":"$context.httpMethod","accountId":"$context.identity.accountId","userContext":{"sub":"$context.authorizer.claims.sub","email":"$context.authorizer.claims.email"}}'); - - test.done(); - }, -}; + expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId","sourceIp":"$context.identity.sourceIp","method":"$context.httpMethod","accountId":"$context.identity.accountId","userContext":{"sub":"$context.authorizer.claims.sub","email":"$context.authorizer.claims.email"}}'); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.api-definition.ts b/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts similarity index 52% rename from packages/@aws-cdk/aws-apigateway/test/test.api-definition.ts rename to packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts index fd1adb03aedd5..aee6c954f2b90 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.api-definition.ts +++ b/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts @@ -1,59 +1,56 @@ +import '@aws-cdk/assert/jest'; import * as path from 'path'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'apigateway.ApiDefinition.fromJson': { - 'happy case'(test: Test) { +describe('api definition', () => { + describe('apigateway.ApiDefinition.fromJson', () => { + test('happy case', () => { const stack = new cdk.Stack(); const definition = { key1: 'val1', }; const config = apigw.ApiDefinition.fromInline(definition).bind(stack); - test.deepEqual(config.inlineDefinition, definition); - test.ok(config.s3Location === undefined); - test.done(); - }, - - 'fails if Json definition is empty'(test: Test) { - test.throws( - () => defineRestApi(apigw.ApiDefinition.fromInline({})), - /cannot be empty/); - test.done(); - }, - - 'fails if definition is not an object'(test: Test) { - test.throws( - () => defineRestApi(apigw.ApiDefinition.fromInline('not-json')), - /should be of type object/); - test.done(); - }, - }, - - 'apigateway.ApiDefinition.fromAsset': { - 'happy case'(test: Test) { + expect(config.inlineDefinition).toEqual(definition); + expect(config.s3Location).toBeUndefined(); + }); + + test('fails if Json definition is empty', () => { + expect( + () => defineRestApi(apigw.ApiDefinition.fromInline({}))) + .toThrow(/cannot be empty/); + }); + + test('fails if definition is not an object', () => { + expect( + () => defineRestApi(apigw.ApiDefinition.fromInline('not-json'))) + .toThrow(/should be of type object/); + }); + }); + + describe('apigateway.ApiDefinition.fromAsset', () => { + test('happy case', () => { const stack = new cdk.Stack(); const config = apigw.ApiDefinition.fromAsset(path.join(__dirname, 'sample-definition.yaml')).bind(stack); - test.ok(config.inlineDefinition === undefined); - test.ok(config.s3Location !== undefined); - test.deepEqual(stack.resolve(config.s3Location!.bucket), { + expect(config.inlineDefinition).toBeUndefined(); + expect(config.s3Location).toBeDefined(); + expect(stack.resolve(config.s3Location!.bucket)).toEqual({ Ref: 'AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3Bucket42039E29', }); - test.done(); - }, - 'fails if a directory is given for an asset'(test: Test) { + }); + + test('fails if a directory is given for an asset', () => { // GIVEN const fileAsset = apigw.ApiDefinition.fromAsset(path.join(__dirname, 'authorizers')); // THEN - test.throws(() => defineRestApi(fileAsset), /Asset cannot be a \.zip file or a directory/); - test.done(); - }, + expect(() => defineRestApi(fileAsset)).toThrow(/Asset cannot be a \.zip file or a directory/); - 'only one Asset object gets created even if multiple functions use the same AssetApiDefinition'(test: Test) { + }); + + test('only one Asset object gets created even if multiple functions use the same AssetApiDefinition', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'MyStack'); @@ -73,26 +70,26 @@ export = { const synthesized = assembly.stacks[0]; // API1 has an asset, API2 does not - test.deepEqual(synthesized.assets.length, 1); - test.done(); - }, - }, + expect(synthesized.assets.length).toEqual(1); + + }); + }); - 'apigateway.ApiDefinition.fromBucket': { - 'happy case'(test: Test) { + describe('apigateway.ApiDefinition.fromBucket', () => { + test('happy case', () => { const stack = new cdk.Stack(); const bucket = new s3.Bucket(stack, 'my-bucket'); const config = apigw.ApiDefinition.fromBucket(bucket, 'my-key', 'my-version').bind(stack); - test.ok(config.inlineDefinition === undefined); - test.ok(config.s3Location !== undefined); - test.deepEqual(stack.resolve(config.s3Location!.bucket), { + expect(config.inlineDefinition).toBeUndefined(); + expect(config.s3Location).toBeDefined(); + expect(stack.resolve(config.s3Location!.bucket)).toEqual({ Ref: 'mybucket15D133BF', }); - test.equals(config.s3Location!.key, 'my-key'); - test.done(); - }, - }, -}; + expect(config.s3Location!.key).toEqual('my-key'); + + }); + }); +}); function defineRestApi(definition: apigw.ApiDefinition) { const stack = new cdk.Stack(); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.api-key.ts b/packages/@aws-cdk/aws-apigateway/test/api-key.test.ts similarity index 78% rename from packages/@aws-cdk/aws-apigateway/test/test.api-key.ts rename to packages/@aws-cdk/aws-apigateway/test/api-key.test.ts index f33751ee9cbc7..18db74d841d04 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.api-key.ts +++ b/packages/@aws-cdk/aws-apigateway/test/api-key.test.ts @@ -1,11 +1,11 @@ -import { expect, haveResource, haveResourceLike, ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'default setup'(test: Test) { +describe('api key', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); @@ -13,13 +13,11 @@ export = { new apigateway.ApiKey(stack, 'my-api-key'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition)); + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition); // should have an api key with no props defined. + }); - test.done(); - }, - - 'specify props for apiKey'(test: Test) { + test('specify props for apiKey', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -32,7 +30,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { CustomerId: 'test-customer', StageKeys: [ { @@ -40,12 +38,10 @@ export = { StageName: { Ref: 'testapiDeploymentStagetest5869DF71' }, }, ], - })); - - test.done(); - }, + }); + }); - 'use an imported api key'(test: Test) { + test('use an imported api key', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -58,17 +54,16 @@ export = { }); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::UsagePlanKey', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::UsagePlanKey', { KeyId: 'KeyIdabc', KeyType: 'API_KEY', UsagePlanId: { Ref: 'testapiplan1B111AFF', }, - })); - test.done(); - }, + }); + }); - 'grantRead'(test: Test) { + test('grantRead', () => { // GIVEN const stack = new cdk.Stack(); const user = new iam.User(stack, 'User'); @@ -83,7 +78,7 @@ export = { apiKey.grantRead(user); // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Statement: [ { @@ -112,12 +107,10 @@ export = { ], Version: '2012-10-17', }, - })); - - test.done(); - }, + }); + }); - 'grantWrite'(test: Test) { + test('grantWrite', () => { // GIVEN const stack = new cdk.Stack(); const user = new iam.User(stack, 'User'); @@ -132,7 +125,7 @@ export = { apiKey.grantWrite(user); // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Statement: [ { @@ -166,12 +159,10 @@ export = { ], Version: '2012-10-17', }, - })); - - test.done(); - }, + }); + }); - 'grantReadWrite'(test: Test) { + test('grantReadWrite', () => { // GIVEN const stack = new cdk.Stack(); const user = new iam.User(stack, 'User'); @@ -186,7 +177,7 @@ export = { apiKey.grantReadWrite(user); // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Statement: [ { @@ -221,13 +212,11 @@ export = { ], Version: '2012-10-17', }, - })); - - test.done(); - }, + }); + }); - 'rate limited': { - 'default setup'(test: Test) { + describe('rate limited', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: false }); @@ -238,16 +227,14 @@ export = { // THEN // should have an api key with no props defined. - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition)); + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition); // should not have a usage plan. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlan')); + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlan'); // should not have a usage plan key. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlanKey')); - - test.done(); - }, + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlanKey'); + }); - 'only api key is created when rate limiting properties are not provided'(test: Test) { + test('only api key is created when rate limiting properties are not provided', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -260,7 +247,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { CustomerId: 'test-customer', StageKeys: [ { @@ -268,16 +255,14 @@ export = { StageName: { Ref: 'testapiDeploymentStagetest5869DF71' }, }, ], - })); + }); // should not have a usage plan. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlan')); + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlan'); // should not have a usage plan key. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlanKey')); - - test.done(); - }, + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlanKey'); + }); - 'api key and usage plan are created and linked when rate limiting properties are provided'(test: Test) { + test('api key and usage plan are created and linked when rate limiting properties are provided', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -295,7 +280,7 @@ export = { // THEN // should have an api key - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { CustomerId: 'test-customer', StageKeys: [ { @@ -303,16 +288,16 @@ export = { StageName: { Ref: 'testapiDeploymentStagetest5869DF71' }, }, ], - })); + }); // should have a usage plan with specified quota. - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlan', { + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlan', { Quota: { Limit: 10000, Period: 'MONTH', }, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); // should have a usage plan key linking the api key and usage plan - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'testapikey998028B6', }, @@ -320,9 +305,7 @@ export = { UsagePlanId: { Ref: 'testapikeyUsagePlanResource66DB63D6', }, - }, ResourcePart.Properties)); - - test.done(); - }, - }, -}; + }, ResourcePart.Properties); + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.authorizer.ts b/packages/@aws-cdk/aws-apigateway/test/authorizer.test.ts similarity index 52% rename from packages/@aws-cdk/aws-apigateway/test/test.authorizer.ts rename to packages/@aws-cdk/aws-apigateway/test/authorizer.test.ts index 89b6905fddb4e..0946ef4214c73 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.authorizer.ts +++ b/packages/@aws-cdk/aws-apigateway/test/authorizer.test.ts @@ -1,9 +1,8 @@ import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import { Authorizer, IRestApi } from '../lib'; -export = { - 'isAuthorizer correctly detects an instance of type Authorizer'(test: Test) { +describe('authorizer', () => { + test('isAuthorizer correctly detects an instance of type Authorizer', () => { class MyAuthorizer extends Authorizer { public readonly authorizerId = 'test-authorizer-id'; public _attachToApi(_: IRestApi): void { @@ -13,9 +12,7 @@ export = { const stack = new Stack(); const authorizer = new MyAuthorizer(stack, 'authorizer'); - test.ok(Authorizer.isAuthorizer(authorizer), 'type Authorizer expected but is not'); - test.ok(!Authorizer.isAuthorizer(stack), 'type Authorizer found, when not expected'); - - test.done(); - }, -}; \ No newline at end of file + expect(Authorizer.isAuthorizer(authorizer)).toEqual(true); + expect(Authorizer.isAuthorizer(stack)).toEqual(false); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts new file mode 100644 index 0000000000000..4c31cb96d9173 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts @@ -0,0 +1,27 @@ +import { IdentitySource } from '../../lib'; + +describe('identity source', () => { + test('blank amount', () => { + expect(() => IdentitySource.context('')).toThrow(/empty/); + }); + + test('IdentitySource header', () => { + const identitySource = IdentitySource.header('Authorization'); + expect(identitySource.toString()).toEqual('method.request.header.Authorization'); + }); + + test('IdentitySource queryString', () => { + const identitySource = IdentitySource.queryString('param'); + expect(identitySource.toString()).toEqual('method.request.querystring.param'); + }); + + test('IdentitySource stageVariable', () => { + const identitySource = IdentitySource.stageVariable('var1'); + expect(identitySource.toString()).toEqual('stageVariables.var1'); + }); + + test('IdentitySource context', () => { + const identitySource = IdentitySource.context('httpMethod'); + expect(identitySource.toString()).toEqual('context.httpMethod'); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts similarity index 78% rename from packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts rename to packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts index 9da1cf9e4e159..fd0be26e030df 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts @@ -1,12 +1,12 @@ -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import { AuthorizationType, IdentitySource, RequestAuthorizer, RestApi, TokenAuthorizer } from '../../lib'; -export = { - 'default token authorizer'(test: Test) { +describe('lambda authorizer', () => { + test('default token authorizer', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -25,7 +25,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), IdentitySource: 'method.request.header.Authorization', @@ -49,19 +49,17 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { Action: 'lambda:InvokeFunction', Principal: 'apigateway.amazonaws.com', - })); - - test.ok(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`), 'Malformed authorizer ARN'); + }); - test.done(); - }, + expect(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`)).toBeTruthy(); + }); - 'default request authorizer'(test: Test) { + test('default request authorizer', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -82,7 +80,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'REQUEST', RestApiId: stack.resolve(restApi.restApiId), AuthorizerUri: { @@ -105,19 +103,19 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { Action: 'lambda:InvokeFunction', Principal: 'apigateway.amazonaws.com', - })); + }); - test.ok(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`), 'Malformed authorizer ARN'); + expect(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`)).toBeTruthy(); - test.done(); - }, - 'invalid request authorizer config'(test: Test) { + }); + + test('invalid request authorizer config', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -126,16 +124,14 @@ export = { runtime: lambda.Runtime.NODEJS_12_X, }); - test.throws(() => new RequestAuthorizer(stack, 'myauthorizer', { + expect(() => new RequestAuthorizer(stack, 'myauthorizer', { handler: func, resultsCacheTtl: Duration.seconds(1), identitySources: [], - }), Error, 'At least one Identity Source is required for a REQUEST-based Lambda authorizer if caching is enabled.'); - - test.done(); - }, + })).toThrow('At least one Identity Source is required for a REQUEST-based Lambda authorizer if caching is enabled.'); + }); - 'token authorizer with all parameters specified'(test: Test) { + test('token authorizer with all parameters specified', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -158,7 +154,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), IdentitySource: 'method.request.header.whoami', @@ -185,12 +181,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - 'request authorizer with all parameters specified'(test: Test) { + test('request authorizer with all parameters specified', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -212,7 +206,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'REQUEST', RestApiId: stack.resolve(restApi.restApiId), IdentitySource: 'method.request.header.whoami', @@ -238,12 +232,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - 'token authorizer with assume role'(test: Test) { + test('token authorizer with assume role', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -268,7 +260,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), AuthorizerUri: { @@ -291,11 +283,11 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::IAM::Role')); + expect(stack).toHaveResource('AWS::IAM::Role'); - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResourceLike('AWS::IAM::Policy', { Roles: [ stack.resolve(role.roleName), ], @@ -308,14 +300,12 @@ export = { }, ], }, - }, ResourcePart.Properties, true)); - - expect(stack).notTo(haveResource('AWS::Lambda::Permission')); + }, ResourcePart.Properties); - test.done(); - }, + expect(stack).not.toHaveResource('AWS::Lambda::Permission'); + }); - 'request authorizer with assume role'(test: Test) { + test('request authorizer with assume role', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -342,7 +332,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'REQUEST', RestApiId: stack.resolve(restApi.restApiId), AuthorizerUri: { @@ -365,11 +355,11 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::IAM::Role')); + expect(stack).toHaveResource('AWS::IAM::Role'); - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResourceLike('AWS::IAM::Policy', { Roles: [ stack.resolve(role.roleName), ], @@ -382,14 +372,12 @@ export = { }, ], }, - }, ResourcePart.Properties, true)); - - expect(stack).notTo(haveResource('AWS::Lambda::Permission')); + }, ResourcePart.Properties); - test.done(); - }, + expect(stack).not.toHaveResource('AWS::Lambda::Permission'); + }); - 'token authorizer throws when not attached to a rest api'(test: Test) { + test('token authorizer throws when not attached to a rest api', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { handler: 'handler', @@ -400,12 +388,10 @@ export = { handler: func, }); - test.throws(() => stack.resolve(auth.authorizerArn), /must be attached to a RestApi/); + expect(() => stack.resolve(auth.authorizerArn)).toThrow(/must be attached to a RestApi/); + }); - test.done(); - }, - - 'request authorizer throws when not attached to a rest api'(test: Test) { + test('request authorizer throws when not attached to a rest api', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { handler: 'handler', @@ -417,8 +403,6 @@ export = { identitySources: [IdentitySource.header('myheader')], }); - test.throws(() => stack.resolve(auth.authorizerArn), /must be attached to a RestApi/); - - test.done(); - }, -}; + expect(() => stack.resolve(auth.authorizerArn)).toThrow(/must be attached to a RestApi/); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts deleted file mode 100644 index 65c589fd7d53a..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as nodeunit from 'nodeunit'; -import { IdentitySource } from '../../lib'; - -export = nodeunit.testCase({ - 'blank amount'(test: nodeunit.Test) { - test.throws(() => IdentitySource.context(''), /empty/); - test.done(); - }, - - 'IdentitySource header'(test: nodeunit.Test) { - const identitySource = IdentitySource.header('Authorization'); - test.equal(identitySource.toString(), 'method.request.header.Authorization'); - test.done(); - }, - - 'IdentitySource queryString'(test: nodeunit.Test) { - const identitySource = IdentitySource.queryString('param'); - test.equal(identitySource.toString(), 'method.request.querystring.param'); - test.done(); - }, - - 'IdentitySource stageVariable'(test: nodeunit.Test) { - const identitySource = IdentitySource.stageVariable('var1'); - test.equal(identitySource.toString(), 'stageVariables.var1'); - test.done(); - }, - - 'IdentitySource context'(test: nodeunit.Test) { - const identitySource = IdentitySource.context('httpMethod'); - test.equal(identitySource.toString(), 'context.httpMethod'); - test.done(); - }, -}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.cors.ts b/packages/@aws-cdk/aws-apigateway/test/cors.test.ts similarity index 83% rename from packages/@aws-cdk/aws-apigateway/test/test.cors.ts rename to packages/@aws-cdk/aws-apigateway/test/cors.test.ts index 006ed58375b55..46fe8e1756443 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.cors.ts +++ b/packages/@aws-cdk/aws-apigateway/test/cors.test.ts @@ -1,11 +1,10 @@ -import { countResources, expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as lambda from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'adds an OPTIONS method to a resource'(test: Test) { +describe('cors', () => { + test('adds an OPTIONS method to a resource', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -17,7 +16,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -48,11 +47,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowCredentials'(test: Test) { + test('allowCredentials', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -65,7 +63,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -98,11 +96,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowMethods'(test: Test) { + test('allowMethods', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -115,7 +112,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -146,11 +143,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowMethods ANY will expand to all supported methods'(test: Test) { + test('allowMethods ANY will expand to all supported methods', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -163,7 +159,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -194,26 +190,23 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowMethods ANY cannot be used with any other method'(test: Test) { + test('allowMethods ANY cannot be used with any other method', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); const resource = api.root.addResource('MyResource'); // THEN - test.throws(() => resource.addCorsPreflight({ + expect(() => resource.addCorsPreflight({ allowOrigins: ['https://aws.amazon.com'], allowMethods: ['ANY', 'PUT'], - }), /ANY cannot be used with any other method. Received: ANY,PUT/); - - test.done(); - }, + })).toThrow(/ANY cannot be used with any other method. Received: ANY,PUT/); + }); - 'statusCode can be used to set the response status code'(test: Test) { + test('statusCode can be used to set the response status code', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -226,7 +219,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -257,25 +250,22 @@ export = { StatusCode: '200', }, ], - })); - test.done(); - }, + }); + }); - 'allowOrigins must contain at least one origin'(test: Test) { + test('allowOrigins must contain at least one origin', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); const resource = api.root.addResource('MyResource'); // WHEN - test.throws(() => resource.addCorsPreflight({ + expect(() => resource.addCorsPreflight({ allowOrigins: [], - }), /allowOrigins must contain at least one origin/); + })).toThrow(/allowOrigins must contain at least one origin/); + }); - test.done(); - }, - - 'allowOrigins can be used to specify multiple origins'(test: Test) { + test('allowOrigins can be used to specify multiple origins', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -287,7 +277,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -321,11 +311,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'maxAge can be used to specify Access-Control-Max-Age'(test: Test) { + test('maxAge can be used to specify Access-Control-Max-Age', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -338,7 +327,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -371,11 +360,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'disableCache will set Max-Age to -1'(test: Test) { + test('disableCache will set Max-Age to -1', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -388,7 +376,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -421,27 +409,24 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'maxAge and disableCache are mutually exclusive'(test: Test) { + test('maxAge and disableCache are mutually exclusive', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); const resource = api.root.addResource('MyResource'); // THEN - test.throws(() => resource.addCorsPreflight({ + expect(() => resource.addCorsPreflight({ allowOrigins: ['https://amazon.com'], disableCache: true, maxAge: Duration.seconds(10), - }), /The options "maxAge" and "disableCache" are mutually exclusive/); - - test.done(); - }, + })).toThrow(/The options "maxAge" and "disableCache" are mutually exclusive/); + }); - 'exposeHeaders can be used to specify Access-Control-Expose-Headers'(test: Test) { + test('exposeHeaders can be used to specify Access-Control-Expose-Headers', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -454,7 +439,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -487,11 +472,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'defaultCorsPreflightOptions can be used to specify CORS for all resource tree'(test: Test) { + test('defaultCorsPreflightOptions can be used to specify CORS for all resource tree', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -505,19 +489,18 @@ export = { resource.addResource('MyChildResource'); // THEN - expect(stack).to(countResources('AWS::ApiGateway::Method', 2)); // on both resources - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toCountResources('AWS::ApiGateway::Method', 2); // on both resources + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceMyChildResource2DC010C5' }, - })); - test.done(); - }, + }); + }); - 'defaultCorsPreflightOptions can be specified at the API level to apply to all resources'(test: Test) { + test('defaultCorsPreflightOptions can be specified at the API level to apply to all resources', () => { // GIVEN const stack = new Stack(); @@ -532,22 +515,21 @@ export = { child1.addResource('child2'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { 'Fn::GetAtt': ['apiC8550315', 'RootResourceId'] }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apichild1841A5840' }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apichild1child26A9A7C47' }, - })); - test.done(); - }, + }); + }); - 'Vary: Origin is sent back if Allow-Origin is not "*"'(test: Test) { + test('Vary: Origin is sent back if Allow-Origin is not "*"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -566,7 +548,7 @@ export = { }); // THENB - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ResourceId: { Ref: 'apiAllowAll2F5BC564', }, @@ -596,8 +578,8 @@ export = { StatusCode: '204', }, ], - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ResourceId: { Ref: 'apiAllowSpecific77DD8AF1', }, @@ -629,26 +611,23 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'If "*" is specified in allow-origin, it cannot be mixed with specific origins'(test: Test) { + test('If "*" is specified in allow-origin, it cannot be mixed with specific origins', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); // WHEN - test.throws(() => api.root.addResource('AllowAll', { + expect(() => api.root.addResource('AllowAll', { defaultCorsPreflightOptions: { allowOrigins: ['https://bla.com', '*', 'https://specific'], }, - }), /Invalid "allowOrigins" - cannot mix "\*" with specific origins: https:\/\/bla\.com,\*,https:\/\/specific/); - - test.done(); - }, + })).toThrow(/Invalid "allowOrigins" - cannot mix "\*" with specific origins: https:\/\/bla\.com,\*,https:\/\/specific/); + }); - 'defaultCorsPreflightOptions can be used to specify CORS for all resource tree [LambdaRestApi]'(test: Test) { + test('defaultCorsPreflightOptions can be used to specify CORS for all resource tree [LambdaRestApi]', () => { // GIVEN const stack = new Stack(); @@ -667,8 +646,8 @@ export = { }); // THEN - expect(stack).to(countResources('AWS::ApiGateway::Method', 4)); // two ANY and two OPTIONS resources - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toCountResources('AWS::ApiGateway::Method', 4); // two ANY and two OPTIONS resources + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { 'Fn::GetAtt': [ @@ -676,17 +655,16 @@ export = { 'RootResourceId', ], }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'lambdarestapiproxyE3AE07E3', }, - })); - test.done(); - }, + }); + }); - 'CORS and proxy resources'(test: Test) { + test('CORS and proxy resources', () => { // GIVEN const stack = new Stack(); @@ -698,9 +676,8 @@ export = { api.root.addProxy(); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', - })); - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts similarity index 74% rename from packages/@aws-cdk/aws-apigateway/test/test.deployment.ts rename to packages/@aws-cdk/aws-apigateway/test/deployment.test.ts index c8eb430d42a10..77f8b887eae57 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts +++ b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts @@ -1,12 +1,12 @@ import * as path from 'path'; -import { expect, haveResource, ResourcePart, SynthUtils } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart, SynthUtils } from '@aws-cdk/assert'; import * as lambda from '@aws-cdk/aws-lambda'; import { CfnResource, Lazy, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'minimal setup'(test: Test) { +describe('deployment', () => { + test('minimal setup', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -16,7 +16,7 @@ export = { new apigateway.Deployment(stack, 'deployment', { api }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { apiGETECF0BD67: { Type: 'AWS::ApiGateway::Method', @@ -56,11 +56,9 @@ export = { }, }, }); + }); - test.done(); - }, - - '"retainDeployments" can be used to control the deletion policy of the resource'(test: Test) { + test('"retainDeployments" can be used to control the deletion policy of the resource', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -70,7 +68,7 @@ export = { new apigateway.Deployment(stack, 'deployment', { api, retainDeployments: true }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { apiGETECF0BD67: { Type: 'AWS::ApiGateway::Method', @@ -112,11 +110,9 @@ export = { }, }, }); + }); - test.done(); - }, - - '"description" can be set on the deployment'(test: Test) { + test('"description" can be set on the deployment', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -126,14 +122,12 @@ export = { new apigateway.Deployment(stack, 'deployment', { api, description: 'this is my deployment' }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Deployment', { + expect(stack).toHaveResource('AWS::ApiGateway::Deployment', { Description: 'this is my deployment', - })); - - test.done(); - }, + }); + }); - 'logical ID of the deployment resource is salted'(test: Test) { + test('logical ID of the deployment resource is salted', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -141,34 +135,29 @@ export = { api.root.addMethod('GET'); const resources = synthesize().Resources; - test.ok(resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75, - `resource deployment33381975bba46c5132329b81e7befcbbba5a0e75 not found, instead found ${Object.keys(resources)}`); + expect(resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75).toBeDefined(); // adding some salt deployment.addToLogicalId({ foo: 123 }); // add some data to the logical ID // the logical ID changed const template = synthesize(); - test.ok(!template.Resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75, 'old resource id is not deleted'); - test.ok(template.Resources.deployment333819758aa4cdb9d204502b959c4903f4d5d29f, - `new resource deployment333819758aa4cdb9d204502b959c4903f4d5d29f is not created, instead found ${Object.keys(template.Resources)}`); + expect(template.Resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75).toBeUndefined(); + expect(template.Resources.deployment333819758aa4cdb9d204502b959c4903f4d5d29f).toBeDefined(); // tokens supported, and are resolved upon synthesis const value = 'hello hello'; deployment.addToLogicalId({ foo: Lazy.stringValue({ produce: () => value }) }); const template2 = synthesize(); - test.ok(template2.Resources.deployment333819758d91bed959c6bd6268ba84f6d33e888e, - `resource deployment333819758d91bed959c6bd6268ba84f6d33e888e not found, instead found ${Object.keys(template2.Resources)}`); - - test.done(); + expect(template2.Resources.deployment333819758d91bed959c6bd6268ba84f6d33e888e).toBeDefined(); function synthesize() { return SynthUtils.synthesize(stack).template; } - }, + }); - '"addDependency" can be used to add a resource as a dependency'(test: Test) { + test('"addDependency" can be used to add a resource as a dependency', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -180,17 +169,17 @@ export = { // WHEN deployment.node.addDependency(dep); - expect(stack).to(haveResource('AWS::ApiGateway::Deployment', { + expect(stack).toHaveResource('AWS::ApiGateway::Deployment', { DependsOn: [ 'apiGETECF0BD67', 'MyResource', ], - }, ResourcePart.CompleteDefinition)); + }, ResourcePart.CompleteDefinition); - test.done(); - }, - 'integration change invalidates deployment'(test: Test) { + }); + + test('integration change invalidates deployment', () => { // GIVEN const stack1 = new Stack(); const stack2 = new Stack(); @@ -216,16 +205,16 @@ export = { api2.root.addMethod('GET'); // THEN - expect(stack1).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack1).toHaveResource('AWS::ApiGateway::Stage', { DeploymentId: { Ref: 'myapiDeploymentB7EF8EB74c5295c27fa87ff13f4d04e13f67662d' }, - })); - expect(stack2).to(haveResource('AWS::ApiGateway::Stage', { + }); + expect(stack2).toHaveResource('AWS::ApiGateway::Stage', { DeploymentId: { Ref: 'myapiDeploymentB7EF8EB7b50d305057ba109c118e4aafd4509355' }, - })); - test.done(); - }, + }); - 'deployment resource depends on all restapi methods defined'(test: Test) { + }); + + test('deployment resource depends on all restapi methods defined', () => { const stack = new Stack(); const restapi = new apigateway.RestApi(stack, 'myapi', { deploy: false, @@ -244,14 +233,12 @@ export = { const resource = restapi.root.addResource('myresource'); resource.addMethod('GET'); - expect(stack).to(haveResource('AWS::ApiGateway::Deployment', { + expect(stack).toHaveResource('AWS::ApiGateway::Deployment', { DependsOn: [ 'myapiGET9B7CD29E', 'myapimyresourceGET732851A5', 'myapiPOST23417BD2', ], - }, ResourcePart.CompleteDefinition)); - - test.done(); - }, -}; + }, ResourcePart.CompleteDefinition); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.domains.ts b/packages/@aws-cdk/aws-apigateway/test/domains.test.ts similarity index 75% rename from packages/@aws-cdk/aws-apigateway/test/test.domains.ts rename to packages/@aws-cdk/aws-apigateway/test/domains.test.ts index 1e611c4601cd4..ee70b4e9cb98e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.domains.ts +++ b/packages/@aws-cdk/aws-apigateway/test/domains.test.ts @@ -1,14 +1,14 @@ -import { ABSENT, expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; import * as acm from '@aws-cdk/aws-certificatemanager'; import { Bucket } from '@aws-cdk/aws-s3'; import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; /* eslint-disable quote-props */ -export = { - 'can define either an EDGE or REGIONAL domain name'(test: Test) { +describe('domains', () => { + test('can define either an EDGE or REGIONAL domain name', () => { // GIVEN const stack = new Stack(); const cert = new acm.Certificate(stack, 'Cert', { domainName: 'example.com' }); @@ -27,27 +27,27 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['EDGE'] }, 'CertificateArn': { 'Ref': 'Cert5C9FAEC1' }, - })); + }); + + expect(stack.resolve(regionalDomain.domainNameAliasDomainName)).toEqual({ 'Fn::GetAtt': ['mydomain592C948B', 'RegionalDomainName'] }); + expect(stack.resolve(regionalDomain.domainNameAliasHostedZoneId)).toEqual({ 'Fn::GetAtt': ['mydomain592C948B', 'RegionalHostedZoneId'] }); + expect(stack.resolve(edgeDomain.domainNameAliasDomainName)).toEqual({ 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionDomainName'] }); + expect(stack.resolve(edgeDomain.domainNameAliasHostedZoneId)).toEqual({ 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionHostedZoneId'] }); - test.deepEqual(stack.resolve(regionalDomain.domainNameAliasDomainName), { 'Fn::GetAtt': ['mydomain592C948B', 'RegionalDomainName'] }); - test.deepEqual(stack.resolve(regionalDomain.domainNameAliasHostedZoneId), { 'Fn::GetAtt': ['mydomain592C948B', 'RegionalHostedZoneId'] }); - test.deepEqual(stack.resolve(edgeDomain.domainNameAliasDomainName), { 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionDomainName'] }); - test.deepEqual(stack.resolve(edgeDomain.domainNameAliasHostedZoneId), { 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionHostedZoneId'] }); - test.done(); - }, + }); - 'default endpoint type is REGIONAL'(test: Test) { + test('default endpoint type is REGIONAL', () => { // GIVEN const stack = new Stack(); const cert = new acm.Certificate(stack, 'Cert', { domainName: 'example.com' }); @@ -59,15 +59,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, - })); - test.done(); - }, + }); + + }); - 'accepts different security policies'(test: Test) { + test('accepts different security policies', () => { // GIVEN const stack = new Stack(); const cert = new acm.Certificate(stack, 'Cert', { domainName: 'example.com' }); @@ -91,30 +91,30 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'old.example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, 'SecurityPolicy': 'TLS_1_0', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'new.example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, 'SecurityPolicy': 'TLS_1_2', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'default.example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, 'SecurityPolicy': ABSENT, - })); - test.done(); - }, + }); - '"mapping" can be used to automatically map this domain to the deployment stage of an API'(test: Test) { + }); + + test('"mapping" can be used to automatically map this domain to the deployment stage of an API', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -129,7 +129,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'Domain66AC69E0', }, @@ -139,11 +139,11 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); - test.done(); - }, + }); - '"addBasePathMapping" can be used to add base path mapping to the domain'(test: Test) { + }); + + test('"addBasePathMapping" can be used to add base path mapping to the domain', () => { // GIVEN const stack = new Stack(); const api1 = new apigw.RestApi(stack, 'api1'); @@ -161,7 +161,7 @@ export = { domain.addBasePathMapping(api2, { basePath: 'api2' }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -172,9 +172,9 @@ export = { 'Stage': { 'Ref': 'api1DeploymentStageprod362746F6', }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -185,11 +185,11 @@ export = { 'Stage': { 'Ref': 'api2DeploymentStageprod4120D74E', }, - })); - test.done(); - }, + }); - 'a domain name can be defined with the API'(test: Test) { + }); + + test('a domain name can be defined with the API', () => { // GIVEN const domainName = 'my.domain.com'; const stack = new Stack(); @@ -203,7 +203,7 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'my.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -213,8 +213,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'apiCustomDomain64773C4F', }, @@ -224,12 +224,12 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); + }); + - test.done(); - }, + }); - 'a domain name can be added later'(test: Test) { + test('a domain name can be added later', () => { // GIVEN const domainName = 'my.domain.com'; const stack = new Stack(); @@ -243,7 +243,7 @@ export = { api.addDomainName('domainId', { domainName, certificate }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': domainName, 'EndpointConfiguration': { 'Types': [ @@ -253,8 +253,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'apidomainId102F8DAA', }, @@ -264,26 +264,26 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); + }); - test.done(); - }, - 'domain name cannot contain uppercase letters'(test: Test) { + }); + + test('domain name cannot contain uppercase letters', () => { // GIVEN const stack = new Stack(); const certificate = new acm.Certificate(stack, 'cert', { domainName: 'someDomainWithUpercase.domain.com' }); // WHEN - test.throws(() => { + expect(() => { new apigw.DomainName(stack, 'someDomain', { domainName: 'someDomainWithUpercase.domain.com', certificate }); - }, /uppercase/); + }).toThrow(/uppercase/); // THEN - test.done(); - }, - 'multiple domain names can be added'(test: Test) { + }); + + test('multiple domain names can be added', () => { // GIVEN const domainName = 'my.domain.com'; const stack = new Stack(); @@ -298,10 +298,10 @@ export = { api.addDomainName('domainId1', { domainName: 'your.domain.com', certificate }); api.addDomainName('domainId2', { domainName: 'our.domain.com', certificate }); - test.deepEqual(api.domainName, domainName1); + expect(api.domainName).toEqual(domainName1); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'my.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -311,8 +311,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'your.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -322,8 +322,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'our.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -333,8 +333,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'apidomainId102F8DAA', }, @@ -344,12 +344,12 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); + }); + - test.done(); - }, + }); - '"addBasePathMapping" can be used to add base path mapping to the domain with specific stage'(test: Test) { + test('"addBasePathMapping" can be used to add base path mapping to the domain with specific stage', () => { // GIVEN const stack = new Stack(); const api1 = new apigw.RestApi(stack, 'api1'); @@ -375,7 +375,7 @@ export = { domain.addBasePathMapping(api2, { basePath: 'api2' }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -384,9 +384,9 @@ export = { 'Ref': 'api1A91238E2', }, 'Stage': stack.resolve(testStage.stageName), - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -397,11 +397,11 @@ export = { 'Stage': { 'Ref': 'api2DeploymentStageprod4120D74E', }, - })); - test.done(); - }, + }); - 'accepts a mutual TLS configuration'(test: Test) { + }); + + test('accepts a mutual TLS configuration', () => { const stack = new Stack(); const bucket = Bucket.fromBucketName(stack, 'testBucket', 'exampleBucket'); new apigw.DomainName(stack, 'another-domain', { @@ -413,16 +413,16 @@ export = { certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d', 'MutualTlsAuthentication': { 'TruststoreUri': 's3://exampleBucket/someca.pem' }, - })); - test.done(); - }, + }); + + }); - 'mTLS should allow versions to be set on the s3 bucket'(test: Test) { + test('mTLS should allow versions to be set on the s3 bucket', () => { const stack = new Stack(); const bucket = Bucket.fromBucketName(stack, 'testBucket', 'exampleBucket'); new apigw.DomainName(stack, 'another-domain', { @@ -434,16 +434,16 @@ export = { version: 'version', }, }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d', 'MutualTlsAuthentication': { 'TruststoreUri': 's3://exampleBucket/someca.pem', 'TruststoreVersion': 'version' }, - })); - test.done(); - }, + }); + + }); - 'base path mapping configures stage for RestApi creation'(test: Test) { + test('base path mapping configures stage for RestApi creation', () => { // GIVEN const stack = new Stack(); new apigw.RestApi(stack, 'restApiWithStage', { @@ -455,7 +455,7 @@ export = { }).root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'restApiWithStageCustomDomainC4749625', }, @@ -465,12 +465,12 @@ export = { 'Stage': { 'Ref': 'restApiWithStageDeploymentStageprodC82A6648', }, - })); + }); + - test.done(); - }, + }); - 'base path mapping configures stage for SpecRestApi creation'(test: Test) { + test('base path mapping configures stage for SpecRestApi creation', () => { // GIVEN const stack = new Stack(); @@ -488,7 +488,7 @@ export = { }).root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'specRestApiWithStageCustomDomain8A36A5C9', }, @@ -498,8 +498,6 @@ export = { 'Stage': { 'Ref': 'specRestApiWithStageDeploymentStageprod2D3037ED', }, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.http.ts b/packages/@aws-cdk/aws-apigateway/test/http.test.ts similarity index 71% rename from packages/@aws-cdk/aws-apigateway/test/test.http.ts rename to packages/@aws-cdk/aws-apigateway/test/http.test.ts index 73bdf75a182c9..c0f58e828d271 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.http.ts +++ b/packages/@aws-cdk/aws-apigateway/test/http.test.ts @@ -1,10 +1,9 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'minimal setup'(test: Test) { +describe('http integration', () => { + test('minimal setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); @@ -15,18 +14,16 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'GET', Type: 'HTTP_PROXY', Uri: 'http://foo/bar', }, - })); - - test.done(); - }, + }); + }); - 'options can be passed via props'(test: Test) { + test('options can be passed via props', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); @@ -43,15 +40,13 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { CacheNamespace: 'hey', IntegrationHttpMethod: 'POST', Type: 'HTTP', Uri: 'http://foo/bar', }, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.integration.ts b/packages/@aws-cdk/aws-apigateway/test/integration.test.ts similarity index 71% rename from packages/@aws-cdk/aws-apigateway/test/test.integration.ts rename to packages/@aws-cdk/aws-apigateway/test/integration.test.ts index e946ded961b29..3c8990247d74e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.integration.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integration.test.ts @@ -1,40 +1,40 @@ -import { ABSENT, expect, haveResourceLike } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'integration "credentialsRole" and "credentialsPassthrough" are mutually exclusive'(test: Test) { +describe('integration', () => { + test('integration "credentialsRole" and "credentialsPassthrough" are mutually exclusive', () => { // GIVEN const stack = new cdk.Stack(); const role = new iam.Role(stack, 'MyRole', { assumedBy: new iam.ServicePrincipal('foo') }); // THEN - test.throws(() => new apigw.Integration({ + expect(() => new apigw.Integration({ type: apigw.IntegrationType.AWS_PROXY, options: { credentialsPassthrough: true, credentialsRole: role, }, - }), /'credentialsPassthrough' and 'credentialsRole' are mutually exclusive/); - test.done(); - }, + })).toThrow(/'credentialsPassthrough' and 'credentialsRole' are mutually exclusive/); - 'integration connectionType VpcLink requires vpcLink to be set'(test: Test) { - test.throws(() => new apigw.Integration({ + }); + + test('integration connectionType VpcLink requires vpcLink to be set', () => { + expect(() => new apigw.Integration({ type: apigw.IntegrationType.HTTP_PROXY, integrationHttpMethod: 'ANY', options: { connectionType: apigw.ConnectionType.VPC_LINK, }, - }), /'connectionType' of VPC_LINK requires 'vpcLink' prop to be set/); - test.done(); - }, + })).toThrow(/'connectionType' of VPC_LINK requires 'vpcLink' prop to be set/); + + }); - 'uri is self determined from the NLB'(test: Test) { + test('uri is self determined from the NLB', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); const nlb = new elbv2.NetworkLoadBalancer(stack, 'NLB', { vpc }); @@ -52,7 +52,7 @@ export = { }); api.root.addMethod('GET', integration); - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Uri: { 'Fn::Join': [ @@ -69,12 +69,10 @@ export = { ], }, }, - })); - - test.done(); - }, + }); + }); - 'uri must be set for VpcLink with multiple NLBs'(test: Test) { + test('uri must be set for VpcLink with multiple NLBs', () => { const app = new cdk.App(); const stack = new cdk.Stack(app); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -93,12 +91,10 @@ export = { }, }); api.root.addMethod('GET', integration); - test.throws(() => app.synth(), /'uri' is required when there are more than one NLBs in the VPC Link/); - - test.done(); - }, + expect(() => app.synth()).toThrow(/'uri' is required when there are more than one NLBs in the VPC Link/); + }); - 'uri must be set when using an imported VpcLink'(test: Test) { + test('uri must be set when using an imported VpcLink', () => { const app = new cdk.App(); const stack = new cdk.Stack(app); const link = apigw.VpcLink.fromVpcLinkId(stack, 'link', 'vpclinkid'); @@ -112,12 +108,10 @@ export = { }, }); api.root.addMethod('GET', integration); - test.throws(() => app.synth(), /'uri' is required when the 'connectionType' is VPC_LINK/); + expect(() => app.synth()).toThrow(/'uri' is required when the 'connectionType' is VPC_LINK/); + }); - test.done(); - }, - - 'connectionType of INTERNET and vpcLink are mutually exclusive'(test: Test) { + test('connectionType of INTERNET and vpcLink are mutually exclusive', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -129,18 +123,17 @@ export = { }); // THEN - test.throws(() => new apigw.Integration({ + expect(() => new apigw.Integration({ type: apigw.IntegrationType.HTTP_PROXY, integrationHttpMethod: 'ANY', options: { connectionType: apigw.ConnectionType.INTERNET, vpcLink: link, }, - }), /cannot set 'vpcLink' where 'connectionType' is INTERNET/); - test.done(); - }, + })).toThrow(/cannot set 'vpcLink' where 'connectionType' is INTERNET/); + }); - 'connectionType is ABSENT when vpcLink is not specified'(test: Test) { + test('connectionType is ABSENT when vpcLink is not specified', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'restapi'); @@ -153,17 +146,15 @@ export = { api.root.addMethod('ANY', integration); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'ANY', Integration: { ConnectionType: ABSENT, }, - })); - - test.done(); - }, + }); + }); - 'connectionType defaults to VPC_LINK if vpcLink is configured'(test: Test) { + test('connectionType defaults to VPC_LINK if vpcLink is configured', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -186,13 +177,11 @@ export = { api.root.addMethod('ANY', integration); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'ANY', Integration: { ConnectionType: 'VPC_LINK', }, - })); - - test.done(); - }, -}; \ No newline at end of file + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts b/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts similarity index 79% rename from packages/@aws-cdk/aws-apigateway/test/test.lambda.ts rename to packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts index 0519f62ee5a36..862b9b64266f9 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts @@ -1,11 +1,10 @@ -import { expect, haveResource, haveResourceLike, not } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; -import * as apigateway from '../lib'; +import * as apigateway from '../../lib'; -export = { - 'minimal setup'(test: Test) { +describe('lambda', () => { + test('minimal setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); @@ -20,7 +19,7 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'POST', Type: 'AWS_PROXY', @@ -48,11 +47,10 @@ export = { ], }, }, - })); - test.done(); - }, + }); + }); - '"allowTestInvoke" can be used to disallow calling the API from the test UI'(test: Test) { + test('"allowTestInvoke" can be used to disallow calling the API from the test UI', () => { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { @@ -68,7 +66,7 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -78,9 +76,9 @@ export = { ], ], }, - })); + }); - expect(stack).to(not(haveResource('AWS::Lambda::Permission', { + expect(stack).not.toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -97,12 +95,10 @@ export = { ], ], }, - }))); - - test.done(); - }, + }); + }); - '"allowTestInvoke" set to true allows calling the API from the test UI'(test: Test) { + test('"allowTestInvoke" set to true allows calling the API from the test UI', () => { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { @@ -118,7 +114,7 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -135,12 +131,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - '"proxy" can be used to disable proxy mode'(test: Test) { + test('"proxy" can be used to disable proxy mode', () => { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { @@ -156,16 +150,14 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Type: 'AWS', }, - })); - - test.done(); - }, + }); + }); - 'when "ANY" is used, lambda permission will include "*" for method'(test: Test) { + test('when "ANY" is used, lambda permission will include "*" for method', () => { const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api'); @@ -179,7 +171,7 @@ export = { api.root.addMethod('ANY', target); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -196,9 +188,9 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -225,12 +217,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - 'works for imported RestApi'(test: Test) { + test('works for imported RestApi', () => { const stack = new cdk.Stack(); const api = apigateway.RestApi.fromRestApiAttributes(stack, 'RestApi', { restApiId: 'imported-rest-api-id', @@ -245,16 +235,14 @@ export = { api.root.addMethod('ANY', new apigateway.LambdaIntegration(handler)); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { RestApiId: 'imported-rest-api-id', ResourceId: 'imported-root-resource-id', HttpMethod: 'ANY', - })); - - test.done(); - }, + }); + }); - 'fingerprint is computed when functionName is specified'(test: Test) { + test('fingerprint is computed when functionName is specified', () => { // GIVEN const stack = new cdk.Stack(); const restapi = new apigateway.RestApi(stack, 'RestApi'); @@ -271,13 +259,11 @@ export = { const bindResult = integration.bind(method); // THEN - test.ok(bindResult?.deploymentToken); - test.deepEqual(bindResult!.deploymentToken, '{"functionName":"ThisFunction"}'); + expect(bindResult?.deploymentToken).toBeDefined(); + expect(bindResult!.deploymentToken).toEqual('{"functionName":"ThisFunction"}'); + }); - test.done(); - }, - - 'fingerprint is not computed when functionName is not specified'(test: Test) { + test('fingerprint is not computed when functionName is not specified', () => { // GIVEN const stack = new cdk.Stack(); const restapi = new apigateway.RestApi(stack, 'RestApi'); @@ -293,12 +279,10 @@ export = { const bindResult = integration.bind(method); // THEN - test.equals(bindResult?.deploymentToken, undefined); - - test.done(); - }, + expect(bindResult?.deploymentToken).toBeUndefined(); + }); - 'bind works for integration with imported functions'(test: Test) { + test('bind works for integration with imported functions', () => { // GIVEN const stack = new cdk.Stack(); const restapi = new apigateway.RestApi(stack, 'RestApi'); @@ -311,9 +295,6 @@ export = { // the deployment token should be defined since the function name // should be a literal string. - test.equal(bindResult?.deploymentToken, JSON.stringify({ functionName: 'myfunc' })); - - test.done(); - }, - -}; + expect(bindResult?.deploymentToken).toEqual(JSON.stringify({ functionName: 'myfunc' })); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts b/packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts similarity index 65% rename from packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts rename to packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts index a4fb4757aaba3..6850cf4e8ba06 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts +++ b/packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts @@ -1,13 +1,10 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -/* eslint-disable quote-props */ - -export = { - 'LambdaRestApi defines a REST API with Lambda proxy integration'(test: Test) { +describe('lambda api', () => { + test('LambdaRestApi defines a REST API with Lambda proxy integration', () => { // GIVEN const stack = new cdk.Stack(); @@ -21,38 +18,38 @@ export = { const api = new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler }); // THEN -- can't customize further - test.throws(() => { + expect(() => { api.root.addResource('cant-touch-this'); - }); + }).toThrow(); // THEN -- template proxies everything - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { - 'PathPart': '{proxy+}', - })); + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { + PathPart: '{proxy+}', + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { - 'HttpMethod': 'ANY', - 'ResourceId': { - 'Ref': 'lambdarestapiproxyE3AE07E3', + expect(stack).toHaveResource('AWS::ApiGateway::Method', { + HttpMethod: 'ANY', + ResourceId: { + Ref: 'lambdarestapiproxyE3AE07E3', }, - 'RestApiId': { - 'Ref': 'lambdarestapiAAD10924', + RestApiId: { + Ref: 'lambdarestapiAAD10924', }, - 'AuthorizationType': 'NONE', - 'Integration': { - 'IntegrationHttpMethod': 'POST', - 'Type': 'AWS_PROXY', - 'Uri': { + AuthorizationType: 'NONE', + Integration: { + IntegrationHttpMethod: 'POST', + Type: 'AWS_PROXY', + Uri: { 'Fn::Join': [ '', [ 'arn:', { - 'Ref': 'AWS::Partition', + Ref: 'AWS::Partition', }, ':apigateway:', { - 'Ref': 'AWS::Region', + Ref: 'AWS::Region', }, ':lambda:path/2015-03-31/functions/', { @@ -66,12 +63,10 @@ export = { ], }, }, - })); - - test.done(); - }, + }); + }); - 'LambdaRestApi supports function Alias'(test: Test) { + test('LambdaRestApi supports function Alias', () => { // GIVEN const stack = new cdk.Stack(); @@ -91,54 +86,52 @@ export = { const api = new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler: alias }); // THEN -- can't customize further - test.throws(() => { + expect(() => { api.root.addResource('cant-touch-this'); - }); + }).toThrow(); // THEN -- template proxies everything - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { - 'PathPart': '{proxy+}', - })); + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { + PathPart: '{proxy+}', + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { - 'HttpMethod': 'ANY', - 'ResourceId': { - 'Ref': 'lambdarestapiproxyE3AE07E3', + expect(stack).toHaveResource('AWS::ApiGateway::Method', { + HttpMethod: 'ANY', + ResourceId: { + Ref: 'lambdarestapiproxyE3AE07E3', }, - 'RestApiId': { - 'Ref': 'lambdarestapiAAD10924', + RestApiId: { + Ref: 'lambdarestapiAAD10924', }, - 'AuthorizationType': 'NONE', - 'Integration': { - 'IntegrationHttpMethod': 'POST', - 'Type': 'AWS_PROXY', - 'Uri': { + AuthorizationType: 'NONE', + Integration: { + IntegrationHttpMethod: 'POST', + Type: 'AWS_PROXY', + Uri: { 'Fn::Join': [ '', [ 'arn:', { - 'Ref': 'AWS::Partition', + Ref: 'AWS::Partition', }, ':apigateway:', { - 'Ref': 'AWS::Region', + Ref: 'AWS::Region', }, ':lambda:path/2015-03-31/functions/', { - 'Ref': 'alias68BF17F5', + Ref: 'alias68BF17F5', }, '/invocations', ], ], }, }, - })); - - test.done(); - }, + }); + }); - 'when "proxy" is set to false, users need to define the model'(test: Test) { + test('when "proxy" is set to false, users need to define the model', () => { // GIVEN const stack = new cdk.Stack(); @@ -156,28 +149,26 @@ export = { tasks.addMethod('POST'); // THEN - expect(stack).notTo(haveResource('AWS::ApiGateway::Resource', { - 'PathPart': '{proxy+}', - })); + expect(stack).not.toHaveResource('AWS::ApiGateway::Resource', { + PathPart: '{proxy+}', + }); - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'tasks', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: { Ref: 'lambdarestapitasks224418C8' }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST', ResourceId: { Ref: 'lambdarestapitasks224418C8' }, - })); - - test.done(); - }, + }); + }); - 'fails if options.defaultIntegration is also set'(test: Test) { + test('fails if options.defaultIntegration is also set', () => { // GIVEN const stack = new cdk.Stack(); @@ -187,20 +178,18 @@ export = { runtime: lambda.Runtime.NODEJS_10_X, }); - test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { + expect(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler, options: { defaultIntegration: new apigw.HttpIntegration('https://foo/bar') }, - }), /Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); + })).toThrow(/Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); - test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { + expect(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler, defaultIntegration: new apigw.HttpIntegration('https://foo/bar'), - }), /Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); - - test.done(); - }, + })).toThrow(/Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); + }); - 'LambdaRestApi defines a REST API with CORS enabled'(test: Test) { + test('LambdaRestApi defines a REST API with CORS enabled', () => { // GIVEN const stack = new cdk.Stack(); @@ -220,7 +209,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'lambdarestapiproxyE3AE07E3' }, Integration: { @@ -251,8 +240,6 @@ export = { StatusCode: '204', }, ], - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.method.ts b/packages/@aws-cdk/aws-apigateway/test/method.test.ts similarity index 76% rename from packages/@aws-cdk/aws-apigateway/test/test.method.ts rename to packages/@aws-cdk/aws-apigateway/test/method.test.ts index 2255e36e26182..36610126f3ec6 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.method.ts +++ b/packages/@aws-cdk/aws-apigateway/test/method.test.ts @@ -1,8 +1,8 @@ -import { ABSENT, expect, haveResource, haveResourceLike } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; const DUMMY_AUTHORIZER: apigw.IAuthorizer = { @@ -10,8 +10,8 @@ const DUMMY_AUTHORIZER: apigw.IAuthorizer = { authorizationType: apigw.AuthorizationType.CUSTOM, }; -export = { - 'default setup'(test: Test) { +describe('method', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -23,18 +23,18 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST', AuthorizationType: 'NONE', Integration: { Type: 'MOCK', }, - })); + }); + - test.done(); - }, + }); - 'method options can be specified'(test: Test) { + test('method options can be specified', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -50,15 +50,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ApiKeyRequired: true, OperationName: 'MyOperation', - })); + }); - test.done(); - }, - 'integration can be set via a property'(test: Test) { + }); + + test('integration can be set via a property', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -71,7 +71,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'POST', Type: 'AWS', @@ -85,12 +85,12 @@ export = { ], }, }, - })); + }); - test.done(); - }, - 'integration with a custom http method can be set via a property'(test: Test) { + }); + + test('integration with a custom http method can be set via a property', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -103,16 +103,16 @@ export = { }); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'GET', }, - })); + }); + - test.done(); - }, + }); - 'use default integration from api'(test: Test) { + test('use default integration from api', () => { // GIVEN const stack = new cdk.Stack(); const defaultIntegration = new apigw.Integration({ type: apigw.IntegrationType.HTTP_PROXY, uri: 'https://amazon.com' }); @@ -129,17 +129,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { Type: 'HTTP_PROXY', Uri: 'https://amazon.com', }, - })); + }); + - test.done(); - }, + }); - '"methodArn" returns the ARN execute-api ARN for this method in the current stage'(test: Test) { + test('"methodArn" returns the ARN execute-api ARN for this method in the current stage', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api'); @@ -151,7 +151,7 @@ export = { }); // THEN - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -170,10 +170,10 @@ export = { ], }); - test.done(); - }, - '"testMethodArn" returns the ARN of the "test-invoke-stage" stage (console UI)'(test: Test) { + }); + + test('"testMethodArn" returns the ARN of the "test-invoke-stage" stage (console UI)', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api'); @@ -185,7 +185,7 @@ export = { }); // THEN - test.deepEqual(stack.resolve(method.testMethodArn), { + expect(stack.resolve(method.testMethodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -202,10 +202,10 @@ export = { ], }); - test.done(); - }, - '"methodArn" returns an arn with "*" as its stage when deploymentStage is not set'(test: Test) { + }); + + test('"methodArn" returns an arn with "*" as its stage when deploymentStage is not set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -214,7 +214,7 @@ export = { const method = new apigw.Method(stack, 'my-method', { httpMethod: 'POST', resource: api.root }); // THEN - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -231,17 +231,17 @@ export = { ], }); - test.done(); - }, - '"methodArn" and "testMethodArn" replace path parameters with asterisks'(test: Test) { + }); + + test('"methodArn" and "testMethodArn" replace path parameters with asterisks', () => { const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api'); const petId = api.root.addResource('pets').addResource('{petId}'); const commentId = petId.addResource('comments').addResource('{commentId}'); const method = commentId.addMethod('GET'); - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -260,7 +260,7 @@ export = { ], }); - test.deepEqual(stack.resolve(method.testMethodArn), { + expect(stack.resolve(method.testMethodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -277,10 +277,10 @@ export = { ], }); - test.done(); - }, - 'integration "credentialsRole" can be used to assume a role when calling backend'(test: Test) { + }); + + test('integration "credentialsRole" can be used to assume a role when calling backend', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -295,15 +295,15 @@ export = { })); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Credentials: { 'Fn::GetAtt': ['MyRoleF48FFE04', 'Arn'] }, }, - })); - test.done(); - }, + }); + + }); - 'integration "credentialsPassthrough" can be used to passthrough user credentials to backend'(test: Test) { + test('integration "credentialsPassthrough" can be used to passthrough user credentials to backend', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -317,15 +317,15 @@ export = { })); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Credentials: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::*:user/*']] }, }, - })); - test.done(); - }, + }); - 'methodResponse set one or more method responses via options'(test: Test) { + }); + + test('methodResponse set one or more method responses via options', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -356,7 +356,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', MethodResponses: [{ StatusCode: '200', @@ -375,12 +375,12 @@ export = { 'text/plain': 'Error', }, }], - })); + }); - test.done(); - }, - 'multiple integration responses can be used'(test: Test) { // @see https://github.com/aws/aws-cdk/issues/1608 + }); + + test('multiple integration responses can be used', () => { // @see https://github.com/aws/aws-cdk/issues/1608 // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -405,7 +405,7 @@ export = { })); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'POST', IntegrationResponses: [ @@ -422,11 +422,11 @@ export = { Type: 'AWS', Uri: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':apigateway:', { Ref: 'AWS::Region' }, ':foo-service:action/BarAction']] }, }, - })); - test.done(); - }, + }); + + }); - 'method is always set as uppercase'(test: Test) { + test('method is always set as uppercase', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -437,13 +437,13 @@ export = { api.root.addMethod('PUT'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST' })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET' })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { HttpMethod: 'PUT' })); - test.done(); - }, + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST' }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET' }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'PUT' }); + + }); - 'requestModel can be set'(test: Test) { + test('requestModel can be set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -469,17 +469,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', RequestModels: { 'application/json': { Ref: stack.getLogicalId(model.node.findChild('Resource') as cdk.CfnElement) }, }, - })); + }); - test.done(); - }, - 'methodResponse has a mix of response modes'(test: Test) { + }); + + test('methodResponse has a mix of response modes', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -519,7 +519,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', MethodResponses: [{ StatusCode: '200', @@ -539,12 +539,12 @@ export = { 'text/html': { Ref: stack.getLogicalId(htmlModel.node.findChild('Resource') as cdk.CfnElement) }, }, }], - })); + }); + - test.done(); - }, + }); - 'method has a request validator'(test: Test) { + test('method has a request validator', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -563,19 +563,19 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { RequestValidatorId: { Ref: stack.getLogicalId(validator.node.findChild('Resource') as cdk.CfnElement) }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, ValidateRequestBody: true, ValidateRequestParameters: false, - })); + }); + - test.done(); - }, + }); - 'use default requestParameters'(test: Test) { + test('use default requestParameters', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -596,17 +596,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { OperationName: 'defaultRequestParameters', RequestParameters: { 'method.request.path.proxy': true, }, - })); + }); + - test.done(); - }, + }); - 'authorizer is bound correctly'(test: Test) { + test('authorizer is bound correctly', () => { const stack = new cdk.Stack(); const restApi = new apigw.RestApi(stack, 'myrestapi'); @@ -614,16 +614,16 @@ export = { authorizer: DUMMY_AUTHORIZER, }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'ANY', AuthorizationType: 'CUSTOM', AuthorizerId: DUMMY_AUTHORIZER.authorizerId, - })); + }); - test.done(); - }, - 'authorizer via default method options'(test: Test) { + }); + + test('authorizer via default method options', () => { const stack = new cdk.Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -644,31 +644,31 @@ export = { }); restApi.root.addMethod('ANY'); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Name: 'myauthorizer1', Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), - })); + }); - test.done(); - }, - 'fails when authorization type does not match the authorizer'(test: Test) { + }); + + test('fails when authorization type does not match the authorizer', () => { const stack = new cdk.Stack(); const restApi = new apigw.RestApi(stack, 'myrestapi'); - test.throws(() => { + expect(() => { restApi.root.addMethod('ANY', undefined, { authorizationType: apigw.AuthorizationType.IAM, authorizer: DUMMY_AUTHORIZER, }); - }, /Authorization type is set to AWS_IAM which is different from what is required by the authorizer/); + }).toThrow(/Authorization type is set to AWS_IAM which is different from what is required by the authorizer/); + - test.done(); - }, + }); - 'fails when authorization type does not match the authorizer in default method options'(test: Test) { + test('fails when authorization type does not match the authorizer in default method options', () => { const stack = new cdk.Stack(); const restApi = new apigw.RestApi(stack, 'myrestapi', { @@ -677,16 +677,16 @@ export = { }, }); - test.throws(() => { + expect(() => { restApi.root.addMethod('ANY', undefined, { authorizationType: apigw.AuthorizationType.NONE, }); - }, /Authorization type is set to NONE which is different from what is required by the authorizer/); + }).toThrow(/Authorization type is set to NONE which is different from what is required by the authorizer/); - test.done(); - }, - 'method has Auth Scopes'(test: Test) { + }); + + test('method has Auth Scopes', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -702,15 +702,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ApiKeyRequired: true, AuthorizationScopes: ['AuthScope1', 'AuthScope2'], - })); + }); + - test.done(); - }, + }); - 'use default Auth Scopes'(test: Test) { + test('use default Auth Scopes', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -731,15 +731,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { OperationName: 'defaultAuthScopes', AuthorizationScopes: ['DefaultAuth'], - })); + }); + - test.done(); - }, + }); - 'Method options Auth Scopes is picked up'(test: Test) { + test('Method options Auth Scopes is picked up', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -761,15 +761,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ApiKeyRequired: true, AuthorizationScopes: ['MethodAuthScope'], - })); + }); - test.done(); - }, - 'Auth Scopes absent'(test: Test) { + }); + + test('Auth Scopes absent', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -787,15 +787,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { OperationName: 'authScopesAbsent', AuthorizationScopes: ABSENT, - })); + }); - test.done(); - }, - 'method has a request validator with provided properties'(test: Test) { + }); + + test('method has a request validator with provided properties', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -814,17 +814,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: stack.resolve(api.restApiId), ValidateRequestBody: true, ValidateRequestParameters: false, Name: 'test-validator', - })); + }); + - test.done(); - }, + }); - 'method does not have a request validator'(test: Test) { + test('method does not have a request validator', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -836,14 +836,14 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { RequestValidatorId: ABSENT, - })); + }); + - test.done(); - }, + }); - 'method does not support both request validator and request validator options'(test: Test) { + test('method does not support both request validator and request validator options', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -867,13 +867,13 @@ export = { }; // THEN - test.throws(() => new apigw.Method(stack, 'method', methodProps), - /Only one of 'requestValidator' or 'requestValidatorOptions' must be specified./); + expect(() => new apigw.Method(stack, 'method', methodProps)) + .toThrow(/Only one of 'requestValidator' or 'requestValidatorOptions' must be specified./); - test.done(); - }, - '"restApi" and "api" properties return the RestApi correctly'(test: Test) { + }); + + test('"restApi" and "api" properties return the RestApi correctly', () => { // GIVEN const stack = new cdk.Stack(); @@ -882,14 +882,14 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.ok(method.restApi); - test.ok(method.api); - test.deepEqual(stack.resolve(method.api.restApiId), stack.resolve(method.restApi.restApiId)); + expect(method.restApi).toBeDefined(); + expect(method.api).toBeDefined(); + expect(stack.resolve(method.api.restApiId)).toEqual(stack.resolve(method.restApi.restApiId)); + - test.done(); - }, + }); - '"restApi" throws an error on imported while "api" returns correctly'(test: Test) { + test('"restApi" throws an error on imported while "api" returns correctly', () => { // GIVEN const stack = new cdk.Stack(); @@ -901,9 +901,9 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.throws(() => method.restApi, /not available on Resource not connected to an instance of RestApi/); - test.ok(method.api); + expect(() => method.restApi).toThrow(/not available on Resource not connected to an instance of RestApi/); + expect(method.api).toBeDefined(); - test.done(); - }, -}; + + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.model.ts b/packages/@aws-cdk/aws-apigateway/test/model.test.ts similarity index 83% rename from packages/@aws-cdk/aws-apigateway/test/test.model.ts rename to packages/@aws-cdk/aws-apigateway/test/model.test.ts index 9f0907b1e66f2..cb741f77e2d83 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.model.ts +++ b/packages/@aws-cdk/aws-apigateway/test/model.test.ts @@ -1,10 +1,9 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'default setup'(test: Test) { +describe('model', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true }); @@ -25,7 +24,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Model', { + expect(stack).toHaveResource('AWS::ApiGateway::Model', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, Schema: { $schema: 'http://json-schema.org/draft-04/schema#', @@ -34,12 +33,10 @@ export = { properties: { message: { type: 'string' } }, }, ContentType: 'application/json', - })); - - test.done(); - }, + }); + }); - 'no deployment'(test: Test) { + test('no deployment', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true }); @@ -60,7 +57,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Model', { + expect(stack).toHaveResource('AWS::ApiGateway::Model', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, Schema: { $schema: 'http://json-schema.org/draft-04/schema#', @@ -68,8 +65,6 @@ export = { type: 'object', properties: { message: { type: 'string' } }, }, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.requestvalidator.ts b/packages/@aws-cdk/aws-apigateway/test/requestvalidator.test.ts similarity index 78% rename from packages/@aws-cdk/aws-apigateway/test/test.requestvalidator.ts rename to packages/@aws-cdk/aws-apigateway/test/requestvalidator.test.ts index b264f85c0733c..0838db161f8db 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.requestvalidator.ts +++ b/packages/@aws-cdk/aws-apigateway/test/requestvalidator.test.ts @@ -1,10 +1,9 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'default setup'(test: Test) { +describe('request validator', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true }); @@ -21,16 +20,14 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, ValidateRequestBody: true, ValidateRequestParameters: false, - })); - - test.done(); - }, + }); + }); - 'no deployment'(test: Test) { + test('no deployment', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -48,13 +45,11 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, Name: 'my-model', ValidateRequestBody: false, ValidateRequestParameters: true, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.resource.ts b/packages/@aws-cdk/aws-apigateway/test/resource.test.ts similarity index 66% rename from packages/@aws-cdk/aws-apigateway/test/test.resource.ts rename to packages/@aws-cdk/aws-apigateway/test/resource.test.ts index 43db34771346f..ecad61cb1905c 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.resource.ts +++ b/packages/@aws-cdk/aws-apigateway/test/resource.test.ts @@ -1,12 +1,11 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; /* eslint-disable quote-props */ -export = { - 'ProxyResource defines a "{proxy+}" resource with ANY method'(test: Test) { +describe('resource', () => { + test('ProxyResource defines a "{proxy+}" resource with ANY method', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -17,7 +16,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { 'ParentId': { 'Fn::GetAtt': [ 'apiC8550315', @@ -28,9 +27,9 @@ export = { 'RestApiId': { 'Ref': 'apiC8550315', }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'ANY', 'ResourceId': { 'Ref': 'proxy3A1DA9C7', @@ -42,12 +41,12 @@ export = { 'Integration': { 'Type': 'MOCK', }, - })); + }); - test.done(); - }, - 'if "anyMethod" is false, then an ANY method will not be defined'(test: Test) { + }); + + test('if "anyMethod" is false, then an ANY method will not be defined', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -61,14 +60,14 @@ export = { proxy.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource')); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'GET' })); - expect(stack).notTo(haveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'ANY' })); + expect(stack).toHaveResource('AWS::ApiGateway::Resource'); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'GET' }); + expect(stack).not.toHaveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'ANY' }); + - test.done(); - }, + }); - 'addProxy can be used on any resource to attach a proxy from that route'(test: Test) { + test('addProxy can be used on any resource to attach a proxy from that route', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api', { @@ -79,7 +78,7 @@ export = { const v2 = api.root.addResource('v2'); v2.addProxy(); - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ 'Resources': { 'apiC8550315': { 'Type': 'AWS::ApiGateway::RestApi', @@ -133,10 +132,10 @@ export = { }, }); - test.done(); - }, - 'if proxy is added to root, proxy methods are automatically duplicated (with integration and options)'(test: Test) { + }); + + test('if proxy is added to root, proxy methods are automatically duplicated (with integration and options)', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -155,7 +154,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'DELETE', ResourceId: { Ref: 'apiproxy4EA44110' }, Integration: { @@ -163,9 +162,9 @@ export = { Type: 'MOCK', }, OperationName: 'DeleteMe', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'DELETE', ResourceId: { 'Fn::GetAtt': ['apiC8550315', 'RootResourceId'] }, Integration: { @@ -173,12 +172,12 @@ export = { Type: 'MOCK', }, OperationName: 'DeleteMe', - })); + }); + - test.done(); - }, + }); - 'if proxy is added to root, proxy methods are only added if they are not defined already on the root resource'(test: Test) { + test('if proxy is added to root, proxy methods are only added if they are not defined already on the root resource', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -189,10 +188,10 @@ export = { proxy.addMethod('POST'); // THEN - test.done(); - }, - 'url for a resource'(test: Test) { + }); + + test('url for a resource', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -202,7 +201,7 @@ export = { const cResource = aResource.addResource('b').addResource('c'); // THEN - test.deepEqual(stack.resolve(aResource.url), { + expect(stack.resolve(aResource.url)).toEqual({ 'Fn::Join': [ '', [ @@ -218,7 +217,7 @@ export = { ], ], }); - test.deepEqual(stack.resolve(cResource.url), { + expect(stack.resolve(cResource.url)).toEqual({ 'Fn::Join': [ '', [ @@ -234,23 +233,23 @@ export = { ], ], }); - test.done(); - }, - 'getResource': { + }); + + describe('getResource', () => { - 'root resource': { - 'returns undefined if not found'(test: Test) { + describe('root resource', () => { + test('returns undefined if not found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); // THEN - test.deepEqual(api.root.getResource('boom'), undefined); - test.done(); - }, + expect(api.root.getResource('boom')).toBeUndefined(); + + }); - 'returns the resource if found'(test: Test) { + test('returns the resource if found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -260,12 +259,12 @@ export = { const r2 = api.root.addResource('world'); // THEN - test.deepEqual(api.root.getResource('hello'), r1); - test.deepEqual(api.root.getResource('world'), r2); - test.done(); - }, + expect(api.root.getResource('hello')).toEqual(r1); + expect(api.root.getResource('world')).toEqual(r2); + + }); - 'returns the resource even if it was created using "new"'(test: Test) { + test('returns the resource even if it was created using "new"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -277,26 +276,26 @@ export = { }); // THEN - test.deepEqual(api.root.getResource('yello'), r1); - test.done(); - }, + expect(api.root.getResource('yello')).toEqual(r1); - }, + }); - 'non-root': { + }); - 'returns undefined if not found'(test: Test) { + describe('non-root', () => { + + test('returns undefined if not found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); const res = api.root.addResource('boom'); // THEN - test.deepEqual(res.getResource('child-of-boom'), undefined); - test.done(); - }, + expect(res.getResource('child-of-boom')).toBeUndefined(); - 'returns the resource if found'(test: Test) { + }); + + test('returns the resource if found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -307,12 +306,12 @@ export = { const r2 = child.addResource('world'); // THEN - test.deepEqual(child.getResource('hello'), r1); - test.deepEqual(child.getResource('world'), r2); - test.done(); - }, + expect(child.getResource('hello')).toEqual(r1); + expect(child.getResource('world')).toEqual(r2); - 'returns the resource even if created with "new"'(test: Test) { + }); + + test('returns the resource even if created with "new"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -327,28 +326,28 @@ export = { }); // THEN - test.deepEqual(child.getResource('hello'), r1); - test.deepEqual(child.getResource('outside-world'), r2); - test.done(); + expect(child.getResource('hello')).toEqual(r1); + expect(child.getResource('outside-world')).toEqual(r2); - }, - }, - 'resourceForPath': { + }); + }); + + describe('resourceForPath', () => { - 'empty path or "/" (on root) returns this'(test: Test) { + test('empty path or "/" (on root) returns this', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); // THEN - test.deepEqual(api.root.resourceForPath(''), api.root); - test.deepEqual(api.root.resourceForPath('/'), api.root); - test.deepEqual(api.root.resourceForPath('///'), api.root); - test.done(); - }, + expect(api.root.resourceForPath('')).toEqual(api.root); + expect(api.root.resourceForPath('/')).toEqual(api.root); + expect(api.root.resourceForPath('///')).toEqual(api.root); + + }); - 'returns a resource for that path'(test: Test) { + test('returns a resource for that path', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -357,11 +356,11 @@ export = { const resource = api.root.resourceForPath('/boom/trach'); // THEN - test.deepEqual(resource.path, '/boom/trach'); - test.done(); - }, + expect(resource.path).toEqual('/boom/trach'); + + }); - 'resources not created if not needed'(test: Test) { + test('resources not created if not needed', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -372,19 +371,19 @@ export = { // THEN const parent = api.root.getResource('boom'); - test.ok(parent); - test.deepEqual(parent!.path, '/boom'); + expect(parent).toBeDefined(); + expect(parent!.path).toEqual('/boom'); - test.same(trach.parentResource, parent); - test.deepEqual(trach.parentResource!.path, '/boom'); + expect(trach.parentResource).toBe(parent); + expect(trach.parentResource!.path).toEqual('/boom'); const bam2 = api.root.resourceForPath('/boom/bam'); - test.same(bam1, bam2); - test.deepEqual(bam1.parentResource!.path, '/boom'); - test.done(); - }, + expect(bam1).toBe(bam2); + expect(bam1.parentResource!.path).toEqual('/boom'); + + }); - }, - }, + }); + }); -}; +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts similarity index 70% rename from packages/@aws-cdk/aws-apigateway/test/test.restapi.ts rename to packages/@aws-cdk/aws-apigateway/test/restapi.test.ts index dfbe61d180e28..8b1c159e2baa5 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts @@ -1,13 +1,11 @@ -import { ABSENT, expect, haveResource, haveResourceLike, ResourcePart, SynthUtils } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT, ResourcePart, SynthUtils } from '@aws-cdk/assert'; import { GatewayVpcEndpoint } from '@aws-cdk/aws-ec2'; import { App, CfnElement, CfnResource, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -/* eslint-disable max-len */ - -export = { - 'minimal setup'(test: Test) { +describe('restapi', () => { + test('minimal setup', () => { // GIVEN const stack = new Stack(); @@ -16,7 +14,7 @@ export = { api.root.addMethod('GET'); // must have at least one method or an API definition // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { myapi4C7BF186: { Type: 'AWS::ApiGateway::RestApi', @@ -96,11 +94,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'restApiName is set correctly'(test: Test) { + test('restApiName is set correctly', () => { // GIVEN const stack = new Stack(); @@ -111,19 +107,17 @@ export = { }); // THEN - test.deepEqual(myapi.restApiName, 'myapi'); - test.deepEqual(yourapi.restApiName, 'namedapi'); - test.done(); - }, + expect(myapi.restApiName).toEqual('myapi'); + expect(yourapi.restApiName).toEqual('namedapi'); + }); - 'defaultChild is set correctly'(test: Test) { + test('defaultChild is set correctly', () => { const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); - test.ok(api.node.defaultChild instanceof apigw.CfnRestApi); - test.done(); - }, + expect(api.node.defaultChild instanceof apigw.CfnRestApi).toBeDefined(); + }); - '"name" is defaulted to resource physical name'(test: Test) { + test('"name" is defaulted to resource physical name', () => { // GIVEN const stack = new Stack(); @@ -136,14 +130,12 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { Name: 'restapi', - })); - - test.done(); - }, + }); + }); - 'fails in synthesis if there are no methods or definition'(test: Test) { + test('fails in synthesis if there are no methods or definition', () => { // GIVEN const app = new App(); const stack = new Stack(app, 'my-stack'); @@ -154,11 +146,10 @@ export = { api.root.addResource('bar').addResource('goo'); // THEN - test.throws(() => app.synth(), /The REST API doesn't contain any methods/); - test.done(); - }, + expect(() => app.synth()).toThrow(/The REST API doesn't contain any methods/); + }); - '"addResource" can be used on "IRestApiResource" to form a tree'(test: Test) { + test('"addResource" can be used on "IRestApiResource" to form a tree', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi', { @@ -175,25 +166,23 @@ export = { foo.addResource('{hello}'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'foo', ParentId: { 'Fn::GetAtt': ['restapiC5611D27', 'RootResourceId'] }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'bar', ParentId: { 'Fn::GetAtt': ['restapiC5611D27', 'RootResourceId'] }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: '{hello}', ParentId: { Ref: 'restapifooF697E056' }, - })); - - test.done(); - }, + }); + }); - '"addResource" allows configuration of proxy paths'(test: Test) { + test('"addResource" allows configuration of proxy paths', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi', { @@ -207,14 +196,13 @@ export = { proxy.addMethod('ANY'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: '{proxy+}', ParentId: { 'Fn::GetAtt': ['restapiC5611D27', 'RootResourceId'] }, - })); - test.done(); - }, + }); + }); - '"addMethod" can be used to add methods to resources'(test: Test) { + test('"addMethod" can be used to add methods to resources', () => { // GIVEN const stack = new Stack(); @@ -226,7 +214,7 @@ export = { r1.addMethod('POST'); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { restapiC5611D27: { Type: 'AWS::ApiGateway::RestApi', @@ -286,11 +274,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'resourcePath returns the full path of the resource within the API'(test: Test) { + test('resourcePath returns the full path of the resource within the API', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi'); @@ -303,62 +289,57 @@ export = { const r2 = api.root.addResource('r2'); // THEN - test.deepEqual(api.root.path, '/'); - test.deepEqual(r1.path, '/r1'); - test.deepEqual(r11.path, '/r1/r1_1'); - test.deepEqual(r12.path, '/r1/r1_2'); - test.deepEqual(r121.path, '/r1/r1_2/r1_2_1'); - test.deepEqual(r2.path, '/r2'); - test.done(); - }, - - 'resource path part validation'(test: Test) { + expect(api.root.path).toEqual('/'); + expect(r1.path).toEqual('/r1'); + expect(r11.path).toEqual('/r1/r1_1'); + expect(r12.path).toEqual('/r1/r1_2'); + expect(r121.path).toEqual('/r1/r1_2/r1_2_1'); + expect(r2.path).toEqual('/r2'); + }); + + test('resource path part validation', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi'); // THEN - test.throws(() => api.root.addResource('foo/')); + expect(() => api.root.addResource('foo/')).toThrow(); api.root.addResource('boom-bam'); - test.throws(() => api.root.addResource('illegal()')); + expect(() => api.root.addResource('illegal()')).toThrow(); api.root.addResource('{foo}'); - test.throws(() => api.root.addResource('foo{bar}')); - test.done(); - }, + expect(() => api.root.addResource('foo{bar}')).toThrow(); + }); - 'fails if "deployOptions" is set with "deploy" disabled'(test: Test) { + test('fails if "deployOptions" is set with "deploy" disabled', () => { // GIVEN const stack = new Stack(); // THEN - test.throws(() => new apigw.RestApi(stack, 'myapi', { + expect(() => new apigw.RestApi(stack, 'myapi', { deploy: false, deployOptions: { cachingEnabled: true }, - }), /Cannot set 'deployOptions' if 'deploy' is disabled/); + })).toThrow(/Cannot set 'deployOptions' if 'deploy' is disabled/); + }); - test.done(); - }, - - 'CloudWatch role is created for API Gateway'(test: Test) { + test('CloudWatch role is created for API Gateway', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::IAM::Role')); - expect(stack).to(haveResource('AWS::ApiGateway::Account')); - test.done(); - }, + expect(stack).toHaveResource('AWS::IAM::Role'); + expect(stack).toHaveResource('AWS::ApiGateway::Account'); + }); - '"url" and "urlForPath" return the URL endpoints of the deployed API'(test: Test) { + test('"url" and "urlForPath" return the URL endpoints of the deployed API', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); api.root.addMethod('GET'); // THEN - test.deepEqual(stack.resolve(api.url), { + expect(stack.resolve(api.url)).toEqual({ 'Fn::Join': ['', ['https://', @@ -371,7 +352,7 @@ export = { { Ref: 'apiDeploymentStageprod896C8101' }, '/']], }); - test.deepEqual(stack.resolve(api.urlForPath('/foo/bar')), { + expect(stack.resolve(api.urlForPath('/foo/bar'))).toEqual({ 'Fn::Join': ['', ['https://', @@ -384,33 +365,30 @@ export = { { Ref: 'apiDeploymentStageprod896C8101' }, '/foo/bar']], }); - test.done(); - }, + }); - '"urlForPath" would not work if there is no deployment'(test: Test) { + test('"urlForPath" would not work if there is no deployment', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api', { deploy: false }); api.root.addMethod('GET'); // THEN - test.throws(() => api.url, /Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); - test.throws(() => api.urlForPath('/foo'), /Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); - test.done(); - }, + expect(() => api.url).toThrow(/Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); + expect(() => api.urlForPath('/foo')).toThrow(/Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); + }); - '"urlForPath" requires that path will begin with "/"'(test: Test) { + test('"urlForPath" requires that path will begin with "/"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); api.root.addMethod('GET'); // THEN - test.throws(() => api.urlForPath('foo'), /Path must begin with \"\/\": foo/); - test.done(); - }, + expect(() => api.urlForPath('foo')).toThrow(/Path must begin with \"\/\": foo/); + }); - '"executeApiArn" returns the execute-api ARN for a resource/method'(test: Test) { + test('"executeApiArn" returns the execute-api ARN for a resource/method', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -420,7 +398,7 @@ export = { const arn = api.arnForExecuteApi('method', '/path', 'stage'); // THEN - test.deepEqual(stack.resolve(arn), { + expect(stack.resolve(arn)).toEqual({ 'Fn::Join': ['', ['arn:', @@ -433,21 +411,19 @@ export = { { Ref: 'apiC8550315' }, '/stage/method/path']], }); - test.done(); - }, + }); - '"executeApiArn" path must begin with "/"'(test: Test) { + test('"executeApiArn" path must begin with "/"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); api.root.addMethod('GET'); // THEN - test.throws(() => api.arnForExecuteApi('method', 'hey-path', 'stage'), /"path" must begin with a "\/": 'hey-path'/); - test.done(); - }, + expect(() => api.arnForExecuteApi('method', 'hey-path', 'stage')).toThrow(/"path" must begin with a "\/": 'hey-path'/); + }); - '"executeApiArn" will convert ANY to "*"'(test: Test) { + test('"executeApiArn" will convert ANY to "*"', () => { // GIVEN const stack = new Stack(); @@ -455,7 +431,7 @@ export = { const method = api.root.addMethod('ANY'); // THEN - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': ['', ['arn:', @@ -470,10 +446,9 @@ export = { { Ref: 'apiDeploymentStageprod896C8101' }, '/*/']], }); - test.done(); - }, + }); - '"endpointTypes" can be used to specify endpoint configuration for the api'(test: Test) { + test('"endpointTypes" can be used to specify endpoint configuration for the api', () => { // GIVEN const stack = new Stack(); @@ -485,18 +460,17 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: [ 'EDGE', 'PRIVATE', ], }, - })); - test.done(); - }, + }); + }); - '"endpointConfiguration" can be used to specify endpoint types for the api'(test: Test) { + test('"endpointConfiguration" can be used to specify endpoint types for the api', () => { // GIVEN const stack = new Stack(); @@ -510,15 +484,14 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: ['EDGE', 'PRIVATE'], }, - })); - test.done(); - }, + }); + }); - '"endpointConfiguration" can be used to specify vpc endpoints on the API'(test: Test) { + test('"endpointConfiguration" can be used to specify vpc endpoints on the API', () => { // GIVEN const stack = new Stack(); @@ -536,7 +509,7 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: [ 'EDGE', @@ -547,26 +520,24 @@ export = { 'vpcEndpoint2', ], }, - })); - test.done(); - }, + }); + }); - '"endpointTypes" and "endpointConfiguration" can NOT both be used to specify endpoint configuration for the api'(test: Test) { + test('"endpointTypes" and "endpointConfiguration" can NOT both be used to specify endpoint configuration for the api', () => { // GIVEN const stack = new Stack(); // THEN - test.throws(() => new apigw.RestApi(stack, 'api', { + expect(() => new apigw.RestApi(stack, 'api', { endpointConfiguration: { types: [apigw.EndpointType.PRIVATE], vpcEndpoints: [GatewayVpcEndpoint.fromGatewayVpcEndpointId(stack, 'ImportedEndpoint', 'vpcEndpoint')], }, endpointTypes: [apigw.EndpointType.PRIVATE], - }), /Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed/); - test.done(); - }, + })).toThrow(/Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed/); + }); - '"cloneFrom" can be used to clone an existing API'(test: Test) { + test('"cloneFrom" can be used to clone an existing API', () => { // GIVEN const stack = new Stack(); const cloneFrom = apigw.RestApi.fromRestApiId(stack, 'RestApi', 'foobar'); @@ -578,15 +549,13 @@ export = { api.root.addMethod('GET'); - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { CloneFrom: 'foobar', Name: 'api', - })); - - test.done(); - }, + }); + }); - 'allow taking a dependency on the rest api (includes deployment and stage)'(test: Test) { + test('allow taking a dependency on the rest api (includes deployment and stage)', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -597,7 +566,7 @@ export = { resource.node.addDependency(api); // THEN - expect(stack).to(haveResource('My::Resource', { + expect(stack).toHaveResource('My::Resource', { DependsOn: [ 'myapiAccountC3A4750C', 'myapiCloudWatchRoleEB425128', @@ -606,12 +575,10 @@ export = { 'myapiDeploymentStageprod329F21FF', 'myapi162F20B8', ], - }, ResourcePart.CompleteDefinition)); + }, ResourcePart.CompleteDefinition); + }); - test.done(); - }, - - 'defaultIntegration and defaultMethodOptions can be used at any level'(test: Test) { + test('defaultIntegration and defaultMethodOptions can be used at any level', () => { // GIVEN const stack = new Stack(); const rootInteg = new apigw.AwsIntegration({ @@ -655,43 +622,41 @@ export = { // THEN // CASE #1 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: { 'Fn::GetAtt': ['myapi162F20B8', 'RootResourceId'] }, Integration: { Type: 'AWS' }, AuthorizerId: 'AUTHID', AuthorizationType: 'AWS_IAM', - })); + }); // CASE #2 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'POST', ResourceId: { Ref: 'myapichildA0A65412' }, Integration: { Type: 'AWS' }, AuthorizerId: 'AUTHID', AuthorizationType: 'COGNITO_USER_POOLS', - })); + }); // CASE #3 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'DELETE', Integration: { Type: 'MOCK' }, AuthorizerId: 'AUTHID2', AuthorizationType: 'AWS_IAM', - })); + }); // CASE #4 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'PUT', Integration: { Type: 'AWS' }, AuthorizerId: 'AUTHID2', AuthorizationType: 'AWS_IAM', - })); - - test.done(); - }, + }); + }); - 'addApiKey is supported'(test: Test) { + test('addApiKey is supported', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -704,7 +669,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { Enabled: true, Name: 'myApiKey1', StageKeys: [ @@ -714,12 +679,10 @@ export = { }, ], Value: '01234567890ABCDEFabcdef', - })); - - test.done(); - }, + }); + }); - 'addModel is supported'(test: Test) { + test('addModel is supported', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -736,7 +699,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Model', { + expect(stack).toHaveResource('AWS::ApiGateway::Model', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as CfnElement) }, Schema: { $schema: 'http://json-schema.org/draft-04/schema#', @@ -744,12 +707,10 @@ export = { type: 'object', properties: { message: { type: 'string' } }, }, - })); - - test.done(); - }, + }); + }); - 'addRequestValidator is supported'(test: Test) { + test('addRequestValidator is supported', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -768,23 +729,22 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as CfnElement) }, Name: 'Parameters', ValidateRequestBody: false, ValidateRequestParameters: true, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as CfnElement) }, Name: 'Body', ValidateRequestBody: true, ValidateRequestParameters: false, - })); + }); + }); - test.done(); - }, - 'creates output with given "exportName"'(test: Test) { + test('creates output with given "exportName"', () => { // GIVEN const stack = new Stack(); @@ -793,7 +753,7 @@ export = { api.root.addMethod('GET'); // THEN - test.deepEqual(SynthUtils.toCloudFormation(stack).Outputs, { + expect(SynthUtils.toCloudFormation(stack).Outputs).toEqual({ myapiEndpoint8EB17201: { Value: { 'Fn::Join': [ @@ -814,11 +774,9 @@ export = { Export: { Name: 'my-given-export-name' }, }, }); + }); - test.done(); - }, - - 'creates output when "exportName" is not specified'(test: Test) { + test('creates output when "exportName" is not specified', () => { // GIVEN const stack = new Stack(); @@ -827,7 +785,7 @@ export = { api.root.addMethod('GET'); // THEN - test.deepEqual(SynthUtils.toCloudFormation(stack).Outputs, { + expect(SynthUtils.toCloudFormation(stack).Outputs).toEqual({ myapiEndpoint8EB17201: { Value: { 'Fn::Join': [ @@ -847,11 +805,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'gateway response resource is created'(test: Test) { + test('gateway response resource is created', () => { // GIVEN const stack = new Stack(); @@ -867,18 +823,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::GatewayResponse', { + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { ResponseType: 'ACCESS_DENIED', RestApiId: stack.resolve(api.restApiId), StatusCode: ABSENT, ResponseParameters: ABSENT, ResponseTemplates: ABSENT, - })); - - test.done(); - }, + }); + }); - 'gateway response resource is created with parameters'(test: Test) { + test('gateway response resource is created with parameters', () => { // GIVEN const stack = new Stack(); @@ -899,7 +853,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::GatewayResponse', { + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { ResponseType: 'AUTHORIZER_FAILURE', RestApiId: stack.resolve(api.restApiId), StatusCode: '500', @@ -908,12 +862,10 @@ export = { 'gatewayresponse.header.test-key': 'test-value', }, ResponseTemplates: ABSENT, - })); - - test.done(); - }, + }); + }); - 'gateway response resource is created with templates'(test: Test) { + test('gateway response resource is created with templates', () => { // GIVEN const stack = new Stack(); @@ -933,7 +885,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::GatewayResponse', { + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { ResponseType: 'AUTHORIZER_FAILURE', RestApiId: stack.resolve(api.restApiId), StatusCode: '500', @@ -941,12 +893,10 @@ export = { ResponseTemplates: { 'application/json': '{ "message": $context.error.messageString, "statusCode": "488" }', }, - })); - - test.done(); - }, + }); + }); - '"restApi" and "api" properties return the RestApi correctly'(test: Test) { + test('"restApi" and "api" properties return the RestApi correctly', () => { // GIVEN const stack = new Stack(); @@ -955,14 +905,12 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.ok(method.restApi); - test.ok(method.api); - test.deepEqual(stack.resolve(method.api.restApiId), stack.resolve(method.restApi.restApiId)); + expect(method.restApi).toBeDefined(); + expect(method.api).toBeDefined(); + expect(stack.resolve(method.api.restApiId)).toEqual(stack.resolve(method.restApi.restApiId)); + }); - test.done(); - }, - - '"restApi" throws an error on imported while "api" returns correctly'(test: Test) { + test('"restApi" throws an error on imported while "api" returns correctly', () => { // GIVEN const stack = new Stack(); @@ -974,14 +922,12 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.throws(() => method.restApi, /not available on Resource not connected to an instance of RestApi/); - test.ok(method.api); - - test.done(); - }, + expect(() => method.restApi).toThrow(/not available on Resource not connected to an instance of RestApi/); + expect(method.api).toBeDefined(); + }); - Import: { - 'fromRestApiId()'(test: Test) { + describe('Import', () => { + test('fromRestApiId()', () => { // GIVEN const stack = new Stack(); @@ -989,11 +935,10 @@ export = { const imported = apigw.RestApi.fromRestApiId(stack, 'imported-api', 'api-rxt4498f'); // THEN - test.deepEqual(stack.resolve(imported.restApiId), 'api-rxt4498f'); - test.done(); - }, + expect(stack.resolve(imported.restApiId)).toEqual('api-rxt4498f'); + }); - 'fromRestApiAttributes()'(test: Test) { + test('fromRestApiAttributes()', () => { // GIVEN const stack = new Stack(); @@ -1006,21 +951,19 @@ export = { resource.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'pets', ParentId: stack.resolve(imported.restApiRootResourceId), - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: stack.resolve(resource.resourceId), - })); - - test.done(); - }, - }, + }); + }); + }); - SpecRestApi: { - 'add Methods and Resources'(test: Test) { + describe('SpecRestApi', () => { + test('add Methods and Resources', () => { // GIVEN const stack = new Stack(); const api = new apigw.SpecRestApi(stack, 'SpecRestApi', { @@ -1032,18 +975,17 @@ export = { resource.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'pets', ParentId: stack.resolve(api.restApiRootResourceId), - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: stack.resolve(resource.resourceId), - })); - test.done(); - }, + }); + }); - '"endpointTypes" can be used to specify endpoint configuration for SpecRestApi'(test: Test) { + test('"endpointTypes" can be used to specify endpoint configuration for SpecRestApi', () => { // GIVEN const stack = new Stack(); @@ -1056,20 +998,19 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: [ 'EDGE', 'PRIVATE', ], }, - })); - test.done(); - }, - }, + }); + }); + }); - Metrics: { - 'metric'(test: Test) { + describe('Metrics', () => { + test('metric', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1080,15 +1021,13 @@ export = { const countMetric = api.metric(metricName, { statistic }); // THEN - test.equal(countMetric.namespace, 'AWS/ApiGateway'); - test.equal(countMetric.metricName, metricName); - test.deepEqual(countMetric.dimensions, { ApiName: 'my-api' }); - test.equal(countMetric.statistic, statistic); - - test.done(); - }, + expect(countMetric.namespace).toEqual('AWS/ApiGateway'); + expect(countMetric.metricName).toEqual(metricName); + expect(countMetric.dimensions).toEqual({ ApiName: 'my-api' }); + expect(countMetric.statistic).toEqual(statistic); + }); - 'metricClientError'(test: Test) { + test('metricClientError', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1098,14 +1037,12 @@ export = { const countMetric = api.metricClientError({ color }); // THEN - test.equal(countMetric.metricName, '4XXError'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('4XXError'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricServerError'(test: Test) { + test('metricServerError', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1115,14 +1052,12 @@ export = { const countMetric = api.metricServerError({ color }); // THEN - test.equal(countMetric.metricName, '5XXError'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('5XXError'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricCacheHitCount'(test: Test) { + test('metricCacheHitCount', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1132,14 +1067,12 @@ export = { const countMetric = api.metricCacheHitCount({ color }); // THEN - test.equal(countMetric.metricName, 'CacheHitCount'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('CacheHitCount'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricCacheMissCount'(test: Test) { + test('metricCacheMissCount', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1149,14 +1082,12 @@ export = { const countMetric = api.metricCacheMissCount({ color }); // THEN - test.equal(countMetric.metricName, 'CacheMissCount'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('CacheMissCount'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricCount'(test: Test) { + test('metricCount', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1166,14 +1097,12 @@ export = { const countMetric = api.metricCount({ color }); // THEN - test.equal(countMetric.metricName, 'Count'); - test.equal(countMetric.statistic, 'SampleCount'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('Count'); + expect(countMetric.statistic).toEqual('SampleCount'); + expect(countMetric.color).toEqual(color); + }); - 'metricIntegrationLatency'(test: Test) { + test('metricIntegrationLatency', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1183,13 +1112,11 @@ export = { const countMetric = api.metricIntegrationLatency({ color }); // THEN - test.equal(countMetric.metricName, 'IntegrationLatency'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('IntegrationLatency'); + expect(countMetric.color).toEqual(color); + }); - 'metricLatency'(test: Test) { + test('metricLatency', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1199,10 +1126,8 @@ export = { const countMetric = api.metricLatency({ color }); // THEN - test.equal(countMetric.metricName, 'Latency'); - test.equal(countMetric.color, color); - - test.done(); - }, - }, -}; + expect(countMetric.metricName).toEqual('Latency'); + expect(countMetric.color).toEqual(color); + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.stage.ts b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts similarity index 77% rename from packages/@aws-cdk/aws-apigateway/test/test.stage.ts rename to packages/@aws-cdk/aws-apigateway/test/stage.test.ts index b51f30a601e20..1584850913deb 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.stage.ts +++ b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts @@ -1,11 +1,10 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'minimal setup'(test: Test) { +describe('stage', () => { + test('minimal setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -16,7 +15,7 @@ export = { new apigateway.Stage(stack, 'my-stage', { deployment }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { testapiD6451F70: { Type: 'AWS::ApiGateway::RestApi', @@ -68,11 +67,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'common method settings can be set at the stage level'(test: Test) { + test('common method settings can be set at the stage level', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -87,7 +84,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { MethodSettings: [ { HttpMethod: '*', @@ -96,12 +93,10 @@ export = { ThrottlingRateLimit: 12, }, ], - })); - - test.done(); - }, + }); + }); - 'custom method settings can be set by their path'(test: Test) { + test('custom method settings can be set by their path', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -121,7 +116,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { MethodSettings: [ { HttpMethod: '*', @@ -135,12 +130,10 @@ export = { ResourcePath: '/~1goo~1bar', }, ], - })); - - test.done(); - }, + }); + }); - 'default "cacheClusterSize" is 0.5 (if cache cluster is enabled)'(test: Test) { + test('default "cacheClusterSize" is 0.5 (if cache cluster is enabled)', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -154,15 +147,13 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { CacheClusterEnabled: true, CacheClusterSize: '0.5', - })); - - test.done(); - }, + }); + }); - 'setting "cacheClusterSize" implies "cacheClusterEnabled"'(test: Test) { + test('setting "cacheClusterSize" implies "cacheClusterEnabled"', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -176,15 +167,13 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { CacheClusterEnabled: true, CacheClusterSize: '0.5', - })); - - test.done(); - }, + }); + }); - 'fails when "cacheClusterEnabled" is "false" and "cacheClusterSize" is set'(test: Test) { + test('fails when "cacheClusterEnabled" is "false" and "cacheClusterSize" is set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -192,16 +181,14 @@ export = { api.root.addMethod('GET'); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, cacheClusterSize: '0.5', cacheClusterEnabled: false, - }), /Cannot set "cacheClusterSize" to 0.5 and "cacheClusterEnabled" to "false"/); - - test.done(); - }, + })).toThrow(/Cannot set "cacheClusterSize" to 0.5 and "cacheClusterEnabled" to "false"/); + }); - 'if "cachingEnabled" in method settings, implicitly enable cache cluster'(test: Test) { + test('if "cachingEnabled" in method settings, implicitly enable cache cluster', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -215,7 +202,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { CacheClusterEnabled: true, CacheClusterSize: '0.5', MethodSettings: [ @@ -226,12 +213,10 @@ export = { }, ], StageName: 'prod', - })); - - test.done(); - }, + }); + }); - 'if caching cluster is explicitly disabled, do not auto-enable cache cluster when "cachingEnabled" is set in method options'(test: Test) { + test('if caching cluster is explicitly disabled, do not auto-enable cache cluster when "cachingEnabled" is set in method options', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -239,16 +224,14 @@ export = { api.root.addMethod('GET'); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { cacheClusterEnabled: false, deployment, cachingEnabled: true, - }), /Cannot enable caching for method \/\*\/\* since cache cluster is disabled on stage/); - - test.done(); - }, + })).toThrow(/Cannot enable caching for method \/\*\/\* since cache cluster is disabled on stage/); + }); - 'if only the custom log destination log group is set'(test: Test) { + test('if only the custom log destination log group is set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -263,7 +246,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { AccessLogSetting: { DestinationArn: { 'Fn::GetAtt': [ @@ -274,12 +257,10 @@ export = { Format: '$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId', }, StageName: 'prod', - })); - - test.done(); - }, + }); + }); - 'if the custom log destination log group and format is set'(test: Test) { + test('if the custom log destination log group and format is set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -296,7 +277,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { AccessLogSetting: { DestinationArn: { 'Fn::GetAtt': [ @@ -307,12 +288,10 @@ export = { Format: '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}', }, StageName: 'prod', - })); - - test.done(); - }, + }); + }); - 'fails when access log format does not contain `AccessLogFormat.contextRequestId()`'(test: Test) { + test('fails when access log format does not contain `AccessLogFormat.contextRequestId()`', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -324,16 +303,14 @@ export = { const testFormat = apigateway.AccessLogFormat.custom(''); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, accessLogDestination: new apigateway.LogGroupLogDestination(testLogGroup), accessLogFormat: testFormat, - }), /Access log must include at least `AccessLogFormat.contextRequestId\(\)`/); - - test.done(); - }, + })).toThrow(/Access log must include at least `AccessLogFormat.contextRequestId\(\)`/); + }); - 'does not fail when access log format is a token'(test: Test) { + test('does not fail when access log format is a token', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -345,16 +322,14 @@ export = { const testFormat = apigateway.AccessLogFormat.custom(cdk.Lazy.stringValue({ produce: () => 'test' })); // THEN - test.doesNotThrow(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, accessLogDestination: new apigateway.LogGroupLogDestination(testLogGroup), accessLogFormat: testFormat, - })); + })).not.toThrow(); + }); - test.done(); - }, - - 'fails when access log destination is empty'(test: Test) { + test('fails when access log destination is empty', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -365,11 +340,9 @@ export = { const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields(); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, accessLogFormat: testFormat, - }), /Access log format is specified without a destination/); - - test.done(); - }, -}; + })).toThrow(/Access log format is specified without a destination/); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.util.ts b/packages/@aws-cdk/aws-apigateway/test/test.util.ts deleted file mode 100644 index 98e3a8ea4be53..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/test.util.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Test, testCase } from 'nodeunit'; -import { JsonSchema, JsonSchemaType } from '../lib'; -import { JsonSchemaMapper, parseAwsApiCall, parseMethodOptionsPath } from '../lib/util'; - -export = testCase({ - 'parseMethodResourcePath': { - 'fails if path does not start with a /'(test: Test) { - test.throws(() => parseMethodOptionsPath('foo'), /Method options path must start with \'\/\'/); - test.done(); - }, - - 'fails if there are less than two components'(test: Test) { - test.throws(() => parseMethodOptionsPath('/'), /Method options path must include at least two components/); - test.throws(() => parseMethodOptionsPath('/foo'), /Method options path must include at least two components/); - test.throws(() => parseMethodOptionsPath('/foo/'), /Invalid HTTP method ""/); - test.done(); - }, - - 'fails if a non-supported http method is used'(test: Test) { - test.throws(() => parseMethodOptionsPath('/foo/bar'), /Invalid HTTP method "BAR"/); - test.done(); - }, - - 'extracts resource path and method correctly'(test: Test) { - test.deepEqual(parseMethodOptionsPath('/foo/GET'), { resourcePath: '/~1foo', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/foo/bar/GET'), { resourcePath: '/~1foo~1bar', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/foo/*/GET'), { resourcePath: '/~1foo~1*', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/*/GET'), { resourcePath: '/*', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/*/*'), { resourcePath: '/*', httpMethod: '*' }); - test.deepEqual(parseMethodOptionsPath('//POST'), { resourcePath: '/', httpMethod: 'POST' }); - test.done(); - }, - }, - - 'parseAwsApiCall': { - 'fails if "actionParams" is set but "action" is undefined'(test: Test) { - test.throws(() => parseAwsApiCall(undefined, undefined, { foo: '123' }), /"actionParams" requires that "action" will be set/); - test.done(); - }, - - 'fails since "action" and "path" are mutually exclusive'(test: Test) { - test.throws(() => parseAwsApiCall('foo', 'bar'), /"path" and "action" are mutually exclusive \(path="foo", action="bar"\)/); - test.done(); - }, - - 'fails if "path" and "action" are both undefined'(test: Test) { - test.throws(() => parseAwsApiCall(), /Either "path" or "action" are required/); - test.done(); - }, - - '"path" mode'(test: Test) { - test.deepEqual(parseAwsApiCall('my/path'), { apiType: 'path', apiValue: 'my/path' }); - test.done(); - }, - - '"action" mode with no parameters'(test: Test) { - test.deepEqual(parseAwsApiCall(undefined, 'MyAction'), { apiType: 'action', apiValue: 'MyAction' }); - test.done(); - }, - - '"action" mode with parameters (url-encoded)'(test: Test) { - test.deepEqual(parseAwsApiCall(undefined, 'GetObject', { Bucket: 'MyBucket', Key: 'MyKey' }), { - apiType: 'action', - apiValue: 'GetObject&Bucket=MyBucket&Key=MyKey', - }); - test.done(); - }, - }, - - 'JsonSchemaMapper.toCfnJsonSchema': { - 'maps "ref" found under properties'(test: Test) { - const schema: JsonSchema = { - type: JsonSchemaType.OBJECT, - properties: { - collection: { - type: JsonSchemaType.ARRAY, - items: { - ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['collection'], - }; - - const actual = JsonSchemaMapper.toCfnJsonSchema(schema); - test.deepEqual(actual, { - $schema: 'http://json-schema.org/draft-04/schema#', - type: 'object', - properties: { - collection: { - type: 'array', - items: { - $ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['collection'], - }); - test.done(); - }, - - 'does not map a "ref" property name'(test: Test) { - const schema: JsonSchema = { - type: JsonSchemaType.OBJECT, - properties: { - ref: { - type: JsonSchemaType.ARRAY, - items: { - ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['ref'], - }; - - const actual = JsonSchemaMapper.toCfnJsonSchema(schema); - test.deepEqual(actual, { - $schema: 'http://json-schema.org/draft-04/schema#', - type: 'object', - properties: { - ref: { - type: 'array', - items: { - $ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['ref'], - }); - test.done(); - }, - }, -}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.usage-plan.ts b/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts similarity index 76% rename from packages/@aws-cdk/aws-apigateway/test/test.usage-plan.ts rename to packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts index 78c76ba5f896d..f183d08796388 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.usage-plan.ts +++ b/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts @@ -1,11 +1,11 @@ -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart } from '@aws-cdk/assert'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; const RESOURCE_TYPE = 'AWS::ApiGateway::UsagePlan'; -export = { - 'default setup'(test: Test) { +describe('usage plan', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: false }); @@ -20,15 +20,13 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { UsagePlanName: usagePlanName, Description: usagePlanDescription, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); + }); - test.done(); - }, - - 'usage plan with throttling limits'(test: Test) { + test('usage plan with throttling limits', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -57,7 +55,7 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { UsagePlanName: usagePlanName, Description: usagePlanDescription, ApiStages: [ @@ -76,13 +74,10 @@ export = { }, }, ], - }, ResourcePart.Properties)); - - test.done(); - - }, + }, ResourcePart.Properties); + }); - 'usage plan with blocked methods'(test: Test) { + test('usage plan with blocked methods', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -111,7 +106,7 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { UsagePlanName: usagePlanName, Description: usagePlanDescription, ApiStages: [ @@ -130,13 +125,10 @@ export = { }, }, ], - }, ResourcePart.Properties)); - - test.done(); - - }, + }, ResourcePart.Properties); + }); - 'usage plan with quota limits'(test: Test) { + test('usage plan with quota limits', () => { // GIVEN const stack = new cdk.Stack(); @@ -149,18 +141,15 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { Quota: { Limit: 10000, Period: 'MONTH', }, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); + }); - test.done(); - - }, - - 'UsagePlanKey'(test: Test) { + test('UsagePlanKey', () => { // GIVEN const stack = new cdk.Stack(); const usagePlan: apigateway.UsagePlan = new apigateway.UsagePlan(stack, 'my-usage-plan', { @@ -172,7 +161,7 @@ export = { usagePlan.addApiKey(apiKey); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'myapikey1B052F70', }, @@ -180,12 +169,10 @@ export = { UsagePlanId: { Ref: 'myusageplan23AA1E32', }, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); + }); - test.done(); - }, - - 'UsagePlan can have multiple keys'(test: Test) { + test('UsagePlan can have multiple keys', () => { // GIVEN const stack = new cdk.Stack(); const usagePlan = new apigateway.UsagePlan(stack, 'my-usage-plan'); @@ -201,23 +188,21 @@ export = { usagePlan.addApiKey(apiKey2); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { Name: 'my-api-key-1', - }, ResourcePart.Properties)); - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + }, ResourcePart.Properties); + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { Name: 'my-api-key-2', - }, ResourcePart.Properties)); - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + }, ResourcePart.Properties); + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'myapikey11F723FC7', }, - }, ResourcePart.Properties)); - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + }, ResourcePart.Properties); + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'myapikey2ABDEF012', }, - }, ResourcePart.Properties)); - - test.done(); - }, -}; + }, ResourcePart.Properties); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/util.test.ts b/packages/@aws-cdk/aws-apigateway/test/util.test.ts new file mode 100644 index 0000000000000..f879c63698733 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/test/util.test.ts @@ -0,0 +1,125 @@ +import '@aws-cdk/assert/jest'; +import { JsonSchema, JsonSchemaType } from '../lib'; +import { JsonSchemaMapper, parseAwsApiCall, parseMethodOptionsPath } from '../lib/util'; + +describe('util', () => { + describe('parseMethodResourcePath', () => { + test('fails if path does not start with a /', () => { + expect(() => parseMethodOptionsPath('foo')).toThrow(/Method options path must start with \'\/\'/); + }); + + test('fails if there are less than two components', () => { + expect(() => parseMethodOptionsPath('/')).toThrow(/Method options path must include at least two components/); + expect(() => parseMethodOptionsPath('/foo')).toThrow(/Method options path must include at least two components/); + expect(() => parseMethodOptionsPath('/foo/')).toThrow(/Invalid HTTP method ""/); + }); + + test('fails if a non-supported http method is used', () => { + expect(() => parseMethodOptionsPath('/foo/bar')).toThrow(/Invalid HTTP method "BAR"/); + }); + + test('extracts resource path and method correctly', () => { + expect(parseMethodOptionsPath('/foo/GET')).toEqual({ resourcePath: '/~1foo', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/foo/bar/GET')).toEqual({ resourcePath: '/~1foo~1bar', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/foo/*/GET')).toEqual({ resourcePath: '/~1foo~1*', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/*/GET')).toEqual({ resourcePath: '/*', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/*/*')).toEqual({ resourcePath: '/*', httpMethod: '*' }); + expect(parseMethodOptionsPath('//POST')).toEqual({ resourcePath: '/', httpMethod: 'POST' }); + }); + }); + + describe('parseAwsApiCall', () => { + test('fails if "actionParams" is set but "action" is undefined', () => { + expect(() => parseAwsApiCall(undefined, undefined, { foo: '123' })).toThrow(/"actionParams" requires that "action" will be set/); + }); + + test('fails since "action" and "path" are mutually exclusive', () => { + expect(() => parseAwsApiCall('foo', 'bar')).toThrow(/"path" and "action" are mutually exclusive \(path="foo", action="bar"\)/); + }); + + test('fails if "path" and "action" are both undefined', () => { + expect(() => parseAwsApiCall()).toThrow(/Either "path" or "action" are required/); + }); + + test('"path" mode', () => { + expect(parseAwsApiCall('my/path')).toEqual({ apiType: 'path', apiValue: 'my/path' }); + }); + + test('"action" mode with no parameters', () => { + expect(parseAwsApiCall(undefined, 'MyAction')).toEqual({ apiType: 'action', apiValue: 'MyAction' }); + }); + + test('"action" mode with parameters (url-encoded)', () => { + expect(parseAwsApiCall(undefined, 'GetObject', { Bucket: 'MyBucket', Key: 'MyKey' })).toEqual({ + apiType: 'action', + apiValue: 'GetObject&Bucket=MyBucket&Key=MyKey', + }); + }); + }); + + describe('JsonSchemaMapper.toCfnJsonSchema', () => { + test('maps "ref" found under properties', () => { + const schema: JsonSchema = { + type: JsonSchemaType.OBJECT, + properties: { + collection: { + type: JsonSchemaType.ARRAY, + items: { + ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['collection'], + }; + + const actual = JsonSchemaMapper.toCfnJsonSchema(schema); + expect(actual).toEqual({ + $schema: 'http://json-schema.org/draft-04/schema#', + type: 'object', + properties: { + collection: { + type: 'array', + items: { + $ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['collection'], + }); + }); + + test('does not map a "ref" property name', () => { + const schema: JsonSchema = { + type: JsonSchemaType.OBJECT, + properties: { + ref: { + type: JsonSchemaType.ARRAY, + items: { + ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['ref'], + }; + + const actual = JsonSchemaMapper.toCfnJsonSchema(schema); + expect(actual).toEqual({ + $schema: 'http://json-schema.org/draft-04/schema#', + type: 'object', + properties: { + ref: { + type: 'array', + items: { + $ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['ref'], + }); + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.vpc-link.ts b/packages/@aws-cdk/aws-apigateway/test/vpc-link.test.ts similarity index 69% rename from packages/@aws-cdk/aws-apigateway/test/test.vpc-link.ts rename to packages/@aws-cdk/aws-apigateway/test/vpc-link.test.ts index 331889ffbdf1e..b7a023966d1fb 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.vpc-link.ts +++ b/packages/@aws-cdk/aws-apigateway/test/vpc-link.test.ts @@ -1,12 +1,11 @@ -import { expect, haveResource, haveResourceLike } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'default setup'(test: Test) { +describe('vpc link', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -21,15 +20,13 @@ export = { }); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::VpcLink', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::VpcLink', { Name: 'MyLink', TargetArns: [{ Ref: 'NLB55158F82' }], - })); - - test.done(); - }, + }); + }); - 'targets can be added using addTargets'(test: Test) { + test('targets can be added using addTargets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -46,7 +43,7 @@ export = { link.addTargets(nlb3); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::VpcLink', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::VpcLink', { Name: 'VpcLink', TargetArns: [ { Ref: 'NLB03D178991' }, @@ -54,12 +51,10 @@ export = { { Ref: 'NLB2BEBACE62' }, { Ref: 'NLB372DB3895' }, ], - })); - - test.done(); - }, + }); + }); - 'import'(test: Test) { + test('import', () => { // GIVEN const stack = new cdk.Stack(); @@ -67,12 +62,10 @@ export = { apigateway.VpcLink.fromVpcLinkId(stack, 'ImportedVpcLink', 'vpclink-id'); // THEN - expect(stack).notTo(haveResource('AWS::ApiGateway::VpcLink')); - - test.done(); - }, + expect(stack).not.toHaveResource('AWS::ApiGateway::VpcLink'); + }); - 'validation error if vpc link is created and no targets are added'(test: Test) { + test('validation error if vpc link is created and no targets are added', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'stack'); @@ -81,7 +74,6 @@ export = { new apigateway.VpcLink(stack, 'vpclink'); // TEST - test.throws(() => app.synth(), /No targets added to vpc link/); - test.done(); - }, -}; + expect(() => app.synth()).toThrow(/No targets added to vpc link/); + }); +}); diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 19c9121c033f0..719098dbf9960 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -75,7 +75,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index 7d2b43f9fe709..fb7c0381a46f3 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -67,7 +67,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-codebuild/README.md b/packages/@aws-cdk/aws-codebuild/README.md index 208912c6657e9..c51b263279e34 100644 --- a/packages/@aws-cdk/aws-codebuild/README.md +++ b/packages/@aws-cdk/aws-codebuild/README.md @@ -91,7 +91,10 @@ const gitHubSource = codebuild.Source.gitHub({ repo: 'aws-cdk', webhook: true, // optional, default: true if `webhookFilters` were provided, false otherwise webhookFilters: [ - codebuild.FilterGroup.inEventOf(codebuild.EventAction.PUSH).andBranchIs('master'), + codebuild.FilterGroup + .inEventOf(codebuild.EventAction.PUSH) + .andBranchIs('master') + .andCommitMessageIs('the commit message'), ], // optional, by default all pushes and Pull Requests will trigger a build }); ``` diff --git a/packages/@aws-cdk/aws-codebuild/lib/source.ts b/packages/@aws-cdk/aws-codebuild/lib/source.ts index f83ab66cfb315..f0a61373c0fbd 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/source.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/source.ts @@ -193,7 +193,13 @@ export enum EventAction { PULL_REQUEST_REOPENED = 'PULL_REQUEST_REOPENED', } -const FILE_PATH_WEBHOOK_COND = 'FILE_PATH'; +enum WebhookFilterTypes { + FILE_PATH = 'FILE_PATH', + COMMIT_MESSAGE = 'COMMIT_MESSAGE', + HEAD_REF = 'HEAD_REF', + ACTOR_ACCOUNT_ID = 'ACTOR_ACCOUNT_ID', + BASE_REF = 'BASE_REF', +} /** * An object that represents a group of filter conditions for a webhook. @@ -245,6 +251,26 @@ export class FilterGroup { return this.addHeadBranchFilter(branchName, false); } + /** + * Create a new FilterGroup with an added condition: + * the event must affect a head commit with the given message. + * + * @param commitMessage the commit message (can be a regular expression) + */ + public andCommitMessageIs(commitMessage: string): FilterGroup { + return this.addCommitMessageFilter(commitMessage, true); + } + + /** + * Create a new FilterGroup with an added condition: + * the event must not affect a head commit with the given message. + * + * @param commitMessage the commit message (can be a regular expression) + */ + public andCommitMessageIsNot(commitMessage: string): FilterGroup { + return this.addCommitMessageFilter(commitMessage, false); + } + /** * Create a new FilterGroup with an added condition: * the event must affect the given tag. @@ -394,6 +420,10 @@ export class FilterGroup { return [eventFilter].concat(this.filters); } + private addCommitMessageFilter(commitMessage: string, include: boolean): FilterGroup { + return this.addFilter(WebhookFilterTypes.COMMIT_MESSAGE, commitMessage, include); + } + private addHeadBranchFilter(branchName: string, include: boolean): FilterGroup { return this.addHeadRefFilter(`refs/heads/${branchName}`, include); } @@ -403,11 +433,11 @@ export class FilterGroup { } private addHeadRefFilter(refName: string, include: boolean) { - return this.addFilter('HEAD_REF', refName, include); + return this.addFilter(WebhookFilterTypes.HEAD_REF, refName, include); } private addActorAccountId(accountId: string, include: boolean) { - return this.addFilter('ACTOR_ACCOUNT_ID', accountId, include); + return this.addFilter(WebhookFilterTypes.ACTOR_ACCOUNT_ID, accountId, include); } private addBaseBranchFilter(branchName: string, include: boolean): FilterGroup { @@ -418,14 +448,14 @@ export class FilterGroup { if (this.actions.has(EventAction.PUSH)) { throw new Error('A base reference condition cannot be added if a Group contains a PUSH event action'); } - return this.addFilter('BASE_REF', refName, include); + return this.addFilter(WebhookFilterTypes.BASE_REF, refName, include); } private addFilePathFilter(pattern: string, include: boolean): FilterGroup { - return this.addFilter(FILE_PATH_WEBHOOK_COND, pattern, include); + return this.addFilter(WebhookFilterTypes.FILE_PATH, pattern, include); } - private addFilter(type: string, pattern: string, include: boolean) { + private addFilter(type: WebhookFilterTypes, pattern: string, include: boolean) { return new FilterGroup(this.actions, this.filters.concat([{ type, pattern, @@ -657,6 +687,14 @@ class GitHubEnterpriseSource extends ThirdPartyGitSource { } public bind(_scope: CoreConstruct, _project: IProject): SourceConfig { + if (this.hasCommitMessageFilterAndPrEvent()) { + throw new Error('COMMIT_MESSAGE filters cannot be used with GitHub Enterprise Server pull request events'); + } + + if (this.hasFilePathFilterAndPrEvent()) { + throw new Error('FILE_PATH filters cannot be used with GitHub Enterprise Server pull request events'); + } + const superConfig = super.bind(_scope, _project); return { sourceProperty: { @@ -668,6 +706,24 @@ class GitHubEnterpriseSource extends ThirdPartyGitSource { buildTriggers: superConfig.buildTriggers, }; } + + private hasCommitMessageFilterAndPrEvent() { + return this.webhookFilters.some(fg => ( + fg._filters.some(fp => fp.type === WebhookFilterTypes.COMMIT_MESSAGE) && + this.hasPrEvent(fg._actions))); + } + private hasFilePathFilterAndPrEvent() { + return this.webhookFilters.some(fg => ( + fg._filters.some(fp => fp.type === WebhookFilterTypes.FILE_PATH) && + this.hasPrEvent(fg._actions))); + } + private hasPrEvent(actions: EventAction[]) { + return actions.includes( + EventAction.PULL_REQUEST_CREATED || + EventAction.PULL_REQUEST_MERGED || + EventAction.PULL_REQUEST_REOPENED || + EventAction.PULL_REQUEST_UPDATED); + } } /** @@ -731,7 +787,7 @@ class BitBucketSource extends ThirdPartyGitSource { private anyWebhookFilterContainsFilePathConditions() { return this.webhookFilters.findIndex(fg => { - return fg._filters.findIndex(f => f.type === FILE_PATH_WEBHOOK_COND) !== -1; + return fg._filters.findIndex(f => f.type === WebhookFilterTypes.FILE_PATH) !== -1; }) !== -1; } } diff --git a/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts b/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts index 893cb2836245c..ea1c8eb87b021 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts @@ -1708,5 +1708,92 @@ export = { test.done(); }, + + 'GitHub Enterprise Server sources do not support FILE_PATH filters on PR events'(test: Test) { + const stack = new cdk.Stack(); + const pullFilterGroup = codebuild.FilterGroup.inEventOf( + codebuild.EventAction.PULL_REQUEST_CREATED, + codebuild.EventAction.PULL_REQUEST_MERGED, + codebuild.EventAction.PULL_REQUEST_REOPENED, + codebuild.EventAction.PULL_REQUEST_UPDATED, + ); + + test.throws(() => { + new codebuild.Project(stack, 'MyFilePathProject', { + source: codebuild.Source.gitHubEnterprise({ + httpsCloneUrl: 'https://github.testcompany.com/testowner/testrepo', + webhookFilters: [ + pullFilterGroup.andFilePathIs('ReadMe.md'), + ], + }), + }); + }, /FILE_PATH filters cannot be used with GitHub Enterprise Server pull request events/); + test.done(); + }, + + 'COMMIT_MESSAGE Filter': { + 'GitHub Enterprise Server sources do not support COMMIT_MESSAGE filters on PR events'(test: Test) { + const stack = new cdk.Stack(); + const pullFilterGroup = codebuild.FilterGroup.inEventOf( + codebuild.EventAction.PULL_REQUEST_CREATED, + codebuild.EventAction.PULL_REQUEST_MERGED, + codebuild.EventAction.PULL_REQUEST_REOPENED, + codebuild.EventAction.PULL_REQUEST_UPDATED, + ); + + test.throws(() => { + new codebuild.Project(stack, 'MyProject', { + source: codebuild.Source.gitHubEnterprise({ + httpsCloneUrl: 'https://github.testcompany.com/testowner/testrepo', + webhookFilters: [ + pullFilterGroup.andCommitMessageIs('the commit message'), + ], + }), + }); + }, /COMMIT_MESSAGE filters cannot be used with GitHub Enterprise Server pull request events/); + test.done(); + }, + 'GitHub Enterprise Server sources support COMMIT_MESSAGE filters on PUSH events'(test: Test) { + const stack = new cdk.Stack(); + const pushFilterGroup = codebuild.FilterGroup.inEventOf(codebuild.EventAction.PUSH); + + test.doesNotThrow(() => { + new codebuild.Project(stack, 'MyProject', { + source: codebuild.Source.gitHubEnterprise({ + httpsCloneUrl: 'https://github.testcompany.com/testowner/testrepo', + webhookFilters: [ + pushFilterGroup.andCommitMessageIs('the commit message'), + ], + }), + }); + }); + test.done(); + }, + 'BitBucket and GitHub sources support a COMMIT_MESSAGE filter'(test: Test) { + const stack = new cdk.Stack(); + const filterGroup = codebuild + .FilterGroup + .inEventOf(codebuild.EventAction.PUSH, codebuild.EventAction.PULL_REQUEST_CREATED) + .andCommitMessageIs('the commit message'); + + test.doesNotThrow(() => { + new codebuild.Project(stack, 'BitBucket Project', { + source: codebuild.Source.bitBucket({ + owner: 'owner', + repo: 'repo', + webhookFilters: [filterGroup], + }), + }); + new codebuild.Project(stack, 'GitHub Project', { + source: codebuild.Source.gitHub({ + owner: 'owner', + repo: 'repo', + webhookFilters: [filterGroup], + }), + }); + }); + test.done(); + }, + }, }, }; diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 749ca525f048c..70fe341c59c8b 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -53,7 +53,7 @@ Using the CDK, a new user pool can be created as part of the stack using the con the `userPoolName` to give your own identifier to the user pool. If not, CloudFormation will generate a name. ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { userPoolName: 'myawesomeapp-userpool', }); ``` @@ -68,13 +68,13 @@ When a user signs up, email and SMS messages are used to verify their account an snippet configures a user pool with properties relevant to these verification messages - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... selfSignUpEnabled: true, userVerification: { emailSubject: 'Verify your email for our awesome app!', emailBody: 'Hello {username}, Thanks for signing up to our awesome app! Your verification code is {####}', - emailStyle: VerificationEmailStyle.CODE, + emailStyle: cognito.VerificationEmailStyle.CODE, smsMessage: 'Hello {username}, Thanks for signing up to our awesome app! Your verification code is {####}', } }); @@ -88,7 +88,7 @@ invitation to join the user pool. The following code snippet configures a user p invitation messages - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... userInvitation: { emailSubject: 'Invite to join our awesome app!', @@ -116,7 +116,7 @@ available: The following code sets up a user pool so that the user can sign in with either their username or their email address - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... // ... signInAliases: { @@ -144,7 +144,7 @@ overridden by specifying the `autoVerify` property. The following code snippet sets up only email as a sign in alias, but both email and phone number to be auto-verified. ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... // ... signInAliases: { username: true, email: true }, @@ -169,7 +169,7 @@ The following code configures a user pool with two standard attributes (name and four custom attributes. ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... standardAttributes: { fullname: { @@ -182,10 +182,10 @@ new UserPool(this, 'myuserpool', { }, }, customAttributes: { - 'myappid': new StringAttribute({ minLen: 5, maxLen: 15, mutable: false }), - 'callingcode': new NumberAttribute({ min: 1, max: 3, mutable: true }), - 'isEmployee': new BooleanAttribute({ mutable: true }), - 'joinedOn': new DateTimeAttribute(), + 'myappid': new cognito.StringAttribute({ minLen: 5, maxLen: 15, mutable: false }), + 'callingcode': new cognito.NumberAttribute({ min: 1, max: 3, mutable: true }), + 'isEmployee': new cognito.BooleanAttribute({ mutable: true }), + 'joinedOn': new cognito.DateTimeAttribute(), }, }); ``` @@ -211,11 +211,11 @@ Additionally, the property `enableSmsRole` can be used to override the CDK's def suppress automatic role creation. ```ts -import { Role } from '@aws-cdk/aws-iam'; - -const poolSmsRole = new Role(this, 'userpoolsmsrole', { /* ... */ }); +const poolSmsRole = new iam.Role(this, 'userpoolsmsrole', { + assumedBy: new iam.ServicePrincipal('foo'), +}); -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... smsRole: poolSmsRole, smsRoleExternalId: 'c87467be-4f34-11ea-b77f-2e728ce88125' @@ -241,9 +241,9 @@ configure an MFA token and use it for sign in. It also allows for the users to u (TOTP)](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa-totp.html). ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... - mfa: Mfa.REQUIRED, + mfa: cognito.Mfa.REQUIRED, mfaSecondFactor: { sms: true, otp: true, @@ -261,7 +261,7 @@ The validity of this password dictates how long to give the user to use this pas The following code snippet configures these properties - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... passwordPolicy: { minLength: 12, @@ -282,9 +282,9 @@ User pools can be configured on which method a user should use when recovering t can either be email and/or SMS. Read more at [Recovering User Accounts](https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-recover-a-user-account.html) ```ts -new UserPool(this, 'UserPool', { - ..., - accountRecovery: AccountRecovery.EMAIL_ONLY, +new cognito.UserPool(this, 'UserPool', { + // ... + accountRecovery: cognito.AccountRecovery.EMAIL_ONLY, }) ``` @@ -295,7 +295,7 @@ emails, password resets, etc. The address from which these emails are sent can b Read more about [email settings here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-email.html). ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... emailSettings: { from: 'noreply@myawesomeapp.com', @@ -320,22 +320,24 @@ Lambda triggers can either be specified as part of the `UserPool` initialization on the construct, as so - ```ts -import * as lambda from '@aws-cdk/aws-lambda'; - const authChallengeFn = new lambda.Function(this, 'authChallengeFn', { - // ... + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromInline('auth challenge'), }); -const userpool = new UserPool(this, 'myuserpool', { +const userpool = new cognito.UserPool(this, 'myuserpool', { // ... - triggers: { + lambdaTriggers: { createAuthChallenge: authChallengeFn, // ... } }); -userpool.addTrigger(UserPoolOperation.USER_MIGRATION, new lambda.Function(this, 'userMigrationFn', { - // ... +userpool.addTrigger(cognito.UserPoolOperation.USER_MIGRATION, new lambda.Function(this, 'userMigrationFn', { + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromInline('user migration'), })); ``` @@ -355,11 +357,9 @@ User pools can be imported either using their id via the `UserPool.fromUserPoolI `UserPool.fromUserPoolArn()` API. ```ts -const stack = new Stack(app, 'my-stack'); - -const awesomePool = UserPool.fromUserPoolId(stack, 'awesome-user-pool', 'us-east-1_oiuR12Abd'); +const awesomePool = cognito.UserPool.fromUserPoolId(this, 'awesome-user-pool', 'us-east-1_oiuR12Abd'); -const otherAwesomePool = UserPool.fromUserPoolArn(stack, 'other-awesome-user-pool', +const otherAwesomePool = cognito.UserPool.fromUserPoolArn(this, 'other-awesome-user-pool', 'arn:aws:cognito-idp:eu-west-1:123456789012:userpool/us-east-1_mtRyYQ14D'); ``` @@ -381,9 +381,9 @@ provider needs to be configured with a set of credentials that the Cognito backe third-party identity provider. ```ts -const userpool = new UserPool(stack, 'Pool'); +const userpool = new cognito.UserPool(this, 'Pool'); -const provider = new UserPoolIdentityProviderAmazon(stack, 'Amazon', { +const provider = new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', { clientId: 'amzn-client-id', clientSecret: 'amzn-client-secret', userPool: userpool, @@ -398,14 +398,18 @@ The following code shows how different attributes provided by 'Login With Amazon user pool attributes. ```ts -new UserPoolIdentityProviderAmazon(stack, 'Amazon', { - // ... +const userpool = new cognito.UserPool(this, 'Pool'); + +new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', { + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + userPool: userpool, attributeMapping: { - email: ProviderAttribute.AMAZON_EMAIL, - website: ProviderAttribute.other('url'), // use other() when an attribute is not pre-defined in the CDK + email: cognito.ProviderAttribute.AMAZON_EMAIL, + website: cognito.ProviderAttribute.other('url'), // use other() when an attribute is not pre-defined in the CDK custom: { // custom user pool attributes go here - uniqueId: ProviderAttribute.AMAZON_USER_ID, + uniqueId: cognito.ProviderAttribute.AMAZON_USER_ID, } } }); @@ -421,7 +425,7 @@ Client](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sett The following code creates an app client and retrieves the client id - ```ts -const pool = new UserPool(this, 'pool'); +const pool = new cognito.UserPool(this, 'pool'); const client = pool.addClient('customer-app-client'); const clientId = client.userPoolClientId; ``` @@ -430,8 +434,8 @@ Existing app clients can be imported into the CDK app using the `UserPoolClient. and imported user pools, clients can also be created via the `UserPoolClient` constructor, as so - ```ts -const importedPool = UserPool.fromUserPoolId(this, 'imported-pool', 'us-east-1_oiuR12Abd'); -new UserPoolClient(this, 'customer-app-client', { +const importedPool = cognito.UserPool.fromUserPoolId(this, 'imported-pool', 'us-east-1_oiuR12Abd'); +new cognito.UserPoolClient(this, 'customer-app-client', { userPool: importedPool }); ``` @@ -444,7 +448,7 @@ Flow](https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-u The following code configures a client to use both SRP and username-and-password authentication - ```ts -const pool = new UserPool(this, 'pool'); +const pool = new cognito.UserPool(this, 'pool'); pool.addClient('app-client', { authFlows: { userPassword: true, @@ -468,13 +472,13 @@ page as a callback (or redirect) URL. It also configures the access token scope be found in the [OAuth 2.0 RFC](https://tools.ietf.org/html/rfc6749). ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addClient('app-client', { oAuth: { flows: { authorizationCodeGrant: true, }, - scopes: [ OAuthScope.OPENID ], + scopes: [ cognito.OAuthScope.OPENID ], callbackUrls: [ 'https://my-app-domain.com/welcome' ], logoutUrls: [ 'https://my-app-domain.com/signin' ], } @@ -489,7 +493,7 @@ is not set, which means different things for existing and new stacks. See the for the full details on the behavior of this flag. ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addClient('app-client', { preventUserExistenceErrors: true, }); @@ -501,12 +505,12 @@ that allows users to register and sign in directly with the Cognito user pool, i Alternatively, the list of supported identity providers for a client can be explicitly specified - ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addClient('app-client', { // ... supportedIdentityProviders: [ - UserPoolClientIdentityProvider.AMAZON, - UserPoolClientIdentityProvider.COGNITO, + cognito.UserPoolClientIdentityProvider.AMAZON, + cognito.UserPoolClientIdentityProvider.COGNITO, ] }); ``` @@ -521,7 +525,7 @@ owned, and whose certificate is registered in AWS Certificate Manager. The following code sets up a user pool domain in Amazon Cognito hosted domain with the prefix 'my-awesome-app', and another domain with the custom domain 'user.myapp.com' - ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addDomain('CognitoDomain', { cognitoDomain: { @@ -529,7 +533,9 @@ pool.addDomain('CognitoDomain', { }, }); -const domainCert = new acm.Certificate.fromCertificateArn(this, 'domainCert', certificateArn); +const certificateArn = 'arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d'; + +const domainCert = certificatemanager.Certificate.fromCertificateArn(this, 'domainCert', certificateArn); pool.addDomain('CustomDomain', { customDomain: { domainName: 'user.myapp.com', @@ -547,7 +553,7 @@ hosted UI configured with Cognito. Learn more at [Hosted UI with the Amazon Cogn Console](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html#cognito-user-pools-create-an-app-integration). ```ts -const userpool = new UserPool(this, 'UserPool', { +const userpool = new cognito.UserPool(this, 'UserPool', { // ... }); const client = userpool.addClient('Client', { @@ -566,14 +572,12 @@ const domain = userpool.addDomain('Domain', { // ... }); const signInUrl = domain.signInUrl(client, { - redirectUrl: 'https://myapp.com/home', // must be a URL configured under 'callbackUrls' with the client + redirectUri: 'https://myapp.com/home', // must be a URL configured under 'callbackUrls' with the client }) ``` Existing domains can be imported into CDK apps using `UserPoolDomain.fromDomainName()` API ```ts -const stack = new Stack(app, 'my-stack'); - -const myUserPoolDomain = UserPoolDomain.fromDomainName(stack, 'my-user-pool-domain', 'domain-name'); +const myUserPoolDomain = cognito.UserPoolDomain.fromDomainName(this, 'my-user-pool-domain', 'domain-name'); ``` \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e0b5bfc8747a3 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture @@ -0,0 +1,15 @@ +// Fixture with packages imported, but nothing else +import { Duration, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as certificatemanager from '@aws-cdk/aws-certificatemanager'; +import * as cognito from '@aws-cdk/aws-cognito'; +import * as iam from '@aws-cdk/aws-iam'; +import * as lambda from '@aws-cdk/aws-lambda'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 310861a75ab17..c75f44ccceb06 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -81,7 +81,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.0", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-jest": "^26.4.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index bcef51bd48e37..6ba65551376f0 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -80,7 +80,7 @@ "cfn2ts": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "cdk8s-plus": "^0.33.0", "cdk8s": "^0.33.0" }, diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index efa705aaf669c..a345bf8ffa436 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -78,7 +78,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.0", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.2.0" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 2dff274fd0cbd..428055feb5233 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.426", + "parcel": "2.0.0-nightly.429", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index eb462e3370e85..6fc9d0233f556 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -81,7 +81,7 @@ "nock": "^13.0.4", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.2.0" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 18d61eb54cc00..5ca811eabe8c7 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -23,7 +23,7 @@ your instances will be launched privately or publicly: ```ts const cluster = new rds.DatabaseCluster(this, 'Database', { engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_08_1 }), - masterUser: rds.Credentials.fromUsername('clusteradmin'), // Optional - will default to admin + credentials: rds.Credentials.fromUsername('clusteradmin'), // Optional - will default to admin instanceProps: { // optional , defaults to t3.medium instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -70,7 +70,7 @@ const instance = new rds.DatabaseInstance(this, 'Instance', { engine: rds.DatabaseInstanceEngine.oracleSe2({ version: rds.OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }), // optional, defaults to m5.large instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL), - masterUsername: rds.Credentials.fromUsername('syscdk'), // Optional - will default to admin + credentials: rds.Credentials.fromUsername('syscdk'), // Optional - will default to admin vpc, vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index a663faf7e5325..393c72b471b4b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -445,6 +445,7 @@ const runTask = new tasks.EcsRunTask(stack, 'RunFargate', { integrationPattern: sfn.IntegrationPattern.RUN_JOB, cluster, taskDefinition, + assignPublicIp: true, containerOverrides: [{ containerDefinition, environment: [{ name: 'SOME_KEY', value: sfn.JsonPath.stringAt('$.SomeKey') }], diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 12bf07e3ad5b3..549b5dbb28c8b 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -33,7 +33,7 @@ "@types/string-width": "^4.0.1", "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "jest": "^26.6.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index bc083b052f98b..97dc2ace65140 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -170,15 +170,15 @@ "devDependencies": { "@types/lodash": "^4.14.161", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/sinon": "^9.0.7", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-mock-imports": "^1.3.0" }, "dependencies": { diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index cdbc39e15109c..9367f6f94c0be 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -87,7 +87,7 @@ "fs-extra": "^9.0.1", "nock": "^13.0.4", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.2.0" }, "dependencies": { "@aws-cdk/aws-cloudformation": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 5a062553b94e3..ad5960bac6c75 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "jest": "^26.6.0", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 70062d4c99c5b..b46d38a7c4072 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index d04101af30df5..6730c3f050759 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -256,7 +256,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index d5ac48aaf1ea1..95ae09424001c 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.7", @@ -58,7 +58,7 @@ "jest": "^26.6.0", "mockery": "^2.1.0", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-jest": "^26.4.1", "ts-mock-imports": "^1.3.0", "@octokit/rest": "^18.0.6", @@ -81,7 +81,7 @@ "json-diff": "^0.5.4", "minimatch": ">=3.0", "promptly": "^3.0.3", - "proxy-agent": "^3.1.1", + "proxy-agent": "^4.0.0", "semver": "^7.3.2", "source-map-support": "^0.5.19", "table": "^6.0.3", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 40e1a0e4a1f60..812ee2fab8b28 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index bc1de987e91a4..e491685485c62 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -255,7 +255,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index e7c12b57ab571..b5fc8f9fcd826 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.3", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.0", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index d978a065474aa..d273b04a765bc 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 7d42d40d9fc79..0d38b028055b3 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.0", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 79a24d1c7642d..1717aafb3bafa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2147,128 +2147,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2050.tgz#5b03d8b2c0c67ac596276aac0d0d67227213539a" - integrity sha512-kyQ7JOaqk5YIY02+bbK8jXUpdONtUyxroITT6cnZ4wT6KgYmlB3HqhdluxcB5D07XdhsoyC+lS8hidHXG85ttQ== +"@parcel/babel-ast-utils@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2053.tgz#c2c2dba5a043e402e04ee5f7caed79fe21132969" + integrity sha512-fcbXhdlcABXJfN/cN0D3hpmf+EcpWehf21ACFMCvOyyfsiMpkWHCQv/xtIB8F0qS5OZGN3EABNNcdJG9sjh96w== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/babel-preset-env@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.428.tgz#de2a2223adbf7265fe993d696c21266796a788de" - integrity sha512-Rf6UApd24x/cisNUT+H/Yn02XPmuQEZc0tTWdmPGS2lOoREJ/XUUOFhEU9maffVUM+VgqUelkfwTs5m7wHTCbw== +"@parcel/babel-preset-env@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.431.tgz#23bef18a558b5d98db63ce675c6d7edc6292d469" + integrity sha512-H2ezlzTrunFhVJ3rk1Uf4krrruA7shRLoWEjroNWRp+jpLSdbYKUks2QqwidmR274OxIMtZKu2+bw1ZnA8Wsrw== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2050.tgz#dc353a5d5d19de40c7c389be9e1670dd32dd5b2e" - integrity sha512-s+boLOs106tl740NFcL3Jx+YRHII8+X4a4CBo+jeDXURTbTamYvfaEagM9qiAhPgRG7+oxPzPvmU//pPGfOKPg== +"@parcel/babylon-walk@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2053.tgz#6f26b502af1ee45a64029037100538c9cf96b5e9" + integrity sha512-YFTNMGwbQl2DEwqrPCPejPPdhq6HOBj38Eui9N3HeSg1Az5nYsXp6h+w2s7jPXv6Zj4yY97qGtGWRVe60hflLg== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.428.tgz#9a75e48965d3051dd97c97bc76d46346a7d09fc6" - integrity sha512-CF4cFxoPsZaWEFcVGL4u2VHdPeanaBExquqoqQl9oaG4FqGP4B95MaSjs76XtdbCERAO5Tl5MuoC9j4VRUzYMQ== +"@parcel/bundler-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.431.tgz#a01c36ce3cbde26d35b207b0e2b8e9e09627fc82" + integrity sha512-5v57j+S5d0/I76aKX1MSnieuvYi3sz+g0XEhIaQHHHLW4zvAJKw8KfjyrHHpQWasO9CqL5Z73T+z4jLRK5jYHg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.428.tgz#daaecd0cd061d8728deb78b948f09ce90f3c1543" - integrity sha512-67n0FyNPvanlQL6zlOhGWFcuVDOVgtkiuROhdrzW1in/MT/XwM1fYDSgpGtIZ4Megjp1aWlv58PBnC3b+qyU+w== +"@parcel/cache@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.431.tgz#14a9bfb404b8a01f194c511e8af130a6bbd12ec8" + integrity sha512-GG1KYjeLoCL3jcDagr8Z3f5za2ScxXoGJNM4sW8z9hVX5BKYYjG/Pd11EitziQTz8yyEN3Z63Xv1anO4zRCZqw== dependencies: - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/codeframe@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.428.tgz#68687330a76f098b6cfba3b3cc1e166c382098a9" - integrity sha512-a9e8nqoTKKcnlqhwNCqRgCqxn6ZMdVcVnxCWDGF4Fb74VzLXXbIbLre9lumb2EeD5msWZvnzlCJmnRwI84KUDw== +"@parcel/codeframe@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.431.tgz#1c930a957313132f0cca9240754648f9d0f389c2" + integrity sha512-vn50vb/LdujpNEpEdCnsgAMVuo/7SpChfjxhiqlTxkSWZTJTNZwVUDRxfes2m7s11S12aNDHMZbX8WoIXNe8Pw== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.428.tgz#111e40ed342ced5b38bbcf65e91e33c66be23491" - integrity sha512-0KAba2rXoFAhl+o3fOnAdBn01rMzkfCx2unR2ivLd6/dMvektwAap0/ExH+MyMa+qPzbs5JI6YkSglfsTVhxtw== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/namer-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-cssnano" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-data-url" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-terser" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-css" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-html" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-js" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-raw" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-raw-url" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/packager-ts" "2.0.0-nightly.428+5f72d6bb" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/reporter-cli" "2.0.0-nightly.428+5f72d6bb" - "@parcel/reporter-dev-server" "2.0.0-nightly.428+5f72d6bb" - "@parcel/resolver-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.428+5f72d6bb" - "@parcel/runtime-js" "2.0.0-nightly.428+5f72d6bb" - "@parcel/runtime-react-refresh" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-babel" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-coffeescript" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-css" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-glsl" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-graphql" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-html" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-image" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-inline-string" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-js" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-json" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-jsonld" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-less" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-mdx" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-postcss" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-posthtml" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-pug" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-raw" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-sass" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-stylus" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-sugarss" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-toml" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-typescript-types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-vue" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-yaml" "2.0.0-nightly.428+5f72d6bb" - -"@parcel/core@2.0.0-nightly.426+5f72d6bb": - version "2.0.0-nightly.426" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.426.tgz#2b652e74ecc073831d1fa5da7f97b8e13c220972" - integrity sha512-KqndVF5Fd4gf6Zf2gK6sY0qogS6OiyO6uF1oYL6+gqcFZKRNRi/9dd3lDverdAq7brt18bCCVXICy6dYme3DyQ== - dependencies: - "@parcel/cache" "2.0.0-nightly.428+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/events" "2.0.0-nightly.428+5f72d6bb" - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/package-manager" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" +"@parcel/config-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.431.tgz#ed6caf7ebbe1e20723363bc47b2608d2918dd662" + integrity sha512-4Nj83SQP+jgKebo3OwCEJU+qwZf0h4oS8ithGVJgVnNZ9SnIo269V04jRZ7su2eZGSM8CiQBlJl+TX7Z9tyqnQ== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.431+296bc57f" + "@parcel/namer-default" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-cssnano" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-data-url" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-terser" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-css" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-html" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-js" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-raw" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-raw-url" "2.0.0-nightly.2053+296bc57f" + "@parcel/packager-ts" "2.0.0-nightly.431+296bc57f" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2053+296bc57f" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2053+296bc57f" + "@parcel/reporter-cli" "2.0.0-nightly.431+296bc57f" + "@parcel/reporter-dev-server" "2.0.0-nightly.431+296bc57f" + "@parcel/resolver-default" "2.0.0-nightly.431+296bc57f" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.431+296bc57f" + "@parcel/runtime-js" "2.0.0-nightly.431+296bc57f" + "@parcel/runtime-react-refresh" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-babel" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-coffeescript" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-css" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-glsl" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-graphql" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-html" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-image" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-inline-string" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-js" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-json" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-jsonld" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-less" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-mdx" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-postcss" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-posthtml" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-pug" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-raw" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-sass" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-stylus" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-sugarss" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-toml" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-typescript-types" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-vue" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-yaml" "2.0.0-nightly.431+296bc57f" + +"@parcel/core@2.0.0-nightly.429+296bc57f": + version "2.0.0-nightly.429" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.429.tgz#edde8f84a5d03b3b6d042819f2f8321ef64b2572" + integrity sha512-0czo4MYbZElj1hxgGQ+923R2vZN/mDGb4mrkkZIg0WSavKf0ypxD8Tznipb7TYgQu8Ax1jMb5Jh4Rsgi+NnbZA== + dependencies: + "@parcel/cache" "2.0.0-nightly.431+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/events" "2.0.0-nightly.431+296bc57f" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/package-manager" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" - "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" + "@parcel/workers" "2.0.0-nightly.431+296bc57f" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2282,71 +2282,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.428.tgz#40d618bddd08724c8aa845c8a8092fdf5b871bb2" - integrity sha512-UxtwtCFsdVKQzmcAooQkm1Wwtd27165/wB1UQrkXYx5RQpSptEhd8LPBqgFZPMzUBLbBp1izwxCQmmekG4ignw== +"@parcel/diagnostic@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.431.tgz#c60f761cb13e21025e603342cc1cc41774d19cad" + integrity sha512-5PuQPD4p/q013LI+koGor3j7Shj2hjyJXaY3dVlVym/IBXzqEuIWKB9Ul7qBzC0cHxhKJmqwiwYaLF8mgCsaog== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.428.tgz#f1e5852f6050027f843de9a61a7fdf12dbc45a98" - integrity sha512-PProq1xqik+5hemAOJi+bRqRkRVHsGQhg86KJkt9+4ojP0HAwmsOQrpULO0S0WPF8lLGaGNVs4xo8O3ej6JBWg== +"@parcel/events@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.431.tgz#ae13bd6c93ea022379dc658290011024fa4593c1" + integrity sha512-O21hZLrLYlRh7klAHQgMtPMO67fxBX3mg9YpvxMG+iQMvfSRgN2w7SDqTceIt2uNy6l4+DLQw02Mg9bjX85bsw== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2050.tgz#0b647b977ce4959951599904044525bf4048ce70" - integrity sha512-f808N3PzbQceq0dkdQ7CZ1u32S0E8SLPeUOXlIPk8TSrBiq1UUA59nWJXNGCVTJ6yTUmKoFsgzM91xHWuQTB+Q== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2053.tgz#b4d43d3ea1ea260be9add6128aa1ecc57200f1f5" + integrity sha512-11PeH3/Fo9RGKGTTuLRrqrb97VqDF1noHFzQP1L6+a59Pn4K/rZ/L+sY+rVNWj9CDPcQEewQrL3jUzkdolwQsg== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.428.tgz#7cfb856764e8496486f5e2093d4dc9c1182f14ab" - integrity sha512-rTIqQJKI7qXDfZcuCbEhI3/OJuNCulfZs4j8wYbSRDJVIh7gmdNwkJQhYzft2NlH5MkbusbpFxBus7UiiJNv+g== +"@parcel/fs@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.431.tgz#68719ca0c1f5e77ac03e7e4f5a471d8609e1feea" + integrity sha512-cKMEMV8/8/5pJ4W88NBLc5x9IXuMB1tK7SoTMTlf/MaPS9mz7Tlm8lIPBb3x86DMGYuRilANyw7fw/RJNPkKRQ== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2053+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" + "@parcel/workers" "2.0.0-nightly.431+296bc57f" + graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^2.6.2" -"@parcel/logger@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.428.tgz#9cd9e5f70254c1e52eb78087e70046545fe2f506" - integrity sha512-cKljUUzvyo3ZXPQ5VRoOJ578h/LUrXpigYjQf2Fk3HnbKokdjljkEIyJCe/tlPLqoP4fAnh38+HfoJor24qoqQ== +"@parcel/logger@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.431.tgz#a05686c88318342cce23a6b5d38087eb7c36c6c5" + integrity sha512-43nUsGg9VxP1p0ffF9L02EEpXsx0i4tIbNKbi1auFW2IPQ+fSBmv/pU5h4vF4tiLN4tXS/Re20SaGwa/13NLRw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/events" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/events" "2.0.0-nightly.431+296bc57f" -"@parcel/markdown-ansi@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.428.tgz#b577193f5cdacd302030793d10bcffffe61debf0" - integrity sha512-Nj9Zl4ik/i056KJ8meYDlfBvZNOnneA5AyOCvqlC4Ulk5EiOtEhC1oowbO/T2eDYCI4bmRxzb1Sf0dQ6y89mng== +"@parcel/markdown-ansi@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.431.tgz#abee3634b20dec073451b94a156e25935dc5d842" + integrity sha512-EJWgpLuTIJt5PXZTeDEhF/iuyN04ySzFvFe6gpZJwJ0VJPSs+nslE5pcc+AQIhpGQUWcVv5F6ZF4GmymziWn2w== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.428.tgz#f2eb5b3307717d0b041bd6cddaef3987b9f5d717" - integrity sha512-ZIyw48pQaMWvsIzugg7VUl8osrdMEsnJsC9K+mqr/UZj9jxDhy151WEdUu/OSQUXUnD1W0eULEksYCTUGVPo+w== +"@parcel/namer-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.431.tgz#ec7a5c9c7e9d36bbe03ed6f84fc7caffeb528acd" + integrity sha512-DnDQCdvha8bL8LmqKvnEc5uw+/OQLRTsbrHUhle9vtj/US6gQj6fR7DgIZDeFyoxLgg9RWc+aSiF8zqwAGywzg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2050.tgz#fb4700beece5c36d7495590646b0f3541d0228ad" - integrity sha512-Vv/1AUmSAANKgkpBhoIK0V0KcBl6WbEuPqqjbbZ0HIrKjgyMq4kfyDpprvfNmnCVEcildFYSSLWNhfYCMjD/eA== +"@parcel/node-libs-browser@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2053.tgz#ebdc57748917b1b679b420e8df25f207cda14d72" + integrity sha512-p98O5y4p5a2xA5oB4rUwzXCf4S82JmKsOmdKtTd/DZmJlIvBZb3zFuacs2XJMK67S4OssBHUNMxv74NnPSMWAw== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2371,71 +2372,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2050.tgz#0bf66076f65949e73e94e80fe5bec377682bfbaa" - integrity sha512-MREk4sjv2KmxTWfZbW8FMU4mKAwkKd/VkCqFzpcgBQzedrGx19g+HwdcgnDvwON5NRHZp1qEFmRYeHHQWbiK3A== +"@parcel/node-resolver-core@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2053.tgz#010c703d7d38ddda06c5143e97c5168a48862573" + integrity sha512-W2Jm6ce2Bfz824fLnd2pQU9cw1lTwxsCF03YiC6U95U0ZyFLDsnA3x6BeIb8CFmlhUEz3lFp2ZgLQHTGAu4mHQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/node-libs-browser" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/node-libs-browser" "2.0.0-nightly.2053+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.428.tgz#8e539d0a1e1717a7f90fb85ad319e6ba07434bac" - integrity sha512-kPUAsPbQwH9NO3jUOfJh3RH8KV/N3rdt5ZAgIW+yhbl4mkUk+tMXE1pXXbN1F44saQNR/GKn+Z0i98x3sF8XKQ== +"@parcel/optimizer-cssnano@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.431.tgz#816b512eef568c86529f8e067a95ba1c7b0e5b17" + integrity sha512-TPPWr9Ml4b70jApnF414DyeHWPr9NeDaa4nCiSmy5Du79RAfpxtfEan6MAtUBxMEiqLwRAyUxbj/mF2ZjdYidw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.428.tgz#bb4d4bc6970e94ddcbb21fe74c58fc1f5f503fcd" - integrity sha512-WB1PbSlej//iVaoM7w+sRo7rHrRNNemiZysy8amXfzDkQWYHKmQc7/9iQtr9qf3TGrR50IZTcDWViyNfp8mC+A== +"@parcel/optimizer-data-url@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.431.tgz#95e092dc5cf801be3bf86b324c6847f31e7d3e98" + integrity sha512-1Mv0+XnvW5wi6NgBlqiCq/8XbNw6rQhOaM/u3crk+rQ98ua+zL8tT4s3XttOCSD9OwV9E9RyufV8xj/glV8hIQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.428.tgz#bd71fd60408c4d2f22e7d936874bec01cba070c9" - integrity sha512-h+f0Oj+MUBcedHK31vMEB2tBbNOGGVN/tNSjkmpeURr4GDR3VletHpd3uDJwp3M2t5Hi5x8tRF+PKAA/XPfCfQ== +"@parcel/optimizer-htmlnano@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.431.tgz#35777a573e34b8af78af5a9ff03f030952d28188" + integrity sha512-mZvgQEEH1u71mxqd+28BLx+ZGYYq44o3RlSquxlx9VtIS6qiUi/Be4+qxevtnAR9J2MWf5D3tgGqoGJXeZTMCg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.428.tgz#7e058b63320f6ec631b46f04896d2fc73bfbca1c" - integrity sha512-jdJt+kqTVx3QVwoZ1ghDSLxkLaklGqeRzCcDNeMx8SnXgnG4nohqvl4UeG5SRdj1V1+2LSVt/zW43XIY5wpp7g== +"@parcel/optimizer-terser@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.431.tgz#04446897700e9ae35fb99249e92be88bc3e899cb" + integrity sha512-OEofMoNpS+pj7N9Y+l0Qdg8bPFrXDT/710T4mZd2ZpP8W3bOfZ9EtN7Pb7sDRBOvxnxDcxAKfvyOXhxudurxAQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.428.tgz#9a47a91cb604120f8a154e1108309d0384ebedb7" - integrity sha512-M2poHMzbQ1nlxfrJD1C23Fh8YUBh8RB73HMXEpKrPAEn+S5AIMxxdc6oeJbpTpUIEiyGm3MkCt8nOk/la+StgA== +"@parcel/package-manager@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.431.tgz#e0ce92382a3ad8b31ac91caff1605316acaf6a99" + integrity sha512-wbc/UYjTjrqCFZ/AJ1gOxyKDfXE3lmLm0xt5L4GOJBToe6EsfbdowGsb1BTKvP73NcGdU7vZ93qMpv5bgT5INw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" - "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" + "@parcel/workers" "2.0.0-nightly.431+296bc57f" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2443,91 +2444,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.428.tgz#15461eadba085a6144caa6416a9757396a4eeedc" - integrity sha512-O5lfvpPuPUzXih32+bRm+6ZcTygUq4K9rHcVr3OY9neIGu7exYJtKB0ysoG6B8fZo7dt3jVytBZHnSHyZMTNvQ== +"@parcel/packager-css@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.431.tgz#afe33ebfa5f5e0c3f45154ec7342cddfe752d073" + integrity sha512-DEIMsYxa/hhyKpyP46B2U+zzLqqYoeeWE0TY6iL0JZevbqJneaHd6wWWD4dSZorX7QYjfQdPwD0bpr2bA2F4Jw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/packager-html@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.428.tgz#ab66dafada49cf5397981657ec51258b95801b09" - integrity sha512-4ZTfPK5o4VWui0U4QM3rU4+qgSouNeweahN2lyTaXML4LLHb80i02/VgSA/cE/6kOfo7mNMv+jnnNgrLBYQ91g== +"@parcel/packager-html@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.431.tgz#97e28d80f20da261e080a2480c54d80f197ae29c" + integrity sha512-6ahA23Q1fx28wpHOeB1ci5wDvD5KTz6Kqq4g1GwYWDwUHDmgAkxBhYaOGSB5+veEgwgqkDT4IHX90ctCy+vkhw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/types" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.428.tgz#baa2288d9346013ef128ef0dfdfafc43fe6eb3db" - integrity sha512-vbiFYwbcCXCU6VJfgcndx6eB9G1cUaOXaDsdE8eOviuzEJxxSAzhtraxDX5BUDxwZUBiqsjfm+AKKvwoYWnbUQ== +"@parcel/packager-js@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.431.tgz#0c2523d19ed5e30c6120477af13458efcbaa412c" + integrity sha512-i+Z+ybrcYWzvK8bc5asyjqPE6g0FCJXVY1ES5Yu9suKWlVlkxzcMI8lZZ80Z1Hk4me4oEsRC3dhE9PRCJkG4Mg== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/scope-hoisting" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/scope-hoisting" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2050.tgz#c1ae7df401e3ac2be1d7f275fecf97d075685191" - integrity sha512-UBXtPeEpmtpYmCCw36HkNRVKzltQWceRzeM4WFHAF+30Zn96PlT+EzY8K1gtl2xyQ7yqa9lAm2jkEnuC6HeoPQ== +"@parcel/packager-raw-url@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2053.tgz#506a80c3f0e24f42bf68e70d2b7bd275380dac4f" + integrity sha512-S6vI4Lze+Dnq0OqH5y0Or1qFWL0ajPuZSlPlbOqzaoBNYVtWdMEb2qtug/spRKqT7iHrcX4oQSx/qnxNawn0jQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/packager-raw@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.428.tgz#6ce37a7a3b70b59a3ea19274a20231a802107730" - integrity sha512-pzWComnfjMqLKKP4qL3Fr5AQyxAACIS3Ms0tjSzVJgRf6s3Ef9IHfGZmWoB8EEICdSi914zrGlTA/06dWpX6hA== +"@parcel/packager-raw@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.431.tgz#bf5e21838aa139c7546231505163bd514c8cacd5" + integrity sha512-thsJdeKUfEuS3G8+Gnb7m+tKQjQlK+UIWVCSL2v/8N7Syf34QySwvH/flSRWNchl0dEcE2y+wVeGNIlW3y9VYw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/packager-ts@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.428.tgz#c2989bfe3774da9305a485ce6af7bfd5594bc700" - integrity sha512-tmFJUgImvnrHBdSiGnzJzs92D/mHyCkamSyhphz2ZOa1xMaQbw3V4Hj50RXnmjNTZPyspDDkFk2TfMjISgDSIw== +"@parcel/packager-ts@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.431.tgz#e8aa1af40943d44d219920f56096c19ccd196577" + integrity sha512-+f8V8rsOyheoc5sk8h6HKY11HcDcaDzj8xwKHdiRDSk1VWfUFgA/uF0uD6jtTzUtlVNhKrZoN2XByorTx4VnAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/plugin@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.428.tgz#0a8b3c0bcff4b4233cb85e4110f819acca291a77" - integrity sha512-rbHyE1zBOWM62BtoDnjDgXrdWDsdRDK9NdHY/IJdILnrrqbrRamY6x9xkOMuvrIBOkN7DmnfbFi2P8yUyaqr8Q== +"@parcel/plugin@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.431.tgz#7fcda9c74f87b7f4407c91350d627130a7b62ccf" + integrity sha512-qG1KX98FvZMikPLycE2L2a/ykD06S3kKmz3KZkRA7FmfrdkLS5emO/DstvqdoTeVJbWG3YQlhImI+zABTlvJGg== dependencies: - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.431+296bc57f" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2050.tgz#bedabd5a0a631a98fe4152f7fd2093a766ff1e95" - integrity sha512-lRBWNQZXu71kvM07Rf4+1EDMWPCsV5+eowOTkPxT1eWGt+HPFmmxtb7JAUyHKcdId4IXEcKkWAssvX2+TlEPUQ== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2053.tgz#9ed5ae88752811f2ffbdf675d84e47fb4a732418" + integrity sha512-yi3wBMM32aPMikaNv14p56gmVzA9P8yjVW20GYy9sTQmqCB70FHyWzZk1cgjkeOlFyPDVP0dQP5A8dYteQTiyA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2050.tgz#bf75aea295515a82ba97d7a731e1bd9a5fe42a39" - integrity sha512-RkI3qbE76jWYxRFMp8y1VSnDKRypZ6WqVQp3FEjJgk6Uf/XfecG6S9fg7Lxm4JeSJhJ1+bsRTl8RoqV9Gx5XGQ== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2053.tgz#a8fe39e5a56709b8402576165da30ec98550e0e4" + integrity sha512-VMR6ACWwpxjQRIsB9jvPnHRmg5KbU/pojfFu5nwUBAJIGpszF6iEwUmJR6QQNF804PwDauAPkIr1rqWowi4cHA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/reporter-cli@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.428.tgz#54d65cf83840e0ae22e5fbd5df3565c7fd575fb3" - integrity sha512-AVIZnI6olE64AkdZe9XLyOYBQUxgmH58N6oyIljn8COVpeLN7C2pNiJMlaXODxat4yqJg8LR8dt7vA0RMOcM6Q== +"@parcel/reporter-cli@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.431.tgz#fc572cbacbfd00e25dc145e1b3de3983d54a5581" + integrity sha512-wsxDn8iFnjy8pGLNemr5vSXT5qLHHRFti0/Ir3FybkAtcvbAzb1XlF/MrVhHx2beQztTRSbVfmJA5WMqWu/bFQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/types" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2536,13 +2537,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.428.tgz#c77becc777bfe72d2a155136df0432e5b41742b2" - integrity sha512-ipr9XFKXWrQ6lWlkUeLYgCHcaxNbREb/Uh17t+n7E5vD7kQvvW7ptDi1MB1IqJAzn/y4a4OTLwJV2ZKnwEN9Iw== +"@parcel/reporter-dev-server@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.431.tgz#2455b15671e1d250e196b018b2acb7a718754d1d" + integrity sha512-W20/1fAvZU9907e/Fpr5yzpRxrvNEF91G+b8VeF6a6Dw9gt331Ay5qyregN7/CcM2zkWtOB2yG2ckuzPhUnAiw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^0.19.1" @@ -2550,54 +2551,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.428.tgz#ef3adc63137dd23f53b5d230cff32fa732c88098" - integrity sha512-ay0HkjAZxtBEbSYTF65wCfxilDE0LkVeuwgapG8Pd1/FCw2zU4dA/s7MozRmb6DQ4cU2hZL+qbNgLOyQ0cSNuQ== +"@parcel/resolver-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.431.tgz#188469dda57dd5e43770dbbf7c7f156000126f91" + integrity sha512-Qpx7xdhY1KML0GfCZggsdBsxl4Tp9LtSF0AINHpOTm1JJBzoUGNSytvFneZOHwRe7JPEHgTY+ZEuFEbbjG/lfA== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/node-resolver-core" "2.0.0-nightly.2053+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/runtime-browser-hmr@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.428.tgz#df69813cdf1f8ca05ed9ae9a4b3de0f41f255b5c" - integrity sha512-Sa2gGxveh3qjv6zCGY5l9yOgPjrqZrSzw0vISdtsgnItqW5o64Y2ZAtLS+nb1vH7KwEuhm9/O2tcye0JqeOEvQ== +"@parcel/runtime-browser-hmr@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.431.tgz#5483f4c00faaac3154b855fce9ef68bbca1e27b4" + integrity sha512-UU/LFh2cAhi4T+JdoD/A4Ivott6ZC8dZ5V/VfMzdh/ZwdPTDW0Y0q4VihFSVJWj2dX1CzlqUgJk6L3+VUqks/A== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/runtime-js@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.428.tgz#e71798bd93144d9b4ec9665d23a7a68b88922340" - integrity sha512-26kopuJ1l3KvIc5Br+ctotsZ3BMqKlVHc4GvH9YilYGehqEaF1GDEX9Xjd2zBaLfQuFmHSM+dhFCkfz8ZVjQlA== +"@parcel/runtime-js@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.431.tgz#f47623f3b883938bdf2a609b59129f3e55bcdd4e" + integrity sha512-Irt6e1vWdqqk85b0dzB6HP5vM3si8J6LfmiZZRRPH0yKNE6UL9LsaKMtAI6YSChT4JWwPoy+CWesEBLnrehE2w== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.428.tgz#f5f4b9c0d71c7a9835fe2c0f559215c09593f43d" - integrity sha512-CSA7HRbQrpSZK7ulZpKrhW/yN97TTxGUeqoYHKZ34xK+lPCNGNNBnQMrBoKxJ2xEE1nEiK8uYJjm3/3W2qAItA== +"@parcel/runtime-react-refresh@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.431.tgz#b0812cd2a4e0abc03e130e264124e692ca52d107" + integrity sha512-oY/7RYcU1y3LusZP0zKISFtOw0b2ZioKAV3gWBHW9/ywB2z6szf2In4byCjnI/otIq2ab2B6VFN7SHnnPwZXdA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" react-refresh "^0.6.0" -"@parcel/scope-hoisting@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.428.tgz#b2a6d2d1eeaf3042b8c6a6ccb015b024488c0e27" - integrity sha512-31F7KlPhSteVSTT5+3ZAB3rFYSEtwsKv6qnn+0GBpMN2lZROXzSuo016OOwirCqw9mFwnbHf0/tm5qmP7tlaLQ== +"@parcel/scope-hoisting@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.431.tgz#e0194721d523ef88af9c06d1922b1b51faf82068" + integrity sha512-50/KXGnGcRPpPrcoMNYWHrRC6vvKauB1EKy84E32lG0cAafkOvykoo28aQp7vstnxGnVZ9c2hmabyJedxm3L3w== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/babylon-walk" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/babylon-walk" "2.0.0-nightly.2053+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2608,10 +2609,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.428.tgz#7e051b1cf177766d788a0faea3c4f85cf236129d" - integrity sha512-KASGFzx0m0tjqJqxyXEHc6ool4eTrBdhIJcfcOwBSoNSVDAloJxqqqgROSWL3bJmOraj85ToDJKPhBwXVYvBUA== +"@parcel/transformer-babel@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.431.tgz#6bc079070cb02be8b1fb6a6f81ca2a7bf6f6de11" + integrity sha512-cvWTPKNhCv2+NeHBqJIagp+vKIBfutRO0xIuoyJ6+IuA6XbXLnIJlWaJQqQvErJoJ2akY5ytx+lctzWnKd6TXQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2621,85 +2622,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/babel-preset-env" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/babel-preset-env" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.428.tgz#09fdc807bc06eababdbd8bd791bf42f6dfeff7bb" - integrity sha512-pEr51sfPjHqcuOFhLwT26+T4QWcbiUFz12521N5C+yJnpDYEOH5j+ojVaKjLefp62n2PSZKUzsobTB+TxHhJrQ== +"@parcel/transformer-coffeescript@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.431.tgz#d7d3465b9318e2535e22b52f92df5d91a1eb21a1" + integrity sha512-Ygws6dccdBw3M39MWjqJS6EIAzJekmg15ivlCww4SNrfesI1+eeArKsL/KrcSvk9YyatYG7fL20rRiAq/nunIw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.428.tgz#2173056e77387825f86ee0028df6d569f47111c6" - integrity sha512-IkIaoSxnfwz2XPUujqQr15buj/YnD4vWVY3BZKyDQ6wElOKXag9K/zSpYsDZk7S28ZKaDM12XyOhFKZl1SBdXA== +"@parcel/transformer-css@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.431.tgz#1ba7aadab0e87b3ac5ea7e0cccd016f5ec9a6772" + integrity sha512-nq29icIS/0QOynOMDnjTtLLFhaK8GrKF6FD8QFhLi1vAFxyvuDJyFTyHlagTFqWEHQmLw7WEUsfY+uBBj5Ut4Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2050.tgz#2d5bacb53d8c8e8016bec0322943bb97ac9d691a" - integrity sha512-G3ROXTtkg8Ta5GakogQ/y2HMcc3xLcrhm4cKkDYBSSNnfnlqNVbB4CzErEv3VNLiJATQgnH//Aq2V3aZ1ui8mQ== +"@parcel/transformer-glsl@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2053.tgz#3d713830d451f5b5a188cb844dd4222919958c4a" + integrity sha512-s7cjzJS3E2MOOETlRfLghdw/mmvbrNuP0zuOWaW6c8zc7AttenoX0/LHScoK71wukfax9S6WdLKJl/xhwmLXMQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-graphql@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.428.tgz#66e756dc5826d79732917d9e8bbecae29763a702" - integrity sha512-ILBirKHDsbWMSiUCMKs25XBoCkjI9ZZPakpHANwVVzK46scOqyCZtD8uDrNW2IqBecoviHH9e1E2ke50AphWow== +"@parcel/transformer-graphql@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.431.tgz#9ea545c47d401ab68e02bbe0cc71273b7405fe9f" + integrity sha512-znKzDICXeQZ8TKGI0pYq7tX9RWG954T5D6Ynzii5zJdzDDfYjs53U3b4XATMk8RhNuAzdpqVwV3PUa9XoPMEnw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-html@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.428.tgz#407875dfa6ccd3fb12ca0f24e0b1c4c5c3669b15" - integrity sha512-o0/w/+NLcPPUF7//HoTF/VQaALh+4YjCdhor8dCJgiVqX1tL7HEWgZ41TV6YrK9CF8eOIMp9iJLEtC7blEs9Eg== +"@parcel/transformer-html@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.431.tgz#2537f9c38eed7a3ae0ea9a7a0fd60aded795cefd" + integrity sha512-wBu3QaBjcHmomFUmi71Ee2fhlr8wPysajAZpegXHep2aSY+Hpfv7zIFleUuyqhGkzli7bTSeHp0HOFqj1l2sTQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2050.tgz#f57424c4016b46a4e92d8355af3821c49e07ab09" - integrity sha512-TLyxN4G86POpHW/VdGXloLwM3eu0wRfJMagjNue3nDl0aKGSvpT2OJZEpyhUui7C7owytM15s23+DHI3miwjpg== +"@parcel/transformer-image@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2053.tgz#0cf77853df259fa5cbdb2fd050d983c672be70c4" + integrity sha512-xMBlyb8awU6hxg82+QizaObHShs9rG4nMmPhGuoRLetOFkHzS9OjeWGHooQ2RMEeqPnX0H4rMj7ZPobdSkarqQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-inline-string@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.428.tgz#8979079900022f74512a5fc6eb3278d8900a5fd6" - integrity sha512-DVwKaFobajhNDA9D7fewXoMtxwdgIUpZ6nK3m8BgzWHoH6zvDkkxaRqUfaodDtz+O46K8a80bwPeQsjqmVZyaA== +"@parcel/transformer-inline-string@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.431.tgz#4ef6d0401d748ea5a3be81908096495af038e20b" + integrity sha512-oTmDZ/axGCpkITyQo7lHjuEj2vhCWVKlQfQXSiWW65W7bS2tZ8gyLU1zcC88K3B7/VUH/7m+WrvHuoBsBX0d/g== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-js@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.428.tgz#d086557b4aa7589de1f0bc2105f89e40042a8291" - integrity sha512-RmCOay6oEGV0v7bjg7BC9l1St0f3WVBtTZUP8WNVWbfVv3zSNod5gTMaLI+4j1EDbzcLTm99d4XY6+mxK2+EFQ== +"@parcel/transformer-js@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.431.tgz#cdfbfe23649b1d481454b529ece46b51578171b2" + integrity sha512-eGD0Zc8IT4VXuhj7Fl/Iei2fnN9GMF+lLjC8ElZd6VPZkO6a9R4bYTSnskP8s+f3bquqEnUeodgkwU7+VSBl1g== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2708,193 +2709,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/babylon-walk" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/scope-hoisting" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/babylon-walk" "2.0.0-nightly.2053+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/scope-hoisting" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.428.tgz#f00ae358c6f6b0a1ac1676fcea189f45350ab447" - integrity sha512-6zt/xB4Abe3HW4EXboBN4eAMnX9AZ+s4ffMoezGVHVxlHClKQ4Hf7OkdHef/KZnu33JNjeC81BofSYVDMPD2xA== +"@parcel/transformer-json@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.431.tgz#da8bfdeba1e0dd6a4b011836bf4c76ed0c5e75d0" + integrity sha512-0lU2UI/XPDKKP2Fc9+re16ft84UfTnPl9MgGzzUSfYjQLSsyOvN5ocY6ue8qHgumFZ7AUWUbUFjuJJgVzGSAqA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2050.tgz#8f877bf2abe86794fceb451df31ed3fee33ec62c" - integrity sha512-GG89Hfz4Nf9N10cJdBF2rrCJ1MSnTvVX+WRP379KxUHJh540O8xSVxcBnHnt5ByOD0JWB0Qkk0KyQQOe7K7WhA== +"@parcel/transformer-jsonld@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2053.tgz#f75f84de1a95b571f63c91e57795750a16aa8071" + integrity sha512-X34rMFizKuLjND2jkK13hIDHdO1Y5GAi5HVZxXBKP0ixYXxXcPpeYtcjcVOX2l86Rg2rPL+BDKv2PweqVG+Geg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/types" "2.0.0-nightly.431+296bc57f" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.428.tgz#436159b13cba102d114eff58c4ad082b5322ce87" - integrity sha512-gSrGzckTQi7b+g8FrdsJiysgHSSzeEPA7RGE0MDjHllvcjpTSTvkIquS2ImMhTeID6b4DlxSo12JkGUAsQf15g== +"@parcel/transformer-less@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.431.tgz#faf1c2ba4fe98de05b0f7614589cc92f8da1e250" + integrity sha512-wxdDPRZn3mt6mDakyLgnXWHARNX14JT0J8UT3Xcr8dvhh01kgK6KE6Ndp1jhibw36kd+1fvvJ93qRY8nyrf1kg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2050.tgz#b03c7a0f4c9b8bb76743b06600a78a9224cf25d6" - integrity sha512-SWvTLYNy+ol3iHtOySeXq/nDMseTClIaX5yBrzvXlKbWt2voOhQjFJiUmxk6/mUqxRvBzwRr+0t5SnnKDWpGUg== +"@parcel/transformer-mdx@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2053.tgz#ea7f46349d1f7cba477578ebc7b9dec9f7ca0102" + integrity sha512-zslRcwHCs+dx/PHi7AF5HB1zQ5zdULS3TwEmBjshL6Mxov8O29R1aAWSRzSYN8xgki+8JjJSOGStcZx2P6fTsA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-postcss@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.428.tgz#02b4c8cccbb672a074dabc07be54e700b2257fa0" - integrity sha512-fYt5mAGMjWzG0Nucgy8M6qP5B9lIBsKwgpZM/ZlE3vP4AX2+CVtswYh8kDz44tQ4KLtxdCs0r2TJkVZ+HzW2vA== +"@parcel/transformer-postcss@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.431.tgz#e32461c484bc9135e171da3e8de4a089f6198d86" + integrity sha512-gKQtKR0FJinwm4NONJk1rQc1HKDHX+8ypISQ6rDmh5PhH5GsDw6pJRibl/tEAkPuoAH9wozEMk21Qwjjr+TwcQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.428.tgz#1c5e845aab7201b6832215b6e44b793a74daf7f3" - integrity sha512-o2a02kFYexpKHR+1eMZE8bcmoMC7scKlHhFkaYD5LObdfAkQSu/ymFK692UUj6nuBCaqHu5DJjBqSoDVDH8pTw== +"@parcel/transformer-posthtml@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.431.tgz#01992570a1fac563063ca1917cccd11724392a6a" + integrity sha512-0VA3OJ9yXdQPG+DuEYYL0KcMUACCepOMQF3xLQNCJjh3/SB1f3bmBOzGYPcw18bMHA6S3OX/pNRIIvvhPfBf3g== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.428.tgz#498d7332aa43725ed7c4003714666dd3e198a0c1" - integrity sha512-6b8qI6NfAyp9nac4Ffd6WgwUhV+SdmqAin1AUGvrPpxLP52Vd8ZyvTcPC7E2yHzoQ/wBU+WqMcvGL6i5x2efwQ== +"@parcel/transformer-pug@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.431.tgz#217a3582e2a68293d3d3f3a0e87fbc7c40e1a085" + integrity sha512-EuqsLIFpakB5v6pHzXrMbT7j8vyWMhQA9ubAezlwuUCuMrF+ED+fLZ0amNbfOY17LTutlMOF0ijsaThJg032sg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-raw@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.428.tgz#58dcb4f563869512cc148783aec3ba527208d610" - integrity sha512-m0OQ1ck0/hAfylpbJqtuIQTCDA2Jy7Y86SKV5WgSYKR1jjfelE4BJWWCGtl4I4mtK2/VpMvCQZKd6Kob4AJOog== +"@parcel/transformer-raw@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.431.tgz#8f755a17cdc25d0a2102b27574536d8fe001752d" + integrity sha512-+Z3hKjlUoG8QydM2CpcF1yXW0DFbm99LeLFrAIkAj2VcTRpDjgcXP1smWXaolux/FVto3WK14nk2PScUZqgE4g== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.428.tgz#25d5af01e55bef51edf83ad229e5e5f5970aa991" - integrity sha512-uqPx62jUjgt98Jq1UJcA6RuI3F46HAiF4DxuAJQNyQjGAtx4WZeZP/8iH1K1hpgyRGB8fBJwYxVtuwFCfxATlQ== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.431.tgz#e100cd5b357a7e1655041b42bfee38aa927e34d3" + integrity sha512-pxODnpLkC658na/RD6jRm8SJCUYaCL2ufLrYnh6H7B7VY0dkMg0I8vNRJGmb5R6nWsW8ML2n8QvzOYmTWIq7Ug== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" react-refresh "^0.6.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.428.tgz#beb9c3243dcb18cab717d75019bcb9c99f62f3b9" - integrity sha512-2iarFS+oVuLsu4yW8EbOkfl7SYRy4krL/Bqv6jRHYQf1YEG4fcStZusfkEcR6IwV4XDBHE4NkuTxhAKwFbGqAw== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.431.tgz#fe24b98d69fcc3c08e5de8367d63a895216e94ae" + integrity sha512-On3rvDjaywOAtp9ZitFAEWmRti5hUTT8KcxiJtvuKU7UzAyT/zDHr7KiaUibvJwdYfMTmukdHwFKDGiXHJSRYw== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" react-refresh "^0.6.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.428.tgz#576bf41e99da779c2324179337e30a22da5e0bf9" - integrity sha512-W2AMLKI3OHvLrbCv1XJoeCA1KLmsAgx5UNWYL36P0vgS66DCy/JfqggtJ/8Oq3kXOzVfmjONwGlyn9O+0/2ZuA== +"@parcel/transformer-sass@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.431.tgz#35d08684ac5488db9a7c1f40df274e381c33c170" + integrity sha512-FAsZ2oxRYTJor6A/EIqX+bitiqc5aURMBRhMwwn/edsVf6uaHd4ZNLjQ5OvYK5+qWyNVK6FcbJx/tWRcNj3xFw== dependencies: - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-stylus@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.428.tgz#bdfdee966c1ffa8d5205d0df7b5630dc1259a672" - integrity sha512-E6dlNK55W4DosspdCdq8ggn2PEOZpt58OvpYJH4iPEeGCVMrdqFPDTcHDQ1kyosFF70RwpCqx7w9xLdFibD2sA== +"@parcel/transformer-stylus@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.431.tgz#971d7f1e1d1d038925148ea09d1dbad2eb000680" + integrity sha512-ptTcApAPuVJ+rRIZ6C+iB+Kq4rUsXsO1GDWgq/YIilGM49xLZB76hwMKg1fCYZEQJyrCEk6PJIVqpu0EAQetAg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-sugarss@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.428.tgz#cc286659ac0892c2b1b9376d82847911b74c5ed2" - integrity sha512-llP6x3caV63EADeZethqEDAwM7VTdglkPLmvKFM57PQbxJ1sLDFzuWb9CY5ajd7gcFs9a2c4wRTz87EdL/Y8pg== +"@parcel/transformer-sugarss@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.431.tgz#69d9aa5a0ca4c1b4c0b4e7eba282faf8aea34958" + integrity sha512-M3AZQOKR7BLiWTN28GBMADz5EGdecNF1JGbIs9sHYWtNW7koKDVni0z6+5salGBudaimYrHtCixP0eBlS/L0ag== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.428.tgz#c92cab9c5b75e23264377ead3e4ef05673339299" - integrity sha512-jAjP/76eF4RV0Sl6fOMXt3OjqIBAyQiaSSqPT59bHD65XPakPTvxGSII05jmqUqSFCtn+Qy7SMF2SktIJKZi7g== +"@parcel/transformer-toml@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.431.tgz#6ec515d86265be6b6b8d569557c24f4ec6e914fa" + integrity sha512-hZHVL7zW//AYHTCgEkdevGI71radmKqEvT/eLsHQH/AyWwdB+ob7nMMTO5ZIgutluxA9BCgnuzC8+jOtHrz5Vg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-typescript-types@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.428.tgz#1121f5702fbf3563f785be393da252aa7e3a75ba" - integrity sha512-WMmmZB8fNwQ/wj9A6Z6OYEkIXCpbF8h73Ie6q2MUPpz6mgRtLhL3IfbCulpoHH3GvvJ/qo7IWynOqrYajHNuqw== +"@parcel/transformer-typescript-types@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.431.tgz#cb1e474b584d314ae071ced0844c994365b4cfbf" + integrity sha512-7/bejpeNYvfdfWi+CFJ3T0JRP9NfI0W1yh49laX38/V8hYdfZYedA65dzsxnMoOu0F2vHaE6ToD9OnvdCI0UYQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/ts-utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2050.tgz#7ac51e3921f1dfc2bf62be794e059d384c0a4107" - integrity sha512-qPYRvLHgbmB6heNIVwz8r2yfzaTpgIIKAXyHt66SFmA63l0iAt0HzRdmrRUKRSywinplrXwkEejY7W7PUtIAuQ== +"@parcel/transformer-vue@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2053.tgz#1d9e985a8664fd7ad8886cf522d1cc67b9e62da0" + integrity sha512-XwL+Iwf5zOk8duxR27Xw7FWvT3V4D2cr3O2Uz9+bnbv4FL7gxy5ekebU3S30c4rp47SceGsss17ZCwGSknw5vQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.428.tgz#ab429adc33b8fef46f7b835fd85085f1e7958169" - integrity sha512-OnKyVu09nNxjCVC+Ltz44dX1Wobd6vPVUMOizzumxr/mffKF56qyJH5nZr5K3WFmjQPt3dZTALewE6K+/hmMHw== +"@parcel/transformer-yaml@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.431.tgz#8395fe907df61b5f93af09e0adb9f87fb175022e" + integrity sha512-euA+BTJjsYTmOKIWIklzwlI+DZ8GFVHYS4rdP+3I/lZEAyTjdZUopA4m99TKq0cwnYPu1R53H2wXsbK1wAK1Vg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/ts-utils@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.428.tgz#aac135f27bf5108b5c3efd5f187de409c524ba9e" - integrity sha512-tiEGEvo5vnlnhxaRpECaJGMPv2h2WrDZLwmoJmd7dA8bRoi3J33b34XqcM1X0vOKAoiorA3Ty1eVZidhk8Wa5A== +"@parcel/ts-utils@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.431.tgz#7e8af0fcae0e75659b334fec24e31cd89805dc69" + integrity sha512-0AeaQy4KIG2sT7BB+OnUsmv138DPbrechHQxO1Zfkt7Pd3FWz8vl6cLTfiYA6QW0XyVFCnRFG0GIqubbmSk4Iw== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.428.tgz#2de9d12da3a389ee7c192e6f1778d1e40982ab4f" - integrity sha512-EccPH9PldxURL7FVd4Qk6wRXMPbw+9FLbK22hg6a7SKlioqKbM0Wi3esWvuArLTsLqKb1tYPskygPRqIzEfqmQ== +"@parcel/types@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.431.tgz#20cd0e153dc8705b357c549f4a26e554937db14d" + integrity sha512-RJA4MWzeL9DaYi5LZwNoVBF8ZIz/dmIi7nYKGqo/LqSTJISh6rNLwhf7YuXMGKxjlLJ95mfaEzcmtTNo/d3Z3g== -"@parcel/utils@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.428.tgz#d791d9e7534db8ef99e189cbee4162505c33f0ab" - integrity sha512-uCcBVUYqhld0822F+4Yw3dnWuHsNbNsK6iIvbZbKCh7L+MlQkmCvlwYE0H0ew1u3HxjQj+Dlz/lfP7iFDj+Yvw== +"@parcel/utils@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.431.tgz#ba38915f5d35289a42aeaf87d62760f72f5e8167" + integrity sha512-yIdwnvdL47EV8sv8DbcZG+SOSueM4rMrEnHojN/LPOIzTDiQPUtMx0wTGW3923UN3E2vknGbssIDJ+fnl5l2Aw== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.428+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/markdown-ansi" "2.0.0-nightly.428+5f72d6bb" + "@parcel/codeframe" "2.0.0-nightly.431+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/markdown-ansi" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2919,18 +2920,18 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.428.tgz#227023c9725bb31e495f752f35a317e5428873be" - integrity sha512-dWQNLnJ9TcgbXDQEQcudCAZj2n0IXeBmaYq/yaCSYJ2JfT68W+LyTZS5GleKo41UfudqecnFnLQFrbqHTWreyw== +"@parcel/workers@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.431.tgz#af69ad5c18390c8af2fc05395c23d491064baf83" + integrity sha512-0jlEgTwHU38g/KTB57yNT+3ZB7G8cqCxetnMbIo+2oEJPwuOW1qHoaBcL2ld87BNwq9OB5b4gpvGsOxE1X/9OQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" -"@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.7.2": +"@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": version "1.8.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== @@ -2952,10 +2953,10 @@ "@sinonjs/commons" "^1" "@sinonjs/samsam" "^5.0.2" -"@sinonjs/samsam@^5.0.2", "@sinonjs/samsam@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.1.0.tgz#3afe719232b541bb6cf3411a4c399a188de21ec0" - integrity sha512-42nyaQOVunX5Pm6GRJobmzbS7iLI+fhERITnETXzzwDZh+TtDr/Au3yAvXVjFmZ4wEUaE4Y3NFZfKv0bV0cbtg== +"@sinonjs/samsam@^5.0.2", "@sinonjs/samsam@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.2.0.tgz#fcff83ab86f83b5498f4a967869c079408d9b5eb" + integrity sha512-CaIcyX5cDsjcW/ab7HposFWzV1kC++4HNsfnEdFJa7cP1QIuILAKV+BgfeqRXhcnSAc76r/Rh/O5C+300BwUIw== dependencies: "@sinonjs/commons" "^1.6.0" lodash.get "^4.4.2" @@ -2966,6 +2967,11 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@types/archiver@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/archiver/-/archiver-3.1.1.tgz#10cc1be44af8911e57484342c7b3b32a5f178a1a" @@ -3134,10 +3140,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.40": - version "10.17.40" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.40.tgz#8a50e47daff15fd4a89dc56f5221b3729e506be6" - integrity sha512-3hZT2z2/531A5pc8hYhn1gU5Qb1SIRSgMLQ6zuHA5xtt16lWAxUGprtr8lJuc9zNJMXEIIBWfSnzqBP/4mglpA== +"@types/node@^10.17.42": + version "10.17.42" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.42.tgz#90dd71b26fe4f4e2929df6b07e72ef2e9648a173" + integrity sha512-HElxYF7C/MSkuvlaHB2c+82zhXiuO49Cq056Dol8AQuTph7oJtduo2n6J8rFa+YhJyNgQ/Lm20ZaxqD0vxU0+Q== "@types/nodeunit@^0.0.31": version "0.0.31" @@ -3404,13 +3410,20 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= -agent-base@4, agent-base@^4.2.0, agent-base@^4.3.0: +agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== dependencies: es6-promisify "^5.0.0" +agent-base@6, agent-base@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4" + integrity sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg== + dependencies: + debug "4" + agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" @@ -3735,10 +3748,10 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -ast-types@0.x.x: - version "0.14.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" - integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== +ast-types@^0.13.2: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== dependencies: tslib "^2.0.1" @@ -5368,10 +5381,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835" - integrity sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ== +data-uri-to-buffer@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" + integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== data-urls@^1.1.0: version "1.1.0" @@ -5406,7 +5419,7 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -5552,14 +5565,14 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -degenerator@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-1.0.4.tgz#fcf490a37ece266464d9cc431ab98c5819ced095" - integrity sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU= +degenerator@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-2.2.0.tgz#49e98c11fa0293c5b26edfbb52f15729afcdb254" + integrity sha512-aiQcQowF01RxFI4ZLFMpzyotbQonhNpBao6dkI8JPk5a+hmSjR5ErHp2CQySmQe8os3VBqLCIh87nDBgZXvsmg== dependencies: - ast-types "0.x.x" - escodegen "1.x.x" - esprima "3.x.x" + ast-types "^0.13.2" + escodegen "^1.8.1" + esprima "^4.0.0" delay@4.4.0: version "4.4.0" @@ -6015,7 +6028,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@1.x.x, escodegen@^1.11.0, escodegen@^1.14.1: +escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== @@ -6160,11 +6173,6 @@ espree@^7.3.0: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.3.0" -esprima@3.x.x: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -6348,10 +6356,10 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-check@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.4.0.tgz#8142ad724103e378f3afefeeb165c5dd6a9b2949" - integrity sha512-28SiCkMSkCq5x3vOjCkwqsJRL3rUAdAvp9vjslDbCf25Ej1HaZBgRrgW1/a31m2LMlG9lM4jsTc7xy5xuCu8Jg== +fast-check@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.6.0.tgz#b4f69c781325ecdfadf6d23468e5dae2c46bfb46" + integrity sha512-Wpz0mMPGxvOtMBaEguu5Pw35uTVfJzAUqRYQksiHk6vHKBV2YNeKk9BzTuqVCYwUIl+NELyPBY2Mg96sYk2fhw== dependencies: pure-rand "^3.0.0" @@ -6486,10 +6494,10 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-uri-to-path@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +file-uri-to-path@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" + integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== filesize@^3.6.0: version "3.6.1" @@ -6744,7 +6752,7 @@ fsevents@^2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -ftp@~0.3.10: +ftp@^0.3.10: version "0.3.10" resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" integrity sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0= @@ -6841,17 +6849,17 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" -get-uri@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.4.tgz#d4937ab819e218d4cb5ae18e4f5962bef169cc6a" - integrity sha512-v7LT/s8kVjs+Tx0ykk1I+H/rbpzkHvuIq87LmeXptcf5sNWm9uQiwjNAt94SJPA1zOlCntmnOlJvVWKmzsxG8Q== +get-uri@3: + version "3.0.2" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-3.0.2.tgz#f0ef1356faabc70e1f9404fa3b66b2ba9bfc725c" + integrity sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg== dependencies: - data-uri-to-buffer "1" - debug "2" - extend "~3.0.2" - file-uri-to-path "1" - ftp "~0.3.10" - readable-stream "2" + "@tootallnate/once" "1" + data-uri-to-buffer "3" + debug "4" + file-uri-to-path "2" + fs-extra "^8.1.0" + ftp "^0.3.10" get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" @@ -7262,6 +7270,15 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" +http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-proxy-middleware@^0.19.1: version "0.19.2" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.2.tgz#ee73dcc8348165afefe8de2ff717751d181608ee" @@ -7295,6 +7312,14 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@5, https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" @@ -7303,14 +7328,6 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" -https-proxy-agent@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" - integrity sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -10266,30 +10283,29 @@ p-waterfall@^1.0.0: dependencies: p-reduce "^1.0.0" -pac-proxy-agent@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-3.0.1.tgz#115b1e58f92576cac2eba718593ca7b0e37de2ad" - integrity sha512-44DUg21G/liUZ48dJpUSjZnFfZro/0K5JTyFYLBcmh9+T6Ooi4/i4efwUiEy0+4oQusCBqWdhv16XohIj1GqnQ== +pac-proxy-agent@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-4.1.0.tgz#66883eeabadc915fc5e95457324cb0f0ac78defb" + integrity sha512-ejNgYm2HTXSIYX9eFlkvqFp8hyJ374uDf0Zq5YUAifiSh1D6fo+iBivQZirGvVv8dCYUsLhmLBRhlAYvBKI5+Q== dependencies: - agent-base "^4.2.0" - debug "^4.1.1" - get-uri "^2.0.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^3.0.0" - pac-resolver "^3.0.0" + "@tootallnate/once" "1" + agent-base "6" + debug "4" + get-uri "3" + http-proxy-agent "^4.0.1" + https-proxy-agent "5" + pac-resolver "^4.1.0" raw-body "^2.2.0" - socks-proxy-agent "^4.0.1" + socks-proxy-agent "5" -pac-resolver@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-3.0.0.tgz#6aea30787db0a891704deb7800a722a7615a6f26" - integrity sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA== +pac-resolver@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-4.1.0.tgz#4b12e7d096b255a3b84e53f6831f32e9c7e5fe95" + integrity sha512-d6lf2IrZJJ7ooVHr7BfwSjRO1yKSJMaiiWYSHcrxSIUtZrCa4KKGwcztdkZ/E9LFleJfjoi1yl+XLR7AX24nbQ== dependencies: - co "^4.6.0" - degenerator "^1.0.4" + degenerator "^2.2.0" ip "^1.1.5" netmask "^1.0.6" - thunkify "^2.1.2" package-hash@^3.0.0: version "3.0.0" @@ -10325,19 +10341,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.426: - version "2.0.0-nightly.426" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.426.tgz#9d5ae450adc1bc4174a5778c96042be342ab5657" - integrity sha512-hgEqIXAjG/ZQnImXxVqJeg1ZhlCfosrnUXSswRCG8XdNUs8oncumC3PbfvYWHNAGnX/h8y/7nU98u3hi9l1tFQ== - dependencies: - "@parcel/config-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/core" "2.0.0-nightly.426+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/events" "2.0.0-nightly.428+5f72d6bb" - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/package-manager" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" +parcel@2.0.0-nightly.429: + version "2.0.0-nightly.429" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.429.tgz#bf5419d35865685515f9e3b298b345d48f1b9421" + integrity sha512-C5vyjWrOneYMtE+kEoF9bYXfZn+1DbzzhyU0cXU8wbO9lYrJNnrNS97SXzd9AgeGd2IcXF8GOZtvDtSaglEG1w== + dependencies: + "@parcel/config-default" "2.0.0-nightly.431+296bc57f" + "@parcel/core" "2.0.0-nightly.429+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/events" "2.0.0-nightly.431+296bc57f" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/package-manager" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" @@ -11111,19 +11127,19 @@ protoduck@^5.0.1: dependencies: genfun "^5.0.0" -proxy-agent@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-3.1.1.tgz#7e04e06bf36afa624a1540be247b47c970bd3014" - integrity sha512-WudaR0eTsDx33O3EJE16PjBRZWcX8GqCEeERw1W3hZJgH/F2a46g7jty6UGty6NeJ4CKQy8ds2CJPMiyeqaTvw== +proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-4.0.0.tgz#a92976af3fbc7d846f2e850e2ac5ac6ca3fb74c7" + integrity sha512-8P0Y2SkwvKjiGU1IkEfYuTteioMIDFxPL4/j49zzt5Mz3pG1KO+mIrDG1qH0PQUHTTczjwGcYl+EzfXiFj5vUQ== dependencies: - agent-base "^4.2.0" + agent-base "^6.0.0" debug "4" - http-proxy-agent "^2.1.0" - https-proxy-agent "^3.0.0" + http-proxy-agent "^4.0.0" + https-proxy-agent "^5.0.0" lru-cache "^5.1.1" - pac-proxy-agent "^3.0.1" + pac-proxy-agent "^4.1.0" proxy-from-env "^1.0.0" - socks-proxy-agent "^4.0.1" + socks-proxy-agent "^5.0.0" proxy-from-env@^1.0.0: version "1.1.0" @@ -11397,7 +11413,7 @@ read@1, read@^1.0.4, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -11987,15 +12003,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon@^9.0.1, sinon@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.1.0.tgz#4afc90707c8e360fe051398eed2d3b197980ffc3" - integrity sha512-9zQShgaeylYH6qtsnNXlTvv0FGTTckuDfHBi+qhgj5PvW2r2WslHZpgc3uy3e/ZAoPkqaOASPi+juU6EdYRYxA== +sinon@^9.0.1, sinon@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.0.tgz#1d333967e30023609f7347351ebc0dc964c0f3c9" + integrity sha512-eSNXz1XMcGEMHw08NJXSyTHIu6qTCOiN8x9ODACmZpNQpr0aXTBXBnI4xTzQzR+TEpOmLiKowGf9flCuKIzsbw== dependencies: - "@sinonjs/commons" "^1.7.2" + "@sinonjs/commons" "^1.8.1" "@sinonjs/fake-timers" "^6.0.1" "@sinonjs/formatio" "^5.0.1" - "@sinonjs/samsam" "^5.1.0" + "@sinonjs/samsam" "^5.2.0" diff "^4.0.2" nise "^4.0.4" supports-color "^7.1.0" @@ -12082,7 +12098,16 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socks-proxy-agent@^4.0.0, socks-proxy-agent@^4.0.1: +socks-proxy-agent@5, socks-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" + integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== + dependencies: + agent-base "6" + debug "4" + socks "^2.3.3" + +socks-proxy-agent@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== @@ -12090,6 +12115,14 @@ socks-proxy-agent@^4.0.0, socks-proxy-agent@^4.0.1: agent-base "~4.2.1" socks "~2.3.2" +socks@^2.3.3: + version "2.4.4" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.4.4.tgz#f1a3382e7814ae28c97bb82a38bc1ac24b21cca2" + integrity sha512-7LmHN4IHj1Vpd/k8D872VGCHJ6yIVyeFkfIBExRmGPYQ/kdUkpdg9eKh9oOzYYYKQhuxavayJHTnmBG+EzluUA== + dependencies: + ip "^1.1.5" + smart-buffer "^4.1.0" + socks@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" @@ -12868,11 +12901,6 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -thunkify@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" - integrity sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0= - timers-browserify@^2.0.11: version "2.0.11" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f"