From 6b738cddc2bb56333326049d923fbdad11bf6404 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 24 Jan 2022 17:58:58 +0200 Subject: [PATCH 01/63] mid work --- .../cloudformation-diff/lib/diff/types.ts | 400 +++++++++++++++++- .../lib/iam/iam-changes.ts | 285 +------------ .../lib/network/security-group-changes.ts | 124 +----- .../lib/artifacts/asset-manifest-artifact.ts | 40 +- .../lib/artifacts/cloudformation-artifact.ts | 186 +------- .../nested-cloud-assembly-artifact.ts | 51 +-- .../lib/artifacts/tree-cloud-artifact.ts | 19 +- .../@aws-cdk/cx-api/lib/cloud-artifact.ts | 134 +----- .../@aws-cdk/cx-api/lib/cloud-assembly.ts | 400 +++++++++++++++++- packages/aws-cdk/bin/cdk.ts | 3 +- packages/aws-cdk/lib/command-api.ts | 4 +- packages/aws-cdk/lib/commands/context.ts | 4 +- packages/aws-cdk/lib/commands/docs.ts | 6 +- packages/aws-cdk/lib/commands/doctor.ts | 4 +- packages/aws-cdk/lib/init.ts | 3 +- packages/aws-cdk/lib/logging.ts | 19 +- packages/aws-cdk/package.json | 5 +- .../cdk-build-tools/config/eslintrc.js | 3 + 18 files changed, 838 insertions(+), 852 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts index 335783388275f..979fbd4c76a0b 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts @@ -1,7 +1,12 @@ import { AssertionError } from 'assert'; import * as cfnspec from '@aws-cdk/cfnspec'; -import { IamChanges } from '../iam/iam-changes'; -import { SecurityGroupChanges } from '../network/security-group-changes'; +import * as chalk from 'chalk'; +import { DiffableCollection } from '../diffable'; +import { ManagedPolicyAttachment, ManagedPolicyJson } from '../iam/managed-policy'; +import { parseLambdaPermission, parseStatements, Statement, StatementJson } from '../iam/statement'; +import { RuleJson, SecurityGroupRule } from '../network/security-group-rule'; +import { renderIntrinsics } from '../render-intrinsics'; +import { deepRemoveUndefined, dropIfEmpty, flatMap, makeComparator } from '../util'; import { deepEqual } from './util'; export type PropertyMap = {[key: string]: any }; @@ -659,3 +664,394 @@ function onlyChanges>(xs: {[key: string]: T}): {[key } return ret; } + +export interface IamChangesProps { + propertyChanges: PropertyChange[]; + resourceChanges: ResourceChange[]; +} + +/** + * Changes to IAM statements + */ +export class IamChanges { + public static IamPropertyScrutinies = [ + cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies, + cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy, + cfnspec.schema.PropertyScrutinyType.ManagedPolicies, + ]; + + public static IamResourceScrutinies = [ + cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource, + cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource, + cfnspec.schema.ResourceScrutinyType.LambdaPermission, + ]; + + public readonly statements = new DiffableCollection(); + public readonly managedPolicies = new DiffableCollection(); + + constructor(props: IamChangesProps) { + for (const propertyChange of props.propertyChanges) { + this.readPropertyChange(propertyChange); + } + for (const resourceChange of props.resourceChanges) { + this.readResourceChange(resourceChange); + } + + this.statements.calculateDiff(); + this.managedPolicies.calculateDiff(); + } + + public get hasChanges() { + return this.statements.hasChanges || this.managedPolicies.hasChanges; + } + + /** + * Return whether the changes include broadened permissions + * + * Permissions are broadened if positive statements are added or + * negative statements are removed, or if managed policies are added. + */ + public get permissionsBroadened(): boolean { + return this.statements.additions.some(s => !s.isNegativeStatement) + || this.statements.removals.some(s => s.isNegativeStatement) + || this.managedPolicies.hasAdditions; + } + + /** + * Return a summary table of changes + */ + public summarizeStatements(): string[][] { + const ret: string[][] = []; + + const header = ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']; + + // First generate all lines, then sort on Resource so that similar resources are together + for (const statement of this.statements.additions) { + const renderedStatement = statement.render(); + ret.push([ + '+', + renderedStatement.resource, + renderedStatement.effect, + renderedStatement.action, + renderedStatement.principal, + renderedStatement.condition, + ].map(s => chalk.green(s))); + } + for (const statement of this.statements.removals) { + const renderedStatement = statement.render(); + ret.push([ + chalk.red('-'), + renderedStatement.resource, + renderedStatement.effect, + renderedStatement.action, + renderedStatement.principal, + renderedStatement.condition, + ].map(s => chalk.red(s))); + } + + // Sort by 2nd column + ret.sort(makeComparator((row: string[]) => [row[1]])); + + ret.splice(0, 0, header); + + return ret; + } + + public summarizeManagedPolicies(): string[][] { + const ret: string[][] = []; + const header = ['', 'Resource', 'Managed Policy ARN']; + + for (const att of this.managedPolicies.additions) { + ret.push([ + '+', + att.identityArn, + att.managedPolicyArn, + ].map(s => chalk.green(s))); + } + for (const att of this.managedPolicies.removals) { + ret.push([ + '-', + att.identityArn, + att.managedPolicyArn, + ].map(s => chalk.red(s))); + } + + // Sort by 2nd column + ret.sort(makeComparator((row: string[]) => [row[1]])); + + ret.splice(0, 0, header); + + return ret; + } + + /** + * Return a machine-readable version of the changes. + * This is only used in tests. + * + * @internal + */ + public _toJson(): IamChangesJson { + return deepRemoveUndefined({ + statementAdditions: dropIfEmpty(this.statements.additions.map(s => s._toJson())), + statementRemovals: dropIfEmpty(this.statements.removals.map(s => s._toJson())), + managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map(s => s._toJson())), + managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map(s => s._toJson())), + }); + } + + private readPropertyChange(propertyChange: PropertyChange) { + switch (propertyChange.scrutinyType) { + case cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies: + // AWS::IAM::{ Role | User | Group }.Policies + this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + case cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy: + // Any PolicyDocument on a resource (including AssumeRolePolicyDocument) + this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + case cfnspec.schema.PropertyScrutinyType.ManagedPolicies: + // Just a list of managed policies + this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + } + } + + private readResourceChange(resourceChange: ResourceChange) { + switch (resourceChange.scrutinyType) { + case cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource: + // AWS::IAM::Policy + this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties)); + this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties)); + break; + case cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource: + // AWS::*::{Bucket,Queue,Topic}Policy + this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties)); + this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties)); + break; + case cfnspec.schema.ResourceScrutinyType.LambdaPermission: + this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties)); + this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties)); + break; + } + } + + /** + * Parse a list of policies on an identity + */ + private readIdentityPolicies(policies: any, logicalId: string): Statement[] { + if (policies === undefined) { return []; } + + const appliesToPrincipal = 'AWS:${' + logicalId + '}'; + + return flatMap(policies, (policy: any) => { + // check if the Policy itself is not an intrinsic, like an Fn::If + const unparsedStatement = policy.PolicyDocument?.Statement + ? policy.PolicyDocument.Statement + : policy; + return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement))); + }); + } + + /** + * Parse an IAM::Policy resource + */ + private readIdentityPolicyResource(properties: any): Statement[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []); + return flatMap(principals, (principal: string) => { + const ref = 'AWS:' + principal; + return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement)); + }); + } + + private readResourceStatements(policy: any, logicalId: string): Statement[] { + if (policy === undefined) { return []; } + + const appliesToResource = '${' + logicalId + '.Arn}'; + return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement))); + } + + /** + * Parse an AWS::*::{Bucket,Topic,Queue}policy + */ + private readResourcePolicyResource(properties: any): Statement[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + const policyKeys = Object.keys(properties).filter(key => key.indexOf('Policy') > -1); + + // Find the key that identifies the resource(s) this policy applies to + const resourceKeys = Object.keys(properties).filter(key => !policyKeys.includes(key) && !key.endsWith('Name')); + let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ['???']; + + // For some resources, this is a singleton string, for some it's an array + if (!Array.isArray(resources)) { + resources = [resources]; + } + + return flatMap(resources, (resource: string) => { + return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement)); + }); + } + + private readManagedPolicies(policyArns: any, logicalId: string): ManagedPolicyAttachment[] { + if (!policyArns) { return []; } + + const rep = '${' + logicalId + '}'; + return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns)); + } + + private readLambdaStatements(properties?: PropertyMap): Statement[] { + if (!properties) { return []; } + + return [parseLambdaPermission(renderIntrinsics(properties))]; + } +} + +/** + * Set an undefined or wildcarded principal on these statements + */ +function defaultPrincipal(principal: string, statements: Statement[]) { + statements.forEach(s => s.principals.replaceEmpty(principal)); + statements.forEach(s => s.principals.replaceStar(principal)); + return statements; +} + +/** + * Set an undefined or wildcarded resource on these statements + */ +function defaultResource(resource: string, statements: Statement[]) { + statements.forEach(s => s.resources.replaceEmpty(resource)); + statements.forEach(s => s.resources.replaceStar(resource)); + return statements; +} + +export interface IamChangesJson { + statementAdditions?: StatementJson[]; + statementRemovals?: StatementJson[]; + managedPolicyAdditions?: ManagedPolicyJson[]; + managedPolicyRemovals?: ManagedPolicyJson[]; +} + +export interface SecurityGroupChangesProps { + ingressRulePropertyChanges: PropertyChange[]; + ingressRuleResourceChanges: ResourceChange[]; + egressRuleResourceChanges: ResourceChange[]; + egressRulePropertyChanges: PropertyChange[]; +} + +/** + * Changes to IAM statements + */ +export class SecurityGroupChanges { + public readonly ingress = new DiffableCollection(); + public readonly egress = new DiffableCollection(); + + constructor(props: SecurityGroupChangesProps) { + // Group rules + for (const ingressProp of props.ingressRulePropertyChanges) { + this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId)); + this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId)); + } + for (const egressProp of props.egressRulePropertyChanges) { + this.egress.addOld(...this.readInlineRules(egressProp.oldValue, egressProp.resourceLogicalId)); + this.egress.addNew(...this.readInlineRules(egressProp.newValue, egressProp.resourceLogicalId)); + } + + // Rule resources + for (const ingressRes of props.ingressRuleResourceChanges) { + this.ingress.addOld(...this.readRuleResource(ingressRes.oldProperties)); + this.ingress.addNew(...this.readRuleResource(ingressRes.newProperties)); + } + for (const egressRes of props.egressRuleResourceChanges) { + this.egress.addOld(...this.readRuleResource(egressRes.oldProperties)); + this.egress.addNew(...this.readRuleResource(egressRes.newProperties)); + } + + this.ingress.calculateDiff(); + this.egress.calculateDiff(); + } + + public get hasChanges() { + return this.ingress.hasChanges || this.egress.hasChanges; + } + + /** + * Return a summary table of changes + */ + public summarize(): string[][] { + const ret: string[][] = []; + + const header = ['', 'Group', 'Dir', 'Protocol', 'Peer']; + + const inWord = 'In'; + const outWord = 'Out'; + + // Render a single rule to the table (curried function so we can map it across rules easily--thank you JavaScript!) + const renderRule = (plusMin: string, inOut: string) => (rule: SecurityGroupRule) => [ + plusMin, + rule.groupId, + inOut, + rule.describeProtocol(), + rule.describePeer(), + ].map(s => plusMin === '+' ? chalk.green(s) : chalk.red(s)); + + // First generate all lines, sort later + ret.push(...this.ingress.additions.map(renderRule('+', inWord))); + ret.push(...this.egress.additions.map(renderRule('+', outWord))); + ret.push(...this.ingress.removals.map(renderRule('-', inWord))); + ret.push(...this.egress.removals.map(renderRule('-', outWord))); + + // Sort by group name then ingress/egress (ingress first) + ret.sort(makeComparator((row: string[]) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1])); + + ret.splice(0, 0, header); + + return ret; + } + + public toJson(): SecurityGroupChangesJson { + return deepRemoveUndefined({ + ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map(s => s.toJson())), + ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map(s => s.toJson())), + egressRuleAdditions: dropIfEmpty(this.egress.additions.map(s => s.toJson())), + egressRuleRemovals: dropIfEmpty(this.egress.removals.map(s => s.toJson())), + }); + } + + public get rulesAdded(): boolean { + return this.ingress.hasAdditions + || this.egress.hasAdditions; + } + + private readInlineRules(rules: any, logicalId: string): SecurityGroupRule[] { + if (!rules) { return []; } + + // UnCloudFormation so the parser works in an easier domain + + const ref = '${' + logicalId + '.GroupId}'; + return rules.map((r: any) => new SecurityGroupRule(renderIntrinsics(r), ref)); + } + + private readRuleResource(resource: any): SecurityGroupRule[] { + if (!resource) { return []; } + + // UnCloudFormation so the parser works in an easier domain + + return [new SecurityGroupRule(renderIntrinsics(resource))]; + } +} + +export interface SecurityGroupChangesJson { + ingressRuleAdditions?: RuleJson[]; + ingressRuleRemovals?: RuleJson[]; + egressRuleAdditions?: RuleJson[]; + egressRuleRemovals?: RuleJson[]; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts index f1460ff48c027..503ccdb3863a0 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts @@ -1,283 +1,2 @@ -import * as cfnspec from '@aws-cdk/cfnspec'; -import * as chalk from 'chalk'; -import { PropertyChange, PropertyMap, ResourceChange } from '../diff/types'; -import { DiffableCollection } from '../diffable'; -import { renderIntrinsics } from '../render-intrinsics'; -import { deepRemoveUndefined, dropIfEmpty, flatMap, makeComparator } from '../util'; -import { ManagedPolicyAttachment, ManagedPolicyJson } from './managed-policy'; -import { parseLambdaPermission, parseStatements, Statement, StatementJson } from './statement'; - -export interface IamChangesProps { - propertyChanges: PropertyChange[]; - resourceChanges: ResourceChange[]; -} - -/** - * Changes to IAM statements - */ -export class IamChanges { - public static IamPropertyScrutinies = [ - cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies, - cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy, - cfnspec.schema.PropertyScrutinyType.ManagedPolicies, - ]; - - public static IamResourceScrutinies = [ - cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource, - cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource, - cfnspec.schema.ResourceScrutinyType.LambdaPermission, - ]; - - public readonly statements = new DiffableCollection(); - public readonly managedPolicies = new DiffableCollection(); - - constructor(props: IamChangesProps) { - for (const propertyChange of props.propertyChanges) { - this.readPropertyChange(propertyChange); - } - for (const resourceChange of props.resourceChanges) { - this.readResourceChange(resourceChange); - } - - this.statements.calculateDiff(); - this.managedPolicies.calculateDiff(); - } - - public get hasChanges() { - return this.statements.hasChanges || this.managedPolicies.hasChanges; - } - - /** - * Return whether the changes include broadened permissions - * - * Permissions are broadened if positive statements are added or - * negative statements are removed, or if managed policies are added. - */ - public get permissionsBroadened(): boolean { - return this.statements.additions.some(s => !s.isNegativeStatement) - || this.statements.removals.some(s => s.isNegativeStatement) - || this.managedPolicies.hasAdditions; - } - - /** - * Return a summary table of changes - */ - public summarizeStatements(): string[][] { - const ret: string[][] = []; - - const header = ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']; - - // First generate all lines, then sort on Resource so that similar resources are together - for (const statement of this.statements.additions) { - const renderedStatement = statement.render(); - ret.push([ - '+', - renderedStatement.resource, - renderedStatement.effect, - renderedStatement.action, - renderedStatement.principal, - renderedStatement.condition, - ].map(s => chalk.green(s))); - } - for (const statement of this.statements.removals) { - const renderedStatement = statement.render(); - ret.push([ - chalk.red('-'), - renderedStatement.resource, - renderedStatement.effect, - renderedStatement.action, - renderedStatement.principal, - renderedStatement.condition, - ].map(s => chalk.red(s))); - } - - // Sort by 2nd column - ret.sort(makeComparator((row: string[]) => [row[1]])); - - ret.splice(0, 0, header); - - return ret; - } - - public summarizeManagedPolicies(): string[][] { - const ret: string[][] = []; - const header = ['', 'Resource', 'Managed Policy ARN']; - - for (const att of this.managedPolicies.additions) { - ret.push([ - '+', - att.identityArn, - att.managedPolicyArn, - ].map(s => chalk.green(s))); - } - for (const att of this.managedPolicies.removals) { - ret.push([ - '-', - att.identityArn, - att.managedPolicyArn, - ].map(s => chalk.red(s))); - } - - // Sort by 2nd column - ret.sort(makeComparator((row: string[]) => [row[1]])); - - ret.splice(0, 0, header); - - return ret; - } - - /** - * Return a machine-readable version of the changes. - * This is only used in tests. - * - * @internal - */ - public _toJson(): IamChangesJson { - return deepRemoveUndefined({ - statementAdditions: dropIfEmpty(this.statements.additions.map(s => s._toJson())), - statementRemovals: dropIfEmpty(this.statements.removals.map(s => s._toJson())), - managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map(s => s._toJson())), - managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map(s => s._toJson())), - }); - } - - private readPropertyChange(propertyChange: PropertyChange) { - switch (propertyChange.scrutinyType) { - case cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies: - // AWS::IAM::{ Role | User | Group }.Policies - this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); - this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); - break; - case cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy: - // Any PolicyDocument on a resource (including AssumeRolePolicyDocument) - this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId)); - this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId)); - break; - case cfnspec.schema.PropertyScrutinyType.ManagedPolicies: - // Just a list of managed policies - this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); - this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); - break; - } - } - - private readResourceChange(resourceChange: ResourceChange) { - switch (resourceChange.scrutinyType) { - case cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource: - // AWS::IAM::Policy - this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties)); - this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties)); - break; - case cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource: - // AWS::*::{Bucket,Queue,Topic}Policy - this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties)); - this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties)); - break; - case cfnspec.schema.ResourceScrutinyType.LambdaPermission: - this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties)); - this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties)); - break; - } - } - - /** - * Parse a list of policies on an identity - */ - private readIdentityPolicies(policies: any, logicalId: string): Statement[] { - if (policies === undefined) { return []; } - - const appliesToPrincipal = 'AWS:${' + logicalId + '}'; - - return flatMap(policies, (policy: any) => { - // check if the Policy itself is not an intrinsic, like an Fn::If - const unparsedStatement = policy.PolicyDocument?.Statement - ? policy.PolicyDocument.Statement - : policy; - return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement))); - }); - } - - /** - * Parse an IAM::Policy resource - */ - private readIdentityPolicyResource(properties: any): Statement[] { - if (properties === undefined) { return []; } - - properties = renderIntrinsics(properties); - - const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []); - return flatMap(principals, (principal: string) => { - const ref = 'AWS:' + principal; - return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement)); - }); - } - - private readResourceStatements(policy: any, logicalId: string): Statement[] { - if (policy === undefined) { return []; } - - const appliesToResource = '${' + logicalId + '.Arn}'; - return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement))); - } - - /** - * Parse an AWS::*::{Bucket,Topic,Queue}policy - */ - private readResourcePolicyResource(properties: any): Statement[] { - if (properties === undefined) { return []; } - - properties = renderIntrinsics(properties); - - const policyKeys = Object.keys(properties).filter(key => key.indexOf('Policy') > -1); - - // Find the key that identifies the resource(s) this policy applies to - const resourceKeys = Object.keys(properties).filter(key => !policyKeys.includes(key) && !key.endsWith('Name')); - let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ['???']; - - // For some resources, this is a singleton string, for some it's an array - if (!Array.isArray(resources)) { - resources = [resources]; - } - - return flatMap(resources, (resource: string) => { - return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement)); - }); - } - - private readManagedPolicies(policyArns: any, logicalId: string): ManagedPolicyAttachment[] { - if (!policyArns) { return []; } - - const rep = '${' + logicalId + '}'; - return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns)); - } - - private readLambdaStatements(properties?: PropertyMap): Statement[] { - if (!properties) { return []; } - - return [parseLambdaPermission(renderIntrinsics(properties))]; - } -} - -/** - * Set an undefined or wildcarded principal on these statements - */ -function defaultPrincipal(principal: string, statements: Statement[]) { - statements.forEach(s => s.principals.replaceEmpty(principal)); - statements.forEach(s => s.principals.replaceStar(principal)); - return statements; -} - -/** - * Set an undefined or wildcarded resource on these statements - */ -function defaultResource(resource: string, statements: Statement[]) { - statements.forEach(s => s.resources.replaceEmpty(resource)); - statements.forEach(s => s.resources.replaceStar(resource)); - return statements; -} - -export interface IamChangesJson { - statementAdditions?: StatementJson[]; - statementRemovals?: StatementJson[]; - managedPolicyAdditions?: ManagedPolicyJson[]; - managedPolicyRemovals?: ManagedPolicyJson[]; -} +/* eslint-disable */ +export { IamChangesProps, IamChanges, IamChangesJson } from '../diff/types'; diff --git a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts index 02e2134f99cd4..c06d82ae01eb3 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts @@ -1,122 +1,2 @@ -import * as chalk from 'chalk'; -import { PropertyChange, ResourceChange } from '../diff/types'; -import { DiffableCollection } from '../diffable'; -import { renderIntrinsics } from '../render-intrinsics'; -import { deepRemoveUndefined, dropIfEmpty, makeComparator } from '../util'; -import { RuleJson, SecurityGroupRule } from './security-group-rule'; - -export interface SecurityGroupChangesProps { - ingressRulePropertyChanges: PropertyChange[]; - ingressRuleResourceChanges: ResourceChange[]; - egressRuleResourceChanges: ResourceChange[]; - egressRulePropertyChanges: PropertyChange[]; -} - -/** - * Changes to IAM statements - */ -export class SecurityGroupChanges { - public readonly ingress = new DiffableCollection(); - public readonly egress = new DiffableCollection(); - - constructor(props: SecurityGroupChangesProps) { - // Group rules - for (const ingressProp of props.ingressRulePropertyChanges) { - this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId)); - this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId)); - } - for (const egressProp of props.egressRulePropertyChanges) { - this.egress.addOld(...this.readInlineRules(egressProp.oldValue, egressProp.resourceLogicalId)); - this.egress.addNew(...this.readInlineRules(egressProp.newValue, egressProp.resourceLogicalId)); - } - - // Rule resources - for (const ingressRes of props.ingressRuleResourceChanges) { - this.ingress.addOld(...this.readRuleResource(ingressRes.oldProperties)); - this.ingress.addNew(...this.readRuleResource(ingressRes.newProperties)); - } - for (const egressRes of props.egressRuleResourceChanges) { - this.egress.addOld(...this.readRuleResource(egressRes.oldProperties)); - this.egress.addNew(...this.readRuleResource(egressRes.newProperties)); - } - - this.ingress.calculateDiff(); - this.egress.calculateDiff(); - } - - public get hasChanges() { - return this.ingress.hasChanges || this.egress.hasChanges; - } - - /** - * Return a summary table of changes - */ - public summarize(): string[][] { - const ret: string[][] = []; - - const header = ['', 'Group', 'Dir', 'Protocol', 'Peer']; - - const inWord = 'In'; - const outWord = 'Out'; - - // Render a single rule to the table (curried function so we can map it across rules easily--thank you JavaScript!) - const renderRule = (plusMin: string, inOut: string) => (rule: SecurityGroupRule) => [ - plusMin, - rule.groupId, - inOut, - rule.describeProtocol(), - rule.describePeer(), - ].map(s => plusMin === '+' ? chalk.green(s) : chalk.red(s)); - - // First generate all lines, sort later - ret.push(...this.ingress.additions.map(renderRule('+', inWord))); - ret.push(...this.egress.additions.map(renderRule('+', outWord))); - ret.push(...this.ingress.removals.map(renderRule('-', inWord))); - ret.push(...this.egress.removals.map(renderRule('-', outWord))); - - // Sort by group name then ingress/egress (ingress first) - ret.sort(makeComparator((row: string[]) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1])); - - ret.splice(0, 0, header); - - return ret; - } - - public toJson(): SecurityGroupChangesJson { - return deepRemoveUndefined({ - ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map(s => s.toJson())), - ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map(s => s.toJson())), - egressRuleAdditions: dropIfEmpty(this.egress.additions.map(s => s.toJson())), - egressRuleRemovals: dropIfEmpty(this.egress.removals.map(s => s.toJson())), - }); - } - - public get rulesAdded(): boolean { - return this.ingress.hasAdditions - || this.egress.hasAdditions; - } - - private readInlineRules(rules: any, logicalId: string): SecurityGroupRule[] { - if (!rules) { return []; } - - // UnCloudFormation so the parser works in an easier domain - - const ref = '${' + logicalId + '.GroupId}'; - return rules.map((r: any) => new SecurityGroupRule(renderIntrinsics(r), ref)); - } - - private readRuleResource(resource: any): SecurityGroupRule[] { - if (!resource) { return []; } - - // UnCloudFormation so the parser works in an easier domain - - return [new SecurityGroupRule(renderIntrinsics(resource))]; - } -} - -export interface SecurityGroupChangesJson { - ingressRuleAdditions?: RuleJson[]; - ingressRuleRemovals?: RuleJson[]; - egressRuleAdditions?: RuleJson[]; - egressRuleRemovals?: RuleJson[]; -} +/* eslint-disable */ +export { SecurityGroupChangesProps, SecurityGroupChanges, SecurityGroupChangesJson } from '../diff/types'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts index 3c8c102f2c5ab..be24b0f240756 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts @@ -1,38 +1,2 @@ -import * as path from 'path'; -import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { CloudArtifact } from '../cloud-artifact'; -import { CloudAssembly } from '../cloud-assembly'; - -/** - * Asset manifest is a description of a set of assets which need to be built and published - */ -export class AssetManifestArtifact extends CloudArtifact { - /** - * The file name of the asset manifest - */ - public readonly file: string; - - /** - * Version of bootstrap stack required to deploy this stack - */ - public readonly requiresBootstrapStackVersion: number; - - /** - * Name of SSM parameter with bootstrap stack version - * - * @default - Discover SSM parameter by reading stack - */ - public readonly bootstrapStackVersionSsmParameter?: string; - - constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { - super(assembly, name, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.AssetManifestProperties; - if (!properties.file) { - throw new Error('Invalid AssetManifestArtifact. Missing "file" property'); - } - this.file = path.resolve(this.assembly.directory, properties.file); - this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion ?? 1; - this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; - } -} +/* eslint-disable */ +export { AssetManifestArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts index 66fc309a2593c..0f285429ae30f 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts @@ -1,184 +1,2 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { CloudArtifact } from '../cloud-artifact'; -import { CloudAssembly } from '../cloud-assembly'; -import { Environment, EnvironmentUtils } from '../environment'; - -export class CloudFormationStackArtifact extends CloudArtifact { - /** - * The file name of the template. - */ - public readonly templateFile: string; - - /** - * The original name as defined in the CDK app. - */ - public readonly originalName: string; - - /** - * Any assets associated with this stack. - */ - public readonly assets: cxschema.AssetMetadataEntry[]; - - /** - * CloudFormation parameters to pass to the stack. - */ - public readonly parameters: { [id: string]: string }; - - /** - * CloudFormation tags to pass to the stack. - */ - public readonly tags: { [id: string]: string }; - - /** - * The physical name of this stack. - */ - public readonly stackName: string; - - /** - * A string that represents this stack. Should only be used in user interfaces. - * If the stackName and artifactId are the same, it will just return that. Otherwise, - * it will return something like " ()" - */ - public readonly displayName: string; - - /** - * The physical name of this stack. - * @deprecated renamed to `stackName` - */ - public readonly name: string; - - /** - * The environment into which to deploy this artifact. - */ - public readonly environment: Environment; - - /** - * The role that needs to be assumed to deploy the stack - * - * @default - No role is assumed (current credentials are used) - */ - public readonly assumeRoleArn?: string; - - /** - * External ID to use when assuming role for cloudformation deployments - * - * @default - No external ID - */ - readonly assumeRoleExternalId?: string; - - /** - * The role that is passed to CloudFormation to execute the change set - * - * @default - No role is passed (currently assumed role/credentials are used) - */ - public readonly cloudFormationExecutionRoleArn?: string; - - /** - * The role to use to look up values from the target AWS account - * - * @default - No role is assumed (current credentials are used) - */ - public readonly lookupRole?: cxschema.BootstrapRole; - - /** - * If the stack template has already been included in the asset manifest, its asset URL - * - * @default - Not uploaded yet, upload just before deploying - */ - public readonly stackTemplateAssetObjectUrl?: string; - - /** - * Version of bootstrap stack required to deploy this stack - * - * @default - No bootstrap stack required - */ - public readonly requiresBootstrapStackVersion?: number; - - /** - * Name of SSM parameter with bootstrap stack version - * - * @default - Discover SSM parameter by reading stack - */ - public readonly bootstrapStackVersionSsmParameter?: string; - - /** - * Whether termination protection is enabled for this stack. - */ - public readonly terminationProtection?: boolean; - - /** - * Whether this stack should be validated by the CLI after synthesis - * - * @default - false - */ - public readonly validateOnSynth?: boolean; - - private _template: any | undefined; - - constructor(assembly: CloudAssembly, artifactId: string, artifact: cxschema.ArtifactManifest) { - super(assembly, artifactId, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.AwsCloudFormationStackProperties; - if (!properties.templateFile) { - throw new Error('Invalid CloudFormation stack artifact. Missing "templateFile" property in cloud assembly manifest'); - } - if (!artifact.environment) { - throw new Error('Invalid CloudFormation stack artifact. Missing environment'); - } - this.environment = EnvironmentUtils.parse(artifact.environment); - this.templateFile = properties.templateFile; - this.parameters = properties.parameters ?? {}; - - // We get the tags from 'properties' if available (cloud assembly format >= 6.0.0), otherwise - // from the stack metadata - this.tags = properties.tags ?? this.tagsFromMetadata(); - this.assumeRoleArn = properties.assumeRoleArn; - this.assumeRoleExternalId = properties.assumeRoleExternalId; - this.cloudFormationExecutionRoleArn = properties.cloudFormationExecutionRoleArn; - this.stackTemplateAssetObjectUrl = properties.stackTemplateAssetObjectUrl; - this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion; - this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; - this.terminationProtection = properties.terminationProtection; - this.validateOnSynth = properties.validateOnSynth; - this.lookupRole = properties.lookupRole; - - this.stackName = properties.stackName || artifactId; - this.assets = this.findMetadataByType(cxschema.ArtifactMetadataEntryType.ASSET).map(e => e.data as cxschema.AssetMetadataEntry); - - this.displayName = this.stackName === artifactId - ? this.stackName - : `${artifactId} (${this.stackName})`; - - this.name = this.stackName; // backwards compat - this.originalName = this.stackName; - } - - /** - * Full path to the template file - */ - public get templateFullPath() { - return path.join(this.assembly.directory, this.templateFile); - } - - /** - * The CloudFormation template for this stack. - */ - public get template(): any { - if (this._template === undefined) { - this._template = JSON.parse(fs.readFileSync(this.templateFullPath, 'utf-8')); - } - return this._template; - } - - private tagsFromMetadata() { - const ret: Record = {}; - for (const metadataEntry of this.findMetadataByType(cxschema.ArtifactMetadataEntryType.STACK_TAGS)) { - for (const tag of (metadataEntry.data ?? []) as cxschema.StackTagsMetadataEntry) { - ret[tag.key] = tag.value; - } - } - return ret; - } -} +/* eslint-disable */ +export { CloudFormationStackArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts index 3aa57577851b0..a54ffc0cdd13c 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts @@ -1,49 +1,2 @@ -import * as path from 'path'; -import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { CloudArtifact } from '../cloud-artifact'; -import { CloudAssembly } from '../cloud-assembly'; - -/** - * Asset manifest is a description of a set of assets which need to be built and published - */ -export class NestedCloudAssemblyArtifact extends CloudArtifact { - /** - * The relative directory name of the asset manifest - */ - public readonly directoryName: string; - - /** - * Display name - */ - public readonly displayName: string; - - /** - * Cache for the inner assembly loading - */ - private _nestedAssembly?: CloudAssembly; - - constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { - super(assembly, name, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.NestedCloudAssemblyProperties; - this.directoryName = properties.directoryName; - this.displayName = properties.displayName ?? name; - } - - /** - * Full path to the nested assembly directory - */ - public get fullPath(): string { - return path.join(this.assembly.directory, this.directoryName); - } - - /** - * The nested Assembly - */ - public get nestedAssembly(): CloudAssembly { - if (!this._nestedAssembly) { - this._nestedAssembly = new CloudAssembly(this.fullPath); - } - return this._nestedAssembly; - } -} +/* eslint-disable */ +export { NestedCloudAssemblyArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts index 689f3468ca252..dea42f307e4ee 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts @@ -1,17 +1,2 @@ -import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { CloudArtifact } from '../cloud-artifact'; -import { CloudAssembly } from '../cloud-assembly'; - -export class TreeCloudArtifact extends CloudArtifact { - public readonly file: string; - - constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { - super(assembly, name, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.TreeArtifactProperties; - if (!properties.file) { - throw new Error('Invalid TreeCloudArtifact. Missing "file" property'); - } - this.file = properties.file; - } -} \ No newline at end of file +/* eslint-disable */ +export { TreeCloudArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts index 7f4e5a899983a..947aaebcf8a9a 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts @@ -1,7 +1,3 @@ -import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { CloudAssembly } from './cloud-assembly'; -import { MetadataEntryResult, SynthesisMessage, SynthesisMessageLevel } from './metadata'; - /** * Artifact properties for CloudFormation stacks. */ @@ -30,131 +26,5 @@ export interface AwsCloudFormationStackProperties { readonly terminationProtection?: boolean; } -/** - * Represents an artifact within a cloud assembly. - */ -export class CloudArtifact { - /** - * Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest. - * @param assembly The cloud assembly from which to load the artifact - * @param id The artifact ID - * @param artifact The artifact manifest - * @returns the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module. - */ - public static fromManifest(assembly: CloudAssembly, id: string, artifact: cxschema.ArtifactManifest): CloudArtifact | undefined { - switch (artifact.type) { - case cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK: - return new CloudFormationStackArtifact(assembly, id, artifact); - case cxschema.ArtifactType.CDK_TREE: - return new TreeCloudArtifact(assembly, id, artifact); - case cxschema.ArtifactType.ASSET_MANIFEST: - return new AssetManifestArtifact(assembly, id, artifact); - case cxschema.ArtifactType.NESTED_CLOUD_ASSEMBLY: - return new NestedCloudAssemblyArtifact(assembly, id, artifact); - default: - return undefined; - } - } - - /** - * The artifact's manifest - */ - public readonly manifest: cxschema.ArtifactManifest; - - /** - * The set of messages extracted from the artifact's metadata. - */ - public readonly messages: SynthesisMessage[]; - - /** - * IDs of all dependencies. Used when topologically sorting the artifacts within the cloud assembly. - * @internal - */ - public readonly _dependencyIDs: string[]; - - /** - * Cache of resolved dependencies. - */ - private _deps?: CloudArtifact[]; - - protected constructor(public readonly assembly: CloudAssembly, public readonly id: string, manifest: cxschema.ArtifactManifest) { - this.manifest = manifest; - this.messages = this.renderMessages(); - this._dependencyIDs = manifest.dependencies || []; - } - - /** - * Returns all the artifacts that this artifact depends on. - */ - public get dependencies(): CloudArtifact[] { - if (this._deps) { return this._deps; } - - this._deps = this._dependencyIDs.map(id => { - const dep = this.assembly.tryGetArtifact(id); - if (!dep) { - throw new Error(`Artifact ${this.id} depends on non-existing artifact ${id}`); - } - return dep; - }); - - return this._deps; - } - - /** - * @returns all the metadata entries of a specific type in this artifact. - * @param type - */ - public findMetadataByType(type: string): MetadataEntryResult[] { - const result = new Array(); - for (const path of Object.keys(this.manifest.metadata || {})) { - for (const entry of (this.manifest.metadata || {})[path]) { - if (entry.type === type) { - result.push({ path, ...entry }); - } - } - } - return result; - } - - private renderMessages() { - const messages = new Array(); - - for (const [id, metadata] of Object.entries(this.manifest.metadata || { })) { - for (const entry of metadata) { - let level: SynthesisMessageLevel; - switch (entry.type) { - case cxschema.ArtifactMetadataEntryType.WARN: - level = SynthesisMessageLevel.WARNING; - break; - case cxschema.ArtifactMetadataEntryType.ERROR: - level = SynthesisMessageLevel.ERROR; - break; - case cxschema.ArtifactMetadataEntryType.INFO: - level = SynthesisMessageLevel.INFO; - break; - default: - continue; - } - - messages.push({ level, entry, id }); - } - } - - return messages; - } - - /** - * An identifier that shows where this artifact is located in the tree - * of nested assemblies, based on their manifests. Defaults to the normal - * id. Should only be used in user interfaces. - */ - public get hierarchicalId(): string { - return this.manifest.displayName ?? this.id; - } -} - -// needs to be defined at the end to avoid a cyclic dependency -import { AssetManifestArtifact } from './artifacts/asset-manifest-artifact'; -import { CloudFormationStackArtifact } from './artifacts/cloudformation-artifact'; -import { NestedCloudAssemblyArtifact } from './artifacts/nested-cloud-assembly-artifact'; -import { TreeCloudArtifact } from './artifacts/tree-cloud-artifact'; \ No newline at end of file +/* eslint-disable */ +export { CloudArtifact } from './cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts index 400981cea7054..92ecefe1daa42 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts @@ -2,10 +2,8 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { CloudFormationStackArtifact } from './artifacts/cloudformation-artifact'; -import { NestedCloudAssemblyArtifact } from './artifacts/nested-cloud-assembly-artifact'; -import { TreeCloudArtifact } from './artifacts/tree-cloud-artifact'; -import { CloudArtifact } from './cloud-artifact'; +import { Environment, EnvironmentUtils } from './environment'; +import { MetadataEntryResult, SynthesisMessage, SynthesisMessageLevel } from './metadata'; import { topologicalSort } from './toposort'; /** @@ -464,4 +462,398 @@ function ensureDirSync(dir: string) { } else { fs.mkdirSync(dir, { recursive: true }); } +} + +/** + * Represents an artifact within a cloud assembly. + */ +export class CloudArtifact { + /** + * Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest. + * @param assembly The cloud assembly from which to load the artifact + * @param id The artifact ID + * @param artifact The artifact manifest + * @returns the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module. + */ + public static fromManifest(assembly: CloudAssembly, id: string, artifact: cxschema.ArtifactManifest): CloudArtifact | undefined { + switch (artifact.type) { + case cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK: + return new CloudFormationStackArtifact(assembly, id, artifact); + case cxschema.ArtifactType.CDK_TREE: + return new TreeCloudArtifact(assembly, id, artifact); + case cxschema.ArtifactType.ASSET_MANIFEST: + return new AssetManifestArtifact(assembly, id, artifact); + case cxschema.ArtifactType.NESTED_CLOUD_ASSEMBLY: + return new NestedCloudAssemblyArtifact(assembly, id, artifact); + default: + return undefined; + } + } + + /** + * The artifact's manifest + */ + public readonly manifest: cxschema.ArtifactManifest; + + /** + * The set of messages extracted from the artifact's metadata. + */ + public readonly messages: SynthesisMessage[]; + + /** + * IDs of all dependencies. Used when topologically sorting the artifacts within the cloud assembly. + * @internal + */ + public readonly _dependencyIDs: string[]; + + /** + * Cache of resolved dependencies. + */ + private _deps?: CloudArtifact[]; + + protected constructor(public readonly assembly: CloudAssembly, public readonly id: string, manifest: cxschema.ArtifactManifest) { + this.manifest = manifest; + this.messages = this.renderMessages(); + this._dependencyIDs = manifest.dependencies || []; + } + + /** + * Returns all the artifacts that this artifact depends on. + */ + public get dependencies(): CloudArtifact[] { + if (this._deps) { return this._deps; } + + this._deps = this._dependencyIDs.map(id => { + const dep = this.assembly.tryGetArtifact(id); + if (!dep) { + throw new Error(`Artifact ${this.id} depends on non-existing artifact ${id}`); + } + return dep; + }); + + return this._deps; + } + + /** + * @returns all the metadata entries of a specific type in this artifact. + * @param type + */ + public findMetadataByType(type: string): MetadataEntryResult[] { + const result = new Array(); + for (const p of Object.keys(this.manifest.metadata || {})) { + for (const entry of (this.manifest.metadata || {})[p]) { + if (entry.type === type) { + result.push({ path: p, ...entry }); + } + } + } + return result; + } + + private renderMessages() { + const messages = new Array(); + + for (const [id, metadata] of Object.entries(this.manifest.metadata || { })) { + for (const entry of metadata) { + let level: SynthesisMessageLevel; + switch (entry.type) { + case cxschema.ArtifactMetadataEntryType.WARN: + level = SynthesisMessageLevel.WARNING; + break; + case cxschema.ArtifactMetadataEntryType.ERROR: + level = SynthesisMessageLevel.ERROR; + break; + case cxschema.ArtifactMetadataEntryType.INFO: + level = SynthesisMessageLevel.INFO; + break; + default: + continue; + } + + messages.push({ level, entry, id }); + } + } + + return messages; + } + + /** + * An identifier that shows where this artifact is located in the tree + * of nested assemblies, based on their manifests. Defaults to the normal + * id. Should only be used in user interfaces. + */ + public get hierarchicalId(): string { + return this.manifest.displayName ?? this.id; + } +} + +/** + * Asset manifest is a description of a set of assets which need to be built and published + */ +export class AssetManifestArtifact extends CloudArtifact { + /** + * The file name of the asset manifest + */ + public readonly file: string; + + /** + * Version of bootstrap stack required to deploy this stack + */ + public readonly requiresBootstrapStackVersion: number; + + /** + * Name of SSM parameter with bootstrap stack version + * + * @default - Discover SSM parameter by reading stack + */ + public readonly bootstrapStackVersionSsmParameter?: string; + + constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { + super(assembly, name, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.AssetManifestProperties; + if (!properties.file) { + throw new Error('Invalid AssetManifestArtifact. Missing "file" property'); + } + this.file = path.resolve(this.assembly.directory, properties.file); + this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion ?? 1; + this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; + } +} + +export class CloudFormationStackArtifact extends CloudArtifact { + /** + * The file name of the template. + */ + public readonly templateFile: string; + + /** + * The original name as defined in the CDK app. + */ + public readonly originalName: string; + + /** + * Any assets associated with this stack. + */ + public readonly assets: cxschema.AssetMetadataEntry[]; + + /** + * CloudFormation parameters to pass to the stack. + */ + public readonly parameters: { [id: string]: string }; + + /** + * CloudFormation tags to pass to the stack. + */ + public readonly tags: { [id: string]: string }; + + /** + * The physical name of this stack. + */ + public readonly stackName: string; + + /** + * A string that represents this stack. Should only be used in user interfaces. + * If the stackName and artifactId are the same, it will just return that. Otherwise, + * it will return something like " ()" + */ + public readonly displayName: string; + + /** + * The physical name of this stack. + * @deprecated renamed to `stackName` + */ + public readonly name: string; + + /** + * The environment into which to deploy this artifact. + */ + public readonly environment: Environment; + + /** + * The role that needs to be assumed to deploy the stack + * + * @default - No role is assumed (current credentials are used) + */ + public readonly assumeRoleArn?: string; + + /** + * External ID to use when assuming role for cloudformation deployments + * + * @default - No external ID + */ + readonly assumeRoleExternalId?: string; + + /** + * The role that is passed to CloudFormation to execute the change set + * + * @default - No role is passed (currently assumed role/credentials are used) + */ + public readonly cloudFormationExecutionRoleArn?: string; + + /** + * The role to use to look up values from the target AWS account + * + * @default - No role is assumed (current credentials are used) + */ + public readonly lookupRole?: cxschema.BootstrapRole; + + /** + * If the stack template has already been included in the asset manifest, its asset URL + * + * @default - Not uploaded yet, upload just before deploying + */ + public readonly stackTemplateAssetObjectUrl?: string; + + /** + * Version of bootstrap stack required to deploy this stack + * + * @default - No bootstrap stack required + */ + public readonly requiresBootstrapStackVersion?: number; + + /** + * Name of SSM parameter with bootstrap stack version + * + * @default - Discover SSM parameter by reading stack + */ + public readonly bootstrapStackVersionSsmParameter?: string; + + /** + * Whether termination protection is enabled for this stack. + */ + public readonly terminationProtection?: boolean; + + /** + * Whether this stack should be validated by the CLI after synthesis + * + * @default - false + */ + public readonly validateOnSynth?: boolean; + + private _template: any | undefined; + + constructor(assembly: CloudAssembly, artifactId: string, artifact: cxschema.ArtifactManifest) { + super(assembly, artifactId, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.AwsCloudFormationStackProperties; + if (!properties.templateFile) { + throw new Error('Invalid CloudFormation stack artifact. Missing "templateFile" property in cloud assembly manifest'); + } + if (!artifact.environment) { + throw new Error('Invalid CloudFormation stack artifact. Missing environment'); + } + this.environment = EnvironmentUtils.parse(artifact.environment); + this.templateFile = properties.templateFile; + this.parameters = properties.parameters ?? {}; + + // We get the tags from 'properties' if available (cloud assembly format >= 6.0.0), otherwise + // from the stack metadata + this.tags = properties.tags ?? this.tagsFromMetadata(); + this.assumeRoleArn = properties.assumeRoleArn; + this.assumeRoleExternalId = properties.assumeRoleExternalId; + this.cloudFormationExecutionRoleArn = properties.cloudFormationExecutionRoleArn; + this.stackTemplateAssetObjectUrl = properties.stackTemplateAssetObjectUrl; + this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion; + this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; + this.terminationProtection = properties.terminationProtection; + this.validateOnSynth = properties.validateOnSynth; + this.lookupRole = properties.lookupRole; + + this.stackName = properties.stackName || artifactId; + this.assets = this.findMetadataByType(cxschema.ArtifactMetadataEntryType.ASSET).map(e => e.data as cxschema.AssetMetadataEntry); + + this.displayName = this.stackName === artifactId + ? this.stackName + : `${artifactId} (${this.stackName})`; + + this.name = this.stackName; // backwards compat + this.originalName = this.stackName; + } + + /** + * Full path to the template file + */ + public get templateFullPath() { + return path.join(this.assembly.directory, this.templateFile); + } + + /** + * The CloudFormation template for this stack. + */ + public get template(): any { + if (this._template === undefined) { + this._template = JSON.parse(fs.readFileSync(this.templateFullPath, 'utf-8')); + } + return this._template; + } + + private tagsFromMetadata() { + const ret: Record = {}; + for (const metadataEntry of this.findMetadataByType(cxschema.ArtifactMetadataEntryType.STACK_TAGS)) { + for (const tag of (metadataEntry.data ?? []) as cxschema.StackTagsMetadataEntry) { + ret[tag.key] = tag.value; + } + } + return ret; + } +} + +/** + * Asset manifest is a description of a set of assets which need to be built and published + */ +export class NestedCloudAssemblyArtifact extends CloudArtifact { + /** + * The relative directory name of the asset manifest + */ + public readonly directoryName: string; + + /** + * Display name + */ + public readonly displayName: string; + + /** + * Cache for the inner assembly loading + */ + private _nestedAssembly?: CloudAssembly; + + constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { + super(assembly, name, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.NestedCloudAssemblyProperties; + this.directoryName = properties.directoryName; + this.displayName = properties.displayName ?? name; + } + + /** + * Full path to the nested assembly directory + */ + public get fullPath(): string { + return path.join(this.assembly.directory, this.directoryName); + } + + /** + * The nested Assembly + */ + public get nestedAssembly(): CloudAssembly { + if (!this._nestedAssembly) { + this._nestedAssembly = new CloudAssembly(this.fullPath); + } + return this._nestedAssembly; + } +} + +export class TreeCloudArtifact extends CloudArtifact { + public readonly file: string; + + constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { + super(assembly, name, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.TreeArtifactProperties; + if (!properties.file) { + throw new Error('Invalid TreeCloudArtifact. Missing "file" property'); + } + this.file = properties.file; + } } \ No newline at end of file diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 5b82a72eab5d2..3bb9f03776af1 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -3,7 +3,6 @@ import 'source-map-support/register'; import * as cxapi from '@aws-cdk/cx-api'; import '@jsii/check-node/run'; import * as chalk from 'chalk'; -import * as yargs from 'yargs'; import { SdkProvider } from '../lib/api/aws-auth'; import { BootstrapSource, Bootstrapper } from '../lib/api/bootstrap'; @@ -21,6 +20,8 @@ import { PluginHost } from '../lib/plugin'; import { serializeStructure } from '../lib/serialize'; import { Command, Configuration, Settings } from '../lib/settings'; import * as version from '../lib/version'; +// eslint-disable-next-line @typescript-eslint/no-require-imports +const yargs = require('yargs'); /* eslint-disable max-len */ /* eslint-disable @typescript-eslint/no-shadow */ // yargs diff --git a/packages/aws-cdk/lib/command-api.ts b/packages/aws-cdk/lib/command-api.ts index 70fce3d2a0deb..00de1abb68005 100644 --- a/packages/aws-cdk/lib/command-api.ts +++ b/packages/aws-cdk/lib/command-api.ts @@ -1,4 +1,4 @@ -import * as yargs from 'yargs'; +import type { Arguments } from 'yargs'; import { SdkProvider } from './api/aws-auth'; import { Configuration } from './settings'; @@ -15,7 +15,7 @@ import { Configuration } from './settings'; * The parts of the world that our command functions have access to */ export interface CommandOptions { - args: yargs.Arguments; + args: Arguments; configuration: Configuration; aws: SdkProvider; } diff --git a/packages/aws-cdk/lib/commands/context.ts b/packages/aws-cdk/lib/commands/context.ts index dae9f70889f5f..55f981e6abd28 100644 --- a/packages/aws-cdk/lib/commands/context.ts +++ b/packages/aws-cdk/lib/commands/context.ts @@ -1,5 +1,5 @@ import * as chalk from 'chalk'; -import * as yargs from 'yargs'; +import type { Arguments } from 'yargs'; import * as version from '../../lib/version'; import { CommandOptions } from '../command-api'; import { print } from '../logging'; @@ -21,7 +21,7 @@ export const builder = { }, }; -export function handler(args: yargs.Arguments) { +export function handler(args: Arguments) { args.commandHandler = realHandler; } diff --git a/packages/aws-cdk/lib/commands/docs.ts b/packages/aws-cdk/lib/commands/docs.ts index ce636f7b406fe..63069d6e989b7 100644 --- a/packages/aws-cdk/lib/commands/docs.ts +++ b/packages/aws-cdk/lib/commands/docs.ts @@ -1,7 +1,7 @@ import * as childProcess from 'child_process'; import * as process from 'process'; import * as chalk from 'chalk'; -import * as yargs from 'yargs'; +import type { Arguments as YArguments } from 'yargs'; import { debug, print, warning } from '../../lib/logging'; import { CommandOptions } from '../command-api'; @@ -23,11 +23,11 @@ export const builder = { }, }; -export interface Arguments extends yargs.Arguments { +export interface Arguments extends YArguments { browser: string } -export function handler(args: yargs.Arguments) { +export function handler(args: YArguments) { args.commandHandler = realHandler; } diff --git a/packages/aws-cdk/lib/commands/doctor.ts b/packages/aws-cdk/lib/commands/doctor.ts index 768d460931bbf..7174a86c72c1c 100644 --- a/packages/aws-cdk/lib/commands/doctor.ts +++ b/packages/aws-cdk/lib/commands/doctor.ts @@ -1,7 +1,7 @@ import * as process from 'process'; import * as cxapi from '@aws-cdk/cx-api'; import * as chalk from 'chalk'; -import * as yargs from 'yargs'; +import type { Arguments } from 'yargs'; import { print } from '../../lib/logging'; import * as version from '../../lib/version'; import { CommandOptions } from '../command-api'; @@ -10,7 +10,7 @@ export const command = 'doctor'; export const describe = 'Check your set-up for potential problems'; export const builder = {}; -export function handler(args: yargs.Arguments) { +export function handler(args: Arguments) { args.commandHandler = realHandler; } diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index c0770ea49e94e..28dd52f3a6bef 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -211,8 +211,9 @@ function versionedTemplatesDir(): Promise { if (currentVersion === '0.0.0') { currentVersion = '1.0.0'; } + const root = path.dirname(require.resolve('../package.json')); const majorVersion = semver.major(currentVersion); - resolve(path.join(__dirname, 'init-templates', `v${majorVersion}`)); + resolve(path.join(root, 'lib', 'init-templates', `v${majorVersion}`)); }); } diff --git a/packages/aws-cdk/lib/logging.ts b/packages/aws-cdk/lib/logging.ts index 68d57b6b49a18..83ef64ab6d98c 100644 --- a/packages/aws-cdk/lib/logging.ts +++ b/packages/aws-cdk/lib/logging.ts @@ -13,6 +13,16 @@ const logger = (stream: Writable, styles?: StyleFn[]) => (fmt: string, ...args: stream.write(str + '\n'); }; +export const enum LogLevel { + /** Not verbose at all */ + DEFAULT = 0, + /** Pretty verbose */ + DEBUG = 1, + /** Extremely verbose */ + TRACE = 2 +} + + export let logLevel = LogLevel.DEFAULT; export function setLogLevel(newLogLevel: LogLevel) { @@ -47,12 +57,3 @@ export type LoggerFunction = (fmt: string, ...args: any[]) => void; export function prefix(prefixString: string, fn: LoggerFunction): LoggerFunction { return (fmt: string, ...args: any[]) => fn(`%s ${fmt}`, prefixString, ...args); } - -export const enum LogLevel { - /** Not verbose at all */ - DEFAULT = 0, - /** Pretty verbose */ - DEBUG = 1, - /** Extremely verbose */ - TRACE = 2 -} diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e2404ac8515a8..bb6127bb573b6 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -14,6 +14,8 @@ "pkglint": "pkglint -f", "test": "cdk-test", "integ": "jest --testMatch '**/?(*.)+(integ-test).js'", + "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin", + "bundle:test": "./bin/cdk --help", "package": "cdk-package", "build+test+package": "yarn build+test && yarn package", "build+test": "yarn build && yarn test", @@ -64,7 +66,8 @@ "sinon": "^9.2.4", "ts-jest": "^27.1.3", "ts-mock-imports": "^1.3.8", - "xml-js": "^1.6.11" + "xml-js": "^1.6.11", + "esbuild": "^0.14.11" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", diff --git a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js index c10afb06ac5bc..cefa818076ca2 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js +++ b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js @@ -64,6 +64,9 @@ module.exports = { 'space-before-blocks': 'error', // require space before blocks 'curly': ['error', 'multi-line', 'consistent'], // require curly braces for multiline control statements + // TODO this currently breaks @aws-cdk/core in a severe way + // 'import/no-cycle': ['error'], + // Require all imported dependencies are actually declared in package.json 'import/no-extraneous-dependencies': [ 'error', From 476d1f0d9bdc3908e50e70d16618ea9358d6cd87 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 24 Jan 2022 18:00:36 +0200 Subject: [PATCH 02/63] link to issues --- packages/aws-cdk/bin/cdk.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 3bb9f03776af1..2c69a56cdc879 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -20,6 +20,8 @@ import { PluginHost } from '../lib/plugin'; import { serializeStructure } from '../lib/serialize'; import { Command, Configuration, Settings } from '../lib/settings'; import * as version from '../lib/version'; +// https://github.com/yargs/yargs/issues/1929 +// https://github.com/evanw/esbuild/issues/1492 // eslint-disable-next-line @typescript-eslint/no-require-imports const yargs = require('yargs'); From 8e7abd618642352a9b0f29a5a25d9d2f2bf44c44 Mon Sep 17 00:00:00 2001 From: epolon Date: Tue, 25 Jan 2022 16:04:19 +0200 Subject: [PATCH 03/63] mid work --- .../cloudformation-diff/lib/format-table.ts | 2 +- .../cloudformation-diff/lib/iam/statement.ts | 2 +- packages/aws-cdk/bin/bootstrap-template.yaml | 528 ++++++++++++++++++ packages/aws-cdk/bin/cdk.ts | 16 +- .../aws-cdk/lib/api/cxapp/cloud-assembly.ts | 2 +- .../aws-cdk/lib/api/cxapp/environments.ts | 2 +- .../lib/api/hotswap/lambda-functions.ts | 2 +- packages/aws-cdk/lib/api/util/display.ts | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/lib/private/archive.ts | 2 +- 10 files changed, 544 insertions(+), 16 deletions(-) create mode 100644 packages/aws-cdk/bin/bootstrap-template.yaml diff --git a/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts b/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts index 193223725c9f2..7e7afb98cfa53 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts @@ -1,5 +1,5 @@ import * as chalk from 'chalk'; -import * as stringWidth from 'string-width'; +import stringWidth from 'string-width'; import * as table from 'table'; /** diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts index ea89ad4e597ee..7f00053b4ba16 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts @@ -1,4 +1,4 @@ -import * as deepEqual from 'fast-deep-equal'; +import deepEqual from 'fast-deep-equal'; import { deepRemoveUndefined } from '../util'; export class Statement { diff --git a/packages/aws-cdk/bin/bootstrap-template.yaml b/packages/aws-cdk/bin/bootstrap-template.yaml new file mode 100644 index 0000000000000..b7871900b3a46 --- /dev/null +++ b/packages/aws-cdk/bin/bootstrap-template.yaml @@ -0,0 +1,528 @@ +Description: This stack includes resources needed to deploy AWS CDK apps into this + environment +Parameters: + TrustedAccounts: + Description: List of AWS accounts that are trusted to publish assets and deploy + stacks to this environment + Default: '' + Type: CommaDelimitedList + TrustedAccountsForLookup: + Description: List of AWS accounts that are trusted to look up values in this + environment + Default: '' + Type: CommaDelimitedList + CloudFormationExecutionPolicies: + Description: List of the ManagedPolicy ARN(s) to attach to the CloudFormation + deployment role + Default: '' + Type: CommaDelimitedList + FileAssetsBucketName: + Description: The name of the S3 bucket used for file assets + Default: '' + Type: String + FileAssetsBucketKmsKeyId: + Description: Empty to create a new key (default), 'AWS_MANAGED_KEY' to use a managed + S3 key, or the ID/ARN of an existing key. + Default: '' + Type: String + ContainerAssetsRepositoryName: + Description: A user-provided custom name to use for the container assets ECR repository + Default: '' + Type: String + Qualifier: + Description: An identifier to distinguish multiple bootstrap stacks in the same environment + Default: hnb659fds + Type: String + # "cdk-(qualifier)-image-publishing-role-(account)-(region)" needs to be <= 64 chars + # account = 12, region <= 14, 10 chars for qualifier and 28 for rest of role name + AllowedPattern: "[A-Za-z0-9_-]{1,10}" + ConstraintDescription: Qualifier must be an alphanumeric identifier of at most 10 characters + PublicAccessBlockConfiguration: + Description: Whether or not to enable S3 Staging Bucket Public Access Block Configuration + Default: 'true' + Type: 'String' + AllowedValues: ['true', 'false'] +Conditions: + HasTrustedAccounts: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: TrustedAccounts + HasTrustedAccountsForLookup: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: TrustedAccountsForLookup + HasCloudFormationExecutionPolicies: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: CloudFormationExecutionPolicies + HasCustomFileAssetsBucketName: + Fn::Not: + - Fn::Equals: + - '' + - Ref: FileAssetsBucketName + CreateNewKey: + Fn::Equals: + - '' + - Ref: FileAssetsBucketKmsKeyId + UseAwsManagedKey: + Fn::Equals: + - 'AWS_MANAGED_KEY' + - Ref: FileAssetsBucketKmsKeyId + HasCustomContainerAssetsRepositoryName: + Fn::Not: + - Fn::Equals: + - '' + - Ref: ContainerAssetsRepositoryName + UsePublicAccessBlockConfiguration: + Fn::Equals: + - 'true' + - Ref: PublicAccessBlockConfiguration +Resources: + FileAssetsBucketEncryptionKey: + Type: AWS::KMS::Key + Properties: + KeyPolicy: + Statement: + - Action: + - kms:Create* + - kms:Describe* + - kms:Enable* + - kms:List* + - kms:Put* + - kms:Update* + - kms:Revoke* + - kms:Disable* + - kms:Get* + - kms:Delete* + - kms:ScheduleKeyDeletion + - kms:CancelKeyDeletion + - kms:GenerateDataKey + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + Resource: "*" + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Principal: + # Not actually everyone -- see below for Conditions + AWS: "*" + Resource: "*" + Condition: + StringEquals: + # See https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-caller-account + kms:CallerAccount: + Ref: AWS::AccountId + kms:ViaService: + - Fn::Sub: s3.${AWS::Region}.amazonaws.com + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Principal: + AWS: + Fn::Sub: "${FilePublishingRole.Arn}" + Resource: "*" + Condition: CreateNewKey + FileAssetsBucketEncryptionKeyAlias: + Condition: CreateNewKey + Type: AWS::KMS::Alias + Properties: + AliasName: + Fn::Sub: "alias/cdk-${Qualifier}-assets-key" + TargetKeyId: + Ref: FileAssetsBucketEncryptionKey + StagingBucket: + Type: AWS::S3::Bucket + Properties: + BucketName: + Fn::If: + - HasCustomFileAssetsBucketName + - Fn::Sub: "${FileAssetsBucketName}" + - Fn::Sub: cdk-${Qualifier}-assets-${AWS::AccountId}-${AWS::Region} + AccessControl: Private + BucketEncryption: + ServerSideEncryptionConfiguration: + - ServerSideEncryptionByDefault: + SSEAlgorithm: aws:kms + KMSMasterKeyID: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::If: + - UseAwsManagedKey + - Ref: AWS::NoValue + - Fn::Sub: "${FileAssetsBucketKmsKeyId}" + PublicAccessBlockConfiguration: + Fn::If: + - UsePublicAccessBlockConfiguration + - BlockPublicAcls: true + BlockPublicPolicy: true + IgnorePublicAcls: true + RestrictPublicBuckets: true + - Ref: AWS::NoValue + VersioningConfiguration: + Status: Enabled + UpdateReplacePolicy: Retain + DeletionPolicy: Retain + StagingBucketPolicy: + Type: 'AWS::S3::BucketPolicy' + Properties: + Bucket: { Ref: 'StagingBucket' } + PolicyDocument: + Id: 'AccessControl' + Version: '2012-10-17' + Statement: + - Sid: 'AllowSSLRequestsOnly' + Action: 's3:*' + Effect: 'Deny' + Resource: + - { 'Fn::Sub': '${StagingBucket.Arn}' } + - { 'Fn::Sub': '${StagingBucket.Arn}/*' } + Condition: + Bool: { 'aws:SecureTransport': 'false' } + Principal: '*' + ContainerAssetsRepository: + Type: AWS::ECR::Repository + Properties: + ImageScanningConfiguration: + ScanOnPush: true + RepositoryName: + Fn::If: + - HasCustomContainerAssetsRepositoryName + - Fn::Sub: "${ContainerAssetsRepositoryName}" + - Fn::Sub: cdk-${Qualifier}-container-assets-${AWS::AccountId}-${AWS::Region} + FilePublishingRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-file-publishing-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: file-publishing + ImagePublishingRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-image-publishing-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: image-publishing + LookupRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccountsForLookup + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccountsForLookup + - Ref: AWS::NoValue + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-lookup-role-${AWS::AccountId}-${AWS::Region} + ManagedPolicyArns: + - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/ReadOnlyAccess" + Policies: + - PolicyDocument: + Statement: + - Sid: DontReadSecrets + Effect: Deny + Action: + - kms:Decrypt + Resource: "*" + Version: '2012-10-17' + PolicyName: LookupRolePolicy + Tags: + - Key: aws-cdk:bootstrap-role + Value: lookup + FilePublishingRoleDefaultPolicy: + Type: AWS::IAM::Policy + Properties: + PolicyDocument: + Statement: + - Action: + - s3:GetObject* + - s3:GetBucket* + - s3:GetEncryptionConfiguration + - s3:List* + - s3:DeleteObject* + - s3:PutObject* + - s3:Abort* + Resource: + - Fn::Sub: "${StagingBucket.Arn}" + - Fn::Sub: "${StagingBucket.Arn}/*" + Effect: Allow + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Resource: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::Sub: arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/${FileAssetsBucketKmsKeyId} + Version: '2012-10-17' + Roles: + - Ref: FilePublishingRole + PolicyName: + Fn::Sub: cdk-${Qualifier}-file-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} + ImagePublishingRoleDefaultPolicy: + Type: AWS::IAM::Policy + Properties: + PolicyDocument: + Statement: + - Action: + - ecr:PutImage + - ecr:InitiateLayerUpload + - ecr:UploadLayerPart + - ecr:CompleteLayerUpload + - ecr:BatchCheckLayerAvailability + - ecr:DescribeRepositories + - ecr:DescribeImages + - ecr:BatchGetImage + - ecr:GetDownloadUrlForLayer + Resource: + Fn::Sub: "${ContainerAssetsRepository.Arn}" + Effect: Allow + - Action: + - ecr:GetAuthorizationToken + Resource: "*" + Effect: Allow + Version: '2012-10-17' + Roles: + - Ref: ImagePublishingRole + PolicyName: + Fn::Sub: cdk-${Qualifier}-image-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} + DeploymentActionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + Policies: + - PolicyDocument: + Statement: + - Sid: CloudFormationPermissions + Effect: Allow + Action: + - cloudformation:CreateChangeSet + - cloudformation:DeleteChangeSet + - cloudformation:DescribeChangeSet + - cloudformation:DescribeStacks + - cloudformation:ExecuteChangeSet + - cloudformation:CreateStack + - cloudformation:UpdateStack + Resource: "*" + - Sid: PipelineCrossAccountArtifactsBucket + # Read/write buckets in different accounts. Permissions to buckets in + # same account are granted by bucket policies. + # + # Write permissions necessary to write outputs to the cross-region artifact replication bucket + # https://aws.amazon.com/premiumsupport/knowledge-center/codepipeline-deploy-cloudformation/. + Effect: Allow + Action: + - s3:GetObject* + - s3:GetBucket* + - s3:List* + - s3:Abort* + - s3:DeleteObject* + - s3:PutObject* + Resource: "*" + Condition: + StringNotEquals: + s3:ResourceAccount: + Ref: 'AWS::AccountId' + - Sid: PipelineCrossAccountArtifactsKey + # Use keys only for the purposes of reading encrypted files from S3. + Effect: Allow + Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Resource: "*" + Condition: + StringEquals: + kms:ViaService: + Fn::Sub: s3.${AWS::Region}.amazonaws.com + - Action: iam:PassRole + Resource: + Fn::Sub: "${CloudFormationExecutionRole.Arn}" + Effect: Allow + - Sid: CliPermissions + Action: + # Permissions needed by the CLI when doing `cdk deploy`. + # Our CI/CD does not need DeleteStack, + # but we also want to use this role from the CLI, + # and there you can call `cdk destroy` + - cloudformation:DescribeStackEvents + - cloudformation:GetTemplate + - cloudformation:DeleteStack + - cloudformation:UpdateTerminationProtection + - sts:GetCallerIdentity + Resource: "*" + Effect: Allow + - Sid: CliStagingBucket + Effect: Allow + Action: + - s3:GetObject* + - s3:GetBucket* + - s3:List* + Resource: + - Fn::Sub: ${StagingBucket.Arn} + - Fn::Sub: ${StagingBucket.Arn}/* + - Sid: ReadVersion + Effect: Allow + Action: + - ssm:GetParameter + Resource: + - Fn::Sub: "arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter${CdkBootstrapVersion}" + Version: '2012-10-17' + PolicyName: default + RoleName: + Fn::Sub: cdk-${Qualifier}-deploy-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: deploy + CloudFormationExecutionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + Service: cloudformation.amazonaws.com + Version: '2012-10-17' + ManagedPolicyArns: + Fn::If: + - HasCloudFormationExecutionPolicies + - Ref: CloudFormationExecutionPolicies + - Fn::If: + - HasTrustedAccounts + # The CLI will prevent this case from occurring + - Ref: AWS::NoValue + # The CLI will advertise that we picked this implicitly + - - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess" + RoleName: + Fn::Sub: cdk-${Qualifier}-cfn-exec-role-${AWS::AccountId}-${AWS::Region} + # The SSM parameter is used in pipeline-deployed templates to verify the version + # of the bootstrap resources. + CdkBootstrapVersion: + Type: AWS::SSM::Parameter + Properties: + Type: String + Name: + Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' + Value: '10' +Outputs: + BucketName: + Description: The name of the S3 bucket owned by the CDK toolkit stack + Value: + Fn::Sub: "${StagingBucket}" + BucketDomainName: + Description: The domain name of the S3 bucket owned by the CDK toolkit stack + Value: + Fn::Sub: "${StagingBucket.RegionalDomainName}" + # @deprecated - This Export can be removed at some future point in time. + # We can't do it today because if there are stacks that use it, the bootstrap + # stack cannot be updated. Not used anymore by apps >= 1.60.0 + FileAssetKeyArn: + Description: The ARN of the KMS key used to encrypt the asset bucket (deprecated) + Value: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::Sub: "${FileAssetsBucketKmsKeyId}" + Export: + Name: + Fn::Sub: CdkBootstrap-${Qualifier}-FileAssetKeyArn + ImageRepositoryName: + Description: The name of the ECR repository which hosts docker image assets + Value: + Fn::Sub: "${ContainerAssetsRepository}" + # The Output is used by the CLI to verify the version of the bootstrap resources. + BootstrapVersion: + Description: The version of the bootstrap resources that are currently mastered + in this stack + Value: + Fn::GetAtt: [CdkBootstrapVersion, Value] diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 2c69a56cdc879..b9126248f62e7 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -69,14 +69,14 @@ async function parseCommandLineArguments() { .option('staging', { type: 'boolean', desc: 'Copy assets to the output directory (use --no-staging to disable, needed for local debugging the source files with SAM CLI)', default: true }) .option('output', { type: 'string', alias: 'o', desc: 'Emits the synthesized cloud assembly into a directory (default: cdk.out)', requiresArg: true }) .option('no-color', { type: 'boolean', desc: 'Removes colors and other style from console output', default: false }) - .command(['list [STACKS..]', 'ls [STACKS..]'], 'Lists all stacks in the app', yargs => yargs + .command(['list [STACKS..]', 'ls [STACKS..]'], 'Lists all stacks in the app', (yargs: any) => yargs .option('long', { type: 'boolean', default: false, alias: 'l', desc: 'Display environment information for each stack' }), ) - .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', yargs => yargs + .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: any) => yargs .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only synthesize requested stacks, don\'t include dependencies' }) .option('validation', { type: 'boolean', desc: 'After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION)', default: true }) .option('quiet', { type: 'boolean', alias: 'q', desc: 'Do not output CloudFormation Template to stdout', default: false })) - .command('bootstrap [ENVIRONMENTS..]', 'Deploys the CDK toolkit stack into an AWS environment', yargs => yargs + .command('bootstrap [ENVIRONMENTS..]', 'Deploys the CDK toolkit stack into an AWS environment', (yargs: any) => yargs .option('bootstrap-bucket-name', { type: 'string', alias: ['b', 'toolkit-bucket-name'], desc: 'The name of the CDK toolkit bucket; bucket will be created and must not exist', default: undefined }) .option('bootstrap-kms-key-id', { type: 'string', desc: 'AWS KMS master key ID used for the SSE-KMS encryption', default: undefined, conflicts: 'bootstrap-customer-key' }) .option('bootstrap-customer-key', { type: 'boolean', desc: 'Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only)', default: undefined, conflicts: 'bootstrap-kms-key-id' }) @@ -92,7 +92,7 @@ async function parseCommandLineArguments() { .option('show-template', { type: 'boolean', desc: 'Instead of actual bootstrapping, print the current CLI\'s bootstrapping template to stdout for customization', default: false }) .option('template', { type: 'string', requiresArg: true, desc: 'Use the template from the given file instead of the built-in one (use --show-template to obtain an example)' }), ) - .command('deploy [STACKS..]', 'Deploys the stack(s) named STACKS into your AWS account', yargs => yargs + .command('deploy [STACKS..]', 'Deploys the stack(s) named STACKS into your AWS account', (yargs: any) => yargs .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) .option('build-exclude', { type: 'array', alias: 'E', nargs: 1, desc: 'Do not rebuild asset with the given ID. Can be specified multiple times', default: [] }) .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only deploy requested stacks, don\'t include dependencies' }) @@ -136,7 +136,7 @@ async function parseCommandLineArguments() { "Only in effect if specified alongside the '--watch' option", }), ) - .command('watch [STACKS..]', "Shortcut for 'deploy --watch'", yargs => yargs + .command('watch [STACKS..]', "Shortcut for 'deploy --watch'", (yargs: any) => yargs // I'm fairly certain none of these options, present for 'deploy', make sense for 'watch': // .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) // .option('ci', { type: 'boolean', desc: 'Force CI detection', default: process.env.CI !== undefined }) @@ -175,11 +175,11 @@ async function parseCommandLineArguments() { "'true' by default, use --no-logs to turn off", }), ) - .command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', yargs => yargs + .command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', (yargs: any) => yargs .option('all', { type: 'boolean', default: false, desc: 'Destroy all available stacks' }) .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only destroy requested stacks, don\'t include dependees' }) .option('force', { type: 'boolean', alias: 'f', desc: 'Do not ask for confirmation before destroying the stacks' })) - .command('diff [STACKS..]', 'Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found', yargs => yargs + .command('diff [STACKS..]', 'Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found', (yargs: any) => yargs .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only diff requested stacks, don\'t include dependencies' }) .option('context-lines', { type: 'number', desc: 'Number of context lines to include in arbitrary JSON diff rendering', default: 3, requiresArg: true }) .option('template', { type: 'string', desc: 'The path to the CloudFormation template to compare with', requiresArg: true }) @@ -187,7 +187,7 @@ async function parseCommandLineArguments() { .option('security-only', { type: 'boolean', desc: 'Only diff for broadened security changes', default: false }) .option('fail', { type: 'boolean', desc: 'Fail with exit code 1 in case of diff', default: false })) .command('metadata [STACK]', 'Returns all metadata associated with this stack') - .command('init [TEMPLATE]', 'Create a new, empty CDK project from a template.', yargs => yargs + .command('init [TEMPLATE]', 'Create a new, empty CDK project from a template.', (yargs: any) => yargs .option('language', { type: 'string', alias: 'l', desc: 'The language to be used for the new project (default can be configured in ~/.cdk.json)', choices: initTemplateLanguages }) .option('list', { type: 'boolean', desc: 'List the available templates' }) .option('generate-only', { type: 'boolean', default: false, desc: 'If true, only generates project files, without executing additional operations such as setting up a git repo, installing dependencies or compiling the project' }), diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts index 9d0a1001ddb30..acf2de9a9cc87 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts @@ -1,6 +1,6 @@ import * as cxapi from '@aws-cdk/cx-api'; import * as chalk from 'chalk'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; import * as semver from 'semver'; import { error, print, warning } from '../../logging'; import { flatten } from '../../util'; diff --git a/packages/aws-cdk/lib/api/cxapp/environments.ts b/packages/aws-cdk/lib/api/cxapp/environments.ts index f79d6de2847ad..a02af39435d92 100644 --- a/packages/aws-cdk/lib/api/cxapp/environments.ts +++ b/packages/aws-cdk/lib/api/cxapp/environments.ts @@ -1,5 +1,5 @@ import * as cxapi from '@aws-cdk/cx-api'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; import { SdkProvider } from '../aws-auth'; import { StackCollection } from './cloud-assembly'; diff --git a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts index d2966e756b69d..0a66b6df91636 100644 --- a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts +++ b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts @@ -1,5 +1,5 @@ import { Writable } from 'stream'; -import * as archiver from 'archiver'; +import archiver from 'archiver'; import { flatMap } from '../../util'; import { ISDK } from '../aws-auth'; import { CfnEvaluationException, EvaluateCloudFormationTemplate } from '../evaluate-cloudformation-template'; diff --git a/packages/aws-cdk/lib/api/util/display.ts b/packages/aws-cdk/lib/api/util/display.ts index bf8f80b983296..3e3839df3862b 100644 --- a/packages/aws-cdk/lib/api/util/display.ts +++ b/packages/aws-cdk/lib/api/util/display.ts @@ -1,4 +1,4 @@ -import * as wrapAnsi from 'wrap-ansi'; +import wrapAnsi from 'wrap-ansi'; /** * A class representing rewritable display lines diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index bb6127bb573b6..3aadfd92b2fa4 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -14,7 +14,7 @@ "pkglint": "pkglint -f", "test": "cdk-test", "integ": "jest --testMatch '**/?(*.)+(integ-test).js'", - "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin", + "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin && cp lib/api/bootstrap/bootstrap-template.yaml bin", "bundle:test": "./bin/cdk --help", "package": "cdk-package", "build+test+package": "yarn build+test && yarn package", diff --git a/packages/cdk-assets/lib/private/archive.ts b/packages/cdk-assets/lib/private/archive.ts index ce085ec901284..fc75570c18ee9 100644 --- a/packages/cdk-assets/lib/private/archive.ts +++ b/packages/cdk-assets/lib/private/archive.ts @@ -1,6 +1,6 @@ import { createWriteStream, promises as fs } from 'fs'; import * as path from 'path'; -import * as archiver from 'archiver'; +import archiver from 'archiver'; import * as glob from 'glob'; export function zipDirectory(directory: string, outputFile: string): Promise { From 6ce1d2c622096026a142d2165d4707195307867d Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 26 Jan 2022 11:11:34 +0200 Subject: [PATCH 04/63] mid work --- .../cloudformation-diff/lib/iam/statement.ts | 5 +- packages/aws-cdk/bin/bootstrap-template.yaml | 528 ------------------ packages/aws-cdk/bin/cdk | 6 +- packages/aws-cdk/bin/cdk.ts | 1 + .../api/bootstrap/bootstrap-environment.ts | 3 +- .../aws-cdk/lib/api/cxapp/cloud-assembly.ts | 5 +- .../aws-cdk/lib/api/cxapp/environments.ts | 5 +- .../lib/api/hotswap/lambda-functions.ts | 5 +- packages/aws-cdk/lib/api/util/display.ts | 4 +- packages/aws-cdk/lib/init.ts | 5 +- packages/aws-cdk/lib/util/directories.ts | 17 + packages/aws-cdk/lib/version.ts | 6 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/lib/private/archive.ts | 5 +- 14 files changed, 54 insertions(+), 543 deletions(-) delete mode 100644 packages/aws-cdk/bin/bootstrap-template.yaml diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts index 7f00053b4ba16..7f83a5561bc76 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts @@ -1,6 +1,9 @@ -import deepEqual from 'fast-deep-equal'; import { deepRemoveUndefined } from '../util'; +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const deepEqual = require('fast-deep-equal'); + export class Statement { /** * Statement ID diff --git a/packages/aws-cdk/bin/bootstrap-template.yaml b/packages/aws-cdk/bin/bootstrap-template.yaml deleted file mode 100644 index b7871900b3a46..0000000000000 --- a/packages/aws-cdk/bin/bootstrap-template.yaml +++ /dev/null @@ -1,528 +0,0 @@ -Description: This stack includes resources needed to deploy AWS CDK apps into this - environment -Parameters: - TrustedAccounts: - Description: List of AWS accounts that are trusted to publish assets and deploy - stacks to this environment - Default: '' - Type: CommaDelimitedList - TrustedAccountsForLookup: - Description: List of AWS accounts that are trusted to look up values in this - environment - Default: '' - Type: CommaDelimitedList - CloudFormationExecutionPolicies: - Description: List of the ManagedPolicy ARN(s) to attach to the CloudFormation - deployment role - Default: '' - Type: CommaDelimitedList - FileAssetsBucketName: - Description: The name of the S3 bucket used for file assets - Default: '' - Type: String - FileAssetsBucketKmsKeyId: - Description: Empty to create a new key (default), 'AWS_MANAGED_KEY' to use a managed - S3 key, or the ID/ARN of an existing key. - Default: '' - Type: String - ContainerAssetsRepositoryName: - Description: A user-provided custom name to use for the container assets ECR repository - Default: '' - Type: String - Qualifier: - Description: An identifier to distinguish multiple bootstrap stacks in the same environment - Default: hnb659fds - Type: String - # "cdk-(qualifier)-image-publishing-role-(account)-(region)" needs to be <= 64 chars - # account = 12, region <= 14, 10 chars for qualifier and 28 for rest of role name - AllowedPattern: "[A-Za-z0-9_-]{1,10}" - ConstraintDescription: Qualifier must be an alphanumeric identifier of at most 10 characters - PublicAccessBlockConfiguration: - Description: Whether or not to enable S3 Staging Bucket Public Access Block Configuration - Default: 'true' - Type: 'String' - AllowedValues: ['true', 'false'] -Conditions: - HasTrustedAccounts: - Fn::Not: - - Fn::Equals: - - '' - - Fn::Join: - - '' - - Ref: TrustedAccounts - HasTrustedAccountsForLookup: - Fn::Not: - - Fn::Equals: - - '' - - Fn::Join: - - '' - - Ref: TrustedAccountsForLookup - HasCloudFormationExecutionPolicies: - Fn::Not: - - Fn::Equals: - - '' - - Fn::Join: - - '' - - Ref: CloudFormationExecutionPolicies - HasCustomFileAssetsBucketName: - Fn::Not: - - Fn::Equals: - - '' - - Ref: FileAssetsBucketName - CreateNewKey: - Fn::Equals: - - '' - - Ref: FileAssetsBucketKmsKeyId - UseAwsManagedKey: - Fn::Equals: - - 'AWS_MANAGED_KEY' - - Ref: FileAssetsBucketKmsKeyId - HasCustomContainerAssetsRepositoryName: - Fn::Not: - - Fn::Equals: - - '' - - Ref: ContainerAssetsRepositoryName - UsePublicAccessBlockConfiguration: - Fn::Equals: - - 'true' - - Ref: PublicAccessBlockConfiguration -Resources: - FileAssetsBucketEncryptionKey: - Type: AWS::KMS::Key - Properties: - KeyPolicy: - Statement: - - Action: - - kms:Create* - - kms:Describe* - - kms:Enable* - - kms:List* - - kms:Put* - - kms:Update* - - kms:Revoke* - - kms:Disable* - - kms:Get* - - kms:Delete* - - kms:ScheduleKeyDeletion - - kms:CancelKeyDeletion - - kms:GenerateDataKey - Effect: Allow - Principal: - AWS: - Ref: AWS::AccountId - Resource: "*" - - Action: - - kms:Decrypt - - kms:DescribeKey - - kms:Encrypt - - kms:ReEncrypt* - - kms:GenerateDataKey* - Effect: Allow - Principal: - # Not actually everyone -- see below for Conditions - AWS: "*" - Resource: "*" - Condition: - StringEquals: - # See https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-caller-account - kms:CallerAccount: - Ref: AWS::AccountId - kms:ViaService: - - Fn::Sub: s3.${AWS::Region}.amazonaws.com - - Action: - - kms:Decrypt - - kms:DescribeKey - - kms:Encrypt - - kms:ReEncrypt* - - kms:GenerateDataKey* - Effect: Allow - Principal: - AWS: - Fn::Sub: "${FilePublishingRole.Arn}" - Resource: "*" - Condition: CreateNewKey - FileAssetsBucketEncryptionKeyAlias: - Condition: CreateNewKey - Type: AWS::KMS::Alias - Properties: - AliasName: - Fn::Sub: "alias/cdk-${Qualifier}-assets-key" - TargetKeyId: - Ref: FileAssetsBucketEncryptionKey - StagingBucket: - Type: AWS::S3::Bucket - Properties: - BucketName: - Fn::If: - - HasCustomFileAssetsBucketName - - Fn::Sub: "${FileAssetsBucketName}" - - Fn::Sub: cdk-${Qualifier}-assets-${AWS::AccountId}-${AWS::Region} - AccessControl: Private - BucketEncryption: - ServerSideEncryptionConfiguration: - - ServerSideEncryptionByDefault: - SSEAlgorithm: aws:kms - KMSMasterKeyID: - Fn::If: - - CreateNewKey - - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" - - Fn::If: - - UseAwsManagedKey - - Ref: AWS::NoValue - - Fn::Sub: "${FileAssetsBucketKmsKeyId}" - PublicAccessBlockConfiguration: - Fn::If: - - UsePublicAccessBlockConfiguration - - BlockPublicAcls: true - BlockPublicPolicy: true - IgnorePublicAcls: true - RestrictPublicBuckets: true - - Ref: AWS::NoValue - VersioningConfiguration: - Status: Enabled - UpdateReplacePolicy: Retain - DeletionPolicy: Retain - StagingBucketPolicy: - Type: 'AWS::S3::BucketPolicy' - Properties: - Bucket: { Ref: 'StagingBucket' } - PolicyDocument: - Id: 'AccessControl' - Version: '2012-10-17' - Statement: - - Sid: 'AllowSSLRequestsOnly' - Action: 's3:*' - Effect: 'Deny' - Resource: - - { 'Fn::Sub': '${StagingBucket.Arn}' } - - { 'Fn::Sub': '${StagingBucket.Arn}/*' } - Condition: - Bool: { 'aws:SecureTransport': 'false' } - Principal: '*' - ContainerAssetsRepository: - Type: AWS::ECR::Repository - Properties: - ImageScanningConfiguration: - ScanOnPush: true - RepositoryName: - Fn::If: - - HasCustomContainerAssetsRepositoryName - - Fn::Sub: "${ContainerAssetsRepositoryName}" - - Fn::Sub: cdk-${Qualifier}-container-assets-${AWS::AccountId}-${AWS::Region} - FilePublishingRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: AWS::AccountId - - Fn::If: - - HasTrustedAccounts - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: TrustedAccounts - - Ref: AWS::NoValue - RoleName: - Fn::Sub: cdk-${Qualifier}-file-publishing-role-${AWS::AccountId}-${AWS::Region} - Tags: - - Key: aws-cdk:bootstrap-role - Value: file-publishing - ImagePublishingRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: AWS::AccountId - - Fn::If: - - HasTrustedAccounts - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: TrustedAccounts - - Ref: AWS::NoValue - RoleName: - Fn::Sub: cdk-${Qualifier}-image-publishing-role-${AWS::AccountId}-${AWS::Region} - Tags: - - Key: aws-cdk:bootstrap-role - Value: image-publishing - LookupRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: AWS::AccountId - - Fn::If: - - HasTrustedAccountsForLookup - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: TrustedAccountsForLookup - - Ref: AWS::NoValue - - Fn::If: - - HasTrustedAccounts - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: TrustedAccounts - - Ref: AWS::NoValue - RoleName: - Fn::Sub: cdk-${Qualifier}-lookup-role-${AWS::AccountId}-${AWS::Region} - ManagedPolicyArns: - - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/ReadOnlyAccess" - Policies: - - PolicyDocument: - Statement: - - Sid: DontReadSecrets - Effect: Deny - Action: - - kms:Decrypt - Resource: "*" - Version: '2012-10-17' - PolicyName: LookupRolePolicy - Tags: - - Key: aws-cdk:bootstrap-role - Value: lookup - FilePublishingRoleDefaultPolicy: - Type: AWS::IAM::Policy - Properties: - PolicyDocument: - Statement: - - Action: - - s3:GetObject* - - s3:GetBucket* - - s3:GetEncryptionConfiguration - - s3:List* - - s3:DeleteObject* - - s3:PutObject* - - s3:Abort* - Resource: - - Fn::Sub: "${StagingBucket.Arn}" - - Fn::Sub: "${StagingBucket.Arn}/*" - Effect: Allow - - Action: - - kms:Decrypt - - kms:DescribeKey - - kms:Encrypt - - kms:ReEncrypt* - - kms:GenerateDataKey* - Effect: Allow - Resource: - Fn::If: - - CreateNewKey - - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" - - Fn::Sub: arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/${FileAssetsBucketKmsKeyId} - Version: '2012-10-17' - Roles: - - Ref: FilePublishingRole - PolicyName: - Fn::Sub: cdk-${Qualifier}-file-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} - ImagePublishingRoleDefaultPolicy: - Type: AWS::IAM::Policy - Properties: - PolicyDocument: - Statement: - - Action: - - ecr:PutImage - - ecr:InitiateLayerUpload - - ecr:UploadLayerPart - - ecr:CompleteLayerUpload - - ecr:BatchCheckLayerAvailability - - ecr:DescribeRepositories - - ecr:DescribeImages - - ecr:BatchGetImage - - ecr:GetDownloadUrlForLayer - Resource: - Fn::Sub: "${ContainerAssetsRepository.Arn}" - Effect: Allow - - Action: - - ecr:GetAuthorizationToken - Resource: "*" - Effect: Allow - Version: '2012-10-17' - Roles: - - Ref: ImagePublishingRole - PolicyName: - Fn::Sub: cdk-${Qualifier}-image-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} - DeploymentActionRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: AWS::AccountId - - Fn::If: - - HasTrustedAccounts - - Action: sts:AssumeRole - Effect: Allow - Principal: - AWS: - Ref: TrustedAccounts - - Ref: AWS::NoValue - Policies: - - PolicyDocument: - Statement: - - Sid: CloudFormationPermissions - Effect: Allow - Action: - - cloudformation:CreateChangeSet - - cloudformation:DeleteChangeSet - - cloudformation:DescribeChangeSet - - cloudformation:DescribeStacks - - cloudformation:ExecuteChangeSet - - cloudformation:CreateStack - - cloudformation:UpdateStack - Resource: "*" - - Sid: PipelineCrossAccountArtifactsBucket - # Read/write buckets in different accounts. Permissions to buckets in - # same account are granted by bucket policies. - # - # Write permissions necessary to write outputs to the cross-region artifact replication bucket - # https://aws.amazon.com/premiumsupport/knowledge-center/codepipeline-deploy-cloudformation/. - Effect: Allow - Action: - - s3:GetObject* - - s3:GetBucket* - - s3:List* - - s3:Abort* - - s3:DeleteObject* - - s3:PutObject* - Resource: "*" - Condition: - StringNotEquals: - s3:ResourceAccount: - Ref: 'AWS::AccountId' - - Sid: PipelineCrossAccountArtifactsKey - # Use keys only for the purposes of reading encrypted files from S3. - Effect: Allow - Action: - - kms:Decrypt - - kms:DescribeKey - - kms:Encrypt - - kms:ReEncrypt* - - kms:GenerateDataKey* - Resource: "*" - Condition: - StringEquals: - kms:ViaService: - Fn::Sub: s3.${AWS::Region}.amazonaws.com - - Action: iam:PassRole - Resource: - Fn::Sub: "${CloudFormationExecutionRole.Arn}" - Effect: Allow - - Sid: CliPermissions - Action: - # Permissions needed by the CLI when doing `cdk deploy`. - # Our CI/CD does not need DeleteStack, - # but we also want to use this role from the CLI, - # and there you can call `cdk destroy` - - cloudformation:DescribeStackEvents - - cloudformation:GetTemplate - - cloudformation:DeleteStack - - cloudformation:UpdateTerminationProtection - - sts:GetCallerIdentity - Resource: "*" - Effect: Allow - - Sid: CliStagingBucket - Effect: Allow - Action: - - s3:GetObject* - - s3:GetBucket* - - s3:List* - Resource: - - Fn::Sub: ${StagingBucket.Arn} - - Fn::Sub: ${StagingBucket.Arn}/* - - Sid: ReadVersion - Effect: Allow - Action: - - ssm:GetParameter - Resource: - - Fn::Sub: "arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter${CdkBootstrapVersion}" - Version: '2012-10-17' - PolicyName: default - RoleName: - Fn::Sub: cdk-${Qualifier}-deploy-role-${AWS::AccountId}-${AWS::Region} - Tags: - - Key: aws-cdk:bootstrap-role - Value: deploy - CloudFormationExecutionRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Action: sts:AssumeRole - Effect: Allow - Principal: - Service: cloudformation.amazonaws.com - Version: '2012-10-17' - ManagedPolicyArns: - Fn::If: - - HasCloudFormationExecutionPolicies - - Ref: CloudFormationExecutionPolicies - - Fn::If: - - HasTrustedAccounts - # The CLI will prevent this case from occurring - - Ref: AWS::NoValue - # The CLI will advertise that we picked this implicitly - - - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess" - RoleName: - Fn::Sub: cdk-${Qualifier}-cfn-exec-role-${AWS::AccountId}-${AWS::Region} - # The SSM parameter is used in pipeline-deployed templates to verify the version - # of the bootstrap resources. - CdkBootstrapVersion: - Type: AWS::SSM::Parameter - Properties: - Type: String - Name: - Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: '10' -Outputs: - BucketName: - Description: The name of the S3 bucket owned by the CDK toolkit stack - Value: - Fn::Sub: "${StagingBucket}" - BucketDomainName: - Description: The domain name of the S3 bucket owned by the CDK toolkit stack - Value: - Fn::Sub: "${StagingBucket.RegionalDomainName}" - # @deprecated - This Export can be removed at some future point in time. - # We can't do it today because if there are stacks that use it, the bootstrap - # stack cannot be updated. Not used anymore by apps >= 1.60.0 - FileAssetKeyArn: - Description: The ARN of the KMS key used to encrypt the asset bucket (deprecated) - Value: - Fn::If: - - CreateNewKey - - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" - - Fn::Sub: "${FileAssetsBucketKmsKeyId}" - Export: - Name: - Fn::Sub: CdkBootstrap-${Qualifier}-FileAssetKeyArn - ImageRepositoryName: - Description: The name of the ECR repository which hosts docker image assets - Value: - Fn::Sub: "${ContainerAssetsRepository}" - # The Output is used by the CLI to verify the version of the bootstrap resources. - BootstrapVersion: - Description: The version of the bootstrap resources that are currently mastered - in this stack - Value: - Fn::GetAtt: [CdkBootstrapVersion, Value] diff --git a/packages/aws-cdk/bin/cdk b/packages/aws-cdk/bin/cdk index 280814a578a49..8c109e87993c1 100755 --- a/packages/aws-cdk/bin/cdk +++ b/packages/aws-cdk/bin/cdk @@ -1,2 +1,6 @@ #!/usr/bin/env node -require('./cdk.js'); +try { + require('./cdk-bundle.js'); +} catch (e) { + require('./cdk.js'); +} diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index b9126248f62e7..a768f992cbb7b 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -20,6 +20,7 @@ import { PluginHost } from '../lib/plugin'; import { serializeStructure } from '../lib/serialize'; import { Command, Configuration, Settings } from '../lib/settings'; import * as version from '../lib/version'; + // https://github.com/yargs/yargs/issues/1929 // https://github.com/evanw/esbuild/issues/1492 // eslint-disable-next-line @typescript-eslint/no-require-imports diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts b/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts index 7877368710c5f..a7b63214a3c80 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts @@ -3,6 +3,7 @@ import * as path from 'path'; import * as cxapi from '@aws-cdk/cx-api'; import { warning } from '../../logging'; import { loadStructuredFile, toYAML } from '../../serialize'; +import { rootDir } from '../../util/directories'; import { SdkProvider } from '../aws-auth'; import { DeployStackResult } from '../deploy-stack'; import { BootstrapEnvironmentOptions, BootstrappingParameters } from './bootstrap-props'; @@ -170,7 +171,7 @@ export class Bootstrapper { case 'custom': return loadStructuredFile(this.source.templateFile); case 'default': - return loadStructuredFile(path.join(__dirname, 'bootstrap-template.yaml')); + return loadStructuredFile(path.join(rootDir(), 'lib', 'api', 'bootstrap', 'bootstrap-template.yaml')); case 'legacy': return legacyBootstrapTemplate(params); } diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts index acf2de9a9cc87..da1b80f89a440 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts @@ -1,11 +1,14 @@ import * as cxapi from '@aws-cdk/cx-api'; import * as chalk from 'chalk'; -import minimatch from 'minimatch'; import * as semver from 'semver'; import { error, print, warning } from '../../logging'; import { flatten } from '../../util'; import { versionNumber } from '../../version'; +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const minimatch = require('minimatch'); + export enum DefaultSelection { /** * Returns an empty selection in case there are no selectors. diff --git a/packages/aws-cdk/lib/api/cxapp/environments.ts b/packages/aws-cdk/lib/api/cxapp/environments.ts index a02af39435d92..0220abab3b821 100644 --- a/packages/aws-cdk/lib/api/cxapp/environments.ts +++ b/packages/aws-cdk/lib/api/cxapp/environments.ts @@ -1,8 +1,11 @@ import * as cxapi from '@aws-cdk/cx-api'; -import minimatch from 'minimatch'; import { SdkProvider } from '../aws-auth'; import { StackCollection } from './cloud-assembly'; +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const minimatch = require('minimatch'); + export function looksLikeGlob(environment: string) { return environment.indexOf('*') > -1; } diff --git a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts index 0a66b6df91636..4e7e2a2902978 100644 --- a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts +++ b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts @@ -1,10 +1,13 @@ import { Writable } from 'stream'; -import archiver from 'archiver'; import { flatMap } from '../../util'; import { ISDK } from '../aws-auth'; import { CfnEvaluationException, EvaluateCloudFormationTemplate } from '../evaluate-cloudformation-template'; import { ChangeHotswapImpact, ChangeHotswapResult, HotswapOperation, HotswappableChangeCandidate } from './common'; +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const archiver = require('archiver'); + /** * Returns `ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT` if the change cannot be short-circuited, * `ChangeHotswapImpact.IRRELEVANT` if the change is irrelevant from a short-circuit perspective diff --git a/packages/aws-cdk/lib/api/util/display.ts b/packages/aws-cdk/lib/api/util/display.ts index 3e3839df3862b..d7b136a36f178 100644 --- a/packages/aws-cdk/lib/api/util/display.ts +++ b/packages/aws-cdk/lib/api/util/display.ts @@ -1,4 +1,6 @@ -import wrapAnsi from 'wrap-ansi'; +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const wrapAnsi = require('wrap-ansi'); /** * A class representing rewritable display lines diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index 28dd52f3a6bef..edfca1b818d0f 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -5,7 +5,7 @@ import * as chalk from 'chalk'; import * as fs from 'fs-extra'; import * as semver from 'semver'; import { error, print, warning } from './logging'; -import { cdkHomeDir } from './util/directories'; +import { cdkHomeDir, rootDir } from './util/directories'; import { versionNumber } from './version'; export type InvokeHook = (targetDirectory: string) => Promise; @@ -211,9 +211,8 @@ function versionedTemplatesDir(): Promise { if (currentVersion === '0.0.0') { currentVersion = '1.0.0'; } - const root = path.dirname(require.resolve('../package.json')); const majorVersion = semver.major(currentVersion); - resolve(path.join(root, 'lib', 'init-templates', `v${majorVersion}`)); + resolve(path.join(rootDir(), 'lib', 'init-templates', `v${majorVersion}`)); }); } diff --git a/packages/aws-cdk/lib/util/directories.ts b/packages/aws-cdk/lib/util/directories.ts index 366ce926cb6c6..1ca2377092c24 100644 --- a/packages/aws-cdk/lib/util/directories.ts +++ b/packages/aws-cdk/lib/util/directories.ts @@ -1,3 +1,4 @@ +import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; @@ -9,4 +10,20 @@ export function cdkHomeDir() { export function cdkCacheDir() { return path.join(cdkHomeDir(), 'cache'); +} + +export function rootDir() { + + function _rootDir(dirname: string): string { + const manifestPath = path.join(dirname, 'package.json'); + if (fs.existsSync(manifestPath)) { + return dirname; + } + if (path.dirname(dirname) === dirname) { + throw new Error('Unable to find package manifest'); + } + return _rootDir(path.dirname(dirname)); + } + + return _rootDir(__dirname); } \ No newline at end of file diff --git a/packages/aws-cdk/lib/version.ts b/packages/aws-cdk/lib/version.ts index da4452eb827a7..72e349a5b9bf8 100644 --- a/packages/aws-cdk/lib/version.ts +++ b/packages/aws-cdk/lib/version.ts @@ -4,7 +4,7 @@ import * as fs from 'fs-extra'; import * as semver from 'semver'; import { debug, print } from '../lib/logging'; import { formatAsBanner } from '../lib/util/console-formatters'; -import { cdkCacheDir } from './util/directories'; +import { cdkCacheDir, rootDir } from './util/directories'; import { getLatestVersionFromNpm } from './util/npm'; const ONE_DAY_IN_SECONDS = 1 * 24 * 60 * 60; @@ -17,12 +17,12 @@ export const DISPLAY_VERSION = `${versionNumber()} (build ${commit()})`; export function versionNumber(): string { // eslint-disable-next-line @typescript-eslint/no-require-imports - return require('../package.json').version.replace(/\+[0-9a-f]+$/, ''); + return require(path.join(rootDir(), 'package.json')).version.replace(/\+[0-9a-f]+$/, ''); } function commit(): string { // eslint-disable-next-line @typescript-eslint/no-require-imports - return require('../build-info.json').commit; + return require(path.join(rootDir(), 'build-info.json')).commit; } export class VersionCheckTTL { diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 3aadfd92b2fa4..b53b1d0a65302 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -14,7 +14,7 @@ "pkglint": "pkglint -f", "test": "cdk-test", "integ": "jest --testMatch '**/?(*.)+(integ-test).js'", - "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin && cp lib/api/bootstrap/bootstrap-template.yaml bin", + "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk-bundle.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin", "bundle:test": "./bin/cdk --help", "package": "cdk-package", "build+test+package": "yarn build+test && yarn package", diff --git a/packages/cdk-assets/lib/private/archive.ts b/packages/cdk-assets/lib/private/archive.ts index fc75570c18ee9..c0afdc18a076f 100644 --- a/packages/cdk-assets/lib/private/archive.ts +++ b/packages/cdk-assets/lib/private/archive.ts @@ -1,8 +1,11 @@ import { createWriteStream, promises as fs } from 'fs'; import * as path from 'path'; -import archiver from 'archiver'; import * as glob from 'glob'; +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const archiver = require('archiver'); + export function zipDirectory(directory: string, outputFile: string): Promise { return new Promise(async (ok, fail) => { // The below options are needed to support following symlinks when building zip files: From a1991fee9f7ed432070bd0e3dcbf2cbbe0c64d09 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 26 Jan 2022 11:20:50 +0200 Subject: [PATCH 05/63] compile --- packages/aws-cdk/lib/api/hotswap/lambda-functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts index 5fb84fb5f53d1..adcc8b5c1aea8 100644 --- a/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts +++ b/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts @@ -369,7 +369,7 @@ function zipString(fileName: string, rawString: string): Promise { const archive = archiver('zip'); - archive.on('error', (err) => { + archive.on('error', (err: any) => { reject(err); }); From 613dbf84e521e9127dc048f1a7a663ddb78d046d Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 26 Jan 2022 12:03:01 +0200 Subject: [PATCH 06/63] yargs types --- packages/aws-cdk/bin/cdk | 7 ++++++- packages/aws-cdk/bin/cdk.ts | 17 +++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/packages/aws-cdk/bin/cdk b/packages/aws-cdk/bin/cdk index 8c109e87993c1..84c7b1bc15301 100755 --- a/packages/aws-cdk/bin/cdk +++ b/packages/aws-cdk/bin/cdk @@ -2,5 +2,10 @@ try { require('./cdk-bundle.js'); } catch (e) { - require('./cdk.js'); + if (e.message.includes('Cannot find module')) { + // require('./cdk.js'); + throw new Error('FAIL') + } else { + throw e; + } } diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index a768f992cbb7b..4b1a8ecb36cf9 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -4,6 +4,7 @@ import * as cxapi from '@aws-cdk/cx-api'; import '@jsii/check-node/run'; import * as chalk from 'chalk'; +import { Argv } from 'yargs'; import { SdkProvider } from '../lib/api/aws-auth'; import { BootstrapSource, Bootstrapper } from '../lib/api/bootstrap'; import { CloudFormationDeployments } from '../lib/api/cloudformation-deployments'; @@ -70,14 +71,14 @@ async function parseCommandLineArguments() { .option('staging', { type: 'boolean', desc: 'Copy assets to the output directory (use --no-staging to disable, needed for local debugging the source files with SAM CLI)', default: true }) .option('output', { type: 'string', alias: 'o', desc: 'Emits the synthesized cloud assembly into a directory (default: cdk.out)', requiresArg: true }) .option('no-color', { type: 'boolean', desc: 'Removes colors and other style from console output', default: false }) - .command(['list [STACKS..]', 'ls [STACKS..]'], 'Lists all stacks in the app', (yargs: any) => yargs + .command(['list [STACKS..]', 'ls [STACKS..]'], 'Lists all stacks in the app', (yargs: Argv) => yargs .option('long', { type: 'boolean', default: false, alias: 'l', desc: 'Display environment information for each stack' }), ) - .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: any) => yargs + .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: Argv) => yargs .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only synthesize requested stacks, don\'t include dependencies' }) .option('validation', { type: 'boolean', desc: 'After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION)', default: true }) .option('quiet', { type: 'boolean', alias: 'q', desc: 'Do not output CloudFormation Template to stdout', default: false })) - .command('bootstrap [ENVIRONMENTS..]', 'Deploys the CDK toolkit stack into an AWS environment', (yargs: any) => yargs + .command('bootstrap [ENVIRONMENTS..]', 'Deploys the CDK toolkit stack into an AWS environment', (yargs: Argv) => yargs .option('bootstrap-bucket-name', { type: 'string', alias: ['b', 'toolkit-bucket-name'], desc: 'The name of the CDK toolkit bucket; bucket will be created and must not exist', default: undefined }) .option('bootstrap-kms-key-id', { type: 'string', desc: 'AWS KMS master key ID used for the SSE-KMS encryption', default: undefined, conflicts: 'bootstrap-customer-key' }) .option('bootstrap-customer-key', { type: 'boolean', desc: 'Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only)', default: undefined, conflicts: 'bootstrap-kms-key-id' }) @@ -93,7 +94,7 @@ async function parseCommandLineArguments() { .option('show-template', { type: 'boolean', desc: 'Instead of actual bootstrapping, print the current CLI\'s bootstrapping template to stdout for customization', default: false }) .option('template', { type: 'string', requiresArg: true, desc: 'Use the template from the given file instead of the built-in one (use --show-template to obtain an example)' }), ) - .command('deploy [STACKS..]', 'Deploys the stack(s) named STACKS into your AWS account', (yargs: any) => yargs + .command('deploy [STACKS..]', 'Deploys the stack(s) named STACKS into your AWS account', (yargs: Argv) => yargs .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) .option('build-exclude', { type: 'array', alias: 'E', nargs: 1, desc: 'Do not rebuild asset with the given ID. Can be specified multiple times', default: [] }) .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only deploy requested stacks, don\'t include dependencies' }) @@ -137,7 +138,7 @@ async function parseCommandLineArguments() { "Only in effect if specified alongside the '--watch' option", }), ) - .command('watch [STACKS..]', "Shortcut for 'deploy --watch'", (yargs: any) => yargs + .command('watch [STACKS..]', "Shortcut for 'deploy --watch'", (yargs: Argv) => yargs // I'm fairly certain none of these options, present for 'deploy', make sense for 'watch': // .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) // .option('ci', { type: 'boolean', desc: 'Force CI detection', default: process.env.CI !== undefined }) @@ -176,11 +177,11 @@ async function parseCommandLineArguments() { "'true' by default, use --no-logs to turn off", }), ) - .command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', (yargs: any) => yargs + .command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', (yargs: Argv) => yargs .option('all', { type: 'boolean', default: false, desc: 'Destroy all available stacks' }) .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only destroy requested stacks, don\'t include dependees' }) .option('force', { type: 'boolean', alias: 'f', desc: 'Do not ask for confirmation before destroying the stacks' })) - .command('diff [STACKS..]', 'Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found', (yargs: any) => yargs + .command('diff [STACKS..]', 'Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found', (yargs: Argv) => yargs .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only diff requested stacks, don\'t include dependencies' }) .option('context-lines', { type: 'number', desc: 'Number of context lines to include in arbitrary JSON diff rendering', default: 3, requiresArg: true }) .option('template', { type: 'string', desc: 'The path to the CloudFormation template to compare with', requiresArg: true }) @@ -188,7 +189,7 @@ async function parseCommandLineArguments() { .option('security-only', { type: 'boolean', desc: 'Only diff for broadened security changes', default: false }) .option('fail', { type: 'boolean', desc: 'Fail with exit code 1 in case of diff', default: false })) .command('metadata [STACK]', 'Returns all metadata associated with this stack') - .command('init [TEMPLATE]', 'Create a new, empty CDK project from a template.', (yargs: any) => yargs + .command('init [TEMPLATE]', 'Create a new, empty CDK project from a template.', (yargs: Argv) => yargs .option('language', { type: 'string', alias: 'l', desc: 'The language to be used for the new project (default can be configured in ~/.cdk.json)', choices: initTemplateLanguages }) .option('list', { type: 'boolean', desc: 'List the available templates' }) .option('generate-only', { type: 'boolean', default: false, desc: 'If true, only generates project files, without executing additional operations such as setting up a git repo, installing dependencies or compiling the project' }), From d526cf99ad795685cb532d19d5a6bd79f3135d70 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 26 Jan 2022 17:15:44 +0200 Subject: [PATCH 07/63] lint --- .../@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts | 1 - .../lib/network/security-group-changes.ts | 1 - .../cx-api/lib/artifacts/asset-manifest-artifact.ts | 1 - .../cx-api/lib/artifacts/cloudformation-artifact.ts | 1 - .../lib/artifacts/nested-cloud-assembly-artifact.ts | 1 - .../@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts | 1 - packages/@aws-cdk/cx-api/lib/cloud-artifact.ts | 1 - packages/aws-cdk/lib/init.ts | 8 ++++---- 8 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts index 503ccdb3863a0..7f386d7a9aecf 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts @@ -1,2 +1 @@ -/* eslint-disable */ export { IamChangesProps, IamChanges, IamChangesJson } from '../diff/types'; diff --git a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts index c06d82ae01eb3..106d24165a229 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts @@ -1,2 +1 @@ -/* eslint-disable */ export { SecurityGroupChangesProps, SecurityGroupChanges, SecurityGroupChangesJson } from '../diff/types'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts index be24b0f240756..27f20bfe4a380 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts @@ -1,2 +1 @@ -/* eslint-disable */ export { AssetManifestArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts index 0f285429ae30f..c6e926b03830d 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts @@ -1,2 +1 @@ -/* eslint-disable */ export { CloudFormationStackArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts index a54ffc0cdd13c..bc7600205cf2d 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts @@ -1,2 +1 @@ -/* eslint-disable */ export { NestedCloudAssemblyArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts index dea42f307e4ee..482d6b1f84189 100644 --- a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts @@ -1,2 +1 @@ -/* eslint-disable */ export { TreeCloudArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts index 947aaebcf8a9a..49dd86a5ff260 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts @@ -26,5 +26,4 @@ export interface AwsCloudFormationStackProperties { readonly terminationProtection?: boolean; } -/* eslint-disable */ export { CloudArtifact } from './cloud-assembly'; diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index edfca1b818d0f..0638c42e9d4e8 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -156,11 +156,11 @@ export class InitTemplate { } private expand(template: string, project: ProjectInfo) { - const MATCH_VER_BUILD = /\+[a-f0-9]+$/; // Matches "+BUILD" in "x.y.z-beta+BUILD" - // eslint-disable-next-line @typescript-eslint/no-require-imports - const cdkVersion = require('../package.json').version.replace(MATCH_VER_BUILD, ''); // eslint-disable-next-line @typescript-eslint/no-require-imports - const constructsVersion = require('../package.json').devDependencies.constructs.replace(MATCH_VER_BUILD, ''); + const manifest = require(path.join(rootDir(), 'package.json')); + const MATCH_VER_BUILD = /\+[a-f0-9]+$/; // Matches "+BUILD" in "x.y.z-beta+BUILD" + const cdkVersion = manifest.version.replace(MATCH_VER_BUILD, ''); + const constructsVersion = manifest.devDependencies.constructs.replace(MATCH_VER_BUILD, ''); return template.replace(/%name%/g, project.name) .replace(/%name\.camelCased%/g, camelCase(project.name)) .replace(/%name\.PascalCased%/g, camelCase(project.name, { pascalCase: true })) From fffa05125e7f6b73901e45d40812c99372319304 Mon Sep 17 00:00:00 2001 From: epolon Date: Tue, 1 Feb 2022 09:22:46 +0200 Subject: [PATCH 08/63] mid work --- .../@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts | 1 - .../@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts | 1 - .../cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts | 1 - .../@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts | 1 - packages/@aws-cdk/cx-api/lib/cloud-artifact.ts | 2 -- packages/@aws-cdk/cx-api/lib/index.ts | 4 ---- packages/aws-cdk-lib/package.json | 5 ++++- 7 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts delete mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts delete mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts delete mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts deleted file mode 100644 index 27f20bfe4a380..0000000000000 --- a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts +++ /dev/null @@ -1 +0,0 @@ -export { AssetManifestArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts deleted file mode 100644 index c6e926b03830d..0000000000000 --- a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts +++ /dev/null @@ -1 +0,0 @@ -export { CloudFormationStackArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts deleted file mode 100644 index bc7600205cf2d..0000000000000 --- a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts +++ /dev/null @@ -1 +0,0 @@ -export { NestedCloudAssemblyArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts deleted file mode 100644 index 482d6b1f84189..0000000000000 --- a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts +++ /dev/null @@ -1 +0,0 @@ -export { TreeCloudArtifact } from '../cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts index 49dd86a5ff260..d480add47d171 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts @@ -25,5 +25,3 @@ export interface AwsCloudFormationStackProperties { */ readonly terminationProtection?: boolean; } - -export { CloudArtifact } from './cloud-assembly'; diff --git a/packages/@aws-cdk/cx-api/lib/index.ts b/packages/@aws-cdk/cx-api/lib/index.ts index 0b0d7b519e5d7..34d44f456f5c8 100644 --- a/packages/@aws-cdk/cx-api/lib/index.ts +++ b/packages/@aws-cdk/cx-api/lib/index.ts @@ -7,10 +7,6 @@ export * from './context/endpoint-service-availability-zones'; export * from './context/security-group'; export * from './context/key'; export * from './cloud-artifact'; -export * from './artifacts/asset-manifest-artifact'; -export * from './artifacts/cloudformation-artifact'; -export * from './artifacts/tree-cloud-artifact'; -export * from './artifacts/nested-cloud-assembly-artifact'; export * from './cloud-assembly'; export * from './assets'; export * from './environment'; diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index e2ec7540fb741..61d5b8455d10f 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -433,7 +433,6 @@ "./aws-codestarconnections": "./aws-codestarconnections/index.js", "./aws-codestarnotifications": "./aws-codestarnotifications/index.js", "./aws-cognito": "./aws-cognito/index.js", - "./aws-cognito-identitypool": "./aws-cognito-identitypool/index.js", "./aws-config": "./aws-config/index.js", "./aws-connect": "./aws-connect/index.js", "./aws-cur": "./aws-cur/index.js", @@ -472,6 +471,7 @@ "./aws-finspace": "./aws-finspace/index.js", "./aws-fis": "./aws-fis/index.js", "./aws-fms": "./aws-fms/index.js", + "./aws-forecast": "./aws-forecast/index.js", "./aws-frauddetector": "./aws-frauddetector/index.js", "./aws-fsx": "./aws-fsx/index.js", "./aws-gamelift": "./aws-gamelift/index.js", @@ -486,6 +486,7 @@ "./aws-iam": "./aws-iam/index.js", "./aws-imagebuilder": "./aws-imagebuilder/index.js", "./aws-inspector": "./aws-inspector/index.js", + "./aws-inspectorv2": "./aws-inspectorv2/index.js", "./aws-iot": "./aws-iot/index.js", "./aws-iot1click": "./aws-iot1click/index.js", "./aws-iotanalytics": "./aws-iotanalytics/index.js", @@ -499,7 +500,9 @@ "./aws-kendra": "./aws-kendra/index.js", "./aws-kinesis": "./aws-kinesis/index.js", "./aws-kinesisanalytics": "./aws-kinesisanalytics/index.js", + "./aws-kinesisanalyticsv2": "./aws-kinesisanalyticsv2/index.js", "./aws-kinesisfirehose": "./aws-kinesisfirehose/index.js", + "./aws-kinesisvideo": "./aws-kinesisvideo/index.js", "./aws-kms": "./aws-kms/index.js", "./aws-lakeformation": "./aws-lakeformation/index.js", "./aws-lambda": "./aws-lambda/index.js", From 93b002894d084c24620dc5e4e052fcf9b2ecea07 Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 6 Feb 2022 13:29:47 +0200 Subject: [PATCH 09/63] mid work --- packages/aws-cdk/bin/cdk | 11 +- packages/aws-cdk/package.json | 8 +- .../@aws-cdk/cdk-build-tools/bin/cdk-build.ts | 6 + .../cdk-build-tools/lib/package-info.ts | 15 + tools/@aws-cdk/cdk-build-tools/package.json | 1 + tools/@aws-cdk/node-bundle/.eslintrc.json | 231 +++ tools/@aws-cdk/node-bundle/.gitattributes | 16 + tools/@aws-cdk/node-bundle/.gitignore | 44 + tools/@aws-cdk/node-bundle/.npmignore | 21 + tools/@aws-cdk/node-bundle/.projen/deps.json | 96 + tools/@aws-cdk/node-bundle/.projen/files.json | 15 + tools/@aws-cdk/node-bundle/.projen/tasks.json | 293 ++++ tools/@aws-cdk/node-bundle/.projenrc.js | 11 + tools/@aws-cdk/node-bundle/LICENSE | 202 +++ tools/@aws-cdk/node-bundle/README.md | 1 + tools/@aws-cdk/node-bundle/package.json | 95 + .../@aws-cdk/node-bundle/src/attributions.ts | 13 + tools/@aws-cdk/node-bundle/src/bundle.ts | 110 ++ tools/@aws-cdk/node-bundle/src/index.ts | 2 + tools/@aws-cdk/node-bundle/src/shell.ts | 36 + .../@aws-cdk/node-bundle/test/bundle.test.ts | 12 + tools/@aws-cdk/node-bundle/tsconfig.dev.json | 36 + tools/@aws-cdk/node-bundle/tsconfig.json | 34 + yarn.lock | 1556 ++++++++++++++++- 24 files changed, 2796 insertions(+), 69 deletions(-) create mode 100644 tools/@aws-cdk/node-bundle/.eslintrc.json create mode 100644 tools/@aws-cdk/node-bundle/.gitattributes create mode 100644 tools/@aws-cdk/node-bundle/.gitignore create mode 100644 tools/@aws-cdk/node-bundle/.npmignore create mode 100644 tools/@aws-cdk/node-bundle/.projen/deps.json create mode 100644 tools/@aws-cdk/node-bundle/.projen/files.json create mode 100644 tools/@aws-cdk/node-bundle/.projen/tasks.json create mode 100644 tools/@aws-cdk/node-bundle/.projenrc.js create mode 100644 tools/@aws-cdk/node-bundle/LICENSE create mode 100644 tools/@aws-cdk/node-bundle/README.md create mode 100644 tools/@aws-cdk/node-bundle/package.json create mode 100644 tools/@aws-cdk/node-bundle/src/attributions.ts create mode 100644 tools/@aws-cdk/node-bundle/src/bundle.ts create mode 100644 tools/@aws-cdk/node-bundle/src/index.ts create mode 100644 tools/@aws-cdk/node-bundle/src/shell.ts create mode 100644 tools/@aws-cdk/node-bundle/test/bundle.test.ts create mode 100644 tools/@aws-cdk/node-bundle/tsconfig.dev.json create mode 100644 tools/@aws-cdk/node-bundle/tsconfig.json diff --git a/packages/aws-cdk/bin/cdk b/packages/aws-cdk/bin/cdk index 84c7b1bc15301..280814a578a49 100755 --- a/packages/aws-cdk/bin/cdk +++ b/packages/aws-cdk/bin/cdk @@ -1,11 +1,2 @@ #!/usr/bin/env node -try { - require('./cdk-bundle.js'); -} catch (e) { - if (e.message.includes('Cannot find module')) { - // require('./cdk.js'); - throw new Error('FAIL') - } else { - throw e; - } -} +require('./cdk.js'); diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index efc231dcdbd44..aa79934594e67 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -5,7 +5,13 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "bin": { - "cdk": "bin/cdk" + "cdk": "bin/cdk.js" + }, + "cdk-build": { + "bundle": true, + "bundleProps": { + "externals": ["fsevents"] + } }, "scripts": { "build": "cdk-build", diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts index e44d7f49de276..b387235bd171e 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts @@ -1,3 +1,4 @@ +import { Bundle } from 'node-bundle-projen'; import * as yargs from 'yargs'; import { compileCurrentPackage } from '../lib/compile'; import { lintCurrentPackage } from '../lib/lint'; @@ -53,6 +54,11 @@ async function main() { await compileCurrentPackage(options, timers, overrides); await lintCurrentPackage(options, { ...overrides, fix: args.fix }); + if (options.bundle) { + const bundle = new Bundle(process.cwd(), options.bundleProps); + await bundle.validate({ failOnWarnings: true }); + } + if (options.post) { const commands = options.post.join(' && '); await shell([commands], { timers, env }); diff --git a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts index 513d1b8dfdd11..4d148087c47ea 100644 --- a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts +++ b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -1,6 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as util from 'util'; +import * as bundle from 'node-bundle-projen'; const readdir = util.promisify(fs.readdir); const stat = util.promisify(fs.stat); @@ -172,6 +173,20 @@ export interface CDKBuildOptions { * @see https://aws.github.io/jsii/user-guides/lib-author/toolchain/jsii/#-strip-deprecated */ stripDeprecated?: boolean; + + /** + * Should the package be bundled. + * + * @default false + */ + bundle?: boolean; + + /** + * Bundling configuration. + * + * @default - default configuration. + */ + bundleProps?: bundle.BundleProps; } export interface CDKPackageOptions { diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 203d7142e47f3..97b49fb53f225 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -44,6 +44,7 @@ "dependencies": { "@aws-cdk/eslint-plugin": "0.0.0", "@aws-cdk/yarn-cling": "0.0.0", + "node-bundle-projen": "0.0.0", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "awslint": "0.0.0", diff --git a/tools/@aws-cdk/node-bundle/.eslintrc.json b/tools/@aws-cdk/node-bundle/.eslintrc.json new file mode 100644 index 0000000000000..f7cd22558ee71 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.eslintrc.json @@ -0,0 +1,231 @@ +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "!.projenrc.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage" + ], + "rules": { + "indent": [ + "off" + ], + "@typescript-eslint/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": [ + "error" + ], + "curly": [ + "error", + "multi-line", + "consistent" + ], + "@typescript-eslint/member-delimiter-style": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "quote-props": [ + "error", + "consistent-as-needed" + ], + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/test/**", + "**/build-tools/**" + ], + "optionalDependencies": false, + "peerDependencies": true + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "warn", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "no-duplicate-imports": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error" + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": [ + "off" + ], + "@typescript-eslint/return-await": [ + "error" + ], + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ] + }, + "overrides": [ + { + "files": [ + ".projenrc.js" + ], + "rules": { + "@typescript-eslint/no-require-imports": "off", + "import/no-extraneous-dependencies": "off" + } + } + ] +} diff --git a/tools/@aws-cdk/node-bundle/.gitattributes b/tools/@aws-cdk/node-bundle/.gitattributes new file mode 100644 index 0000000000000..1bbfc34fa31fc --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.gitattributes @@ -0,0 +1,16 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +*.snap linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/.gitignore b/tools/@aws-cdk/node-bundle/.gitignore new file mode 100644 index 0000000000000..84f9bab1734dc --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.gitignore @@ -0,0 +1,44 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +!/.projenrc.js +/test-reports/ +junit.xml +/coverage/ +/dist/changelog.md +/dist/version.txt +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/src/ +/lib +/dist/ +!/.eslintrc.json diff --git a/tools/@aws-cdk/node-bundle/.npmignore b/tools/@aws-cdk/node-bundle/.npmignore new file mode 100644 index 0000000000000..ad0995b91db88 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.npmignore @@ -0,0 +1,21 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/coverage/ +/dist/changelog.md +/dist/version.txt +/test/ +/tsconfig.dev.json +/src/ +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json diff --git a/tools/@aws-cdk/node-bundle/.projen/deps.json b/tools/@aws-cdk/node-bundle/.projen/deps.json new file mode 100644 index 0000000000000..2227a4a0c3d26 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.projen/deps.json @@ -0,0 +1,96 @@ +{ + "dependencies": [ + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/madge", + "type": "build" + }, + { + "name": "@types/node", + "version": "^12", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^5", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^5", + "type": "build" + }, + { + "name": "eslint-import-resolver-node", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint", + "version": "^8", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^13", + "type": "build" + }, + { + "name": "json-schema", + "type": "build" + }, + { + "name": "npm-check-updates", + "version": "^12", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "standard-version", + "version": "^9", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "type": "build" + }, + { + "name": "chalk", + "type": "runtime" + }, + { + "name": "esbuild", + "type": "runtime" + }, + { + "name": "madge", + "type": "runtime" + }, + { + "name": "shlex", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/tools/@aws-cdk/node-bundle/.projen/files.json b/tools/@aws-cdk/node-bundle/.projen/files.json new file mode 100644 index 0000000000000..5832714dcf52d --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.projen/files.json @@ -0,0 +1,15 @@ +{ + "files": [ + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/tools/@aws-cdk/node-bundle/.projen/tasks.json b/tools/@aws-cdk/node-bundle/.projen/tasks.json new file mode 100644 index 0000000000000..99288b4f0374e --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.projen/tasks.json @@ -0,0 +1,293 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "default" + }, + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps version based on latest git tag and generates a changelog entry", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt" + }, + "steps": [ + { + "builtin": "release/bump-version" + } + ], + "condition": "! git log --oneline -1 | grep -q \"chore(release):\"" + }, + "clobber": { + "name": "clobber", + "description": "hard resets to HEAD of origin and cleans the local repo", + "env": { + "BRANCH": "$(git branch --show-current)" + }, + "steps": [ + { + "exec": "git checkout -b scratch", + "name": "save current HEAD in \"scratch\" branch" + }, + { + "exec": "git checkout $BRANCH" + }, + { + "exec": "git fetch origin", + "name": "fetch latest changes from origin" + }, + { + "exec": "git reset --hard origin/$BRANCH", + "name": "hard reset to origin commit" + }, + { + "exec": "git clean -fdx", + "name": "clean all untracked files" + }, + { + "say": "ready to rock! (unpushed commits are under the \"scratch\" branch)" + } + ], + "condition": "git diff --exit-code > /dev/null" + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build" + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "node .projenrc.js" + } + ] + }, + "eject": { + "name": "eject", + "description": "Remove projen from the project", + "env": { + "PROJEN_EJECTING": "true" + }, + "steps": [ + { + "spawn": "default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.js" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package", + "steps": [ + { + "exec": "mkdir -p dist/js" + }, + { + "exec": "mv $(npm pack) dist/js/" + } + ] + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "post-upgrade": { + "name": "post-upgrade", + "description": "Runs after upgrading dependencies" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "release": { + "name": "release", + "description": "Prepare a release from \"main\" branch", + "env": { + "RELEASE": "true" + }, + "steps": [ + { + "exec": "rm -fr dist" + }, + { + "spawn": "bump" + }, + { + "spawn": "build" + }, + { + "spawn": "unbump" + }, + { + "exec": "git diff --ignore-space-at-eol --exit-code" + } + ] + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --all --updateSnapshot" + }, + { + "spawn": "eslint" + } + ] + }, + "test:update": { + "name": "test:update", + "description": "Update jest snapshots", + "steps": [ + { + "exec": "jest --updateSnapshot" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Restores version to 0.0.0", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt" + }, + "steps": [ + { + "builtin": "release/reset-version" + } + ] + }, + "upgrade": { + "name": "upgrade", + "description": "upgrade dependencies", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='projen'" + }, + { + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='projen'" + }, + { + "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='projen'" + }, + { + "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='projen'" + }, + { + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='projen'" + }, + { + "exec": "yarn install --check-files" + }, + { + "exec": "yarn upgrade @types/jest @types/madge @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit json-schema npm-check-updates standard-version ts-jest typescript chalk esbuild madge shlex" + }, + { + "exec": "npx projen" + }, + { + "spawn": "post-upgrade" + } + ] + }, + "upgrade-projen": { + "name": "upgrade-projen", + "description": "upgrade projen", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npm-check-updates --dep dev --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep optional --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep peer --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep prod --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --filter='projen'" + }, + { + "exec": "yarn install --check-files" + }, + { + "exec": "yarn upgrade projen" + }, + { + "exec": "npx projen" + }, + { + "spawn": "post-upgrade" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node -e \\\"console.log(process.env.PATH)\\\"\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js new file mode 100644 index 0000000000000..db78c27c1aa1b --- /dev/null +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -0,0 +1,11 @@ +const { typescript } = require('projen'); +const project = new typescript.TypeScriptProject({ + name: '@aws-cdk/node-bundle', + github: false, + devDeps: ['@types/madge'], + deps: ['esbuild', 'madge', 'chalk', 'shlex'], + + // required by projen even though 'github' is false. + defaultReleaseBranch: 'main', +}); +project.synth(); \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/LICENSE b/tools/@aws-cdk/node-bundle/LICENSE new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md new file mode 100644 index 0000000000000..b3fa7ddcdad6a --- /dev/null +++ b/tools/@aws-cdk/node-bundle/README.md @@ -0,0 +1 @@ +# replace this \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json new file mode 100644 index 0000000000000..47b492573d398 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/package.json @@ -0,0 +1,95 @@ +{ + "name": "node-bundle-projen", + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "clobber": "npx projen clobber", + "compile": "npx projen compile", + "default": "npx projen default", + "eject": "npx projen eject", + "eslint": "npx projen eslint", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "post-upgrade": "npx projen post-upgrade", + "pre-compile": "npx projen pre-compile", + "release": "npx projen release", + "test": "npx projen test", + "test:update": "npx projen test:update", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "upgrade": "npx projen upgrade", + "upgrade-projen": "npx projen upgrade-projen", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "devDependencies": { + "@types/jest": "^27.4.0", + "@types/madge": "^5.0.0", + "@types/node": "^12", + "@typescript-eslint/eslint-plugin": "^5", + "@typescript-eslint/parser": "^5", + "eslint": "^8", + "eslint-import-resolver-node": "^0.3.6", + "eslint-import-resolver-typescript": "^2.5.0", + "eslint-plugin-import": "^2.25.4", + "jest": "^27.4.7", + "jest-junit": "^13", + "json-schema": "^0.4.0", + "npm-check-updates": "^12", + "projen": "^0.52.13", + "standard-version": "^9", + "ts-jest": "^27.1.3", + "typescript": "^4.5.5" + }, + "dependencies": { + "chalk": "^4", + "esbuild": "^0.14.17", + "madge": "^5.0.1", + "shlex": "^2.1.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "version": "0.0.0", + "jest": { + "testMatch": [ + "/src/**/__tests__/**/*.ts?(x)", + "/(test|src)/**/?(*.)+(spec|test).ts?(x)" + ], + "clearMocks": true, + "collectCoverage": true, + "coverageReporters": [ + "json", + "lcov", + "clover", + "cobertura", + "text" + ], + "coverageDirectory": "coverage", + "coveragePathIgnorePatterns": [ + "/node_modules/" + ], + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "reporters": [ + "default", + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ] + ], + "preset": "ts-jest", + "globals": { + "ts-jest": { + "tsconfig": "tsconfig.dev.json" + } + } + }, + "types": "lib/index.d.ts", + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/attributions.ts b/tools/@aws-cdk/node-bundle/src/attributions.ts new file mode 100644 index 0000000000000..36f9dc0f3f6b6 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/attributions.ts @@ -0,0 +1,13 @@ +export class Attributions { + + constructor(private readonly packages: Set) {} + + public validate() { + + + } + + public create() { + + } +} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts new file mode 100644 index 0000000000000..b610082147997 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -0,0 +1,110 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import * as esbuild from 'esbuild'; +import { Attributions } from './attributions'; +import { shell } from './shell'; + +export interface BundleProps { + + /** + * @default - no external references + */ + readonly externals?: string[]; + +} + +export interface ValidateOptions { + /** + * @default true + */ + readonly failOnWarnings?: boolean; +} + +export interface PackOptions extends ValidateOptions { + /** + * @default - current working directory + */ + readonly outDir?: string; +} + + +export class Bundle { + + private readonly manifest: any; + + constructor(private readonly packageDir: string, private readonly props: BundleProps = {}) { + const packageJson = path.join(packageDir, 'package.json'); + if (!fs.existsSync(packageJson)) { + throw new Error(`Unable to find ${packageJson}`); + } + this.manifest = JSON.parse(fs.readFileSync(packageJson, 'utf-8').toString()); + } + + public async validate(options: ValidateOptions = {}) { + + // support only a single entrypoint for now + const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); + if (bin.length === 0) { + throw new Error('No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); + } + if (bin.length > 1) { + throw new Error('Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); + } + + const entrypoint = bin[0][1]; + + console.log('esbuild | bundling dry-run'); + + const bundle = await esbuild.build({ + entryPoints: [bin[0][1]], + bundle: true, + target: 'node12', + platform: 'node', + metafile: true, + absWorkingDir: this.packageDir, + external: this.props.externals, + write: false, + }); + + if (bundle.warnings.length > 0 && (options.failOnWarnings ?? true)) { + // the warnings themselves are printed during esbuild execution. + throw new Error(`${bundle.warnings.length} bundling warnings detected!`); + } + + const inputs = Object.keys(bundle.metafile!.outputs[path.basename(entrypoint)].inputs); + const dependencies = new Set(inputs.map(i => this.findPackage(i))); + + console.log('madge | detecting circular imports'); + + // we don't use the programatic API since we want to eventually print circles + // which the madge cli already does. + await shell([`${require.resolve('madge/bin/cli.js')} --no-color --no-spinner --circular --extensions js`, ...dependencies].join(' ')); + + const attributions = new Attributions(dependencies); + console.log('attributions | validate'); + attributions.validate(); + } + + public pack() { + + } + + private findPackage(inputFile: string) { + + function findPackageUp(dirname: string): string { + const manifestPath = path.join(dirname, 'package.json'); + if (fs.existsSync(manifestPath)) { + return dirname; + } + if (path.dirname(dirname) === dirname) { + throw new Error('Unable to find package manifest'); + } + return findPackageUp(path.dirname(dirname)); + } + + return findPackageUp(path.resolve(this.packageDir, path.dirname(inputFile))); + + } +} + + diff --git a/tools/@aws-cdk/node-bundle/src/index.ts b/tools/@aws-cdk/node-bundle/src/index.ts new file mode 100644 index 0000000000000..0b48aba96c8d2 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/index.ts @@ -0,0 +1,2 @@ +export * from './bundle'; +export * from './attributions'; \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/shell.ts b/tools/@aws-cdk/node-bundle/src/shell.ts new file mode 100644 index 0000000000000..5538f2321bf0d --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/shell.ts @@ -0,0 +1,36 @@ +import * as child_process from 'child_process'; +import chalk from 'chalk'; +import * as shlex from 'shlex'; + +export async function shell(command: string): Promise { + const parts = shlex.split(command); + const child = child_process.spawn(parts[0], parts.slice(1), { + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + const makeRed = process.stderr.isTTY ? chalk.red : (x: string) => x; + + return new Promise((resolve, reject) => { + const stdout = new Array(); + + child.stdout!.on('data', chunk => { + process.stdout.write(chunk); + stdout.push(chunk); + }); + + child.stderr!.on('data', chunk => { + process.stderr.write(makeRed(chunk.toString())); + }); + + child.once('error', reject); + child.once('exit', code => { + if (code === 0) { + resolve(Buffer.concat(stdout).toString('utf-8')); + } else { + reject(new Error(`${parts[0]} exited with error code ${code}`)); + } + }); + }); +} diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts new file mode 100644 index 0000000000000..fdf979d305ebe --- /dev/null +++ b/tools/@aws-cdk/node-bundle/test/bundle.test.ts @@ -0,0 +1,12 @@ +import { Bundle } from '../src'; + +describe('validate', () => { + + test('throws when multiple bin scripts are defined', async () => { + + const bundle = new Bundle('/Users/epolon/dev/src/github.com/aws/aws-cdk/packages/aws-cdk', { externals: ['fsevents'] }); + await bundle.validate(); + + }); + +}); \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/tsconfig.dev.json b/tools/@aws-cdk/node-bundle/tsconfig.dev.json new file mode 100644 index 0000000000000..2e29dbaa7e54b --- /dev/null +++ b/tools/@aws-cdk/node-bundle/tsconfig.dev.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019" + }, + "include": [ + ".projenrc.js", + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/tools/@aws-cdk/node-bundle/tsconfig.json b/tools/@aws-cdk/node-bundle/tsconfig.json new file mode 100644 index 0000000000000..9ffbeed68f512 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/tsconfig.json @@ -0,0 +1,34 @@ +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019" + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/yarn.lock b/yarn.lock index 3600a0c04e4b0..406acac253f03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -182,7 +182,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.10", "@babel/parser@^7.16.12", "@babel/parser@^7.16.7": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.10", "@babel/parser@^7.16.12", "@babel/parser@^7.16.7": version "7.16.12" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.16.12.tgz#9474794f9a650cf5e2f892444227f98e28cdf8b6" integrity sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A== @@ -348,6 +348,21 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^1.0.5": + version "1.0.5" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318" + integrity sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.2.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@gar/promisify@^1.0.1": version "1.1.2" resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" @@ -362,7 +377,16 @@ debug "^4.1.1" minimatch "^3.0.4" -"@humanwhocodes/object-schema@^1.2.0": +"@humanwhocodes/config-array@^0.9.2": + version "0.9.3" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz#f2564c744b387775b436418491f15fce6601f63e" + integrity sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0", "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== @@ -372,6 +396,11 @@ resolved "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== +"@iarna/toml@^2.2.5": + version "2.2.5" + resolved "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" + integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1340,6 +1369,16 @@ node-gyp "^7.1.0" read-package-json-fast "^2.0.1" +"@npmcli/run-script@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz#9949c0cab415b17aaac279646db4f027d6f1e743" + integrity sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig== + dependencies: + "@npmcli/node-gyp" "^1.0.2" + "@npmcli/promise-spawn" "^1.3.2" + node-gyp "^8.2.0" + read-package-json-fast "^2.0.1" + "@octokit/auth-token@^2.4.0", "@octokit/auth-token@^2.4.4": version "2.5.0" resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" @@ -1499,6 +1538,40 @@ dependencies: "@octokit/openapi-types" "^11.2.0" +"@oozcitak/dom@1.15.8": + version "1.15.8" + resolved "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz#0c0c7bb54cfdaadc07fd637913e706101721d15d" + integrity sha512-MoOnLBNsF+ok0HjpAvxYxR4piUhRDCEWK0ot3upwOOHYudJd30j6M+LNcE8RKpwfnclAX9T66nXXzkytd29XSw== + dependencies: + "@oozcitak/infra" "1.0.8" + "@oozcitak/url" "1.0.4" + "@oozcitak/util" "8.3.8" + +"@oozcitak/infra@1.0.8": + version "1.0.8" + resolved "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz#b0b089421f7d0f6878687608301fbaba837a7d17" + integrity sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg== + dependencies: + "@oozcitak/util" "8.3.8" + +"@oozcitak/url@1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz#ca8b1c876319cf5a648dfa1123600a6aa5cda6ba" + integrity sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw== + dependencies: + "@oozcitak/infra" "1.0.8" + "@oozcitak/util" "8.3.8" + +"@oozcitak/util@8.3.8": + version "8.3.8" + resolved "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz#10f65fe1891fd8cde4957360835e78fd1936bfdd" + integrity sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ== + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1", "@sinonjs/commons@^1.8.3": version "1.8.3" resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -1550,11 +1623,23 @@ resolved "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + "@tsconfig/node10@^1.0.7": version "1.0.8" resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" @@ -1717,6 +1802,13 @@ resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== +"@types/madge@^5.0.0": + version "5.0.0" + resolved "https://registry.npmjs.org/@types/madge/-/madge-5.0.0.tgz#5b77c542cb547157b73c7d3c01c82ba81fdec5ca" + integrity sha512-Son5Z121knxCXlQM3Q0ivh0OP8Fix4ztGl0VfA9JybQMPQprc2K4jtTaRc3IhGyBy6ku5cWKJxEuj8zePiZbBQ== + dependencies: + "@types/node" "*" + "@types/md5@^2.3.1": version "2.3.1" resolved "https://registry.npmjs.org/@types/md5/-/md5-2.3.1.tgz#010bcf3bb50a2cff3a574cb1c0b4051a9c67d6bc" @@ -1761,6 +1853,11 @@ resolved "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== +"@types/node@^12": + version "12.20.43" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.43.tgz#6cf47894da4a4748c62fccf720ba269e1b1ff5a4" + integrity sha512-HCfJdaYqJX3BCzeihgZrD7b85Cu05OC/GVJ4kEYIflwUs4jbnUlLLWoq7hw1LBcdvUyehO+gr6P5JQ895/2ZfA== + "@types/node@^16.9.2": version "16.11.21" resolved "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz#474d7589a30afcf5291f59bd49cca9ad171ffde4" @@ -1896,6 +1993,21 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@^5": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz#f8c1d59fc37bd6d9d11c97267fdfe722c4777152" + integrity sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q== + dependencies: + "@typescript-eslint/scope-manager" "5.10.2" + "@typescript-eslint/type-utils" "5.10.2" + "@typescript-eslint/utils" "5.10.2" + debug "^4.3.2" + functional-red-black-tree "^1.0.1" + ignore "^5.1.8" + regexpp "^3.2.0" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/experimental-utils@4.33.0", "@typescript-eslint/experimental-utils@^4.0.1": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" @@ -1918,6 +2030,16 @@ "@typescript-eslint/typescript-estree" "4.33.0" debug "^4.3.1" +"@typescript-eslint/parser@^5": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz#b6076d27cc5499ce3f2c625f5ccde946ecb7db9a" + integrity sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg== + dependencies: + "@typescript-eslint/scope-manager" "5.10.2" + "@typescript-eslint/types" "5.10.2" + "@typescript-eslint/typescript-estree" "5.10.2" + debug "^4.3.2" + "@typescript-eslint/scope-manager@4.33.0": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" @@ -1926,12 +2048,34 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" +"@typescript-eslint/scope-manager@5.10.2": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz#92c0bc935ec00f3d8638cdffb3d0e70c9b879639" + integrity sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw== + dependencies: + "@typescript-eslint/types" "5.10.2" + "@typescript-eslint/visitor-keys" "5.10.2" + +"@typescript-eslint/type-utils@5.10.2": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.2.tgz#ad5acdf98a7d2ab030bea81f17da457519101ceb" + integrity sha512-uRKSvw/Ccs5FYEoXW04Z5VfzF2iiZcx8Fu7DGIB7RHozuP0VbKNzP1KfZkHBTM75pCpsWxIthEH1B33dmGBKHw== + dependencies: + "@typescript-eslint/utils" "5.10.2" + debug "^4.3.2" + tsutils "^3.21.0" + "@typescript-eslint/types@4.33.0": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/typescript-estree@4.33.0": +"@typescript-eslint/types@5.10.2": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz#604d15d795c4601fffba6ecb4587ff9fdec68ce8" + integrity sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w== + +"@typescript-eslint/typescript-estree@4.33.0", "@typescript-eslint/typescript-estree@^4.8.2": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== @@ -1944,6 +2088,31 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.10.2": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz#810906056cd3ddcb35aa333fdbbef3713b0fe4a7" + integrity sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ== + dependencies: + "@typescript-eslint/types" "5.10.2" + "@typescript-eslint/visitor-keys" "5.10.2" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.10.2": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.2.tgz#1fcd37547c32c648ab11aea7173ec30060ee87a8" + integrity sha512-vuJaBeig1NnBRkf7q9tgMLREiYD7zsMrsN1DA3wcoMDvr3BTFiIpKjGiYZoKPllfEwN7spUjv7ZqD+JhbVjEPg== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.10.2" + "@typescript-eslint/types" "5.10.2" + "@typescript-eslint/typescript-estree" "5.10.2" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + "@typescript-eslint/visitor-keys@4.33.0": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" @@ -1952,6 +2121,14 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@5.10.2": + version "5.10.2" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz#fdbf272d8e61c045d865bd6c8b41bea73d222f3d" + integrity sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q== + dependencies: + "@typescript-eslint/types" "5.10.2" + eslint-visitor-keys "^3.0.0" + "@xmldom/xmldom@^0.8.0": version "0.8.0" resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.0.tgz#9f83fd9b3506c9603baad67e44eb6e6ee8eee0ce" @@ -2008,7 +2185,7 @@ acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4, acorn@^8.4.1: +acorn@^8.2.4, acorn@^8.4.1, acorn@^8.7.0: version "8.7.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== @@ -2062,6 +2239,13 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" +ansi-align@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== + dependencies: + string-width "^4.1.0" + ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -2111,6 +2295,11 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +app-module-path@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" + integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= + app-root-path@^2.2.1: version "2.2.1" resolved "https://registry.npmjs.org/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" @@ -2128,7 +2317,7 @@ aproba@^1.0.3: resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -aproba@^2.0.0: +"aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== @@ -2167,6 +2356,14 @@ archy@^1.0.0: resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" @@ -2254,6 +2451,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= +ast-module-types@^2.3.2, ast-module-types@^2.4.0, ast-module-types@^2.7.0, ast-module-types@^2.7.1: + version "2.7.1" + resolved "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz#3f7989ef8dfa1fdb82dfe0ab02bdfc7c77a57dd3" + integrity sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw== + ast-types@^0.13.2: version "0.13.4" resolved "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" @@ -2420,7 +2622,7 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bl@^4.0.3: +bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -2434,6 +2636,20 @@ bluebird@^3.5.0: resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== +boxen@^5.0.0: + version "5.1.2" + resolved "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" + integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.2" + type-fest "^0.20.2" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2555,6 +2771,19 @@ cacache@^15.0.5, cacache@^15.2.0: tar "^6.0.2" unique-filename "^1.1.1" +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + caching-transform@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" @@ -2649,7 +2878,7 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@^4, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2715,6 +2944,11 @@ ci-info@^3.2.0: resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== +cint@^8.2.1: + version "8.2.1" + resolved "https://registry.npmjs.org/cint/-/cint-8.2.1.tgz#70386b1b48e2773d0d63166a55aff94ef4456a12" + integrity sha1-cDhrG0jidz0NYxZqVa/5TvRFahI= + cjs-module-lexer@^1.0.0: version "1.2.2" resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" @@ -2725,6 +2959,11 @@ clean-stack@^2.0.0: resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + cli-color@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/cli-color/-/cli-color-2.0.1.tgz#93e3491308691f1e46beb78b63d0fb2585e42ba6" @@ -2743,6 +2982,18 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-spinners@^2.5.0: + version "2.6.1" + resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== + +cli-table@^0.3.11: + version "0.3.11" + resolved "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee" + integrity sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ== + dependencies: + colors "1.0.3" + cli-width@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -2775,6 +3026,13 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + clone@^1.0.2: version "1.0.4" resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -2830,12 +3088,17 @@ color-name@1.1.3: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@~1.1.4: +color-name@^1.1.4, color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colors@1.4.0: +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + +colors@1.0.3, colors@1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -2855,7 +3118,17 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@~8.3.0: +commander@^2.16.0, commander@^2.20.3, commander@^2.8.1: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + +commander@^8.3.0, commander@~8.3.0: version "8.3.0" resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== @@ -2916,7 +3189,19 @@ config-chain@^1.1.12: ini "^1.3.4" proto-list "~1.2.1" -console-control-strings@^1.0.0, console-control-strings@~1.1.0: +configstore@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" + integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== + dependencies: + dot-prop "^5.2.0" + graceful-fs "^4.1.2" + make-dir "^3.0.0" + unique-string "^2.0.0" + write-file-atomic "^3.0.0" + xdg-basedir "^4.0.0" + +console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= @@ -3216,6 +3501,11 @@ crypt@0.0.2: resolved "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +crypto-random-string@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" + integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== + cssom@^0.4.4: version "0.4.4" resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -3277,7 +3567,7 @@ dateformat@^3.0.0: resolved "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -3331,6 +3621,13 @@ decode-uri-component@^0.2.0: resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= +decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -3386,6 +3683,11 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + define-properties@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3423,6 +3725,17 @@ depd@^1.1.2, depd@~1.1.2: resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +dependency-tree@^8.1.1: + version "8.1.2" + resolved "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.1.2.tgz#c9e652984f53bd0239bc8a3e50cbd52f05b2e770" + integrity sha512-c4CL1IKxkKng0oT5xrg4uNiiMVFqTGOXqHSFx7XEFdgSsp6nw3AGGruICppzJUrfad/r7GLqt26rmWU4h4j39A== + dependencies: + commander "^2.20.3" + debug "^4.3.1" + filing-cabinet "^3.0.1" + precinct "^8.0.0" + typescript "^3.9.7" + deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -3448,6 +3761,93 @@ detect-newline@^3.0.0, detect-newline@^3.1.0: resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== +detective-amd@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/detective-amd/-/detective-amd-3.1.0.tgz#92daee3214a0ca4522646cf333cac90a3fca6373" + integrity sha512-G7wGWT6f0VErjUkE2utCm7IUshT7nBh7aBBH2VBOiY9Dqy2DMens5iiOvYCuhstoIxRKLrnOvVAz4/EyPIAjnw== + dependencies: + ast-module-types "^2.7.0" + escodegen "^2.0.0" + get-amd-module-type "^3.0.0" + node-source-walk "^4.0.0" + +detective-cjs@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/detective-cjs/-/detective-cjs-3.1.1.tgz#18da3e39a002d2098a1123d45ce1de1b0d9045a0" + integrity sha512-JQtNTBgFY6h8uT6pgph5QpV3IyxDv+z3qPk/FZRDT9TlFfm5dnRtpH39WtQEr1khqsUxVqXzKjZHpdoQvQbllg== + dependencies: + ast-module-types "^2.4.0" + node-source-walk "^4.0.0" + +detective-es6@^2.2.0, detective-es6@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/detective-es6/-/detective-es6-2.2.1.tgz#090c874e2cdcda677389cc2ae36f0b37faced187" + integrity sha512-22z7MblxkhsIQGuALeGwCKEfqNy4WmgDGmfJCwdXbfDkVYIiIDmY513hiIWBvX3kCmzvvWE7RR7kAYxs01wwKQ== + dependencies: + node-source-walk "^4.0.0" + +detective-less@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/detective-less/-/detective-less-1.0.2.tgz#a68af9ca5f69d74b7d0aa190218b211d83b4f7e3" + integrity sha512-Rps1xDkEEBSq3kLdsdnHZL1x2S4NGDcbrjmd4q+PykK5aJwDdP5MBgrJw1Xo+kyUHuv3JEzPqxr+Dj9ryeDRTA== + dependencies: + debug "^4.0.0" + gonzales-pe "^4.2.3" + node-source-walk "^4.0.0" + +detective-postcss@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/detective-postcss/-/detective-postcss-4.0.0.tgz#24e69b465e5fefe7a6afd05f7e894e34595dbf51" + integrity sha512-Fwc/g9VcrowODIAeKRWZfVA/EufxYL7XfuqJQFroBKGikKX83d2G7NFw6kDlSYGG3LNQIyVa+eWv1mqre+v4+A== + dependencies: + debug "^4.1.1" + is-url "^1.2.4" + postcss "^8.1.7" + postcss-values-parser "^2.0.1" + +detective-postcss@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/detective-postcss/-/detective-postcss-5.0.0.tgz#7d39bde17a280e26d0b43130fd735a4a75786fb0" + integrity sha512-IBmim4GTEmZJDBOAoNFBskzNryTmYpBq+CQGghKnSGkoGWascE8iEo98yA+ZM4N5slwGjCr/NxCm+Kzg+q3tZg== + dependencies: + debug "^4.3.1" + is-url "^1.2.4" + postcss "^8.2.13" + postcss-values-parser "^5.0.0" + +detective-sass@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/detective-sass/-/detective-sass-3.0.1.tgz#496b819efd1f5c4dd3f0e19b43a8634bdd6927c4" + integrity sha512-oSbrBozRjJ+QFF4WJFbjPQKeakoaY1GiR380NPqwdbWYd5wfl5cLWv0l6LsJVqrgWfFN1bjFqSeo32Nxza8Lbw== + dependencies: + debug "^4.1.1" + gonzales-pe "^4.2.3" + node-source-walk "^4.0.0" + +detective-scss@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/detective-scss/-/detective-scss-2.0.1.tgz#06f8c21ae6dedad1fccc26d544892d968083eaf8" + integrity sha512-VveyXW4WQE04s05KlJ8K0bG34jtHQVgTc9InspqoQxvnelj/rdgSAy7i2DXAazyQNFKlWSWbS+Ro2DWKFOKTPQ== + dependencies: + debug "^4.1.1" + gonzales-pe "^4.2.3" + node-source-walk "^4.0.0" + +detective-stylus@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/detective-stylus/-/detective-stylus-1.0.0.tgz#50aee7db8babb990381f010c63fabba5b58e54cd" + integrity sha1-UK7n24uruZA4HwEMY/q7pbWOVM0= + +detective-typescript@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/detective-typescript/-/detective-typescript-7.0.0.tgz#8c8917f2e51d9e4ee49821abf759ff512dd897f2" + integrity sha512-y/Ev98AleGvl43YKTNcA2Q+lyFmsmCfTTNWy4cjEJxoLkbobcXtRS0Kvx06daCgr2GdtlwLfNzL553BkktfJoA== + dependencies: + "@typescript-eslint/typescript-estree" "^4.8.2" + ast-module-types "^2.7.1" + node-source-walk "^4.2.0" + typescript "^3.9.7" + dezalgo@^1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" @@ -3511,7 +3911,7 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -dot-prop@^5.1.0: +dot-prop@^5.1.0, dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== @@ -3550,6 +3950,11 @@ dreamopt@~0.8.0: dependencies: wordwrap ">=0.0.2" +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + duplexer@^0.1.1: version "0.1.2" resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -3592,6 +3997,14 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" +enhanced-resolve@^5.8.3: + version "5.8.3" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0" + integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.5: version "2.3.6" resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -3726,91 +4139,205 @@ esbuild-android-arm64@0.14.14: resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.14.tgz#3705f32f209deeb11c275af47c298c8783dd5f0c" integrity sha512-be/Uw6DdpQiPfula1J4bdmA+wtZ6T3BRCZsDMFB5X+k0Gp8TIh9UvmAcqvKNnbRAafSaXG3jPCeXxDKqnc8hFQ== +esbuild-android-arm64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.17.tgz#7216810cb8d5b8cd03ce70bdc241dcdd90c34755" + integrity sha512-y7EJm8ADC9qKbo/dJ2zBXwNdIILJ76tTv7JDGvOkbLT8HJXIsgbpa0NJk7iFhyvP4GpsYvXTbvEQNn0DhyBhLA== + esbuild-darwin-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.14.tgz#c07e4eae6d938300a2d330ea82494c55bcea84e5" integrity sha512-BEexYmjWafcISK8cT6O98E3TfcLuZL8DKuubry6G54n2+bD4GkoRD6HYUOnCkfl2p7jodA+s4369IjSFSWjtHg== +esbuild-darwin-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.17.tgz#1419e020f41814f8a74ce92b2dcab29a6d47e510" + integrity sha512-V2JAP8yyVbW6qR4SVXsEDqRicYM0x5niUuB05IFiE5itPI45k8j2dA2l+DtirR2SGXr+LEqgX347+2VA6eyTiA== + esbuild-darwin-arm64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.14.tgz#a8631e13a51a6f784fb0906e2a64c6ab53988755" integrity sha512-tnBKm41pDOB1GtZ8q/w26gZlLLRzVmP8fdsduYjvM+yFD7E2DLG4KbPAqFMWm4Md9B+DitBglP57FY7AznxbTg== +esbuild-darwin-arm64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.17.tgz#95acf1022066d48346a63ffc5e4d36a07b83c9b0" + integrity sha512-ENkSKpjF4SImyA2TdHhKiZqtYc1DkMykICe1KSBw0YNF1sentjFI6wu+CRiYMpC7REf/3TQXoems2XPqIqDMlQ== + esbuild-freebsd-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.14.tgz#c280c2b944746b27ee6c6487c2691865c90bed2e" integrity sha512-Q9Rx6sgArOHalQtNwAaIzJ6dnQ8A+I7f/RsQsdkS3JrdzmnlFo8JEVofTmwVQLoIop7OKUqIVOGP4PoQcwfVMA== +esbuild-freebsd-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.17.tgz#a3455199862110854937b05a0eecbed3e1aeec41" + integrity sha512-2i0nTNJM8ftNTvtR00vdqkru8XpHwAbkR2MBLoK2IDSzjsLStwCj+mxf6v83eVM9Abe3QA8xP+irqOdBlwDQ2g== + esbuild-freebsd-arm64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.14.tgz#aa4e21276efcf20e5ab2487e91ca1d789573189b" integrity sha512-TJvq0OpLM7BkTczlyPIphcvnwrQwQDG1HqxzoYePWn26SMUAlt6wrLnEvxdbXAvNvDLVzG83kA+JimjK7aRNBA== +esbuild-freebsd-arm64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.17.tgz#8a70f2a36f5b0da7d2efdd6fd02aa78611007fd0" + integrity sha512-QOmRi1n+uly2G7BbMbHb86YiFA5aM7B2T96A6OF1VG57LNwXwy8LPVM0PVjl7f9cV3pE3fy3VtXPJHJo8XggTA== + esbuild-linux-32@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.14.tgz#3db4d929239203ce38a9060d5419ac6a6d28846c" integrity sha512-h/CrK9Baimt5VRbu8gqibWV7e1P9l+mkanQgyOgv0Ng3jHT1NVFC9e6rb1zbDdaJVmuhWX5xVliUA5bDDCcJeg== +esbuild-linux-32@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.17.tgz#b7123f6e4780687e017454604d909fbe558862e9" + integrity sha512-qG5NDk7FHHUVw01rjHESON0HvigF2X80b645TUlgTKsWRlrbzzHhMCmQguA01O5PiCimKnyoxti8aJIFNHpQnQ== + esbuild-linux-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.14.tgz#f880026254c1f565a7a10fdebb7cff9b083a127d" integrity sha512-IC+wAiIg/egp5OhQp4W44D9PcBOH1b621iRn1OXmlLzij9a/6BGr9NMIL4CRwz4j2kp3WNZu5sT473tYdynOuQ== +esbuild-linux-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.17.tgz#47a6b510c2f7faef595a4d6257a629e65385fdc3" + integrity sha512-De8OcmNvfNyFfQRLWbfuZqau6NpYBJxNTLP7Ls/PqQcw0HAwfaYThutY8ozHpPbKFPa7wgqabXlIC4NVSWT0/A== + esbuild-linux-arm64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.14.tgz#a34bc3076e50b109c3b8c8bad9c146e35942322b" integrity sha512-6QVul3RI4M5/VxVIRF/I5F+7BaxzR3DfNGoqEVSCZqUbgzHExPn+LXr5ly1C7af2Kw4AHpo+wDqx8A4ziP9avw== +esbuild-linux-arm64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.17.tgz#dfd9022b7215ca660d464fcb20597b88887c7e64" + integrity sha512-WDEOD/YRA4J1lxhETKZff3gRxGYqqZEiVwIOqNfvCh2YcwWU2y6UmNGZsxcuKk18wot4dAXCXQyNZgBkVUTCLw== + esbuild-linux-arm@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.14.tgz#231ffd12fef69ee06365d4c94b69850e4830e927" integrity sha512-gxpOaHOPwp7zSmcKYsHrtxabScMqaTzfSQioAMUaB047YiMuDBzqVcKBG8OuESrYkGrL9DDljXr/mQNg7pbdaQ== +esbuild-linux-arm@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.17.tgz#e6f6bb9fe52def5260d7d49b790fbec0e7c6d9cb" + integrity sha512-ZwsgFUk3gR2pEMJdh5z4Ds18fvGETgElPqmNdx1NtZTCOVlFMAwFB5u/tOR2FrXbMFv+LkGnNxPDh48PYPDz9A== + esbuild-linux-mips64le@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.14.tgz#bd00570e3a30422224b732c7a5f262146c357403" integrity sha512-4Jl5/+xoINKbA4cesH3f4R+q0vltAztZ6Jm8YycS8lNhN1pgZJBDxWfI6HUMIAdkKlIpR1PIkA9aXQgZ8sxFAg== +esbuild-linux-mips64le@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.17.tgz#bceaad33ff18a822b6da0396c6497a231397b6c3" + integrity sha512-Lf4X9NB7r6imzp/11TaGs4kWL0DUn1JxI9gAAKotnKh6T8Y/0sLvZSvQS8WvSZcr0V8RRCrRZwiQqjOALUU/9g== + esbuild-linux-ppc64le@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.14.tgz#430609413fd9e04d9def4e3f06726b031b23d825" integrity sha512-BitW37GxeebKxqYNl4SVuSdnIJAzH830Lr6Mkq3pBHXtzQay0vK+IeOR/Ele1GtNVJ+/f8wYM53tcThkv5SC5w== +esbuild-linux-ppc64le@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.17.tgz#9562f094d1e5e6c3b61b776b15a9bbd657042654" + integrity sha512-aExhxbrK7/Mh9FArdiC9MbvrQz2bGCDI8cBALKJbmhKg0h7LNt6y1E1S9GGBZ/ZXkHDvV9FFVrXXZKFVU5Qpiw== + esbuild-linux-s390x@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.14.tgz#2f0d8cbfe53cf3cb97f6372549a41a8051dbd689" integrity sha512-vLj6p76HOZG3wfuTr5MyO3qW5iu8YdhUNxuY+tx846rPo7GcKtYSPMusQjeVEfZlJpSYoR+yrNBBxq+qVF9zrw== +esbuild-linux-s390x@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.17.tgz#2963cfe62c227bbf1da64e36d4ca0b23db8008fe" + integrity sha512-b0T20rNcS7POi5YLw5dFlsiC+riobR5IfppQGn5NWer6QiIkdL1vOx9eC9CUD3z1itpkLboRAZYieZfKfhCA2Q== + esbuild-netbsd-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.14.tgz#3e44de35e1add7e9582f3c0d2558d86aafbc813b" integrity sha512-fn8looXPQhpVqUyCBWUuPjesH+yGIyfbIQrLKG05rr1Kgm3rZD/gaYrd3Wpmf5syVZx70pKZPvdHp8OTA+y7cQ== +esbuild-netbsd-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.17.tgz#1d156023f9ae6be79b8627ab0cda2d7feb7f3a48" + integrity sha512-pFgTaAa2JF18nqNfCND9wOu1jbZ/mbDSaMxUp5fTkLlofyHhXeb5aChgXUkeipty2Pgq0OwOnxjHmiAxMI7N4g== + esbuild-openbsd-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.14.tgz#04710ef1d01cd9f15d54f50d20b5a3778f8306a2" integrity sha512-HdAnJ399pPff3SKbd8g+P4o5znseni5u5n5rJ6Z7ouqOdgbOwHe2ofZbMow17WMdNtz1IyOZk2Wo9Ve6/lZ4Rg== +esbuild-openbsd-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.17.tgz#3fc44102c9b65375385112f4ce5899ae5e38f349" + integrity sha512-K5+plb6gsAfBcFqB0EG4KvLbgBKslVAfEyJggicwt/QoDwQGJAzao4M6zOA4PG7LlXOwWSqv7VmSFbH+b6DyKw== + esbuild-sunos-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.14.tgz#8e583dd92c5c7ac4303ddc37f588e44211e04e19" integrity sha512-bmDHa99ulsGnYlh/xjBEfxoGuC8CEG5OWvlgD+pF7bKKiVTbtxqVCvOGEZeoDXB+ja6AvHIbPxrEE32J+m5nqQ== +esbuild-sunos-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.17.tgz#5bd24e7a7e863ea89d7e4eafd5364a155c9ea507" + integrity sha512-o1FINkbHRi9JB1YteOSXZdkDOmVUbmnCxRmTLkHvk8pfCFNpv/5/7ktt95teYKbEiJna2dEt3M4ckJ/+UVnW+w== + esbuild-windows-32@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.14.tgz#6d293ddfb71229f21cc13d85d5d2f43e8131693b" integrity sha512-6tVooQcxJCNenPp5GHZBs/RLu31q4B+BuF4MEoRxswT+Eq2JGF0ZWDRQwNKB8QVIo3t6Svc5wNGez+CwKNQjBg== +esbuild-windows-32@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.17.tgz#8bda31c550fb6b425707114141d2c6ba034dab9b" + integrity sha512-Qutilz0I7OADWBtWrC/FD+2O/TNAkhwbZ+wIns7kF87lxIMtmqpBt3KnMk1e4F47aTrZRr0oH55Zhztd7m2PAA== + esbuild-windows-64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.14.tgz#08a36844b69542f8ec1cb33a5ddcea02b9d0b2e8" integrity sha512-kl3BdPXh0/RD/dad41dtzj2itMUR4C6nQbXQCyYHHo4zoUoeIXhpCrSl7BAW1nv5EFL8stT1V+TQVXGZca5A2A== +esbuild-windows-64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.17.tgz#50b42c06908d3ce9fab8f0f9673199de5d0f9cbc" + integrity sha512-b21/oRV+PHrav0HkRpKjbM2yNRVe34gAfbdMppbZFea416wa8SrjcmVfSd7n4jgqoTQG0xe+MGgOpwXtjiB3DQ== + esbuild-windows-arm64@0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.14.tgz#ca747ce4066d5b8a79dbe48fe6ecd92d202e5366" integrity sha512-dCm1wTOm6HIisLanmybvRKvaXZZo4yEVrHh1dY0v582GThXJOzuXGja1HIQgV09RpSHYRL3m4KoUBL00l6SWEg== +esbuild-windows-arm64@0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.17.tgz#62d3921a810b64a03fcace76dad4db51d2128b45" + integrity sha512-4HN9E1idllewYvptcrrdfTA6DIWgg11kK0Zrv6yjxstJZLJeKxfilGBEaksLGs4Pst2rAYMx3H2vbYq7AWLQNA== + +esbuild@^0.14.11, esbuild@^0.14.17: + version "0.14.17" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.17.tgz#6a634e56447aa0e90b34c42091d472d802d399e5" + integrity sha512-JLgyC6Uv31mv9T9Mm2xF1LntUMCNBSzvg2n32d8cTKZMwFr1wmMFY2FkVum98TSoEsDff0cR+Aj49H2sbBcjKQ== + optionalDependencies: + esbuild-android-arm64 "0.14.17" + esbuild-darwin-64 "0.14.17" + esbuild-darwin-arm64 "0.14.17" + esbuild-freebsd-64 "0.14.17" + esbuild-freebsd-arm64 "0.14.17" + esbuild-linux-32 "0.14.17" + esbuild-linux-64 "0.14.17" + esbuild-linux-arm "0.14.17" + esbuild-linux-arm64 "0.14.17" + esbuild-linux-mips64le "0.14.17" + esbuild-linux-ppc64le "0.14.17" + esbuild-linux-s390x "0.14.17" + esbuild-netbsd-64 "0.14.17" + esbuild-openbsd-64 "0.14.17" + esbuild-sunos-64 "0.14.17" + esbuild-windows-32 "0.14.17" + esbuild-windows-64 "0.14.17" + esbuild-windows-arm64 "0.14.17" + esbuild@^0.14.14: version "0.14.14" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.14.tgz#3b99f20d628013c3e2ae90e67687e03f1d6eb071" @@ -3840,6 +4367,11 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escape-goat@^2.0.0: + version "2.1.1" + resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" + integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -3980,6 +4512,14 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz#c1f6ea30ac583031f203d65c73e723b01298f153" + integrity sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -4004,6 +4544,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1" + integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ== + eslint@^7.32.0: version "7.32.0" resolved "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" @@ -4050,6 +4595,47 @@ eslint@^7.32.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +eslint@^8: + version "8.8.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz#9762b49abad0cb4952539ffdb0a046392e571a2d" + integrity sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ== + dependencies: + "@eslint/eslintrc" "^1.0.5" + "@humanwhocodes/config-array" "^0.9.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.0" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.2.0" + espree "^9.3.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.6.0" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" @@ -4059,6 +4645,15 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" +espree@^9.2.0, espree@^9.3.0: + version "9.3.0" + resolved "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz#c1240d79183b72aaee6ccfa5a90bc9111df085a8" + integrity sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ== + dependencies: + acorn "^8.7.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^3.1.0" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -4240,6 +4835,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-memoize@^2.5.2: + version "2.5.2" + resolved "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz#79e3bb6a4ec867ea40ba0e7146816f6cdce9b57e" + integrity sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw== + fastq@^1.6.0: version "1.13.0" resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -4254,6 +4854,11 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== + figures@^3.0.0, figures@^3.1.0: version "3.2.0" resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -4273,6 +4878,24 @@ file-uri-to-path@2: resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== +filing-cabinet@^3.0.1: + version "3.1.0" + resolved "https://registry.npmjs.org/filing-cabinet/-/filing-cabinet-3.1.0.tgz#3f2a347f0392faad772744de099e25b6dd6f86fd" + integrity sha512-ZFutWTo14Z1xmog76UoQzDKEza1fSpqc+HvUN6K6GILrfhIn6NbR8fHQktltygF+wbt7PZ/EvfLK6yJnebd40A== + dependencies: + app-module-path "^2.2.0" + commander "^2.20.3" + debug "^4.3.3" + enhanced-resolve "^5.8.3" + is-relative-path "^1.0.2" + module-definition "^3.3.1" + module-lookup-amd "^7.0.1" + resolve "^1.21.0" + resolve-dependency-path "^2.0.0" + sass-lookup "^3.0.0" + stylus-lookup "^3.0.1" + typescript "^3.9.7" + fill-keys@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" @@ -4302,6 +4925,14 @@ find-cache-dir@^3.2.0: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-up@5.0.0, find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -4324,14 +4955,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-yarn-workspace-root@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" @@ -4352,6 +4975,11 @@ flatted@^3.1.0, flatted@^3.2.4: resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz#28d9969ea90661b5134259f312ab6aa7929ac5e2" integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== +flatten@^1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" + integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== + follow-redirects@^1.14.0, follow-redirects@^1.14.7: version "1.14.7" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" @@ -4393,6 +5021,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +fp-and-or@^0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz#e6fba83872a5853a56b3ebdf8d3167f5dfca1882" + integrity sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g== + fromentries@^1.2.0: version "1.3.2" resolved "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" @@ -4489,6 +5122,21 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +gauge@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.0.tgz#afba07aa0374a93c6219603b1fb83eaa2264d8f8" + integrity sha512-F8sU45yQpjQjxKkm1UOAhf0U/O0aFt//Fl7hsrNVto+patMHjs7dPI9mFOGUKbhrgKm0S3EjW3scMFuQmWSROw== + dependencies: + ansi-regex "^5.0.1" + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -4508,7 +5156,15 @@ gensync@^1.0.0-beta.2: resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1, get-caller-file@^2.0.5: +get-amd-module-type@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/get-amd-module-type/-/get-amd-module-type-3.0.0.tgz#bb334662fa04427018c937774570de495845c288" + integrity sha512-99Q7COuACPfVt18zH9N4VAMyb81S6TUgJm2NgV6ERtkh9VIkAaByZkW530wl3lLN5KTtSrK9jVLxYsoP5hQKsw== + dependencies: + ast-module-types "^2.3.2" + node-source-walk "^4.0.0" + +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -4522,6 +5178,11 @@ get-intrinsic@^1.0.1, get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.1" +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.2" + resolved "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -4542,18 +5203,25 @@ get-port@^5.1.1: resolved "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== -get-stdin@~8.0.0: +get-stdin@^8.0.0, get-stdin@~8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-stream@^4.0.0: +get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== dependencies: pump "^3.0.0" +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -4652,7 +5320,14 @@ glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0, glob@~7.2.0: +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0, glob@~7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -4664,6 +5339,13 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, gl once "^1.3.0" path-is-absolute "^1.0.0" +global-dirs@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" + integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== + dependencies: + ini "2.0.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4676,7 +5358,7 @@ globals@^13.6.0, globals@^13.9.0: dependencies: type-fest "^0.20.2" -globby@^11.0.2, globby@^11.0.3: +globby@^11.0.2, globby@^11.0.3, globby@^11.0.4: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -4688,11 +5370,42 @@ globby@^11.0.2, globby@^11.0.3: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +gonzales-pe@^4.2.3: + version "4.3.0" + resolved "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz#fe9dec5f3c557eead09ff868c65826be54d067b3" + integrity sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ== + dependencies: + minimist "^1.2.5" + +got@^9.6.0: + version "9.6.0" + resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.9" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +graphviz@0.0.9: + version "0.0.9" + resolved "https://registry.npmjs.org/graphviz/-/graphviz-0.0.9.tgz#0bbf1df588c6a92259282da35323622528c4bbc4" + integrity sha512-SmoY2pOtcikmMCqCSy2NO1YsRfu9OO0wpTlOYW++giGjfX1a6gax/m1Fo8IdUd0/3H15cTOfR1SMKwohj4LKsg== + dependencies: + temp "~0.4.0" + handlebars@^4.7.6, handlebars@^4.7.7: version "4.7.7" resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -4755,6 +5468,11 @@ has-unicode@^2.0.0, has-unicode@^2.0.1: resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= +has-yarn@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" + integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== + has@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -4780,7 +5498,7 @@ hosted-git-info@^2.1.4: resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: +hosted-git-info@^4.0.0, hosted-git-info@^4.0.1, hosted-git-info@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== @@ -4799,7 +5517,7 @@ html-escaper@^2.0.0: resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-cache-semantics@^4.1.0: +http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== @@ -4824,6 +5542,15 @@ http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4884,6 +5611,13 @@ ignore-walk@^3.0.3: dependencies: minimatch "^3.0.4" +ignore-walk@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz#fc840e8346cf88a3a9380c5b17933cd8f4d39fa3" + integrity sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw== + dependencies: + minimatch "^3.0.4" + ignore@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -4912,6 +5646,11 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= + import-local@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" @@ -4930,6 +5669,11 @@ indent-string@^4.0.0: resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -4948,16 +5692,16 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, i resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2, ini@^1.3.4: - version "1.3.8" - resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -ini@~2.0.0: +ini@2.0.0, ini@^2.0.0, ini@~2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: + version "1.3.8" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + init-package-json@^2.0.2: version "2.0.5" resolved "https://registry.npmjs.org/init-package-json/-/init-package-json-2.0.5.tgz#78b85f3c36014db42d8f32117252504f68022646" @@ -4999,6 +5743,11 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + ip@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -5097,6 +5846,19 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-installed-globally@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== + dependencies: + global-dirs "^3.0.0" + is-path-inside "^3.0.2" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" @@ -5112,6 +5874,11 @@ is-negative-zero@^2.0.1: resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-npm@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz#43e8d65cc56e1b67f8d47262cf667099193f45a8" + integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== + is-number-object@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" @@ -5124,6 +5891,11 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + is-obj@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" @@ -5134,6 +5906,11 @@ is-object@~1.0.1: resolved "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-path-inside@^3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -5174,6 +5951,16 @@ is-regex@^1.1.1, is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= + +is-relative-path@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-relative-path/-/is-relative-path-1.0.2.tgz#091b46a0d67c1ed0fe85f1f8cfdde006bb251d46" + integrity sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY= + is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" @@ -5238,6 +6025,21 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-url-superb@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/is-url-superb/-/is-url-superb-4.0.0.tgz#b54d1d2499bb16792748ac967aa3ecb41a33a8c2" + integrity sha512-GI+WjezhPPcbM+tqE9LnmsY5qqjwHzTvjJ36wxYX5ujNXefSUJ/T17r5bqDV8yLhcgB59KTPNOc9O9cmHTPWsA== + +is-url@^1.2.4: + version "1.2.4" + resolved "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" @@ -5270,6 +6072,11 @@ is-wsl@^2.1.1: dependencies: is-docker "^2.0.0" +is-yarn-global@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" + integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== + isarray@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -5568,7 +6375,7 @@ jest-jasmine2@^27.4.6: pretty-format "^27.4.6" throat "^6.0.1" -jest-junit@^13.0.0: +jest-junit@^13, jest-junit@^13.0.0: version "13.0.0" resolved "https://registry.npmjs.org/jest-junit/-/jest-junit-13.0.0.tgz#479be347457aad98ae8a5983a23d7c3ec526c9a3" integrity sha512-JSHR+Dhb32FGJaiKkqsB7AR3OqWKtldLd6ZH2+FJ8D4tsweb8Id8zEVReU4+OlrRO1ZluqJLQEETm+Q6/KilBg== @@ -5801,6 +6608,11 @@ jest@^27.3.1, jest@^27.4.7: import-local "^3.0.2" jest-cli "^27.4.7" +jju@^1.1.0: + version "1.4.0" + resolved "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= + jmespath@0.16.0: version "0.16.0" resolved "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" @@ -5816,6 +6628,14 @@ js-tokens@^4.0.0: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-yaml@3.14.0: + version "3.14.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -5824,7 +6644,7 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: +js-yaml@^4.0.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -5953,6 +6773,11 @@ jsii@1.52.1, jsii@^1.52.1: typescript "~3.9.10" yargs "^16.2.0" +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + json-diff@^0.7.1: version "0.7.1" resolved "https://registry.npmjs.org/json-diff/-/json-diff-0.7.1.tgz#0f1a87d281174c1a62c8714a208d0d24725a8169" @@ -5972,6 +6797,13 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-parse-helpfulerror@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz#13f14ce02eed4e981297b64eb9e3b932e2dd13dc" + integrity sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w= + dependencies: + jju "^1.1.0" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -5982,7 +6814,7 @@ json-schema-traverse@^1.0.0: resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema@0.4.0: +json-schema@0.4.0, json-schema@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== @@ -6032,6 +6864,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonlines@^0.1.1: + version "0.1.1" + resolved "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz#4fcd246dc5d0e38691907c44ab002f782d1d94cc" + integrity sha1-T80kbcXQ44aRkHxEqwAveC0dlMw= + jsonparse@^1.2.0, jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -6067,6 +6904,13 @@ just-extend@^4.0.2: resolved "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -6102,6 +6946,13 @@ lambda-tester@^3.6.0: uuid "^3.3.2" vandium-utils "^1.1.1" +latest-version@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" + integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== + dependencies: + package-json "^6.3.0" + lazystream@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" @@ -6164,6 +7015,15 @@ libnpmaccess@^4.0.1: npm-package-arg "^8.1.2" npm-registry-fetch "^11.0.0" +libnpmconfig@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" + integrity sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA== + dependencies: + figgy-pudding "^3.5.1" + find-up "^3.0.0" + ini "^1.3.5" + libnpmpublish@^4.0.0: version "4.0.2" resolved "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-4.0.2.tgz#be77e8bf5956131bcb45e3caa6b96a842dec0794" @@ -6344,6 +7204,14 @@ lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + log4js@^6.3.0: version "6.4.1" resolved "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz#9d3a8bf2c31c1e213fe3fc398a6053f7a2bc53e8" @@ -6355,6 +7223,16 @@ log4js@^6.3.0: rfdc "^1.3.0" streamroller "^3.0.2" +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -6381,6 +7259,34 @@ macos-release@^2.2.0: resolved "https://registry.npmjs.org/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2" integrity sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g== +madge@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/madge/-/madge-5.0.1.tgz#2096d9006558ea0669b3ade89c2cda708a24e22b" + integrity sha512-krmSWL9Hkgub74bOjnjWRoFPAJvPwSG6Dbta06qhWOq6X/n/FPzO3ESZvbFYVIvG2g4UHXvCJN1b+RZLaSs9nA== + dependencies: + chalk "^4.1.1" + commander "^7.2.0" + commondir "^1.0.1" + debug "^4.3.1" + dependency-tree "^8.1.1" + detective-amd "^3.1.0" + detective-cjs "^3.1.1" + detective-es6 "^2.2.0" + detective-less "^1.0.2" + detective-postcss "^5.0.0" + detective-sass "^3.0.1" + detective-scss "^2.0.1" + detective-stylus "^1.0.0" + detective-typescript "^7.0.0" + graphviz "0.0.9" + ora "^5.4.1" + pluralize "^8.0.0" + precinct "^8.1.0" + pretty-ms "^7.0.1" + rc "^1.2.7" + typescript "^3.9.5" + walkdir "^0.4.1" + make-dir@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -6401,6 +7307,28 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +make-fetch-happen@^10.0.0: + version "10.0.0" + resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.0.tgz#a2dc77ec1ebf082927f4dc6eaa70227f72e5a250" + integrity sha512-CREcDkbKZZ64g5MN1FT+u58mDHX9FQFFtFyio5HonX44BdQdytqPZBXUz+6ibi2w/6ncji59f2phyXGSMGpgzA== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.2.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + promise-retry "^2.0.1" + socks-proxy-agent "^6.0.0" + ssri "^8.0.0" + make-fetch-happen@^8.0.9: version "8.0.14" resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" @@ -6422,7 +7350,7 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" -make-fetch-happen@^9.0.1: +make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: version "9.1.0" resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== @@ -6602,6 +7530,11 @@ mimic-fn@^2.1.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -6623,7 +7556,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: +minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@~1.2.5: version "1.2.5" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -6741,6 +7674,25 @@ modify-values@^1.0.0: resolved "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== +module-definition@^3.3.1: + version "3.3.1" + resolved "https://registry.npmjs.org/module-definition/-/module-definition-3.3.1.tgz#fedef71667713e36988b93d0626a4fe7b35aebfc" + integrity sha512-kLidGPwQ2yq484nSD+D3JoJp4Etc0Ox9P0L34Pu/cU4X4HcG7k7p62XI5BBuvURWMRX3RPyuhOcBHbKus+UH4A== + dependencies: + ast-module-types "^2.7.1" + node-source-walk "^4.0.0" + +module-lookup-amd@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/module-lookup-amd/-/module-lookup-amd-7.0.1.tgz#d67c1a93f2ff8e38b8774b99a638e9a4395774b2" + integrity sha512-w9mCNlj0S8qviuHzpakaLVc+/7q50jl9a/kmJ/n8bmXQZgDPkQHnPBb8MUOYh3WpAYkXuNc2c+khsozhIp/amQ== + dependencies: + commander "^2.8.1" + debug "^4.1.0" + glob "^7.1.6" + requirejs "^2.3.5" + requirejs-config-file "^4.0.0" + module-not-found-error@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0" @@ -6777,12 +7729,17 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +nanoid@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" + integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -negotiator@^0.6.2: +negotiator@^0.6.2, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -6884,6 +7841,22 @@ node-gyp@^7.1.0: tar "^6.0.2" which "^2.0.2" +node-gyp@^8.2.0: + version "8.4.1" + resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" + integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^9.1.0" + nopt "^5.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" + which "^2.0.2" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -6901,6 +7874,13 @@ node-releases@^2.0.1: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +node-source-walk@^4.0.0, node-source-walk@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/node-source-walk/-/node-source-walk-4.2.0.tgz#c2efe731ea8ba9c03c562aa0a9d984e54f27bc2c" + integrity sha512-hPs/QMe6zS94f5+jG3kk9E7TNm4P2SulrKiLWMzKszBfNZvL/V6wseHlTd7IvfW0NZWqPtK3+9yYNr+3USGteA== + dependencies: + "@babel/parser" "^7.0.0" + nopt@^4.0.1: version "4.0.3" resolved "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -6941,6 +7921,11 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +normalize-url@^4.1.0: + version "4.5.1" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== + normalize-url@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" @@ -6953,6 +7938,40 @@ npm-bundled@^1.1.1, npm-bundled@^1.1.2: dependencies: npm-normalize-package-bin "^1.0.1" +npm-check-updates@^12: + version "12.2.1" + resolved "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.2.1.tgz#1f25fec9863c149e4bae84833599050701dcd530" + integrity sha512-fqfH2USwTLgho8HaC79i5Bl+RH3zV15AbdtJQTCaOAp9L3D2W8k+jsfuwee2vSTUrt6IUTXPbzwUIYo4/TQdYA== + dependencies: + chalk "^4.1.2" + cint "^8.2.1" + cli-table "^0.3.11" + commander "^8.3.0" + fast-memoize "^2.5.2" + find-up "5.0.0" + fp-and-or "^0.1.3" + get-stdin "^8.0.0" + globby "^11.0.4" + hosted-git-info "^4.1.0" + json-parse-helpfulerror "^1.0.3" + jsonlines "^0.1.1" + libnpmconfig "^1.2.1" + lodash "^4.17.21" + minimatch "^3.0.4" + p-map "^4.0.0" + pacote "^12.0.2" + parse-github-url "^1.0.2" + progress "^2.0.3" + prompts "^2.4.2" + rc-config-loader "^4.0.0" + remote-git-tags "^3.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + semver-utils "^1.1.4" + source-map-support "^0.5.21" + spawn-please "^1.0.0" + update-notifier "^5.1.0" + npm-install-checks@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz#a37facc763a2fde0497ef2c6d0ac7c3fbe00d7b4" @@ -6998,6 +8017,16 @@ npm-packlist@^2.1.4: npm-bundled "^1.1.1" npm-normalize-package-bin "^1.0.1" +npm-packlist@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz#0370df5cfc2fcc8f79b8f42b37798dd9ee32c2a9" + integrity sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ== + dependencies: + glob "^7.1.6" + ignore-walk "^4.0.1" + npm-bundled "^1.1.1" + npm-normalize-package-bin "^1.0.1" + npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: version "6.1.1" resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz#7b5484ca2c908565f43b7f27644f36bb816f5148" @@ -7020,6 +8049,18 @@ npm-registry-fetch@^11.0.0: minizlib "^2.0.0" npm-package-arg "^8.0.0" +npm-registry-fetch@^12.0.0: + version "12.0.1" + resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-12.0.1.tgz#211eff2483b1e71706c9a7ce891182ab3ea9168b" + integrity sha512-ricy4ezH3Uv0d4am6RSwHjCYTWJI74NJjurIigWMAG7Vs3PFyd0TUlkrez5L0AgaPzDLRsEzqb5cOZ/Ue01bmA== + dependencies: + make-fetch-happen "^10.0.0" + minipass "^3.1.3" + minipass-fetch "^1.3.0" + minipass-json-stream "^1.0.1" + minizlib "^2.0.0" + npm-package-arg "^8.0.0" + npm-registry-fetch@^9.0.0: version "9.0.0" resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz#86f3feb4ce00313bc0b8f1f8f69daae6face1661" @@ -7058,6 +8099,16 @@ npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" +npmlog@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.0.tgz#ba9ef39413c3d936ea91553db7be49c34ad0520c" + integrity sha512-03ppFRGlsyUaQFbGC2C8QWJN/C/K7PsfyD9aQdhVKAQIH4sQBc8WASqFBP7O+Ut4d2oo5LoeoboB3cGdBZSp6Q== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^4.0.0" + set-blocking "^2.0.0" + null-check@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" @@ -7213,6 +8264,21 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -7239,6 +8305,11 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -7388,6 +8459,16 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" +package-json@^6.3.0: + version "6.5.0" + resolved "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" + integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== + dependencies: + got "^9.6.0" + registry-auth-token "^4.0.0" + registry-url "^5.0.0" + semver "^6.2.0" + pacote@^11.2.6: version "11.3.5" resolved "https://registry.npmjs.org/pacote/-/pacote-11.3.5.tgz#73cf1fc3772b533f575e39efa96c50be8c3dc9d2" @@ -7413,6 +8494,31 @@ pacote@^11.2.6: ssri "^8.0.1" tar "^6.1.0" +pacote@^12.0.2: + version "12.0.3" + resolved "https://registry.npmjs.org/pacote/-/pacote-12.0.3.tgz#b6f25868deb810e7e0ddf001be88da2bcaca57c7" + integrity sha512-CdYEl03JDrRO3x18uHjBYA9TyoW8gy+ThVcypcDkxPtKlw76e4ejhYB6i9lJ+/cebbjpqPW/CijjqxwDTts8Ow== + dependencies: + "@npmcli/git" "^2.1.0" + "@npmcli/installed-package-contents" "^1.0.6" + "@npmcli/promise-spawn" "^1.2.0" + "@npmcli/run-script" "^2.0.0" + cacache "^15.0.5" + chownr "^2.0.0" + fs-minipass "^2.1.0" + infer-owner "^1.0.4" + minipass "^3.1.3" + mkdirp "^1.0.3" + npm-package-arg "^8.0.1" + npm-packlist "^3.0.0" + npm-pick-manifest "^6.0.0" + npm-registry-fetch "^12.0.0" + promise-retry "^2.0.1" + read-package-json-fast "^2.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.1.0" + pako@~1.0.2: version "1.0.11" resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -7425,6 +8531,11 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-github-url@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" + integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -7443,6 +8554,11 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-ms@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d" + integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== + parse-path@^4.0.0: version "4.0.3" resolved "https://registry.npmjs.org/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" @@ -7583,6 +8699,57 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + +postcss-values-parser@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" + integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg== + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-values-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-5.0.0.tgz#10c61ac3f488e4de25746b829ea8d8894e9ac3d2" + integrity sha512-2viDDjMMrt21W2izbeiJxl3kFuD/+asgB0CBwPEgSyhCmBnDIa/y+pLaoyX+q3I3DHH0oPPL3cgjVTQvlS1Maw== + dependencies: + color-name "^1.1.4" + is-url-superb "^4.0.0" + quote-unquote "^1.0.0" + +postcss@^8.1.7, postcss@^8.2.13: + version "8.4.6" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz#c5ff3c3c457a23864f32cb45ac9b741498a09ae1" + integrity sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA== + dependencies: + nanoid "^3.2.0" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +precinct@^8.0.0, precinct@^8.1.0: + version "8.3.1" + resolved "https://registry.npmjs.org/precinct/-/precinct-8.3.1.tgz#94b99b623df144eed1ce40e0801c86078466f0dc" + integrity sha512-pVppfMWLp2wF68rwHqBIpPBYY8Kd12lDhk8LVQzOwqllifVR15qNFyod43YLyFpurKRZQKnE7E4pofAagDOm2Q== + dependencies: + commander "^2.20.3" + debug "^4.3.3" + detective-amd "^3.1.0" + detective-cjs "^3.1.1" + detective-es6 "^2.2.1" + detective-less "^1.0.2" + detective-postcss "^4.0.0" + detective-sass "^3.0.1" + detective-scss "^2.0.1" + detective-stylus "^1.0.0" + detective-typescript "^7.0.0" + module-definition "^3.3.1" + node-source-walk "^4.2.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -7593,6 +8760,11 @@ prelude-ls@~1.1.2: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" @@ -7612,6 +8784,13 @@ pretty-format@^27.0.0, pretty-format@^27.4.6: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-ms@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz#7d903eaab281f7d8e03c66f867e239dc32fb73e8" + integrity sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q== + dependencies: + parse-ms "^2.1.0" + printj@~1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/printj/-/printj-1.3.1.tgz#9af6b1d55647a1587ac44f4c1654a4b95b8e12cb" @@ -7629,11 +8808,29 @@ process-on-spawn@^1.0.0: dependencies: fromentries "^1.2.0" -progress@^2.0.0: +progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +projen@^0.52.13: + version "0.52.13" + resolved "https://registry.npmjs.org/projen/-/projen-0.52.13.tgz#cefca4fd85deed85850e86e62da0540bcd10db77" + integrity sha512-UxElFu08tLrypvSrkYOKeR5yRNwgw9fSs9VXHZ5Pk2xAo0KEZtxppwZdbp/LHTVvCv8aITD/7uIlaS7In+vMaQ== + dependencies: + "@iarna/toml" "^2.2.5" + case "^1.6.3" + chalk "^4.1.2" + conventional-changelog-config-spec "^2.1.0" + fs-extra "^9.1.0" + glob "^7" + ini "^2.0.0" + semver "^7.3.5" + shx "^0.3.4" + xmlbuilder2 "^2.4.1" + yaml next + yargs "^16.2.0" + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -7654,7 +8851,7 @@ promptly@^3.2.0: dependencies: read "^1.0.4" -prompts@^2.0.1: +prompts@^2.0.1, prompts@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== @@ -7735,6 +8932,13 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pupa@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" + integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== + dependencies: + escape-goat "^2.0.0" + pure-rand@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.0.tgz#87f5bdabeadbd8904e316913a5c0b8caac517b37" @@ -7782,6 +8986,11 @@ quick-lru@^4.0.1: resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +quote-unquote@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/quote-unquote/-/quote-unquote-1.0.0.tgz#67a9a77148effeaf81a4d428404a710baaac8a0b" + integrity sha1-Z6mncUjv/q+BpNQoQEpxC6qsigs= + raw-body@^2.2.0: version "2.4.2" resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32" @@ -7792,6 +9001,26 @@ raw-body@^2.2.0: iconv-lite "0.4.24" unpipe "1.0.0" +rc-config-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.0.0.tgz#144cf31961c9f8ebcf252bd9c263fd40d62bd387" + integrity sha512-//LRTblJEcqbmmro1GCmZ39qZXD+JqzuD8Y5/IZU3Dhp3A1Yr0Xn68ks8MQ6qKfKvYCWDveUmRDKDA40c+sCXw== + dependencies: + debug "^4.1.1" + js-yaml "^4.0.0" + json5 "^2.1.2" + require-from-string "^2.0.2" + +rc@^1.2.7, rc@^1.2.8: + version "1.2.8" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-is@^17.0.1: version "17.0.2" resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" @@ -7948,6 +9177,13 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + redent@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -7964,11 +9200,25 @@ regexp.prototype.flags@^1.3.0: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.0.0, regexpp@^3.1.0: +regexpp@^3.0.0, regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +registry-auth-token@^4.0.0: + version "4.2.1" + resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" + integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== + dependencies: + rc "^1.2.8" + +registry-url@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" + integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== + dependencies: + rc "^1.2.8" + release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" @@ -7976,6 +9226,11 @@ release-zalgo@^1.0.0: dependencies: es6-error "^4.0.1" +remote-git-tags@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz#424f8ec2cdea00bb5af1784a49190f25e16983c3" + integrity sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w== + remove-markdown@^0.2.2: version "0.2.2" resolved "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.2.2.tgz#66b0ceeba9fb77ca9636bb1b0307ce21a32a12a6" @@ -8022,6 +9277,19 @@ require-main-filename@^2.0.0: resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requirejs-config-file@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz#4244da5dd1f59874038cc1091d078d620abb6ebc" + integrity sha512-jnIre8cbWOyvr8a5F2KuqBnY+SDA4NXr/hzEZJG79Mxm2WiFQz2dzhC8ibtPJS7zkmBEl1mxSwp5HhC1W4qpxw== + dependencies: + esprima "^4.0.0" + stringify-object "^3.2.1" + +requirejs@^2.3.5: + version "2.3.6" + resolved "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz#e5093d9601c2829251258c0b9445d4d19fa9e7c9" + integrity sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg== + resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -8029,6 +9297,11 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" +resolve-dependency-path@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/resolve-dependency-path/-/resolve-dependency-path-2.0.0.tgz#11700e340717b865d216c66cabeb4a2a3c696736" + integrity sha512-DIgu+0Dv+6v2XwRaNWnumKu7GPufBBOr5I1gRPJHkvghrfCGOooJODFvgFimX/KRxk9j0whD2MnKHzM1jYvk9w== + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -8044,7 +9317,7 @@ resolve.exports@^1.1.0: resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.20.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.20.0, resolve@^1.21.0: version "1.22.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -8053,6 +9326,13 @@ resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -8139,6 +9419,13 @@ safe-stable-stringify@^2.2.0: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sass-lookup@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/sass-lookup/-/sass-lookup-3.0.0.tgz#3b395fa40569738ce857bc258e04df2617c48cac" + integrity sha512-TTsus8CfFRn1N44bvdEai1no6PqdmDiQUiqW5DlpmtT+tYnIt1tXtDIph5KA1efC+LmioJXSnCtUVpcK9gaKIg== + dependencies: + commander "^2.16.0" + sax@1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" @@ -8156,6 +9443,13 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" +semver-diff@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" + integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== + dependencies: + semver "^6.3.0" + semver-intersect@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz#bdd9c06bedcdd2fedb8cd352c3c43ee8c61321f3" @@ -8163,6 +9457,11 @@ semver-intersect@^1.4.0: dependencies: semver "^5.0.0" +semver-utils@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz#cf0405e669a57488913909fc1c3f29bf2a4871e2" + integrity sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA== + "semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -8175,7 +9474,7 @@ semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^ dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -8226,6 +9525,28 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shelljs@^0.8.5: + version "0.8.5" + resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shlex@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/shlex/-/shlex-2.1.0.tgz#4f8fbf75c4a9956283e4095fa5eac3f4969f6a6b" + integrity sha512-Tk8PjohJbWpGu2NtAlsEi/9AS4GU2zW2ZWLFrWRDskZpSJmyBIU3nTkBtocxD90r3w4BwRevsNtIqIP9HMuYiQ== + +shx@^0.3.4: + version "0.3.4" + resolved "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" + integrity sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g== + dependencies: + minimist "^1.2.3" + shelljs "^0.8.5" + side-channel@^1.0.3, side-channel@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -8347,6 +9668,11 @@ sort-keys@^4.0.0: dependencies: is-plain-obj "^2.0.0" +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-support@^0.5.17, source-map-support@^0.5.21, source-map-support@^0.5.6: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -8370,6 +9696,11 @@ source-map@^0.7.3: resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +spawn-please@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz#51cf5831ba2bf418aa3ec2102d40b75cfd48b6f2" + integrity sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A== + spawn-wrap@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" @@ -8466,7 +9797,7 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -standard-version@^9.3.2: +standard-version@^9, standard-version@^9.3.2: version "9.3.2" resolved "https://registry.npmjs.org/standard-version/-/standard-version-9.3.2.tgz#28db8c1be66fd2d736f28f7c5de7619e64cd6dab" integrity sha512-u1rfKP4o4ew7Yjbfycv80aNMN2feTiqseAhUhrrx2XtdQGmu7gucpziXe68Z4YfHVqlxVEzo4aUA0Iu3VQOTgQ== @@ -8514,7 +9845,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@*, string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@*, string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -8563,6 +9894,15 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +stringify-object@^3.2.1: + version "3.3.0" + resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^1.0.0" + stringify-package@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" @@ -8614,6 +9954,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1 resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -8623,6 +9968,14 @@ strong-log-transformer@^2.1.0: minimist "^1.2.0" through "^2.3.4" +stylus-lookup@^3.0.1: + version "3.0.2" + resolved "https://registry.npmjs.org/stylus-lookup/-/stylus-lookup-3.0.2.tgz#c9eca3ff799691020f30b382260a67355fefdddd" + integrity sha512-oEQGHSjg/AMaWlKe7gqsnYzan8DLcGIHe0dUaFkucZZ14z4zjENRlQMCHT4FNsiWnJf17YN9OvrCfCoi7VvOyg== + dependencies: + commander "^2.8.1" + debug "^4.1.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8673,6 +10026,11 @@ table@*, table@^6.0.9, table@^6.8.0: string-width "^4.2.3" strip-ansi "^6.0.1" +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + tar-stream@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" @@ -8697,7 +10055,7 @@ tar@^4.4.12: safe-buffer "^5.2.1" yallist "^3.1.1" -tar@^6.0.2, tar@^6.1.0: +tar@^6.0.2, tar@^6.1.0, tar@^6.1.2: version "6.1.11" resolved "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== @@ -8730,6 +10088,11 @@ temp-write@^4.0.0: temp-dir "^1.0.0" uuid "^3.3.2" +temp@~0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/temp/-/temp-0.4.0.tgz#671ad63d57be0fe9d7294664b3fc400636678a60" + integrity sha1-ZxrWPVe+D+nXKUZks/xABjZnimA= + tempfile@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/tempfile/-/tempfile-3.0.0.tgz#5376a3492de7c54150d0cc0612c3f00e2cdaf76c" @@ -8815,6 +10178,11 @@ to-fast-properties@^2.0.0: resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -9043,21 +10411,21 @@ typescript-json-schema@^0.53.0: typescript "~4.5.0" yargs "^17.1.1" -typescript@~3.8.3: - version "3.8.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== - -typescript@~3.9.10: +typescript@^3.9.5, typescript@^3.9.7, typescript@~3.9.10: version "3.9.10" resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@~4.5.0: +typescript@^4.5.5, typescript@~4.5.0: version "4.5.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== +typescript@~3.8.3: + version "3.8.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -9088,6 +10456,11 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" @@ -9102,6 +10475,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +unique-string@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" + integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== + dependencies: + crypto-random-string "^2.0.0" + universal-user-agent@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" @@ -9134,6 +10514,26 @@ upath@^2.0.1: resolved "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== +update-notifier@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" + integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== + dependencies: + boxen "^5.0.0" + chalk "^4.1.0" + configstore "^5.0.1" + has-yarn "^2.1.0" + import-lazy "^2.1.0" + is-ci "^2.0.0" + is-installed-globally "^0.4.0" + is-npm "^5.0.0" + is-yarn-global "^0.3.0" + latest-version "^5.1.0" + pupa "^2.1.1" + semver "^7.3.4" + semver-diff "^3.1.1" + xdg-basedir "^4.0.0" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -9141,6 +10541,13 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + url@0.10.3: version "0.10.3" resolved "https://registry.npmjs.org/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" @@ -9243,6 +10650,11 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" +walkdir@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz#dc119f83f4421df52e3061e514228a2db20afa39" + integrity sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ== + walker@^1.0.7: version "1.0.8" resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" @@ -9250,7 +10662,7 @@ walker@^1.0.7: dependencies: makeerror "1.0.12" -wcwidth@^1.0.0: +wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= @@ -9353,13 +10765,20 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wide-align@^1.1.0: +wide-align@^1.1.0, wide-align@^1.1.2: version "1.1.5" resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== dependencies: string-width "^1.0.2 || 2 || 3 || 4" +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + windows-release@^3.1.0: version "3.3.3" resolved "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999" @@ -9462,6 +10881,11 @@ ws@^7.4.6: resolved "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== +xdg-basedir@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" + integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== + xml-js@^1.6.11: version "1.6.11" resolved "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" @@ -9487,6 +10911,17 @@ xml@^1.0.1: resolved "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= +xmlbuilder2@^2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-2.4.1.tgz#899c783a833188c5a5aa6f3c5428a3963f3e479d" + integrity sha512-vliUplZsk5vJnhxXN/mRcij/AE24NObTUm/Zo4vkLusgayO6s3Et5zLEA14XZnY1c3hX5o1ToR0m0BJOPy0UvQ== + dependencies: + "@oozcitak/dom" "1.15.8" + "@oozcitak/infra" "1.0.8" + "@oozcitak/util" "8.3.8" + "@types/node" "*" + js-yaml "3.14.0" + xmlbuilder@^15.1.1: version "15.1.1" resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" @@ -9542,6 +10977,11 @@ yaml@2.0.0-7: resolved "https://registry.npmjs.org/yaml/-/yaml-2.0.0-7.tgz#9799d9d85dfc8f01e4cc425e18e09215364beef1" integrity sha512-RbI2Tm3hl9AoHY4wWyWvGvJfFIbHOzuzaxum6ez1A0vve+uXgNor03Wys4t+2sgjJSVSe+B2xerd1/dnvqHlOA== +yaml@next: + version "2.0.0-10" + resolved "https://registry.npmjs.org/yaml/-/yaml-2.0.0-10.tgz#d5b59e2d14b8683313a534f2bbc648e211a2753e" + integrity sha512-FHV8s5ODFFQXX/enJEU2EkanNl1UDBUz8oa4k5Qo/sR+Iq7VmhCDkRMb0/mjJCNeAWQ31W8WV6PYStDE4d9EIw== + yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" From 8ecdd89836b75648033a5303096f79ac8a658333 Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 6 Feb 2022 13:30:27 +0200 Subject: [PATCH 10/63] mid work --- .../lib/artifacts/asset-manifest-artifact.ts | 38 ++ .../lib/artifacts/cloudformation-artifact.ts | 184 ++++++++ .../nested-cloud-assembly-artifact-aug.ts | 18 + .../nested-cloud-assembly-artifact.ts | 43 ++ .../lib/artifacts/tree-cloud-artifact.ts | 17 + .../@aws-cdk/cx-api/lib/cloud-artifact-aug.ts | 32 ++ .../@aws-cdk/cx-api/lib/cloud-artifact.ts | 119 ++++++ .../@aws-cdk/cx-api/lib/cloud-assembly.ts | 400 +----------------- packages/@aws-cdk/cx-api/lib/index.ts | 6 + packages/@aws-cdk/cx-api/package.json | 3 +- 10 files changed, 463 insertions(+), 397 deletions(-) create mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts create mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts create mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact-aug.ts create mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts create mode 100644 packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts create mode 100644 packages/@aws-cdk/cx-api/lib/cloud-artifact-aug.ts diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts new file mode 100644 index 0000000000000..3c8c102f2c5ab --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts @@ -0,0 +1,38 @@ +import * as path from 'path'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { CloudArtifact } from '../cloud-artifact'; +import { CloudAssembly } from '../cloud-assembly'; + +/** + * Asset manifest is a description of a set of assets which need to be built and published + */ +export class AssetManifestArtifact extends CloudArtifact { + /** + * The file name of the asset manifest + */ + public readonly file: string; + + /** + * Version of bootstrap stack required to deploy this stack + */ + public readonly requiresBootstrapStackVersion: number; + + /** + * Name of SSM parameter with bootstrap stack version + * + * @default - Discover SSM parameter by reading stack + */ + public readonly bootstrapStackVersionSsmParameter?: string; + + constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { + super(assembly, name, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.AssetManifestProperties; + if (!properties.file) { + throw new Error('Invalid AssetManifestArtifact. Missing "file" property'); + } + this.file = path.resolve(this.assembly.directory, properties.file); + this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion ?? 1; + this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; + } +} diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts new file mode 100644 index 0000000000000..3e6f395b5c99d --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/artifacts/cloudformation-artifact.ts @@ -0,0 +1,184 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { CloudArtifact } from '../cloud-artifact'; +import type { CloudAssembly } from '../cloud-assembly'; +import { Environment, EnvironmentUtils } from '../environment'; + +export class CloudFormationStackArtifact extends CloudArtifact { + /** + * The file name of the template. + */ + public readonly templateFile: string; + + /** + * The original name as defined in the CDK app. + */ + public readonly originalName: string; + + /** + * Any assets associated with this stack. + */ + public readonly assets: cxschema.AssetMetadataEntry[]; + + /** + * CloudFormation parameters to pass to the stack. + */ + public readonly parameters: { [id: string]: string }; + + /** + * CloudFormation tags to pass to the stack. + */ + public readonly tags: { [id: string]: string }; + + /** + * The physical name of this stack. + */ + public readonly stackName: string; + + /** + * A string that represents this stack. Should only be used in user interfaces. + * If the stackName and artifactId are the same, it will just return that. Otherwise, + * it will return something like " ()" + */ + public readonly displayName: string; + + /** + * The physical name of this stack. + * @deprecated renamed to `stackName` + */ + public readonly name: string; + + /** + * The environment into which to deploy this artifact. + */ + public readonly environment: Environment; + + /** + * The role that needs to be assumed to deploy the stack + * + * @default - No role is assumed (current credentials are used) + */ + public readonly assumeRoleArn?: string; + + /** + * External ID to use when assuming role for cloudformation deployments + * + * @default - No external ID + */ + readonly assumeRoleExternalId?: string; + + /** + * The role that is passed to CloudFormation to execute the change set + * + * @default - No role is passed (currently assumed role/credentials are used) + */ + public readonly cloudFormationExecutionRoleArn?: string; + + /** + * The role to use to look up values from the target AWS account + * + * @default - No role is assumed (current credentials are used) + */ + public readonly lookupRole?: cxschema.BootstrapRole; + + /** + * If the stack template has already been included in the asset manifest, its asset URL + * + * @default - Not uploaded yet, upload just before deploying + */ + public readonly stackTemplateAssetObjectUrl?: string; + + /** + * Version of bootstrap stack required to deploy this stack + * + * @default - No bootstrap stack required + */ + public readonly requiresBootstrapStackVersion?: number; + + /** + * Name of SSM parameter with bootstrap stack version + * + * @default - Discover SSM parameter by reading stack + */ + public readonly bootstrapStackVersionSsmParameter?: string; + + /** + * Whether termination protection is enabled for this stack. + */ + public readonly terminationProtection?: boolean; + + /** + * Whether this stack should be validated by the CLI after synthesis + * + * @default - false + */ + public readonly validateOnSynth?: boolean; + + private _template: any | undefined; + + constructor(assembly: CloudAssembly, artifactId: string, artifact: cxschema.ArtifactManifest) { + super(assembly, artifactId, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.AwsCloudFormationStackProperties; + if (!properties.templateFile) { + throw new Error('Invalid CloudFormation stack artifact. Missing "templateFile" property in cloud assembly manifest'); + } + if (!artifact.environment) { + throw new Error('Invalid CloudFormation stack artifact. Missing environment'); + } + this.environment = EnvironmentUtils.parse(artifact.environment); + this.templateFile = properties.templateFile; + this.parameters = properties.parameters ?? {}; + + // We get the tags from 'properties' if available (cloud assembly format >= 6.0.0), otherwise + // from the stack metadata + this.tags = properties.tags ?? this.tagsFromMetadata(); + this.assumeRoleArn = properties.assumeRoleArn; + this.assumeRoleExternalId = properties.assumeRoleExternalId; + this.cloudFormationExecutionRoleArn = properties.cloudFormationExecutionRoleArn; + this.stackTemplateAssetObjectUrl = properties.stackTemplateAssetObjectUrl; + this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion; + this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; + this.terminationProtection = properties.terminationProtection; + this.validateOnSynth = properties.validateOnSynth; + this.lookupRole = properties.lookupRole; + + this.stackName = properties.stackName || artifactId; + this.assets = this.findMetadataByType(cxschema.ArtifactMetadataEntryType.ASSET).map(e => e.data as cxschema.AssetMetadataEntry); + + this.displayName = this.stackName === artifactId + ? this.stackName + : `${artifactId} (${this.stackName})`; + + this.name = this.stackName; // backwards compat + this.originalName = this.stackName; + } + + /** + * Full path to the template file + */ + public get templateFullPath() { + return path.join(this.assembly.directory, this.templateFile); + } + + /** + * The CloudFormation template for this stack. + */ + public get template(): any { + if (this._template === undefined) { + this._template = JSON.parse(fs.readFileSync(this.templateFullPath, 'utf-8')); + } + return this._template; + } + + private tagsFromMetadata() { + const ret: Record = {}; + for (const metadataEntry of this.findMetadataByType(cxschema.ArtifactMetadataEntryType.STACK_TAGS)) { + for (const tag of (metadataEntry.data ?? []) as cxschema.StackTagsMetadataEntry) { + ret[tag.key] = tag.value; + } + } + return ret; + } +} diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact-aug.ts b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact-aug.ts new file mode 100644 index 0000000000000..cb6c54a806ee5 --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact-aug.ts @@ -0,0 +1,18 @@ +import { CloudAssembly } from '../cloud-assembly'; +import { NestedCloudAssemblyArtifact } from './nested-cloud-assembly-artifact'; + +const cacheSym = Symbol(); + +/** + * The nested Assembly + * + * Declared in a different file to break circular dep between CloudAssembly and NestedCloudAssemblyArtifact + */ +Object.defineProperty(NestedCloudAssemblyArtifact.prototype, 'nestedAssembly', { + get() { + if (!this[cacheSym]) { + this[cacheSym] = new CloudAssembly(this.fullPath); + } + return this[cacheSym]; + }, +}); diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts new file mode 100644 index 0000000000000..61684316949d4 --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact.ts @@ -0,0 +1,43 @@ +import * as path from 'path'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { CloudArtifact } from '../cloud-artifact'; +import type { CloudAssembly } from '../cloud-assembly'; + +/** + * Asset manifest is a description of a set of assets which need to be built and published + */ +export class NestedCloudAssemblyArtifact extends CloudArtifact { + /** + * The relative directory name of the asset manifest + */ + public readonly directoryName: string; + + /** + * Display name + */ + public readonly displayName: string; + + constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { + super(assembly, name, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.NestedCloudAssemblyProperties; + this.directoryName = properties.directoryName; + this.displayName = properties.displayName ?? name; + } + + /** + * Full path to the nested assembly directory + */ + public get fullPath(): string { + return path.join(this.assembly.directory, this.directoryName); + } +} + +export interface NestedCloudAssemblyArtifact { + /** + * The nested Assembly + */ + readonly nestedAssembly: CloudAssembly; + + // Declared in a different file +} \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts new file mode 100644 index 0000000000000..689f3468ca252 --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/artifacts/tree-cloud-artifact.ts @@ -0,0 +1,17 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { CloudArtifact } from '../cloud-artifact'; +import { CloudAssembly } from '../cloud-assembly'; + +export class TreeCloudArtifact extends CloudArtifact { + public readonly file: string; + + constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { + super(assembly, name, artifact); + + const properties = (this.manifest.properties || {}) as cxschema.TreeArtifactProperties; + if (!properties.file) { + throw new Error('Invalid TreeCloudArtifact. Missing "file" property'); + } + this.file = properties.file; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/lib/cloud-artifact-aug.ts b/packages/@aws-cdk/cx-api/lib/cloud-artifact-aug.ts new file mode 100644 index 0000000000000..7afadb73a5c54 --- /dev/null +++ b/packages/@aws-cdk/cx-api/lib/cloud-artifact-aug.ts @@ -0,0 +1,32 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { AssetManifestArtifact } from './artifacts/asset-manifest-artifact'; +import { CloudFormationStackArtifact } from './artifacts/cloudformation-artifact'; +import { NestedCloudAssemblyArtifact } from './artifacts/nested-cloud-assembly-artifact'; +import { TreeCloudArtifact } from './artifacts/tree-cloud-artifact'; +import { CloudArtifact } from './cloud-artifact'; +import { CloudAssembly } from './cloud-assembly'; + +/** + * Add the 'fromManifest' factory function + * + * It is defined in a separate file to avoid circular dependencies between 'cloud-artifact.ts' + * and all of its subclass files. + */ +CloudArtifact.fromManifest = function fromManifest( + assembly: CloudAssembly, + id: string, + artifact: cxschema.ArtifactManifest, +): CloudArtifact | undefined { + switch (artifact.type) { + case cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK: + return new CloudFormationStackArtifact(assembly, id, artifact); + case cxschema.ArtifactType.CDK_TREE: + return new TreeCloudArtifact(assembly, id, artifact); + case cxschema.ArtifactType.ASSET_MANIFEST: + return new AssetManifestArtifact(assembly, id, artifact); + case cxschema.ArtifactType.NESTED_CLOUD_ASSEMBLY: + return new NestedCloudAssemblyArtifact(assembly, id, artifact); + default: + return undefined; + } +}; \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts index d480add47d171..528104c678199 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts @@ -1,3 +1,7 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import type { CloudAssembly } from './cloud-assembly'; +import { MetadataEntryResult, SynthesisMessage, SynthesisMessageLevel } from './metadata'; + /** * Artifact properties for CloudFormation stacks. */ @@ -25,3 +29,118 @@ export interface AwsCloudFormationStackProperties { */ readonly terminationProtection?: boolean; } + +/** + * Represents an artifact within a cloud assembly. + */ +export class CloudArtifact { + /** + * Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest. + * + * @param assembly The cloud assembly from which to load the artifact + * @param id The artifact ID + * @param artifact The artifact manifest + * @returns the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module. + */ + public static fromManifest(assembly: CloudAssembly, id: string, artifact: cxschema.ArtifactManifest): CloudArtifact | undefined { + // Implementation is defined in a separate file to break cyclic dependencies + void(assembly), void(id), void(artifact); + throw new Error('Implementation not overridden yet'); + } + + /** + * The artifact's manifest + */ + public readonly manifest: cxschema.ArtifactManifest; + + /** + * The set of messages extracted from the artifact's metadata. + */ + public readonly messages: SynthesisMessage[]; + + /** + * IDs of all dependencies. Used when topologically sorting the artifacts within the cloud assembly. + * @internal + */ + public readonly _dependencyIDs: string[]; + + /** + * Cache of resolved dependencies. + */ + private _deps?: CloudArtifact[]; + + protected constructor(public readonly assembly: CloudAssembly, public readonly id: string, manifest: cxschema.ArtifactManifest) { + this.manifest = manifest; + this.messages = this.renderMessages(); + this._dependencyIDs = manifest.dependencies || []; + } + + /** + * Returns all the artifacts that this artifact depends on. + */ + public get dependencies(): CloudArtifact[] { + if (this._deps) { return this._deps; } + + this._deps = this._dependencyIDs.map(id => { + const dep = this.assembly.tryGetArtifact(id); + if (!dep) { + throw new Error(`Artifact ${this.id} depends on non-existing artifact ${id}`); + } + return dep; + }); + + return this._deps; + } + + /** + * @returns all the metadata entries of a specific type in this artifact. + * @param type + */ + public findMetadataByType(type: string): MetadataEntryResult[] { + const result = new Array(); + for (const path of Object.keys(this.manifest.metadata || {})) { + for (const entry of (this.manifest.metadata || {})[path]) { + if (entry.type === type) { + result.push({ path, ...entry }); + } + } + } + return result; + } + + private renderMessages() { + const messages = new Array(); + + for (const [id, metadata] of Object.entries(this.manifest.metadata || { })) { + for (const entry of metadata) { + let level: SynthesisMessageLevel; + switch (entry.type) { + case cxschema.ArtifactMetadataEntryType.WARN: + level = SynthesisMessageLevel.WARNING; + break; + case cxschema.ArtifactMetadataEntryType.ERROR: + level = SynthesisMessageLevel.ERROR; + break; + case cxschema.ArtifactMetadataEntryType.INFO: + level = SynthesisMessageLevel.INFO; + break; + default: + continue; + } + + messages.push({ level, entry, id }); + } + } + + return messages; + } + + /** + * An identifier that shows where this artifact is located in the tree + * of nested assemblies, based on their manifests. Defaults to the normal + * id. Should only be used in user interfaces. + */ + public get hierarchicalId(): string { + return this.manifest.displayName ?? this.id; + } +} diff --git a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts index 92ecefe1daa42..400981cea7054 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts @@ -2,8 +2,10 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import * as cxschema from '@aws-cdk/cloud-assembly-schema'; -import { Environment, EnvironmentUtils } from './environment'; -import { MetadataEntryResult, SynthesisMessage, SynthesisMessageLevel } from './metadata'; +import { CloudFormationStackArtifact } from './artifacts/cloudformation-artifact'; +import { NestedCloudAssemblyArtifact } from './artifacts/nested-cloud-assembly-artifact'; +import { TreeCloudArtifact } from './artifacts/tree-cloud-artifact'; +import { CloudArtifact } from './cloud-artifact'; import { topologicalSort } from './toposort'; /** @@ -462,398 +464,4 @@ function ensureDirSync(dir: string) { } else { fs.mkdirSync(dir, { recursive: true }); } -} - -/** - * Represents an artifact within a cloud assembly. - */ -export class CloudArtifact { - /** - * Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest. - * @param assembly The cloud assembly from which to load the artifact - * @param id The artifact ID - * @param artifact The artifact manifest - * @returns the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module. - */ - public static fromManifest(assembly: CloudAssembly, id: string, artifact: cxschema.ArtifactManifest): CloudArtifact | undefined { - switch (artifact.type) { - case cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK: - return new CloudFormationStackArtifact(assembly, id, artifact); - case cxschema.ArtifactType.CDK_TREE: - return new TreeCloudArtifact(assembly, id, artifact); - case cxschema.ArtifactType.ASSET_MANIFEST: - return new AssetManifestArtifact(assembly, id, artifact); - case cxschema.ArtifactType.NESTED_CLOUD_ASSEMBLY: - return new NestedCloudAssemblyArtifact(assembly, id, artifact); - default: - return undefined; - } - } - - /** - * The artifact's manifest - */ - public readonly manifest: cxschema.ArtifactManifest; - - /** - * The set of messages extracted from the artifact's metadata. - */ - public readonly messages: SynthesisMessage[]; - - /** - * IDs of all dependencies. Used when topologically sorting the artifacts within the cloud assembly. - * @internal - */ - public readonly _dependencyIDs: string[]; - - /** - * Cache of resolved dependencies. - */ - private _deps?: CloudArtifact[]; - - protected constructor(public readonly assembly: CloudAssembly, public readonly id: string, manifest: cxschema.ArtifactManifest) { - this.manifest = manifest; - this.messages = this.renderMessages(); - this._dependencyIDs = manifest.dependencies || []; - } - - /** - * Returns all the artifacts that this artifact depends on. - */ - public get dependencies(): CloudArtifact[] { - if (this._deps) { return this._deps; } - - this._deps = this._dependencyIDs.map(id => { - const dep = this.assembly.tryGetArtifact(id); - if (!dep) { - throw new Error(`Artifact ${this.id} depends on non-existing artifact ${id}`); - } - return dep; - }); - - return this._deps; - } - - /** - * @returns all the metadata entries of a specific type in this artifact. - * @param type - */ - public findMetadataByType(type: string): MetadataEntryResult[] { - const result = new Array(); - for (const p of Object.keys(this.manifest.metadata || {})) { - for (const entry of (this.manifest.metadata || {})[p]) { - if (entry.type === type) { - result.push({ path: p, ...entry }); - } - } - } - return result; - } - - private renderMessages() { - const messages = new Array(); - - for (const [id, metadata] of Object.entries(this.manifest.metadata || { })) { - for (const entry of metadata) { - let level: SynthesisMessageLevel; - switch (entry.type) { - case cxschema.ArtifactMetadataEntryType.WARN: - level = SynthesisMessageLevel.WARNING; - break; - case cxschema.ArtifactMetadataEntryType.ERROR: - level = SynthesisMessageLevel.ERROR; - break; - case cxschema.ArtifactMetadataEntryType.INFO: - level = SynthesisMessageLevel.INFO; - break; - default: - continue; - } - - messages.push({ level, entry, id }); - } - } - - return messages; - } - - /** - * An identifier that shows where this artifact is located in the tree - * of nested assemblies, based on their manifests. Defaults to the normal - * id. Should only be used in user interfaces. - */ - public get hierarchicalId(): string { - return this.manifest.displayName ?? this.id; - } -} - -/** - * Asset manifest is a description of a set of assets which need to be built and published - */ -export class AssetManifestArtifact extends CloudArtifact { - /** - * The file name of the asset manifest - */ - public readonly file: string; - - /** - * Version of bootstrap stack required to deploy this stack - */ - public readonly requiresBootstrapStackVersion: number; - - /** - * Name of SSM parameter with bootstrap stack version - * - * @default - Discover SSM parameter by reading stack - */ - public readonly bootstrapStackVersionSsmParameter?: string; - - constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { - super(assembly, name, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.AssetManifestProperties; - if (!properties.file) { - throw new Error('Invalid AssetManifestArtifact. Missing "file" property'); - } - this.file = path.resolve(this.assembly.directory, properties.file); - this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion ?? 1; - this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; - } -} - -export class CloudFormationStackArtifact extends CloudArtifact { - /** - * The file name of the template. - */ - public readonly templateFile: string; - - /** - * The original name as defined in the CDK app. - */ - public readonly originalName: string; - - /** - * Any assets associated with this stack. - */ - public readonly assets: cxschema.AssetMetadataEntry[]; - - /** - * CloudFormation parameters to pass to the stack. - */ - public readonly parameters: { [id: string]: string }; - - /** - * CloudFormation tags to pass to the stack. - */ - public readonly tags: { [id: string]: string }; - - /** - * The physical name of this stack. - */ - public readonly stackName: string; - - /** - * A string that represents this stack. Should only be used in user interfaces. - * If the stackName and artifactId are the same, it will just return that. Otherwise, - * it will return something like " ()" - */ - public readonly displayName: string; - - /** - * The physical name of this stack. - * @deprecated renamed to `stackName` - */ - public readonly name: string; - - /** - * The environment into which to deploy this artifact. - */ - public readonly environment: Environment; - - /** - * The role that needs to be assumed to deploy the stack - * - * @default - No role is assumed (current credentials are used) - */ - public readonly assumeRoleArn?: string; - - /** - * External ID to use when assuming role for cloudformation deployments - * - * @default - No external ID - */ - readonly assumeRoleExternalId?: string; - - /** - * The role that is passed to CloudFormation to execute the change set - * - * @default - No role is passed (currently assumed role/credentials are used) - */ - public readonly cloudFormationExecutionRoleArn?: string; - - /** - * The role to use to look up values from the target AWS account - * - * @default - No role is assumed (current credentials are used) - */ - public readonly lookupRole?: cxschema.BootstrapRole; - - /** - * If the stack template has already been included in the asset manifest, its asset URL - * - * @default - Not uploaded yet, upload just before deploying - */ - public readonly stackTemplateAssetObjectUrl?: string; - - /** - * Version of bootstrap stack required to deploy this stack - * - * @default - No bootstrap stack required - */ - public readonly requiresBootstrapStackVersion?: number; - - /** - * Name of SSM parameter with bootstrap stack version - * - * @default - Discover SSM parameter by reading stack - */ - public readonly bootstrapStackVersionSsmParameter?: string; - - /** - * Whether termination protection is enabled for this stack. - */ - public readonly terminationProtection?: boolean; - - /** - * Whether this stack should be validated by the CLI after synthesis - * - * @default - false - */ - public readonly validateOnSynth?: boolean; - - private _template: any | undefined; - - constructor(assembly: CloudAssembly, artifactId: string, artifact: cxschema.ArtifactManifest) { - super(assembly, artifactId, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.AwsCloudFormationStackProperties; - if (!properties.templateFile) { - throw new Error('Invalid CloudFormation stack artifact. Missing "templateFile" property in cloud assembly manifest'); - } - if (!artifact.environment) { - throw new Error('Invalid CloudFormation stack artifact. Missing environment'); - } - this.environment = EnvironmentUtils.parse(artifact.environment); - this.templateFile = properties.templateFile; - this.parameters = properties.parameters ?? {}; - - // We get the tags from 'properties' if available (cloud assembly format >= 6.0.0), otherwise - // from the stack metadata - this.tags = properties.tags ?? this.tagsFromMetadata(); - this.assumeRoleArn = properties.assumeRoleArn; - this.assumeRoleExternalId = properties.assumeRoleExternalId; - this.cloudFormationExecutionRoleArn = properties.cloudFormationExecutionRoleArn; - this.stackTemplateAssetObjectUrl = properties.stackTemplateAssetObjectUrl; - this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion; - this.bootstrapStackVersionSsmParameter = properties.bootstrapStackVersionSsmParameter; - this.terminationProtection = properties.terminationProtection; - this.validateOnSynth = properties.validateOnSynth; - this.lookupRole = properties.lookupRole; - - this.stackName = properties.stackName || artifactId; - this.assets = this.findMetadataByType(cxschema.ArtifactMetadataEntryType.ASSET).map(e => e.data as cxschema.AssetMetadataEntry); - - this.displayName = this.stackName === artifactId - ? this.stackName - : `${artifactId} (${this.stackName})`; - - this.name = this.stackName; // backwards compat - this.originalName = this.stackName; - } - - /** - * Full path to the template file - */ - public get templateFullPath() { - return path.join(this.assembly.directory, this.templateFile); - } - - /** - * The CloudFormation template for this stack. - */ - public get template(): any { - if (this._template === undefined) { - this._template = JSON.parse(fs.readFileSync(this.templateFullPath, 'utf-8')); - } - return this._template; - } - - private tagsFromMetadata() { - const ret: Record = {}; - for (const metadataEntry of this.findMetadataByType(cxschema.ArtifactMetadataEntryType.STACK_TAGS)) { - for (const tag of (metadataEntry.data ?? []) as cxschema.StackTagsMetadataEntry) { - ret[tag.key] = tag.value; - } - } - return ret; - } -} - -/** - * Asset manifest is a description of a set of assets which need to be built and published - */ -export class NestedCloudAssemblyArtifact extends CloudArtifact { - /** - * The relative directory name of the asset manifest - */ - public readonly directoryName: string; - - /** - * Display name - */ - public readonly displayName: string; - - /** - * Cache for the inner assembly loading - */ - private _nestedAssembly?: CloudAssembly; - - constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { - super(assembly, name, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.NestedCloudAssemblyProperties; - this.directoryName = properties.directoryName; - this.displayName = properties.displayName ?? name; - } - - /** - * Full path to the nested assembly directory - */ - public get fullPath(): string { - return path.join(this.assembly.directory, this.directoryName); - } - - /** - * The nested Assembly - */ - public get nestedAssembly(): CloudAssembly { - if (!this._nestedAssembly) { - this._nestedAssembly = new CloudAssembly(this.fullPath); - } - return this._nestedAssembly; - } -} - -export class TreeCloudArtifact extends CloudArtifact { - public readonly file: string; - - constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) { - super(assembly, name, artifact); - - const properties = (this.manifest.properties || {}) as cxschema.TreeArtifactProperties; - if (!properties.file) { - throw new Error('Invalid TreeCloudArtifact. Missing "file" property'); - } - this.file = properties.file; - } } \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/lib/index.ts b/packages/@aws-cdk/cx-api/lib/index.ts index 34d44f456f5c8..f5db330871753 100644 --- a/packages/@aws-cdk/cx-api/lib/index.ts +++ b/packages/@aws-cdk/cx-api/lib/index.ts @@ -7,6 +7,12 @@ export * from './context/endpoint-service-availability-zones'; export * from './context/security-group'; export * from './context/key'; export * from './cloud-artifact'; +import './cloud-artifact-aug'; +export * from './artifacts/asset-manifest-artifact'; +export * from './artifacts/cloudformation-artifact'; +export * from './artifacts/tree-cloud-artifact'; +export * from './artifacts/nested-cloud-assembly-artifact'; +import './artifacts/nested-cloud-assembly-artifact-aug'; export * from './cloud-assembly'; export * from './assets'; export * from './environment'; diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 3fee94fde29ca..a775754011d4d 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -40,7 +40,7 @@ "scripts": { "build": "cdk-build", "watch": "cdk-watch", - "lint": "cdk-lint", + "lint": "cdk-lint && madge --circular --extensions js lib", "test": "cdk-test", "pkglint": "pkglint -f", "package": "cdk-package", @@ -72,6 +72,7 @@ "@types/mock-fs": "^4.13.1", "@types/semver": "^7.3.9", "jest": "^27.4.7", + "madge": "^5.0.1", "mock-fs": "^4.14.0" }, "repository": { From 7e96b49348bd68f2965dc39d333327e2fb4d998a Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 6 Feb 2022 16:26:55 +0200 Subject: [PATCH 11/63] mid work --- packages/aws-cdk/bin/cdk.ts | 2 +- .../aws-cdk/lib/api/cxapp/cloud-assembly.ts | 1 + .../@aws-cdk/cdk-build-tools/bin/cdk-build.ts | 2 +- .../cdk-build-tools/lib/package-info.ts | 4 ++-- tools/@aws-cdk/cdk-build-tools/package.json | 2 +- tools/@aws-cdk/node-bundle/.projen/deps.json | 8 ------- tools/@aws-cdk/node-bundle/.projen/tasks.json | 2 +- tools/@aws-cdk/node-bundle/.projenrc.js | 2 +- tools/@aws-cdk/node-bundle/package.json | 6 ++--- .../@aws-cdk/node-bundle/src/attributions.ts | 3 +-- tools/@aws-cdk/node-bundle/src/bundle.ts | 24 +++++++++++-------- tools/@aws-cdk/node-bundle/src/shell.ts | 13 ++++------ .../@aws-cdk/node-bundle/test/bundle.test.ts | 6 ----- yarn.lock | 5 ---- 14 files changed, 29 insertions(+), 51 deletions(-) diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 4b1a8ecb36cf9..8204116670e76 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -4,7 +4,7 @@ import * as cxapi from '@aws-cdk/cx-api'; import '@jsii/check-node/run'; import * as chalk from 'chalk'; -import { Argv } from 'yargs'; +import type { Argv } from 'yargs'; import { SdkProvider } from '../lib/api/aws-auth'; import { BootstrapSource, Bootstrapper } from '../lib/api/bootstrap'; import { CloudFormationDeployments } from '../lib/api/cloudformation-deployments'; diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts index da1b80f89a440..333000a5aa122 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts @@ -9,6 +9,7 @@ import { versionNumber } from '../../version'; // eslint-disable-next-line @typescript-eslint/no-require-imports const minimatch = require('minimatch'); + export enum DefaultSelection { /** * Returns an empty selection in case there are no selectors. diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts index b387235bd171e..ae3c4e709b8ca 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts @@ -1,4 +1,4 @@ -import { Bundle } from 'node-bundle-projen'; +import { Bundle } from '@aws-cdk/node-bundle'; import * as yargs from 'yargs'; import { compileCurrentPackage } from '../lib/compile'; import { lintCurrentPackage } from '../lib/lint'; diff --git a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts index 4d148087c47ea..d070ba4499ce9 100644 --- a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts +++ b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as util from 'util'; -import * as bundle from 'node-bundle-projen'; +import type { BundleProps } from '@aws-cdk/node-bundle'; const readdir = util.promisify(fs.readdir); const stat = util.promisify(fs.stat); @@ -186,7 +186,7 @@ export interface CDKBuildOptions { * * @default - default configuration. */ - bundleProps?: bundle.BundleProps; + bundleProps?: BundleProps; } export interface CDKPackageOptions { diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 97b49fb53f225..3ad89f6038a5b 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -44,7 +44,7 @@ "dependencies": { "@aws-cdk/eslint-plugin": "0.0.0", "@aws-cdk/yarn-cling": "0.0.0", - "node-bundle-projen": "0.0.0", + "@aws-cdk/node-bundle": "0.0.0", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "awslint": "0.0.0", diff --git a/tools/@aws-cdk/node-bundle/.projen/deps.json b/tools/@aws-cdk/node-bundle/.projen/deps.json index 2227a4a0c3d26..35d6095011bfc 100644 --- a/tools/@aws-cdk/node-bundle/.projen/deps.json +++ b/tools/@aws-cdk/node-bundle/.projen/deps.json @@ -75,10 +75,6 @@ "name": "typescript", "type": "build" }, - { - "name": "chalk", - "type": "runtime" - }, { "name": "esbuild", "type": "runtime" @@ -86,10 +82,6 @@ { "name": "madge", "type": "runtime" - }, - { - "name": "shlex", - "type": "runtime" } ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." diff --git a/tools/@aws-cdk/node-bundle/.projen/tasks.json b/tools/@aws-cdk/node-bundle/.projen/tasks.json index 99288b4f0374e..ff02d2147a0ab 100644 --- a/tools/@aws-cdk/node-bundle/.projen/tasks.json +++ b/tools/@aws-cdk/node-bundle/.projen/tasks.json @@ -230,7 +230,7 @@ "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @types/jest @types/madge @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit json-schema npm-check-updates standard-version ts-jest typescript chalk esbuild madge shlex" + "exec": "yarn upgrade @types/jest @types/madge @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit json-schema npm-check-updates standard-version ts-jest typescript esbuild madge" }, { "exec": "npx projen" diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js index db78c27c1aa1b..b487a653c268e 100644 --- a/tools/@aws-cdk/node-bundle/.projenrc.js +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -3,7 +3,7 @@ const project = new typescript.TypeScriptProject({ name: '@aws-cdk/node-bundle', github: false, devDeps: ['@types/madge'], - deps: ['esbuild', 'madge', 'chalk', 'shlex'], + deps: ['esbuild', 'madge'], // required by projen even though 'github' is false. defaultReleaseBranch: 'main', diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 47b492573d398..178714e201cb6 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -1,5 +1,5 @@ { - "name": "node-bundle-projen", + "name": "@aws-cdk/node-bundle", "scripts": { "build": "npx projen build", "bump": "npx projen bump", @@ -42,10 +42,8 @@ "typescript": "^4.5.5" }, "dependencies": { - "chalk": "^4", "esbuild": "^0.14.17", - "madge": "^5.0.1", - "shlex": "^2.1.0" + "madge": "^5.0.1" }, "main": "lib/index.js", "license": "Apache-2.0", diff --git a/tools/@aws-cdk/node-bundle/src/attributions.ts b/tools/@aws-cdk/node-bundle/src/attributions.ts index 36f9dc0f3f6b6..a43421d884df8 100644 --- a/tools/@aws-cdk/node-bundle/src/attributions.ts +++ b/tools/@aws-cdk/node-bundle/src/attributions.ts @@ -3,8 +3,7 @@ export class Attributions { constructor(private readonly packages: Set) {} public validate() { - - + console.log(`Validatioing ${this.packages.size}`); } public create() { diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index b610082147997..a713aada0e39f 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -53,7 +53,7 @@ export class Bundle { const entrypoint = bin[0][1]; - console.log('esbuild | bundling dry-run'); + console.log('validate | discovering dependencies'); const bundle = await esbuild.build({ entryPoints: [bin[0][1]], @@ -66,22 +66,26 @@ export class Bundle { write: false, }); - if (bundle.warnings.length > 0 && (options.failOnWarnings ?? true)) { - // the warnings themselves are printed during esbuild execution. - throw new Error(`${bundle.warnings.length} bundling warnings detected!`); + if (bundle.warnings.length > 0 && options.failOnWarnings) { + // the warnings themselves are printed on screen via esbuild + console.log(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); + process.exit(1); } const inputs = Object.keys(bundle.metafile!.outputs[path.basename(entrypoint)].inputs); const dependencies = new Set(inputs.map(i => this.findPackage(i))); - console.log('madge | detecting circular imports'); - - // we don't use the programatic API since we want to eventually print circles - // which the madge cli already does. - await shell([`${require.resolve('madge/bin/cli.js')} --no-color --no-spinner --circular --extensions js`, ...dependencies].join(' ')); + for (const dep of dependencies) { + console.log(`validate | detecting circular imports (${dep})`); + // we don't use the programatic API since we want to eventually + // print circles, which the madge cli already does. + // also, for easier error reporting we run a separate command for each dependency. + // may need to reconsider this if it slows down the build too much. + await shell([`${require.resolve('madge/bin/cli.js')}`, '--warning', '--no-color', '--no-spinner', '--circular', '--extensions', 'js', dep]); + } const attributions = new Attributions(dependencies); - console.log('attributions | validate'); + console.log('validate | attributions'); attributions.validate(); } diff --git a/tools/@aws-cdk/node-bundle/src/shell.ts b/tools/@aws-cdk/node-bundle/src/shell.ts index 5538f2321bf0d..43b862beb4236 100644 --- a/tools/@aws-cdk/node-bundle/src/shell.ts +++ b/tools/@aws-cdk/node-bundle/src/shell.ts @@ -1,17 +1,12 @@ import * as child_process from 'child_process'; -import chalk from 'chalk'; -import * as shlex from 'shlex'; -export async function shell(command: string): Promise { - const parts = shlex.split(command); - const child = child_process.spawn(parts[0], parts.slice(1), { +export async function shell(command: string[]): Promise { + const child = child_process.spawn(command[0], command.slice(1), { // Need this for Windows where we want .cmd and .bat to be found as well. shell: true, stdio: ['ignore', 'pipe', 'pipe'], }); - const makeRed = process.stderr.isTTY ? chalk.red : (x: string) => x; - return new Promise((resolve, reject) => { const stdout = new Array(); @@ -21,7 +16,7 @@ export async function shell(command: string): Promise { }); child.stderr!.on('data', chunk => { - process.stderr.write(makeRed(chunk.toString())); + process.stderr.write(chunk.toString()); }); child.once('error', reject); @@ -29,7 +24,7 @@ export async function shell(command: string): Promise { if (code === 0) { resolve(Buffer.concat(stdout).toString('utf-8')); } else { - reject(new Error(`${parts[0]} exited with error code ${code}`)); + reject(new Error(`Command '${command}' exited with error code ${code}`)); } }); }); diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts index fdf979d305ebe..37898c1834744 100644 --- a/tools/@aws-cdk/node-bundle/test/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/bundle.test.ts @@ -1,12 +1,6 @@ -import { Bundle } from '../src'; - describe('validate', () => { test('throws when multiple bin scripts are defined', async () => { - - const bundle = new Bundle('/Users/epolon/dev/src/github.com/aws/aws-cdk/packages/aws-cdk', { externals: ['fsevents'] }); - await bundle.validate(); - }); }); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 345ec7b443398..236cd47bbb541 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9448,11 +9448,6 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" -shlex@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/shlex/-/shlex-2.1.0.tgz#4f8fbf75c4a9956283e4095fa5eac3f4969f6a6b" - integrity sha512-Tk8PjohJbWpGu2NtAlsEi/9AS4GU2zW2ZWLFrWRDskZpSJmyBIU3nTkBtocxD90r3w4BwRevsNtIqIP9HMuYiQ== - shx@^0.3.4: version "0.3.4" resolved "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" From 71e5e0be617b8233a57abe94ec25148d86d7fbe7 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 7 Feb 2022 12:52:22 +0200 Subject: [PATCH 12/63] mid work --- packages/aws-cdk/NOTICE | 3 + .../lib/api/cloudformation-deployments.ts | 4 +- tools/@aws-cdk/node-bundle/.projen/deps.json | 20 ++ tools/@aws-cdk/node-bundle/.projen/tasks.json | 2 +- tools/@aws-cdk/node-bundle/.projenrc.js | 14 +- tools/@aws-cdk/node-bundle/package.json | 7 +- .../@aws-cdk/node-bundle/src/attributions.ts | 75 +++++++- tools/@aws-cdk/node-bundle/src/bundle.ts | 135 +++++++++++--- tools/@aws-cdk/node-bundle/src/notice.ts | 172 ++++++++++++++++++ tools/@aws-cdk/node-bundle/src/shell.ts | 18 +- yarn.lock | 84 ++++++++- 11 files changed, 492 insertions(+), 42 deletions(-) create mode 100644 tools/@aws-cdk/node-bundle/src/notice.ts diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE index 1b7adbb891265..379365bb237e4 100644 --- a/packages/aws-cdk/NOTICE +++ b/packages/aws-cdk/NOTICE @@ -1,2 +1,5 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +| attributions.start | +| attributions.end | \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/cloudformation-deployments.ts b/packages/aws-cdk/lib/api/cloudformation-deployments.ts index 7ec70ac4414a2..6ec2fcf7cd736 100644 --- a/packages/aws-cdk/lib/api/cloudformation-deployments.ts +++ b/packages/aws-cdk/lib/api/cloudformation-deployments.ts @@ -5,7 +5,9 @@ import * as fs from 'fs-extra'; import { Tag } from '../cdk-toolkit'; import { debug, warning } from '../logging'; import { publishAssets } from '../util/asset-publishing'; -import { Mode, SdkProvider, ISDK } from './aws-auth'; +import { Mode } from './aws-auth/credentials'; +import { ISDK } from './aws-auth/sdk'; +import { SdkProvider } from './aws-auth/sdk-provider'; import { deployStack, DeployStackResult, destroyStack } from './deploy-stack'; import { LazyListStackResources, ListStackResources } from './evaluate-cloudformation-template'; import { ToolkitInfo } from './toolkit-info'; diff --git a/tools/@aws-cdk/node-bundle/.projen/deps.json b/tools/@aws-cdk/node-bundle/.projen/deps.json index 35d6095011bfc..6c6dd17d62869 100644 --- a/tools/@aws-cdk/node-bundle/.projen/deps.json +++ b/tools/@aws-cdk/node-bundle/.projen/deps.json @@ -4,6 +4,10 @@ "name": "@types/jest", "type": "build" }, + { + "name": "@types/license-checker", + "type": "build" + }, { "name": "@types/madge", "type": "build" @@ -79,9 +83,25 @@ "name": "esbuild", "type": "runtime" }, + { + "name": "fs-extra", + "type": "runtime" + }, + { + "name": "license-checker", + "type": "runtime" + }, { "name": "madge", "type": "runtime" + }, + { + "name": "shlex", + "type": "runtime" + }, + { + "name": "yargs", + "type": "runtime" } ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." diff --git a/tools/@aws-cdk/node-bundle/.projen/tasks.json b/tools/@aws-cdk/node-bundle/.projen/tasks.json index ff02d2147a0ab..15ccdccc2449f 100644 --- a/tools/@aws-cdk/node-bundle/.projen/tasks.json +++ b/tools/@aws-cdk/node-bundle/.projen/tasks.json @@ -230,7 +230,7 @@ "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @types/jest @types/madge @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit json-schema npm-check-updates standard-version ts-jest typescript esbuild madge" + "exec": "yarn upgrade @types/jest @types/license-checker @types/madge @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit json-schema npm-check-updates standard-version ts-jest typescript esbuild fs-extra license-checker madge shlex yargs" }, { "exec": "npx projen" diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js index b487a653c268e..9f2809750f02c 100644 --- a/tools/@aws-cdk/node-bundle/.projenrc.js +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -2,8 +2,18 @@ const { typescript } = require('projen'); const project = new typescript.TypeScriptProject({ name: '@aws-cdk/node-bundle', github: false, - devDeps: ['@types/madge'], - deps: ['esbuild', 'madge'], + devDeps: [ + '@types/madge', + '@types/license-checker', + ], + deps: [ + 'esbuild', + 'madge', + 'license-checker', + 'yargs', + 'fs-extra', + 'shlex', + ], // required by projen even though 'github' is false. defaultReleaseBranch: 'main', diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 178714e201cb6..1ee6621d5c120 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@types/jest": "^27.4.0", + "@types/license-checker": "^25.0.3", "@types/madge": "^5.0.0", "@types/node": "^12", "@typescript-eslint/eslint-plugin": "^5", @@ -43,7 +44,11 @@ }, "dependencies": { "esbuild": "^0.14.17", - "madge": "^5.0.1" + "fs-extra": "^10.0.0", + "license-checker": "^25.0.1", + "madge": "^5.0.1", + "shlex": "^2.1.0", + "yargs": "^17.3.1" }, "main": "lib/index.js", "license": "Apache-2.0", diff --git a/tools/@aws-cdk/node-bundle/src/attributions.ts b/tools/@aws-cdk/node-bundle/src/attributions.ts index a43421d884df8..4df1cf6d30e5c 100644 --- a/tools/@aws-cdk/node-bundle/src/attributions.ts +++ b/tools/@aws-cdk/node-bundle/src/attributions.ts @@ -1,12 +1,77 @@ +import { Notice, Attribution } from './notice'; + +const DEFAULT_ACCEPTED_LICENSES = [ + 'Apache-2.0', + 'MIT', + 'BSD-3-Clause', + 'ISC', + 'BSD-2-Clause', + '0BSD', +]; + +export interface AttributionsProps { + readonly acceptedLicenses?: string[]; + readonly excludePackages?: string[]; +} + +export interface Dependency { + readonly path: string; + readonly name: string; + readonly version: string; +} + export class Attributions { - constructor(private readonly packages: Set) {} + private readonly acceptedLicenses; + private readonly excludedPackages; + private readonly dependencies; - public validate() { - console.log(`Validatioing ${this.packages.size}`); + constructor(dependencies: Dependency[], props: AttributionsProps = {}) { + this.acceptedLicenses = (props.acceptedLicenses ?? DEFAULT_ACCEPTED_LICENSES).map(l => l.toLowerCase()); + this.excludedPackages = props.excludePackages ?? []; + this.dependencies = dependencies.filter(d => !this.excludedPackages.includes(d.name)); } - public create() { + public async validate() { + + const expected = await Notice.generate(this.dependencies); + const invalid: Attribution[] = []; + + // validate all expected attributions have a valid license + for (const [_, attr] of expected.attributions.entries()) { + if (!this.acceptedLicenses.includes(attr.license)) { + invalid.push(attr); + } + } + + if (invalid.length > 0) { + console.log(`✖ Found ${invalid.length} invalid license attributions (either remove their usage or update the acceptable license list):`); + console.log(invalid.map(a => ` - ${a.package} (${a.license})`).join('\n')); + process.exit(1); + } + + // validate the actual attributions match the expected ones + const actual = Notice.parse(); + + const missing = expected.findMissing(actual); + const unnecessary = actual.findMissing(expected); + + if (missing.length > 0) { + console.log(`✖ Found ${missing.length} missing attributions (generate with 'node-bundle fix'):`); + console.log(missing.map(a => ` - ${a.package}`).join('\n')); + process.exit(1); + } + + if (unnecessary.length > 0) { + console.log(`✖ Found ${unnecessary.length} unnecessary attributions (remove with 'node-bundle fix'):`); + console.log(unnecessary.map(a => ` - ${a.package}`).join('\n')); + process.exit(1); + } } -} \ No newline at end of file + + public async create() { + (await Notice.generate(this.dependencies)).flush(); + } + +} diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index a713aada0e39f..00790aaf8a94d 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -1,62 +1,99 @@ -import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; -import { Attributions } from './attributions'; +import * as fs from 'fs-extra'; +import { Attributions, Dependency } from './attributions'; import { shell } from './shell'; +/** + * Bundling properties. + */ export interface BundleProps { - /** - * @default - no external references + * External packages that cannot be bundled. + * + * These will remain a runtime dependency of the package. + * + * @default - no external references. */ readonly externals?: string[]; + /** + * External resources that need to be embedded in the bundle. + * + * These will be copied over to the appropriate paths before packaging. + */ + readonly resources?: {[src: string]: string}; } +/** + * Validation options. + */ export interface ValidateOptions { /** + * Fail validation on any bundling warnings that may arrise. + * * @default true */ readonly failOnWarnings?: boolean; } +/** + * Fix options. + */ +export interface FixOptions extends ValidateOptions { + +} + +/** + * Packaging options. + */ export interface PackOptions extends ValidateOptions { /** + * Directory to produce the tarball in. + * * @default - current working directory */ readonly outDir?: string; } - +/** + * Bundle class to validate and pack nodejs bundles. + */ export class Bundle { private readonly manifest: any; + // private readonly script: string; + private readonly entrypoint: string; constructor(private readonly packageDir: string, private readonly props: BundleProps = {}) { const packageJson = path.join(packageDir, 'package.json'); if (!fs.existsSync(packageJson)) { - throw new Error(`Unable to find ${packageJson}`); + console.error(`✖ Unable to find ${packageJson}`); + process.exit(1); } - this.manifest = JSON.parse(fs.readFileSync(packageJson, 'utf-8').toString()); - } - - public async validate(options: ValidateOptions = {}) { + this.manifest = fs.readJsonSync(packageJson); // support only a single entrypoint for now const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); if (bin.length === 0) { - throw new Error('No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); + console.error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); + process.exit(1); } if (bin.length > 1) { - throw new Error('Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); + console.error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); + process.exit(1); } + // this.script = bin[0][0]; + this.entrypoint = bin[0][1]; + } - const entrypoint = bin[0][1]; + public async validate(options: ValidateOptions = {}): Promise<{bundle: esbuild.BuildResult; attributions: Attributions}> { - console.log('validate | discovering dependencies'); + console.log('Discovering dependencies'); const bundle = await esbuild.build({ - entryPoints: [bin[0][1]], + entryPoints: [this.entrypoint], bundle: true, target: 'node12', platform: 'node', @@ -68,32 +105,74 @@ export class Bundle { if (bundle.warnings.length > 0 && options.failOnWarnings) { // the warnings themselves are printed on screen via esbuild - console.log(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); + console.error(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); process.exit(1); } - const inputs = Object.keys(bundle.metafile!.outputs[path.basename(entrypoint)].inputs); - const dependencies = new Set(inputs.map(i => this.findPackage(i))); + const inputs = Object.keys(bundle.metafile!.outputs[path.basename(this.entrypoint)].inputs); + const dependencies = Array.from(new Set(Array.from(inputs).map(i => this.findPackage(i)))).map(p => this.createDependency(p)); for (const dep of dependencies) { - console.log(`validate | detecting circular imports (${dep})`); + console.log(`Detecting circular imports (${dep.path})`); // we don't use the programatic API since we want to eventually // print circles, which the madge cli already does. // also, for easier error reporting we run a separate command for each dependency. // may need to reconsider this if it slows down the build too much. - await shell([`${require.resolve('madge/bin/cli.js')}`, '--warning', '--no-color', '--no-spinner', '--circular', '--extensions', 'js', dep]); + await shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${dep.path}`); } const attributions = new Attributions(dependencies); - console.log('validate | attributions'); - attributions.validate(); + await attributions.validate(); + + return { bundle, attributions }; + } + + public async fix(options: FixOptions = {}) { + const { attributions } = await this.validate(options); + await attributions.create(); } - public pack() { + public async pack(options: PackOptions = {}) { + const { bundle } = await this.validate(options); + const outputFiles = (bundle.outputFiles ?? []); + if (outputFiles.length === 0) { + console.error('✖ Bundling failed to produce any bundle files'); + process.exit(1); + } + + if (outputFiles.length > 1) { + console.error('✖ Bundling produced multiple bundle files:'); + console.error(outputFiles.map(b => ` - ${b}`).join('\n')); + process.exit(1); + } + + // const outputFile = outputFiles[0].path; + const workdir = await fs.mkdtemp(path.join(os.tmpdir(), path.sep)); + const cwd = process.cwd(); + + try { + fs.copySync(cwd, workdir, { filter: n => !n.startsWith('node_modules') && !n.startsWith('.git') }); + + // const manifest = { ...this.manifest }; + // for (const [d, v] of Object.entries(manifest.dependencies)) { + // manifest.devDependencies[d] = v; + // } + // delete manifest.dependencies; + + // const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(outputFile)}');`]; + // const entrypointPath = path.join(path.dirname(outputFile), 'entrypoint.bundle'); + // manifest.bin = { [this.script]: path.relative() }; + + // fs.writeFileSync(path.join(path.dirname(outputFile), 'entrypoint.bundle'), entrypoint.join('\n')); + // fs.writeFileSync('package.json', JSON.stringify(manifest)); + + } finally { + fs.removeSync(workdir); + } } - private findPackage(inputFile: string) { + private findPackage(inputFile: string): string { function findPackageUp(dirname: string): string { const manifestPath = path.join(dirname, 'package.json'); @@ -107,8 +186,12 @@ export class Bundle { } return findPackageUp(path.resolve(this.packageDir, path.dirname(inputFile))); - } -} + private createDependency(packageDir: string): Dependency { + const manifestPath = path.join(packageDir, 'package.json'); + const manifest = JSON.parse(fs.readFileSync(manifestPath, { encoding: 'utf-8' })); + return { path: packageDir, name: manifest.name, version: manifest.version }; + } +} diff --git a/tools/@aws-cdk/node-bundle/src/notice.ts b/tools/@aws-cdk/node-bundle/src/notice.ts new file mode 100644 index 0000000000000..8ca3dc9e3fb89 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/notice.ts @@ -0,0 +1,172 @@ +import * as fs from 'fs'; +import { Dependency } from '.'; +import { shell } from './shell'; + +const FILE_PATH = 'NOTICE'; + +/** + * + * + * | attributions.start | + * + * + * + * | attributions.end | + */ +const NOTICE_FORMAT_REGEX = /([\S\s]*)\| attributions\.start \|([\S\s]*)\| attributions\.end \|/; + +/** + * --------------- + */ +const ATTRIBUTIONS_SEPARATOR = `\n${'-'.repeat(15)}\n`; + +/** + * ** fs-extra@3.0.4 - https://www.npmjs.com/package/fs-extra/v/3.0.4 | MIT + * + * Copyright (c) 2011-2017 JP Richardson + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files + * + */ +const ATTRIBUTION_FORMAT_REGEX = /\*\* (\S*) - (\S*) \| (\S*)([\S\s]*)/; + +export interface NoticeGenerateOptions { + /** + * Prefix to prepend to the NOTICE file before the attributions segment starts. + */ + readonly prefix?: string; +} + +export class Notice { + + public static parse(): Notice { + + if (!fs.existsSync(FILE_PATH)) { + return new Notice(new Map()); + } + + const notice = fs.readFileSync(FILE_PATH, { encoding: 'utf-8' }).match(NOTICE_FORMAT_REGEX); + if (!notice) { + console.error(`✖ Malformed ${FILE_PATH} file (fix with 'node-bundle fix'):`); + process.exit(1); + } + + const attributions: Map = new Map(); + const malformed = []; + + for (const section of notice[2].split(ATTRIBUTIONS_SEPARATOR)) { + const matched = section.match(ATTRIBUTION_FORMAT_REGEX); + if (!matched) { + malformed.push(section.trim().split('\n')[0]); + continue; + } + const pkg = matched[1]; + attributions.set(pkg, { + package: pkg, + url: matched[2], + license: matched[3], + licenseText: matched[4], + }); + } + + if (malformed.length > 0) { + console.error(`✖ Found ${malformed.length} malformed attributions (fix with 'node-bundle fix'):`); + console.error(malformed.map(l => ` - ${l}`)); + process.exit(1); + } + + return new Notice(attributions, notice[1]); + } + + public static async generate(dependencies: Dependency[], options: NoticeGenerateOptions = {}): Promise { + + const attributions: Map = new Map(); + + const multiLicense = []; + const missingLicense = []; + + for (const dep of dependencies) { + const pkg = `${dep.name}@${dep.version}`; + const output = await shell(`${require.resolve('license-checker/bin/license-checker')} --json --packages ${pkg}`, { cwd: dep.path, quiet: true }); + const info = JSON.parse(output)[pkg]; + const licenses: string[] = info.licenses ? info.licenses.split(',') : []; + + if (licenses.length > 0) { + multiLicense.push(`${dep} (${licenses})`); + continue; + } + + if (licenses.length === 0) { + missingLicense.push(dep); + continue; + } + + attributions.set(pkg, { + package: pkg, + url: `https://www.npmjs.com/package/${dep.name}/v/${dep.version}`, + license: licenses[0], + licenseText: (info.licenseFile && fs.existsSync(info.licenseFile)) ? fs.readFileSync(info.licenseFile, { encoding: 'utf-8' }) : undefined, + }); + } + + if (multiLicense.length > 0) { + console.error(`✖ Found ${multiLicense.length} dependencies with multiple licenses (these are unsupported for now, please remove their usage):`); + console.error(multiLicense.map(l => ` - ${l}`).join('\n')); + process.exit(1); + } + + if (multiLicense.length > 0) { + console.error(`✖ Found ${multiLicense.length} dependencies with no license information (these are unsupported for now, please remove their usage):`); + console.error(multiLicense.map(l => ` - ${l}`).join('\n')); + process.exit(1); + } + + return new Notice(attributions, options.prefix); + } + + private constructor(public readonly attributions: Map, public readonly prefix?: string) { + + } + + /** + * Query whether a specific attribution exists in this notice. + */ + public includesAttribution(attr: Attribution): boolean { + const candidate = this.attributions.get(attr.package); + + if (!candidate) { + return false; + } + if (candidate.url !== attr.url) { + return false; + } + if (candidate.license !== attr.license) { + return false; + } + if (candidate.licenseText !== attr.licenseText) { + return false; + } + return true; + } + + /** + * Write the NOTICE file to disk. + */ + public flush() { + + } + + /** + * Find attributions in the current notice that are missing + * from the the input ones. + */ + public findMissing(other: Notice): Attribution[] { + return Array.from(this.attributions.values()).filter(a => !other.includesAttribution(a)); + } +} + +export interface Attribution { + readonly package: string; + readonly url: string; + readonly license: string; + readonly licenseText?: string; +} diff --git a/tools/@aws-cdk/node-bundle/src/shell.ts b/tools/@aws-cdk/node-bundle/src/shell.ts index 43b862beb4236..930159b7c143d 100644 --- a/tools/@aws-cdk/node-bundle/src/shell.ts +++ b/tools/@aws-cdk/node-bundle/src/shell.ts @@ -1,17 +1,29 @@ import * as child_process from 'child_process'; +import * as shlex from 'shlex'; -export async function shell(command: string[]): Promise { - const child = child_process.spawn(command[0], command.slice(1), { +export interface ShellOptions { + readonly cwd?: string; + readonly quiet?: boolean; +} + +export async function shell(command: string, options: ShellOptions = {}): Promise { + const parts = shlex.split(command); + const child = child_process.spawn(parts[0], parts.slice(1), { // Need this for Windows where we want .cmd and .bat to be found as well. shell: true, + cwd: options.cwd, stdio: ['ignore', 'pipe', 'pipe'], }); return new Promise((resolve, reject) => { const stdout = new Array(); + const quiet = options.quiet ?? false; + child.stdout!.on('data', chunk => { - process.stdout.write(chunk); + if (!quiet) { + process.stdout.write(chunk); + } stdout.push(chunk); }); diff --git a/yarn.lock b/yarn.lock index 236cd47bbb541..dd6c5d590f0f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1825,6 +1825,11 @@ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/license-checker@^25.0.3": + version "25.0.3" + resolved "https://registry.npmjs.org/@types/license-checker/-/license-checker-25.0.3.tgz#fbe80df33f1ac9d4bc2d4c167da3c2fd2999eb73" + integrity sha512-sFkIgeXh6HJR79DbTrZrsHWhfyr3q8v2Gswj3y0tRPEo57OEPVgDF/z/ePybHUGuSCwiDiAt/3YMta9ujUxQpQ== + "@types/lodash@^4.14.178": version "4.14.178" resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" @@ -2422,6 +2427,11 @@ array-differ@^3.0.0: resolved "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== +array-find-index@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -2897,7 +2907,7 @@ cdk8s@^1.5.7: follow-redirects "^1.14.7" yaml "2.0.0-7" -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3609,7 +3619,7 @@ debug@^2.2.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^3.2.7: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -6949,6 +6959,22 @@ libnpmpublish@^4.0.0: semver "^7.1.3" ssri "^8.0.1" +license-checker@^25.0.1: + version "25.0.1" + resolved "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz#4d14504478a5240a857bb3c21cd0491a00d761fa" + integrity sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g== + dependencies: + chalk "^2.4.1" + debug "^3.1.0" + mkdirp "^0.5.1" + nopt "^4.0.1" + read-installed "~4.0.3" + semver "^5.5.0" + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + spdx-satisfies "^4.0.0" + treeify "^1.1.0" + lie@~3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -8945,6 +8971,20 @@ read-cmd-shim@^2.0.0: resolved "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== +read-installed@~4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" + integrity sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc= + dependencies: + debuglog "^1.0.1" + read-package-json "^2.0.0" + readdir-scoped-modules "^1.0.0" + semver "2 || 3 || 4 || 5" + slide "~1.1.3" + util-extend "^1.0.1" + optionalDependencies: + graceful-fs "^4.1.2" + read-package-json-fast@^2.0.1: version "2.0.3" resolved "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" @@ -9448,6 +9488,11 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" +shlex@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/shlex/-/shlex-2.1.0.tgz#4f8fbf75c4a9956283e4095fa5eac3f4969f6a6b" + integrity sha512-Tk8PjohJbWpGu2NtAlsEi/9AS4GU2zW2ZWLFrWRDskZpSJmyBIU3nTkBtocxD90r3w4BwRevsNtIqIP9HMuYiQ== + shx@^0.3.4: version "0.3.4" resolved "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" @@ -9518,7 +9563,7 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -slide@^1.1.6: +slide@^1.1.6, slide@~1.1.3: version "1.1.6" resolved "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= @@ -9627,6 +9672,15 @@ spawn-wrap@^2.0.0: signal-exit "^3.0.2" which "^2.0.1" +spdx-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz#2c55f117362078d7409e6d7b08ce70a857cd3ed7" + integrity sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A== + dependencies: + array-find-index "^1.0.2" + spdx-expression-parse "^3.0.0" + spdx-ranges "^2.0.0" + spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -9658,6 +9712,20 @@ spdx-license-list@^6.4.0: resolved "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.4.0.tgz#9850c3699c1d35745285607d064d2a5145049d12" integrity sha512-4BxgJ1IZxTJuX1YxMGu2cRYK46Bk9zJNTK2/R0wNZR0cm+6SVl26/uG7FQmQtxoJQX1uZ0EpTi2L7zvMLboaBA== +spdx-ranges@^2.0.0: + version "2.1.1" + resolved "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz#87573927ba51e92b3f4550ab60bfc83dd07bac20" + integrity sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA== + +spdx-satisfies@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz#9a09a68d80f5f1a31cfaebb384b0c6009e4969fe" + integrity sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA== + dependencies: + spdx-compare "^1.0.0" + spdx-expression-parse "^3.0.0" + spdx-ranges "^2.0.0" + split-on-first@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" @@ -10143,6 +10211,11 @@ traverse@^0.6.6: resolved "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= +treeify@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" + integrity sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -10480,6 +10553,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +util-extend@^1.0.1: + version "1.0.3" + resolved "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" + integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= + util-promisify@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" From e504608c38e58d66ada1556e3b79b7225ce18a2c Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 7 Feb 2022 14:45:32 +0200 Subject: [PATCH 13/63] mid work --- tools/@aws-cdk/node-bundle/src/bundle.ts | 205 ++++++++++++----------- tools/@aws-cdk/node-bundle/src/index.ts | 3 +- 2 files changed, 108 insertions(+), 100 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index 00790aaf8a94d..9fbb2cf84d6ea 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -26,55 +26,29 @@ export interface BundleProps { readonly resources?: {[src: string]: string}; } -/** - * Validation options. - */ -export interface ValidateOptions { - /** - * Fail validation on any bundling warnings that may arrise. - * - * @default true - */ - readonly failOnWarnings?: boolean; -} - -/** - * Fix options. - */ -export interface FixOptions extends ValidateOptions { - -} - -/** - * Packaging options. - */ -export interface PackOptions extends ValidateOptions { - /** - * Directory to produce the tarball in. - * - * @default - current working directory - */ - readonly outDir?: string; -} - /** * Bundle class to validate and pack nodejs bundles. */ export class Bundle { private readonly manifest: any; - // private readonly script: string; + private readonly script: string; private readonly entrypoint: string; + private readonly outfile: string; - constructor(private readonly packageDir: string, private readonly props: BundleProps = {}) { + private readonly externals: string[] = []; + private readonly resources: {[src: string]: string} = {}; + + constructor(private readonly packageDir: string, props: BundleProps = {}) { const packageJson = path.join(packageDir, 'package.json'); if (!fs.existsSync(packageJson)) { console.error(`✖ Unable to find ${packageJson}`); process.exit(1); } this.manifest = fs.readJsonSync(packageJson); + this.externals = props.externals ?? []; + this.resources = props.resources ?? {}; - // support only a single entrypoint for now const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); if (bin.length === 0) { console.error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); @@ -84,13 +58,73 @@ export class Bundle { console.error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); process.exit(1); } - // this.script = bin[0][0]; + this.script = bin[0][0]; this.entrypoint = bin[0][1]; + this.outfile = path.join(path.dirname(this.entrypoint), 'node-cli-bundle.js'); + } + + public async validate() { + + console.log('Creating bundle'); + const dependencies = await this.esbuild(); + + console.log('Validating circular imports'); + await this.validateCircularImports(dependencies); + + console.log('Validating attributions'); + await this.validateAttributions(dependencies); + } + + public async fix() { + + console.log('Creating bundle'); + const dependencies = await this.esbuild(); + + console.log('Generating attributions'); + const attributions = new Attributions(dependencies); + await attributions.create(); + } + + public async pack(target?: string) { + + console.log('Creating bundle'); + await this.esbuild(); + + console.log('Copying resources'); + for (const [src, dst] of Object.entries(this.resources)) { + fs.copySync(src, dst); + } + + // console.log('Validating circular imports'); + // await this.validateCircularImports(dependencies); + + console.log('Creating package'); + await this.createPackage(target ?? process.cwd()); + } + + private findPackage(inputFile: string): string { + + function findPackageUp(dirname: string): string { + const manifestPath = path.join(dirname, 'package.json'); + if (fs.existsSync(manifestPath)) { + return dirname; + } + if (path.dirname(dirname) === dirname) { + throw new Error('Unable to find package manifest'); + } + return findPackageUp(path.dirname(dirname)); + } + + return findPackageUp(path.resolve(this.packageDir, path.dirname(inputFile))); } - public async validate(options: ValidateOptions = {}): Promise<{bundle: esbuild.BuildResult; attributions: Attributions}> { + private createDependency(packageDir: string): Dependency { + const manifestPath = path.join(packageDir, 'package.json'); + const manifest = JSON.parse(fs.readFileSync(manifestPath, { encoding: 'utf-8' })); + return { path: packageDir, name: manifest.name, version: manifest.version }; + } - console.log('Discovering dependencies'); + private async esbuild(): Promise { const bundle = await esbuild.build({ entryPoints: [this.entrypoint], @@ -99,18 +133,24 @@ export class Bundle { platform: 'node', metafile: true, absWorkingDir: this.packageDir, - external: this.props.externals, - write: false, + external: this.externals, + write: true, + outfile: this.outfile, + allowOverwrite: true, }); - if (bundle.warnings.length > 0 && options.failOnWarnings) { - // the warnings themselves are printed on screen via esbuild + if (bundle.warnings.length) { + // esbuild warnings are usually important, lets try to be strict here. + // the warnings themselves are printed on screen. console.error(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); process.exit(1); } - const inputs = Object.keys(bundle.metafile!.outputs[path.basename(this.entrypoint)].inputs); - const dependencies = Array.from(new Set(Array.from(inputs).map(i => this.findPackage(i)))).map(p => this.createDependency(p)); + const inputs = Object.keys(bundle.metafile!.outputs[this.outfile].inputs); + return Array.from(new Set(Array.from(inputs).map(i => this.findPackage(i)))).map(p => this.createDependency(p)); + } + + private async validateCircularImports(dependencies: Dependency[]) { for (const dep of dependencies) { console.log(`Detecting circular imports (${dep.path})`); @@ -121,77 +161,44 @@ export class Bundle { await shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${dep.path}`); } - const attributions = new Attributions(dependencies); - await attributions.validate(); - - return { bundle, attributions }; } - public async fix(options: FixOptions = {}) { - const { attributions } = await this.validate(options); - await attributions.create(); + private async validateAttributions(dependencies: Dependency[]) { + const attributions = new Attributions(dependencies); + await attributions.validate(); } - public async pack(options: PackOptions = {}) { - const { bundle } = await this.validate(options); - const outputFiles = (bundle.outputFiles ?? []); - - if (outputFiles.length === 0) { - console.error('✖ Bundling failed to produce any bundle files'); - process.exit(1); - } - - if (outputFiles.length > 1) { - console.error('✖ Bundling produced multiple bundle files:'); - console.error(outputFiles.map(b => ` - ${b}`).join('\n')); - process.exit(1); - } + private async createPackage(target: string) { - // const outputFile = outputFiles[0].path; const workdir = await fs.mkdtemp(path.join(os.tmpdir(), path.sep)); - const cwd = process.cwd(); - try { - fs.copySync(cwd, workdir, { filter: n => !n.startsWith('node_modules') && !n.startsWith('.git') }); + fs.copySync(this.packageDir, workdir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); - // const manifest = { ...this.manifest }; - // for (const [d, v] of Object.entries(manifest.dependencies)) { - // manifest.devDependencies[d] = v; - // } - // delete manifest.dependencies; + const bundleManifest = { ...this.manifest }; - // const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(outputFile)}');`]; - // const entrypointPath = path.join(path.dirname(outputFile), 'entrypoint.bundle'); - // manifest.bin = { [this.script]: path.relative() }; + // move all 'dependencies' to 'devDependencies' so that npm doesn't install anything when consuming + for (const [d, v] of Object.entries(this.manifest.dependencies)) { + bundleManifest.devDependencies[d] = v; + } + bundleManifest.dependencies = {}; - // fs.writeFileSync(path.join(path.dirname(outputFile), 'entrypoint.bundle'), entrypoint.join('\n')); - // fs.writeFileSync('package.json', JSON.stringify(manifest)); + // inject a new entrypoint referencing the bundle file + const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(this.outfile)}');`]; + const entrypointPath = path.join(path.dirname(this.entrypoint), 'entrypoint.bundle'); + bundleManifest.bin = { [this.script]: entrypointPath }; - } finally { - fs.removeSync(workdir); - } - } + fs.writeFileSync(path.join(workdir, entrypointPath), entrypointContent.join('\n')); + fs.writeFileSync(path.join(workdir, 'package.json'), JSON.stringify(bundleManifest, null, 2)); - private findPackage(inputFile: string): string { + // create the tarball + const tarball = (await shell('npm pack')).trim(); + await fs.mkdirp(target); + await fs.move(tarball, path.join(target, path.basename(tarball))); - function findPackageUp(dirname: string): string { - const manifestPath = path.join(dirname, 'package.json'); - if (fs.existsSync(manifestPath)) { - return dirname; - } - if (path.dirname(dirname) === dirname) { - throw new Error('Unable to find package manifest'); - } - return findPackageUp(path.dirname(dirname)); + } finally { + fs.removeSync(workdir); } - return findPackageUp(path.resolve(this.packageDir, path.dirname(inputFile))); - } - - private createDependency(packageDir: string): Dependency { - const manifestPath = path.join(packageDir, 'package.json'); - const manifest = JSON.parse(fs.readFileSync(manifestPath, { encoding: 'utf-8' })); - return { path: packageDir, name: manifest.name, version: manifest.version }; } } diff --git a/tools/@aws-cdk/node-bundle/src/index.ts b/tools/@aws-cdk/node-bundle/src/index.ts index 0b48aba96c8d2..eff15c484fd1e 100644 --- a/tools/@aws-cdk/node-bundle/src/index.ts +++ b/tools/@aws-cdk/node-bundle/src/index.ts @@ -1,2 +1,3 @@ export * from './bundle'; -export * from './attributions'; \ No newline at end of file +export * from './attributions'; +export * from './notice'; \ No newline at end of file From caa9bc61874e49be4e1ab7bb75a1ce2c62b252ad Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 7 Feb 2022 19:10:31 +0200 Subject: [PATCH 14/63] mid work --- tools/@aws-cdk/node-bundle/src/bundle.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index 9fbb2cf84d6ea..e73b074343b9c 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -170,6 +170,16 @@ export class Bundle { private async createPackage(target: string) { + if (!fs.existsSync(target)) { + console.log(`✖ Target doesnt exist: ${target}`); + process.exit(1); + } + + if (!fs.lstatSync(target).isDirectory()) { + console.log(`✖ Target must be a directory: ${target}`); + process.exit(1); + } + const workdir = await fs.mkdtemp(path.join(os.tmpdir(), path.sep)); try { fs.copySync(this.packageDir, workdir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); @@ -192,8 +202,7 @@ export class Bundle { // create the tarball const tarball = (await shell('npm pack')).trim(); - await fs.mkdirp(target); - await fs.move(tarball, path.join(target, path.basename(tarball))); + await fs.copy(tarball, target); } finally { fs.removeSync(workdir); From 1067fb699ff2a06fe7d6f28cc3deee2f020d1bcb Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 9 Feb 2022 13:22:09 +0200 Subject: [PATCH 15/63] mid work --- tools/@aws-cdk/node-bundle/package.json | 2 +- .../@aws-cdk/node-bundle/src/attributions.ts | 77 ----- tools/@aws-cdk/node-bundle/src/bundle.ts | 304 ++++++++++++------ tools/@aws-cdk/node-bundle/src/index.ts | 1 - tools/@aws-cdk/node-bundle/src/model.ts | 90 ++++++ tools/@aws-cdk/node-bundle/src/notice.ts | 288 +++++++++++------ tools/@aws-cdk/node-bundle/src/shell.ts | 38 +-- .../@aws-cdk/node-bundle/test/bundle.test.ts | 15 +- 8 files changed, 501 insertions(+), 314 deletions(-) delete mode 100644 tools/@aws-cdk/node-bundle/src/attributions.ts create mode 100644 tools/@aws-cdk/node-bundle/src/model.ts diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 1ee6621d5c120..62f5e9de8e0e1 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -59,7 +59,7 @@ "/(test|src)/**/?(*.)+(spec|test).ts?(x)" ], "clearMocks": true, - "collectCoverage": true, + "collectCoverage": false, "coverageReporters": [ "json", "lcov", diff --git a/tools/@aws-cdk/node-bundle/src/attributions.ts b/tools/@aws-cdk/node-bundle/src/attributions.ts deleted file mode 100644 index 4df1cf6d30e5c..0000000000000 --- a/tools/@aws-cdk/node-bundle/src/attributions.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Notice, Attribution } from './notice'; - -const DEFAULT_ACCEPTED_LICENSES = [ - 'Apache-2.0', - 'MIT', - 'BSD-3-Clause', - 'ISC', - 'BSD-2-Clause', - '0BSD', -]; - -export interface AttributionsProps { - readonly acceptedLicenses?: string[]; - readonly excludePackages?: string[]; -} - -export interface Dependency { - readonly path: string; - readonly name: string; - readonly version: string; -} - -export class Attributions { - - private readonly acceptedLicenses; - private readonly excludedPackages; - private readonly dependencies; - - constructor(dependencies: Dependency[], props: AttributionsProps = {}) { - this.acceptedLicenses = (props.acceptedLicenses ?? DEFAULT_ACCEPTED_LICENSES).map(l => l.toLowerCase()); - this.excludedPackages = props.excludePackages ?? []; - this.dependencies = dependencies.filter(d => !this.excludedPackages.includes(d.name)); - } - - public async validate() { - - const expected = await Notice.generate(this.dependencies); - const invalid: Attribution[] = []; - - // validate all expected attributions have a valid license - for (const [_, attr] of expected.attributions.entries()) { - if (!this.acceptedLicenses.includes(attr.license)) { - invalid.push(attr); - } - } - - if (invalid.length > 0) { - console.log(`✖ Found ${invalid.length} invalid license attributions (either remove their usage or update the acceptable license list):`); - console.log(invalid.map(a => ` - ${a.package} (${a.license})`).join('\n')); - process.exit(1); - } - - // validate the actual attributions match the expected ones - const actual = Notice.parse(); - - const missing = expected.findMissing(actual); - const unnecessary = actual.findMissing(expected); - - if (missing.length > 0) { - console.log(`✖ Found ${missing.length} missing attributions (generate with 'node-bundle fix'):`); - console.log(missing.map(a => ` - ${a.package}`).join('\n')); - process.exit(1); - } - - if (unnecessary.length > 0) { - console.log(`✖ Found ${unnecessary.length} unnecessary attributions (remove with 'node-bundle fix'):`); - console.log(unnecessary.map(a => ` - ${a.package}`).join('\n')); - process.exit(1); - } - - } - - public async create() { - (await Notice.generate(this.dependencies)).flush(); - } - -} diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index e73b074343b9c..e01edc5e9cbee 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -2,13 +2,25 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import { Attributions, Dependency } from './attributions'; +import type { BundleViolations, Dependency, CircularImportsViolations, NoticeViolations } from './model'; +import { Notice } from './notice'; import { shell } from './shell'; /** * Bundling properties. */ export interface BundleProps { + + /** + * Directory where the package to bundle is located at. + */ + readonly packageDir: string; + + /** + * Copyright string used when generating the NOTICE file. + */ + readonly copyright: string; + /** * External packages that cannot be bundled. * @@ -24,6 +36,19 @@ export interface BundleProps { * These will be copied over to the appropriate paths before packaging. */ readonly resources?: {[src: string]: string}; + + /** + * A list of licenses that are valid for bundling. + * If any dependency contains a license not in this list, bundling will fail. + * + * @default - Default list + */ + readonly licenses?: string[]; + + /** + * Packages matching this pattern will be excluded from attribution. + */ + readonly dontAttribute?: string; } /** @@ -34,72 +59,179 @@ export class Bundle { private readonly manifest: any; private readonly script: string; private readonly entrypoint: string; - private readonly outfile: string; - private readonly externals: string[] = []; - private readonly resources: {[src: string]: string} = {}; + private readonly externals: string[]; + private readonly resources: {[src: string]: string}; + private readonly validLicenses?: string[]; + private readonly packageDir: string; + private readonly copyright: string; + private readonly excludeFromAttribution?: string; - constructor(private readonly packageDir: string, props: BundleProps = {}) { - const packageJson = path.join(packageDir, 'package.json'); - if (!fs.existsSync(packageJson)) { - console.error(`✖ Unable to find ${packageJson}`); - process.exit(1); - } - this.manifest = fs.readJsonSync(packageJson); + private readonly dependencies: Dependency[]; + private readonly output: esbuild.OutputFile; + + private _notice?: Notice; + + constructor(props: BundleProps) { + this.packageDir = props.packageDir; + this.manifest = fs.readJsonSync(path.join(this.packageDir, 'package.json')); this.externals = props.externals ?? []; this.resources = props.resources ?? {}; - const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); - if (bin.length === 0) { - console.error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); - process.exit(1); - } - if (bin.length > 1) { - console.error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); - process.exit(1); + // resources must be defined relative to the package directory for them + // to work across environments. + for (const [src, dst] of Object.entries(this.resources)) { + if (path.isAbsolute(src)) { + throw new Error(`resource source must be a relative path (got ${src})`); + } + if (path.isAbsolute(dst)) { + throw new Error(`resource destination must be a relative path (got ${dst})`); + } } - this.script = bin[0][0]; - this.entrypoint = bin[0][1]; - this.outfile = path.join(path.dirname(this.entrypoint), 'node-cli-bundle.js'); + + this.validLicenses = props.licenses; + this.copyright = props.copyright; + this.excludeFromAttribution = props.dontAttribute; + + const bin = this.bin(); + + this.script = bin[0]; + this.entrypoint = bin[1]; + + // without the dependencies, this object is pretty much + // useless, so lets generate it of the bat. + const { dependencies, output } = this.esbuild(); + this.dependencies = dependencies; + this.output = output; } - public async validate() { + /** + * Validate the state of the project with respect to bundling. + * + * This method will validate both circular imports and notice file attributions. + * To validate only one or the other, use the `validateNotice` and `validateCircularImports`. + * + * It never throws an exception, instead it returns a report of violations. The Caller is responsible + * for inspecting those violations and act accordingaly. + * + * If no violations are found, the return value will be undefined. + */ + public validate(): BundleViolations | undefined { + const importsViolations = this.validateCircularImports(); + const noticeViolations = this.notice.validate(); - console.log('Creating bundle'); - const dependencies = await this.esbuild(); + if (!importsViolations && !noticeViolations) { + return undefined; + } - console.log('Validating circular imports'); - await this.validateCircularImports(dependencies); + return { notice: noticeViolations, imports: importsViolations }; + } - console.log('Validating attributions'); - await this.validateAttributions(dependencies); + /** + * Validate the package (and its dependencies) don't exhibit circular imports. + * + * It never throws an exception, instead it return a rerpot of violations. The Caller is responsible + * for inspecting those violations and act accordingaly. + * + * If no violations are found, the return value will be undefined + */ + public validateCircularImports(): CircularImportsViolations | undefined { + console.log('Validating circular imports'); + const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; + try { + // we don't use the programatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); + return undefined; + } catch (e: any) { + return { summary: e.stdout.toString() }; + } } - public async fix() { + public validateNotice(): NoticeViolations | undefined { + console.log('Validating notice'); + return this.notice.validate(); + } - console.log('Creating bundle'); - const dependencies = await this.esbuild(); + public createNotice() { + this.notice.create(this.copyright); + } - console.log('Generating attributions'); - const attributions = new Attributions(dependencies); - await attributions.create(); + public fix() { + console.log('Generating notice file'); + this.notice.create(this.copyright); } - public async pack(target?: string) { + public pack(target: string) { - console.log('Creating bundle'); - await this.esbuild(); + // double check, make sure we don't package something invalid. + const violations = this.validate(); + if (violations) { + throw new Error('Unable to pack due to validation errors. Please run validate() to inspect them and fix.'); + } - console.log('Copying resources'); - for (const [src, dst] of Object.entries(this.resources)) { - fs.copySync(src, dst); + console.log('Creating package'); + + if (!fs.existsSync(target)) { + console.log(`✖ Target doesnt exist: ${target}`); + process.exit(1); } - // console.log('Validating circular imports'); - // await this.validateCircularImports(dependencies); + if (!fs.lstatSync(target).isDirectory()) { + console.log(`✖ Target must be a directory: ${target}`); + process.exit(1); + } + + const workdir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); + try { + fs.copySync(this.packageDir, workdir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); + + const bundleManifest = { ...this.manifest }; + + // move all 'dependencies' to 'devDependencies' so that npm doesn't install anything when consuming + for (const [d, v] of Object.entries(this.manifest.dependencies)) { + bundleManifest.devDependencies[d] = v; + } + bundleManifest.dependencies = {}; + + // inject a new entrypoint referencing the bundle file + const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(this.output.path)}');`]; + const entrypointPath = path.join(path.dirname(this.entrypoint), 'entrypoint.bundle'); + bundleManifest.bin = { [this.script]: entrypointPath }; + + fs.writeFileSync(path.join(workdir, entrypointPath), entrypointContent.join('\n')); + fs.writeFileSync(path.join(workdir, 'package.json'), JSON.stringify(bundleManifest, null, 2)); + + console.log('Writing bundle'); + fs.writeFileSync(this.output.path.replace(this.packageDir, workdir), this.output.contents); + + console.log('Copying resources'); + for (const [src, dst] of Object.entries(this.resources)) { + fs.copySync(path.join(this.packageDir, src), path.join(workdir, dst), { recursive: true }); + } + + // create the tarball + const tarball = shell('npm pack', { quiet: true, cwd: workdir }).trim(); + fs.copySync(path.join(workdir, tarball), path.join(target, tarball)); + + } finally { + fs.removeSync(workdir); + } - console.log('Creating package'); - await this.createPackage(target ?? process.cwd()); + } + + private get notice(): Notice { + if (this._notice) { + return this._notice; + } + this._notice = new Notice({ + packageDir: this.packageDir, + dependencies: this.dependencies, + exclude: this.excludeFromAttribution, + validLicenses: this.validLicenses, + }); + return this._notice; } private findPackage(inputFile: string): string { @@ -124,9 +256,9 @@ export class Bundle { return { path: packageDir, name: manifest.name, version: manifest.version }; } - private async esbuild(): Promise { + private esbuild(): { dependencies: Dependency[]; output: esbuild.OutputFile } { - const bundle = await esbuild.build({ + const bundle = esbuild.buildSync({ entryPoints: [this.entrypoint], bundle: true, target: 'node12', @@ -134,11 +266,19 @@ export class Bundle { metafile: true, absWorkingDir: this.packageDir, external: this.externals, - write: true, - outfile: this.outfile, + write: false, + outfile: path.join(path.dirname(this.entrypoint), 'node-cli-bundle.js'), allowOverwrite: true, }); + if (!bundle.outputFiles || bundle.outputFiles.length === 0) { + throw new Error('Bundling did not produce any output files'); + } + + if (bundle.outputFiles.length > 1) { + throw new Error('Bundling produced multiple output files'); + } + if (bundle.warnings.length) { // esbuild warnings are usually important, lets try to be strict here. // the warnings themselves are printed on screen. @@ -146,68 +286,26 @@ export class Bundle { process.exit(1); } - const inputs = Object.keys(bundle.metafile!.outputs[this.outfile].inputs); - return Array.from(new Set(Array.from(inputs).map(i => this.findPackage(i)))).map(p => this.createDependency(p)); - } - - private async validateCircularImports(dependencies: Dependency[]) { - - for (const dep of dependencies) { - console.log(`Detecting circular imports (${dep.path})`); - // we don't use the programatic API since we want to eventually - // print circles, which the madge cli already does. - // also, for easier error reporting we run a separate command for each dependency. - // may need to reconsider this if it slows down the build too much. - await shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${dep.path}`); - } - - } + const outfile = bundle.outputFiles[0]; - private async validateAttributions(dependencies: Dependency[]) { - const attributions = new Attributions(dependencies); - await attributions.validate(); + const inputs = Object.keys(bundle.metafile!.outputs[path.relative(this.packageDir, outfile.path)].inputs); + const packages = new Set(Array.from(inputs).map(i => this.findPackage(i))); + const dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); + return { dependencies, output: outfile }; } - private async createPackage(target: string) { + private bin() { - if (!fs.existsSync(target)) { - console.log(`✖ Target doesnt exist: ${target}`); + const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); + if (bin.length === 0) { + console.error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); process.exit(1); } - - if (!fs.lstatSync(target).isDirectory()) { - console.log(`✖ Target must be a directory: ${target}`); + if (bin.length > 1) { + console.error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); process.exit(1); } - const workdir = await fs.mkdtemp(path.join(os.tmpdir(), path.sep)); - try { - fs.copySync(this.packageDir, workdir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); - - const bundleManifest = { ...this.manifest }; - - // move all 'dependencies' to 'devDependencies' so that npm doesn't install anything when consuming - for (const [d, v] of Object.entries(this.manifest.dependencies)) { - bundleManifest.devDependencies[d] = v; - } - bundleManifest.dependencies = {}; - - // inject a new entrypoint referencing the bundle file - const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(this.outfile)}');`]; - const entrypointPath = path.join(path.dirname(this.entrypoint), 'entrypoint.bundle'); - bundleManifest.bin = { [this.script]: entrypointPath }; - - fs.writeFileSync(path.join(workdir, entrypointPath), entrypointContent.join('\n')); - fs.writeFileSync(path.join(workdir, 'package.json'), JSON.stringify(bundleManifest, null, 2)); - - // create the tarball - const tarball = (await shell('npm pack')).trim(); - await fs.copy(tarball, target); - - } finally { - fs.removeSync(workdir); - } - + return bin[0]; } - } diff --git a/tools/@aws-cdk/node-bundle/src/index.ts b/tools/@aws-cdk/node-bundle/src/index.ts index eff15c484fd1e..c6847599eecf6 100644 --- a/tools/@aws-cdk/node-bundle/src/index.ts +++ b/tools/@aws-cdk/node-bundle/src/index.ts @@ -1,3 +1,2 @@ export * from './bundle'; -export * from './attributions'; export * from './notice'; \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/model.ts b/tools/@aws-cdk/node-bundle/src/model.ts new file mode 100644 index 0000000000000..c4cc572549905 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/model.ts @@ -0,0 +1,90 @@ +/** + * Dependency of a specific package on the local file system. + */ +export interface Dependency { + /** + * Path of the dependency on the local file system. + */ + readonly path: string; + /** + * Dependency name. + */ + readonly name: string; + /** + * Dependency version. + */ + readonly version: string; +} + +/** + * Attribution of a specific dependency. + */ +export interface Attribution { + /** + * Attributed package (name + version) + */ + readonly package: string; + /** + * URL to the package. + */ + readonly url: string; + /** + * Package license. + */ + readonly license?: string; + /** + * Package license content. + */ + readonly licenseText?: string; +} + +/** + * Violations pertaining the NOTICE file of the package. + */ +export interface NoticeViolations { + /** + * Attributions that have multiple licenses. + */ + readonly multiLicense?: Attribution[]; + /** + * Attributions that have no license. + */ + readonly noLicense?: Attribution[]; + /** + * Attributions that have an invalid license. + */ + readonly invalidLicense?: Attribution[]; + /** + * Attributions that are missing. + */ + readonly missing?: Attribution[]; + /** + * Attributions that unnecessary. + */ + readonly unnecessary?: Attribution[]; +} + +/** + * Violations pertaining the import statements of a package. + */ +export interface CircularImportsViolations { + /** + * Contains an aggregated summary of all circular imports. + * If no violations are found, this will be undefined. + */ + readonly summary?: string; +} + +/** + * Violations a bundle exhibits. + */ +export interface BundleViolations { + /** + * The NOTICE file violations. + */ + readonly notice?: NoticeViolations; + /** + * The imports violations. + */ + readonly imports?: CircularImportsViolations; +} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/notice.ts b/tools/@aws-cdk/node-bundle/src/notice.ts index 8ca3dc9e3fb89..e815b8693a8fa 100644 --- a/tools/@aws-cdk/node-bundle/src/notice.ts +++ b/tools/@aws-cdk/node-bundle/src/notice.ts @@ -1,19 +1,29 @@ import * as fs from 'fs'; -import { Dependency } from '.'; +import * as path from 'path'; +import type { Dependency, Attribution, NoticeViolations } from './model'; import { shell } from './shell'; +/** + * Valid licenses that are ok to redistribute. + */ +const DEFAULT_VALID_LICENSES = [ + 'Apache-2.0', + 'MIT', + 'BSD-3-Clause', + 'ISC', + 'BSD-2-Clause', + '0BSD', +]; + +/** + * NOTICE file path. + */ const FILE_PATH = 'NOTICE'; /** - * - * - * | attributions.start | - * - * - * - * | attributions.end | + * String signifying the attributions segement is to follow. */ -const NOTICE_FORMAT_REGEX = /([\S\s]*)\| attributions\.start \|([\S\s]*)\| attributions\.end \|/; +const ATTRIBUTIONS_START = 'This package includes the following third-party software:'; /** * --------------- @@ -29,35 +39,128 @@ const ATTRIBUTIONS_SEPARATOR = `\n${'-'.repeat(15)}\n`; */ const ATTRIBUTION_FORMAT_REGEX = /\*\* (\S*) - (\S*) \| (\S*)([\S\s]*)/; -export interface NoticeGenerateOptions { + +/** + * Properties for `Notice`. + */ +export interface NoticeProps { + /** + * The package root directory. + */ + readonly packageDir: string; + /** + * Package dependencies. + */ + readonly dependencies: Dependency[]; /** - * Prefix to prepend to the NOTICE file before the attributions segment starts. + * List of valid licenses. + * + * @default - predefined list. */ - readonly prefix?: string; + readonly validLicenses?: string[]; + /** + * Dependencies matching this pattern will be excluded from attribution. + * + * @default - no exclusions. + */ + readonly exclude?: string; } +/** + * `Notice` represents a NOTICE file containing various attributions. + */ export class Notice { - public static parse(): Notice { + private readonly packageDir: string; + private readonly dependencies: Dependency[]; + private readonly validLicenses: string[]; + + private readonly expectedAttributions: Map; + + constructor(props: NoticeProps) { + this.packageDir = props.packageDir; + this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); + this.validLicenses = (props.validLicenses ?? DEFAULT_VALID_LICENSES).map(l => l.toLowerCase()); + + // without the expected attributions, this object is pretty much + // useless, so lets generate those of the bat. + this.expectedAttributions = this.generateAttributions(); + } + + /** + * Validate the current notice file. + * + * This method will parse attributions of the current NOTICE file and compare + * them against the expected attributions based on the provided dependencies. + * + * It throws an exception in case the NOTICE file is malformed and cannot be parsed. + * Otherwise it returns a report of attribution violations. The Caller is responsible + * for inspecting those violations and act accordingaly. + * + * If no violations are found, the return value will be undefined. + */ + public validate(): NoticeViolations | undefined { + + const currentAttributions = this.parseAttributions(); + + const { invalidLicense, noLicense, multiLicense } = this.validateAttributionLicense(currentAttributions); + const missing = Array.from(this.expectedAttributions.values()).filter(a => !currentAttributions.has(a.package)); + const unnecessary = Array.from(currentAttributions.values()).filter(a => !this.expectedAttributions.has(a.package)); + + if (invalidLicense.length === 0 && noLicense.length === 0 && multiLicense.length === 0 && missing.length === 0 && unnecessary.length === 0) { + return undefined; + } + + // we convert empty arrays to undefined so its eaiser for callers to check for violations. + const emptyToUndefined = (arr: Attribution[]) => arr.length > 0 ? arr : undefined; + + return { + invalidLicense: emptyToUndefined(invalidLicense), + noLicense: emptyToUndefined(noLicense), + multiLicense: emptyToUndefined(multiLicense), + missing: emptyToUndefined(missing), + unnecessary: emptyToUndefined(unnecessary), + }; + } + + /** + * Render the notice file based on the expected attributions + * and write it to disk. The copyright is placed in the beginning of the file. + */ + public create(copyright: string) { + const notice = [copyright, '', '-'.repeat(40), '']; + + if (this.expectedAttributions.size > 0) { + notice.push(ATTRIBUTIONS_START); + notice.push(''); + } - if (!fs.existsSync(FILE_PATH)) { - return new Notice(new Map()); + for (const attr of this.expectedAttributions.values()) { + notice.push(`** ${attr.package} - ${attr.url} | ${attr.license}`); + notice.push(attr.licenseText ?? ''); + notice.push(ATTRIBUTIONS_SEPARATOR); } - const notice = fs.readFileSync(FILE_PATH, { encoding: 'utf-8' }).match(NOTICE_FORMAT_REGEX); - if (!notice) { - console.error(`✖ Malformed ${FILE_PATH} file (fix with 'node-bundle fix'):`); - process.exit(1); + fs.writeFileSync(path.join(this.packageDir, FILE_PATH), notice.join('\n')); + } + + private parseAttributions(): Map { + + const noticePath = path.join(this.packageDir, FILE_PATH); + + if (!fs.existsSync(noticePath)) { + return new Map(); } + const notice = fs.readFileSync(noticePath, { encoding: 'utf-8' }).split('\n'); + const attributionsSegment = notice.slice(notice.indexOf(ATTRIBUTIONS_START) + 1).join('\n').trim(); + const attributions: Map = new Map(); - const malformed = []; - for (const section of notice[2].split(ATTRIBUTIONS_SEPARATOR)) { + for (const section of attributionsSegment === '' ? [] : attributionsSegment.split(ATTRIBUTIONS_SEPARATOR)) { const matched = section.match(ATTRIBUTION_FORMAT_REGEX); if (!matched) { - malformed.push(section.trim().split('\n')[0]); - continue; + throw new Error(`Malformed ${FILE_PATH} file (delete it)`); } const pkg = matched[1]; attributions.set(pkg, { @@ -68,105 +171,94 @@ export class Notice { }); } - if (malformed.length > 0) { - console.error(`✖ Found ${malformed.length} malformed attributions (fix with 'node-bundle fix'):`); - console.error(malformed.map(l => ` - ${l}`)); - process.exit(1); - } - - return new Notice(attributions, notice[1]); + return attributions; } - public static async generate(dependencies: Dependency[], options: NoticeGenerateOptions = {}): Promise { + private generateAttributions(): Map { const attributions: Map = new Map(); - const multiLicense = []; - const missingLicense = []; + const pkg = (d: Dependency) => `${d.name}@${d.version}`; - for (const dep of dependencies) { - const pkg = `${dep.name}@${dep.version}`; - const output = await shell(`${require.resolve('license-checker/bin/license-checker')} --json --packages ${pkg}`, { cwd: dep.path, quiet: true }); - const info = JSON.parse(output)[pkg]; - const licenses: string[] = info.licenses ? info.licenses.split(',') : []; + const dependenciesRoot = lcp(this.dependencies.map(d => d.path)); + const packages = this.dependencies.map(d => pkg(d)).join(';'); + const output = shell(`${require.resolve('license-checker/bin/license-checker')} --json --packages "${packages}"`, { cwd: dependenciesRoot, quiet: true }); + const infos = JSON.parse(output); - if (licenses.length > 0) { - multiLicense.push(`${dep} (${licenses})`); - continue; - } + for (const dep of this.dependencies) { - if (licenses.length === 0) { - missingLicense.push(dep); - continue; + const key = pkg(dep); + const info = infos[key]; + + if (!info) { + // make sure all dependencies are accounted for. + throw new Error(`Unable to locate license information for ${key}`); } - attributions.set(pkg, { - package: pkg, + // for some reason, the license-checker package falls back to the README.md file of the package for license + // text. this seems strange, disabling that for now. + // see https://github.com/davglass/license-checker/blob/master/lib/license-files.js#L9 + // note that a non existing license file is ok as long as the license type could be extracted. + const licenseFile = info.licenseFile?.toLowerCase().endsWith('.md') ? undefined : info.licenseFile; + + attributions.set(key, { + package: key, url: `https://www.npmjs.com/package/${dep.name}/v/${dep.version}`, - license: licenses[0], - licenseText: (info.licenseFile && fs.existsSync(info.licenseFile)) ? fs.readFileSync(info.licenseFile, { encoding: 'utf-8' }) : undefined, + license: info.licenses, + licenseText: (licenseFile && fs.existsSync(licenseFile)) ? fs.readFileSync(licenseFile, { encoding: 'utf-8' }) : undefined, }); } - if (multiLicense.length > 0) { - console.error(`✖ Found ${multiLicense.length} dependencies with multiple licenses (these are unsupported for now, please remove their usage):`); - console.error(multiLicense.map(l => ` - ${l}`).join('\n')); - process.exit(1); + // make sure all attributions have a valid license + const { invalidLicense, noLicense, multiLicense } = this.validateAttributionLicense(attributions); + + const error = []; + + if (invalidLicense.length > 0) { + error.push('Following dependencies have invalid licenses: (either remove them or update the valid licenses list)'); + error.push(invalidLicense.map(a => ` - ${a.package}: ${a.license}`)); + error.push(''); } - if (multiLicense.length > 0) { - console.error(`✖ Found ${multiLicense.length} dependencies with no license information (these are unsupported for now, please remove their usage):`); - console.error(multiLicense.map(l => ` - ${l}`).join('\n')); - process.exit(1); + if (noLicense.length > 0) { + error.push('Following dependencies have no licenses: (remove them)'); + error.push(noLicense.map(a => ` - ${a.package}`)); + error.push(''); } - return new Notice(attributions, options.prefix); - } + if (multiLicense.length > 0) { + error.push('Following dependencies have multiple licenses: (remove them)'); + error.push(noLicense.map(a => ` - ${a.package}: ${a.license}`)); + error.push(''); + } - private constructor(public readonly attributions: Map, public readonly prefix?: string) { + if (error.length > 0) { + throw new Error(`Errors while generating attributions:\n\n${error.join('\n')}`); + } + return attributions; } - /** - * Query whether a specific attribution exists in this notice. - */ - public includesAttribution(attr: Attribution): boolean { - const candidate = this.attributions.get(attr.package); - - if (!candidate) { - return false; - } - if (candidate.url !== attr.url) { - return false; - } - if (candidate.license !== attr.license) { - return false; - } - if (candidate.licenseText !== attr.licenseText) { - return false; - } - return true; + private validateAttributionLicense(attributions: Map) { + const invalidLicense = Array.from(attributions.values()).filter(a => a.license && !this.validLicenses.includes(a.license.toLowerCase())); + const noLicense = Array.from(attributions.values()).filter(a => !a.license); + const multiLicense = Array.from(attributions.values()).filter(a => a.license && a.license.split(',').length > 1); + return { invalidLicense, noLicense, multiLicense }; } - /** - * Write the NOTICE file to disk. - */ - public flush() { +} - } +function lcp(strs: string[]) { + let prefix = ''; + if (strs === null || strs.length === 0) return prefix; + for (let i=0; i < strs[0].length; i++) { + const char = strs[0][i]; // loop through all characters of the very first string. - /** - * Find attributions in the current notice that are missing - * from the the input ones. - */ - public findMissing(other: Notice): Attribution[] { - return Array.from(this.attributions.values()).filter(a => !other.includesAttribution(a)); + for (let j = 1; j < strs.length; j++) { + // loop through all other strings in the array + if (strs[j][i] !== char) return prefix; + } + prefix = prefix + char; } -} - -export interface Attribution { - readonly package: string; - readonly url: string; - readonly license: string; - readonly licenseText?: string; -} + return prefix; +} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/shell.ts b/tools/@aws-cdk/node-bundle/src/shell.ts index 930159b7c143d..638d67570c7b7 100644 --- a/tools/@aws-cdk/node-bundle/src/shell.ts +++ b/tools/@aws-cdk/node-bundle/src/shell.ts @@ -1,43 +1,15 @@ import * as child_process from 'child_process'; -import * as shlex from 'shlex'; export interface ShellOptions { readonly cwd?: string; readonly quiet?: boolean; } -export async function shell(command: string, options: ShellOptions = {}): Promise { - const parts = shlex.split(command); - const child = child_process.spawn(parts[0], parts.slice(1), { - // Need this for Windows where we want .cmd and .bat to be found as well. - shell: true, +export function shell(command: string, options: ShellOptions = {}): string { + const stdio: child_process.StdioOptions = options.quiet ? ['ignore', 'pipe', 'pipe'] : ['ignore', process.stdout, process.stdout]; + const buffer = child_process.execSync(command, { cwd: options.cwd, - stdio: ['ignore', 'pipe', 'pipe'], - }); - - return new Promise((resolve, reject) => { - const stdout = new Array(); - - const quiet = options.quiet ?? false; - - child.stdout!.on('data', chunk => { - if (!quiet) { - process.stdout.write(chunk); - } - stdout.push(chunk); - }); - - child.stderr!.on('data', chunk => { - process.stderr.write(chunk.toString()); - }); - - child.once('error', reject); - child.once('exit', code => { - if (code === 0) { - resolve(Buffer.concat(stdout).toString('utf-8')); - } else { - reject(new Error(`Command '${command}' exited with error code ${code}`)); - } - }); + stdio: stdio, }); + return buffer ? buffer.toString() : ''; } diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts index 37898c1834744..2a2f8496a5906 100644 --- a/tools/@aws-cdk/node-bundle/test/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/bundle.test.ts @@ -1,6 +1,19 @@ +import { Bundle } from '../src'; + describe('validate', () => { test('throws when multiple bin scripts are defined', async () => { - }); + + const bundle = new Bundle({ + packageDir: '/Users/epolon/dev/src/github.com/aws/aws-cdk/packages/aws-cdk', + copyright: 'Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.', + externals: ['fsevents'], + dontAttribute: '(^@aws-cdk)', + resources: { + '../../node_modules/vm2/lib/contextify.js': 'bin', + }, + }); + bundle.pack(process.cwd()); + }, 5 * 60 * 1000); }); \ No newline at end of file From f3262bd0524a5bf1adebb1808ad0c3dbef9d93a6 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 9 Feb 2022 13:22:29 +0200 Subject: [PATCH 16/63] mid work --- packages/aws-cdk/NOTICE | 4302 ++++++++++++++++- packages/aws-cdk/package.json | 27 +- packages/aws-cdk/test/integ/helpers/cdk.ts | 29 +- .../aws-cdk/test/integ/helpers/monorepo.ts | 30 - .../@aws-cdk/cdk-build-tools/bin/cdk-build.ts | 6 - .../cdk-build-tools/bin/cdk-package.ts | 7 +- .../cdk-build-tools/lib/package-info.ts | 5 + tools/@aws-cdk/pkglint/lib/rules.ts | 133 + tools/@aws-cdk/pkglint/package.json | 1 + tools/@aws-cdk/pkglint/test/rules.test.ts | 14 +- 10 files changed, 4499 insertions(+), 55 deletions(-) delete mode 100644 packages/aws-cdk/test/integ/helpers/monorepo.ts diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE index 379365bb237e4..3fa8103b7e699 100644 --- a/packages/aws-cdk/NOTICE +++ b/packages/aws-cdk/NOTICE @@ -1,5 +1,4303 @@ AWS Cloud Development Kit (AWS CDK) Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. -| attributions.start | -| attributions.end | \ No newline at end of file + +---------------------------------------- + +This package includes the following third-party software: + +** source-map@0.6.1 - https://www.npmjs.com/package/source-map/v/0.6.1 | BSD-3-Clause + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------- + +** buffer-from@1.1.2 - https://www.npmjs.com/package/buffer-from/v/1.1.2 | MIT +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** source-map-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT + + +--------------- + +** jsonschema@1.4.0 - https://www.npmjs.com/package/jsonschema/v/1.4.0 | MIT +jsonschema is licensed under MIT license. + +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** semver@7.3.5 - https://www.npmjs.com/package/semver/v/7.3.5 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** yallist@4.0.0 - https://www.npmjs.com/package/yallist/v/4.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** lru-cache@6.0.0 - https://www.npmjs.com/package/lru-cache/v/6.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------- + +** color-convert@2.0.1 - https://www.npmjs.com/package/color-convert/v/2.0.1 | MIT +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +--------------- + +** ansi-styles@4.3.0 - https://www.npmjs.com/package/ansi-styles/v/4.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** has-flag@4.0.0 - https://www.npmjs.com/package/has-flag/v/4.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** supports-color@7.2.0 - https://www.npmjs.com/package/supports-color/v/7.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** chalk@4.1.2 - https://www.npmjs.com/package/chalk/v/4.1.2 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** @jsii/check-node@1.52.1 - https://www.npmjs.com/package/@jsii/check-node/v/1.52.1 | Apache-2.0 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--------------- + +** aws-sdk@2.1068.0 - https://www.npmjs.com/package/aws-sdk/v/2.1068.0 | Apache-2.0 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +--------------- + +** jmespath@0.16.0 - https://www.npmjs.com/package/jmespath/v/0.16.0 | Apache-2.0 +Copyright 2014 James Saryerwinnie + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +--------------- + +** uuid@3.3.2 - https://www.npmjs.com/package/uuid/v/3.3.2 | MIT + + +--------------- + +** xml2js@0.4.19 - https://www.npmjs.com/package/xml2js/v/0.4.19 | MIT +Copyright 2010, 2011, 2012, 2013. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +--------------- + +** xmlbuilder@9.0.7 - https://www.npmjs.com/package/xmlbuilder/v/9.0.7 | MIT +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** sax@1.2.4 - https://www.npmjs.com/package/sax/v/1.2.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** universalify@2.0.0 - https://www.npmjs.com/package/universalify/v/2.0.0 | MIT +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** graceful-fs@4.2.9 - https://www.npmjs.com/package/graceful-fs/v/4.2.9 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC +The ISC License +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** fast-deep-equal@3.1.3 - https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 | MIT +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** ansi-regex@5.0.1 - https://www.npmjs.com/package/ansi-regex/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** strip-ansi@6.0.1 - https://www.npmjs.com/package/strip-ansi/v/6.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** is-fullwidth-code-point@3.0.0 - https://www.npmjs.com/package/is-fullwidth-code-point/v/3.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** emoji-regex@8.0.0 - https://www.npmjs.com/package/emoji-regex/v/8.0.0 | MIT +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** string-width@4.2.3 - https://www.npmjs.com/package/string-width/v/4.2.3 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** astral-regex@2.0.0 - https://www.npmjs.com/package/astral-regex/v/2.0.0 | MIT +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** slice-ansi@4.0.0 - https://www.npmjs.com/package/slice-ansi/v/4.0.0 | MIT +MIT License + +Copyright (c) DC +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** table@6.8.0 - https://www.npmjs.com/package/table/v/6.8.0 | BSD-3-Clause +Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------- + +** ajv@8.10.0 - https://www.npmjs.com/package/ajv/v/8.10.0 | MIT +The MIT License (MIT) + +Copyright (c) 2015-2021 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +--------------- + +** lodash.truncate@4.4.2 - https://www.npmjs.com/package/lodash.truncate/v/4.4.2 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +--------------- + +** diff@5.0.0 - https://www.npmjs.com/package/diff/v/5.0.0 | BSD-3-Clause +Software License Agreement (BSD License) + +Copyright (c) 2009-2015, Kevin Decker + +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Kevin Decker nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------- + +** mute-stream@0.0.8 - https://www.npmjs.com/package/mute-stream/v/0.0.8 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** read@1.0.7 - https://www.npmjs.com/package/read/v/1.0.7 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** promptly@3.2.0 - https://www.npmjs.com/package/promptly/v/3.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** yallist@3.1.1 - https://www.npmjs.com/package/yallist/v/3.1.1 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** lru-cache@5.1.1 - https://www.npmjs.com/package/lru-cache/v/5.1.1 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** ms@2.1.2 - https://www.npmjs.com/package/ms/v/2.1.2 | MIT + + +--------------- + +** debug@4.3.3 - https://www.npmjs.com/package/debug/v/4.3.3 | MIT +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +--------------- + +** agent-base@6.0.2 - https://www.npmjs.com/package/agent-base/v/6.0.2 | MIT + + +--------------- + +** proxy-from-env@1.1.0 - https://www.npmjs.com/package/proxy-from-env/v/1.1.0 | MIT +The MIT License + +Copyright (C) 2016-2018 Rob Wu + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** data-uri-to-buffer@3.0.1 - https://www.npmjs.com/package/data-uri-to-buffer/v/3.0.1 | MIT + + +--------------- + +** get-uri@3.0.2 - https://www.npmjs.com/package/get-uri/v/3.0.2 | MIT + + +--------------- + +** universalify@0.1.2 - https://www.npmjs.com/package/universalify/v/0.1.2 | MIT +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** fs-extra@8.1.0 - https://www.npmjs.com/package/fs-extra/v/8.1.0 | MIT +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** jsonfile@4.0.0 - https://www.npmjs.com/package/jsonfile/v/4.0.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** file-uri-to-path@2.0.0 - https://www.npmjs.com/package/file-uri-to-path/v/2.0.0 | MIT +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** @tootallnate/once@1.1.2 - https://www.npmjs.com/package/@tootallnate/once/v/1.1.2 | MIT + + +--------------- + +** isarray@0.0.1 - https://www.npmjs.com/package/isarray/v/0.0.1 | MIT + + +--------------- + +** core-util-is@1.0.3 - https://www.npmjs.com/package/core-util-is/v/1.0.3 | MIT +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +--------------- + +** inherits@2.0.4 - https://www.npmjs.com/package/inherits/v/2.0.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + + +--------------- + +** readable-stream@1.1.14 - https://www.npmjs.com/package/readable-stream/v/1.1.14 | MIT +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +--------------- + +** string_decoder@0.10.31 - https://www.npmjs.com/package/string_decoder/v/0.10.31 | MIT +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** xregexp@2.0.0 - https://www.npmjs.com/package/xregexp/v/2.0.0 | MIT + + +--------------- + +** ftp@0.3.10 - https://www.npmjs.com/package/ftp/v/0.3.10 | MIT +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +--------------- + +** bytes@3.1.1 - https://www.npmjs.com/package/bytes/v/3.1.1 | MIT +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015 Jed Watson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** depd@1.1.2 - https://www.npmjs.com/package/depd/v/1.1.2 | MIT +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** setprototypeof@1.2.0 - https://www.npmjs.com/package/setprototypeof/v/1.2.0 | ISC +Copyright (c) 2015, Wes Todd + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** statuses@1.5.0 - https://www.npmjs.com/package/statuses/v/1.5.0 | MIT + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** toidentifier@1.0.1 - https://www.npmjs.com/package/toidentifier/v/1.0.1 | MIT +MIT License + +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** http-errors@1.8.1 - https://www.npmjs.com/package/http-errors/v/1.8.1 | MIT + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** safer-buffer@2.1.2 - https://www.npmjs.com/package/safer-buffer/v/2.1.2 | MIT +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** iconv-lite@0.4.24 - https://www.npmjs.com/package/iconv-lite/v/0.4.24 | MIT +Copyright (c) 2011 Alexander Shtuchkin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +--------------- + +** unpipe@1.0.0 - https://www.npmjs.com/package/unpipe/v/1.0.0 | MIT +(The MIT License) + +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** raw-body@2.4.2 - https://www.npmjs.com/package/raw-body/v/2.4.2 | MIT +The MIT License (MIT) + +Copyright (c) 2013-2014 Jonathan Ong +Copyright (c) 2014-2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** http-proxy-agent@4.0.1 - https://www.npmjs.com/package/http-proxy-agent/v/4.0.1 | MIT + + +--------------- + +** https-proxy-agent@5.0.0 - https://www.npmjs.com/package/https-proxy-agent/v/5.0.0 | MIT + + +--------------- + +** ip@1.1.5 - https://www.npmjs.com/package/ip/v/1.1.5 | MIT + + +--------------- + +** smart-buffer@4.2.0 - https://www.npmjs.com/package/smart-buffer/v/4.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2013-2017 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** socks@2.6.1 - https://www.npmjs.com/package/socks/v/2.6.1 | MIT +The MIT License (MIT) + +Copyright (c) 2013 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** socks-proxy-agent@5.0.1 - https://www.npmjs.com/package/socks-proxy-agent/v/5.0.1 | MIT + + +--------------- + +** estraverse@4.3.0 - https://www.npmjs.com/package/estraverse/v/4.3.0 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------- + +** esutils@2.0.3 - https://www.npmjs.com/package/esutils/v/2.0.3 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------- + +** escodegen@1.14.3 - https://www.npmjs.com/package/escodegen/v/1.14.3 | BSD-2-Clause +Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------- + +** esprima@4.0.1 - https://www.npmjs.com/package/esprima/v/4.0.1 | BSD-2-Clause +Copyright JS Foundation and other contributors, https://js.foundation/ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------- + +** tslib@2.3.1 - https://www.npmjs.com/package/tslib/v/2.3.1 | 0BSD +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +--------------- + +** ast-types@0.13.4 - https://www.npmjs.com/package/ast-types/v/0.13.4 | MIT +Copyright (c) 2013 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** vm2@3.9.5 - https://www.npmjs.com/package/vm2/v/3.9.5 | MIT + + +--------------- + +** degenerator@3.0.1 - https://www.npmjs.com/package/degenerator/v/3.0.1 | MIT + + +--------------- + +** pac-resolver@5.0.0 - https://www.npmjs.com/package/pac-resolver/v/5.0.0 | MIT + + +--------------- + +** netmask@2.0.2 - https://www.npmjs.com/package/netmask/v/2.0.2 | MIT + + +--------------- + +** pac-proxy-agent@5.0.0 - https://www.npmjs.com/package/pac-proxy-agent/v/5.0.0 | MIT + + +--------------- + +** proxy-agent@5.0.0 - https://www.npmjs.com/package/proxy-agent/v/5.0.0 | MIT + + +--------------- + +** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +--------------- + +** uuid@8.3.2 - https://www.npmjs.com/package/uuid/v/8.3.2 | MIT + + +--------------- + +** cdk-assets@0.0.0 - https://www.npmjs.com/package/cdk-assets/v/0.0.0 | Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +--------------- + +** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** fs.realpath@1.0.0 - https://www.npmjs.com/package/fs.realpath/v/1.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + +--------------- + +** concat-map@0.0.1 - https://www.npmjs.com/package/concat-map/v/0.0.1 | MIT +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** balanced-match@1.0.2 - https://www.npmjs.com/package/balanced-match/v/1.0.2 | MIT + + +--------------- + +** brace-expansion@1.1.11 - https://www.npmjs.com/package/brace-expansion/v/1.1.11 | MIT +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** minimatch@3.0.4 - https://www.npmjs.com/package/minimatch/v/3.0.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** path-is-absolute@1.0.1 - https://www.npmjs.com/package/path-is-absolute/v/1.0.1 | MIT +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** glob@7.2.0 - https://www.npmjs.com/package/glob/v/7.2.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ + + +--------------- + +** wrappy@1.0.2 - https://www.npmjs.com/package/wrappy/v/1.0.2 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** once@1.4.0 - https://www.npmjs.com/package/once/v/1.4.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** inflight@1.0.6 - https://www.npmjs.com/package/inflight/v/1.0.6 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** readdir-glob@1.1.1 - https://www.npmjs.com/package/readdir-glob/v/1.1.1 | Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Yann Armelin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--------------- + +** async@3.2.3 - https://www.npmjs.com/package/async/v/3.2.3 | MIT +Copyright (c) 2010-2018 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** process-nextick-args@2.0.1 - https://www.npmjs.com/package/process-nextick-args/v/2.0.1 | MIT + + +--------------- + +** isarray@1.0.0 - https://www.npmjs.com/package/isarray/v/1.0.0 | MIT + + +--------------- + +** readable-stream@2.3.7 - https://www.npmjs.com/package/readable-stream/v/2.3.7 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +--------------- + +** safe-buffer@5.1.2 - https://www.npmjs.com/package/safe-buffer/v/5.1.2 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** util-deprecate@1.0.2 - https://www.npmjs.com/package/util-deprecate/v/1.0.2 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +--------------- + +** lazystream@1.0.1 - https://www.npmjs.com/package/lazystream/v/1.0.1 | MIT +Copyright (c) 2013 J. Pommerening, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + + +--------------- + +** normalize-path@3.0.0 - https://www.npmjs.com/package/normalize-path/v/3.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** lodash.defaults@4.2.0 - https://www.npmjs.com/package/lodash.defaults/v/4.2.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +--------------- + +** lodash.flatten@4.4.0 - https://www.npmjs.com/package/lodash.flatten/v/4.4.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +--------------- + +** lodash.difference@4.5.0 - https://www.npmjs.com/package/lodash.difference/v/4.5.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +--------------- + +** lodash.union@4.6.0 - https://www.npmjs.com/package/lodash.union/v/4.6.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +--------------- + +** lodash.isplainobject@4.0.6 - https://www.npmjs.com/package/lodash.isplainobject/v/4.0.6 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +--------------- + +** archiver-utils@2.1.0 - https://www.npmjs.com/package/archiver-utils/v/2.1.0 | MIT +Copyright (c) 2015 Chris Talkington. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--------------- + +** archiver@5.3.0 - https://www.npmjs.com/package/archiver/v/5.3.0 | MIT +Copyright (c) 2012-2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--------------- + +** readable-stream@3.6.0 - https://www.npmjs.com/package/readable-stream/v/3.6.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +--------------- + +** safe-buffer@5.2.1 - https://www.npmjs.com/package/safe-buffer/v/5.2.1 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** string_decoder@1.3.0 - https://www.npmjs.com/package/string_decoder/v/1.3.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +--------------- + +** compress-commons@4.1.1 - https://www.npmjs.com/package/compress-commons/v/4.1.1 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--------------- + +** buffer-crc32@0.2.13 - https://www.npmjs.com/package/buffer-crc32/v/0.2.13 | MIT +The MIT License + +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** crc-32@1.2.1 - https://www.npmjs.com/package/crc-32/v/1.2.1 | Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (C) 2014-present SheetJS LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +--------------- + +** crc32-stream@4.0.2 - https://www.npmjs.com/package/crc32-stream/v/4.0.2 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--------------- + +** zip-stream@4.1.0 - https://www.npmjs.com/package/zip-stream/v/4.1.0 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--------------- + +** bl@4.1.0 - https://www.npmjs.com/package/bl/v/4.1.0 | MIT + + +--------------- + +** tar-stream@2.2.0 - https://www.npmjs.com/package/tar-stream/v/2.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--------------- + +** fs-constants@1.0.0 - https://www.npmjs.com/package/fs-constants/v/1.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2018 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** end-of-stream@1.4.4 - https://www.npmjs.com/package/end-of-stream/v/1.4.4 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--------------- + +** wrap-ansi@7.0.0 - https://www.npmjs.com/package/wrap-ansi/v/7.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** picomatch@2.3.1 - https://www.npmjs.com/package/picomatch/v/2.3.1 | MIT +The MIT License (MIT) + +Copyright (c) 2017-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** readdirp@3.6.0 - https://www.npmjs.com/package/readdirp/v/3.6.0 | MIT +MIT License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------- + +** anymatch@3.1.2 - https://www.npmjs.com/package/anymatch/v/3.1.2 | ISC +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** is-extglob@2.1.1 - https://www.npmjs.com/package/is-extglob/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** is-glob@4.0.3 - https://www.npmjs.com/package/is-glob/v/4.0.3 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** glob-parent@5.1.2 - https://www.npmjs.com/package/glob-parent/v/5.1.2 | ISC +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** braces@3.0.2 - https://www.npmjs.com/package/braces/v/3.0.2 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** is-number@7.0.0 - https://www.npmjs.com/package/is-number/v/7.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** to-regex-range@5.0.1 - https://www.npmjs.com/package/to-regex-range/v/5.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** fill-range@7.0.1 - https://www.npmjs.com/package/fill-range/v/7.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** binary-extensions@2.2.0 - https://www.npmjs.com/package/binary-extensions/v/2.2.0 | MIT +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** is-binary-path@2.1.0 - https://www.npmjs.com/package/is-binary-path/v/2.1.0 | MIT +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** chokidar@3.5.3 - https://www.npmjs.com/package/chokidar/v/3.5.3 | MIT +The MIT License (MIT) + +Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** camelcase@6.3.0 - https://www.npmjs.com/package/camelcase/v/6.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** decamelize@5.0.1 - https://www.npmjs.com/package/decamelize/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** y18n@5.0.8 - https://www.npmjs.com/package/y18n/v/5.0.8 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +--------------- + +** yargs-parser@20.2.9 - https://www.npmjs.com/package/yargs-parser/v/20.2.9 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** cliui@7.0.4 - https://www.npmjs.com/package/cliui/v/7.0.4 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** escalade@3.1.1 - https://www.npmjs.com/package/escalade/v/3.1.1 | MIT +MIT License + +Copyright (c) Luke Edwards (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** get-caller-file@2.0.5 - https://www.npmjs.com/package/get-caller-file/v/2.0.5 | ISC + + +--------------- + +** require-directory@2.1.1 - https://www.npmjs.com/package/require-directory/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** yargs@16.2.0 - https://www.npmjs.com/package/yargs/v/16.2.0 | MIT +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e678ed1cff05c..82e9f0fcf66de 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -7,16 +7,10 @@ "bin": { "cdk": "bin/cdk.js" }, - "cdk-build": { - "bundle": true, - "bundleProps": { - "externals": ["fsevents"] - } - }, "scripts": { "build": "cdk-build", "watch": "cdk-watch", - "lint": "cdk-lint && madge --circular --extensions js lib", + "lint": "cdk-lint", "pkglint": "pkglint -f", "test": "cdk-test", "integ": "jest --testMatch '**/?(*.)+(integ-test).js'", @@ -36,7 +30,24 @@ "build+test+extract": "yarn build+test" }, "cdk-package": { - "shrinkWrap": true + "bundle": { + "externals": [ + "fsevents" + ], + "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", + "licenses": [ + "Apache-2.0", + "MIT", + "BSD-3-Clause", + "ISC", + "BSD-2-Clause", + "0BSD" + ], + "dontAttribute": "(^@aws-cdk)", + "resources": { + "../../node_modules/vm2/lib/contextify.js": "bin" + } + } }, "author": { "name": "Amazon Web Services", diff --git a/packages/aws-cdk/test/integ/helpers/cdk.ts b/packages/aws-cdk/test/integ/helpers/cdk.ts index cc04fba7394f4..e00767edebb9f 100644 --- a/packages/aws-cdk/test/integ/helpers/cdk.ts +++ b/packages/aws-cdk/test/integ/helpers/cdk.ts @@ -4,7 +4,6 @@ import * as os from 'os'; import * as path from 'path'; import { outputFromStack, AwsClients } from './aws'; import { memoize0 } from './memoize'; -import { findYarnPackages } from './monorepo'; import { ResourcePool } from './resource-pool'; import { TestContext } from './test-helpers'; @@ -33,6 +32,34 @@ process.stdout.write(`Using framework version: ${FRAMEWORK_VERSION} (major versi const REGION_POOL = new ResourcePool(REGIONS); +/** + * Cache monorepo discovery results, we only want to do this once per run + */ +const YARN_MONOREPO_CACHE: Record = {}; + +/** + * Return a { name -> directory } packages found in a Yarn monorepo + * + * Cached in YARN_MONOREPO_CACHE. + */ +export async function findYarnPackages(root: string): Promise> { + if (!(root in YARN_MONOREPO_CACHE)) { + const output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', '--silent', 'info'], { + captureStderr: false, + cwd: root, + })); + + const ret: Record = {}; + for (const [k, v] of Object.entries(output)) { + ret[k] = path.join(root, v.location); + } + YARN_MONOREPO_CACHE[root] = ret; + } + return YARN_MONOREPO_CACHE[root]; +} + +type YarnWorkspacesOutput = Record; + export type AwsContext = { readonly aws: AwsClients }; /** diff --git a/packages/aws-cdk/test/integ/helpers/monorepo.ts b/packages/aws-cdk/test/integ/helpers/monorepo.ts deleted file mode 100644 index 23c609e1ba7c1..0000000000000 --- a/packages/aws-cdk/test/integ/helpers/monorepo.ts +++ /dev/null @@ -1,30 +0,0 @@ -import * as path from 'path'; -import { shell } from './cdk'; - -/** - * Cache monorepo discovery results, we only want to do this once per run - */ -const YARN_MONOREPO_CACHE: Record = {}; - -/** - * Return a { name -> directory } packages found in a Yarn monorepo - * - * Cached in YARN_MONOREPO_CACHE. - */ -export async function findYarnPackages(root: string): Promise> { - if (!(root in YARN_MONOREPO_CACHE)) { - const output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', '--silent', 'info'], { - captureStderr: false, - cwd: root, - })); - - const ret: Record = {}; - for (const [k, v] of Object.entries(output)) { - ret[k] = path.join(root, v.location); - } - YARN_MONOREPO_CACHE[root] = ret; - } - return YARN_MONOREPO_CACHE[root]; -} - -type YarnWorkspacesOutput = Record; \ No newline at end of file diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts index ae3c4e709b8ca..e44d7f49de276 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-build.ts @@ -1,4 +1,3 @@ -import { Bundle } from '@aws-cdk/node-bundle'; import * as yargs from 'yargs'; import { compileCurrentPackage } from '../lib/compile'; import { lintCurrentPackage } from '../lib/lint'; @@ -54,11 +53,6 @@ async function main() { await compileCurrentPackage(options, timers, overrides); await lintCurrentPackage(options, { ...overrides, fix: args.fix }); - if (options.bundle) { - const bundle = new Bundle(process.cwd(), options.bundleProps); - await bundle.validate({ failOnWarnings: true }); - } - if (options.post) { const commands = options.post.join(' && '); await shell([commands], { timers, env }); diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts index 7f2c63898ce1e..489bb39cf54ea 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts @@ -1,7 +1,8 @@ import * as path from 'path'; +import { Bundle } from '@aws-cdk/node-bundle'; +import * as yarnCling from '@aws-cdk/yarn-cling'; import * as fs from 'fs-extra'; import * as yargs from 'yargs'; -import * as yarnCling from '@aws-cdk/yarn-cling'; import { shell } from '../lib/os'; import { cdkPackageOptions, isJsii, isPrivate } from '../lib/package-info'; import { Timers } from '../lib/timer'; @@ -48,6 +49,10 @@ async function main() { ...args.targets ? flatMap(args.targets, (target: string) => ['-t', target]) : [], '-o', outdir]; await shell(command, { timers }); + } else if (options.bundle) { + // bundled packages have their own bundler. + const bundle = new Bundle({ packageDir: process.cwd(), ...options.bundle }); + bundle.pack(path.join(outdir, 'js')); } else { // just "npm pack" and deploy to "outdir" const tarball = (await shell(['npm', 'pack'], { timers })).trim(); diff --git a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts index d070ba4499ce9..5fda68125ba30 100644 --- a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts +++ b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -199,6 +199,11 @@ export interface CDKPackageOptions { * An optional command (formatted as a list of strings) to run after packaging */ post?: string[]; + + /** + * Should this package be bundled. (and if so, how) + */ + bundle?: Omit; } /** diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 0ff12f6485520..1adf96822f587 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -14,6 +14,7 @@ import { findInnerPackages, monoRepoRoot, } from './util'; +import { Bundle } from '@aws-cdk/node-bundle'; const PKGLINT_VERSION = require('../package.json').version; // eslint-disable-line @typescript-eslint/no-require-imports const AWS_SERVICE_NAMES = require('./aws-service-official-names.json'); // eslint-disable-line @typescript-eslint/no-require-imports @@ -166,6 +167,131 @@ export class LicenseFile extends ValidationRule { } } +export class BundledCLI extends ValidationRule { + public readonly name = 'bundle'; + + private static readonly VALID_LICENSES = [ + 'Apache-2.0', + 'MIT', + 'BSD-3-Clause', + 'ISC', + 'BSD-2-Clause', + '0BSD', + ]; + + private static readonly DONT_ATTRIBUTE = '(^@aws-cdk)'; + + + public validate(pkg: PackageJson): void { + const bundleProps = pkg.json['cdk-package']?.bundle; + + if (!bundleProps) { + return; + } + + const validConfig = this.validateConfig(pkg, bundleProps); + if (validConfig) { + this.validateBundle(pkg, bundleProps); + } + } + + /** + * Validate package.json contains the necessary information for properly bundling the package. + * This will ensure that configuration can be safely used during packaging. + */ + private validateConfig(pkg: PackageJson, bundleProps: any): boolean { + let valid = true; + + if (bundleProps.copyright !== NOTICE) { + pkg.report({ + message: `'cdk-package.bundle.copyright' must be set to "${NOTICE}"`, + ruleName: `${this.name}/configuration`, + fix: () => pkg.json['cdk-package'].bundle.copyright = NOTICE, + }) + valid = false; + } + + if (bundleProps.licenses.join(',') !== BundledCLI.VALID_LICENSES.join(',')) { + pkg.report({ + message: `'cdk-package.bundle.licenses' must be set to "${BundledCLI.VALID_LICENSES}"`, + ruleName: `${this.name}/configuration`, + fix: () => pkg.json['cdk-package'].bundle.licenses = BundledCLI.VALID_LICENSES, + }) + valid = false; + } + + if (bundleProps.dontAttribute !== BundledCLI.DONT_ATTRIBUTE) { + pkg.report({ + message: `'cdk-package.bundle.dontAttribute' must be set to "${BundledCLI.DONT_ATTRIBUTE}"`, + ruleName: `${this.name}/configuration`, + fix: () => pkg.json['cdk-package'].bundle.dontAttribute = BundledCLI.DONT_ATTRIBUTE, + }) + valid = false; + } + + return valid; + + } + + /** + * Validate the package is ready for bundling. We do this here instead of cdk-build/cdk-lint + * to leverage the automatic fixing capabilities this mechanism has. + */ + private validateBundle(pkg: PackageJson, bundleProps: any) { + + // now lets validate the bundle itself + const bundle = new Bundle({ packageDir: pkg.packageRoot, ...bundleProps }); + const violations = bundle.validate(); + + if (violations?.imports?.summary) { + pkg.report({ + message: `Circular imports detected:\n\n${violations.imports.summary}`, + ruleName: `${this.name}/circular-imports` + }) + } + + for (const attr of violations?.notice?.invalidLicense ?? []) { + pkg.report({ + message: `Dependency ${attr.package} has an invalid license: ${attr.license}`, + ruleName: `${this.name}/invalid-dependency-license` + }) + } + + for (const attr of violations?.notice?.noLicense ?? []) { + pkg.report({ + message: `Dependency ${attr.package} has no license`, + ruleName: `${this.name}/missing-dependency-license` + }) + } + + for (const attr of violations?.notice?.multiLicense ?? []) { + pkg.report({ + message: `Dependency ${attr.package} has multiple licenses: ${attr.license}`, + ruleName: `${this.name}/multiple-dependency-license` + }) + } + + const fix = () => bundle.fix(); + + for (const attr of violations?.notice?.missing ?? []) { + pkg.report({ + message: `Dependency ${attr.package} is missing an attribution`, + ruleName: `${this.name}/missing-attribution`, + fix, + }) + } + + for (const attr of violations?.notice?.unnecessary ?? []) { + pkg.report({ + message: `Dependency ${attr.package} attribution is unnecessary`, + ruleName: `${this.name}/unnecessary-attribution`, + fix, + }) + } + + } +} + /** * There must be a NOTICE file. */ @@ -184,6 +310,13 @@ export class ThirdPartyAttributions extends ValidationRule { public readonly name = 'license/3p-attributions'; public validate(pkg: PackageJson): void { + + if (pkg.json['cdk-package']?.bundle) { + // otherwise its attributions will be reported as unnecessary + // since bundled packages don't defined "bundledDependencies" + return; + } + const alwaysCheck = ['monocdk', 'aws-cdk-lib']; if (pkg.json.private && !alwaysCheck.includes(pkg.json.name)) { return; diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index 118f53368b372..8df430cb8edfa 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -60,6 +60,7 @@ ] }, "dependencies": { + "@aws-cdk/node-bundle": "0.0.0", "case": "^1.6.3", "chalk": "^4", "fs-extra": "^9.1.0", diff --git a/tools/@aws-cdk/pkglint/test/rules.test.ts b/tools/@aws-cdk/pkglint/test/rules.test.ts index 3169a747a08f3..c91a20afd1cec 100644 --- a/tools/@aws-cdk/pkglint/test/rules.test.ts +++ b/tools/@aws-cdk/pkglint/test/rules.test.ts @@ -247,7 +247,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -278,7 +278,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -309,7 +309,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -335,7 +335,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -360,7 +360,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -382,7 +382,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -404,7 +404,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.ThirdPartyAttributions(); + const rule = new rules.NoticeFile(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); From 123fb5d68bc95ae3f2a100d3d7d484054166d4bd Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 10 Feb 2022 00:12:55 +0200 Subject: [PATCH 17/63] mid work --- tools/@aws-cdk/node-bundle/src/bundle.ts | 195 +++++++++++------- tools/@aws-cdk/node-bundle/src/model.ts | 18 ++ .../@aws-cdk/node-bundle/test/bundle.test.ts | 5 +- 3 files changed, 145 insertions(+), 73 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index e01edc5e9cbee..ece21e39b064b 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -2,7 +2,7 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import type { BundleViolations, Dependency, CircularImportsViolations, NoticeViolations } from './model'; +import type { BundleViolations, Dependency, CircularImportsViolations, NoticeViolations, ResourceViolations } from './model'; import { Notice } from './notice'; import { shell } from './shell'; @@ -49,6 +49,25 @@ export interface BundleProps { * Packages matching this pattern will be excluded from attribution. */ readonly dontAttribute?: string; + + /** + * Basic sanity check to run against the created bundle. + * + * @default - no check. + */ + readonly test?: string; +} + +/** + * Optiosn for `Bundle.pack`. + */ +export interface BundlePackOptions { + /** + * The target directory to create the pacakge in. + * + * @default - the package directory. + */ + readonly target?: string; } /** @@ -66,9 +85,11 @@ export class Bundle { private readonly packageDir: string; private readonly copyright: string; private readonly excludeFromAttribution?: string; + private readonly test?: string; private readonly dependencies: Dependency[]; private readonly output: esbuild.OutputFile; + private readonly sourcemap: esbuild.OutputFile; private _notice?: Notice; @@ -77,18 +98,7 @@ export class Bundle { this.manifest = fs.readJsonSync(path.join(this.packageDir, 'package.json')); this.externals = props.externals ?? []; this.resources = props.resources ?? {}; - - // resources must be defined relative to the package directory for them - // to work across environments. - for (const [src, dst] of Object.entries(this.resources)) { - if (path.isAbsolute(src)) { - throw new Error(`resource source must be a relative path (got ${src})`); - } - if (path.isAbsolute(dst)) { - throw new Error(`resource destination must be a relative path (got ${dst})`); - } - } - + this.test = props.test; this.validLicenses = props.licenses; this.copyright = props.copyright; this.excludeFromAttribution = props.dontAttribute; @@ -100,9 +110,10 @@ export class Bundle { // without the dependencies, this object is pretty much // useless, so lets generate it of the bat. - const { dependencies, output } = this.esbuild(); + const { dependencies, output, sourcemap } = this.esbuild(); this.dependencies = dependencies; this.output = output; + this.sourcemap = sourcemap; } /** @@ -118,52 +129,19 @@ export class Bundle { */ public validate(): BundleViolations | undefined { const importsViolations = this.validateCircularImports(); - const noticeViolations = this.notice.validate(); + const noticeViolations = this.validateNotice(); + const resourceViolations = this.validateResources(); - if (!importsViolations && !noticeViolations) { + if (!importsViolations && !noticeViolations && !resourceViolations) { return undefined; } - return { notice: noticeViolations, imports: importsViolations }; + return { notice: noticeViolations, imports: importsViolations, resource: resourceViolations }; } - /** - * Validate the package (and its dependencies) don't exhibit circular imports. - * - * It never throws an exception, instead it return a rerpot of violations. The Caller is responsible - * for inspecting those violations and act accordingaly. - * - * If no violations are found, the return value will be undefined - */ - public validateCircularImports(): CircularImportsViolations | undefined { - console.log('Validating circular imports'); - const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; - try { - // we don't use the programatic API since it only offers an async API. - // prefer to stay sync for now since its easier to integrate with other tooling. - // will offer an async API further down the road. - shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); - return undefined; - } catch (e: any) { - return { summary: e.stdout.toString() }; - } - } - - public validateNotice(): NoticeViolations | undefined { - console.log('Validating notice'); - return this.notice.validate(); - } - - public createNotice() { - this.notice.create(this.copyright); - } + public pack(options: BundlePackOptions = {}) { - public fix() { - console.log('Generating notice file'); - this.notice.create(this.copyright); - } - - public pack(target: string) { + const target = options.target ?? this.packageDir; // double check, make sure we don't package something invalid. const violations = this.validate(); @@ -171,8 +149,6 @@ export class Bundle { throw new Error('Unable to pack due to validation errors. Please run validate() to inspect them and fix.'); } - console.log('Creating package'); - if (!fs.existsSync(target)) { console.log(`✖ Target doesnt exist: ${target}`); process.exit(1); @@ -183,6 +159,8 @@ export class Bundle { process.exit(1); } + console.log('Creating package'); + const workdir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); try { fs.copySync(this.packageDir, workdir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); @@ -190,35 +168,100 @@ export class Bundle { const bundleManifest = { ...this.manifest }; // move all 'dependencies' to 'devDependencies' so that npm doesn't install anything when consuming + // external ones should be kept as is. for (const [d, v] of Object.entries(this.manifest.dependencies)) { bundleManifest.devDependencies[d] = v; + delete bundleManifest.dependencies[d]; } - bundleManifest.dependencies = {}; + + // external dependencies should be specified as runtime dependencies + for (const external of this.externals.map(e => this.findPackage(require.resolve(e))).map(p => this.createDependency(p))) { + bundleManifest.dependencies[external.name] = external.version; + } + + const bundlePath = this.output.path.replace(this.packageDir, workdir); + const sourcemapPath = this.sourcemap.path.replace(this.packageDir, workdir); // inject a new entrypoint referencing the bundle file - const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(this.output.path)}');`]; - const entrypointPath = path.join(path.dirname(this.entrypoint), 'entrypoint.bundle'); - bundleManifest.bin = { [this.script]: entrypointPath }; + const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(bundlePath)}');`]; + const entrypointPath = `${bundlePath}.entrypoint`; + bundleManifest.bin = { [this.script]: path.relative(workdir, entrypointPath) }; + + // the new entrypoints should have the same permissions as the old ones. + const perms = fs.statSync(path.join(workdir, this.entrypoint)).mode; - fs.writeFileSync(path.join(workdir, entrypointPath), entrypointContent.join('\n')); + fs.writeFileSync(entrypointPath, entrypointContent.join('\n'), { mode: perms }); fs.writeFileSync(path.join(workdir, 'package.json'), JSON.stringify(bundleManifest, null, 2)); console.log('Writing bundle'); - fs.writeFileSync(this.output.path.replace(this.packageDir, workdir), this.output.contents); + fs.writeFileSync(bundlePath, this.output.contents, { mode: perms }); + + console.log('Writing sourcemap'); + fs.writeFileSync(sourcemapPath, this.sourcemap.contents); console.log('Copying resources'); for (const [src, dst] of Object.entries(this.resources)) { fs.copySync(path.join(this.packageDir, src), path.join(workdir, dst), { recursive: true }); } + if (this.test) { + shell(`${entrypointPath} ${this.test}`, { cwd: workdir }); + } + // create the tarball const tarball = shell('npm pack', { quiet: true, cwd: workdir }).trim(); - fs.copySync(path.join(workdir, tarball), path.join(target, tarball)); + fs.copySync(path.join(workdir, tarball), path.join(target, tarball), { recursive: true }); } finally { - fs.removeSync(workdir); + // fs.removeSync(workdir); } + } + public fix() { + console.log('Generating notice file'); + this.notice.create(this.copyright); + } + + private validateCircularImports(): CircularImportsViolations | undefined { + console.log('Validating circular imports'); + const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; + try { + // we don't use the programatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); + return undefined; + } catch (e: any) { + return { summary: e.stdout.toString() }; + } + } + + private validateNotice(): NoticeViolations | undefined { + console.log('Validating notice'); + return this.notice.validate(); + } + + private validateResources(): ResourceViolations | undefined { + console.log('Validating resources'); + const missing = []; + const absolute = []; + for (const [src, dst] of Object.entries(this.resources)) { + if (path.isAbsolute(src)) { + absolute.push(src); + } + if (path.isAbsolute(dst)) { + absolute.push(dst); + } + if (!fs.existsSync(path.join(this.packageDir, src))) { + missing.push(src); + } + } + + if (missing.length === 0 && absolute.length === 0) { + return undefined; + } + + return { missing, absolute }; } private get notice(): Notice { @@ -256,18 +299,19 @@ export class Bundle { return { path: packageDir, name: manifest.name, version: manifest.version }; } - private esbuild(): { dependencies: Dependency[]; output: esbuild.OutputFile } { + private esbuild(): { dependencies: Dependency[]; output: esbuild.OutputFile; sourcemap: esbuild.OutputFile } { const bundle = esbuild.buildSync({ entryPoints: [this.entrypoint], bundle: true, target: 'node12', platform: 'node', + sourcemap: true, metafile: true, absWorkingDir: this.packageDir, external: this.externals, write: false, - outfile: path.join(path.dirname(this.entrypoint), 'node-cli-bundle.js'), + outfile: path.join(path.dirname(this.entrypoint), `${this.script}.bundle.js`), allowOverwrite: true, }); @@ -275,23 +319,32 @@ export class Bundle { throw new Error('Bundling did not produce any output files'); } - if (bundle.outputFiles.length > 1) { - throw new Error('Bundling produced multiple output files'); + if (bundle.outputFiles.length > 2) { + // we are expecting only the bundle and sourcemap + throw new Error('Bundling produced too many output files'); } if (bundle.warnings.length) { // esbuild warnings are usually important, lets try to be strict here. // the warnings themselves are printed on screen. - console.error(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); - process.exit(1); + throw new Error(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); + } + + const outfile = bundle.outputFiles.find(o => !o.path.endsWith('.map')); + const sourcemap = bundle.outputFiles.find(o => o.path.endsWith('.map')); + + if (!outfile) { + throw new Error('Unable to identify bundle file'); } - const outfile = bundle.outputFiles[0]; + if (!sourcemap) { + throw new Error('Unable to identify sourcemap file'); + } const inputs = Object.keys(bundle.metafile!.outputs[path.relative(this.packageDir, outfile.path)].inputs); const packages = new Set(Array.from(inputs).map(i => this.findPackage(i))); const dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); - return { dependencies, output: outfile }; + return { dependencies, output: outfile, sourcemap }; } private bin() { diff --git a/tools/@aws-cdk/node-bundle/src/model.ts b/tools/@aws-cdk/node-bundle/src/model.ts index c4cc572549905..15bccf1296492 100644 --- a/tools/@aws-cdk/node-bundle/src/model.ts +++ b/tools/@aws-cdk/node-bundle/src/model.ts @@ -38,6 +38,20 @@ export interface Attribution { readonly licenseText?: string; } +/** + * Violations pertaining resources that need to be embedded in the bundle. + */ +export interface ResourceViolations { + /** + * Resources that were defined in the configuration but could not be located. + */ + readonly missing?: string[]; + /** + * Resources that are defined with an absolute path. + */ + readonly absolute?: string[]; +} + /** * Violations pertaining the NOTICE file of the package. */ @@ -87,4 +101,8 @@ export interface BundleViolations { * The imports violations. */ readonly imports?: CircularImportsViolations; + /** + * The resource violations. + */ + readonly resource?: ResourceViolations; } \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts index 2a2f8496a5906..7443ef0d3b88e 100644 --- a/tools/@aws-cdk/node-bundle/test/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/bundle.test.ts @@ -10,10 +10,11 @@ describe('validate', () => { externals: ['fsevents'], dontAttribute: '(^@aws-cdk)', resources: { - '../../node_modules/vm2/lib/contextify.js': 'bin', + '../../node_modules/vm2/lib/contextify.js': 'bin/contextify.js', }, + test: '--version', }); - bundle.pack(process.cwd()); + bundle.pack({ target: process.cwd() }); }, 5 * 60 * 1000); }); \ No newline at end of file From 658351d34a01fbef27eea0d7a3273f3a9a9a95f5 Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 10 Feb 2022 02:16:44 +0200 Subject: [PATCH 18/63] mid work --- tools/@aws-cdk/node-bundle/src/bundle.ts | 239 ++++++++++++------ tools/@aws-cdk/node-bundle/src/model.ts | 69 ----- tools/@aws-cdk/node-bundle/src/notice.ts | 202 +++++++-------- .../@aws-cdk/node-bundle/test/bundle.test.ts | 4 +- 4 files changed, 271 insertions(+), 243 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/bundle.ts index ece21e39b064b..758eafadb54d2 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/bundle.ts @@ -2,7 +2,8 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import type { BundleViolations, Dependency, CircularImportsViolations, NoticeViolations, ResourceViolations } from './model'; +import { NoticeValidationReport } from '.'; +import type { Dependency } from './model'; import { Notice } from './notice'; import { shell } from './shell'; @@ -88,6 +89,7 @@ export class Bundle { private readonly test?: string; private readonly dependencies: Dependency[]; + private readonly dependenciesRoot: string; private readonly output: esbuild.OutputFile; private readonly sourcemap: esbuild.OutputFile; @@ -110,43 +112,62 @@ export class Bundle { // without the dependencies, this object is pretty much // useless, so lets generate it of the bat. - const { dependencies, output, sourcemap } = this.esbuild(); + const { dependencies, output, sourcemap, dependenciesRoot } = this.esbuild(); this.dependencies = dependencies; this.output = output; this.sourcemap = sourcemap; + this.dependenciesRoot = dependenciesRoot; } /** - * Validate the state of the project with respect to bundling. + * Validate the current notice file. * - * This method will validate both circular imports and notice file attributions. - * To validate only one or the other, use the `validateNotice` and `validateCircularImports`. - * - * It never throws an exception, instead it returns a report of violations. The Caller is responsible - * for inspecting those violations and act accordingaly. - * - * If no violations are found, the return value will be undefined. + * This method never throws. The Caller is responsible for inspecting the report returned and act accordinagly. */ - public validate(): BundleViolations | undefined { - const importsViolations = this.validateCircularImports(); - const noticeViolations = this.validateNotice(); - const resourceViolations = this.validateResources(); + public validate(): BundleValidationReport { + + let circularImports = undefined; - if (!importsViolations && !noticeViolations && !resourceViolations) { - return undefined; + console.log('Validating circular imports'); + const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; + try { + // we don't use the programatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); + } catch (e: any) { + circularImports = e.stdout.toString(); } - return { notice: noticeViolations, imports: importsViolations, resource: resourceViolations }; + console.log('Validating resources'); + const missingResources = []; + const absoluteResources = []; + for (const [src, dst] of Object.entries(this.resources)) { + if (path.isAbsolute(src)) { + absoluteResources.push(src); + } + if (path.isAbsolute(dst)) { + absoluteResources.push(dst); + } + if (!fs.existsSync(path.join(this.packageDir, src))) { + missingResources.push(src); + } + } + + console.log('Validating notice'); + const noticeReport = this.notice.validate(); + + + return new BundleValidationReport(noticeReport, missingResources, absoluteResources, circularImports); } public pack(options: BundlePackOptions = {}) { const target = options.target ?? this.packageDir; - // double check, make sure we don't package something invalid. - const violations = this.validate(); - if (violations) { - throw new Error('Unable to pack due to validation errors. Please run validate() to inspect them and fix.'); + const report = this.validate(); + if (report.violations.length > 0) { + throw new Error(`Unable to pack due to validation errors.\n\n${report.violations.map(v => ` - ${v}`).join('\n')}`); } if (!fs.existsSync(target)) { @@ -175,8 +196,36 @@ export class Bundle { } // external dependencies should be specified as runtime dependencies - for (const external of this.externals.map(e => this.findPackage(require.resolve(e))).map(p => this.createDependency(p))) { - bundleManifest.dependencies[external.name] = external.version; + for (const external of this.externals) { + + const parts = external.split(':'); + const name = parts[0]; + const type = parts[1]; + const paths = this.findPackages(name); + if (paths.length === 0) { + throw new Error(`Unable to locate external dependency: ${name}`); + } + if (paths.length > 1) { + throw new Error(`Found multiple paths for external dependency (${name}): ${paths.join(' | ')}`); + } + const dependency = this.createDependency(paths[0]); + + switch (type) { + case 'optional': + bundleManifest.optionalDependencies = bundleManifest.optionalDependencies ?? {}; + bundleManifest.optionalDependencies[dependency.name] = dependency.version; + break; + case 'peer': + bundleManifest.peerDependencies = bundleManifest.peerDependencies ?? {}; + bundleManifest.peerDependencies[dependency.name] = dependency.version; + break; + case '': + bundleManifest.dependencies = bundleManifest.dependencies ?? {}; + bundleManifest.dependencies[dependency.name] = dependency.version; + break; + default: + throw new Error(`Unsupported dependency type '${type}' for external dependency '${name}'`); + } } const bundlePath = this.output.path.replace(this.packageDir, workdir); @@ -219,49 +268,30 @@ export class Bundle { public fix() { console.log('Generating notice file'); - this.notice.create(this.copyright); + this.notice.flush(); } - private validateCircularImports(): CircularImportsViolations | undefined { - console.log('Validating circular imports'); - const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; - try { - // we don't use the programatic API since it only offers an async API. - // prefer to stay sync for now since its easier to integrate with other tooling. - // will offer an async API further down the road. - shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); - return undefined; - } catch (e: any) { - return { summary: e.stdout.toString() }; - } - } + private findPackages(name: string): string[] { - private validateNotice(): NoticeViolations | undefined { - console.log('Validating notice'); - return this.notice.validate(); - } + const paths: string[] = []; - private validateResources(): ResourceViolations | undefined { - console.log('Validating resources'); - const missing = []; - const absolute = []; - for (const [src, dst] of Object.entries(this.resources)) { - if (path.isAbsolute(src)) { - absolute.push(src); - } - if (path.isAbsolute(dst)) { - absolute.push(dst); - } - if (!fs.existsSync(path.join(this.packageDir, src))) { - missing.push(src); - } - } + function walkDir(dir: string) { + fs.readdirSync(dir).forEach(f => { + const fullPath = path.join(dir, f); + const isDirectory = fs.statSync(fullPath).isDirectory(); + if (!isDirectory) { + return; + } + if (fullPath.endsWith(`node_modules/${name}`)) { + paths.push(fullPath); + } + walkDir(fullPath); + }); + }; - if (missing.length === 0 && absolute.length === 0) { - return undefined; - } + walkDir(this.dependenciesRoot); - return { missing, absolute }; + return paths; } private get notice(): Notice { @@ -271,15 +301,17 @@ export class Bundle { this._notice = new Notice({ packageDir: this.packageDir, dependencies: this.dependencies, + dependenciesRoot: this.dependenciesRoot, exclude: this.excludeFromAttribution, validLicenses: this.validLicenses, + copyright: this.copyright, }); return this._notice; } - private findPackage(inputFile: string): string { + private findPackagePath(inputFile: string): string { - function findPackageUp(dirname: string): string { + function findPackagePathUp(dirname: string): string { const manifestPath = path.join(dirname, 'package.json'); if (fs.existsSync(manifestPath)) { return dirname; @@ -287,10 +319,10 @@ export class Bundle { if (path.dirname(dirname) === dirname) { throw new Error('Unable to find package manifest'); } - return findPackageUp(path.dirname(dirname)); + return findPackagePathUp(path.dirname(dirname)); } - return findPackageUp(path.resolve(this.packageDir, path.dirname(inputFile))); + return findPackagePathUp(path.resolve(this.packageDir, path.dirname(inputFile))); } private createDependency(packageDir: string): Dependency { @@ -299,7 +331,7 @@ export class Bundle { return { path: packageDir, name: manifest.name, version: manifest.version }; } - private esbuild(): { dependencies: Dependency[]; output: esbuild.OutputFile; sourcemap: esbuild.OutputFile } { + private esbuild(): { dependencies: Dependency[]; output: esbuild.OutputFile; sourcemap: esbuild.OutputFile; dependenciesRoot: string } { const bundle = esbuild.buildSync({ entryPoints: [this.entrypoint], @@ -309,7 +341,7 @@ export class Bundle { sourcemap: true, metafile: true, absWorkingDir: this.packageDir, - external: this.externals, + external: this.externals.map(e => e.split(':')[0]), write: false, outfile: path.join(path.dirname(this.entrypoint), `${this.script}.bundle.js`), allowOverwrite: true, @@ -342,23 +374,86 @@ export class Bundle { } const inputs = Object.keys(bundle.metafile!.outputs[path.relative(this.packageDir, outfile.path)].inputs); - const packages = new Set(Array.from(inputs).map(i => this.findPackage(i))); + const packages = new Set(Array.from(inputs).map(i => this.findPackagePath(i))); const dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); - return { dependencies, output: outfile, sourcemap }; + const dependenciesRoot = lcp(dependencies.map(d => d.path)); + return { dependencies, output: outfile, sourcemap, dependenciesRoot }; } private bin() { const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); if (bin.length === 0) { - console.error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); - process.exit(1); + throw new Error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); } if (bin.length > 1) { - console.error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); - process.exit(1); + throw new Error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); } return bin[0]; } } + +/** + * Validation report. + */ +export class BundleValidationReport { + + /** + * All violations of the report. + */ + public readonly violations: string[]; + + constructor( + /** + * The NOTICE file validation report. + */ + public readonly notice: NoticeValidationReport, + /** + * Resources that could not be located. + */ + public readonly missingResources: string[], + + /** + * Resources that are defined with absolute paths. + */ + public readonly absoluteResources: string[], + /** + * The circular imports violations. + */ + public readonly circularImports?: string, + ) { + + const violations = []; + + violations.push(...notice.violations); + + for (const r of missingResources) { + violations.push(`Unable to find resource (${r}) relative to the package directory`); + } + + for (const r of absoluteResources) { + violations.push(`Resource (${r}) should be defined using relative paths to the package directory`); + } + + if (circularImports) { + violations.push(circularImports); + } + + this.violations = violations; + + } +} + +function lcp(strs: string[]) { + let prefix = ''; + if (strs === null || strs.length === 0) return prefix; + for (let i = 0; i < strs[0].length; i++) { + const char = strs[0][i]; + for (let j = 1; j < strs.length; j++) { + if (strs[j][i] !== char) return prefix; + } + prefix = prefix + char; + } + return prefix; +} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/model.ts b/tools/@aws-cdk/node-bundle/src/model.ts index 15bccf1296492..a75c9908afa2e 100644 --- a/tools/@aws-cdk/node-bundle/src/model.ts +++ b/tools/@aws-cdk/node-bundle/src/model.ts @@ -37,72 +37,3 @@ export interface Attribution { */ readonly licenseText?: string; } - -/** - * Violations pertaining resources that need to be embedded in the bundle. - */ -export interface ResourceViolations { - /** - * Resources that were defined in the configuration but could not be located. - */ - readonly missing?: string[]; - /** - * Resources that are defined with an absolute path. - */ - readonly absolute?: string[]; -} - -/** - * Violations pertaining the NOTICE file of the package. - */ -export interface NoticeViolations { - /** - * Attributions that have multiple licenses. - */ - readonly multiLicense?: Attribution[]; - /** - * Attributions that have no license. - */ - readonly noLicense?: Attribution[]; - /** - * Attributions that have an invalid license. - */ - readonly invalidLicense?: Attribution[]; - /** - * Attributions that are missing. - */ - readonly missing?: Attribution[]; - /** - * Attributions that unnecessary. - */ - readonly unnecessary?: Attribution[]; -} - -/** - * Violations pertaining the import statements of a package. - */ -export interface CircularImportsViolations { - /** - * Contains an aggregated summary of all circular imports. - * If no violations are found, this will be undefined. - */ - readonly summary?: string; -} - -/** - * Violations a bundle exhibits. - */ -export interface BundleViolations { - /** - * The NOTICE file violations. - */ - readonly notice?: NoticeViolations; - /** - * The imports violations. - */ - readonly imports?: CircularImportsViolations; - /** - * The resource violations. - */ - readonly resource?: ResourceViolations; -} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/notice.ts b/tools/@aws-cdk/node-bundle/src/notice.ts index e815b8693a8fa..5b869b45d0f6c 100644 --- a/tools/@aws-cdk/node-bundle/src/notice.ts +++ b/tools/@aws-cdk/node-bundle/src/notice.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; import * as path from 'path'; -import type { Dependency, Attribution, NoticeViolations } from './model'; +import type { Dependency, Attribution } from './model'; import { shell } from './shell'; /** @@ -20,25 +20,6 @@ const DEFAULT_VALID_LICENSES = [ */ const FILE_PATH = 'NOTICE'; -/** - * String signifying the attributions segement is to follow. - */ -const ATTRIBUTIONS_START = 'This package includes the following third-party software:'; - -/** - * --------------- - */ -const ATTRIBUTIONS_SEPARATOR = `\n${'-'.repeat(15)}\n`; - -/** - * ** fs-extra@3.0.4 - https://www.npmjs.com/package/fs-extra/v/3.0.4 | MIT - * - * Copyright (c) 2011-2017 JP Richardson - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files - * - */ -const ATTRIBUTION_FORMAT_REGEX = /\*\* (\S*) - (\S*) \| (\S*)([\S\s]*)/; - /** * Properties for `Notice`. @@ -52,6 +33,14 @@ export interface NoticeProps { * Package dependencies. */ readonly dependencies: Dependency[]; + /** + * The directory underwhich all dependencies live. + */ + readonly dependenciesRoot: string; + /** + * The copyright to prepend to the file. + */ + readonly copyright: string; /** * List of valid licenses. * @@ -74,104 +63,69 @@ export class Notice { private readonly packageDir: string; private readonly dependencies: Dependency[]; private readonly validLicenses: string[]; + private readonly copyright: string; + private readonly dependenciesRoot: string; - private readonly expectedAttributions: Map; + private readonly attributions: Map; + private readonly content: string; constructor(props: NoticeProps) { this.packageDir = props.packageDir; this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); this.validLicenses = (props.validLicenses ?? DEFAULT_VALID_LICENSES).map(l => l.toLowerCase()); + this.copyright = props.copyright; + this.dependenciesRoot = props.dependenciesRoot; - // without the expected attributions, this object is pretty much + // without the generated notice content, this object is pretty much // useless, so lets generate those of the bat. - this.expectedAttributions = this.generateAttributions(); + this.attributions = this.generateAttributions(); + this.content = this.render(this.attributions); } /** * Validate the current notice file. * - * This method will parse attributions of the current NOTICE file and compare - * them against the expected attributions based on the provided dependencies. - * - * It throws an exception in case the NOTICE file is malformed and cannot be parsed. - * Otherwise it returns a report of attribution violations. The Caller is responsible - * for inspecting those violations and act accordingaly. - * - * If no violations are found, the return value will be undefined. + * This method never throws. The Caller is responsible for inspecting the report returned and act accordinagly. */ - public validate(): NoticeViolations | undefined { + public validate(): NoticeValidationReport { - const currentAttributions = this.parseAttributions(); + const noticePath = path.join(this.packageDir, FILE_PATH); - const { invalidLicense, noLicense, multiLicense } = this.validateAttributionLicense(currentAttributions); - const missing = Array.from(this.expectedAttributions.values()).filter(a => !currentAttributions.has(a.package)); - const unnecessary = Array.from(currentAttributions.values()).filter(a => !this.expectedAttributions.has(a.package)); + const missing = !fs.existsSync(noticePath); + const notice = missing ? undefined : fs.readFileSync(noticePath, { encoding: 'utf-8' }); + const outdated = notice ? notice !== this.content : false; - if (invalidLicense.length === 0 && noLicense.length === 0 && multiLicense.length === 0 && missing.length === 0 && unnecessary.length === 0) { - return undefined; - } + const { invalidLicense, noLicense, multiLicense } = this.validateAttributionLicense(this.attributions); - // we convert empty arrays to undefined so its eaiser for callers to check for violations. - const emptyToUndefined = (arr: Attribution[]) => arr.length > 0 ? arr : undefined; - - return { - invalidLicense: emptyToUndefined(invalidLicense), - noLicense: emptyToUndefined(noLicense), - multiLicense: emptyToUndefined(multiLicense), - missing: emptyToUndefined(missing), - unnecessary: emptyToUndefined(unnecessary), - }; + return new NoticeValidationReport(multiLicense, noLicense, invalidLicense, missing, outdated); } /** - * Render the notice file based on the expected attributions - * and write it to disk. The copyright is placed in the beginning of the file. + * Flush the generated notice file to disk. */ - public create(copyright: string) { - const notice = [copyright, '', '-'.repeat(40), '']; - - if (this.expectedAttributions.size > 0) { - notice.push(ATTRIBUTIONS_START); - notice.push(''); - } - - for (const attr of this.expectedAttributions.values()) { - notice.push(`** ${attr.package} - ${attr.url} | ${attr.license}`); - notice.push(attr.licenseText ?? ''); - notice.push(ATTRIBUTIONS_SEPARATOR); - } - - fs.writeFileSync(path.join(this.packageDir, FILE_PATH), notice.join('\n')); + public flush() { + fs.writeFileSync(path.join(this.packageDir, FILE_PATH), this.content); } - private parseAttributions(): Map { + private render(attributions: Map): string { - const noticePath = path.join(this.packageDir, FILE_PATH); + const notice = [this.copyright, '', '-'.repeat(40), '']; - if (!fs.existsSync(noticePath)) { - return new Map(); + if (attributions.size > 0) { + notice.push('This package includes the following third-party software:'); + notice.push(''); } - const notice = fs.readFileSync(noticePath, { encoding: 'utf-8' }).split('\n'); - const attributionsSegment = notice.slice(notice.indexOf(ATTRIBUTIONS_START) + 1).join('\n').trim(); - - const attributions: Map = new Map(); + const separator = `\n${'-'.repeat(15)}\n`; - for (const section of attributionsSegment === '' ? [] : attributionsSegment.split(ATTRIBUTIONS_SEPARATOR)) { - const matched = section.match(ATTRIBUTION_FORMAT_REGEX); - if (!matched) { - throw new Error(`Malformed ${FILE_PATH} file (delete it)`); - } - const pkg = matched[1]; - attributions.set(pkg, { - package: pkg, - url: matched[2], - license: matched[3], - licenseText: matched[4], - }); + for (const attr of attributions.values()) { + notice.push(`** ${attr.package} - ${attr.url} | ${attr.license}`); + notice.push(attr.licenseText ?? ''); + notice.push(separator); } - return attributions; + return notice.join('\n'); + } private generateAttributions(): Map { @@ -180,9 +134,11 @@ export class Notice { const pkg = (d: Dependency) => `${d.name}@${d.version}`; - const dependenciesRoot = lcp(this.dependencies.map(d => d.path)); const packages = this.dependencies.map(d => pkg(d)).join(';'); - const output = shell(`${require.resolve('license-checker/bin/license-checker')} --json --packages "${packages}"`, { cwd: dependenciesRoot, quiet: true }); + const output = shell(`${require.resolve('license-checker/bin/license-checker')} --json --packages "${packages}"`, { + cwd: this.dependenciesRoot, + quiet: true, + }); const infos = JSON.parse(output); for (const dep of this.dependencies) { @@ -248,17 +204,63 @@ export class Notice { } -function lcp(strs: string[]) { - let prefix = ''; - if (strs === null || strs.length === 0) return prefix; - for (let i=0; i < strs[0].length; i++) { - const char = strs[0][i]; // loop through all characters of the very first string. +/** + * Validation report. + */ +export class NoticeValidationReport { + + /** + * All violations of the report. + */ + public readonly violations: string[]; + + constructor( + /** + * Attributions that have multiple licenses. + */ + public readonly multiLicense: Attribution[], + /** + * Attributions that have no license. + */ + public readonly noLicense: Attribution[], + /** + * Attributions that have an invalid license. + */ + public readonly invalidLicense: Attribution[], + /** + * Notice file is missing. + */ + public readonly missing?: boolean, + /** + * Notice file is outdated. + */ + public readonly outdated?: boolean, + ) { + + const violations = []; + + for (const attr of invalidLicense ?? []) { + violations.push(`Dependency ${attr.package} has an invalid license: ${attr.license}`); + } + + for (const attr of noLicense ?? []) { + violations.push(`Dependency ${attr.package} has no license`); + } + + for (const attr of multiLicense ?? []) { + violations.push(`Dependency ${attr.package} has multiple licenses: ${attr.license}`); + } - for (let j = 1; j < strs.length; j++) { - // loop through all other strings in the array - if (strs[j][i] !== char) return prefix; + if (missing) { + violations.push(`${FILE_PATH} is missing`); } - prefix = prefix + char; + + if (outdated) { + violations.push(`${FILE_PATH} is outdated`); + } + + this.violations = violations; + } - return prefix; -} \ No newline at end of file + +} diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts index 7443ef0d3b88e..c64ce85ffeb7f 100644 --- a/tools/@aws-cdk/node-bundle/test/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/bundle.test.ts @@ -6,8 +6,8 @@ describe('validate', () => { const bundle = new Bundle({ packageDir: '/Users/epolon/dev/src/github.com/aws/aws-cdk/packages/aws-cdk', - copyright: 'Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.', - externals: ['fsevents'], + copyright: 'AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n', + externals: ['fsevents:optional'], dontAttribute: '(^@aws-cdk)', resources: { '../../node_modules/vm2/lib/contextify.js': 'bin/contextify.js', From 8640e7443f7e79eeae5759cf4e2f56fdbf7f2b81 Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 10 Feb 2022 02:17:33 +0200 Subject: [PATCH 19/63] mid work --- packages/aws-cdk/package.json | 10 ++--- .../cdk-build-tools/bin/cdk-package.ts | 2 +- tools/@aws-cdk/pkglint/lib/rules.ts | 38 +++++++++++++------ 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 82e9f0fcf66de..e74742b29465e 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -32,8 +32,11 @@ "cdk-package": { "bundle": { "externals": [ - "fsevents" + "fsevents:optional" ], + "resources": { + "../../node_modules/vm2/lib/contextify.js": "bin/contextify.js" + }, "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", "licenses": [ "Apache-2.0", @@ -43,10 +46,7 @@ "BSD-2-Clause", "0BSD" ], - "dontAttribute": "(^@aws-cdk)", - "resources": { - "../../node_modules/vm2/lib/contextify.js": "bin" - } + "dontAttribute": "(^@aws-cdk/)" } }, "author": { diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts index 489bb39cf54ea..33088b2d9e588 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts @@ -52,7 +52,7 @@ async function main() { } else if (options.bundle) { // bundled packages have their own bundler. const bundle = new Bundle({ packageDir: process.cwd(), ...options.bundle }); - bundle.pack(path.join(outdir, 'js')); + bundle.pack({ target: path.join(outdir, 'js') }); } else { // just "npm pack" and deploy to "outdir" const tarball = (await shell(['npm', 'pack'], { timers })).trim(); diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 1adf96822f587..e78fd26dfc3ab 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -179,7 +179,7 @@ export class BundledCLI extends ValidationRule { '0BSD', ]; - private static readonly DONT_ATTRIBUTE = '(^@aws-cdk)'; + private static readonly DONT_ATTRIBUTE = '(^@aws-cdk/)'; public validate(pkg: PackageJson): void { @@ -243,48 +243,62 @@ export class BundledCLI extends ValidationRule { const bundle = new Bundle({ packageDir: pkg.packageRoot, ...bundleProps }); const violations = bundle.validate(); - if (violations?.imports?.summary) { + if (violations.circularImports) { pkg.report({ - message: `Circular imports detected:\n\n${violations.imports.summary}`, + message: `Circular imports detected:\n\n${violations.circularImports}`, ruleName: `${this.name}/circular-imports` }) } - for (const attr of violations?.notice?.invalidLicense ?? []) { + for (const attr of violations.notice.invalidLicense) { pkg.report({ message: `Dependency ${attr.package} has an invalid license: ${attr.license}`, ruleName: `${this.name}/invalid-dependency-license` }) } - for (const attr of violations?.notice?.noLicense ?? []) { + for (const attr of violations.notice.noLicense) { pkg.report({ message: `Dependency ${attr.package} has no license`, ruleName: `${this.name}/missing-dependency-license` }) } - for (const attr of violations?.notice?.multiLicense ?? []) { + for (const attr of violations.notice.multiLicense) { pkg.report({ message: `Dependency ${attr.package} has multiple licenses: ${attr.license}`, ruleName: `${this.name}/multiple-dependency-license` }) } + for (const resource of violations.missingResources) { + pkg.report({ + message: `Resource "${resource}" cannot be located relative to the package directory`, + ruleName: `${this.name}/missing-resource` + }) + } + + for (const resource of violations.absoluteResources) { + pkg.report({ + message: `Resource "${resource}" should be defined using relative paths to the package directory`, + ruleName: `${this.name}/absolute-resource` + }) + } + const fix = () => bundle.fix(); - for (const attr of violations?.notice?.missing ?? []) { + if (violations.notice.missing) { pkg.report({ - message: `Dependency ${attr.package} is missing an attribution`, - ruleName: `${this.name}/missing-attribution`, + message: `NOTICE file is missing`, + ruleName: `${this.name}/missing-notice`, fix, }) } - for (const attr of violations?.notice?.unnecessary ?? []) { + if (violations.notice.outdated) { pkg.report({ - message: `Dependency ${attr.package} attribution is unnecessary`, - ruleName: `${this.name}/unnecessary-attribution`, + message: `NOTICE file is outdated`, + ruleName: `${this.name}/outdated-notice`, fix, }) } From 773f0be83d35bbfaa19ad90dcbb2197a0738b596 Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 10 Feb 2022 13:01:26 +0200 Subject: [PATCH 20/63] mid work --- packages/aws-cdk/package.json | 1 + tools/@aws-cdk/node-bundle/.projenrc.js | 3 + tools/@aws-cdk/node-bundle/README.md | 56 +++++- .../node-bundle/src/{ => api}/bundle.ts | 179 ++++++++---------- tools/@aws-cdk/node-bundle/src/api/index.ts | 2 + .../node-bundle/src/{ => api}/model.ts | 0 .../node-bundle/src/{ => api}/notice.ts | 0 .../node-bundle/src/{ => api}/shell.ts | 0 tools/@aws-cdk/node-bundle/src/cli.ts | 73 +++++++ tools/@aws-cdk/node-bundle/src/index.ts | 3 +- .../@aws-cdk/node-bundle/test/bundle.test.ts | 3 +- 11 files changed, 215 insertions(+), 105 deletions(-) rename tools/@aws-cdk/node-bundle/src/{ => api}/bundle.ts (72%) create mode 100644 tools/@aws-cdk/node-bundle/src/api/index.ts rename tools/@aws-cdk/node-bundle/src/{ => api}/model.ts (100%) rename tools/@aws-cdk/node-bundle/src/{ => api}/notice.ts (100%) rename tools/@aws-cdk/node-bundle/src/{ => api}/shell.ts (100%) create mode 100644 tools/@aws-cdk/node-bundle/src/cli.ts diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e74742b29465e..fe465f69dfc84 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -38,6 +38,7 @@ "../../node_modules/vm2/lib/contextify.js": "bin/contextify.js" }, "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", + "entrypoints": ["bin/cdk.js"], "licenses": [ "Apache-2.0", "MIT", diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js index 9f2809750f02c..1f538cd8713ec 100644 --- a/tools/@aws-cdk/node-bundle/.projenrc.js +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -14,6 +14,9 @@ const project = new typescript.TypeScriptProject({ 'fs-extra', 'shlex', ], + bin: { + 'node-bundle': '../lib/cli.js', + }, // required by projen even though 'github' is false. defaultReleaseBranch: 'main', diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index b3fa7ddcdad6a..88dc1d647fe2d 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -1 +1,55 @@ -# replace this \ No newline at end of file +# node-bundle + + + +## Why + +We created this tool as a way to bundle up dependencies so that users always consume + +## How + +```console +npm install node-bundle +``` + +### Command Line + +The following options must be passed to any command: + +```console +Options: + --copyright [string] [required] + --external Packages in this list will be excluded from the bundle and + added as dependencies (example: "fsevents:optional") [array] + --licenses List of valid licenses [array] + --resources List of resources to be explicitly copied to the bundle + (example: + "node_modules/proxy-agent/contextify.js:bin/contextify.js)" + [array] + --dont-attribute Dependencies matching this regular expressions wont be added + to the notice file [string] + --test Validation command to sanity test the bundle after its + created [string] + +``` + +#### validate + +```console +node-bundle validate +``` + +#### pack + +```console +node-bundle pack +``` + +#### fix + +```console +node-bundle fix +``` + + +### Programatic diff --git a/tools/@aws-cdk/node-bundle/src/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts similarity index 72% rename from tools/@aws-cdk/node-bundle/src/bundle.ts rename to tools/@aws-cdk/node-bundle/src/api/bundle.ts index 758eafadb54d2..8ea1efbe86e57 100644 --- a/tools/@aws-cdk/node-bundle/src/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -17,6 +17,11 @@ export interface BundleProps { */ readonly packageDir: string; + /** + * List of entrypoints to bundle. + */ + readonly entrypoints: string[]; + /** * Copyright string used when generating the NOTICE file. */ @@ -77,21 +82,19 @@ export interface BundlePackOptions { export class Bundle { private readonly manifest: any; - private readonly script: string; - private readonly entrypoint: string; + private readonly packageDir: string; + private readonly copyright: string; + private readonly entrypoints: Record; private readonly externals: string[]; private readonly resources: {[src: string]: string}; private readonly validLicenses?: string[]; - private readonly packageDir: string; - private readonly copyright: string; - private readonly excludeFromAttribution?: string; + private readonly dontAttribute?: string; private readonly test?: string; - private readonly dependencies: Dependency[]; - private readonly dependenciesRoot: string; - private readonly output: esbuild.OutputFile; - private readonly sourcemap: esbuild.OutputFile; + private _bundle?: esbuild.BuildResult; + private _dependencies?: Dependency[]; + private _dependenciesRoot?: string; private _notice?: Notice; @@ -103,20 +106,15 @@ export class Bundle { this.test = props.test; this.validLicenses = props.licenses; this.copyright = props.copyright; - this.excludeFromAttribution = props.dontAttribute; + this.dontAttribute = props.dontAttribute; + this.entrypoints = {}; - const bin = this.bin(); - - this.script = bin[0]; - this.entrypoint = bin[1]; - - // without the dependencies, this object is pretty much - // useless, so lets generate it of the bat. - const { dependencies, output, sourcemap, dependenciesRoot } = this.esbuild(); - this.dependencies = dependencies; - this.output = output; - this.sourcemap = sourcemap; - this.dependenciesRoot = dependenciesRoot; + for (const entrypoint of props.entrypoints) { + if (!fs.existsSync(path.join(this.packageDir, entrypoint))) { + throw new Error(`Unable to locate entrypoint: ${entrypoint}`); + } + this.entrypoints[entrypoint.replace('.js', '')] = entrypoint; + } } /** @@ -228,25 +226,14 @@ export class Bundle { } } - const bundlePath = this.output.path.replace(this.packageDir, workdir); - const sourcemapPath = this.sourcemap.path.replace(this.packageDir, workdir); - - // inject a new entrypoint referencing the bundle file - const entrypointContent = ['#!/usr/bin/env node', `require('./${path.basename(bundlePath)}');`]; - const entrypointPath = `${bundlePath}.entrypoint`; - bundleManifest.bin = { [this.script]: path.relative(workdir, entrypointPath) }; - - // the new entrypoints should have the same permissions as the old ones. - const perms = fs.statSync(path.join(workdir, this.entrypoint)).mode; - - fs.writeFileSync(entrypointPath, entrypointContent.join('\n'), { mode: perms }); fs.writeFileSync(path.join(workdir, 'package.json'), JSON.stringify(bundleManifest, null, 2)); - console.log('Writing bundle'); - fs.writeFileSync(bundlePath, this.output.contents, { mode: perms }); - - console.log('Writing sourcemap'); - fs.writeFileSync(sourcemapPath, this.sourcemap.contents); + console.log('Writing output files'); + for (const output of this.bundle.outputFiles ?? []) { + const out = output.path.replace(this.packageDir, workdir); + console.log(` - ${out}`); + fs.writeFileSync(out, output.contents); + } console.log('Copying resources'); for (const [src, dst] of Object.entries(this.resources)) { @@ -254,7 +241,7 @@ export class Bundle { } if (this.test) { - shell(`${entrypointPath} ${this.test}`, { cwd: workdir }); + shell(`${path.join(workdir, this.test)}`, { cwd: workdir }); } // create the tarball @@ -271,25 +258,40 @@ export class Bundle { this.notice.flush(); } - private findPackages(name: string): string[] { + private get bundle(): esbuild.BuildResult { + if (this._bundle) { + return this._bundle; + } + this._bundle = this.esbuild(); + return this._bundle; + } - const paths: string[] = []; + private get dependencies(): Dependency[] { + if (this._dependencies) { + return this._dependencies; + } + const inputs = Object.keys(this.bundle.metafile!.inputs); + const packages = new Set(Array.from(inputs).map(i => this.findPackagePath(i))); + this._dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); + return this._dependencies; + } - function walkDir(dir: string) { - fs.readdirSync(dir).forEach(f => { - const fullPath = path.join(dir, f); - const isDirectory = fs.statSync(fullPath).isDirectory(); - if (!isDirectory) { - return; - } - if (fullPath.endsWith(`node_modules/${name}`)) { - paths.push(fullPath); - } - walkDir(fullPath); - }); - }; + private get dependenciesRoot(): string { + if (this._dependenciesRoot) { + return this._dependenciesRoot; + } + this._dependenciesRoot = lcp(this.dependencies.map(d => d.path)); + return this._dependenciesRoot; + } - walkDir(this.dependenciesRoot); + private findPackages(name: string): string[] { + + const paths: string[] = []; + walkDir(this.dependenciesRoot, (file: string) => { + if (file.endsWith(`node_modules/${name}`)) { + paths.push(file); + } + }); return paths; } @@ -302,7 +304,7 @@ export class Bundle { packageDir: this.packageDir, dependencies: this.dependencies, dependenciesRoot: this.dependenciesRoot, - exclude: this.excludeFromAttribution, + exclude: this.dontAttribute, validLicenses: this.validLicenses, copyright: this.copyright, }); @@ -331,66 +333,30 @@ export class Bundle { return { path: packageDir, name: manifest.name, version: manifest.version }; } - private esbuild(): { dependencies: Dependency[]; output: esbuild.OutputFile; sourcemap: esbuild.OutputFile; dependenciesRoot: string } { + private esbuild(): esbuild.BuildResult { const bundle = esbuild.buildSync({ - entryPoints: [this.entrypoint], + entryPoints: this.entrypoints, bundle: true, target: 'node12', platform: 'node', - sourcemap: true, + sourcemap: 'inline', metafile: true, + treeShaking: true, absWorkingDir: this.packageDir, external: this.externals.map(e => e.split(':')[0]), write: false, - outfile: path.join(path.dirname(this.entrypoint), `${this.script}.bundle.js`), + outdir: this.packageDir, allowOverwrite: true, }); - if (!bundle.outputFiles || bundle.outputFiles.length === 0) { - throw new Error('Bundling did not produce any output files'); - } - - if (bundle.outputFiles.length > 2) { - // we are expecting only the bundle and sourcemap - throw new Error('Bundling produced too many output files'); - } - if (bundle.warnings.length) { // esbuild warnings are usually important, lets try to be strict here. // the warnings themselves are printed on screen. - throw new Error(`✖ Found ${bundle.warnings.length} bundling warnings (See above)`); - } - - const outfile = bundle.outputFiles.find(o => !o.path.endsWith('.map')); - const sourcemap = bundle.outputFiles.find(o => o.path.endsWith('.map')); - - if (!outfile) { - throw new Error('Unable to identify bundle file'); + throw new Error(`Found ${bundle.warnings.length} bundling warnings (See above)`); } - if (!sourcemap) { - throw new Error('Unable to identify sourcemap file'); - } - - const inputs = Object.keys(bundle.metafile!.outputs[path.relative(this.packageDir, outfile.path)].inputs); - const packages = new Set(Array.from(inputs).map(i => this.findPackagePath(i))); - const dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); - const dependenciesRoot = lcp(dependencies.map(d => d.path)); - return { dependencies, output: outfile, sourcemap, dependenciesRoot }; - } - - private bin() { - - const bin: [string, string][] = Object.entries(this.manifest.bin ?? {}); - if (bin.length === 0) { - throw new Error('✖ No entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); - } - if (bin.length > 1) { - throw new Error('✖ Multiple entry-points detected. You must configure exactly one entrypoint in the \'bin\' section of your manifest'); - } - - return bin[0]; + return bundle; } } @@ -456,4 +422,15 @@ function lcp(strs: string[]) { prefix = prefix + char; } return prefix; -} \ No newline at end of file +} + +function walkDir(dir: string, handler: (file: string) => void) { + fs.readdirSync(dir).forEach(f => { + const fullPath = path.join(dir, f); + const isDirectory = fs.statSync(fullPath).isDirectory(); + if (isDirectory) { + walkDir(fullPath, handler); + } + handler(fullPath); + }); +}; diff --git a/tools/@aws-cdk/node-bundle/src/api/index.ts b/tools/@aws-cdk/node-bundle/src/api/index.ts new file mode 100644 index 0000000000000..c6847599eecf6 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/api/index.ts @@ -0,0 +1,2 @@ +export * from './bundle'; +export * from './notice'; \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/model.ts b/tools/@aws-cdk/node-bundle/src/api/model.ts similarity index 100% rename from tools/@aws-cdk/node-bundle/src/model.ts rename to tools/@aws-cdk/node-bundle/src/api/model.ts diff --git a/tools/@aws-cdk/node-bundle/src/notice.ts b/tools/@aws-cdk/node-bundle/src/api/notice.ts similarity index 100% rename from tools/@aws-cdk/node-bundle/src/notice.ts rename to tools/@aws-cdk/node-bundle/src/api/notice.ts diff --git a/tools/@aws-cdk/node-bundle/src/shell.ts b/tools/@aws-cdk/node-bundle/src/api/shell.ts similarity index 100% rename from tools/@aws-cdk/node-bundle/src/shell.ts rename to tools/@aws-cdk/node-bundle/src/api/shell.ts diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts new file mode 100644 index 0000000000000..b0120e40c0c7d --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -0,0 +1,73 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import * as yargs from 'yargs'; +import { Bundle } from './api'; + +function versionNumber(): string { + return fs.readJSONSync(path.join(__dirname, '..', 'package.json')).version; +} + +async function buildCommands() { + + const argv = yargs + .usage('Usage: node-bundle COMMAND') + .option('entrypoint', { type: 'array', nargs: 1, desc: 'List of entrypoints to bundle', demandOption: true }) + .option('copyright', { type: 'string', desc: 'Copyright statement to be added to the notice file', demandOption: true }) + .option('external', { type: 'array', nargs: 1, default: [], desc: 'Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional)' }) + .option('license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) + .option('resources', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) + .option('dont-attribute', { type: 'string', desc: 'Dependencies matching this regular expressions wont be added to the notice file' }) + .option('test', { type: 'string', desc: 'Validation command to sanity test the bundle after its created' }) + .command('validate', 'Validate the package is ready for bundling') + .command('pack', 'Create the tarball') + .command('fix', 'Fix whatever we can for bundling') + .help() + .version(versionNumber()) + .argv; + + const command = argv._[0]; + const resources: any = {}; + for (const resource of argv.resources as string[]) { + const parts = resource.split(':'); + resources[parts[0]] = parts[1]; + } + + const bundle = new Bundle({ + packageDir: process.cwd(), + copyright: argv.copyright, + entrypoints: argv.entrypoint as string[], + externals: argv.external as string[], + licenses: argv.license as string[], + resources: resources, + dontAttribute: argv['dont-attribute'], + test: argv.test, + }); + + switch (command) { + case 'validate': + const report = bundle.validate(); + if (report.violations.length > 0) { + for (const violation of report.violations) { + console.error(`- ${violation}`); + } + throw new Error('Violations detected (See above)'); + } + break; + case 'pack': + bundle.pack(); + break; + case 'fix': + bundle.fix(); + break; + default: + throw new Error(`Unknown command: ${command}`); + } + + +} + +buildCommands() + .catch((err: Error) => { + console.error(`Error: ${err.message}`); + process.exitCode = 1; + }); diff --git a/tools/@aws-cdk/node-bundle/src/index.ts b/tools/@aws-cdk/node-bundle/src/index.ts index c6847599eecf6..308f5ae158a3a 100644 --- a/tools/@aws-cdk/node-bundle/src/index.ts +++ b/tools/@aws-cdk/node-bundle/src/index.ts @@ -1,2 +1 @@ -export * from './bundle'; -export * from './notice'; \ No newline at end of file +export * from './api'; \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts index c64ce85ffeb7f..7ed2d4b7e64ed 100644 --- a/tools/@aws-cdk/node-bundle/test/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/bundle.test.ts @@ -7,12 +7,13 @@ describe('validate', () => { const bundle = new Bundle({ packageDir: '/Users/epolon/dev/src/github.com/aws/aws-cdk/packages/aws-cdk', copyright: 'AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n', + entrypoints: ['bin/cdk.js', 'lib/plugin.js'], externals: ['fsevents:optional'], dontAttribute: '(^@aws-cdk)', resources: { '../../node_modules/vm2/lib/contextify.js': 'bin/contextify.js', }, - test: '--version', + test: 'bin/cdk --version', }); bundle.pack({ target: process.cwd() }); }, 5 * 60 * 1000); From da16164fcf5ca12b3d4aa6e85d4ee8b98dadd78c Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 10 Feb 2022 20:33:09 +0200 Subject: [PATCH 21/63] mid work --- packages/aws-cdk/package.json | 4 +- tools/@aws-cdk/node-bundle/package.json | 5 +- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 60 ++++----- tools/@aws-cdk/node-bundle/src/api/model.ts | 39 ------ tools/@aws-cdk/node-bundle/src/api/notice.ts | 127 ++++++++++--------- tools/@aws-cdk/pkglint/lib/rules.ts | 63 +-------- 6 files changed, 103 insertions(+), 195 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index fe465f69dfc84..68f1b7d2e9140 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -38,7 +38,9 @@ "../../node_modules/vm2/lib/contextify.js": "bin/contextify.js" }, "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", - "entrypoints": ["bin/cdk.js"], + "entrypoints": [ + "bin/cdk.js" + ], "licenses": [ "Apache-2.0", "MIT", diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 62f5e9de8e0e1..04b5e1892d990 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -1,5 +1,8 @@ { "name": "@aws-cdk/node-bundle", + "bin": { + "node-bundle": "../lib/cli.js" + }, "scripts": { "build": "npx projen build", "bump": "npx projen bump", @@ -59,7 +62,7 @@ "/(test|src)/**/?(*.)+(spec|test).ts?(x)" ], "clearMocks": true, - "collectCoverage": false, + "collectCoverage": true, "coverageReporters": [ "json", "lcov", diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 8ea1efbe86e57..881fd7288ff1a 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -3,8 +3,7 @@ import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; import { NoticeValidationReport } from '.'; -import type { Dependency } from './model'; -import { Notice } from './notice'; +import { Dependency, Notice } from './notice'; import { shell } from './shell'; /** @@ -124,7 +123,7 @@ export class Bundle { */ public validate(): BundleValidationReport { - let circularImports = undefined; + let circularImports: Violation | undefined = undefined; console.log('Validating circular imports'); const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; @@ -134,29 +133,20 @@ export class Bundle { // will offer an async API further down the road. shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); } catch (e: any) { - circularImports = e.stdout.toString(); + circularImports = { message: `Circular imports detected:\n${e.stdout.toString()}` }; } console.log('Validating resources'); - const missingResources = []; - const absoluteResources = []; - for (const [src, dst] of Object.entries(this.resources)) { - if (path.isAbsolute(src)) { - absoluteResources.push(src); - } - if (path.isAbsolute(dst)) { - absoluteResources.push(dst); - } + const missingResources: Violation[] = []; + for (const [src, _] of Object.entries(this.resources)) { if (!fs.existsSync(path.join(this.packageDir, src))) { - missingResources.push(src); + missingResources.push({ message: `Unable to find resource (${src}) relative to the package directory` }); } } console.log('Validating notice'); const noticeReport = this.notice.validate(); - - - return new BundleValidationReport(noticeReport, missingResources, absoluteResources, circularImports); + return new BundleValidationReport(noticeReport, missingResources, circularImports); } public pack(options: BundlePackOptions = {}) { @@ -165,7 +155,7 @@ export class Bundle { const report = this.validate(); if (report.violations.length > 0) { - throw new Error(`Unable to pack due to validation errors.\n\n${report.violations.map(v => ` - ${v}`).join('\n')}`); + throw new Error(`Unable to pack due to validation errors.\n\n${report.violations.map(v => ` - ${v.message}`).join('\n')}`); } if (!fs.existsSync(target)) { @@ -360,6 +350,18 @@ export class Bundle { } } +export interface Violation { + /** + * The violation message. + */ + readonly message: string; + /** + * A fixer function. + * If undefined, this violation cannot be fixed automatically. + */ + readonly fix?: () => void; +} + /** * Validation report. */ @@ -368,7 +370,7 @@ export class BundleValidationReport { /** * All violations of the report. */ - public readonly violations: string[]; + public readonly violations: Violation[]; constructor( /** @@ -378,29 +380,17 @@ export class BundleValidationReport { /** * Resources that could not be located. */ - public readonly missingResources: string[], - - /** - * Resources that are defined with absolute paths. - */ - public readonly absoluteResources: string[], + public readonly missingResources: Violation[], /** * The circular imports violations. */ - public readonly circularImports?: string, + public readonly circularImports?: Violation, ) { - const violations = []; + const violations: Violation[] = []; violations.push(...notice.violations); - - for (const r of missingResources) { - violations.push(`Unable to find resource (${r}) relative to the package directory`); - } - - for (const r of absoluteResources) { - violations.push(`Resource (${r}) should be defined using relative paths to the package directory`); - } + violations.push(...missingResources); if (circularImports) { violations.push(circularImports); diff --git a/tools/@aws-cdk/node-bundle/src/api/model.ts b/tools/@aws-cdk/node-bundle/src/api/model.ts index a75c9908afa2e..e69de29bb2d1d 100644 --- a/tools/@aws-cdk/node-bundle/src/api/model.ts +++ b/tools/@aws-cdk/node-bundle/src/api/model.ts @@ -1,39 +0,0 @@ -/** - * Dependency of a specific package on the local file system. - */ -export interface Dependency { - /** - * Path of the dependency on the local file system. - */ - readonly path: string; - /** - * Dependency name. - */ - readonly name: string; - /** - * Dependency version. - */ - readonly version: string; -} - -/** - * Attribution of a specific dependency. - */ -export interface Attribution { - /** - * Attributed package (name + version) - */ - readonly package: string; - /** - * URL to the package. - */ - readonly url: string; - /** - * Package license. - */ - readonly license?: string; - /** - * Package license content. - */ - readonly licenseText?: string; -} diff --git a/tools/@aws-cdk/node-bundle/src/api/notice.ts b/tools/@aws-cdk/node-bundle/src/api/notice.ts index 5b869b45d0f6c..ce0669aac8fef 100644 --- a/tools/@aws-cdk/node-bundle/src/api/notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/notice.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; import * as path from 'path'; -import type { Dependency, Attribution } from './model'; +import type { Violation } from './bundle'; import { shell } from './shell'; /** @@ -20,6 +20,23 @@ const DEFAULT_VALID_LICENSES = [ */ const FILE_PATH = 'NOTICE'; +/** + * Dependency of a specific package on the local file system. + */ +export interface Dependency { + /** + * Path of the dependency on the local file system. + */ + readonly path: string; + /** + * Dependency name. + */ + readonly name: string; + /** + * Dependency version. + */ + readonly version: string; +} /** * Properties for `Notice`. @@ -34,7 +51,7 @@ export interface NoticeProps { */ readonly dependencies: Dependency[]; /** - * The directory underwhich all dependencies live. + * The parent directory underwhich all dependencies live. */ readonly dependenciesRoot: string; /** @@ -91,11 +108,23 @@ export class Notice { const noticePath = path.join(this.packageDir, FILE_PATH); - const missing = !fs.existsSync(noticePath); + const fix = () => this.flush(); + + const missing = !fs.existsSync(noticePath) ? { message: `${noticePath} is missing`, fix } : undefined; const notice = missing ? undefined : fs.readFileSync(noticePath, { encoding: 'utf-8' }); - const outdated = notice ? notice !== this.content : false; + const outdated = notice && notice !== this.content ? { message: `${noticePath} is outdated`, fix } : undefined; + + const invalidLicense = Array.from(this.attributions.values()) + .filter(a => a.license && !this.validLicenses.includes(a.license.toLowerCase())) + .map(a => ({ message: `Dependency ${a.package} has an invalid license: ${a.license}` })); - const { invalidLicense, noLicense, multiLicense } = this.validateAttributionLicense(this.attributions); + const noLicense = Array.from(this.attributions.values()) + .filter(a => !a.license) + .map(a => ({ message: `Dependency ${a.package} has no license` })); + + const multiLicense = Array.from(this.attributions.values()) + .filter(a => a.license && a.license.split(',').length > 1) + .map(a => ({ message: `Dependency ${a.package} has multiple licenses: ${a.license}` })); return new NoticeValidationReport(multiLicense, noLicense, invalidLicense, missing, outdated); } @@ -165,45 +194,34 @@ export class Notice { }); } - // make sure all attributions have a valid license - const { invalidLicense, noLicense, multiLicense } = this.validateAttributionLicense(attributions); - - const error = []; - - if (invalidLicense.length > 0) { - error.push('Following dependencies have invalid licenses: (either remove them or update the valid licenses list)'); - error.push(invalidLicense.map(a => ` - ${a.package}: ${a.license}`)); - error.push(''); - } - - if (noLicense.length > 0) { - error.push('Following dependencies have no licenses: (remove them)'); - error.push(noLicense.map(a => ` - ${a.package}`)); - error.push(''); - } - - if (multiLicense.length > 0) { - error.push('Following dependencies have multiple licenses: (remove them)'); - error.push(noLicense.map(a => ` - ${a.package}: ${a.license}`)); - error.push(''); - } - - if (error.length > 0) { - throw new Error(`Errors while generating attributions:\n\n${error.join('\n')}`); - } - return attributions; } - private validateAttributionLicense(attributions: Map) { - const invalidLicense = Array.from(attributions.values()).filter(a => a.license && !this.validLicenses.includes(a.license.toLowerCase())); - const noLicense = Array.from(attributions.values()).filter(a => !a.license); - const multiLicense = Array.from(attributions.values()).filter(a => a.license && a.license.split(',').length > 1); - return { invalidLicense, noLicense, multiLicense }; - } +} +/** + * Attribution of a specific dependency. + */ +interface Attribution { + /** + * Attributed package (name + version) + */ + readonly package: string; + /** + * URL to the package. + */ + readonly url: string; + /** + * Package license. + */ + readonly license?: string; + /** + * Package license content. + */ + readonly licenseText?: string; } + /** * Validation report. */ @@ -212,51 +230,42 @@ export class NoticeValidationReport { /** * All violations of the report. */ - public readonly violations: string[]; + public readonly violations: Violation[]; constructor( /** * Attributions that have multiple licenses. */ - public readonly multiLicense: Attribution[], + public readonly multiLicense: Violation[], /** * Attributions that have no license. */ - public readonly noLicense: Attribution[], + public readonly noLicense: Violation[], /** * Attributions that have an invalid license. */ - public readonly invalidLicense: Attribution[], + public readonly invalidLicense: Violation[], /** * Notice file is missing. */ - public readonly missing?: boolean, + public readonly missing?: Violation, /** * Notice file is outdated. */ - public readonly outdated?: boolean, + public readonly outdated?: Violation, ) { - const violations = []; - - for (const attr of invalidLicense ?? []) { - violations.push(`Dependency ${attr.package} has an invalid license: ${attr.license}`); - } + const violations: Violation[] = []; - for (const attr of noLicense ?? []) { - violations.push(`Dependency ${attr.package} has no license`); - } - - for (const attr of multiLicense ?? []) { - violations.push(`Dependency ${attr.package} has multiple licenses: ${attr.license}`); - } + violations.push(...invalidLicense); + violations.push(...noLicense); + violations.push(...invalidLicense); if (missing) { - violations.push(`${FILE_PATH} is missing`); + violations.push(missing); } - if (outdated) { - violations.push(`${FILE_PATH} is outdated`); + violations.push(outdated); } this.violations = violations; diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index e78fd26dfc3ab..0a9cec3a2bae8 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -239,68 +239,11 @@ export class BundledCLI extends ValidationRule { */ private validateBundle(pkg: PackageJson, bundleProps: any) { - // now lets validate the bundle itself const bundle = new Bundle({ packageDir: pkg.packageRoot, ...bundleProps }); - const violations = bundle.validate(); + const report = bundle.validate(); - if (violations.circularImports) { - pkg.report({ - message: `Circular imports detected:\n\n${violations.circularImports}`, - ruleName: `${this.name}/circular-imports` - }) - } - - for (const attr of violations.notice.invalidLicense) { - pkg.report({ - message: `Dependency ${attr.package} has an invalid license: ${attr.license}`, - ruleName: `${this.name}/invalid-dependency-license` - }) - } - - for (const attr of violations.notice.noLicense) { - pkg.report({ - message: `Dependency ${attr.package} has no license`, - ruleName: `${this.name}/missing-dependency-license` - }) - } - - for (const attr of violations.notice.multiLicense) { - pkg.report({ - message: `Dependency ${attr.package} has multiple licenses: ${attr.license}`, - ruleName: `${this.name}/multiple-dependency-license` - }) - } - - for (const resource of violations.missingResources) { - pkg.report({ - message: `Resource "${resource}" cannot be located relative to the package directory`, - ruleName: `${this.name}/missing-resource` - }) - } - - for (const resource of violations.absoluteResources) { - pkg.report({ - message: `Resource "${resource}" should be defined using relative paths to the package directory`, - ruleName: `${this.name}/absolute-resource` - }) - } - - const fix = () => bundle.fix(); - - if (violations.notice.missing) { - pkg.report({ - message: `NOTICE file is missing`, - ruleName: `${this.name}/missing-notice`, - fix, - }) - } - - if (violations.notice.outdated) { - pkg.report({ - message: `NOTICE file is outdated`, - ruleName: `${this.name}/outdated-notice`, - fix, - }) + for (const violation of report.violations) { + pkg.report({ message: violation.message, ruleName: this.name, fix: violation.fix }) } } From c529c2c15d358d86df1e51de8e700b74ecd20129 Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 13:41:31 +0200 Subject: [PATCH 22/63] mid work --- packages/aws-cdk/NOTICE | 62 +++- packages/aws-cdk/bin/cdk.ts | 4 +- packages/aws-cdk/package.json | 3 - tools/@aws-cdk/node-bundle/.gitignore | 1 + tools/@aws-cdk/node-bundle/.projen/tasks.json | 3 + tools/@aws-cdk/node-bundle/.projenrc.js | 7 +- tools/@aws-cdk/node-bundle/README.md | 132 +++++-- tools/@aws-cdk/node-bundle/bin/node-bundle | 2 + tools/@aws-cdk/node-bundle/package.json | 2 +- .../src/api/{notice.ts => _notice.ts} | 118 +++---- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 329 +++++++++--------- tools/@aws-cdk/node-bundle/src/api/index.ts | 2 +- tools/@aws-cdk/node-bundle/src/api/model.ts | 0 .../@aws-cdk/node-bundle/src/api/violation.ts | 84 +++++ tools/@aws-cdk/node-bundle/src/cli.ts | 38 +- tools/@aws-cdk/node-bundle/test/_package.ts | 163 +++++++++ .../node-bundle/test/api/bundle.test.ts | 107 ++++++ .../@aws-cdk/node-bundle/test/bundle.test.ts | 21 -- tools/@aws-cdk/node-bundle/test/cli.test.ts | 122 +++++++ tools/@aws-cdk/pkglint/lib/rules.ts | 18 +- 20 files changed, 894 insertions(+), 324 deletions(-) create mode 100755 tools/@aws-cdk/node-bundle/bin/node-bundle rename tools/@aws-cdk/node-bundle/src/api/{notice.ts => _notice.ts} (71%) delete mode 100644 tools/@aws-cdk/node-bundle/src/api/model.ts create mode 100644 tools/@aws-cdk/node-bundle/src/api/violation.ts create mode 100644 tools/@aws-cdk/node-bundle/test/_package.ts create mode 100644 tools/@aws-cdk/node-bundle/test/api/bundle.test.ts delete mode 100644 tools/@aws-cdk/node-bundle/test/bundle.test.ts create mode 100644 tools/@aws-cdk/node-bundle/test/cli.test.ts diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE index 3fa8103b7e699..63cd0fc7ae82f 100644 --- a/packages/aws-cdk/NOTICE +++ b/packages/aws-cdk/NOTICE @@ -250,7 +250,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------- -** @jsii/check-node@1.52.1 - https://www.npmjs.com/package/@jsii/check-node/v/1.52.1 | Apache-2.0 +** @jsii/check-node@1.53.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.53.0 | Apache-2.0 Apache License Version 2.0, January 2004 @@ -456,7 +456,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------- -** aws-sdk@2.1068.0 - https://www.npmjs.com/package/aws-sdk/v/2.1068.0 | Apache-2.0 +** aws-sdk@2.1072.0 - https://www.npmjs.com/package/aws-sdk/v/2.1072.0 | Apache-2.0 Apache License Version 2.0, January 2004 @@ -1855,7 +1855,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------- -** socks@2.6.1 - https://www.npmjs.com/package/socks/v/2.6.1 | MIT +** socks@2.6.2 - https://www.npmjs.com/package/socks/v/2.6.2 | MIT The MIT License (MIT) Copyright (c) 2013 Josh Glazebrook @@ -2026,7 +2026,59 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------- -** vm2@3.9.5 - https://www.npmjs.com/package/vm2/v/3.9.5 | MIT +** vm2@3.9.6 - https://www.npmjs.com/package/vm2/v/3.9.6 | MIT + + +--------------- + +** acorn@8.7.0 - https://www.npmjs.com/package/acorn/v/8.7.0 | MIT +MIT License + +Copyright (C) 2012-2020 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------- + +** acorn-walk@8.2.0 - https://www.npmjs.com/package/acorn-walk/v/8.2.0 | MIT +MIT License + +Copyright (C) 2012-2020 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. --------------- @@ -2413,7 +2465,7 @@ SOFTWARE. --------------- -** minimatch@3.0.4 - https://www.npmjs.com/package/minimatch/v/3.0.4 | ISC +** minimatch@3.0.5 - https://www.npmjs.com/package/minimatch/v/3.0.5 | ISC The ISC License Copyright (c) Isaac Z. Schlueter and Contributors diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 040b13ff04697..55a8a74296b52 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -202,10 +202,10 @@ async function parseCommandLineArguments() { .option('list', { type: 'boolean', desc: 'List the available templates' }) .option('generate-only', { type: 'boolean', default: false, desc: 'If true, only generates project files, without executing additional operations such as setting up a git repo, installing dependencies or compiling the project' }), ) - .command('context', 'Manage cached context values', yargs => yargs + .command('context', 'Manage cached context values', (yargs: Argv) => yargs .option('reset', { alias: 'e', desc: 'The context key (or its index) to reset', type: 'string', requiresArg: true }) .option('clear', { desc: 'Clear all context', type: 'boolean' })) - .command(['docs', 'doc'], 'Opens the reference documentation in a browser', yargs => yargs + .command(['docs', 'doc'], 'Opens the reference documentation in a browser', (yargs: Argv) => yargs .option('browser', { alias: 'b', desc: 'the command to use to open the browser, using %u as a placeholder for the path of the file to open', diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 1c76cb6a8ee3d..ea6a896a1c88a 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -34,9 +34,6 @@ "externals": [ "fsevents:optional" ], - "resources": { - "../../node_modules/vm2/lib/contextify.js": "bin/contextify.js" - }, "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", "entrypoints": [ "bin/cdk.js" diff --git a/tools/@aws-cdk/node-bundle/.gitignore b/tools/@aws-cdk/node-bundle/.gitignore index 84f9bab1734dc..234833f66b4f5 100644 --- a/tools/@aws-cdk/node-bundle/.gitignore +++ b/tools/@aws-cdk/node-bundle/.gitignore @@ -42,3 +42,4 @@ junit.xml /lib /dist/ !/.eslintrc.json +.vscode/ diff --git a/tools/@aws-cdk/node-bundle/.projen/tasks.json b/tools/@aws-cdk/node-bundle/.projen/tasks.json index 15ccdccc2449f..d7116b9a1028a 100644 --- a/tools/@aws-cdk/node-bundle/.projen/tasks.json +++ b/tools/@aws-cdk/node-bundle/.projen/tasks.json @@ -163,6 +163,9 @@ "name": "test", "description": "Run tests", "steps": [ + { + "spawn": "compile" + }, { "exec": "jest --passWithNoTests --all --updateSnapshot" }, diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js index 1f538cd8713ec..1a2b16809e348 100644 --- a/tools/@aws-cdk/node-bundle/.projenrc.js +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -15,10 +15,15 @@ const project = new typescript.TypeScriptProject({ 'shlex', ], bin: { - 'node-bundle': '../lib/cli.js', + 'node-bundle': 'bin/node-bundle', }, // required by projen even though 'github' is false. defaultReleaseBranch: 'main', }); + +project.gitignore.exclude('.vscode/'); + +// needed for CLI tests to run +project.testTask.prependSpawn(project.compileTask); project.synth(); \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 88dc1d647fe2d..3b8a00419b3b1 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -1,55 +1,133 @@ # node-bundle - +Create bundled packages with zero dependencies and appropriate license attributions. ## Why -We created this tool as a way to bundle up dependencies so that users always consume +When shipping nodejs applications, there is currently no easy way to ensure your users are +consuming the exact dependency clojure your package was tested against. -## How +This is because many libraries define their dependencies with a range, rather then a fixed version. +NPM has provided an install time lock file called [shrinkwrap](https://docs.npmjs.com/cli/v8/commands/npm-shrinkwrap) +to mitigate this, however, this file is only respected by NPM itself, and not by other package managers such as Yarn. -```console -npm install node-bundle -``` +## What + +This package wires up several popular tools to offer a simple entrypoint for +creating self-contained nodejs packages. + +The resulting packages are still npm installable packages, but the entrypoints you specify are +replaced with a bundled version of them, embedding all their dependencies inline. +Note that embedding dependencies means you are effectively redistributing third-party software. +This has legal implications, since it requires proper attribution +of those dependencies, validating their licenses allow such redistribution. + +This tool takes care of all that: + +- Bundle dependencies inside the package. + + > This is currently done with [esbuild](), but is subject to change. + +- Validate and create NOTICE files with complete third-party attributions. + + > This is currently done with [license-checker](https://www.npmjs.com/package/license-checker), but is subject to change. + +- Enforce no circular imports are exhibited in your package, nor in your dependency clojure. + + > This is currently done with [madge](https://www.npmjs.com/package/madge), but is subject to change. + +## Alternative Approaches + +We considered two other alternatives before eventually going down this route: + +### Bundled Dependencies + +Aside from a shrinkwrap file, NPM also offers a feature called `bundledDependencies` +to vendor in your dependencies inside the `node_modules` directory of your package. -### Command Line +> See [bundledDependencies](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#bundleddependencies) -The following options must be passed to any command: +While this approach seems to be supported across all package managers, that won't be +the case for Yarn 2.x and above, or more concretely, +for the [Plug'n'Play](https://yarnpkg.com/features/pnp) feature. + +> See [dont use bundled dependencies](https://yarnpkg.com/getting-started/migration#dont-use-bundledependencies) + +### Static Binaries + +Another option would have been to produce platform specific static binaries that embed both +dependencies as well as a node runtime. + +This approach is valid, but really depends on the use case. For example if you need your package +to still be installable by npm, it doesn't really fit. Also, it's not relevant for libraries, +only CLI applications. + +## How + +Run the tool from the root directory of your package. ```console +Usage: node-bundle COMMAND + +Commands: + node-bundle validate Validate the package is ready for bundling + node-bundle pack Create the tarball + node-bundle fix Fix whatever we can for bundling + Options: - --copyright [string] [required] + --entrypoint List of entrypoints to bundle [array] [required] + --copyright Copyright statement to be added to the notice file + [string] [required] --external Packages in this list will be excluded from the bundle and - added as dependencies (example: "fsevents:optional") [array] - --licenses List of valid licenses [array] - --resources List of resources to be explicitly copied to the bundle - (example: - "node_modules/proxy-agent/contextify.js:bin/contextify.js)" - [array] + added as dependencies (example: fsevents:optional) + [array] [default: []] + --license List of valid licenses [array] [default: []] + --resource List of resources that need to be explicitly copied to the + bundle (example: + node_modules/proxy-agent/contextify.js:bin/contextify.js) + [array] [default: []] --dont-attribute Dependencies matching this regular expressions wont be added to the notice file [string] --test Validation command to sanity test the bundle after its created [string] + --help Show help [boolean] + --version Show version number [boolean] ``` -#### validate +You can also use the programmatic access: -```console -node-bundle validate -``` +```ts +import { Bundle } from '@aws-cdk/node-bundle'; -#### pack +const bundle = new Bundle({ + packageDir: process.cwd(), + copyright: 'Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.', + entrypoints: ['lib/cli.js'], + licenses: ['Apache-2.0', 'MIT'], +}); -```console -node-bundle pack +bundle.pack(); ``` -#### fix +## Caveats -```console -node-bundle fix -``` +Bundling a package has implications on the API exposed from the package. +For pure CLI applications that don't export anything, this shouldn't be a problem. + +However, if you are bundling either a library, or a CLI that is being consumed +as library as well, things can start to break. + +This tool does preserve all original code and structure, so all your imports +will still be available for consumers, but: +1. The dependencies of those imports won't be available anymore. This means your +consumers are now responsible for installing those on their own. To mitigate this, +you can bundle up the files being imported as well (using additional entrypoints), +but bear in mind this will significantly ballon the package size. +2. If your bundled entrypoint can accept external types, and you perform type checks +on them using things like `instanceof`, these will fail because these +types are now completely foreign to your bundle. -### Programatic +In general, this tool was designed for command line applications, if your CLI is also +used as library, strongly consider extracting the library parts to a separate package. \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/bin/node-bundle b/tools/@aws-cdk/node-bundle/bin/node-bundle new file mode 100755 index 0000000000000..59778c0fca570 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/bin/node-bundle @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('../lib/cli.js'); diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 04b5e1892d990..f91e59ceae342 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@aws-cdk/node-bundle", "bin": { - "node-bundle": "../lib/cli.js" + "node-bundle": "bin/node-bundle" }, "scripts": { "build": "npx projen build", diff --git a/tools/@aws-cdk/node-bundle/src/api/notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts similarity index 71% rename from tools/@aws-cdk/node-bundle/src/api/notice.ts rename to tools/@aws-cdk/node-bundle/src/api/_notice.ts index ce0669aac8fef..0095bb324e186 100644 --- a/tools/@aws-cdk/node-bundle/src/api/notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import type { Violation } from './bundle'; import { shell } from './shell'; +import { Violation, ViolationType, ViolationsReport } from './violation'; /** * Valid licenses that are ok to redistribute. @@ -104,29 +104,42 @@ export class Notice { * * This method never throws. The Caller is responsible for inspecting the report returned and act accordinagly. */ - public validate(): NoticeValidationReport { + public validate(): ViolationsReport { + const violations = []; const noticePath = path.join(this.packageDir, FILE_PATH); const fix = () => this.flush(); - const missing = !fs.existsSync(noticePath) ? { message: `${noticePath} is missing`, fix } : undefined; + const missing: Violation | undefined = !fs.existsSync(noticePath) ? { type: ViolationType.MISSING_NOTICE, message: `${FILE_PATH} is missing`, fix } : undefined; const notice = missing ? undefined : fs.readFileSync(noticePath, { encoding: 'utf-8' }); - const outdated = notice && notice !== this.content ? { message: `${noticePath} is outdated`, fix } : undefined; + const outdated: Violation | undefined = notice !== undefined && notice !== this.content ? { type: ViolationType.OUTDATED_NOTICE, message: `${FILE_PATH} is outdated`, fix } : undefined; - const invalidLicense = Array.from(this.attributions.values()) - .filter(a => a.license && !this.validLicenses.includes(a.license.toLowerCase())) - .map(a => ({ message: `Dependency ${a.package} has an invalid license: ${a.license}` })); + const invalidLicense: Violation[] = Array.from(this.attributions.values()) + .filter(a => a.licenses.length === 1 && !this.validLicenses.includes(a.licenses[0].toLowerCase())) + .map(a => ({ type: ViolationType.INVALID_LICENSE, message: `Dependency ${a.package} has an invalid license: ${a.licenses[0]}` })); - const noLicense = Array.from(this.attributions.values()) - .filter(a => !a.license) - .map(a => ({ message: `Dependency ${a.package} has no license` })); + const noLicense: Violation[] = Array.from(this.attributions.values()) + .filter(a => a.licenses.length === 0) + .map(a => ({ type: ViolationType.NO_LICENSE, message: `Dependency ${a.package} has no license` })); - const multiLicense = Array.from(this.attributions.values()) - .filter(a => a.license && a.license.split(',').length > 1) - .map(a => ({ message: `Dependency ${a.package} has multiple licenses: ${a.license}` })); + const multiLicense: Violation[] = Array.from(this.attributions.values()) + .filter(a => a.licenses.length > 1) + .map(a => ({ type: ViolationType.MULTIPLE_LICENSE, message: `Dependency ${a.package} has multiple licenses: ${a.licenses}` })); - return new NoticeValidationReport(multiLicense, noLicense, invalidLicense, missing, outdated); + if (missing) { + violations.push(missing); + } + + if (outdated) { + violations.push(outdated); + } + + violations.push(...invalidLicense); + violations.push(...noLicense); + violations.push(...multiLicense); + + return new ViolationsReport(violations); } /** @@ -148,7 +161,7 @@ export class Notice { const separator = `\n${'-'.repeat(15)}\n`; for (const attr of attributions.values()) { - notice.push(`** ${attr.package} - ${attr.url} | ${attr.license}`); + notice.push(`** ${attr.package} - ${attr.url} | ${attr.licenses[0]}`); notice.push(attr.licenseText ?? ''); notice.push(separator); } @@ -159,15 +172,21 @@ export class Notice { private generateAttributions(): Map { + if (this.dependencies.length === 0) { + return new Map(); + } + const attributions: Map = new Map(); const pkg = (d: Dependency) => `${d.name}@${d.version}`; const packages = this.dependencies.map(d => pkg(d)).join(';'); - const output = shell(`${require.resolve('license-checker/bin/license-checker')} --json --packages "${packages}"`, { - cwd: this.dependenciesRoot, - quiet: true, - }); + + // we don't use the programmatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + const command = `${require.resolve('license-checker/bin/license-checker')} --json --packages "${packages}"`; + const output = shell(command, { cwd: this.dependenciesRoot, quiet: true }); const infos = JSON.parse(output); for (const dep of this.dependencies) { @@ -186,10 +205,14 @@ export class Notice { // note that a non existing license file is ok as long as the license type could be extracted. const licenseFile = info.licenseFile?.toLowerCase().endsWith('.md') ? undefined : info.licenseFile; + // the licenses key comes in different types but we convert it here + // to always be an array. + const licenses = !info.licenses ? undefined : (Array.isArray(info.licenses) ? info.licenses : [info.licenses]); + attributions.set(key, { package: key, url: `https://www.npmjs.com/package/${dep.name}/v/${dep.version}`, - license: info.licenses, + licenses, licenseText: (licenseFile && fs.existsSync(licenseFile)) ? fs.readFileSync(licenseFile, { encoding: 'utf-8' }) : undefined, }); } @@ -214,62 +237,9 @@ interface Attribution { /** * Package license. */ - readonly license?: string; + readonly licenses: string[]; /** * Package license content. */ readonly licenseText?: string; } - - -/** - * Validation report. - */ -export class NoticeValidationReport { - - /** - * All violations of the report. - */ - public readonly violations: Violation[]; - - constructor( - /** - * Attributions that have multiple licenses. - */ - public readonly multiLicense: Violation[], - /** - * Attributions that have no license. - */ - public readonly noLicense: Violation[], - /** - * Attributions that have an invalid license. - */ - public readonly invalidLicense: Violation[], - /** - * Notice file is missing. - */ - public readonly missing?: Violation, - /** - * Notice file is outdated. - */ - public readonly outdated?: Violation, - ) { - - const violations: Violation[] = []; - - violations.push(...invalidLicense); - violations.push(...noLicense); - violations.push(...invalidLicense); - - if (missing) { - violations.push(missing); - } - if (outdated) { - violations.push(outdated); - } - - this.violations = violations; - - } - -} diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 881fd7288ff1a..7817dfb9a015d 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -2,9 +2,9 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import { NoticeValidationReport } from '.'; -import { Dependency, Notice } from './notice'; +import { Dependency, Notice } from './_notice'; import { shell } from './shell'; +import { Violation, ViolationType, ViolationsReport } from './violation'; /** * Bundling properties. @@ -117,45 +117,28 @@ export class Bundle { } /** - * Validate the current notice file. + * Validate the bundle for violations. * - * This method never throws. The Caller is responsible for inspecting the report returned and act accordinagly. + * This method never throws. The Caller is responsible for inspecting the + * returned report and act accordinagly. */ - public validate(): BundleValidationReport { - - let circularImports: Violation | undefined = undefined; - - console.log('Validating circular imports'); - const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; - try { - // we don't use the programatic API since it only offers an async API. - // prefer to stay sync for now since its easier to integrate with other tooling. - // will offer an async API further down the road. - shell(`${require.resolve('madge/bin/cli.js')} --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`, { quiet: true }); - } catch (e: any) { - circularImports = { message: `Circular imports detected:\n${e.stdout.toString()}` }; - } - - console.log('Validating resources'); - const missingResources: Violation[] = []; - for (const [src, _] of Object.entries(this.resources)) { - if (!fs.existsSync(path.join(this.packageDir, src))) { - missingResources.push({ message: `Unable to find resource (${src}) relative to the package directory` }); - } - } - - console.log('Validating notice'); - const noticeReport = this.notice.validate(); - return new BundleValidationReport(noticeReport, missingResources, circularImports); + public validate(): ViolationsReport { + const circularImports = this.validateCircularImports(); + const resources = this.validateResources(); + const notice = this.validateNotice(); + return new ViolationsReport([...circularImports, ...resources, ...notice]); } + /** + * Create the final npm package. + */ public pack(options: BundlePackOptions = {}) { const target = options.target ?? this.packageDir; const report = this.validate(); - if (report.violations.length > 0) { - throw new Error(`Unable to pack due to validation errors.\n\n${report.violations.map(v => ` - ${v.message}`).join('\n')}`); + if (!report.success) { + throw new Error(`Unable to pack due to validation errors.\n\n${report.violations.map(v => ` - ${v.type}: ${v.message}`).join('\n')}`); } if (!fs.existsSync(target)) { @@ -170,82 +153,44 @@ export class Bundle { console.log('Creating package'); - const workdir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); + const workDir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); try { - fs.copySync(this.packageDir, workdir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); - - const bundleManifest = { ...this.manifest }; - - // move all 'dependencies' to 'devDependencies' so that npm doesn't install anything when consuming - // external ones should be kept as is. - for (const [d, v] of Object.entries(this.manifest.dependencies)) { - bundleManifest.devDependencies[d] = v; - delete bundleManifest.dependencies[d]; - } - - // external dependencies should be specified as runtime dependencies - for (const external of this.externals) { - - const parts = external.split(':'); - const name = parts[0]; - const type = parts[1]; - const paths = this.findPackages(name); - if (paths.length === 0) { - throw new Error(`Unable to locate external dependency: ${name}`); - } - if (paths.length > 1) { - throw new Error(`Found multiple paths for external dependency (${name}): ${paths.join(' | ')}`); - } - const dependency = this.createDependency(paths[0]); - - switch (type) { - case 'optional': - bundleManifest.optionalDependencies = bundleManifest.optionalDependencies ?? {}; - bundleManifest.optionalDependencies[dependency.name] = dependency.version; - break; - case 'peer': - bundleManifest.peerDependencies = bundleManifest.peerDependencies ?? {}; - bundleManifest.peerDependencies[dependency.name] = dependency.version; - break; - case '': - bundleManifest.dependencies = bundleManifest.dependencies ?? {}; - bundleManifest.dependencies[dependency.name] = dependency.version; - break; - default: - throw new Error(`Unsupported dependency type '${type}' for external dependency '${name}'`); - } - } + fs.copySync(this.packageDir, workDir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); - fs.writeFileSync(path.join(workdir, 'package.json'), JSON.stringify(bundleManifest, null, 2)); + // clone the original manifest since we are going to + // to mutate it. + const manifest = { ...this.manifest }; - console.log('Writing output files'); - for (const output of this.bundle.outputFiles ?? []) { - const out = output.path.replace(this.packageDir, workdir); - console.log(` - ${out}`); - fs.writeFileSync(out, output.contents); - } + this.removeDependencies(manifest); + this.addExternals(manifest); + this.writeOutputs(workDir); + this.writeResources(workDir); - console.log('Copying resources'); - for (const [src, dst] of Object.entries(this.resources)) { - fs.copySync(path.join(this.packageDir, src), path.join(workdir, dst), { recursive: true }); - } + fs.writeFileSync(path.join(workDir, 'package.json'), JSON.stringify(manifest, null, 2)); if (this.test) { - shell(`${path.join(workdir, this.test)}`, { cwd: workdir }); + shell(`${path.join(workDir, this.test)}`, { cwd: workDir }); } // create the tarball - const tarball = shell('npm pack', { quiet: true, cwd: workdir }).trim(); - fs.copySync(path.join(workdir, tarball), path.join(target, tarball), { recursive: true }); + const tarball = shell('npm pack', { quiet: true, cwd: workDir }).trim(); + fs.copySync(path.join(workDir, tarball), path.join(target, tarball), { recursive: true }); } finally { - // fs.removeSync(workdir); + fs.removeSync(workDir); } } + /** + * Fix any fixable violations. + */ public fix() { - console.log('Generating notice file'); - this.notice.flush(); + const violations = this.validate(); + for (const violation of violations.violations) { + if (violation.fix) { + violation.fix(); + } + } } private get bundle(): esbuild.BuildResult { @@ -261,7 +206,7 @@ export class Bundle { return this._dependencies; } const inputs = Object.keys(this.bundle.metafile!.inputs); - const packages = new Set(Array.from(inputs).map(i => this.findPackagePath(i))); + const packages = new Set(Array.from(inputs).map(i => this.closestPackage(path.join(this.packageDir, i)))); this._dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); return this._dependencies; } @@ -270,22 +215,11 @@ export class Bundle { if (this._dependenciesRoot) { return this._dependenciesRoot; } - this._dependenciesRoot = lcp(this.dependencies.map(d => d.path)); + const lcp = longestCommonParent(this.dependencies.map(d => d.path)); + this._dependenciesRoot = this.closestPackage(lcp); return this._dependenciesRoot; } - private findPackages(name: string): string[] { - - const paths: string[] = []; - walkDir(this.dependenciesRoot, (file: string) => { - if (file.endsWith(`node_modules/${name}`)) { - paths.push(file); - } - }); - - return paths; - } - private get notice(): Notice { if (this._notice) { return this._notice; @@ -301,20 +235,29 @@ export class Bundle { return this._notice; } - private findPackagePath(inputFile: string): string { + private findPackages(name: string): string[] { - function findPackagePathUp(dirname: string): string { - const manifestPath = path.join(dirname, 'package.json'); - if (fs.existsSync(manifestPath)) { - return dirname; - } - if (path.dirname(dirname) === dirname) { - throw new Error('Unable to find package manifest'); + const paths: string[] = []; + walkDir(this.dependenciesRoot, (file: string) => { + if (file.endsWith(`node_modules/${name}`)) { + paths.push(file); } - return findPackagePathUp(path.dirname(dirname)); + }); + + return paths; + } + + private closestPackage(fdp: string): string { + + if (fs.existsSync(path.join(fdp, 'package.json'))) { + return fdp; + } + + if (path.dirname(fdp) === fdp) { + throw new Error('Unable to find package manifest'); } - return findPackagePathUp(path.resolve(this.packageDir, path.dirname(inputFile))); + return this.closestPackage(path.dirname(fdp)); } private createDependency(packageDir: string): Dependency { @@ -348,70 +291,122 @@ export class Bundle { return bundle; } -} -export interface Violation { - /** - * The violation message. - */ - readonly message: string; - /** - * A fixer function. - * If undefined, this violation cannot be fixed automatically. - */ - readonly fix?: () => void; -} + private validateCircularImports(): Violation[] { + console.log('Validating circular imports'); + const violations: Violation[] = []; + const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; + try { + // we don't use the programmatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + const command = `${require.resolve('madge/bin/cli.js')} --json --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`; + shell(command, { quiet: true }); + } catch (e: any) { + const imports: string[][] = JSON.parse(e.stdout.toString().trim()); + for (const imp of imports) { + violations.push({ type: ViolationType.CIRCULAR_IMPORT, message: `${imp.join(' -> ')}` }); + } + } -/** - * Validation report. - */ -export class BundleValidationReport { + return violations; + } - /** - * All violations of the report. - */ - public readonly violations: Violation[]; - - constructor( - /** - * The NOTICE file validation report. - */ - public readonly notice: NoticeValidationReport, - /** - * Resources that could not be located. - */ - public readonly missingResources: Violation[], - /** - * The circular imports violations. - */ - public readonly circularImports?: Violation, - ) { + private validateResources(): Violation[] { + console.log('Validating resources'); + const violations = []; + for (const [src, _] of Object.entries(this.resources)) { + if (!fs.existsSync(path.join(this.packageDir, src))) { + violations.push({ + type: ViolationType.MISSING_RESOURCE, + message: `Unable to find resource (${src}) relative to the package directory`, + }); + } + } + return violations; + } - const violations: Violation[] = []; + private validateNotice(): Violation[] { + console.log('Validating notice'); + return this.notice.validate().violations; + } - violations.push(...notice.violations); - violations.push(...missingResources); + private addExternals(manifest: any) { - if (circularImports) { - violations.push(circularImports); + // external dependencies should be specified as runtime dependencies + for (const external of this.externals) { + + const parts = external.split(':'); + const name = parts[0]; + const type = parts[1]; + const paths = this.findPackages(name); + if (paths.length === 0) { + throw new Error(`Unable to locate external dependency: ${name}`); + } + if (paths.length > 1) { + throw new Error(`Found multiple paths for external dependency (${name}): ${paths.join(' | ')}`); + } + const dependency = this.createDependency(paths[0]); + + switch (type) { + case 'optional': + manifest.optionalDependencies = manifest.optionalDependencies ?? {}; + manifest.optionalDependencies[dependency.name] = dependency.version; + break; + case 'peer': + manifest.peerDependencies = manifest.peerDependencies ?? {}; + manifest.peerDependencies[dependency.name] = dependency.version; + break; + case '': + manifest.dependencies = manifest.dependencies ?? {}; + manifest.dependencies[dependency.name] = dependency.version; + break; + default: + throw new Error(`Unsupported dependency type '${type}' for external dependency '${name}'`); + } + } + + } + + private removeDependencies(manifest: any) { + for (const [d, v] of Object.entries(this.manifest.dependencies)) { + manifest.devDependencies = manifest.devDependencies ?? {}; + manifest.devDependencies[d] = v; + delete manifest.dependencies[d]; } + } - this.violations = violations; + private writeOutputs(workDir: string) { + console.log('Writing output files'); + for (const output of this.bundle.outputFiles ?? []) { + const out = output.path.replace(this.packageDir, workDir); + console.log(` - ${out}`); + fs.writeFileSync(out, output.contents); + } + } + private writeResources(workdir: string) { + console.log('Copying resources'); + for (const [src, dst] of Object.entries(this.resources)) { + fs.copySync(path.join(this.packageDir, src), path.join(workdir, dst), { recursive: true }); + } } } -function lcp(strs: string[]) { - let prefix = ''; - if (strs === null || strs.length === 0) return prefix; - for (let i = 0; i < strs[0].length; i++) { - const char = strs[0][i]; - for (let j = 1; j < strs.length; j++) { - if (strs[j][i] !== char) return prefix; +function longestCommonParent(paths: string[]) { + + function _longestCommonParent(p1: string, p2: string): string { + const dirs1 = p1.split(path.sep); + const dirs2 = p2.split(path.sep); + const parent = []; + for (let i = 0; i < Math.min(dirs1.length, dirs2.length); i++) { + if (dirs1[i] !== dirs2[i]) break; + parent.push(dirs1[i]); } - prefix = prefix + char; + return parent.join(path.sep); } - return prefix; + + return paths.reduce(_longestCommonParent); } function walkDir(dir: string, handler: (file: string) => void) { diff --git a/tools/@aws-cdk/node-bundle/src/api/index.ts b/tools/@aws-cdk/node-bundle/src/api/index.ts index c6847599eecf6..716f23273e5c2 100644 --- a/tools/@aws-cdk/node-bundle/src/api/index.ts +++ b/tools/@aws-cdk/node-bundle/src/api/index.ts @@ -1,2 +1,2 @@ export * from './bundle'; -export * from './notice'; \ No newline at end of file +export * from './violation'; \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/api/model.ts b/tools/@aws-cdk/node-bundle/src/api/model.ts deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/tools/@aws-cdk/node-bundle/src/api/violation.ts b/tools/@aws-cdk/node-bundle/src/api/violation.ts new file mode 100644 index 0000000000000..09e35e0787da7 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/src/api/violation.ts @@ -0,0 +1,84 @@ +/** + * Violation types. + */ +export enum ViolationType { + + /** + * Circular import on the package or one of its dependencies. + */ + CIRCULAR_IMPORT = 'circular-import', + + /** + * Outdated notice file. + */ + OUTDATED_NOTICE = 'outdated-notice', + + /** + * Missing notice file. + */ + MISSING_NOTICE = 'missing-notice', + + /** + * Invalid license. + */ + INVALID_LICENSE = 'invalid-license', + + /** + * No license. + */ + NO_LICENSE = 'no-license', + + /** + * Multiple licenses. + */ + MULTIPLE_LICENSE = 'multiple-license', + + /** + * Missing resource file. + */ + MISSING_RESOURCE = 'missing-resource', + +} + +/** + * A validation violation. + */ +export interface Violation { + /** + * The violation type. + */ + readonly type: ViolationType; + /** + * The violation message. + */ + readonly message: string; + /** + * A fixer function. + * If undefined, this violation cannot be fixed automatically. + */ + readonly fix?: () => void; +} + +/** + * Report encapsulating a list of violations. + */ +export class ViolationsReport { + + constructor(private readonly _violations: Violation[]) {} + + /** + * The list of violations. + */ + public get violations(): Violation[] { + // return a copy so the report cannot be mutated. + return [...this._violations]; + } + + /** + * True when no violations exist. False otherwise. + */ + public get success(): boolean { + return this.violations.length === 0; + } + +} diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index b0120e40c0c7d..bac3d2682ddf7 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as fs from 'fs-extra'; import * as yargs from 'yargs'; -import { Bundle } from './api'; +import { Bundle, BundleProps } from './api'; function versionNumber(): string { return fs.readJSONSync(path.join(__dirname, '..', 'package.json')).version; @@ -15,7 +15,7 @@ async function buildCommands() { .option('copyright', { type: 'string', desc: 'Copyright statement to be added to the notice file', demandOption: true }) .option('external', { type: 'array', nargs: 1, default: [], desc: 'Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional)' }) .option('license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) - .option('resources', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) + .option('resource', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) .option('dont-attribute', { type: 'string', desc: 'Dependencies matching this regular expressions wont be added to the notice file' }) .option('test', { type: 'string', desc: 'Validation command to sanity test the bundle after its created' }) .command('validate', 'Validate the package is ready for bundling') @@ -27,12 +27,12 @@ async function buildCommands() { const command = argv._[0]; const resources: any = {}; - for (const resource of argv.resources as string[]) { + for (const resource of argv.resource as string[]) { const parts = resource.split(':'); resources[parts[0]] = parts[1]; } - const bundle = new Bundle({ + const props: BundleProps = { packageDir: process.cwd(), copyright: argv.copyright, entrypoints: argv.entrypoint as string[], @@ -41,29 +41,39 @@ async function buildCommands() { resources: resources, dontAttribute: argv['dont-attribute'], test: argv.test, - }); + }; + + const bundle = new Bundle(props); switch (command) { case 'validate': - const report = bundle.validate(); - if (report.violations.length > 0) { - for (const violation of report.violations) { - console.error(`- ${violation}`); - } - throw new Error('Violations detected (See above)'); - } + validate(bundle); break; case 'pack': - bundle.pack(); + pack(bundle); break; case 'fix': - bundle.fix(); + fix(bundle); break; default: throw new Error(`Unknown command: ${command}`); } +} +function validate(bundle: Bundle) { + const report = bundle.validate(); + if (!report.success) { + const violations = report.violations.map(v => `- ${v.type}: ${v.message}${v.fix ? ' (fixable)' : ''}`).join('\n'); + throw new Error(`${violations.length} violations detected:\n${violations}`); + } +} + +function pack(bundle: Bundle) { + bundle.pack(); +} +function fix(bundle: Bundle) { + bundle.fix(); } buildCommands() diff --git a/tools/@aws-cdk/node-bundle/test/_package.ts b/tools/@aws-cdk/node-bundle/test/_package.ts new file mode 100644 index 0000000000000..97754ff1d3e5d --- /dev/null +++ b/tools/@aws-cdk/node-bundle/test/_package.ts @@ -0,0 +1,163 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { shell } from '../src/api/shell'; + +/** + * Package options. + */ +export interface PackageOptions { + /** + * Package name. + */ + readonly name: string; + + /** + * Include circular imports. + * + * @default false + */ + readonly circular?: boolean; + + /** + * Package licenses. + */ + readonly licenses?: string[]; + + /** + * Package notice file. + */ + readonly notice?: string; +} + +/** + * Generate packages for test scenarios. + */ +export class Package { + + /** + * Create a package. + */ + public static create(options: PackageOptions): Package { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); + const manifest: any = { + name: options.name, + version: '0.0.1', + }; + + if (options.licenses?.length === 1) { + manifest.license = options.licenses[0]; + }; + + if (options.licenses && options.licenses.length > 1) { + manifest.licenses = options.licenses!.map(l => ({ type: l })); + } + + const foo = []; + const bar = []; + + if (options.circular) { + foo.push('const bar = require("./bar");'); + bar.push('const foo = require("./foo");'); + } + + foo.push('console.log("hello from foo");'); + bar.push('console.log("hello from bar");'); + + const index = [ + 'require("./foo");', + 'require("./bar");', + ]; + + return new Package(dir, manifest, index, foo, bar, options.notice ?? ''); + } + + private readonly dependencies: Package[] = []; + + constructor( + public readonly dir: string, + public readonly manifest: any, + public readonly index: string[], + public readonly foo: string[], + public readonly bar: string[], + public notice: string) { + this.manifest.main = this.entrypoint; + } + + /** + * Create an npm tarballs of this package. + */ + public pack() { + shell('npm pack', { cwd: this.dir, quiet: true }); + } + + /** + * Install package dependencies. + */ + public install() { + shell('npm install', { cwd: this.dir, quiet: true }); + } + + /** + * Write the package to disk. + */ + public write() { + fs.mkdirSync(path.join(this.dir, 'lib')); + fs.writeFileSync(path.join(this.dir, 'package.json'), JSON.stringify(this.manifest, null, 2)); + fs.writeFileSync(path.join(this.dir, 'lib', 'foo.js'), this.foo.join('\n')); + fs.writeFileSync(path.join(this.dir, 'lib', 'bar.js'), this.bar.join('\n')); + fs.writeFileSync(path.join(this.dir, this.entrypoint), this.index.join('\n')); + fs.writeFileSync(path.join(this.dir, 'NOTICE'), this.notice); + for (const dep of this.dependencies) { + dep.write(); + dep.pack(); + } + } + + /** + * Add a dependency to the project. This will also modify the source + * code of the project to use that dependency. + */ + public addDependency(options: PackageOptions): Package { + const dependency = Package.create(options); + this.dependencies.push(dependency); + + this.manifest.dependencies = this.manifest.dependencies ?? {}; + + this.index.push(`require("${dependency.name}");`); + this.manifest.dependencies[dependency.name] = path.join(dependency.dir, `${dependency.name}-${dependency.version}.tgz`); + return dependency; + } + + /** + * Entrypoint. + */ + public get entrypoint(): string { + return path.join('lib', 'index.js'); + } + + /** + * Name. + */ + public get name(): string { + return this.manifest.name; + } + + /** + * Version. + */ + public get version(): string { + return this.manifest.version; + } + + /** + * Cleanup the directories. + */ + public clean() { + for (const dep of this.dependencies) { + dep.clean(); + } + fs.removeSync(this.dir); + } + +} \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts new file mode 100644 index 0000000000000..9207466f657c3 --- /dev/null +++ b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -0,0 +1,107 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { Bundle } from '../../src'; +import { Package } from '../_package'; + +test('validate', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'], circular: true }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['INVALID'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0', 'MIT'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + copyright: 'copyright', + entrypoints: [pkg.entrypoint], + resources: { missing: 'bin/missing' }, + licenses: ['Apache-2.0'], + }); + const actual = new Set(bundle.validate().violations.map(v => `${v.type}: ${v.message}`)); + const expected = new Set([ + 'circular-import: lib/bar.js -> lib/foo.js', + 'missing-resource: Unable to find resource (missing) relative to the package directory', + 'outdated-notice: NOTICE is outdated', + `invalid-license: Dependency ${dep1.name}@${dep2.version} has an invalid license: UNKNOWN`, + `multiple-license: Dependency ${dep2.name}@${dep2.version} has multiple licenses: Apache-2.0,MIT`, + ]); + + expect(actual).toEqual(expected); +}); + +test('pack', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + const notice = [ + 'copyright', + '', + '----------------------------------------', + '', + 'This package includes the following third-party software:', + '', + `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, + '', + '', + '---------------', + '', + `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, + '', + '', + '---------------', + '', + ]; + + pkg.notice = notice.join('\n'); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + copyright: 'copyright', + entrypoints: [pkg.entrypoint], + licenses: ['Apache-2.0', 'MIT'], + }); + + bundle.pack(); + + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +test('fix', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + copyright: 'copyright', + entrypoints: [pkg.entrypoint], + licenses: ['Apache-2.0', 'MIT'], + }); + + try { + bundle.pack(); + throw new Error('Expected packing to fail before fixing'); + } catch (e) { + // this should fix the fact we don't generate + // the project with the correct notice + bundle.fix(); + } + + bundle.pack(); + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); diff --git a/tools/@aws-cdk/node-bundle/test/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/bundle.test.ts deleted file mode 100644 index 7ed2d4b7e64ed..0000000000000 --- a/tools/@aws-cdk/node-bundle/test/bundle.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Bundle } from '../src'; - -describe('validate', () => { - - test('throws when multiple bin scripts are defined', async () => { - - const bundle = new Bundle({ - packageDir: '/Users/epolon/dev/src/github.com/aws/aws-cdk/packages/aws-cdk', - copyright: 'AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n', - entrypoints: ['bin/cdk.js', 'lib/plugin.js'], - externals: ['fsevents:optional'], - dontAttribute: '(^@aws-cdk)', - resources: { - '../../node_modules/vm2/lib/contextify.js': 'bin/contextify.js', - }, - test: 'bin/cdk --version', - }); - bundle.pack({ target: process.cwd() }); - }, 5 * 60 * 1000); - -}); \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts new file mode 100644 index 0000000000000..4bf58c591ec6f --- /dev/null +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -0,0 +1,122 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { shell } from '../src/api/shell'; +import { Package } from './_package'; + +test('validate', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'], circular: true }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['INVALID'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0', 'MIT'] }); + + pkg.write(); + pkg.install(); + + try { + const command = [ + whereami(), + '--copyright', 'copyright', + '--entrypoint', pkg.entrypoint, + '--resource', 'missing:bin/missing', + '--license', 'Apache-2.0', + 'validate', + ].join(' '); + shell(command, { cwd: pkg.dir, quiet: true }); + } catch (e: any) { + const violations = new Set(e.stderr.toString().trim().split('\n').filter((l: string) => l.startsWith('-'))); + const expected = new Set([ + `- invalid-license: Dependency ${dep1.name}@${dep1.version} has an invalid license: UNKNOWN`, + `- multiple-license: Dependency ${dep2.name}@${dep2.version} has multiple licenses: Apache-2.0,MIT`, + '- outdated-notice: NOTICE is outdated (fixable)', + '- missing-resource: Unable to find resource (missing) relative to the package directory', + '- circular-import: lib/bar.js -> lib/foo.js', + ]); + expect(violations).toEqual(expected); + } + +}); + +test('fix', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const run = (sub: string) => { + const command = [ + whereami(), + '--copyright', 'copyright', + '--entrypoint', pkg.entrypoint, + '--license', 'Apache-2.0', + '--license', 'MIT', + sub, + ].join(' '); + shell(command, { cwd: pkg.dir, quiet: true }); + }; + + try { + run('pack'); + throw new Error('Expected packing to fail before fixing'); + } catch (e) { + // this should fix the fact we don't generate + // the project with the correct notice + run('fix'); + } + + run('pack'); + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +test('pack', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + const notice = [ + 'copyright', + '', + '----------------------------------------', + '', + 'This package includes the following third-party software:', + '', + `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, + '', + '', + '---------------', + '', + `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, + '', + '', + '---------------', + '', + ]; + + pkg.notice = notice.join('\n'); + + pkg.write(); + pkg.install(); + + const command = [ + whereami(), + '--copyright', 'copyright', + '--entrypoint', pkg.entrypoint, + '--license', 'Apache-2.0', + '--license', 'MIT', + 'pack', + ].join(' '); + shell(command, { cwd: pkg.dir, quiet: true }); + + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +function whereami() { + return path.join(path.join(__dirname, '..', 'bin', 'node-bundle')); +} \ No newline at end of file diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 0a9cec3a2bae8..dcb5cb16f1a1f 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -1,5 +1,6 @@ import * as fs from 'fs'; import * as path from 'path'; +import { Bundle } from '@aws-cdk/node-bundle'; import * as caseUtils from 'case'; import * as glob from 'glob'; import * as semver from 'semver'; @@ -14,7 +15,6 @@ import { findInnerPackages, monoRepoRoot, } from './util'; -import { Bundle } from '@aws-cdk/node-bundle'; const PKGLINT_VERSION = require('../package.json').version; // eslint-disable-line @typescript-eslint/no-require-imports const AWS_SERVICE_NAMES = require('./aws-service-official-names.json'); // eslint-disable-line @typescript-eslint/no-require-imports @@ -168,7 +168,6 @@ export class LicenseFile extends ValidationRule { } export class BundledCLI extends ValidationRule { - public readonly name = 'bundle'; private static readonly VALID_LICENSES = [ 'Apache-2.0', @@ -181,6 +180,7 @@ export class BundledCLI extends ValidationRule { private static readonly DONT_ATTRIBUTE = '(^@aws-cdk/)'; + public readonly name = 'bundle'; public validate(pkg: PackageJson): void { const bundleProps = pkg.json['cdk-package']?.bundle; @@ -207,7 +207,7 @@ export class BundledCLI extends ValidationRule { message: `'cdk-package.bundle.copyright' must be set to "${NOTICE}"`, ruleName: `${this.name}/configuration`, fix: () => pkg.json['cdk-package'].bundle.copyright = NOTICE, - }) + }); valid = false; } @@ -216,7 +216,7 @@ export class BundledCLI extends ValidationRule { message: `'cdk-package.bundle.licenses' must be set to "${BundledCLI.VALID_LICENSES}"`, ruleName: `${this.name}/configuration`, fix: () => pkg.json['cdk-package'].bundle.licenses = BundledCLI.VALID_LICENSES, - }) + }); valid = false; } @@ -225,7 +225,7 @@ export class BundledCLI extends ValidationRule { message: `'cdk-package.bundle.dontAttribute' must be set to "${BundledCLI.DONT_ATTRIBUTE}"`, ruleName: `${this.name}/configuration`, fix: () => pkg.json['cdk-package'].bundle.dontAttribute = BundledCLI.DONT_ATTRIBUTE, - }) + }); valid = false; } @@ -234,8 +234,7 @@ export class BundledCLI extends ValidationRule { } /** - * Validate the package is ready for bundling. We do this here instead of cdk-build/cdk-lint - * to leverage the automatic fixing capabilities this mechanism has. + * Validate the package is ready for bundling. */ private validateBundle(pkg: PackageJson, bundleProps: any) { @@ -243,7 +242,10 @@ export class BundledCLI extends ValidationRule { const report = bundle.validate(); for (const violation of report.violations) { - pkg.report({ message: violation.message, ruleName: this.name, fix: violation.fix }) + pkg.report({ + message: violation.message, + ruleName: `${this.name}/${violation.type}`, fix: violation.fix + }); } } From b529ad93601426e85e38baa957c523d42f2fdc84 Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 14:11:00 +0200 Subject: [PATCH 23/63] fix package --- .../@aws-cdk/cdk-build-tools/bin/cdk-package.ts | 16 +++++++++------- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 6 ++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts index 33088b2d9e588..8bba8b98f8d3b 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts @@ -49,17 +49,19 @@ async function main() { ...args.targets ? flatMap(args.targets, (target: string) => ['-t', target]) : [], '-o', outdir]; await shell(command, { timers }); - } else if (options.bundle) { - // bundled packages have their own bundler. - const bundle = new Bundle({ packageDir: process.cwd(), ...options.bundle }); - bundle.pack({ target: path.join(outdir, 'js') }); } else { - // just "npm pack" and deploy to "outdir" - const tarball = (await shell(['npm', 'pack'], { timers })).trim(); const target = path.join(outdir, 'js'); await fs.remove(target); await fs.mkdirp(target); - await fs.move(tarball, path.join(target, path.basename(tarball))); + if (options.bundle) { + // bundled packages have their own bundler. + const bundle = new Bundle({ packageDir: process.cwd(), ...options.bundle }); + bundle.pack({ target }); + } else { + // just "npm pack" and deploy to "outdir" + const tarball = (await shell(['npm', 'pack'], { timers })).trim(); + await fs.move(tarball, path.join(target, path.basename(tarball))); + } } if (options.post) { diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 7817dfb9a015d..d7a69c4a3b4c7 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -142,13 +142,11 @@ export class Bundle { } if (!fs.existsSync(target)) { - console.log(`✖ Target doesnt exist: ${target}`); - process.exit(1); + throw new Error(`Target doesnt exist: ${target}`); } if (!fs.lstatSync(target).isDirectory()) { - console.log(`✖ Target must be a directory: ${target}`); - process.exit(1); + throw new Error(`Target must be a directory: ${target}`); } console.log('Creating package'); From dd8cb796d65379be7372ad7da225e60bf42a841a Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 14:38:03 +0200 Subject: [PATCH 24/63] linter --- tools/@aws-cdk/pkglint/lib/rules.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index dcb5cb16f1a1f..15be712aa83a1 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -244,7 +244,8 @@ export class BundledCLI extends ValidationRule { for (const violation of report.violations) { pkg.report({ message: violation.message, - ruleName: `${this.name}/${violation.type}`, fix: violation.fix + ruleName: `${this.name}/${violation.type}`, + fix: violation.fix, }); } From f0325c6326263c1c6cb07082ccb17b059aeb6caf Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 15:00:12 +0200 Subject: [PATCH 25/63] fix test --- tools/@aws-cdk/pkglint/test/rules.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/@aws-cdk/pkglint/test/rules.test.ts b/tools/@aws-cdk/pkglint/test/rules.test.ts index c91a20afd1cec..3169a747a08f3 100644 --- a/tools/@aws-cdk/pkglint/test/rules.test.ts +++ b/tools/@aws-cdk/pkglint/test/rules.test.ts @@ -247,7 +247,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -278,7 +278,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -309,7 +309,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -335,7 +335,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -360,7 +360,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -382,7 +382,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); @@ -404,7 +404,7 @@ describe('ThirdPartyAttributions', () => { }); const dirPath = await fakeModule.tmpdir(); - const rule = new rules.NoticeFile(); + const rule = new rules.ThirdPartyAttributions(); const pkgJson = new PackageJson(path.join(dirPath, 'package.json')); rule.validate(pkgJson); From 8ec60101b8eee95845f2401a76b4332503e387a7 Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 15:37:40 +0200 Subject: [PATCH 26/63] standard line endings --- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index 0095bb324e186..27b523e9e1ab4 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -166,7 +166,11 @@ export class Notice { notice.push(separator); } - return notice.join('\n'); + return notice + // since we are embedding external files, those can different line + // endings, so we standardize to LF. + .map(l => l.replace(/\r\n/g, '\n')) + .join('\n'); } From 6f6c54ebd4e917fdc413f81699b75a0a9ad25cf9 Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 15:53:28 +0200 Subject: [PATCH 27/63] debug --- packages/aws-cdk/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index ea6a896a1c88a..b72fd9b098e4f 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -8,11 +8,11 @@ "cdk": "bin/cdk.js" }, "scripts": { - "build": "cdk-build", + "build": "yarn --version && getconf ARG_MAX && cdk-build", "watch": "cdk-watch", "lint": "cdk-lint", "pkglint": "pkglint -f", - "test": "cdk-test", + "test": "yarn --version && getconf ARG_MAX && cdk-test", "integ": "jest --testMatch '**/?(*.)+(integ-test).js'", "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk-bundle.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin", "bundle:test": "./bin/cdk --help", From 40c5dd78d0d666a43cad5a8cd0195ee271800e85 Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 22:14:20 +0200 Subject: [PATCH 28/63] allow custom notice file path --- packages/aws-cdk/{NOTICE => NOTICES} | 0 packages/aws-cdk/package.json | 8 +++---- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 21 ++++++++++--------- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 11 ++++++++++ tools/@aws-cdk/pkglint/lib/rules.ts | 21 ++++++++++++++++++- 5 files changed, 46 insertions(+), 15 deletions(-) rename packages/aws-cdk/{NOTICE => NOTICES} (100%) diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICES similarity index 100% rename from packages/aws-cdk/NOTICE rename to packages/aws-cdk/NOTICES diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index b72fd9b098e4f..814197a0acdee 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -8,14 +8,13 @@ "cdk": "bin/cdk.js" }, "scripts": { - "build": "yarn --version && getconf ARG_MAX && cdk-build", + "dec": "https://github.com/yarnpkg/yarn/issues/5420", + "build": "cdk-build", "watch": "cdk-watch", "lint": "cdk-lint", "pkglint": "pkglint -f", - "test": "yarn --version && getconf ARG_MAX && cdk-test", + "test": "cdk-test", "integ": "jest --testMatch '**/?(*.)+(integ-test).js'", - "bundle": "esbuild bin/cdk.ts --bundle --platform=node --external:fsevents --outfile=bin/cdk-bundle.js --allow-overwrite && cp ../../node_modules/vm2/lib/contextify.js bin", - "bundle:test": "./bin/cdk --help", "package": "cdk-package", "build+test+package": "yarn build+test && yarn package", "build+test": "yarn build && yarn test", @@ -35,6 +34,7 @@ "fsevents:optional" ], "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", + "noticePath": "NOTICES", "entrypoints": [ "bin/cdk.js" ], diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index 27b523e9e1ab4..d6b9c05d3923f 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -15,11 +15,6 @@ const DEFAULT_VALID_LICENSES = [ '0BSD', ]; -/** - * NOTICE file path. - */ -const FILE_PATH = 'NOTICE'; - /** * Dependency of a specific package on the local file system. */ @@ -58,6 +53,10 @@ export interface NoticeProps { * The copyright to prepend to the file. */ readonly copyright: string; + /** + * Path to the notice file to created / validated. + */ + readonly filePath: string; /** * List of valid licenses. * @@ -82,12 +81,14 @@ export class Notice { private readonly validLicenses: string[]; private readonly copyright: string; private readonly dependenciesRoot: string; + private readonly filePath: string; private readonly attributions: Map; private readonly content: string; constructor(props: NoticeProps) { this.packageDir = props.packageDir; + this.filePath = path.join(this.packageDir, props.filePath); this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); this.validLicenses = (props.validLicenses ?? DEFAULT_VALID_LICENSES).map(l => l.toLowerCase()); this.copyright = props.copyright; @@ -107,13 +108,13 @@ export class Notice { public validate(): ViolationsReport { const violations = []; - const noticePath = path.join(this.packageDir, FILE_PATH); + const relNoticePath = path.relative(this.packageDir, this.filePath); const fix = () => this.flush(); - const missing: Violation | undefined = !fs.existsSync(noticePath) ? { type: ViolationType.MISSING_NOTICE, message: `${FILE_PATH} is missing`, fix } : undefined; - const notice = missing ? undefined : fs.readFileSync(noticePath, { encoding: 'utf-8' }); - const outdated: Violation | undefined = notice !== undefined && notice !== this.content ? { type: ViolationType.OUTDATED_NOTICE, message: `${FILE_PATH} is outdated`, fix } : undefined; + const missing: Violation | undefined = !fs.existsSync(this.filePath) ? { type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} file is missing`, fix } : undefined; + const notice = missing ? undefined : fs.readFileSync(this.filePath, { encoding: 'utf-8' }); + const outdated: Violation | undefined = notice !== undefined && notice !== this.content ? { type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} file is outdated`, fix } : undefined; const invalidLicense: Violation[] = Array.from(this.attributions.values()) .filter(a => a.licenses.length === 1 && !this.validLicenses.includes(a.licenses[0].toLowerCase())) @@ -146,7 +147,7 @@ export class Notice { * Flush the generated notice file to disk. */ public flush() { - fs.writeFileSync(path.join(this.packageDir, FILE_PATH), this.content); + fs.writeFileSync(this.filePath, this.content); } private render(attributions: Map): string { diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index d7a69c4a3b4c7..c65d1eb3d2951 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -26,6 +26,14 @@ export interface BundleProps { */ readonly copyright: string; + /** + * Path to the notice file that will be created / validated. + * This path is relative to the package directory. + * + * @default 'NOTICE' + */ + readonly noticePath?: string; + /** * External packages that cannot be bundled. * @@ -81,6 +89,7 @@ export interface BundlePackOptions { export class Bundle { private readonly manifest: any; + private readonly noticePath: string; private readonly packageDir: string; private readonly copyright: string; @@ -99,6 +108,7 @@ export class Bundle { constructor(props: BundleProps) { this.packageDir = props.packageDir; + this.noticePath = props.noticePath ?? 'NOTICE'; this.manifest = fs.readJsonSync(path.join(this.packageDir, 'package.json')); this.externals = props.externals ?? []; this.resources = props.resources ?? {}; @@ -224,6 +234,7 @@ export class Bundle { } this._notice = new Notice({ packageDir: this.packageDir, + filePath: this.noticePath, dependencies: this.dependencies, dependenciesRoot: this.dependenciesRoot, exclude: this.dontAttribute, diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 15be712aa83a1..9a88b184305ac 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -202,6 +202,21 @@ export class BundledCLI extends ValidationRule { private validateConfig(pkg: PackageJson, bundleProps: any): boolean { let valid = true; + // this is pretty crazy, but apparently there is a bug in yarn when NOTICE + // files are too big. see https://github.com/yarnpkg/yarn/issues/5420. + // as a workaround we use NOTICES for bundled packages. + // there is a pending PR to fix the issue, though it has been there for almost + // two years now (https://github.com/yarnpkg/yarn/pull/8093). + const noticeFilePath = 'NOTICES'; + if (bundleProps.noticePath !== noticeFilePath) { + pkg.report({ + message: `'cdk-package.bundle.noticePath' must be set to "${noticeFilePath}"`, + ruleName: `${this.name}/configuration`, + fix: () => pkg.json['cdk-package'].bundle.noticePath = noticeFilePath, + }); + valid = false; + } + if (bundleProps.copyright !== NOTICE) { pkg.report({ message: `'cdk-package.bundle.copyright' must be set to "${NOTICE}"`, @@ -237,7 +252,6 @@ export class BundledCLI extends ValidationRule { * Validate the package is ready for bundling. */ private validateBundle(pkg: PackageJson, bundleProps: any) { - const bundle = new Bundle({ packageDir: pkg.packageRoot, ...bundleProps }); const report = bundle.validate(); @@ -259,6 +273,11 @@ export class NoticeFile extends ValidationRule { public readonly name = 'license/notice-file'; public validate(pkg: PackageJson): void { + if (pkg.json['cdk-package']?.bundle) { + // notice files are validated using the bundle tool, + // which allows for other file names. + return; + } fileShouldBeginWith(this.name, pkg, 'NOTICE', ...NOTICE.split('\n')); } } From 1bcb3b9240907e4dfbaa94a121a0537193126bac Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 22:22:44 +0200 Subject: [PATCH 29/63] fix message --- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index d6b9c05d3923f..0e287239d6ac3 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -112,9 +112,9 @@ export class Notice { const fix = () => this.flush(); - const missing: Violation | undefined = !fs.existsSync(this.filePath) ? { type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} file is missing`, fix } : undefined; + const missing: Violation | undefined = !fs.existsSync(this.filePath) ? { type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} is missing`, fix } : undefined; const notice = missing ? undefined : fs.readFileSync(this.filePath, { encoding: 'utf-8' }); - const outdated: Violation | undefined = notice !== undefined && notice !== this.content ? { type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} file is outdated`, fix } : undefined; + const outdated: Violation | undefined = notice !== undefined && notice !== this.content ? { type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} is outdated`, fix } : undefined; const invalidLicense: Violation[] = Array.from(this.attributions.values()) .filter(a => a.licenses.length === 1 && !this.validLicenses.includes(a.licenses[0].toLowerCase())) From 3e582edcdb74856b3c0b59a6e58a4c17eecef4f6 Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 23:14:51 +0200 Subject: [PATCH 30/63] debug --- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index 0e287239d6ac3..d738be154e2af 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -1,5 +1,6 @@ -import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; +import * as fs from 'fs-extra'; import { shell } from './shell'; import { Violation, ViolationType, ViolationsReport } from './violation'; @@ -107,14 +108,32 @@ export class Notice { */ public validate(): ViolationsReport { - const violations = []; + const violations: Violation[] = []; const relNoticePath = path.relative(this.packageDir, this.filePath); const fix = () => this.flush(); - const missing: Violation | undefined = !fs.existsSync(this.filePath) ? { type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} is missing`, fix } : undefined; + const missing = !fs.existsSync(this.filePath); const notice = missing ? undefined : fs.readFileSync(this.filePath, { encoding: 'utf-8' }); - const outdated: Violation | undefined = notice !== undefined && notice !== this.content ? { type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} is outdated`, fix } : undefined; + const outdated = notice !== undefined && notice !== this.content; + + if (missing) { + violations.push({ type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} is missing`, fix }); + } + + if (outdated) { + violations.push({ type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} is outdated`, fix }); + const workDir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); + try { + const tempPath = path.join(workDir, 'notice.temp'); + fs.writeFileSync(tempPath, this.content); + shell(`diff ${this.filePath} ${tempPath}`); + } catch (e) { + + } finally { + fs.removeSync(workDir); + } + } const invalidLicense: Violation[] = Array.from(this.attributions.values()) .filter(a => a.licenses.length === 1 && !this.validLicenses.includes(a.licenses[0].toLowerCase())) @@ -128,14 +147,6 @@ export class Notice { .filter(a => a.licenses.length > 1) .map(a => ({ type: ViolationType.MULTIPLE_LICENSE, message: `Dependency ${a.package} has multiple licenses: ${a.licenses}` })); - if (missing) { - violations.push(missing); - } - - if (outdated) { - violations.push(outdated); - } - violations.push(...invalidLicense); violations.push(...noLicense); violations.push(...multiLicense); From b494fb93a06aa5652f12097140a9cfa1f305aa0b Mon Sep 17 00:00:00 2001 From: epolon Date: Sat, 12 Feb 2022 23:33:49 +0200 Subject: [PATCH 31/63] dont attribute cdk-assets --- packages/aws-cdk/NOTICES | 206 ------------------ packages/aws-cdk/package.json | 2 +- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 11 - tools/@aws-cdk/pkglint/lib/rules.ts | 2 +- 4 files changed, 2 insertions(+), 219 deletions(-) diff --git a/packages/aws-cdk/NOTICES b/packages/aws-cdk/NOTICES index 63cd0fc7ae82f..684ebf256af7f 100644 --- a/packages/aws-cdk/NOTICES +++ b/packages/aws-cdk/NOTICES @@ -2129,212 +2129,6 @@ THIS SOFTWARE. ** uuid@8.3.2 - https://www.npmjs.com/package/uuid/v/8.3.2 | MIT ---------------- - -** cdk-assets@0.0.0 - https://www.npmjs.com/package/cdk-assets/v/0.0.0 | Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------- ** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 814197a0acdee..b5d29030c7b3d 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -46,7 +46,7 @@ "BSD-2-Clause", "0BSD" ], - "dontAttribute": "(^@aws-cdk/)" + "dontAttribute": "(^@aws-cdk/|^cdk-assets$)" } }, "author": { diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index d738be154e2af..3e28a809647e1 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -1,4 +1,3 @@ -import * as os from 'os'; import * as path from 'path'; import * as fs from 'fs-extra'; import { shell } from './shell'; @@ -123,16 +122,6 @@ export class Notice { if (outdated) { violations.push({ type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} is outdated`, fix }); - const workDir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); - try { - const tempPath = path.join(workDir, 'notice.temp'); - fs.writeFileSync(tempPath, this.content); - shell(`diff ${this.filePath} ${tempPath}`); - } catch (e) { - - } finally { - fs.removeSync(workDir); - } } const invalidLicense: Violation[] = Array.from(this.attributions.values()) diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 9a88b184305ac..b99006420dd60 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -178,7 +178,7 @@ export class BundledCLI extends ValidationRule { '0BSD', ]; - private static readonly DONT_ATTRIBUTE = '(^@aws-cdk/)'; + private static readonly DONT_ATTRIBUTE = '(^@aws-cdk\/|^cdk-assets$)'; public readonly name = 'bundle'; From d8a95683aff84b966e7a66ff7dff37e28a8ef816 Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 13 Feb 2022 00:26:45 +0200 Subject: [PATCH 32/63] revert unncessary changes --- .../cloudformation-diff/lib/diff/types.ts | 400 +----------------- .../lib/iam/iam-changes.ts | 284 ++++++++++++- .../lib/network/security-group-changes.ts | 123 +++++- 3 files changed, 407 insertions(+), 400 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts index 979fbd4c76a0b..335783388275f 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts @@ -1,12 +1,7 @@ import { AssertionError } from 'assert'; import * as cfnspec from '@aws-cdk/cfnspec'; -import * as chalk from 'chalk'; -import { DiffableCollection } from '../diffable'; -import { ManagedPolicyAttachment, ManagedPolicyJson } from '../iam/managed-policy'; -import { parseLambdaPermission, parseStatements, Statement, StatementJson } from '../iam/statement'; -import { RuleJson, SecurityGroupRule } from '../network/security-group-rule'; -import { renderIntrinsics } from '../render-intrinsics'; -import { deepRemoveUndefined, dropIfEmpty, flatMap, makeComparator } from '../util'; +import { IamChanges } from '../iam/iam-changes'; +import { SecurityGroupChanges } from '../network/security-group-changes'; import { deepEqual } from './util'; export type PropertyMap = {[key: string]: any }; @@ -664,394 +659,3 @@ function onlyChanges>(xs: {[key: string]: T}): {[key } return ret; } - -export interface IamChangesProps { - propertyChanges: PropertyChange[]; - resourceChanges: ResourceChange[]; -} - -/** - * Changes to IAM statements - */ -export class IamChanges { - public static IamPropertyScrutinies = [ - cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies, - cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy, - cfnspec.schema.PropertyScrutinyType.ManagedPolicies, - ]; - - public static IamResourceScrutinies = [ - cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource, - cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource, - cfnspec.schema.ResourceScrutinyType.LambdaPermission, - ]; - - public readonly statements = new DiffableCollection(); - public readonly managedPolicies = new DiffableCollection(); - - constructor(props: IamChangesProps) { - for (const propertyChange of props.propertyChanges) { - this.readPropertyChange(propertyChange); - } - for (const resourceChange of props.resourceChanges) { - this.readResourceChange(resourceChange); - } - - this.statements.calculateDiff(); - this.managedPolicies.calculateDiff(); - } - - public get hasChanges() { - return this.statements.hasChanges || this.managedPolicies.hasChanges; - } - - /** - * Return whether the changes include broadened permissions - * - * Permissions are broadened if positive statements are added or - * negative statements are removed, or if managed policies are added. - */ - public get permissionsBroadened(): boolean { - return this.statements.additions.some(s => !s.isNegativeStatement) - || this.statements.removals.some(s => s.isNegativeStatement) - || this.managedPolicies.hasAdditions; - } - - /** - * Return a summary table of changes - */ - public summarizeStatements(): string[][] { - const ret: string[][] = []; - - const header = ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']; - - // First generate all lines, then sort on Resource so that similar resources are together - for (const statement of this.statements.additions) { - const renderedStatement = statement.render(); - ret.push([ - '+', - renderedStatement.resource, - renderedStatement.effect, - renderedStatement.action, - renderedStatement.principal, - renderedStatement.condition, - ].map(s => chalk.green(s))); - } - for (const statement of this.statements.removals) { - const renderedStatement = statement.render(); - ret.push([ - chalk.red('-'), - renderedStatement.resource, - renderedStatement.effect, - renderedStatement.action, - renderedStatement.principal, - renderedStatement.condition, - ].map(s => chalk.red(s))); - } - - // Sort by 2nd column - ret.sort(makeComparator((row: string[]) => [row[1]])); - - ret.splice(0, 0, header); - - return ret; - } - - public summarizeManagedPolicies(): string[][] { - const ret: string[][] = []; - const header = ['', 'Resource', 'Managed Policy ARN']; - - for (const att of this.managedPolicies.additions) { - ret.push([ - '+', - att.identityArn, - att.managedPolicyArn, - ].map(s => chalk.green(s))); - } - for (const att of this.managedPolicies.removals) { - ret.push([ - '-', - att.identityArn, - att.managedPolicyArn, - ].map(s => chalk.red(s))); - } - - // Sort by 2nd column - ret.sort(makeComparator((row: string[]) => [row[1]])); - - ret.splice(0, 0, header); - - return ret; - } - - /** - * Return a machine-readable version of the changes. - * This is only used in tests. - * - * @internal - */ - public _toJson(): IamChangesJson { - return deepRemoveUndefined({ - statementAdditions: dropIfEmpty(this.statements.additions.map(s => s._toJson())), - statementRemovals: dropIfEmpty(this.statements.removals.map(s => s._toJson())), - managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map(s => s._toJson())), - managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map(s => s._toJson())), - }); - } - - private readPropertyChange(propertyChange: PropertyChange) { - switch (propertyChange.scrutinyType) { - case cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies: - // AWS::IAM::{ Role | User | Group }.Policies - this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); - this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); - break; - case cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy: - // Any PolicyDocument on a resource (including AssumeRolePolicyDocument) - this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId)); - this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId)); - break; - case cfnspec.schema.PropertyScrutinyType.ManagedPolicies: - // Just a list of managed policies - this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); - this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); - break; - } - } - - private readResourceChange(resourceChange: ResourceChange) { - switch (resourceChange.scrutinyType) { - case cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource: - // AWS::IAM::Policy - this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties)); - this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties)); - break; - case cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource: - // AWS::*::{Bucket,Queue,Topic}Policy - this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties)); - this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties)); - break; - case cfnspec.schema.ResourceScrutinyType.LambdaPermission: - this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties)); - this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties)); - break; - } - } - - /** - * Parse a list of policies on an identity - */ - private readIdentityPolicies(policies: any, logicalId: string): Statement[] { - if (policies === undefined) { return []; } - - const appliesToPrincipal = 'AWS:${' + logicalId + '}'; - - return flatMap(policies, (policy: any) => { - // check if the Policy itself is not an intrinsic, like an Fn::If - const unparsedStatement = policy.PolicyDocument?.Statement - ? policy.PolicyDocument.Statement - : policy; - return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement))); - }); - } - - /** - * Parse an IAM::Policy resource - */ - private readIdentityPolicyResource(properties: any): Statement[] { - if (properties === undefined) { return []; } - - properties = renderIntrinsics(properties); - - const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []); - return flatMap(principals, (principal: string) => { - const ref = 'AWS:' + principal; - return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement)); - }); - } - - private readResourceStatements(policy: any, logicalId: string): Statement[] { - if (policy === undefined) { return []; } - - const appliesToResource = '${' + logicalId + '.Arn}'; - return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement))); - } - - /** - * Parse an AWS::*::{Bucket,Topic,Queue}policy - */ - private readResourcePolicyResource(properties: any): Statement[] { - if (properties === undefined) { return []; } - - properties = renderIntrinsics(properties); - - const policyKeys = Object.keys(properties).filter(key => key.indexOf('Policy') > -1); - - // Find the key that identifies the resource(s) this policy applies to - const resourceKeys = Object.keys(properties).filter(key => !policyKeys.includes(key) && !key.endsWith('Name')); - let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ['???']; - - // For some resources, this is a singleton string, for some it's an array - if (!Array.isArray(resources)) { - resources = [resources]; - } - - return flatMap(resources, (resource: string) => { - return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement)); - }); - } - - private readManagedPolicies(policyArns: any, logicalId: string): ManagedPolicyAttachment[] { - if (!policyArns) { return []; } - - const rep = '${' + logicalId + '}'; - return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns)); - } - - private readLambdaStatements(properties?: PropertyMap): Statement[] { - if (!properties) { return []; } - - return [parseLambdaPermission(renderIntrinsics(properties))]; - } -} - -/** - * Set an undefined or wildcarded principal on these statements - */ -function defaultPrincipal(principal: string, statements: Statement[]) { - statements.forEach(s => s.principals.replaceEmpty(principal)); - statements.forEach(s => s.principals.replaceStar(principal)); - return statements; -} - -/** - * Set an undefined or wildcarded resource on these statements - */ -function defaultResource(resource: string, statements: Statement[]) { - statements.forEach(s => s.resources.replaceEmpty(resource)); - statements.forEach(s => s.resources.replaceStar(resource)); - return statements; -} - -export interface IamChangesJson { - statementAdditions?: StatementJson[]; - statementRemovals?: StatementJson[]; - managedPolicyAdditions?: ManagedPolicyJson[]; - managedPolicyRemovals?: ManagedPolicyJson[]; -} - -export interface SecurityGroupChangesProps { - ingressRulePropertyChanges: PropertyChange[]; - ingressRuleResourceChanges: ResourceChange[]; - egressRuleResourceChanges: ResourceChange[]; - egressRulePropertyChanges: PropertyChange[]; -} - -/** - * Changes to IAM statements - */ -export class SecurityGroupChanges { - public readonly ingress = new DiffableCollection(); - public readonly egress = new DiffableCollection(); - - constructor(props: SecurityGroupChangesProps) { - // Group rules - for (const ingressProp of props.ingressRulePropertyChanges) { - this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId)); - this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId)); - } - for (const egressProp of props.egressRulePropertyChanges) { - this.egress.addOld(...this.readInlineRules(egressProp.oldValue, egressProp.resourceLogicalId)); - this.egress.addNew(...this.readInlineRules(egressProp.newValue, egressProp.resourceLogicalId)); - } - - // Rule resources - for (const ingressRes of props.ingressRuleResourceChanges) { - this.ingress.addOld(...this.readRuleResource(ingressRes.oldProperties)); - this.ingress.addNew(...this.readRuleResource(ingressRes.newProperties)); - } - for (const egressRes of props.egressRuleResourceChanges) { - this.egress.addOld(...this.readRuleResource(egressRes.oldProperties)); - this.egress.addNew(...this.readRuleResource(egressRes.newProperties)); - } - - this.ingress.calculateDiff(); - this.egress.calculateDiff(); - } - - public get hasChanges() { - return this.ingress.hasChanges || this.egress.hasChanges; - } - - /** - * Return a summary table of changes - */ - public summarize(): string[][] { - const ret: string[][] = []; - - const header = ['', 'Group', 'Dir', 'Protocol', 'Peer']; - - const inWord = 'In'; - const outWord = 'Out'; - - // Render a single rule to the table (curried function so we can map it across rules easily--thank you JavaScript!) - const renderRule = (plusMin: string, inOut: string) => (rule: SecurityGroupRule) => [ - plusMin, - rule.groupId, - inOut, - rule.describeProtocol(), - rule.describePeer(), - ].map(s => plusMin === '+' ? chalk.green(s) : chalk.red(s)); - - // First generate all lines, sort later - ret.push(...this.ingress.additions.map(renderRule('+', inWord))); - ret.push(...this.egress.additions.map(renderRule('+', outWord))); - ret.push(...this.ingress.removals.map(renderRule('-', inWord))); - ret.push(...this.egress.removals.map(renderRule('-', outWord))); - - // Sort by group name then ingress/egress (ingress first) - ret.sort(makeComparator((row: string[]) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1])); - - ret.splice(0, 0, header); - - return ret; - } - - public toJson(): SecurityGroupChangesJson { - return deepRemoveUndefined({ - ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map(s => s.toJson())), - ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map(s => s.toJson())), - egressRuleAdditions: dropIfEmpty(this.egress.additions.map(s => s.toJson())), - egressRuleRemovals: dropIfEmpty(this.egress.removals.map(s => s.toJson())), - }); - } - - public get rulesAdded(): boolean { - return this.ingress.hasAdditions - || this.egress.hasAdditions; - } - - private readInlineRules(rules: any, logicalId: string): SecurityGroupRule[] { - if (!rules) { return []; } - - // UnCloudFormation so the parser works in an easier domain - - const ref = '${' + logicalId + '.GroupId}'; - return rules.map((r: any) => new SecurityGroupRule(renderIntrinsics(r), ref)); - } - - private readRuleResource(resource: any): SecurityGroupRule[] { - if (!resource) { return []; } - - // UnCloudFormation so the parser works in an easier domain - - return [new SecurityGroupRule(renderIntrinsics(resource))]; - } -} - -export interface SecurityGroupChangesJson { - ingressRuleAdditions?: RuleJson[]; - ingressRuleRemovals?: RuleJson[]; - egressRuleAdditions?: RuleJson[]; - egressRuleRemovals?: RuleJson[]; -} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts index 7f386d7a9aecf..f1460ff48c027 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts @@ -1 +1,283 @@ -export { IamChangesProps, IamChanges, IamChangesJson } from '../diff/types'; +import * as cfnspec from '@aws-cdk/cfnspec'; +import * as chalk from 'chalk'; +import { PropertyChange, PropertyMap, ResourceChange } from '../diff/types'; +import { DiffableCollection } from '../diffable'; +import { renderIntrinsics } from '../render-intrinsics'; +import { deepRemoveUndefined, dropIfEmpty, flatMap, makeComparator } from '../util'; +import { ManagedPolicyAttachment, ManagedPolicyJson } from './managed-policy'; +import { parseLambdaPermission, parseStatements, Statement, StatementJson } from './statement'; + +export interface IamChangesProps { + propertyChanges: PropertyChange[]; + resourceChanges: ResourceChange[]; +} + +/** + * Changes to IAM statements + */ +export class IamChanges { + public static IamPropertyScrutinies = [ + cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies, + cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy, + cfnspec.schema.PropertyScrutinyType.ManagedPolicies, + ]; + + public static IamResourceScrutinies = [ + cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource, + cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource, + cfnspec.schema.ResourceScrutinyType.LambdaPermission, + ]; + + public readonly statements = new DiffableCollection(); + public readonly managedPolicies = new DiffableCollection(); + + constructor(props: IamChangesProps) { + for (const propertyChange of props.propertyChanges) { + this.readPropertyChange(propertyChange); + } + for (const resourceChange of props.resourceChanges) { + this.readResourceChange(resourceChange); + } + + this.statements.calculateDiff(); + this.managedPolicies.calculateDiff(); + } + + public get hasChanges() { + return this.statements.hasChanges || this.managedPolicies.hasChanges; + } + + /** + * Return whether the changes include broadened permissions + * + * Permissions are broadened if positive statements are added or + * negative statements are removed, or if managed policies are added. + */ + public get permissionsBroadened(): boolean { + return this.statements.additions.some(s => !s.isNegativeStatement) + || this.statements.removals.some(s => s.isNegativeStatement) + || this.managedPolicies.hasAdditions; + } + + /** + * Return a summary table of changes + */ + public summarizeStatements(): string[][] { + const ret: string[][] = []; + + const header = ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']; + + // First generate all lines, then sort on Resource so that similar resources are together + for (const statement of this.statements.additions) { + const renderedStatement = statement.render(); + ret.push([ + '+', + renderedStatement.resource, + renderedStatement.effect, + renderedStatement.action, + renderedStatement.principal, + renderedStatement.condition, + ].map(s => chalk.green(s))); + } + for (const statement of this.statements.removals) { + const renderedStatement = statement.render(); + ret.push([ + chalk.red('-'), + renderedStatement.resource, + renderedStatement.effect, + renderedStatement.action, + renderedStatement.principal, + renderedStatement.condition, + ].map(s => chalk.red(s))); + } + + // Sort by 2nd column + ret.sort(makeComparator((row: string[]) => [row[1]])); + + ret.splice(0, 0, header); + + return ret; + } + + public summarizeManagedPolicies(): string[][] { + const ret: string[][] = []; + const header = ['', 'Resource', 'Managed Policy ARN']; + + for (const att of this.managedPolicies.additions) { + ret.push([ + '+', + att.identityArn, + att.managedPolicyArn, + ].map(s => chalk.green(s))); + } + for (const att of this.managedPolicies.removals) { + ret.push([ + '-', + att.identityArn, + att.managedPolicyArn, + ].map(s => chalk.red(s))); + } + + // Sort by 2nd column + ret.sort(makeComparator((row: string[]) => [row[1]])); + + ret.splice(0, 0, header); + + return ret; + } + + /** + * Return a machine-readable version of the changes. + * This is only used in tests. + * + * @internal + */ + public _toJson(): IamChangesJson { + return deepRemoveUndefined({ + statementAdditions: dropIfEmpty(this.statements.additions.map(s => s._toJson())), + statementRemovals: dropIfEmpty(this.statements.removals.map(s => s._toJson())), + managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map(s => s._toJson())), + managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map(s => s._toJson())), + }); + } + + private readPropertyChange(propertyChange: PropertyChange) { + switch (propertyChange.scrutinyType) { + case cfnspec.schema.PropertyScrutinyType.InlineIdentityPolicies: + // AWS::IAM::{ Role | User | Group }.Policies + this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + case cfnspec.schema.PropertyScrutinyType.InlineResourcePolicy: + // Any PolicyDocument on a resource (including AssumeRolePolicyDocument) + this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + case cfnspec.schema.PropertyScrutinyType.ManagedPolicies: + // Just a list of managed policies + this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + } + } + + private readResourceChange(resourceChange: ResourceChange) { + switch (resourceChange.scrutinyType) { + case cfnspec.schema.ResourceScrutinyType.IdentityPolicyResource: + // AWS::IAM::Policy + this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties)); + this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties)); + break; + case cfnspec.schema.ResourceScrutinyType.ResourcePolicyResource: + // AWS::*::{Bucket,Queue,Topic}Policy + this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties)); + this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties)); + break; + case cfnspec.schema.ResourceScrutinyType.LambdaPermission: + this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties)); + this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties)); + break; + } + } + + /** + * Parse a list of policies on an identity + */ + private readIdentityPolicies(policies: any, logicalId: string): Statement[] { + if (policies === undefined) { return []; } + + const appliesToPrincipal = 'AWS:${' + logicalId + '}'; + + return flatMap(policies, (policy: any) => { + // check if the Policy itself is not an intrinsic, like an Fn::If + const unparsedStatement = policy.PolicyDocument?.Statement + ? policy.PolicyDocument.Statement + : policy; + return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement))); + }); + } + + /** + * Parse an IAM::Policy resource + */ + private readIdentityPolicyResource(properties: any): Statement[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []); + return flatMap(principals, (principal: string) => { + const ref = 'AWS:' + principal; + return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement)); + }); + } + + private readResourceStatements(policy: any, logicalId: string): Statement[] { + if (policy === undefined) { return []; } + + const appliesToResource = '${' + logicalId + '.Arn}'; + return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement))); + } + + /** + * Parse an AWS::*::{Bucket,Topic,Queue}policy + */ + private readResourcePolicyResource(properties: any): Statement[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + const policyKeys = Object.keys(properties).filter(key => key.indexOf('Policy') > -1); + + // Find the key that identifies the resource(s) this policy applies to + const resourceKeys = Object.keys(properties).filter(key => !policyKeys.includes(key) && !key.endsWith('Name')); + let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ['???']; + + // For some resources, this is a singleton string, for some it's an array + if (!Array.isArray(resources)) { + resources = [resources]; + } + + return flatMap(resources, (resource: string) => { + return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement)); + }); + } + + private readManagedPolicies(policyArns: any, logicalId: string): ManagedPolicyAttachment[] { + if (!policyArns) { return []; } + + const rep = '${' + logicalId + '}'; + return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns)); + } + + private readLambdaStatements(properties?: PropertyMap): Statement[] { + if (!properties) { return []; } + + return [parseLambdaPermission(renderIntrinsics(properties))]; + } +} + +/** + * Set an undefined or wildcarded principal on these statements + */ +function defaultPrincipal(principal: string, statements: Statement[]) { + statements.forEach(s => s.principals.replaceEmpty(principal)); + statements.forEach(s => s.principals.replaceStar(principal)); + return statements; +} + +/** + * Set an undefined or wildcarded resource on these statements + */ +function defaultResource(resource: string, statements: Statement[]) { + statements.forEach(s => s.resources.replaceEmpty(resource)); + statements.forEach(s => s.resources.replaceStar(resource)); + return statements; +} + +export interface IamChangesJson { + statementAdditions?: StatementJson[]; + statementRemovals?: StatementJson[]; + managedPolicyAdditions?: ManagedPolicyJson[]; + managedPolicyRemovals?: ManagedPolicyJson[]; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts index 106d24165a229..02e2134f99cd4 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts @@ -1 +1,122 @@ -export { SecurityGroupChangesProps, SecurityGroupChanges, SecurityGroupChangesJson } from '../diff/types'; +import * as chalk from 'chalk'; +import { PropertyChange, ResourceChange } from '../diff/types'; +import { DiffableCollection } from '../diffable'; +import { renderIntrinsics } from '../render-intrinsics'; +import { deepRemoveUndefined, dropIfEmpty, makeComparator } from '../util'; +import { RuleJson, SecurityGroupRule } from './security-group-rule'; + +export interface SecurityGroupChangesProps { + ingressRulePropertyChanges: PropertyChange[]; + ingressRuleResourceChanges: ResourceChange[]; + egressRuleResourceChanges: ResourceChange[]; + egressRulePropertyChanges: PropertyChange[]; +} + +/** + * Changes to IAM statements + */ +export class SecurityGroupChanges { + public readonly ingress = new DiffableCollection(); + public readonly egress = new DiffableCollection(); + + constructor(props: SecurityGroupChangesProps) { + // Group rules + for (const ingressProp of props.ingressRulePropertyChanges) { + this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId)); + this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId)); + } + for (const egressProp of props.egressRulePropertyChanges) { + this.egress.addOld(...this.readInlineRules(egressProp.oldValue, egressProp.resourceLogicalId)); + this.egress.addNew(...this.readInlineRules(egressProp.newValue, egressProp.resourceLogicalId)); + } + + // Rule resources + for (const ingressRes of props.ingressRuleResourceChanges) { + this.ingress.addOld(...this.readRuleResource(ingressRes.oldProperties)); + this.ingress.addNew(...this.readRuleResource(ingressRes.newProperties)); + } + for (const egressRes of props.egressRuleResourceChanges) { + this.egress.addOld(...this.readRuleResource(egressRes.oldProperties)); + this.egress.addNew(...this.readRuleResource(egressRes.newProperties)); + } + + this.ingress.calculateDiff(); + this.egress.calculateDiff(); + } + + public get hasChanges() { + return this.ingress.hasChanges || this.egress.hasChanges; + } + + /** + * Return a summary table of changes + */ + public summarize(): string[][] { + const ret: string[][] = []; + + const header = ['', 'Group', 'Dir', 'Protocol', 'Peer']; + + const inWord = 'In'; + const outWord = 'Out'; + + // Render a single rule to the table (curried function so we can map it across rules easily--thank you JavaScript!) + const renderRule = (plusMin: string, inOut: string) => (rule: SecurityGroupRule) => [ + plusMin, + rule.groupId, + inOut, + rule.describeProtocol(), + rule.describePeer(), + ].map(s => plusMin === '+' ? chalk.green(s) : chalk.red(s)); + + // First generate all lines, sort later + ret.push(...this.ingress.additions.map(renderRule('+', inWord))); + ret.push(...this.egress.additions.map(renderRule('+', outWord))); + ret.push(...this.ingress.removals.map(renderRule('-', inWord))); + ret.push(...this.egress.removals.map(renderRule('-', outWord))); + + // Sort by group name then ingress/egress (ingress first) + ret.sort(makeComparator((row: string[]) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1])); + + ret.splice(0, 0, header); + + return ret; + } + + public toJson(): SecurityGroupChangesJson { + return deepRemoveUndefined({ + ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map(s => s.toJson())), + ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map(s => s.toJson())), + egressRuleAdditions: dropIfEmpty(this.egress.additions.map(s => s.toJson())), + egressRuleRemovals: dropIfEmpty(this.egress.removals.map(s => s.toJson())), + }); + } + + public get rulesAdded(): boolean { + return this.ingress.hasAdditions + || this.egress.hasAdditions; + } + + private readInlineRules(rules: any, logicalId: string): SecurityGroupRule[] { + if (!rules) { return []; } + + // UnCloudFormation so the parser works in an easier domain + + const ref = '${' + logicalId + '.GroupId}'; + return rules.map((r: any) => new SecurityGroupRule(renderIntrinsics(r), ref)); + } + + private readRuleResource(resource: any): SecurityGroupRule[] { + if (!resource) { return []; } + + // UnCloudFormation so the parser works in an easier domain + + return [new SecurityGroupRule(renderIntrinsics(resource))]; + } +} + +export interface SecurityGroupChangesJson { + ingressRuleAdditions?: RuleJson[]; + ingressRuleRemovals?: RuleJson[]; + egressRuleAdditions?: RuleJson[]; + egressRuleRemovals?: RuleJson[]; +} From a6aeb2a92e02feb3d554602f878764abdb0e154b Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 13 Feb 2022 00:28:59 +0200 Subject: [PATCH 33/63] revert bin --- packages/aws-cdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index b5d29030c7b3d..0be9a28b72119 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "bin": { - "cdk": "bin/cdk.js" + "cdk": "bin/cdk" }, "scripts": { "dec": "https://github.com/yarnpkg/yarn/issues/5420", From d5a53d1ddeeb3bf93562f1921dd8b3e59f5d1ee4 Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 13 Feb 2022 00:31:32 +0200 Subject: [PATCH 34/63] cleanup --- packages/aws-cdk/package.json | 3 +-- tools/@aws-cdk/cdk-build-tools/config/eslintrc.js | 3 --- tools/@aws-cdk/cdk-build-tools/lib/package-info.ts | 14 -------------- yarn.lock | 2 +- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 0be9a28b72119..dfb6ae664a4fe 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -84,8 +84,7 @@ "sinon": "^9.2.4", "ts-jest": "^27.1.3", "ts-mock-imports": "^1.3.8", - "xml-js": "^1.6.11", - "esbuild": "^0.14.11" + "xml-js": "^1.6.11" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", diff --git a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js index cefa818076ca2..c10afb06ac5bc 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js +++ b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js @@ -64,9 +64,6 @@ module.exports = { 'space-before-blocks': 'error', // require space before blocks 'curly': ['error', 'multi-line', 'consistent'], // require curly braces for multiline control statements - // TODO this currently breaks @aws-cdk/core in a severe way - // 'import/no-cycle': ['error'], - // Require all imported dependencies are actually declared in package.json 'import/no-extraneous-dependencies': [ 'error', diff --git a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts index 5fda68125ba30..afc76b48bdefd 100644 --- a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts +++ b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -173,20 +173,6 @@ export interface CDKBuildOptions { * @see https://aws.github.io/jsii/user-guides/lib-author/toolchain/jsii/#-strip-deprecated */ stripDeprecated?: boolean; - - /** - * Should the package be bundled. - * - * @default false - */ - bundle?: boolean; - - /** - * Bundling configuration. - * - * @default - default configuration. - */ - bundleProps?: BundleProps; } export interface CDKPackageOptions { diff --git a/yarn.lock b/yarn.lock index f77256e009ba8..1dd976920a56e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4274,7 +4274,7 @@ esbuild-windows-arm64@0.14.21: resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.21.tgz#25df54521ad602c826b262ea2e7cc1fe80f5c2f5" integrity sha512-8Sbo0zpzgwWrwjQYLmHF78f7E2xg5Ve63bjB2ng3V2aManilnnTGaliq2snYg+NOX60+hEvJHRdVnuIAHW0lVw== -esbuild@^0.14.11, esbuild@^0.14.17, esbuild@^0.14.21: +esbuild@^0.14.17, esbuild@^0.14.21: version "0.14.21" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.21.tgz#b3e05f900f1c4394f596d60d63d9816468f0f671" integrity sha512-7WEoNMBJdLN993dr9h0CpFHPRc3yFZD+EAVY9lg6syJJ12gc5fHq8d75QRExuhnMkT2DaRiIKFThRvDWP+fO+A== From 785ee3c3c53e89534171ef0b2dfdd544f8270951 Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 13 Feb 2022 12:26:51 +0200 Subject: [PATCH 35/63] better algo for detecting external dependency version --- packages/aws-cdk/package.json | 1 - tools/@aws-cdk/node-bundle/src/api/_notice.ts | 10 +-- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 81 ++++++++++--------- 3 files changed, 47 insertions(+), 45 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index dfb6ae664a4fe..9354e512f039e 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -8,7 +8,6 @@ "cdk": "bin/cdk" }, "scripts": { - "dec": "https://github.com/yarnpkg/yarn/issues/5420", "build": "cdk-build", "watch": "cdk-watch", "lint": "cdk-lint", diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index 3e28a809647e1..bcd65bb99d4d9 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -16,9 +16,9 @@ const DEFAULT_VALID_LICENSES = [ ]; /** - * Dependency of a specific package on the local file system. + * Package on the local file system. */ -export interface Dependency { +export interface Package { /** * Path of the dependency on the local file system. */ @@ -44,7 +44,7 @@ export interface NoticeProps { /** * Package dependencies. */ - readonly dependencies: Dependency[]; + readonly dependencies: Package[]; /** * The parent directory underwhich all dependencies live. */ @@ -77,7 +77,7 @@ export interface NoticeProps { export class Notice { private readonly packageDir: string; - private readonly dependencies: Dependency[]; + private readonly dependencies: Package[]; private readonly validLicenses: string[]; private readonly copyright: string; private readonly dependenciesRoot: string; @@ -183,7 +183,7 @@ export class Notice { const attributions: Map = new Map(); - const pkg = (d: Dependency) => `${d.name}@${d.version}`; + const pkg = (d: Package) => `${d.name}@${d.version}`; const packages = this.dependencies.map(d => pkg(d)).join(';'); diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index c65d1eb3d2951..4191bc4f00913 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -2,7 +2,7 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import { Dependency, Notice } from './_notice'; +import { Package, Notice } from './_notice'; import { shell } from './shell'; import { Violation, ViolationType, ViolationsReport } from './violation'; @@ -101,7 +101,7 @@ export class Bundle { private readonly test?: string; private _bundle?: esbuild.BuildResult; - private _dependencies?: Dependency[]; + private _dependencies?: Package[]; private _dependenciesRoot?: string; private _notice?: Notice; @@ -209,13 +209,13 @@ export class Bundle { return this._bundle; } - private get dependencies(): Dependency[] { + private get dependencies(): Package[] { if (this._dependencies) { return this._dependencies; } const inputs = Object.keys(this.bundle.metafile!.inputs); - const packages = new Set(Array.from(inputs).map(i => this.closestPackage(path.join(this.packageDir, i)))); - this._dependencies = Array.from(packages).map(p => this.createDependency(p)).filter(d => d.name !== this.manifest.name); + const packages = new Set(Array.from(inputs).map(i => this.closestPackagePath(path.join(this.packageDir, i)))); + this._dependencies = Array.from(packages).map(p => this.createPackage(p)).filter(d => d.name !== this.manifest.name); return this._dependencies; } @@ -224,7 +224,7 @@ export class Bundle { return this._dependenciesRoot; } const lcp = longestCommonParent(this.dependencies.map(d => d.path)); - this._dependenciesRoot = this.closestPackage(lcp); + this._dependenciesRoot = this.closestPackagePath(lcp); return this._dependenciesRoot; } @@ -244,19 +244,40 @@ export class Bundle { return this._notice; } - private findPackages(name: string): string[] { + private findExternalDependencyVersion(name: string): string { - const paths: string[] = []; - walkDir(this.dependenciesRoot, (file: string) => { - if (file.endsWith(`node_modules/${name}`)) { - paths.push(file); + const versions = new Set(); + + // external dependencies will not exist in the dependencies list + // since esbuild skips over them. but they will exist as a dependency of + // one of them (or of us) + for (const pkg of [...this.dependencies, this.createPackage(this.packageDir)]) { + const manifest = fs.readJSONSync(path.join(pkg.path, 'package.json')); + const runtime = (manifest.dependencies ?? {})[name]; + const optional = (manifest.optionalDependencies ?? {})[name]; + + const pin = (version: string) => (version.startsWith('^') || version.startsWith('~')) ? version.substring(1) : version; + + if (runtime) { + versions.add(pin(runtime)); } - }); + if (optional) { + versions.add(pin(optional)); + } + } + + if (versions.size === 0) { + throw new Error(`Unable to detect version for external dependency: ${name}`); + } + + if (versions.size > 1) { + throw new Error(`Multiple versions detected for external dependency: ${name} (${Array.from(versions).join(',')})`); + } - return paths; + return versions.values().next().value; } - private closestPackage(fdp: string): string { + private closestPackagePath(fdp: string): string { if (fs.existsSync(path.join(fdp, 'package.json'))) { return fdp; @@ -266,12 +287,12 @@ export class Bundle { throw new Error('Unable to find package manifest'); } - return this.closestPackage(path.dirname(fdp)); + return this.closestPackagePath(path.dirname(fdp)); } - private createDependency(packageDir: string): Dependency { + private createPackage(packageDir: string): Package { const manifestPath = path.join(packageDir, 'package.json'); - const manifest = JSON.parse(fs.readFileSync(manifestPath, { encoding: 'utf-8' })); + const manifest = fs.readJSONSync(manifestPath); return { path: packageDir, name: manifest.name, version: manifest.version }; } @@ -348,27 +369,20 @@ export class Bundle { const parts = external.split(':'); const name = parts[0]; const type = parts[1]; - const paths = this.findPackages(name); - if (paths.length === 0) { - throw new Error(`Unable to locate external dependency: ${name}`); - } - if (paths.length > 1) { - throw new Error(`Found multiple paths for external dependency (${name}): ${paths.join(' | ')}`); - } - const dependency = this.createDependency(paths[0]); + const version = this.findExternalDependencyVersion(name); switch (type) { case 'optional': manifest.optionalDependencies = manifest.optionalDependencies ?? {}; - manifest.optionalDependencies[dependency.name] = dependency.version; + manifest.optionalDependencies[name] = version; break; case 'peer': manifest.peerDependencies = manifest.peerDependencies ?? {}; - manifest.peerDependencies[dependency.name] = dependency.version; + manifest.peerDependencies[name] = version; break; case '': manifest.dependencies = manifest.dependencies ?? {}; - manifest.dependencies[dependency.name] = dependency.version; + manifest.dependencies[name] = version; break; default: throw new Error(`Unsupported dependency type '${type}' for external dependency '${name}'`); @@ -417,14 +431,3 @@ function longestCommonParent(paths: string[]) { return paths.reduce(_longestCommonParent); } - -function walkDir(dir: string, handler: (file: string) => void) { - fs.readdirSync(dir).forEach(f => { - const fullPath = path.join(dir, f); - const isDirectory = fs.statSync(fullPath).isDirectory(); - if (isDirectory) { - walkDir(fullPath, handler); - } - handler(fullPath); - }); -}; From aedfa2b89c96aa1f730cd6cccdd23ab896fbc677 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 14 Feb 2022 02:38:34 +0200 Subject: [PATCH 36/63] more cleanup --- packages/aws-cdk/package.json | 3 +- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 21 ++--------- .../src/api/{shell.ts => _shell.ts} | 0 tools/@aws-cdk/node-bundle/src/api/bundle.ts | 35 ++++++++++++++++--- .../@aws-cdk/node-bundle/src/api/violation.ts | 13 +++++++ tools/@aws-cdk/node-bundle/src/cli.ts | 3 +- tools/@aws-cdk/node-bundle/test/_package.ts | 2 +- tools/@aws-cdk/node-bundle/test/cli.test.ts | 2 +- 8 files changed, 50 insertions(+), 29 deletions(-) rename tools/@aws-cdk/node-bundle/src/api/{shell.ts => _shell.ts} (100%) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 9354e512f039e..5aa7e7f45f600 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,8 @@ "BSD-2-Clause", "0BSD" ], - "dontAttribute": "(^@aws-cdk/|^cdk-assets$)" + "dontAttribute": "(^@aws-cdk/|^cdk-assets$)", + "test": "bin/cdk --version" } }, "author": { diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index bcd65bb99d4d9..165b9f88fc2ec 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -1,6 +1,7 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { shell } from './shell'; +import { shell } from './_shell'; +import type { Package } from './bundle'; import { Violation, ViolationType, ViolationsReport } from './violation'; /** @@ -15,24 +16,6 @@ const DEFAULT_VALID_LICENSES = [ '0BSD', ]; -/** - * Package on the local file system. - */ -export interface Package { - /** - * Path of the dependency on the local file system. - */ - readonly path: string; - /** - * Dependency name. - */ - readonly name: string; - /** - * Dependency version. - */ - readonly version: string; -} - /** * Properties for `Notice`. */ diff --git a/tools/@aws-cdk/node-bundle/src/api/shell.ts b/tools/@aws-cdk/node-bundle/src/api/_shell.ts similarity index 100% rename from tools/@aws-cdk/node-bundle/src/api/shell.ts rename to tools/@aws-cdk/node-bundle/src/api/_shell.ts diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 4191bc4f00913..f1cd86a5c890c 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -2,8 +2,8 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import { Package, Notice } from './_notice'; -import { shell } from './shell'; +import { Notice } from './_notice'; +import { shell } from './_shell'; import { Violation, ViolationType, ViolationsReport } from './violation'; /** @@ -83,6 +83,24 @@ export interface BundlePackOptions { readonly target?: string; } +/** + * Package on the local file system. + */ +export interface Package { + /** + * Path of the dependency on the local file system. + */ + readonly path: string; + /** + * Dependency name. + */ + readonly name: string; + /** + * Dependency version. + */ + readonly version: string; +} + /** * Bundle class to validate and pack nodejs bundles. */ @@ -148,7 +166,7 @@ export class Bundle { const report = this.validate(); if (!report.success) { - throw new Error(`Unable to pack due to validation errors.\n\n${report.violations.map(v => ` - ${v.type}: ${v.message}`).join('\n')}`); + throw new Error(`Unable to pack due to validation errors.\n\n${report.summary}`); } if (!fs.existsSync(target)) { @@ -169,14 +187,17 @@ export class Bundle { // to mutate it. const manifest = { ...this.manifest }; + // manifest mutations this.removeDependencies(manifest); this.addExternals(manifest); + + // write artifacts this.writeOutputs(workDir); this.writeResources(workDir); - - fs.writeFileSync(path.join(workDir, 'package.json'), JSON.stringify(manifest, null, 2)); + this.writeManifest(workDir, manifest); if (this.test) { + console.log('Running package santiy test'); shell(`${path.join(workDir, this.test)}`, { cwd: workDir }); } @@ -414,6 +435,10 @@ export class Bundle { fs.copySync(path.join(this.packageDir, src), path.join(workdir, dst), { recursive: true }); } } + + private writeManifest(workDir: string, manifest: any) { + fs.writeFileSync(path.join(workDir, 'package.json'), JSON.stringify(manifest, null, 2)); + } } function longestCommonParent(paths: string[]) { diff --git a/tools/@aws-cdk/node-bundle/src/api/violation.ts b/tools/@aws-cdk/node-bundle/src/api/violation.ts index 09e35e0787da7..02281b9bac4dd 100644 --- a/tools/@aws-cdk/node-bundle/src/api/violation.ts +++ b/tools/@aws-cdk/node-bundle/src/api/violation.ts @@ -81,4 +81,17 @@ export class ViolationsReport { return this.violations.length === 0; } + /** + * Summary of the violation in the report. + */ + public get summary(): string { + const summary = [ + `${this._violations.length} violations detected`, + ]; + for (const v of this._violations) { + summary.push(`- ${v.type}: ${v.message}${v.fix ? ' (fixable)' : ''}`); + } + return summary.join('\n'); + } + } diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index bac3d2682ddf7..2b18f17ae868f 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -63,8 +63,7 @@ async function buildCommands() { function validate(bundle: Bundle) { const report = bundle.validate(); if (!report.success) { - const violations = report.violations.map(v => `- ${v.type}: ${v.message}${v.fix ? ' (fixable)' : ''}`).join('\n'); - throw new Error(`${violations.length} violations detected:\n${violations}`); + throw new Error(report.summary); } } diff --git a/tools/@aws-cdk/node-bundle/test/_package.ts b/tools/@aws-cdk/node-bundle/test/_package.ts index 97754ff1d3e5d..d4c734d2e5be4 100644 --- a/tools/@aws-cdk/node-bundle/test/_package.ts +++ b/tools/@aws-cdk/node-bundle/test/_package.ts @@ -1,7 +1,7 @@ import * as os from 'os'; import * as path from 'path'; import * as fs from 'fs-extra'; -import { shell } from '../src/api/shell'; +import { shell } from '../src/api/_shell'; /** * Package options. diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts index 4bf58c591ec6f..c46c9de0b1dc4 100644 --- a/tools/@aws-cdk/node-bundle/test/cli.test.ts +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { shell } from '../src/api/shell'; +import { shell } from '../src/api/_shell'; import { Package } from './_package'; test('validate', () => { From 79da8ba0e89e62051d55a425bbcf042a3b3188cd Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 14 Feb 2022 02:42:18 +0200 Subject: [PATCH 37/63] added resource --- packages/aws-cdk/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 5aa7e7f45f600..8bb94d8d65653 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -34,6 +34,9 @@ ], "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", "noticePath": "NOTICES", + "resources": { + "../../node_modules/vm2/lib/bridge.js": "bin/bridge.js" + }, "entrypoints": [ "bin/cdk.js" ], From df33d0d3dfe6c40f90a83fa95075d0617354c6f8 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 14 Feb 2022 03:09:07 +0200 Subject: [PATCH 38/63] review --- packages/aws-cdk/lib/logging.ts | 2 +- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 13 ++++------- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 23 +++++++++---------- tools/@aws-cdk/pkglint/package.json | 1 + 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/packages/aws-cdk/lib/logging.ts b/packages/aws-cdk/lib/logging.ts index 83ef64ab6d98c..dad1b311ea179 100644 --- a/packages/aws-cdk/lib/logging.ts +++ b/packages/aws-cdk/lib/logging.ts @@ -13,7 +13,7 @@ const logger = (stream: Writable, styles?: StyleFn[]) => (fmt: string, ...args: stream.write(str + '\n'); }; -export const enum LogLevel { +export enum LogLevel { /** Not verbose at all */ DEFAULT = 0, /** Pretty verbose */ diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index 165b9f88fc2ec..d25820fab3e0e 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -4,10 +4,7 @@ import { shell } from './_shell'; import type { Package } from './bundle'; import { Violation, ViolationType, ViolationsReport } from './violation'; -/** - * Valid licenses that are ok to redistribute. - */ -const DEFAULT_VALID_LICENSES = [ +const DEFAULT_ALLOWED_LICENSES = [ 'Apache-2.0', 'MIT', 'BSD-3-Clause', @@ -16,6 +13,8 @@ const DEFAULT_VALID_LICENSES = [ '0BSD', ]; +const ATTRIBUTION_SEPARATOR = `'\n---------------\n'`; + /** * Properties for `Notice`. */ @@ -73,7 +72,7 @@ export class Notice { this.packageDir = props.packageDir; this.filePath = path.join(this.packageDir, props.filePath); this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); - this.validLicenses = (props.validLicenses ?? DEFAULT_VALID_LICENSES).map(l => l.toLowerCase()); + this.validLicenses = (props.validLicenses ?? DEFAULT_ALLOWED_LICENSES).map(l => l.toLowerCase()); this.copyright = props.copyright; this.dependenciesRoot = props.dependenciesRoot; @@ -142,12 +141,10 @@ export class Notice { notice.push(''); } - const separator = `\n${'-'.repeat(15)}\n`; - for (const attr of attributions.values()) { notice.push(`** ${attr.package} - ${attr.url} | ${attr.licenses[0]}`); notice.push(attr.licenseText ?? ''); - notice.push(separator); + notice.push(ATTRIBUTION_SEPARATOR); } return notice diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index f1cd86a5c890c..8a7b0dd78e274 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -179,7 +179,7 @@ export class Bundle { console.log('Creating package'); - const workDir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); + const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-pack-')); try { fs.copySync(this.packageDir, workDir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); @@ -250,18 +250,17 @@ export class Bundle { } private get notice(): Notice { - if (this._notice) { - return this._notice; + if (this._notice == null) { + this._notice = new Notice({ + packageDir: this.packageDir, + filePath: this.noticePath, + dependencies: this.dependencies, + dependenciesRoot: this.dependenciesRoot, + exclude: this.dontAttribute, + validLicenses: this.validLicenses, + copyright: this.copyright, + }); } - this._notice = new Notice({ - packageDir: this.packageDir, - filePath: this.noticePath, - dependencies: this.dependencies, - dependenciesRoot: this.dependenciesRoot, - exclude: this.dontAttribute, - validLicenses: this.validLicenses, - copyright: this.copyright, - }); return this._notice; } diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index b3aec2db6c7dd..e088440d29f12 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -37,6 +37,7 @@ }, "license": "Apache-2.0", "devDependencies": { + "@aws-cdk/node-bundle": "0.0.0", "@aws-cdk/eslint-plugin": "0.0.0", "@types/fs-extra": "^8.1.2", "@types/glob": "^7.2.0", From ba420557a8c1c83a85a1198a6107967b18f8aa83 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 14 Feb 2022 11:03:40 +0200 Subject: [PATCH 39/63] one more resource --- packages/aws-cdk/package.json | 3 ++- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 8bb94d8d65653..e5a97607526ea 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -35,7 +35,8 @@ "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", "noticePath": "NOTICES", "resources": { - "../../node_modules/vm2/lib/bridge.js": "bin/bridge.js" + "../../node_modules/vm2/lib/bridge.js": "bin/bridge.js", + "../../node_modules/vm2/lib/setup-sandbox.js": "bin/setup-sandbox.js" }, "entrypoints": [ "bin/cdk.js" diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index d25820fab3e0e..3b32e1c6d3b8f 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -13,7 +13,7 @@ const DEFAULT_ALLOWED_LICENSES = [ '0BSD', ]; -const ATTRIBUTION_SEPARATOR = `'\n---------------\n'`; +const ATTRIBUTION_SEPARATOR = '\n---------------\n'; /** * Properties for `Notice`. From f2e413d66e4e2e6fbdd8fce7aeb0fc08f50ce3e4 Mon Sep 17 00:00:00 2001 From: epolon Date: Mon, 14 Feb 2022 12:10:20 +0200 Subject: [PATCH 40/63] added build+test for node-bundle package --- tools/@aws-cdk/node-bundle/.projen/tasks.json | 8 ++++++++ tools/@aws-cdk/node-bundle/.projenrc.js | 6 ++++++ tools/@aws-cdk/node-bundle/package.json | 1 + tools/@aws-cdk/pkglint/package.json | 1 - 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/@aws-cdk/node-bundle/.projen/tasks.json b/tools/@aws-cdk/node-bundle/.projen/tasks.json index d7116b9a1028a..1c852b3dac750 100644 --- a/tools/@aws-cdk/node-bundle/.projen/tasks.json +++ b/tools/@aws-cdk/node-bundle/.projen/tasks.json @@ -24,6 +24,14 @@ } ] }, + "build+test": { + "name": "build+test", + "steps": [ + { + "spawn": "test" + } + ] + }, "bump": { "name": "bump", "description": "Bumps version based on latest git tag and generates a changelog entry", diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js index 1a2b16809e348..f2da66222471c 100644 --- a/tools/@aws-cdk/node-bundle/.projenrc.js +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -26,4 +26,10 @@ project.gitignore.exclude('.vscode/'); // needed for CLI tests to run project.testTask.prependSpawn(project.compileTask); + +// needed to conform to the repo build scripts +// note we don't need to compile because the test task does that +const buildAndTest = project.addTask('build+test'); +buildAndTest.spawn(project.testTask); + project.synth(); \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index f91e59ceae342..61173affe7713 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -5,6 +5,7 @@ }, "scripts": { "build": "npx projen build", + "build+test": "npx projen build+test", "bump": "npx projen bump", "clobber": "npx projen clobber", "compile": "npx projen compile", diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index e088440d29f12..b3aec2db6c7dd 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -37,7 +37,6 @@ }, "license": "Apache-2.0", "devDependencies": { - "@aws-cdk/node-bundle": "0.0.0", "@aws-cdk/eslint-plugin": "0.0.0", "@types/fs-extra": "^8.1.2", "@types/glob": "^7.2.0", From ca79b7da453668f98e6d5fff5313207e87464476 Mon Sep 17 00:00:00 2001 From: epolon Date: Tue, 15 Feb 2022 13:24:38 +0200 Subject: [PATCH 41/63] fix warnings check --- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 8a7b0dd78e274..a15ce6533470c 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -333,7 +333,7 @@ export class Bundle { allowOverwrite: true, }); - if (bundle.warnings.length) { + if (bundle.warnings.length > 0) { // esbuild warnings are usually important, lets try to be strict here. // the warnings themselves are printed on screen. throw new Error(`Found ${bundle.warnings.length} bundling warnings (See above)`); From 8e4a2323d0168c1cb86b4be7499e525b1ae6d364 Mon Sep 17 00:00:00 2001 From: epolon Date: Tue, 15 Feb 2022 14:29:43 +0200 Subject: [PATCH 42/63] split pack command to write + pack --- tools/@aws-cdk/node-bundle/README.md | 1 + tools/@aws-cdk/node-bundle/src/api/_shell.ts | 2 +- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 77 ++++++++++++------- tools/@aws-cdk/node-bundle/src/cli.ts | 9 +++ .../node-bundle/test/api/bundle.test.ts | 32 ++++++++ tools/@aws-cdk/node-bundle/test/cli.test.ts | 33 ++++++++ 6 files changed, 125 insertions(+), 29 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 3b8a00419b3b1..48f70e8d51ea1 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -71,6 +71,7 @@ Usage: node-bundle COMMAND Commands: node-bundle validate Validate the package is ready for bundling + node-bundle write Write the bundled version of the project to a temp directory node-bundle pack Create the tarball node-bundle fix Fix whatever we can for bundling diff --git a/tools/@aws-cdk/node-bundle/src/api/_shell.ts b/tools/@aws-cdk/node-bundle/src/api/_shell.ts index 638d67570c7b7..5f5cbde0d1292 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_shell.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_shell.ts @@ -11,5 +11,5 @@ export function shell(command: string, options: ShellOptions = {}): string { cwd: options.cwd, stdio: stdio, }); - return buffer ? buffer.toString() : ''; + return buffer ? buffer.toString().trim() : ''; } diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index a15ce6533470c..0c6e0045584b8 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -157,10 +157,42 @@ export class Bundle { return new ViolationsReport([...circularImports, ...resources, ...notice]); } + /** + * Write the bundle version of the project to a temp directory. + * This directory is what the tool will end up packing. + * + * Returns the temp directory location. + */ + public write(): string { + + const target = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-write-')); + + // copy the entire project since we are retaining the original files. + // except for `node_modules` and `.git` which definitely don't belong in the package. + fs.copySync(this.packageDir, target, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); + + // clone the original manifest since we are going to + // to mutate it. + const manifest = { ...this.manifest }; + + // manifest mutations + this.removeDependencies(manifest); + this.addExternals(manifest); + + // write artifacts + this.writeOutputs(target); + this.writeResources(target); + this.writeManifest(target, manifest); + + return target; + } + /** * Create the final npm package. + * + * Returns the location of the tarball. */ - public pack(options: BundlePackOptions = {}) { + public pack(options: BundlePackOptions = {}): string { const target = options.target ?? this.packageDir; @@ -173,40 +205,30 @@ export class Bundle { throw new Error(`Target doesnt exist: ${target}`); } - if (!fs.lstatSync(target).isDirectory()) { + // resolve symlinks. + const realTarget = fs.realpathSync(target); + + if (!fs.lstatSync(realTarget).isDirectory()) { throw new Error(`Target must be a directory: ${target}`); } - console.log('Creating package'); - - const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-pack-')); + console.log('Write bundle'); + const bundleDir = this.write(); try { - fs.copySync(this.packageDir, workDir, { filter: n => !n.includes('node_modules') && !n.includes('.git') }); - - // clone the original manifest since we are going to - // to mutate it. - const manifest = { ...this.manifest }; - - // manifest mutations - this.removeDependencies(manifest); - this.addExternals(manifest); - - // write artifacts - this.writeOutputs(workDir); - this.writeResources(workDir); - this.writeManifest(workDir, manifest); if (this.test) { console.log('Running package santiy test'); - shell(`${path.join(workDir, this.test)}`, { cwd: workDir }); + shell(`${path.join(bundleDir, this.test)}`, { cwd: bundleDir }); } // create the tarball - const tarball = shell('npm pack', { quiet: true, cwd: workDir }).trim(); - fs.copySync(path.join(workDir, tarball), path.join(target, tarball), { recursive: true }); - + console.log('Packing'); + const tarball = shell('npm pack', { quiet: true, cwd: bundleDir }).trim(); + const dest = path.join(realTarget, tarball); + fs.copySync(path.join(bundleDir, tarball), dest, { recursive: true }); + return dest; } finally { - fs.removeSync(workDir); + fs.removeSync(bundleDir); } } @@ -420,18 +442,17 @@ export class Bundle { } private writeOutputs(workDir: string) { - console.log('Writing output files'); for (const output of this.bundle.outputFiles ?? []) { const out = output.path.replace(this.packageDir, workDir); - console.log(` - ${out}`); fs.writeFileSync(out, output.contents); } } private writeResources(workdir: string) { - console.log('Copying resources'); for (const [src, dst] of Object.entries(this.resources)) { - fs.copySync(path.join(this.packageDir, src), path.join(workdir, dst), { recursive: true }); + const to = path.join(workdir, dst); + console.log(` - ${to}`); + fs.copySync(path.join(this.packageDir, src), to, { recursive: true }); } } diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index 2b18f17ae868f..f05d91d50bbe3 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -19,6 +19,7 @@ async function buildCommands() { .option('dont-attribute', { type: 'string', desc: 'Dependencies matching this regular expressions wont be added to the notice file' }) .option('test', { type: 'string', desc: 'Validation command to sanity test the bundle after its created' }) .command('validate', 'Validate the package is ready for bundling') + .command('write', 'Write the bundled version of the project to a temp directory') .command('pack', 'Create the tarball') .command('fix', 'Fix whatever we can for bundling') .help() @@ -49,6 +50,9 @@ async function buildCommands() { case 'validate': validate(bundle); break; + case 'write': + write(bundle); + break; case 'pack': pack(bundle); break; @@ -60,6 +64,11 @@ async function buildCommands() { } } +function write(bundle: Bundle) { + const bundleDir = bundle.write(); + console.log(bundleDir); +} + function validate(bundle: Bundle) { const report = bundle.validate(); if (!report.success) { diff --git a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts index 9207466f657c3..68aa56eb34cf6 100644 --- a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -31,6 +31,38 @@ test('validate', () => { expect(actual).toEqual(expected); }); +test('write', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + copyright: 'copyright', + entrypoints: [pkg.entrypoint], + licenses: ['Apache-2.0', 'MIT'], + }); + + const bundleDir = bundle.write(); + + expect(fs.existsSync(path.join(bundleDir, pkg.entrypoint))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'package.json'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'NOTICE'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'foo.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'bar.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'node_modules'))).toBeFalsy(); + expect(fs.existsSync(path.join(bundleDir, '.git'))).toBeFalsy(); + + const manifest = fs.readJSONSync(path.join(bundleDir, 'package.json')); + + expect(manifest.dependencies).toEqual({}); + +}); + test('pack', () => { const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts index c46c9de0b1dc4..4ab120c757eca 100644 --- a/tools/@aws-cdk/node-bundle/test/cli.test.ts +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -36,6 +36,39 @@ test('validate', () => { }); +test('write', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const command = [ + whereami(), + '--copyright', 'copyright', + '--entrypoint', pkg.entrypoint, + '--license', 'Apache-2.0', + '--license', 'MIT', + 'write', + ].join(' '); + const bundleDir = shell(command, { cwd: pkg.dir, quiet: true }); + + expect(fs.existsSync(path.join(bundleDir, pkg.entrypoint))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'package.json'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'NOTICE'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'foo.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'bar.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'node_modules'))).toBeFalsy(); + expect(fs.existsSync(path.join(bundleDir, '.git'))).toBeFalsy(); + + const manifest = fs.readJSONSync(path.join(bundleDir, 'package.json')); + + expect(manifest.dependencies).toEqual({}); + +}); + test('fix', () => { const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); From f3af9b17c0f6d7ff621ec9b9be61aed9d0dd9215 Mon Sep 17 00:00:00 2001 From: epolon Date: Tue, 15 Feb 2022 15:01:11 +0200 Subject: [PATCH 43/63] use validate --fix instead of fix --- tools/@aws-cdk/node-bundle/README.md | 3 +- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 48 +++++++++++++------ tools/@aws-cdk/node-bundle/src/cli.ts | 22 ++++----- .../node-bundle/test/api/bundle.test.ts | 4 +- tools/@aws-cdk/node-bundle/test/cli.test.ts | 4 +- 5 files changed, 46 insertions(+), 35 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 48f70e8d51ea1..ac761f3953989 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -72,8 +72,7 @@ Usage: node-bundle COMMAND Commands: node-bundle validate Validate the package is ready for bundling node-bundle write Write the bundled version of the project to a temp directory - node-bundle pack Create the tarball - node-bundle fix Fix whatever we can for bundling + node-bundle pack Write the bundle and create the tarball Options: --entrypoint List of entrypoints to bundle [array] [required] diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 0c6e0045584b8..235779b5ce41d 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -83,6 +83,15 @@ export interface BundlePackOptions { readonly target?: string; } +export interface BundleValidateOptions { + /** + * Automatically fix any (fixable) violations. + * + * @default false + */ + readonly fix?: boolean; +} + /** * Package on the local file system. */ @@ -147,14 +156,35 @@ export class Bundle { /** * Validate the bundle for violations. * + * If `fix` is set to true, this method will return the remaining + * violations after the fixes were applied. + * * This method never throws. The Caller is responsible for inspecting the * returned report and act accordinagly. */ - public validate(): ViolationsReport { + public validate(options: BundleValidateOptions = {}): ViolationsReport { + + const fix = options.fix ?? false; + + // first validate const circularImports = this.validateCircularImports(); const resources = this.validateResources(); const notice = this.validateNotice(); - return new ViolationsReport([...circularImports, ...resources, ...notice]); + + const report = new ViolationsReport([...circularImports, ...resources, ...notice]); + + if (!fix) { + return report; + } + + for (const violation of report.violations) { + if (violation.fix) { + violation.fix(); + } + } + + // return the un fixable violations + return new ViolationsReport(report.violations.filter(v => !v.fix)); } /** @@ -188,7 +218,7 @@ export class Bundle { } /** - * Create the final npm package. + * Write the bundle and create the tarball. * * Returns the location of the tarball. */ @@ -232,18 +262,6 @@ export class Bundle { } } - /** - * Fix any fixable violations. - */ - public fix() { - const violations = this.validate(); - for (const violation of violations.violations) { - if (violation.fix) { - violation.fix(); - } - } - } - private get bundle(): esbuild.BuildResult { if (this._bundle) { return this._bundle; diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index f05d91d50bbe3..6a47c4d32b3d3 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as fs from 'fs-extra'; import * as yargs from 'yargs'; -import { Bundle, BundleProps } from './api'; +import { Bundle, BundleProps, BundleValidateOptions } from './api'; function versionNumber(): string { return fs.readJSONSync(path.join(__dirname, '..', 'package.json')).version; @@ -18,10 +18,11 @@ async function buildCommands() { .option('resource', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) .option('dont-attribute', { type: 'string', desc: 'Dependencies matching this regular expressions wont be added to the notice file' }) .option('test', { type: 'string', desc: 'Validation command to sanity test the bundle after its created' }) - .command('validate', 'Validate the package is ready for bundling') + .command('validate', 'Validate the package is ready for bundling', args => args + .option('fix', { type: 'boolean', default: false, alias: 'f', desc: 'Fix any fixable violations' }), + ) .command('write', 'Write the bundled version of the project to a temp directory') - .command('pack', 'Create the tarball') - .command('fix', 'Fix whatever we can for bundling') + .command('pack', 'Write the bundle and create the tarball') .help() .version(versionNumber()) .argv; @@ -48,7 +49,7 @@ async function buildCommands() { switch (command) { case 'validate': - validate(bundle); + validate(bundle, { fix: argv.fix }); break; case 'write': write(bundle); @@ -56,9 +57,6 @@ async function buildCommands() { case 'pack': pack(bundle); break; - case 'fix': - fix(bundle); - break; default: throw new Error(`Unknown command: ${command}`); } @@ -69,8 +67,8 @@ function write(bundle: Bundle) { console.log(bundleDir); } -function validate(bundle: Bundle) { - const report = bundle.validate(); +function validate(bundle: Bundle, options: BundleValidateOptions = {}) { + const report = bundle.validate(options); if (!report.success) { throw new Error(report.summary); } @@ -80,10 +78,6 @@ function pack(bundle: Bundle) { bundle.pack(); } -function fix(bundle: Bundle) { - bundle.fix(); -} - buildCommands() .catch((err: Error) => { console.error(`Error: ${err.message}`); diff --git a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts index 68aa56eb34cf6..4d3956853924d 100644 --- a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -107,7 +107,7 @@ test('pack', () => { }); -test('fix', () => { +test('validate and fix', () => { const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); @@ -129,7 +129,7 @@ test('fix', () => { } catch (e) { // this should fix the fact we don't generate // the project with the correct notice - bundle.fix(); + bundle.validate({ fix: true }); } bundle.pack(); diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts index 4ab120c757eca..249117d63cbfa 100644 --- a/tools/@aws-cdk/node-bundle/test/cli.test.ts +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -69,7 +69,7 @@ test('write', () => { }); -test('fix', () => { +test('validate and fix', () => { const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); @@ -96,7 +96,7 @@ test('fix', () => { } catch (e) { // this should fix the fact we don't generate // the project with the correct notice - run('fix'); + run('validate --fix'); } run('pack'); From 9b8d528be0c623271f4bd2233e0640fbc1478aa7 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 16 Feb 2022 15:58:58 +0200 Subject: [PATCH 44/63] bundle index.js --- packages/aws-cdk/NOTICES | 780 +++++++++---------- packages/aws-cdk/bin/cdk.ts | 578 +------------- packages/aws-cdk/lib/cli.ts | 582 ++++++++++++++ packages/aws-cdk/lib/index.ts | 1 + packages/aws-cdk/package.json | 2 +- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 8 +- 6 files changed, 980 insertions(+), 971 deletions(-) create mode 100644 packages/aws-cdk/lib/cli.ts diff --git a/packages/aws-cdk/NOTICES b/packages/aws-cdk/NOTICES index 684ebf256af7f..d301deeb4415e 100644 --- a/packages/aws-cdk/NOTICES +++ b/packages/aws-cdk/NOTICES @@ -68,92 +68,6 @@ SOFTWARE. ** source-map-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT ---------------- - -** jsonschema@1.4.0 - https://www.npmjs.com/package/jsonschema/v/1.4.0 | MIT -jsonschema is licensed under MIT license. - -Copyright (C) 2012-2015 Tom de Grunt - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ---------------- - -** semver@7.3.5 - https://www.npmjs.com/package/semver/v/7.3.5 | ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------- - -** yallist@4.0.0 - https://www.npmjs.com/package/yallist/v/4.0.0 | ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------- - -** lru-cache@6.0.0 - https://www.npmjs.com/package/lru-cache/v/6.0.0 | ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------- ** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT @@ -250,209 +164,203 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------- -** @jsii/check-node@1.53.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.53.0 | Apache-2.0 +** universalify@2.0.0 - https://www.npmjs.com/package/universalify/v/2.0.0 | MIT +(The MIT License) - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Copyright (c) 2017, Ryan Zimmerman - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: - 1. Definitions. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +--------------- - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +** graceful-fs@4.2.9 - https://www.npmjs.com/package/graceful-fs/v/4.2.9 | ISC +The ISC License - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +--------------- - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT +(The MIT License) - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +Copyright (c) 2011-2017 JP Richardson - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC +The ISC License +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--------------- + +** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------- + +** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +--------------- + +** jsonschema@1.4.0 - https://www.npmjs.com/package/jsonschema/v/1.4.0 | MIT +jsonschema is licensed under MIT license. + +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +--------------- - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +** semver@7.3.5 - https://www.npmjs.com/package/semver/v/7.3.5 | ISC +The ISC License - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +Copyright (c) Isaac Z. Schlueter and Contributors - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +--------------- - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +** yallist@4.0.0 - https://www.npmjs.com/package/yallist/v/4.0.0 | ISC +The ISC License - END OF TERMS AND CONDITIONS +Copyright (c) Isaac Z. Schlueter and Contributors - APPENDIX: How to apply the Apache License to your work. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +--------------- - http://www.apache.org/licenses/LICENSE-2.0 +** lru-cache@6.0.0 - https://www.npmjs.com/package/lru-cache/v/6.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------- @@ -753,127 +661,31 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -==== - -`String.fromCodePoint` by Mathias Bynens used according to terms of MIT -License, as follows: - - Copyright Mathias Bynens - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ---------------- - -** universalify@2.0.0 - https://www.npmjs.com/package/universalify/v/2.0.0 | MIT -(The MIT License) - -Copyright (c) 2017, Ryan Zimmerman - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the 'Software'), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ---------------- - -** graceful-fs@4.2.9 - https://www.npmjs.com/package/graceful-fs/v/4.2.9 | ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------- - -** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT -(The MIT License) - -Copyright (c) 2011-2017 JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ---------------- - -** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC -The ISC License -Copyright (c) 2020 Ryan Zimmerman - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------- +==== -** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT -(The MIT License) +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: -Copyright (c) 2012-2015, JP Richardson + Copyright Mathias Bynens -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------- @@ -2106,24 +1918,6 @@ THE SOFTWARE. ** proxy-agent@5.0.0 - https://www.npmjs.com/package/proxy-agent/v/5.0.0 | MIT ---------------- - -** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC -Copyright 2018 Eemeli Aro - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - --------------- ** uuid@8.3.2 - https://www.npmjs.com/package/uuid/v/8.3.2 | MIT @@ -3688,6 +3482,212 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +--------------- + +** @jsii/check-node@1.53.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.53.0 | Apache-2.0 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --------------- ** picomatch@2.3.1 - https://www.npmjs.com/package/picomatch/v/2.3.1 | MIT diff --git a/packages/aws-cdk/bin/cdk.ts b/packages/aws-cdk/bin/cdk.ts index 7f52161e4fd0d..14ce2f55aa42b 100644 --- a/packages/aws-cdk/bin/cdk.ts +++ b/packages/aws-cdk/bin/cdk.ts @@ -1,578 +1,4 @@ #!/usr/bin/env node -import 'source-map-support/register'; -import * as cxapi from '@aws-cdk/cx-api'; -import '@jsii/check-node/run'; -import * as chalk from 'chalk'; +import { cli } from '../lib'; -import type { Argv } from 'yargs'; -import { SdkProvider } from '../lib/api/aws-auth'; -import { BootstrapSource, Bootstrapper } from '../lib/api/bootstrap'; -import { CloudFormationDeployments } from '../lib/api/cloudformation-deployments'; -import { StackSelector } from '../lib/api/cxapp/cloud-assembly'; -import { CloudExecutable } from '../lib/api/cxapp/cloud-executable'; -import { execProgram } from '../lib/api/cxapp/exec'; -import { ToolkitInfo } from '../lib/api/toolkit-info'; -import { StackActivityProgress } from '../lib/api/util/cloudformation/stack-activity-monitor'; -import { CdkToolkit } from '../lib/cdk-toolkit'; -import { realHandler as context } from '../lib/commands/context'; -import { realHandler as docs } from '../lib/commands/docs'; -import { realHandler as doctor } from '../lib/commands/doctor'; -import { RequireApproval } from '../lib/diff'; -import { availableInitLanguages, cliInit, printAvailableTemplates } from '../lib/init'; -import { data, debug, error, print, setLogLevel } from '../lib/logging'; -import { PluginHost } from '../lib/plugin'; -import { serializeStructure } from '../lib/serialize'; -import { Command, Configuration, Settings } from '../lib/settings'; -import * as version from '../lib/version'; - -// https://github.com/yargs/yargs/issues/1929 -// https://github.com/evanw/esbuild/issues/1492 -// eslint-disable-next-line @typescript-eslint/no-require-imports -const yargs = require('yargs'); - -/* eslint-disable max-len */ -/* eslint-disable @typescript-eslint/no-shadow */ // yargs - -async function parseCommandLineArguments() { - // Use the following configuration for array arguments: - // - // { type: 'array', default: [], nargs: 1, requiresArg: true } - // - // The default behavior of yargs is to eat all strings following an array argument: - // - // ./prog --arg one two positional => will parse to { arg: ['one', 'two', 'positional'], _: [] } (so no positional arguments) - // ./prog --arg one two -- positional => does not help, for reasons that I can't understand. Still gets parsed incorrectly. - // - // By using the config above, every --arg will only consume one argument, so you can do the following: - // - // ./prog --arg one --arg two position => will parse to { arg: ['one', 'two'], _: ['positional'] }. - - const defaultBrowserCommand: { [key in NodeJS.Platform]?: string } = { - darwin: 'open %u', - win32: 'start %u', - }; - - const initTemplateLanguages = await availableInitLanguages(); - return yargs - .env('CDK') - .usage('Usage: cdk -a COMMAND') - .option('app', { type: 'string', alias: 'a', desc: 'REQUIRED: command-line for executing your app or a cloud assembly directory (e.g. "node bin/my-app.js")', requiresArg: true }) - .option('context', { type: 'array', alias: 'c', desc: 'Add contextual string parameter (KEY=VALUE)', nargs: 1, requiresArg: true }) - .option('plugin', { type: 'array', alias: 'p', desc: 'Name or path of a node package that extend the CDK features. Can be specified multiple times', nargs: 1 }) - .option('trace', { type: 'boolean', desc: 'Print trace for stack warnings' }) - .option('strict', { type: 'boolean', desc: 'Do not construct stacks with warnings' }) - .option('lookups', { type: 'boolean', desc: 'Perform context lookups (synthesis fails if this is disabled and context lookups need to be performed)', default: true }) - .option('ignore-errors', { type: 'boolean', default: false, desc: 'Ignores synthesis errors, which will likely produce an invalid output' }) - .option('json', { type: 'boolean', alias: 'j', desc: 'Use JSON output instead of YAML when templates are printed to STDOUT', default: false }) - .option('verbose', { type: 'boolean', alias: 'v', desc: 'Show debug logs (specify multiple times to increase verbosity)', default: false }) - .count('verbose') - .option('debug', { type: 'boolean', desc: 'Enable emission of additional debugging information, such as creation stack traces of tokens', default: false }) - .option('profile', { type: 'string', desc: 'Use the indicated AWS profile as the default environment', requiresArg: true }) - .option('proxy', { type: 'string', desc: 'Use the indicated proxy. Will read from HTTPS_PROXY environment variable if not specified', requiresArg: true }) - .option('ca-bundle-path', { type: 'string', desc: 'Path to CA certificate to use when validating HTTPS requests. Will read from AWS_CA_BUNDLE environment variable if not specified', requiresArg: true }) - .option('ec2creds', { type: 'boolean', alias: 'i', default: undefined, desc: 'Force trying to fetch EC2 instance credentials. Default: guess EC2 instance status' }) - .option('version-reporting', { type: 'boolean', desc: 'Include the "AWS::CDK::Metadata" resource in synthesized templates (enabled by default)', default: undefined }) - .option('path-metadata', { type: 'boolean', desc: 'Include "aws:cdk:path" CloudFormation metadata for each resource (enabled by default)', default: true }) - .option('asset-metadata', { type: 'boolean', desc: 'Include "aws:asset:*" CloudFormation metadata for resources that uses assets (enabled by default)', default: true }) - .option('role-arn', { type: 'string', alias: 'r', desc: 'ARN of Role to use when invoking CloudFormation', default: undefined, requiresArg: true }) - .option('toolkit-stack-name', { type: 'string', desc: 'The name of the CDK toolkit stack', requiresArg: true }) - .option('staging', { type: 'boolean', desc: 'Copy assets to the output directory (use --no-staging to disable, needed for local debugging the source files with SAM CLI)', default: true }) - .option('output', { type: 'string', alias: 'o', desc: 'Emits the synthesized cloud assembly into a directory (default: cdk.out)', requiresArg: true }) - .option('no-color', { type: 'boolean', desc: 'Removes colors and other style from console output', default: false }) - .command(['list [STACKS..]', 'ls [STACKS..]'], 'Lists all stacks in the app', (yargs: Argv) => yargs - .option('long', { type: 'boolean', default: false, alias: 'l', desc: 'Display environment information for each stack' }), - ) - .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: Argv) => yargs - .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only synthesize requested stacks, don\'t include dependencies' }) - .option('validation', { type: 'boolean', desc: 'After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION)', default: true }) - .option('quiet', { type: 'boolean', alias: 'q', desc: 'Do not output CloudFormation Template to stdout', default: false })) - .command('bootstrap [ENVIRONMENTS..]', 'Deploys the CDK toolkit stack into an AWS environment', (yargs: Argv) => yargs - .option('bootstrap-bucket-name', { type: 'string', alias: ['b', 'toolkit-bucket-name'], desc: 'The name of the CDK toolkit bucket; bucket will be created and must not exist', default: undefined }) - .option('bootstrap-kms-key-id', { type: 'string', desc: 'AWS KMS master key ID used for the SSE-KMS encryption', default: undefined, conflicts: 'bootstrap-customer-key' }) - .option('bootstrap-customer-key', { type: 'boolean', desc: 'Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only)', default: undefined, conflicts: 'bootstrap-kms-key-id' }) - .option('qualifier', { type: 'string', desc: 'String which must be unique for each bootstrap stack. You must configure it on your CDK app if you change this from the default.', default: undefined }) - .option('public-access-block-configuration', { type: 'boolean', desc: 'Block public access configuration on CDK toolkit bucket (enabled by default) ', default: undefined }) - .option('tags', { type: 'array', alias: 't', desc: 'Tags to add for the stack (KEY=VALUE)', nargs: 1, requiresArg: true, default: [] }) - .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) - .option('trust', { type: 'array', desc: 'The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only)', default: [], nargs: 1, requiresArg: true }) - .option('trust-for-lookup', { type: 'array', desc: 'The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only)', default: [], nargs: 1, requiresArg: true }) - .option('cloudformation-execution-policies', { type: 'array', desc: 'The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only)', default: [], nargs: 1, requiresArg: true }) - .option('force', { alias: 'f', type: 'boolean', desc: 'Always bootstrap even if it would downgrade template version', default: false }) - .option('termination-protection', { type: 'boolean', default: undefined, desc: 'Toggle CloudFormation termination protection on the bootstrap stacks' }) - .option('show-template', { type: 'boolean', desc: 'Instead of actual bootstrapping, print the current CLI\'s bootstrapping template to stdout for customization', default: false }) - .option('template', { type: 'string', requiresArg: true, desc: 'Use the template from the given file instead of the built-in one (use --show-template to obtain an example)' }), - ) - .command('deploy [STACKS..]', 'Deploys the stack(s) named STACKS into your AWS account', (yargs: Argv) => yargs - .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) - .option('build-exclude', { type: 'array', alias: 'E', nargs: 1, desc: 'Do not rebuild asset with the given ID. Can be specified multiple times', default: [] }) - .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only deploy requested stacks, don\'t include dependencies' }) - .option('require-approval', { type: 'string', choices: [RequireApproval.Never, RequireApproval.AnyChange, RequireApproval.Broadening], desc: 'What security-sensitive changes need manual approval' }) - .option('ci', { type: 'boolean', desc: 'Force CI detection', default: process.env.CI !== undefined }) - .option('notification-arns', { type: 'array', desc: 'ARNs of SNS topics that CloudFormation will notify with stack related events', nargs: 1, requiresArg: true }) - // @deprecated(v2) -- tags are part of the Cloud Assembly and tags specified here will be overwritten on the next deployment - .option('tags', { type: 'array', alias: 't', desc: 'Tags to add to the stack (KEY=VALUE), overrides tags from Cloud Assembly (deprecated)', nargs: 1, requiresArg: true }) - .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) - .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) - .option('force', { alias: 'f', type: 'boolean', desc: 'Always deploy stack even if templates are identical', default: false }) - .option('parameters', { type: 'array', desc: 'Additional parameters passed to CloudFormation at deploy time (STACK:KEY=VALUE)', nargs: 1, requiresArg: true, default: {} }) - .option('outputs-file', { type: 'string', alias: 'O', desc: 'Path to file where stack outputs will be written as JSON', requiresArg: true }) - .option('previous-parameters', { type: 'boolean', default: true, desc: 'Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled)' }) - .option('progress', { type: 'string', choices: [StackActivityProgress.BAR, StackActivityProgress.EVENTS], desc: 'Display mode for stack activity events' }) - .option('rollback', { - type: 'boolean', - desc: "Rollback stack to stable state on failure. Defaults to 'true', iterate more rapidly with --no-rollback or -R. " + - 'Note: do **not** disable this flag for deployments with resource replacements, as that will always fail', - }) - // Hack to get '-R' as an alias for '--no-rollback', suggested by: https://github.com/yargs/yargs/issues/1729 - .option('R', { type: 'boolean', hidden: true }).middleware(yargsNegativeAlias('R', 'rollback'), true) - .option('hotswap', { - type: 'boolean', - desc: "Attempts to perform a 'hotswap' deployment, " + - 'which skips CloudFormation and updates the resources directly, ' + - 'and falls back to a full deployment if that is not possible. ' + - 'Do not use this in production environments', - }) - .option('watch', { - type: 'boolean', - desc: 'Continuously observe the project files, ' + - 'and deploy the given stack(s) automatically when changes are detected. ' + - 'Implies --hotswap by default', - }) - .options('logs', { - type: 'boolean', - default: true, - desc: 'Show CloudWatch log events from all resources in the selected Stacks in the terminal. ' + - "'true' by default, use --no-logs to turn off. " + - "Only in effect if specified alongside the '--watch' option", - }), - ) - .command('watch [STACKS..]', "Shortcut for 'deploy --watch'", (yargs: Argv) => yargs - // I'm fairly certain none of these options, present for 'deploy', make sense for 'watch': - // .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) - // .option('ci', { type: 'boolean', desc: 'Force CI detection', default: process.env.CI !== undefined }) - // @deprecated(v2) -- tags are part of the Cloud Assembly and tags specified here will be overwritten on the next deployment - // .option('tags', { type: 'array', alias: 't', desc: 'Tags to add to the stack (KEY=VALUE), overrides tags from Cloud Assembly (deprecated)', nargs: 1, requiresArg: true }) - // .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) - // These options, however, are more subtle - I could be convinced some of these should also be available for 'watch': - // .option('require-approval', { type: 'string', choices: [RequireApproval.Never, RequireApproval.AnyChange, RequireApproval.Broadening], desc: 'What security-sensitive changes need manual approval' }) - // .option('parameters', { type: 'array', desc: 'Additional parameters passed to CloudFormation at deploy time (STACK:KEY=VALUE)', nargs: 1, requiresArg: true, default: {} }) - // .option('previous-parameters', { type: 'boolean', default: true, desc: 'Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled)' }) - // .option('outputs-file', { type: 'string', alias: 'O', desc: 'Path to file where stack outputs will be written as JSON', requiresArg: true }) - // .option('notification-arns', { type: 'array', desc: 'ARNs of SNS topics that CloudFormation will notify with stack related events', nargs: 1, requiresArg: true }) - .option('build-exclude', { type: 'array', alias: 'E', nargs: 1, desc: 'Do not rebuild asset with the given ID. Can be specified multiple times', default: [] }) - .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only deploy requested stacks, don\'t include dependencies' }) - .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) - .option('force', { alias: 'f', type: 'boolean', desc: 'Always deploy stack even if templates are identical', default: false }) - .option('progress', { type: 'string', choices: [StackActivityProgress.BAR, StackActivityProgress.EVENTS], desc: 'Display mode for stack activity events' }) - .option('rollback', { - type: 'boolean', - desc: "Rollback stack to stable state on failure. Defaults to 'true', iterate more rapidly with --no-rollback or -R. " + - 'Note: do **not** disable this flag for deployments with resource replacements, as that will always fail', - }) - // same hack for -R as above in 'deploy' - .option('R', { type: 'boolean', hidden: true }).middleware(yargsNegativeAlias('R', 'rollback'), true) - .option('hotswap', { - type: 'boolean', - desc: "Attempts to perform a 'hotswap' deployment, " + - 'which skips CloudFormation and updates the resources directly, ' + - 'and falls back to a full deployment if that is not possible. ' + - "'true' by default, use --no-hotswap to turn off", - }) - .options('logs', { - type: 'boolean', - default: true, - desc: 'Show CloudWatch log events from all resources in the selected Stacks in the terminal. ' + - "'true' by default, use --no-logs to turn off", - }), - ) - .command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', (yargs: Argv) => yargs - .option('all', { type: 'boolean', default: false, desc: 'Destroy all available stacks' }) - .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only destroy requested stacks, don\'t include dependees' }) - .option('force', { type: 'boolean', alias: 'f', desc: 'Do not ask for confirmation before destroying the stacks' })) - .command('diff [STACKS..]', 'Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found', (yargs: Argv) => yargs - .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only diff requested stacks, don\'t include dependencies' }) - .option('context-lines', { type: 'number', desc: 'Number of context lines to include in arbitrary JSON diff rendering', default: 3, requiresArg: true }) - .option('template', { type: 'string', desc: 'The path to the CloudFormation template to compare with', requiresArg: true }) - .option('strict', { type: 'boolean', desc: 'Do not filter out AWS::CDK::Metadata resources', default: false }) - .option('security-only', { type: 'boolean', desc: 'Only diff for broadened security changes', default: false }) - .option('fail', { type: 'boolean', desc: 'Fail with exit code 1 in case of diff', default: false })) - .command('metadata [STACK]', 'Returns all metadata associated with this stack') - .command('init [TEMPLATE]', 'Create a new, empty CDK project from a template.', (yargs: Argv) => yargs - .option('language', { type: 'string', alias: 'l', desc: 'The language to be used for the new project (default can be configured in ~/.cdk.json)', choices: initTemplateLanguages }) - .option('list', { type: 'boolean', desc: 'List the available templates' }) - .option('generate-only', { type: 'boolean', default: false, desc: 'If true, only generates project files, without executing additional operations such as setting up a git repo, installing dependencies or compiling the project' }), - ) - .command('context', 'Manage cached context values', (yargs: Argv) => yargs - .option('reset', { alias: 'e', desc: 'The context key (or its index) to reset', type: 'string', requiresArg: true }) - .option('clear', { desc: 'Clear all context', type: 'boolean' })) - .command(['docs', 'doc'], 'Opens the reference documentation in a browser', (yargs: Argv) => yargs - .option('browser', { - alias: 'b', - desc: 'the command to use to open the browser, using %u as a placeholder for the path of the file to open', - type: 'string', - default: process.platform in defaultBrowserCommand ? defaultBrowserCommand[process.platform] : 'xdg-open %u', - })) - .command('doctor', 'Check your set-up for potential problems') - .version(version.DISPLAY_VERSION) - .demandCommand(1, '') // just print help - .recommendCommands() - .help() - .alias('h', 'help') - .epilogue([ - 'If your app has a single stack, there is no need to specify the stack name', - 'If one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', - ].join('\n\n')) - .argv; -} - -if (!process.stdout.isTTY) { - // Disable chalk color highlighting - process.env.FORCE_COLOR = '0'; -} - -async function initCommandLine() { - const argv = await parseCommandLineArguments(); - if (argv.verbose) { - setLogLevel(argv.verbose); - } - debug('CDK toolkit version:', version.DISPLAY_VERSION); - debug('Command line arguments:', argv); - - const configuration = new Configuration({ - commandLineArguments: { - ...argv, - _: argv._ as [Command, ...string[]], // TypeScript at its best - }, - }); - await configuration.load(); - - const sdkProvider = await SdkProvider.withAwsCliCompatibleDefaults({ - profile: configuration.settings.get(['profile']), - ec2creds: argv.ec2creds, - httpOptions: { - proxyAddress: argv.proxy, - caBundlePath: argv['ca-bundle-path'], - }, - }); - - const cloudFormation = new CloudFormationDeployments({ sdkProvider }); - - const cloudExecutable = new CloudExecutable({ - configuration, - sdkProvider, - synthesizer: execProgram, - }); - - /** Function to load plug-ins, using configurations additively. */ - function loadPlugins(...settings: Settings[]) { - const loaded = new Set(); - for (const source of settings) { - const plugins: string[] = source.get(['plugin']) || []; - for (const plugin of plugins) { - const resolved = tryResolve(plugin); - if (loaded.has(resolved)) { continue; } - debug(`Loading plug-in: ${chalk.green(plugin)} from ${chalk.blue(resolved)}`); - PluginHost.instance.load(plugin); - loaded.add(resolved); - } - } - - function tryResolve(plugin: string): string { - try { - return require.resolve(plugin); - } catch (e) { - error(`Unable to resolve plugin ${chalk.green(plugin)}: ${e.stack}`); - throw new Error(`Unable to resolve plug-in: ${plugin}`); - } - } - } - - loadPlugins(configuration.settings); - - const cmd = argv._[0]; - - if (typeof(cmd) !== 'string') { - throw new Error(`First argument should be a string. Got: ${cmd} (${typeof(cmd)})`); - } - - // Bundle up global objects so the commands have access to them - const commandOptions = { args: argv, configuration, aws: sdkProvider }; - - try { - - let returnValue = undefined; - - switch (cmd) { - case 'context': - returnValue = await context(commandOptions); - break; - case 'docs': - returnValue = await docs(commandOptions); - break; - case 'doctor': - returnValue = await doctor(commandOptions); - break; - } - - if (returnValue === undefined) { - returnValue = await main(cmd, argv); - } - - if (typeof returnValue === 'object') { - return toJsonOrYaml(returnValue); - } else if (typeof returnValue === 'string') { - return returnValue; - } else { - return returnValue; - } - } finally { - await version.displayVersionMessage(); - } - - async function main(command: string, args: any): Promise { - const toolkitStackName: string = ToolkitInfo.determineName(configuration.settings.get(['toolkitStackName'])); - debug(`Toolkit stack: ${chalk.bold(toolkitStackName)}`); - - if (args.all && args.STACKS) { - throw new Error('You must either specify a list of Stacks or the `--all` argument'); - } - - args.STACKS = args.STACKS || []; - args.ENVIRONMENTS = args.ENVIRONMENTS || []; - - const selector: StackSelector = { - allTopLevel: args.all, - patterns: args.STACKS, - }; - - const cli = new CdkToolkit({ - cloudExecutable, - cloudFormation, - verbose: argv.trace || argv.verbose > 0, - ignoreErrors: argv['ignore-errors'], - strict: argv.strict, - configuration, - sdkProvider, - }); - - switch (command) { - case 'ls': - case 'list': - return cli.list(args.STACKS, { long: args.long }); - - case 'diff': - const enableDiffNoFail = isFeatureEnabled(configuration, cxapi.ENABLE_DIFF_NO_FAIL); - return cli.diff({ - stackNames: args.STACKS, - exclusively: args.exclusively, - templatePath: args.template, - strict: args.strict, - contextLines: args.contextLines, - securityOnly: args.securityOnly, - fail: args.fail || !enableDiffNoFail, - }); - - case 'bootstrap': - const source: BootstrapSource = determineBootsrapVersion(args, configuration); - - const bootstrapper = new Bootstrapper(source); - - if (args.showTemplate) { - return bootstrapper.showTemplate(); - } - - return cli.bootstrap(args.ENVIRONMENTS, bootstrapper, { - roleArn: args.roleArn, - force: argv.force, - toolkitStackName: toolkitStackName, - execute: args.execute, - tags: configuration.settings.get(['tags']), - terminationProtection: args.terminationProtection, - parameters: { - bucketName: configuration.settings.get(['toolkitBucket', 'bucketName']), - kmsKeyId: configuration.settings.get(['toolkitBucket', 'kmsKeyId']), - createCustomerMasterKey: args.bootstrapCustomerKey, - qualifier: args.qualifier, - publicAccessBlockConfiguration: args.publicAccessBlockConfiguration, - trustedAccounts: arrayFromYargs(args.trust), - trustedAccountsForLookup: arrayFromYargs(args.trustForLookup), - cloudFormationExecutionPolicies: arrayFromYargs(args.cloudformationExecutionPolicies), - }, - }); - - case 'deploy': - const parameterMap: { [name: string]: string | undefined } = {}; - for (const parameter of args.parameters) { - if (typeof parameter === 'string') { - const keyValue = (parameter as string).split('='); - parameterMap[keyValue[0]] = keyValue.slice(1).join('='); - } - } - return cli.deploy({ - selector, - exclusively: args.exclusively, - toolkitStackName, - roleArn: args.roleArn, - notificationArns: args.notificationArns, - requireApproval: configuration.settings.get(['requireApproval']), - reuseAssets: args['build-exclude'], - tags: configuration.settings.get(['tags']), - execute: args.execute, - changeSetName: args.changeSetName, - force: args.force, - parameters: parameterMap, - usePreviousParameters: args['previous-parameters'], - outputsFile: configuration.settings.get(['outputsFile']), - progress: configuration.settings.get(['progress']), - ci: args.ci, - rollback: configuration.settings.get(['rollback']), - hotswap: args.hotswap, - watch: args.watch, - traceLogs: args.logs, - }); - - case 'watch': - return cli.watch({ - selector, - // parameters: parameterMap, - // usePreviousParameters: args['previous-parameters'], - // outputsFile: configuration.settings.get(['outputsFile']), - // requireApproval: configuration.settings.get(['requireApproval']), - // notificationArns: args.notificationArns, - exclusively: args.exclusively, - toolkitStackName, - roleArn: args.roleArn, - reuseAssets: args['build-exclude'], - changeSetName: args.changeSetName, - force: args.force, - progress: configuration.settings.get(['progress']), - rollback: configuration.settings.get(['rollback']), - hotswap: args.hotswap, - traceLogs: args.logs, - }); - - case 'destroy': - return cli.destroy({ - selector, - exclusively: args.exclusively, - force: args.force, - roleArn: args.roleArn, - }); - - case 'synthesize': - case 'synth': - if (args.exclusively) { - return cli.synth(args.STACKS, args.exclusively, args.quiet, args.validation); - } else { - return cli.synth(args.STACKS, true, args.quiet, args.validation); - } - - - case 'metadata': - return cli.metadata(args.STACK); - - case 'init': - const language = configuration.settings.get(['language']); - if (args.list) { - return printAvailableTemplates(language); - } else { - return cliInit(args.TEMPLATE, language, undefined, args.generateOnly); - } - case 'version': - return data(version.DISPLAY_VERSION); - - default: - throw new Error('Unknown command: ' + command); - } - } - - function toJsonOrYaml(object: any): string { - return serializeStructure(object, argv.json); - } -} - -/** - * Determine which version of bootstrapping - * (legacy, or "new") should be used. - */ -function determineBootsrapVersion(args: { template?: string }, configuration: Configuration): BootstrapSource { - const isV1 = version.DISPLAY_VERSION.startsWith('1.'); - return isV1 ? determineV1BootstrapSource(args, configuration) : determineV2BootstrapSource(args); -} - -function determineV1BootstrapSource(args: { template?: string }, configuration: Configuration): BootstrapSource { - let source: BootstrapSource; - if (args.template) { - print(`Using bootstrapping template from ${args.template}`); - source = { source: 'custom', templateFile: args.template }; - } else if (process.env.CDK_NEW_BOOTSTRAP) { - print('CDK_NEW_BOOTSTRAP set, using new-style bootstrapping'); - source = { source: 'default' }; - } else if (isFeatureEnabled(configuration, cxapi.NEW_STYLE_STACK_SYNTHESIS_CONTEXT)) { - print(`'${cxapi.NEW_STYLE_STACK_SYNTHESIS_CONTEXT}' context set, using new-style bootstrapping`); - source = { source: 'default' }; - } else { - // in V1, the "legacy" bootstrapping is the default - source = { source: 'legacy' }; - } - return source; -} - -function determineV2BootstrapSource(args: { template?: string }): BootstrapSource { - let source: BootstrapSource; - if (args.template) { - print(`Using bootstrapping template from ${args.template}`); - source = { source: 'custom', templateFile: args.template }; - } else if (process.env.CDK_LEGACY_BOOTSTRAP) { - print('CDK_LEGACY_BOOTSTRAP set, using legacy-style bootstrapping'); - source = { source: 'legacy' }; - } else { - // in V2, the "new" bootstrapping is the default - source = { source: 'default' }; - } - return source; -} - -function isFeatureEnabled(configuration: Configuration, featureFlag: string) { - return configuration.context.get(featureFlag) ?? cxapi.futureFlagDefault(featureFlag); -} - -/** - * Translate a Yargs input array to something that makes more sense in a programming language - * model (telling the difference between absence and an empty array) - * - * - An empty array is the default case, meaning the user didn't pass any arguments. We return - * undefined. - * - If the user passed a single empty string, they did something like `--array=`, which we'll - * take to mean they passed an empty array. - */ -function arrayFromYargs(xs: string[]): string[] | undefined { - if (xs.length === 0) { return undefined; } - return xs.filter(x => x !== ''); -} - -function yargsNegativeAlias(shortName: S, longName: L) { - return (argv: T) => { - if (shortName in argv && argv[shortName]) { - (argv as any)[longName] = false; - } - return argv; - }; -} - -initCommandLine() - .then(value => { - if (value == null) { return; } - if (typeof value === 'string') { - data(value); - } else if (typeof value === 'number') { - process.exitCode = value; - } - }) - .catch(err => { - error(err.message); - if (err.stack) { - debug(err.stack); - } - process.exitCode = 1; - }); +cli(); diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts new file mode 100644 index 0000000000000..315b2fb75529e --- /dev/null +++ b/packages/aws-cdk/lib/cli.ts @@ -0,0 +1,582 @@ +import 'source-map-support/register'; +import * as cxapi from '@aws-cdk/cx-api'; +import '@jsii/check-node/run'; +import * as chalk from 'chalk'; + +import type { Argv } from 'yargs'; +import { SdkProvider } from '../lib/api/aws-auth'; +import { BootstrapSource, Bootstrapper } from '../lib/api/bootstrap'; +import { CloudFormationDeployments } from '../lib/api/cloudformation-deployments'; +import { StackSelector } from '../lib/api/cxapp/cloud-assembly'; +import { CloudExecutable } from '../lib/api/cxapp/cloud-executable'; +import { execProgram } from '../lib/api/cxapp/exec'; +import { ToolkitInfo } from '../lib/api/toolkit-info'; +import { StackActivityProgress } from '../lib/api/util/cloudformation/stack-activity-monitor'; +import { CdkToolkit } from '../lib/cdk-toolkit'; +import { realHandler as context } from '../lib/commands/context'; +import { realHandler as docs } from '../lib/commands/docs'; +import { realHandler as doctor } from '../lib/commands/doctor'; +import { RequireApproval } from '../lib/diff'; +import { availableInitLanguages, cliInit, printAvailableTemplates } from '../lib/init'; +import { data, debug, error, print, setLogLevel } from '../lib/logging'; +import { PluginHost } from '../lib/plugin'; +import { serializeStructure } from '../lib/serialize'; +import { Command, Configuration, Settings } from '../lib/settings'; +import * as version from '../lib/version'; + +// https://github.com/yargs/yargs/issues/1929 +// https://github.com/evanw/esbuild/issues/1492 +// eslint-disable-next-line @typescript-eslint/no-require-imports +const yargs = require('yargs'); + +/* eslint-disable max-len */ +/* eslint-disable @typescript-eslint/no-shadow */ // yargs + +async function parseCommandLineArguments() { + // Use the following configuration for array arguments: + // + // { type: 'array', default: [], nargs: 1, requiresArg: true } + // + // The default behavior of yargs is to eat all strings following an array argument: + // + // ./prog --arg one two positional => will parse to { arg: ['one', 'two', 'positional'], _: [] } (so no positional arguments) + // ./prog --arg one two -- positional => does not help, for reasons that I can't understand. Still gets parsed incorrectly. + // + // By using the config above, every --arg will only consume one argument, so you can do the following: + // + // ./prog --arg one --arg two position => will parse to { arg: ['one', 'two'], _: ['positional'] }. + + const defaultBrowserCommand: { [key in NodeJS.Platform]?: string } = { + darwin: 'open %u', + win32: 'start %u', + }; + + const initTemplateLanguages = await availableInitLanguages(); + return yargs + .env('CDK') + .usage('Usage: cdk -a COMMAND') + .option('app', { type: 'string', alias: 'a', desc: 'REQUIRED: command-line for executing your app or a cloud assembly directory (e.g. "node bin/my-app.js")', requiresArg: true }) + .option('context', { type: 'array', alias: 'c', desc: 'Add contextual string parameter (KEY=VALUE)', nargs: 1, requiresArg: true }) + .option('plugin', { type: 'array', alias: 'p', desc: 'Name or path of a node package that extend the CDK features. Can be specified multiple times', nargs: 1 }) + .option('trace', { type: 'boolean', desc: 'Print trace for stack warnings' }) + .option('strict', { type: 'boolean', desc: 'Do not construct stacks with warnings' }) + .option('lookups', { type: 'boolean', desc: 'Perform context lookups (synthesis fails if this is disabled and context lookups need to be performed)', default: true }) + .option('ignore-errors', { type: 'boolean', default: false, desc: 'Ignores synthesis errors, which will likely produce an invalid output' }) + .option('json', { type: 'boolean', alias: 'j', desc: 'Use JSON output instead of YAML when templates are printed to STDOUT', default: false }) + .option('verbose', { type: 'boolean', alias: 'v', desc: 'Show debug logs (specify multiple times to increase verbosity)', default: false }) + .count('verbose') + .option('debug', { type: 'boolean', desc: 'Enable emission of additional debugging information, such as creation stack traces of tokens', default: false }) + .option('profile', { type: 'string', desc: 'Use the indicated AWS profile as the default environment', requiresArg: true }) + .option('proxy', { type: 'string', desc: 'Use the indicated proxy. Will read from HTTPS_PROXY environment variable if not specified', requiresArg: true }) + .option('ca-bundle-path', { type: 'string', desc: 'Path to CA certificate to use when validating HTTPS requests. Will read from AWS_CA_BUNDLE environment variable if not specified', requiresArg: true }) + .option('ec2creds', { type: 'boolean', alias: 'i', default: undefined, desc: 'Force trying to fetch EC2 instance credentials. Default: guess EC2 instance status' }) + .option('version-reporting', { type: 'boolean', desc: 'Include the "AWS::CDK::Metadata" resource in synthesized templates (enabled by default)', default: undefined }) + .option('path-metadata', { type: 'boolean', desc: 'Include "aws:cdk:path" CloudFormation metadata for each resource (enabled by default)', default: true }) + .option('asset-metadata', { type: 'boolean', desc: 'Include "aws:asset:*" CloudFormation metadata for resources that uses assets (enabled by default)', default: true }) + .option('role-arn', { type: 'string', alias: 'r', desc: 'ARN of Role to use when invoking CloudFormation', default: undefined, requiresArg: true }) + .option('toolkit-stack-name', { type: 'string', desc: 'The name of the CDK toolkit stack', requiresArg: true }) + .option('staging', { type: 'boolean', desc: 'Copy assets to the output directory (use --no-staging to disable, needed for local debugging the source files with SAM CLI)', default: true }) + .option('output', { type: 'string', alias: 'o', desc: 'Emits the synthesized cloud assembly into a directory (default: cdk.out)', requiresArg: true }) + .option('no-color', { type: 'boolean', desc: 'Removes colors and other style from console output', default: false }) + .command(['list [STACKS..]', 'ls [STACKS..]'], 'Lists all stacks in the app', (yargs: Argv) => yargs + .option('long', { type: 'boolean', default: false, alias: 'l', desc: 'Display environment information for each stack' }), + ) + .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: Argv) => yargs + .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only synthesize requested stacks, don\'t include dependencies' }) + .option('validation', { type: 'boolean', desc: 'After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION)', default: true }) + .option('quiet', { type: 'boolean', alias: 'q', desc: 'Do not output CloudFormation Template to stdout', default: false })) + .command('bootstrap [ENVIRONMENTS..]', 'Deploys the CDK toolkit stack into an AWS environment', (yargs: Argv) => yargs + .option('bootstrap-bucket-name', { type: 'string', alias: ['b', 'toolkit-bucket-name'], desc: 'The name of the CDK toolkit bucket; bucket will be created and must not exist', default: undefined }) + .option('bootstrap-kms-key-id', { type: 'string', desc: 'AWS KMS master key ID used for the SSE-KMS encryption', default: undefined, conflicts: 'bootstrap-customer-key' }) + .option('bootstrap-customer-key', { type: 'boolean', desc: 'Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only)', default: undefined, conflicts: 'bootstrap-kms-key-id' }) + .option('qualifier', { type: 'string', desc: 'String which must be unique for each bootstrap stack. You must configure it on your CDK app if you change this from the default.', default: undefined }) + .option('public-access-block-configuration', { type: 'boolean', desc: 'Block public access configuration on CDK toolkit bucket (enabled by default) ', default: undefined }) + .option('tags', { type: 'array', alias: 't', desc: 'Tags to add for the stack (KEY=VALUE)', nargs: 1, requiresArg: true, default: [] }) + .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) + .option('trust', { type: 'array', desc: 'The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only)', default: [], nargs: 1, requiresArg: true }) + .option('trust-for-lookup', { type: 'array', desc: 'The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only)', default: [], nargs: 1, requiresArg: true }) + .option('cloudformation-execution-policies', { type: 'array', desc: 'The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only)', default: [], nargs: 1, requiresArg: true }) + .option('force', { alias: 'f', type: 'boolean', desc: 'Always bootstrap even if it would downgrade template version', default: false }) + .option('termination-protection', { type: 'boolean', default: undefined, desc: 'Toggle CloudFormation termination protection on the bootstrap stacks' }) + .option('show-template', { type: 'boolean', desc: 'Instead of actual bootstrapping, print the current CLI\'s bootstrapping template to stdout for customization', default: false }) + .option('template', { type: 'string', requiresArg: true, desc: 'Use the template from the given file instead of the built-in one (use --show-template to obtain an example)' }), + ) + .command('deploy [STACKS..]', 'Deploys the stack(s) named STACKS into your AWS account', (yargs: Argv) => yargs + .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) + .option('build-exclude', { type: 'array', alias: 'E', nargs: 1, desc: 'Do not rebuild asset with the given ID. Can be specified multiple times', default: [] }) + .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only deploy requested stacks, don\'t include dependencies' }) + .option('require-approval', { type: 'string', choices: [RequireApproval.Never, RequireApproval.AnyChange, RequireApproval.Broadening], desc: 'What security-sensitive changes need manual approval' }) + .option('ci', { type: 'boolean', desc: 'Force CI detection', default: process.env.CI !== undefined }) + .option('notification-arns', { type: 'array', desc: 'ARNs of SNS topics that CloudFormation will notify with stack related events', nargs: 1, requiresArg: true }) + // @deprecated(v2) -- tags are part of the Cloud Assembly and tags specified here will be overwritten on the next deployment + .option('tags', { type: 'array', alias: 't', desc: 'Tags to add to the stack (KEY=VALUE), overrides tags from Cloud Assembly (deprecated)', nargs: 1, requiresArg: true }) + .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) + .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) + .option('force', { alias: 'f', type: 'boolean', desc: 'Always deploy stack even if templates are identical', default: false }) + .option('parameters', { type: 'array', desc: 'Additional parameters passed to CloudFormation at deploy time (STACK:KEY=VALUE)', nargs: 1, requiresArg: true, default: {} }) + .option('outputs-file', { type: 'string', alias: 'O', desc: 'Path to file where stack outputs will be written as JSON', requiresArg: true }) + .option('previous-parameters', { type: 'boolean', default: true, desc: 'Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled)' }) + .option('progress', { type: 'string', choices: [StackActivityProgress.BAR, StackActivityProgress.EVENTS], desc: 'Display mode for stack activity events' }) + .option('rollback', { + type: 'boolean', + desc: "Rollback stack to stable state on failure. Defaults to 'true', iterate more rapidly with --no-rollback or -R. " + + 'Note: do **not** disable this flag for deployments with resource replacements, as that will always fail', + }) + // Hack to get '-R' as an alias for '--no-rollback', suggested by: https://github.com/yargs/yargs/issues/1729 + .option('R', { type: 'boolean', hidden: true }).middleware(yargsNegativeAlias('R', 'rollback'), true) + .option('hotswap', { + type: 'boolean', + desc: "Attempts to perform a 'hotswap' deployment, " + + 'which skips CloudFormation and updates the resources directly, ' + + 'and falls back to a full deployment if that is not possible. ' + + 'Do not use this in production environments', + }) + .option('watch', { + type: 'boolean', + desc: 'Continuously observe the project files, ' + + 'and deploy the given stack(s) automatically when changes are detected. ' + + 'Implies --hotswap by default', + }) + .options('logs', { + type: 'boolean', + default: true, + desc: 'Show CloudWatch log events from all resources in the selected Stacks in the terminal. ' + + "'true' by default, use --no-logs to turn off. " + + "Only in effect if specified alongside the '--watch' option", + }), + ) + .command('watch [STACKS..]', "Shortcut for 'deploy --watch'", (yargs: Argv) => yargs + // I'm fairly certain none of these options, present for 'deploy', make sense for 'watch': + // .option('all', { type: 'boolean', default: false, desc: 'Deploy all available stacks' }) + // .option('ci', { type: 'boolean', desc: 'Force CI detection', default: process.env.CI !== undefined }) + // @deprecated(v2) -- tags are part of the Cloud Assembly and tags specified here will be overwritten on the next deployment + // .option('tags', { type: 'array', alias: 't', desc: 'Tags to add to the stack (KEY=VALUE), overrides tags from Cloud Assembly (deprecated)', nargs: 1, requiresArg: true }) + // .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) + // These options, however, are more subtle - I could be convinced some of these should also be available for 'watch': + // .option('require-approval', { type: 'string', choices: [RequireApproval.Never, RequireApproval.AnyChange, RequireApproval.Broadening], desc: 'What security-sensitive changes need manual approval' }) + // .option('parameters', { type: 'array', desc: 'Additional parameters passed to CloudFormation at deploy time (STACK:KEY=VALUE)', nargs: 1, requiresArg: true, default: {} }) + // .option('previous-parameters', { type: 'boolean', default: true, desc: 'Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled)' }) + // .option('outputs-file', { type: 'string', alias: 'O', desc: 'Path to file where stack outputs will be written as JSON', requiresArg: true }) + // .option('notification-arns', { type: 'array', desc: 'ARNs of SNS topics that CloudFormation will notify with stack related events', nargs: 1, requiresArg: true }) + .option('build-exclude', { type: 'array', alias: 'E', nargs: 1, desc: 'Do not rebuild asset with the given ID. Can be specified multiple times', default: [] }) + .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only deploy requested stacks, don\'t include dependencies' }) + .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) + .option('force', { alias: 'f', type: 'boolean', desc: 'Always deploy stack even if templates are identical', default: false }) + .option('progress', { type: 'string', choices: [StackActivityProgress.BAR, StackActivityProgress.EVENTS], desc: 'Display mode for stack activity events' }) + .option('rollback', { + type: 'boolean', + desc: "Rollback stack to stable state on failure. Defaults to 'true', iterate more rapidly with --no-rollback or -R. " + + 'Note: do **not** disable this flag for deployments with resource replacements, as that will always fail', + }) + // same hack for -R as above in 'deploy' + .option('R', { type: 'boolean', hidden: true }).middleware(yargsNegativeAlias('R', 'rollback'), true) + .option('hotswap', { + type: 'boolean', + desc: "Attempts to perform a 'hotswap' deployment, " + + 'which skips CloudFormation and updates the resources directly, ' + + 'and falls back to a full deployment if that is not possible. ' + + "'true' by default, use --no-hotswap to turn off", + }) + .options('logs', { + type: 'boolean', + default: true, + desc: 'Show CloudWatch log events from all resources in the selected Stacks in the terminal. ' + + "'true' by default, use --no-logs to turn off", + }), + ) + .command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', (yargs: Argv) => yargs + .option('all', { type: 'boolean', default: false, desc: 'Destroy all available stacks' }) + .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only destroy requested stacks, don\'t include dependees' }) + .option('force', { type: 'boolean', alias: 'f', desc: 'Do not ask for confirmation before destroying the stacks' })) + .command('diff [STACKS..]', 'Compares the specified stack with the deployed stack or a local template file, and returns with status 1 if any difference is found', (yargs: Argv) => yargs + .option('exclusively', { type: 'boolean', alias: 'e', desc: 'Only diff requested stacks, don\'t include dependencies' }) + .option('context-lines', { type: 'number', desc: 'Number of context lines to include in arbitrary JSON diff rendering', default: 3, requiresArg: true }) + .option('template', { type: 'string', desc: 'The path to the CloudFormation template to compare with', requiresArg: true }) + .option('strict', { type: 'boolean', desc: 'Do not filter out AWS::CDK::Metadata resources', default: false }) + .option('security-only', { type: 'boolean', desc: 'Only diff for broadened security changes', default: false }) + .option('fail', { type: 'boolean', desc: 'Fail with exit code 1 in case of diff', default: false })) + .command('metadata [STACK]', 'Returns all metadata associated with this stack') + .command('init [TEMPLATE]', 'Create a new, empty CDK project from a template.', (yargs: Argv) => yargs + .option('language', { type: 'string', alias: 'l', desc: 'The language to be used for the new project (default can be configured in ~/.cdk.json)', choices: initTemplateLanguages }) + .option('list', { type: 'boolean', desc: 'List the available templates' }) + .option('generate-only', { type: 'boolean', default: false, desc: 'If true, only generates project files, without executing additional operations such as setting up a git repo, installing dependencies or compiling the project' }), + ) + .command('context', 'Manage cached context values', (yargs: Argv) => yargs + .option('reset', { alias: 'e', desc: 'The context key (or its index) to reset', type: 'string', requiresArg: true }) + .option('clear', { desc: 'Clear all context', type: 'boolean' })) + .command(['docs', 'doc'], 'Opens the reference documentation in a browser', (yargs: Argv) => yargs + .option('browser', { + alias: 'b', + desc: 'the command to use to open the browser, using %u as a placeholder for the path of the file to open', + type: 'string', + default: process.platform in defaultBrowserCommand ? defaultBrowserCommand[process.platform] : 'xdg-open %u', + })) + .command('doctor', 'Check your set-up for potential problems') + .version(version.DISPLAY_VERSION) + .demandCommand(1, '') // just print help + .recommendCommands() + .help() + .alias('h', 'help') + .epilogue([ + 'If your app has a single stack, there is no need to specify the stack name', + 'If one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', + ].join('\n\n')) + .argv; +} + +if (!process.stdout.isTTY) { + // Disable chalk color highlighting + process.env.FORCE_COLOR = '0'; +} + +async function initCommandLine() { + const argv = await parseCommandLineArguments(); + if (argv.verbose) { + setLogLevel(argv.verbose); + } + debug('CDK toolkit version:', version.DISPLAY_VERSION); + debug('Command line arguments:', argv); + + const configuration = new Configuration({ + commandLineArguments: { + ...argv, + _: argv._ as [Command, ...string[]], // TypeScript at its best + }, + }); + await configuration.load(); + + const sdkProvider = await SdkProvider.withAwsCliCompatibleDefaults({ + profile: configuration.settings.get(['profile']), + ec2creds: argv.ec2creds, + httpOptions: { + proxyAddress: argv.proxy, + caBundlePath: argv['ca-bundle-path'], + }, + }); + + const cloudFormation = new CloudFormationDeployments({ sdkProvider }); + + const cloudExecutable = new CloudExecutable({ + configuration, + sdkProvider, + synthesizer: execProgram, + }); + + /** Function to load plug-ins, using configurations additively. */ + function loadPlugins(...settings: Settings[]) { + const loaded = new Set(); + for (const source of settings) { + const plugins: string[] = source.get(['plugin']) || []; + for (const plugin of plugins) { + const resolved = tryResolve(plugin); + if (loaded.has(resolved)) { continue; } + debug(`Loading plug-in: ${chalk.green(plugin)} from ${chalk.blue(resolved)}`); + PluginHost.instance.load(plugin); + loaded.add(resolved); + } + } + + function tryResolve(plugin: string): string { + try { + return require.resolve(plugin); + } catch (e) { + error(`Unable to resolve plugin ${chalk.green(plugin)}: ${e.stack}`); + throw new Error(`Unable to resolve plug-in: ${plugin}`); + } + } + } + + loadPlugins(configuration.settings); + + const cmd = argv._[0]; + + if (typeof(cmd) !== 'string') { + throw new Error(`First argument should be a string. Got: ${cmd} (${typeof(cmd)})`); + } + + // Bundle up global objects so the commands have access to them + const commandOptions = { args: argv, configuration, aws: sdkProvider }; + + try { + + let returnValue = undefined; + + switch (cmd) { + case 'context': + returnValue = await context(commandOptions); + break; + case 'docs': + returnValue = await docs(commandOptions); + break; + case 'doctor': + returnValue = await doctor(commandOptions); + break; + } + + if (returnValue === undefined) { + returnValue = await main(cmd, argv); + } + + if (typeof returnValue === 'object') { + return toJsonOrYaml(returnValue); + } else if (typeof returnValue === 'string') { + return returnValue; + } else { + return returnValue; + } + } finally { + await version.displayVersionMessage(); + } + + async function main(command: string, args: any): Promise { + const toolkitStackName: string = ToolkitInfo.determineName(configuration.settings.get(['toolkitStackName'])); + debug(`Toolkit stack: ${chalk.bold(toolkitStackName)}`); + + if (args.all && args.STACKS) { + throw new Error('You must either specify a list of Stacks or the `--all` argument'); + } + + args.STACKS = args.STACKS || []; + args.ENVIRONMENTS = args.ENVIRONMENTS || []; + + const selector: StackSelector = { + allTopLevel: args.all, + patterns: args.STACKS, + }; + + const cli = new CdkToolkit({ + cloudExecutable, + cloudFormation, + verbose: argv.trace || argv.verbose > 0, + ignoreErrors: argv['ignore-errors'], + strict: argv.strict, + configuration, + sdkProvider, + }); + + switch (command) { + case 'ls': + case 'list': + return cli.list(args.STACKS, { long: args.long }); + + case 'diff': + const enableDiffNoFail = isFeatureEnabled(configuration, cxapi.ENABLE_DIFF_NO_FAIL); + return cli.diff({ + stackNames: args.STACKS, + exclusively: args.exclusively, + templatePath: args.template, + strict: args.strict, + contextLines: args.contextLines, + securityOnly: args.securityOnly, + fail: args.fail || !enableDiffNoFail, + }); + + case 'bootstrap': + const source: BootstrapSource = determineBootsrapVersion(args, configuration); + + const bootstrapper = new Bootstrapper(source); + + if (args.showTemplate) { + return bootstrapper.showTemplate(); + } + + return cli.bootstrap(args.ENVIRONMENTS, bootstrapper, { + roleArn: args.roleArn, + force: argv.force, + toolkitStackName: toolkitStackName, + execute: args.execute, + tags: configuration.settings.get(['tags']), + terminationProtection: args.terminationProtection, + parameters: { + bucketName: configuration.settings.get(['toolkitBucket', 'bucketName']), + kmsKeyId: configuration.settings.get(['toolkitBucket', 'kmsKeyId']), + createCustomerMasterKey: args.bootstrapCustomerKey, + qualifier: args.qualifier, + publicAccessBlockConfiguration: args.publicAccessBlockConfiguration, + trustedAccounts: arrayFromYargs(args.trust), + trustedAccountsForLookup: arrayFromYargs(args.trustForLookup), + cloudFormationExecutionPolicies: arrayFromYargs(args.cloudformationExecutionPolicies), + }, + }); + + case 'deploy': + const parameterMap: { [name: string]: string | undefined } = {}; + for (const parameter of args.parameters) { + if (typeof parameter === 'string') { + const keyValue = (parameter as string).split('='); + parameterMap[keyValue[0]] = keyValue.slice(1).join('='); + } + } + return cli.deploy({ + selector, + exclusively: args.exclusively, + toolkitStackName, + roleArn: args.roleArn, + notificationArns: args.notificationArns, + requireApproval: configuration.settings.get(['requireApproval']), + reuseAssets: args['build-exclude'], + tags: configuration.settings.get(['tags']), + execute: args.execute, + changeSetName: args.changeSetName, + force: args.force, + parameters: parameterMap, + usePreviousParameters: args['previous-parameters'], + outputsFile: configuration.settings.get(['outputsFile']), + progress: configuration.settings.get(['progress']), + ci: args.ci, + rollback: configuration.settings.get(['rollback']), + hotswap: args.hotswap, + watch: args.watch, + traceLogs: args.logs, + }); + + case 'watch': + return cli.watch({ + selector, + // parameters: parameterMap, + // usePreviousParameters: args['previous-parameters'], + // outputsFile: configuration.settings.get(['outputsFile']), + // requireApproval: configuration.settings.get(['requireApproval']), + // notificationArns: args.notificationArns, + exclusively: args.exclusively, + toolkitStackName, + roleArn: args.roleArn, + reuseAssets: args['build-exclude'], + changeSetName: args.changeSetName, + force: args.force, + progress: configuration.settings.get(['progress']), + rollback: configuration.settings.get(['rollback']), + hotswap: args.hotswap, + traceLogs: args.logs, + }); + + case 'destroy': + return cli.destroy({ + selector, + exclusively: args.exclusively, + force: args.force, + roleArn: args.roleArn, + }); + + case 'synthesize': + case 'synth': + if (args.exclusively) { + return cli.synth(args.STACKS, args.exclusively, args.quiet, args.validation); + } else { + return cli.synth(args.STACKS, true, args.quiet, args.validation); + } + + + case 'metadata': + return cli.metadata(args.STACK); + + case 'init': + const language = configuration.settings.get(['language']); + if (args.list) { + return printAvailableTemplates(language); + } else { + return cliInit(args.TEMPLATE, language, undefined, args.generateOnly); + } + case 'version': + return data(version.DISPLAY_VERSION); + + default: + throw new Error('Unknown command: ' + command); + } + } + + function toJsonOrYaml(object: any): string { + return serializeStructure(object, argv.json); + } +} + +/** + * Determine which version of bootstrapping + * (legacy, or "new") should be used. + */ +function determineBootsrapVersion(args: { template?: string }, configuration: Configuration): BootstrapSource { + const isV1 = version.DISPLAY_VERSION.startsWith('1.'); + return isV1 ? determineV1BootstrapSource(args, configuration) : determineV2BootstrapSource(args); +} + +function determineV1BootstrapSource(args: { template?: string }, configuration: Configuration): BootstrapSource { + let source: BootstrapSource; + if (args.template) { + print(`Using bootstrapping template from ${args.template}`); + source = { source: 'custom', templateFile: args.template }; + } else if (process.env.CDK_NEW_BOOTSTRAP) { + print('CDK_NEW_BOOTSTRAP set, using new-style bootstrapping'); + source = { source: 'default' }; + } else if (isFeatureEnabled(configuration, cxapi.NEW_STYLE_STACK_SYNTHESIS_CONTEXT)) { + print(`'${cxapi.NEW_STYLE_STACK_SYNTHESIS_CONTEXT}' context set, using new-style bootstrapping`); + source = { source: 'default' }; + } else { + // in V1, the "legacy" bootstrapping is the default + source = { source: 'legacy' }; + } + return source; +} + +function determineV2BootstrapSource(args: { template?: string }): BootstrapSource { + let source: BootstrapSource; + if (args.template) { + print(`Using bootstrapping template from ${args.template}`); + source = { source: 'custom', templateFile: args.template }; + } else if (process.env.CDK_LEGACY_BOOTSTRAP) { + print('CDK_LEGACY_BOOTSTRAP set, using legacy-style bootstrapping'); + source = { source: 'legacy' }; + } else { + // in V2, the "new" bootstrapping is the default + source = { source: 'default' }; + } + return source; +} + +function isFeatureEnabled(configuration: Configuration, featureFlag: string) { + return configuration.context.get(featureFlag) ?? cxapi.futureFlagDefault(featureFlag); +} + +/** + * Translate a Yargs input array to something that makes more sense in a programming language + * model (telling the difference between absence and an empty array) + * + * - An empty array is the default case, meaning the user didn't pass any arguments. We return + * undefined. + * - If the user passed a single empty string, they did something like `--array=`, which we'll + * take to mean they passed an empty array. + */ +function arrayFromYargs(xs: string[]): string[] | undefined { + if (xs.length === 0) { return undefined; } + return xs.filter(x => x !== ''); +} + +function yargsNegativeAlias(shortName: S, longName: L) { + return (argv: T) => { + if (shortName in argv && argv[shortName]) { + (argv as any)[longName] = false; + } + return argv; + }; +} + +export function cli() { + + initCommandLine() + .then(value => { + if (value == null) { return; } + if (typeof value === 'string') { + data(value); + } else if (typeof value === 'number') { + process.exitCode = value; + } + }) + .catch(err => { + error(err.message); + if (err.stack) { + debug(err.stack); + } + process.exitCode = 1; + }); + +} + diff --git a/packages/aws-cdk/lib/index.ts b/packages/aws-cdk/lib/index.ts index 8985834248f6f..c93dddabdefd9 100644 --- a/packages/aws-cdk/lib/index.ts +++ b/packages/aws-cdk/lib/index.ts @@ -1,2 +1,3 @@ export * from './api'; export * from './plugin'; +export { cli } from './cli'; \ No newline at end of file diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e5a97607526ea..417a101b74f79 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -39,7 +39,7 @@ "../../node_modules/vm2/lib/setup-sandbox.js": "bin/setup-sandbox.js" }, "entrypoints": [ - "bin/cdk.js" + "lib/index.js" ], "licenses": [ "Apache-2.0", diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 235779b5ce41d..b13aecfc5beb1 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -242,13 +242,14 @@ export class Bundle { throw new Error(`Target must be a directory: ${target}`); } - console.log('Write bundle'); + console.log('Writing bundle'); const bundleDir = this.write(); try { if (this.test) { - console.log('Running package santiy test'); - shell(`${path.join(bundleDir, this.test)}`, { cwd: bundleDir }); + const command = `${path.join(bundleDir, this.test)}`; + console.log(`Running santiy test: ${command}`); + shell(command, { cwd: bundleDir }); } // create the tarball @@ -469,7 +470,6 @@ export class Bundle { private writeResources(workdir: string) { for (const [src, dst] of Object.entries(this.resources)) { const to = path.join(workdir, dst); - console.log(` - ${to}`); fs.copySync(path.join(this.packageDir, src), to, { recursive: true }); } } From 81c585a6f878978a3118fa060e94eb6c7f536265 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 16 Feb 2022 22:43:31 +0200 Subject: [PATCH 45/63] fix resources --- packages/aws-cdk/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 417a101b74f79..3298a7f8a8ced 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -35,8 +35,8 @@ "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", "noticePath": "NOTICES", "resources": { - "../../node_modules/vm2/lib/bridge.js": "bin/bridge.js", - "../../node_modules/vm2/lib/setup-sandbox.js": "bin/setup-sandbox.js" + "../../node_modules/vm2/lib/bridge.js": "lib/bridge.js", + "../../node_modules/vm2/lib/setup-sandbox.js": "lib/setup-sandbox.js" }, "entrypoints": [ "lib/index.js" From 9f5a431e82399287fa36387d2a701204fe5923c5 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 16 Feb 2022 23:46:07 +0200 Subject: [PATCH 46/63] default entrypoint --- packages/aws-cdk/package.json | 5 +--- tools/@aws-cdk/node-bundle/README.md | 28 ++++++++------------ tools/@aws-cdk/node-bundle/src/api/bundle.ts | 18 +++++++++---- tools/@aws-cdk/pkglint/lib/rules.ts | 2 +- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 3298a7f8a8ced..c1138330c8504 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -38,9 +38,6 @@ "../../node_modules/vm2/lib/bridge.js": "lib/bridge.js", "../../node_modules/vm2/lib/setup-sandbox.js": "lib/setup-sandbox.js" }, - "entrypoints": [ - "lib/index.js" - ], "licenses": [ "Apache-2.0", "MIT", @@ -49,7 +46,7 @@ "BSD-2-Clause", "0BSD" ], - "dontAttribute": "(^@aws-cdk/|^cdk-assets$)", + "dontAttribute": "^@aws-cdk/|^cdk-assets$", "test": "bin/cdk --version" } }, diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index ac761f3953989..3dffc7bf70039 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -110,24 +110,18 @@ const bundle = new Bundle({ bundle.pack(); ``` -## Caveats +## Take into account -Bundling a package has implications on the API exposed from the package. -For pure CLI applications that don't export anything, this shouldn't be a problem. +By default, the tool will use the `main` directive of the `package.json` as +the entrypoint. This will ensure that all top level exports of the +package are preserved. -However, if you are bundling either a library, or a CLI that is being consumed -as library as well, things can start to break. +Deep imports such as `const plugins = require('your-package/lib/plugins')` are considered +private and should not be used by your consumers. However, if you absolutely have to +preserve those as well, you should pass custom multiple entry-points for each deep import. +Note that this will balloon up the package size significantly. -This tool does preserve all original code and structure, so all your imports -will still be available for consumers, but: +If you are bundling a CLI application that also has top level exports, we suggest to extract +the CLI functionality into a function, and add this function as an export to `index.js`. -1. The dependencies of those imports won't be available anymore. This means your -consumers are now responsible for installing those on their own. To mitigate this, -you can bundle up the files being imported as well (using additional entrypoints), -but bear in mind this will significantly ballon the package size. -2. If your bundled entrypoint can accept external types, and you perform type checks -on them using things like `instanceof`, these will fail because these -types are now completely foreign to your bundle. - -In general, this tool was designed for command line applications, if your CLI is also -used as library, strongly consider extracting the library parts to a separate package. \ No newline at end of file +> See [aws-cdk](https://github.com/aws/aws-cdk/blob/master/packages/aws-cdk/bin/cdk.ts) as an example. \ No newline at end of file diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index b13aecfc5beb1..f2adc1d67cc9a 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -17,14 +17,16 @@ export interface BundleProps { readonly packageDir: string; /** - * List of entrypoints to bundle. + * Copyright string used when generating the NOTICE file. */ - readonly entrypoints: string[]; + readonly copyright: string; /** - * Copyright string used when generating the NOTICE file. + * List of entrypoints to bundle. + * + * @default - the 'main' file as specified in package.json. */ - readonly copyright: string; + readonly entrypoints?: string[]; /** * Path to the notice file that will be created / validated. @@ -145,7 +147,13 @@ export class Bundle { this.dontAttribute = props.dontAttribute; this.entrypoints = {}; - for (const entrypoint of props.entrypoints) { + const entryPoints = props.entrypoints ?? (this.manifest.main ? [this.manifest.main] : []); + + if (entryPoints.length === 0) { + throw new Error('Must configure at least 1 entrypoint'); + } + + for (const entrypoint of entryPoints) { if (!fs.existsSync(path.join(this.packageDir, entrypoint))) { throw new Error(`Unable to locate entrypoint: ${entrypoint}`); } diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index b99006420dd60..f9deb98650559 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -178,7 +178,7 @@ export class BundledCLI extends ValidationRule { '0BSD', ]; - private static readonly DONT_ATTRIBUTE = '(^@aws-cdk\/|^cdk-assets$)'; + private static readonly DONT_ATTRIBUTE = '^@aws-cdk\/|^cdk-assets$'; public readonly name = 'bundle'; From 97779dd39fa55a2a7ab7a4257fbdd6c5fc1bab6a Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 17 Feb 2022 12:22:43 +0200 Subject: [PATCH 47/63] mid work --- .../src/api/{_notice.ts => _attributions.ts} | 46 ++++++++------- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 59 ++++++++----------- .../@aws-cdk/node-bundle/src/api/violation.ts | 4 +- tools/@aws-cdk/node-bundle/src/cli.ts | 4 +- tools/@aws-cdk/node-bundle/test/_package.ts | 4 +- .../node-bundle/test/api/bundle.test.ts | 32 ++++------ tools/@aws-cdk/node-bundle/test/cli.test.ts | 26 +++----- 7 files changed, 74 insertions(+), 101 deletions(-) rename tools/@aws-cdk/node-bundle/src/api/{_notice.ts => _attributions.ts} (85%) diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_attributions.ts similarity index 85% rename from tools/@aws-cdk/node-bundle/src/api/_notice.ts rename to tools/@aws-cdk/node-bundle/src/api/_attributions.ts index 3b32e1c6d3b8f..a6adfedb51492 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_attributions.ts @@ -13,16 +13,20 @@ const DEFAULT_ALLOWED_LICENSES = [ '0BSD', ]; -const ATTRIBUTION_SEPARATOR = '\n---------------\n'; +const ATTRIBUTION_SEPARATOR = '\n----------------\n'; /** - * Properties for `Notice`. + * Properties for `Attributions`. */ -export interface NoticeProps { +export interface AttributionsProps { /** * The package root directory. */ readonly packageDir: string; + /** + * The name of the package. + */ + readonly packageName: string; /** * Package dependencies. */ @@ -31,10 +35,6 @@ export interface NoticeProps { * The parent directory underwhich all dependencies live. */ readonly dependenciesRoot: string; - /** - * The copyright to prepend to the file. - */ - readonly copyright: string; /** * Path to the notice file to created / validated. */ @@ -54,26 +54,26 @@ export interface NoticeProps { } /** - * `Notice` represents a NOTICE file containing various attributions. + * `Attributions` represents an attributions file containing third-party license information. */ -export class Notice { +export class Attributions { private readonly packageDir: string; + private readonly packageName: string; private readonly dependencies: Package[]; private readonly validLicenses: string[]; - private readonly copyright: string; private readonly dependenciesRoot: string; private readonly filePath: string; private readonly attributions: Map; private readonly content: string; - constructor(props: NoticeProps) { + constructor(props: AttributionsProps) { this.packageDir = props.packageDir; + this.packageName = props.packageName; this.filePath = path.join(this.packageDir, props.filePath); this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); this.validLicenses = (props.validLicenses ?? DEFAULT_ALLOWED_LICENSES).map(l => l.toLowerCase()); - this.copyright = props.copyright; this.dependenciesRoot = props.dependenciesRoot; // without the generated notice content, this object is pretty much @@ -95,15 +95,15 @@ export class Notice { const fix = () => this.flush(); const missing = !fs.existsSync(this.filePath); - const notice = missing ? undefined : fs.readFileSync(this.filePath, { encoding: 'utf-8' }); - const outdated = notice !== undefined && notice !== this.content; + const attributions = missing ? undefined : fs.readFileSync(this.filePath, { encoding: 'utf-8' }); + const outdated = attributions !== undefined && attributions !== this.content; if (missing) { violations.push({ type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} is missing`, fix }); } if (outdated) { - violations.push({ type: ViolationType.OUTDATED_NOTICE, message: `${relNoticePath} is outdated`, fix }); + violations.push({ type: ViolationType.OUTDATED_ATTRIBUTIONS, message: `${relNoticePath} is outdated`, fix }); } const invalidLicense: Violation[] = Array.from(this.attributions.values()) @@ -134,20 +134,22 @@ export class Notice { private render(attributions: Map): string { - const notice = [this.copyright, '', '-'.repeat(40), '']; + const content = []; if (attributions.size > 0) { - notice.push('This package includes the following third-party software:'); - notice.push(''); + content.push(`The ${this.packageName} package includes the following third-party software/licensing:`); + content.push(''); } for (const attr of attributions.values()) { - notice.push(`** ${attr.package} - ${attr.url} | ${attr.licenses[0]}`); - notice.push(attr.licenseText ?? ''); - notice.push(ATTRIBUTION_SEPARATOR); + content.push(`** ${attr.package} - ${attr.url} | ${attr.licenses[0]}`); + if (attr.licenseText) { + content.push(attr.licenseText); + } + content.push(ATTRIBUTION_SEPARATOR); } - return notice + return content // since we are embedding external files, those can different line // endings, so we standardize to LF. .map(l => l.replace(/\r\n/g, '\n')) diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index f2adc1d67cc9a..c7e1609b1b07e 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -2,7 +2,7 @@ import * as os from 'os'; import * as path from 'path'; import * as esbuild from 'esbuild'; import * as fs from 'fs-extra'; -import { Notice } from './_notice'; +import { Attributions } from './_attributions'; import { shell } from './_shell'; import { Violation, ViolationType, ViolationsReport } from './violation'; @@ -17,24 +17,19 @@ export interface BundleProps { readonly packageDir: string; /** - * Copyright string used when generating the NOTICE file. - */ - readonly copyright: string; - - /** - * List of entrypoints to bundle. + * List of entry-points to bundle. * * @default - the 'main' file as specified in package.json. */ - readonly entrypoints?: string[]; + readonly entryPoints?: string[]; /** - * Path to the notice file that will be created / validated. + * Path to attributions file that will be created / validated. * This path is relative to the package directory. * - * @default 'NOTICE' + * @default 'THIRD_PARTY_LICENSES' */ - readonly noticePath?: string; + readonly attributionsFile?: string; /** * External packages that cannot be bundled. @@ -74,11 +69,11 @@ export interface BundleProps { } /** - * Optiosn for `Bundle.pack`. + * Options for `Bundle.pack`. */ export interface BundlePackOptions { /** - * The target directory to create the pacakge in. + * The target directory to create the package in. * * @default - the package directory. */ @@ -121,8 +116,7 @@ export class Bundle { private readonly noticePath: string; private readonly packageDir: string; - private readonly copyright: string; - private readonly entrypoints: Record; + private readonly entryPoints: Record; private readonly externals: string[]; private readonly resources: {[src: string]: string}; private readonly validLicenses?: string[]; @@ -133,21 +127,20 @@ export class Bundle { private _dependencies?: Package[]; private _dependenciesRoot?: string; - private _notice?: Notice; + private _attributions?: Attributions; constructor(props: BundleProps) { this.packageDir = props.packageDir; - this.noticePath = props.noticePath ?? 'NOTICE'; + this.noticePath = props.attributionsFile ?? 'THIRD_PARTY_LICENSES'; this.manifest = fs.readJsonSync(path.join(this.packageDir, 'package.json')); this.externals = props.externals ?? []; this.resources = props.resources ?? {}; this.test = props.test; this.validLicenses = props.licenses; - this.copyright = props.copyright; this.dontAttribute = props.dontAttribute; - this.entrypoints = {}; + this.entryPoints = {}; - const entryPoints = props.entrypoints ?? (this.manifest.main ? [this.manifest.main] : []); + const entryPoints = props.entryPoints ?? (this.manifest.main ? [this.manifest.main] : []); if (entryPoints.length === 0) { throw new Error('Must configure at least 1 entrypoint'); @@ -157,7 +150,7 @@ export class Bundle { if (!fs.existsSync(path.join(this.packageDir, entrypoint))) { throw new Error(`Unable to locate entrypoint: ${entrypoint}`); } - this.entrypoints[entrypoint.replace('.js', '')] = entrypoint; + this.entryPoints[entrypoint.replace('.js', '')] = entrypoint; } } @@ -168,7 +161,7 @@ export class Bundle { * violations after the fixes were applied. * * This method never throws. The Caller is responsible for inspecting the - * returned report and act accordinagly. + * returned report and act accordingly. */ public validate(options: BundleValidateOptions = {}): ViolationsReport { @@ -177,9 +170,9 @@ export class Bundle { // first validate const circularImports = this.validateCircularImports(); const resources = this.validateResources(); - const notice = this.validateNotice(); + const attributions = this.validateAttributions(); - const report = new ViolationsReport([...circularImports, ...resources, ...notice]); + const report = new ViolationsReport([...circularImports, ...resources, ...attributions]); if (!fix) { return report; @@ -298,19 +291,19 @@ export class Bundle { return this._dependenciesRoot; } - private get notice(): Notice { - if (this._notice == null) { - this._notice = new Notice({ + private get attributions(): Attributions { + if (this._attributions == null) { + this._attributions = new Attributions({ packageDir: this.packageDir, + packageName: this.manifest.name, filePath: this.noticePath, dependencies: this.dependencies, dependenciesRoot: this.dependenciesRoot, exclude: this.dontAttribute, validLicenses: this.validLicenses, - copyright: this.copyright, }); } - return this._notice; + return this._attributions; } private findExternalDependencyVersion(name: string): string { @@ -368,7 +361,7 @@ export class Bundle { private esbuild(): esbuild.BuildResult { const bundle = esbuild.buildSync({ - entryPoints: this.entrypoints, + entryPoints: this.entryPoints, bundle: true, target: 'node12', platform: 'node', @@ -425,9 +418,9 @@ export class Bundle { return violations; } - private validateNotice(): Violation[] { - console.log('Validating notice'); - return this.notice.validate().violations; + private validateAttributions(): Violation[] { + console.log('Validating attributions'); + return this.attributions.validate().violations; } private addExternals(manifest: any) { diff --git a/tools/@aws-cdk/node-bundle/src/api/violation.ts b/tools/@aws-cdk/node-bundle/src/api/violation.ts index 02281b9bac4dd..cc79bca264d8e 100644 --- a/tools/@aws-cdk/node-bundle/src/api/violation.ts +++ b/tools/@aws-cdk/node-bundle/src/api/violation.ts @@ -9,9 +9,9 @@ export enum ViolationType { CIRCULAR_IMPORT = 'circular-import', /** - * Outdated notice file. + * Outdated attributions file. */ - OUTDATED_NOTICE = 'outdated-notice', + OUTDATED_ATTRIBUTIONS = 'outdated-attributions', /** * Missing notice file. diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index 6a47c4d32b3d3..fa3ebea614656 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -12,7 +12,6 @@ async function buildCommands() { const argv = yargs .usage('Usage: node-bundle COMMAND') .option('entrypoint', { type: 'array', nargs: 1, desc: 'List of entrypoints to bundle', demandOption: true }) - .option('copyright', { type: 'string', desc: 'Copyright statement to be added to the notice file', demandOption: true }) .option('external', { type: 'array', nargs: 1, default: [], desc: 'Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional)' }) .option('license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) .option('resource', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) @@ -36,8 +35,7 @@ async function buildCommands() { const props: BundleProps = { packageDir: process.cwd(), - copyright: argv.copyright, - entrypoints: argv.entrypoint as string[], + entryPoints: argv.entrypoint as string[], externals: argv.external as string[], licenses: argv.license as string[], resources: resources, diff --git a/tools/@aws-cdk/node-bundle/test/_package.ts b/tools/@aws-cdk/node-bundle/test/_package.ts index d4c734d2e5be4..e2bdca83914c2 100644 --- a/tools/@aws-cdk/node-bundle/test/_package.ts +++ b/tools/@aws-cdk/node-bundle/test/_package.ts @@ -80,7 +80,7 @@ export class Package { public readonly index: string[], public readonly foo: string[], public readonly bar: string[], - public notice: string) { + public attributions: string) { this.manifest.main = this.entrypoint; } @@ -107,7 +107,7 @@ export class Package { fs.writeFileSync(path.join(this.dir, 'lib', 'foo.js'), this.foo.join('\n')); fs.writeFileSync(path.join(this.dir, 'lib', 'bar.js'), this.bar.join('\n')); fs.writeFileSync(path.join(this.dir, this.entrypoint), this.index.join('\n')); - fs.writeFileSync(path.join(this.dir, 'NOTICE'), this.notice); + fs.writeFileSync(path.join(this.dir, 'THIRD_PARTY_LICENSES'), this.attributions); for (const dep of this.dependencies) { dep.write(); dep.pack(); diff --git a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts index 4d3956853924d..6dcef5f9a6eb9 100644 --- a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -14,8 +14,7 @@ test('validate', () => { const bundle = new Bundle({ packageDir: pkg.dir, - copyright: 'copyright', - entrypoints: [pkg.entrypoint], + entryPoints: [pkg.entrypoint], resources: { missing: 'bin/missing' }, licenses: ['Apache-2.0'], }); @@ -23,7 +22,7 @@ test('validate', () => { const expected = new Set([ 'circular-import: lib/bar.js -> lib/foo.js', 'missing-resource: Unable to find resource (missing) relative to the package directory', - 'outdated-notice: NOTICE is outdated', + 'outdated-attributions: THIRD_PARTY_LICENSES is outdated', `invalid-license: Dependency ${dep1.name}@${dep2.version} has an invalid license: UNKNOWN`, `multiple-license: Dependency ${dep2.name}@${dep2.version} has multiple licenses: Apache-2.0,MIT`, ]); @@ -42,8 +41,7 @@ test('write', () => { const bundle = new Bundle({ packageDir: pkg.dir, - copyright: 'copyright', - entrypoints: [pkg.entrypoint], + entryPoints: [pkg.entrypoint], licenses: ['Apache-2.0', 'MIT'], }); @@ -51,7 +49,7 @@ test('write', () => { expect(fs.existsSync(path.join(bundleDir, pkg.entrypoint))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'package.json'))).toBeTruthy(); - expect(fs.existsSync(path.join(bundleDir, 'NOTICE'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'THIRD_PARTY_LICENSES'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'lib', 'foo.js'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'lib', 'bar.js'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'node_modules'))).toBeFalsy(); @@ -69,34 +67,27 @@ test('pack', () => { const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); - const notice = [ - 'copyright', - '', - '----------------------------------------', - '', - 'This package includes the following third-party software:', + const attributions = [ + 'The consumer package includes the following third-party software/licensing:', '', `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, '', - '', - '---------------', + '----------------', '', `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, '', - '', - '---------------', + '----------------', '', ]; - pkg.notice = notice.join('\n'); + pkg.attributions = attributions.join('\n'); pkg.write(); pkg.install(); const bundle = new Bundle({ packageDir: pkg.dir, - copyright: 'copyright', - entrypoints: [pkg.entrypoint], + entryPoints: [pkg.entrypoint], licenses: ['Apache-2.0', 'MIT'], }); @@ -118,8 +109,7 @@ test('validate and fix', () => { const bundle = new Bundle({ packageDir: pkg.dir, - copyright: 'copyright', - entrypoints: [pkg.entrypoint], + entryPoints: [pkg.entrypoint], licenses: ['Apache-2.0', 'MIT'], }); diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts index 249117d63cbfa..19f1ed22500dc 100644 --- a/tools/@aws-cdk/node-bundle/test/cli.test.ts +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -15,7 +15,6 @@ test('validate', () => { try { const command = [ whereami(), - '--copyright', 'copyright', '--entrypoint', pkg.entrypoint, '--resource', 'missing:bin/missing', '--license', 'Apache-2.0', @@ -27,7 +26,7 @@ test('validate', () => { const expected = new Set([ `- invalid-license: Dependency ${dep1.name}@${dep1.version} has an invalid license: UNKNOWN`, `- multiple-license: Dependency ${dep2.name}@${dep2.version} has multiple licenses: Apache-2.0,MIT`, - '- outdated-notice: NOTICE is outdated (fixable)', + '- outdated-attributions: THIRD_PARTY_LICENSES is outdated (fixable)', '- missing-resource: Unable to find resource (missing) relative to the package directory', '- circular-import: lib/bar.js -> lib/foo.js', ]); @@ -47,7 +46,6 @@ test('write', () => { const command = [ whereami(), - '--copyright', 'copyright', '--entrypoint', pkg.entrypoint, '--license', 'Apache-2.0', '--license', 'MIT', @@ -57,7 +55,7 @@ test('write', () => { expect(fs.existsSync(path.join(bundleDir, pkg.entrypoint))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'package.json'))).toBeTruthy(); - expect(fs.existsSync(path.join(bundleDir, 'NOTICE'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'THIRD_PARTY_LICENSES'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'lib', 'foo.js'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'lib', 'bar.js'))).toBeTruthy(); expect(fs.existsSync(path.join(bundleDir, 'node_modules'))).toBeFalsy(); @@ -81,7 +79,6 @@ test('validate and fix', () => { const run = (sub: string) => { const command = [ whereami(), - '--copyright', 'copyright', '--entrypoint', pkg.entrypoint, '--license', 'Apache-2.0', '--license', 'MIT', @@ -95,7 +92,7 @@ test('validate and fix', () => { throw new Error('Expected packing to fail before fixing'); } catch (e) { // this should fix the fact we don't generate - // the project with the correct notice + // the project with the correct attributions run('validate --fix'); } @@ -111,33 +108,26 @@ test('pack', () => { const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); - const notice = [ - 'copyright', - '', - '----------------------------------------', - '', - 'This package includes the following third-party software:', + const attributions = [ + 'The consumer package includes the following third-party software/licensing:', '', `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, '', - '', - '---------------', + '----------------', '', `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, '', - '', - '---------------', + '----------------', '', ]; - pkg.notice = notice.join('\n'); + pkg.attributions = attributions.join('\n'); pkg.write(); pkg.install(); const command = [ whereami(), - '--copyright', 'copyright', '--entrypoint', pkg.entrypoint, '--license', 'Apache-2.0', '--license', 'MIT', From 23a71e3def9e84ba9f7f629b6c0e66fe93c702ef Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 17 Feb 2022 12:58:34 +0200 Subject: [PATCH 48/63] merge --- packages/aws-cdk/lib/cli.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index a3a7b0d27c990..75ef4828070b4 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -562,10 +562,6 @@ function yargsNegativeAlias>>>>>> master initCommandLine() .then(value => { if (value == null) { return; } @@ -584,7 +580,3 @@ export function cli() { }); } -<<<<<<< HEAD - -======= ->>>>>>> master From 65577cdfac745cd89bd1a9d17dc420db781ec65e Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 17 Feb 2022 13:44:02 +0200 Subject: [PATCH 49/63] handle multiple major versions of the same dep --- packages/aws-cdk/NOTICES | 465 ++---------------- tools/@aws-cdk/node-bundle/src/api/_notice.ts | 49 +- .../node-bundle/test/api/bundle.test.ts | 2 - tools/@aws-cdk/node-bundle/test/cli.test.ts | 2 - 4 files changed, 81 insertions(+), 437 deletions(-) diff --git a/packages/aws-cdk/NOTICES b/packages/aws-cdk/NOTICES index d301deeb4415e..9f7dcb03c890d 100644 --- a/packages/aws-cdk/NOTICES +++ b/packages/aws-cdk/NOTICES @@ -67,7 +67,6 @@ SOFTWARE. ** source-map-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT - --------------- ** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT @@ -364,209 +363,12 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------- -** aws-sdk@2.1072.0 - https://www.npmjs.com/package/aws-sdk/v/2.1072.0 | Apache-2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +** aws-sdk@2.1074.0 - https://www.npmjs.com/package/aws-sdk/v/2.1074.0 | Apache-2.0 +AWS SDK for JavaScript +Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +This product includes software developed at +Amazon Web Services, Inc. (http://aws.amazon.com/). --------------- @@ -591,7 +393,6 @@ limitations under the License. ** uuid@3.3.2 - https://www.npmjs.com/package/uuid/v/3.3.2 | MIT - --------------- ** xml2js@0.4.19 - https://www.npmjs.com/package/xml2js/v/0.4.19 | MIT @@ -1077,7 +878,6 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ** ms@2.1.2 - https://www.npmjs.com/package/ms/v/2.1.2 | MIT - --------------- ** debug@4.3.3 - https://www.npmjs.com/package/debug/v/4.3.3 | MIT @@ -1107,7 +907,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** agent-base@6.0.2 - https://www.npmjs.com/package/agent-base/v/6.0.2 | MIT - --------------- ** proxy-from-env@1.1.0 - https://www.npmjs.com/package/proxy-from-env/v/1.1.0 | MIT @@ -1137,12 +936,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** data-uri-to-buffer@3.0.1 - https://www.npmjs.com/package/data-uri-to-buffer/v/3.0.1 | MIT - --------------- ** get-uri@3.0.2 - https://www.npmjs.com/package/get-uri/v/3.0.2 | MIT - --------------- ** universalify@0.1.2 - https://www.npmjs.com/package/universalify/v/0.1.2 | MIT @@ -1237,12 +1034,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** @tootallnate/once@1.1.2 - https://www.npmjs.com/package/@tootallnate/once/v/1.1.2 | MIT - --------------- ** isarray@0.0.1 - https://www.npmjs.com/package/isarray/v/0.0.1 | MIT - --------------- ** core-util-is@1.0.3 - https://www.npmjs.com/package/core-util-is/v/1.0.3 | MIT @@ -1340,7 +1135,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. ** xregexp@2.0.0 - https://www.npmjs.com/package/xregexp/v/2.0.0 | MIT - --------------- ** ftp@0.3.10 - https://www.npmjs.com/package/ftp/v/0.3.10 | MIT @@ -1366,7 +1160,7 @@ IN THE SOFTWARE. --------------- -** bytes@3.1.1 - https://www.npmjs.com/package/bytes/v/3.1.1 | MIT +** bytes@3.1.2 - https://www.npmjs.com/package/bytes/v/3.1.2 | MIT (The MIT License) Copyright (c) 2012-2014 TJ Holowaychuk @@ -1600,7 +1394,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------- -** raw-body@2.4.2 - https://www.npmjs.com/package/raw-body/v/2.4.2 | MIT +** raw-body@2.4.3 - https://www.npmjs.com/package/raw-body/v/2.4.3 | MIT The MIT License (MIT) Copyright (c) 2013-2014 Jonathan Ong @@ -1629,17 +1423,14 @@ THE SOFTWARE. ** http-proxy-agent@4.0.1 - https://www.npmjs.com/package/http-proxy-agent/v/4.0.1 | MIT - --------------- ** https-proxy-agent@5.0.0 - https://www.npmjs.com/package/https-proxy-agent/v/5.0.0 | MIT - --------------- ** ip@1.1.5 - https://www.npmjs.com/package/ip/v/1.1.5 | MIT - --------------- ** smart-buffer@4.2.0 - https://www.npmjs.com/package/smart-buffer/v/4.2.0 | MIT @@ -1694,7 +1485,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** socks-proxy-agent@5.0.1 - https://www.npmjs.com/package/socks-proxy-agent/v/5.0.1 | MIT - --------------- ** estraverse@4.3.0 - https://www.npmjs.com/package/estraverse/v/4.3.0 | BSD-2-Clause @@ -1838,8 +1628,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------- -** vm2@3.9.6 - https://www.npmjs.com/package/vm2/v/3.9.6 | MIT - +** vm2@3.9.8 - https://www.npmjs.com/package/vm2/v/3.9.8 | MIT --------------- @@ -1897,32 +1686,26 @@ THE SOFTWARE. ** degenerator@3.0.1 - https://www.npmjs.com/package/degenerator/v/3.0.1 | MIT - --------------- ** pac-resolver@5.0.0 - https://www.npmjs.com/package/pac-resolver/v/5.0.0 | MIT - --------------- ** netmask@2.0.2 - https://www.npmjs.com/package/netmask/v/2.0.2 | MIT - --------------- ** pac-proxy-agent@5.0.0 - https://www.npmjs.com/package/pac-proxy-agent/v/5.0.0 | MIT - --------------- ** proxy-agent@5.0.0 - https://www.npmjs.com/package/proxy-agent/v/5.0.0 | MIT - --------------- ** uuid@8.3.2 - https://www.npmjs.com/package/uuid/v/8.3.2 | MIT - --------------- ** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT @@ -2024,7 +1807,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** balanced-match@1.0.2 - https://www.npmjs.com/package/balanced-match/v/1.0.2 | MIT - --------------- ** brace-expansion@1.1.11 - https://www.npmjs.com/package/brace-expansion/v/1.1.11 | MIT @@ -2053,7 +1835,7 @@ SOFTWARE. --------------- -** minimatch@3.0.5 - https://www.npmjs.com/package/minimatch/v/3.0.5 | ISC +** minimatch@3.1.2 - https://www.npmjs.com/package/minimatch/v/3.1.2 | ISC The ISC License Copyright (c) Isaac Z. Schlueter and Contributors @@ -2416,12 +2198,10 @@ THE SOFTWARE. ** process-nextick-args@2.0.1 - https://www.npmjs.com/package/process-nextick-args/v/2.0.1 | MIT - --------------- ** isarray@1.0.0 - https://www.npmjs.com/package/isarray/v/1.0.0 | MIT - --------------- ** readable-stream@2.3.7 - https://www.npmjs.com/package/readable-stream/v/2.3.7 | MIT @@ -3391,7 +3171,6 @@ OTHER DEALINGS IN THE SOFTWARE. ** bl@4.1.0 - https://www.npmjs.com/package/bl/v/4.1.0 | MIT - --------------- ** tar-stream@2.2.0 - https://www.npmjs.com/package/tar-stream/v/2.2.0 | MIT @@ -3484,209 +3263,56 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------- -** @jsii/check-node@1.53.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.53.0 | Apache-2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +** @jsii/check-node@1.54.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.54.0 | Apache-2.0 +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +--------------- - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +** brace-expansion@2.0.1 - https://www.npmjs.com/package/brace-expansion/v/2.0.1 | MIT +MIT License - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +Copyright (c) 2013 Julian Gruber - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. +--------------- - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +** minimatch@5.0.0 - https://www.npmjs.com/package/minimatch/v/5.0.0 | ISC +The ISC License - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. - http://www.apache.org/licenses/LICENSE-2.0 +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------- @@ -4092,7 +3718,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ** get-caller-file@2.0.5 - https://www.npmjs.com/package/get-caller-file/v/2.0.5 | ISC - --------------- ** require-directory@2.1.1 - https://www.npmjs.com/package/require-directory/v/2.1.1 | MIT diff --git a/tools/@aws-cdk/node-bundle/src/api/_notice.ts b/tools/@aws-cdk/node-bundle/src/api/_notice.ts index 3b32e1c6d3b8f..3cf30b095aa9b 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_notice.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_notice.ts @@ -1,5 +1,6 @@ import * as path from 'path'; import * as fs from 'fs-extra'; +import type { ModuleInfo } from 'license-checker'; import { shell } from './_shell'; import type { Package } from './bundle'; import { Violation, ViolationType, ViolationsReport } from './violation'; @@ -143,7 +144,13 @@ export class Notice { for (const attr of attributions.values()) { notice.push(`** ${attr.package} - ${attr.url} | ${attr.licenses[0]}`); - notice.push(attr.licenseText ?? ''); + + // prefer notice over license + if (attr.noticeText) { + notice.push(attr.noticeText); + } else if (attr.licenseText) { + notice.push(attr.licenseText); + } notice.push(ATTRIBUTION_SEPARATOR); } @@ -165,30 +172,41 @@ export class Notice { const pkg = (d: Package) => `${d.name}@${d.version}`; - const packages = this.dependencies.map(d => pkg(d)).join(';'); + const packages = this.dependencies.map(d => pkg(d)); - // we don't use the programmatic API since it only offers an async API. - // prefer to stay sync for now since its easier to integrate with other tooling. - // will offer an async API further down the road. - const command = `${require.resolve('license-checker/bin/license-checker')} --json --packages "${packages}"`; - const output = shell(command, { cwd: this.dependenciesRoot, quiet: true }); - const infos = JSON.parse(output); + function fetchInfos(_cwd: string, _packages: string[]) { + // we don't use the programmatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + const command = `${require.resolve('license-checker/bin/license-checker')} --json --packages "${_packages.join(';')}"`; + const output = shell(command, { cwd: _cwd, quiet: true }); + return JSON.parse(output); + } - for (const dep of this.dependencies) { + // first run a global command to fetch as much information in one shot + const infos = fetchInfos(this.dependenciesRoot, packages); + for (const dep of this.dependencies) { const key = pkg(dep); - const info = infos[key]; + + // sometimes the dependency might not exist from fetching information globally, + // so we try fetching a concrete package. this can happen for example when + // two different major versions exist of the same dependency. + const info: ModuleInfo = infos[key] ?? fetchInfos(dep.path, [pkg(dep)])[key]; if (!info) { // make sure all dependencies are accounted for. - throw new Error(`Unable to locate license information for ${key}`); + throw new Error(`Unable to locate license information for ${key} (${dep.path})`); } + const noticeText = info.noticeFile ? fs.readFileSync(info.noticeFile, { encoding: 'utf-8' }) : undefined; + // for some reason, the license-checker package falls back to the README.md file of the package for license // text. this seems strange, disabling that for now. // see https://github.com/davglass/license-checker/blob/master/lib/license-files.js#L9 // note that a non existing license file is ok as long as the license type could be extracted. const licenseFile = info.licenseFile?.toLowerCase().endsWith('.md') ? undefined : info.licenseFile; + const licenseText = licenseFile ? fs.readFileSync(licenseFile, { encoding: 'utf-8' }) : undefined; // the licenses key comes in different types but we convert it here // to always be an array. @@ -197,8 +215,9 @@ export class Notice { attributions.set(key, { package: key, url: `https://www.npmjs.com/package/${dep.name}/v/${dep.version}`, - licenses, - licenseText: (licenseFile && fs.existsSync(licenseFile)) ? fs.readFileSync(licenseFile, { encoding: 'utf-8' }) : undefined, + licenses: licenses ?? [], + licenseText, + noticeText, }); } @@ -227,4 +246,8 @@ interface Attribution { * Package license content. */ readonly licenseText?: string; + /** + * Package notice. + */ + readonly noticeText?: string; } diff --git a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts index 4d3956853924d..aa878db34b5f8 100644 --- a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -78,12 +78,10 @@ test('pack', () => { '', `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, '', - '', '---------------', '', `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, '', - '', '---------------', '', ]; diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts index 249117d63cbfa..e9cc8c2d4dbdd 100644 --- a/tools/@aws-cdk/node-bundle/test/cli.test.ts +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -120,12 +120,10 @@ test('pack', () => { '', `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, '', - '', '---------------', '', `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, '', - '', '---------------', '', ]; From 6564a1599d7cdb3fdcd26f1b5d5f243829108477 Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 17 Feb 2022 17:40:34 +0200 Subject: [PATCH 50/63] switch to THIRD_PARTY_LICENSES --- packages/aws-cdk/NOTICE | 14 + .../aws-cdk/{NOTICES => THIRD_PARTY_LICENSES} | 322 +++++++++--------- packages/aws-cdk/package.json | 2 - tools/@aws-cdk/pkglint/lib/rules.ts | 35 -- 4 files changed, 172 insertions(+), 201 deletions(-) create mode 100644 packages/aws-cdk/NOTICE rename packages/aws-cdk/{NOTICES => THIRD_PARTY_LICENSES} (98%) diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE new file mode 100644 index 0000000000000..f80e579e74458 --- /dev/null +++ b/packages/aws-cdk/NOTICE @@ -0,0 +1,14 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/packages/aws-cdk/NOTICES b/packages/aws-cdk/THIRD_PARTY_LICENSES similarity index 98% rename from packages/aws-cdk/NOTICES rename to packages/aws-cdk/THIRD_PARTY_LICENSES index 9f7dcb03c890d..f02e8576f3d4b 100644 --- a/packages/aws-cdk/NOTICES +++ b/packages/aws-cdk/THIRD_PARTY_LICENSES @@ -1,10 +1,4 @@ -AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - ----------------------------------------- - -This package includes the following third-party software: +The aws-cdk package includes the following third-party software/licensing: ** source-map@0.6.1 - https://www.npmjs.com/package/source-map/v/0.6.1 | BSD-3-Clause @@ -37,7 +31,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** buffer-from@1.1.2 - https://www.npmjs.com/package/buffer-from/v/1.1.2 | MIT MIT License @@ -63,11 +57,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** source-map-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT ---------------- +---------------- ** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT The MIT License (MIT) @@ -79,7 +73,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** color-convert@2.0.1 - https://www.npmjs.com/package/color-convert/v/2.0.1 | MIT Copyright (c) 2011-2016 Heather Arthur @@ -105,7 +99,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** ansi-styles@4.3.0 - https://www.npmjs.com/package/ansi-styles/v/4.3.0 | MIT MIT License @@ -119,7 +113,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** has-flag@4.0.0 - https://www.npmjs.com/package/has-flag/v/4.0.0 | MIT MIT License @@ -133,7 +127,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** supports-color@7.2.0 - https://www.npmjs.com/package/supports-color/v/7.2.0 | MIT MIT License @@ -147,7 +141,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** chalk@4.1.2 - https://www.npmjs.com/package/chalk/v/4.1.2 | MIT MIT License @@ -161,7 +155,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** universalify@2.0.0 - https://www.npmjs.com/package/universalify/v/2.0.0 | MIT (The MIT License) @@ -186,7 +180,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** graceful-fs@4.2.9 - https://www.npmjs.com/package/graceful-fs/v/4.2.9 | ISC The ISC License @@ -206,7 +200,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT (The MIT License) @@ -226,7 +220,7 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC The ISC License @@ -237,7 +231,7 @@ Permission to use, copy, modify, and/or distribute this software for any purpose THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT (The MIT License) @@ -257,7 +251,7 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC Copyright 2018 Eemeli Aro @@ -275,7 +269,7 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** jsonschema@1.4.0 - https://www.npmjs.com/package/jsonschema/v/1.4.0 | MIT jsonschema is licensed under MIT license. @@ -301,7 +295,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** semver@7.3.5 - https://www.npmjs.com/package/semver/v/7.3.5 | ISC The ISC License @@ -321,7 +315,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** yallist@4.0.0 - https://www.npmjs.com/package/yallist/v/4.0.0 | ISC The ISC License @@ -341,7 +335,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** lru-cache@6.0.0 - https://www.npmjs.com/package/lru-cache/v/6.0.0 | ISC The ISC License @@ -361,7 +355,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** aws-sdk@2.1074.0 - https://www.npmjs.com/package/aws-sdk/v/2.1074.0 | Apache-2.0 AWS SDK for JavaScript @@ -371,7 +365,7 @@ This product includes software developed at Amazon Web Services, Inc. (http://aws.amazon.com/). ---------------- +---------------- ** jmespath@0.16.0 - https://www.npmjs.com/package/jmespath/v/0.16.0 | Apache-2.0 Copyright 2014 James Saryerwinnie @@ -389,11 +383,11 @@ See the License for the specific language governing permissions and limitations under the License. ---------------- +---------------- ** uuid@3.3.2 - https://www.npmjs.com/package/uuid/v/3.3.2 | MIT ---------------- +---------------- ** xml2js@0.4.19 - https://www.npmjs.com/package/xml2js/v/0.4.19 | MIT Copyright 2010, 2011, 2012, 2013. All rights reserved. @@ -417,7 +411,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** xmlbuilder@9.0.7 - https://www.npmjs.com/package/xmlbuilder/v/9.0.7 | MIT The MIT License (MIT) @@ -443,7 +437,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** sax@1.2.4 - https://www.npmjs.com/package/sax/v/1.2.4 | ISC The ISC License @@ -489,7 +483,7 @@ License, as follows: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** fast-deep-equal@3.1.3 - https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 | MIT MIT License @@ -515,7 +509,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** ansi-regex@5.0.1 - https://www.npmjs.com/package/ansi-regex/v/5.0.1 | MIT MIT License @@ -529,7 +523,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** strip-ansi@6.0.1 - https://www.npmjs.com/package/strip-ansi/v/6.0.1 | MIT MIT License @@ -543,7 +537,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** is-fullwidth-code-point@3.0.0 - https://www.npmjs.com/package/is-fullwidth-code-point/v/3.0.0 | MIT MIT License @@ -557,7 +551,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** emoji-regex@8.0.0 - https://www.npmjs.com/package/emoji-regex/v/8.0.0 | MIT Copyright Mathias Bynens @@ -582,7 +576,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** string-width@4.2.3 - https://www.npmjs.com/package/string-width/v/4.2.3 | MIT MIT License @@ -596,7 +590,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** astral-regex@2.0.0 - https://www.npmjs.com/package/astral-regex/v/2.0.0 | MIT MIT License @@ -610,7 +604,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** slice-ansi@4.0.0 - https://www.npmjs.com/package/slice-ansi/v/4.0.0 | MIT MIT License @@ -625,7 +619,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** table@6.8.0 - https://www.npmjs.com/package/table/v/6.8.0 | BSD-3-Clause Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) @@ -654,7 +648,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** ajv@8.10.0 - https://www.npmjs.com/package/ajv/v/8.10.0 | MIT The MIT License (MIT) @@ -681,7 +675,7 @@ SOFTWARE. ---------------- +---------------- ** lodash.truncate@4.4.2 - https://www.npmjs.com/package/lodash.truncate/v/4.4.2 | MIT Copyright jQuery Foundation and other contributors @@ -733,7 +727,7 @@ licenses; we recommend you read them, as their terms may differ from the terms above. ---------------- +---------------- ** diff@5.0.0 - https://www.npmjs.com/package/diff/v/5.0.0 | BSD-3-Clause Software License Agreement (BSD License) @@ -768,7 +762,7 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** mute-stream@0.0.8 - https://www.npmjs.com/package/mute-stream/v/0.0.8 | ISC The ISC License @@ -788,7 +782,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** read@1.0.7 - https://www.npmjs.com/package/read/v/1.0.7 | ISC The ISC License @@ -808,7 +802,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** promptly@3.2.0 - https://www.npmjs.com/package/promptly/v/3.2.0 | MIT The MIT License (MIT) @@ -834,7 +828,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** yallist@3.1.1 - https://www.npmjs.com/package/yallist/v/3.1.1 | ISC The ISC License @@ -854,7 +848,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** lru-cache@5.1.1 - https://www.npmjs.com/package/lru-cache/v/5.1.1 | ISC The ISC License @@ -874,11 +868,11 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** ms@2.1.2 - https://www.npmjs.com/package/ms/v/2.1.2 | MIT ---------------- +---------------- ** debug@4.3.3 - https://www.npmjs.com/package/debug/v/4.3.3 | MIT (The MIT License) @@ -903,11 +897,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** agent-base@6.0.2 - https://www.npmjs.com/package/agent-base/v/6.0.2 | MIT ---------------- +---------------- ** proxy-from-env@1.1.0 - https://www.npmjs.com/package/proxy-from-env/v/1.1.0 | MIT The MIT License @@ -932,15 +926,15 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** data-uri-to-buffer@3.0.1 - https://www.npmjs.com/package/data-uri-to-buffer/v/3.0.1 | MIT ---------------- +---------------- ** get-uri@3.0.2 - https://www.npmjs.com/package/get-uri/v/3.0.2 | MIT ---------------- +---------------- ** universalify@0.1.2 - https://www.npmjs.com/package/universalify/v/0.1.2 | MIT (The MIT License) @@ -965,7 +959,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** fs-extra@8.1.0 - https://www.npmjs.com/package/fs-extra/v/8.1.0 | MIT (The MIT License) @@ -985,7 +979,7 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** jsonfile@4.0.0 - https://www.npmjs.com/package/jsonfile/v/4.0.0 | MIT (The MIT License) @@ -1005,7 +999,7 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** file-uri-to-path@2.0.0 - https://www.npmjs.com/package/file-uri-to-path/v/2.0.0 | MIT Copyright (c) 2014 Nathan Rajlich @@ -1030,15 +1024,15 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** @tootallnate/once@1.1.2 - https://www.npmjs.com/package/@tootallnate/once/v/1.1.2 | MIT ---------------- +---------------- ** isarray@0.0.1 - https://www.npmjs.com/package/isarray/v/0.0.1 | MIT ---------------- +---------------- ** core-util-is@1.0.3 - https://www.npmjs.com/package/core-util-is/v/1.0.3 | MIT Copyright Node.js contributors. All rights reserved. @@ -1062,7 +1056,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** inherits@2.0.4 - https://www.npmjs.com/package/inherits/v/2.0.4 | ISC The ISC License @@ -1083,7 +1077,7 @@ PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** readable-stream@1.1.14 - https://www.npmjs.com/package/readable-stream/v/1.1.14 | MIT Copyright Joyent, Inc. and other Node contributors. All rights reserved. @@ -1106,7 +1100,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** string_decoder@0.10.31 - https://www.npmjs.com/package/string_decoder/v/0.10.31 | MIT Copyright Joyent, Inc. and other Node contributors. @@ -1131,11 +1125,11 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** xregexp@2.0.0 - https://www.npmjs.com/package/xregexp/v/2.0.0 | MIT ---------------- +---------------- ** ftp@0.3.10 - https://www.npmjs.com/package/ftp/v/0.3.10 | MIT Copyright Brian White. All rights reserved. @@ -1158,7 +1152,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** bytes@3.1.2 - https://www.npmjs.com/package/bytes/v/3.1.2 | MIT (The MIT License) @@ -1186,7 +1180,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** depd@1.1.2 - https://www.npmjs.com/package/depd/v/1.1.2 | MIT (The MIT License) @@ -1213,7 +1207,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** setprototypeof@1.2.0 - https://www.npmjs.com/package/setprototypeof/v/1.2.0 | ISC Copyright (c) 2015, Wes Todd @@ -1231,7 +1225,7 @@ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** statuses@1.5.0 - https://www.npmjs.com/package/statuses/v/1.5.0 | MIT @@ -1259,7 +1253,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** toidentifier@1.0.1 - https://www.npmjs.com/package/toidentifier/v/1.0.1 | MIT MIT License @@ -1285,7 +1279,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** http-errors@1.8.1 - https://www.npmjs.com/package/http-errors/v/1.8.1 | MIT @@ -1313,7 +1307,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** safer-buffer@2.1.2 - https://www.npmjs.com/package/safer-buffer/v/2.1.2 | MIT MIT License @@ -1339,7 +1333,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** iconv-lite@0.4.24 - https://www.npmjs.com/package/iconv-lite/v/0.4.24 | MIT Copyright (c) 2011 Alexander Shtuchkin @@ -1365,7 +1359,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** unpipe@1.0.0 - https://www.npmjs.com/package/unpipe/v/1.0.0 | MIT (The MIT License) @@ -1392,7 +1386,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** raw-body@2.4.3 - https://www.npmjs.com/package/raw-body/v/2.4.3 | MIT The MIT License (MIT) @@ -1419,19 +1413,19 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** http-proxy-agent@4.0.1 - https://www.npmjs.com/package/http-proxy-agent/v/4.0.1 | MIT ---------------- +---------------- ** https-proxy-agent@5.0.0 - https://www.npmjs.com/package/https-proxy-agent/v/5.0.0 | MIT ---------------- +---------------- ** ip@1.1.5 - https://www.npmjs.com/package/ip/v/1.1.5 | MIT ---------------- +---------------- ** smart-buffer@4.2.0 - https://www.npmjs.com/package/smart-buffer/v/4.2.0 | MIT The MIT License (MIT) @@ -1456,7 +1450,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** socks@2.6.2 - https://www.npmjs.com/package/socks/v/2.6.2 | MIT The MIT License (MIT) @@ -1481,11 +1475,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** socks-proxy-agent@5.0.1 - https://www.npmjs.com/package/socks-proxy-agent/v/5.0.1 | MIT ---------------- +---------------- ** estraverse@4.3.0 - https://www.npmjs.com/package/estraverse/v/4.3.0 | BSD-2-Clause Redistribution and use in source and binary forms, with or without @@ -1509,7 +1503,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** esutils@2.0.3 - https://www.npmjs.com/package/esutils/v/2.0.3 | BSD-2-Clause Redistribution and use in source and binary forms, with or without @@ -1533,7 +1527,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** escodegen@1.14.3 - https://www.npmjs.com/package/escodegen/v/1.14.3 | BSD-2-Clause Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. @@ -1559,7 +1553,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** esprima@4.0.1 - https://www.npmjs.com/package/esprima/v/4.0.1 | BSD-2-Clause Copyright JS Foundation and other contributors, https://js.foundation/ @@ -1585,7 +1579,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------- +---------------- ** tslib@2.3.1 - https://www.npmjs.com/package/tslib/v/2.3.1 | 0BSD Copyright (c) Microsoft Corporation. @@ -1601,7 +1595,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** ast-types@0.13.4 - https://www.npmjs.com/package/ast-types/v/0.13.4 | MIT Copyright (c) 2013 Ben Newman @@ -1626,11 +1620,11 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** vm2@3.9.8 - https://www.npmjs.com/package/vm2/v/3.9.8 | MIT ---------------- +---------------- ** acorn@8.7.0 - https://www.npmjs.com/package/acorn/v/8.7.0 | MIT MIT License @@ -1656,7 +1650,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** acorn-walk@8.2.0 - https://www.npmjs.com/package/acorn-walk/v/8.2.0 | MIT MIT License @@ -1682,31 +1676,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** degenerator@3.0.1 - https://www.npmjs.com/package/degenerator/v/3.0.1 | MIT ---------------- +---------------- ** pac-resolver@5.0.0 - https://www.npmjs.com/package/pac-resolver/v/5.0.0 | MIT ---------------- +---------------- ** netmask@2.0.2 - https://www.npmjs.com/package/netmask/v/2.0.2 | MIT ---------------- +---------------- ** pac-proxy-agent@5.0.0 - https://www.npmjs.com/package/pac-proxy-agent/v/5.0.0 | MIT ---------------- +---------------- ** proxy-agent@5.0.0 - https://www.npmjs.com/package/proxy-agent/v/5.0.0 | MIT ---------------- +---------------- ** uuid@8.3.2 - https://www.npmjs.com/package/uuid/v/8.3.2 | MIT ---------------- +---------------- ** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT The MIT License (MIT) @@ -1732,7 +1726,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** fs.realpath@1.0.0 - https://www.npmjs.com/package/fs.realpath/v/1.0.0 | ISC The ISC License @@ -1780,7 +1774,7 @@ the licensed code: DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** concat-map@0.0.1 - https://www.npmjs.com/package/concat-map/v/0.0.1 | MIT This software is released under the MIT license: @@ -1803,11 +1797,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** balanced-match@1.0.2 - https://www.npmjs.com/package/balanced-match/v/1.0.2 | MIT ---------------- +---------------- ** brace-expansion@1.1.11 - https://www.npmjs.com/package/brace-expansion/v/1.1.11 | MIT MIT License @@ -1833,7 +1827,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** minimatch@3.1.2 - https://www.npmjs.com/package/minimatch/v/3.1.2 | ISC The ISC License @@ -1853,7 +1847,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** path-is-absolute@1.0.1 - https://www.npmjs.com/package/path-is-absolute/v/1.0.1 | MIT The MIT License (MIT) @@ -1879,7 +1873,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** glob@7.2.0 - https://www.npmjs.com/package/glob/v/7.2.0 | ISC The ISC License @@ -1905,7 +1899,7 @@ under a Creative Commons Attribution-ShareAlike 4.0 International License https://creativecommons.org/licenses/by-sa/4.0/ ---------------- +---------------- ** wrappy@1.0.2 - https://www.npmjs.com/package/wrappy/v/1.0.2 | ISC The ISC License @@ -1925,7 +1919,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** once@1.4.0 - https://www.npmjs.com/package/once/v/1.4.0 | ISC The ISC License @@ -1945,7 +1939,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** inflight@1.0.6 - https://www.npmjs.com/package/inflight/v/1.0.6 | ISC The ISC License @@ -1965,7 +1959,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** readdir-glob@1.1.1 - https://www.npmjs.com/package/readdir-glob/v/1.1.1 | Apache-2.0 Apache License @@ -2170,7 +2164,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. See the License for the specific language governing permissions and limitations under the License. ---------------- +---------------- ** async@3.2.3 - https://www.npmjs.com/package/async/v/3.2.3 | MIT Copyright (c) 2010-2018 Caolan McMahon @@ -2194,15 +2188,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** process-nextick-args@2.0.1 - https://www.npmjs.com/package/process-nextick-args/v/2.0.1 | MIT ---------------- +---------------- ** isarray@1.0.0 - https://www.npmjs.com/package/isarray/v/1.0.0 | MIT ---------------- +---------------- ** readable-stream@2.3.7 - https://www.npmjs.com/package/readable-stream/v/2.3.7 | MIT Node.js is licensed for use as follows: @@ -2254,7 +2248,7 @@ IN THE SOFTWARE. """ ---------------- +---------------- ** safe-buffer@5.1.2 - https://www.npmjs.com/package/safe-buffer/v/5.1.2 | MIT The MIT License (MIT) @@ -2280,7 +2274,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** util-deprecate@1.0.2 - https://www.npmjs.com/package/util-deprecate/v/1.0.2 | MIT (The MIT License) @@ -2309,7 +2303,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT Node.js is licensed for use as follows: @@ -2362,7 +2356,7 @@ IN THE SOFTWARE. ---------------- +---------------- ** lazystream@1.0.1 - https://www.npmjs.com/package/lazystream/v/1.0.1 | MIT Copyright (c) 2013 J. Pommerening, contributors. @@ -2390,7 +2384,7 @@ OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** normalize-path@3.0.0 - https://www.npmjs.com/package/normalize-path/v/3.0.0 | MIT The MIT License (MIT) @@ -2416,7 +2410,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** lodash.defaults@4.2.0 - https://www.npmjs.com/package/lodash.defaults/v/4.2.0 | MIT Copyright jQuery Foundation and other contributors @@ -2468,7 +2462,7 @@ licenses; we recommend you read them, as their terms may differ from the terms above. ---------------- +---------------- ** lodash.flatten@4.4.0 - https://www.npmjs.com/package/lodash.flatten/v/4.4.0 | MIT Copyright jQuery Foundation and other contributors @@ -2520,7 +2514,7 @@ licenses; we recommend you read them, as their terms may differ from the terms above. ---------------- +---------------- ** lodash.difference@4.5.0 - https://www.npmjs.com/package/lodash.difference/v/4.5.0 | MIT Copyright jQuery Foundation and other contributors @@ -2572,7 +2566,7 @@ licenses; we recommend you read them, as their terms may differ from the terms above. ---------------- +---------------- ** lodash.union@4.6.0 - https://www.npmjs.com/package/lodash.union/v/4.6.0 | MIT Copyright jQuery Foundation and other contributors @@ -2624,7 +2618,7 @@ licenses; we recommend you read them, as their terms may differ from the terms above. ---------------- +---------------- ** lodash.isplainobject@4.0.6 - https://www.npmjs.com/package/lodash.isplainobject/v/4.0.6 | MIT Copyright jQuery Foundation and other contributors @@ -2676,7 +2670,7 @@ licenses; we recommend you read them, as their terms may differ from the terms above. ---------------- +---------------- ** archiver-utils@2.1.0 - https://www.npmjs.com/package/archiver-utils/v/2.1.0 | MIT Copyright (c) 2015 Chris Talkington. @@ -2702,7 +2696,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** archiver@5.3.0 - https://www.npmjs.com/package/archiver/v/5.3.0 | MIT Copyright (c) 2012-2014 Chris Talkington, contributors. @@ -2728,7 +2722,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** readable-stream@3.6.0 - https://www.npmjs.com/package/readable-stream/v/3.6.0 | MIT Node.js is licensed for use as follows: @@ -2780,7 +2774,7 @@ IN THE SOFTWARE. """ ---------------- +---------------- ** safe-buffer@5.2.1 - https://www.npmjs.com/package/safe-buffer/v/5.2.1 | MIT The MIT License (MIT) @@ -2806,7 +2800,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** string_decoder@1.3.0 - https://www.npmjs.com/package/string_decoder/v/1.3.0 | MIT Node.js is licensed for use as follows: @@ -2859,7 +2853,7 @@ IN THE SOFTWARE. ---------------- +---------------- ** compress-commons@4.1.1 - https://www.npmjs.com/package/compress-commons/v/4.1.1 | MIT Copyright (c) 2014 Chris Talkington, contributors. @@ -2885,7 +2879,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** buffer-crc32@0.2.13 - https://www.npmjs.com/package/buffer-crc32/v/0.2.13 | MIT The MIT License @@ -2909,7 +2903,7 @@ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TOR ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** crc-32@1.2.1 - https://www.npmjs.com/package/crc-32/v/1.2.1 | Apache-2.0 Apache License @@ -3115,7 +3109,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL limitations under the License. ---------------- +---------------- ** crc32-stream@4.0.2 - https://www.npmjs.com/package/crc32-stream/v/4.0.2 | MIT Copyright (c) 2014 Chris Talkington, contributors. @@ -3141,7 +3135,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** zip-stream@4.1.0 - https://www.npmjs.com/package/zip-stream/v/4.1.0 | MIT Copyright (c) 2014 Chris Talkington, contributors. @@ -3167,11 +3161,11 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** bl@4.1.0 - https://www.npmjs.com/package/bl/v/4.1.0 | MIT ---------------- +---------------- ** tar-stream@2.2.0 - https://www.npmjs.com/package/tar-stream/v/2.2.0 | MIT The MIT License (MIT) @@ -3196,7 +3190,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** fs-constants@1.0.0 - https://www.npmjs.com/package/fs-constants/v/1.0.0 | MIT The MIT License (MIT) @@ -3222,7 +3216,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** end-of-stream@1.4.4 - https://www.npmjs.com/package/end-of-stream/v/1.4.4 | MIT The MIT License (MIT) @@ -3247,7 +3241,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** wrap-ansi@7.0.0 - https://www.npmjs.com/package/wrap-ansi/v/7.0.0 | MIT MIT License @@ -3261,14 +3255,14 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** @jsii/check-node@1.54.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.54.0 | Apache-2.0 jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. ---------------- +---------------- ** brace-expansion@2.0.1 - https://www.npmjs.com/package/brace-expansion/v/2.0.1 | MIT MIT License @@ -3294,7 +3288,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** minimatch@5.0.0 - https://www.npmjs.com/package/minimatch/v/5.0.0 | ISC The ISC License @@ -3314,7 +3308,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** picomatch@2.3.1 - https://www.npmjs.com/package/picomatch/v/2.3.1 | MIT The MIT License (MIT) @@ -3340,7 +3334,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** readdirp@3.6.0 - https://www.npmjs.com/package/readdirp/v/3.6.0 | MIT MIT License @@ -3366,7 +3360,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** anymatch@3.1.2 - https://www.npmjs.com/package/anymatch/v/3.1.2 | ISC The ISC License @@ -3386,7 +3380,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** is-extglob@2.1.1 - https://www.npmjs.com/package/is-extglob/v/2.1.1 | MIT The MIT License (MIT) @@ -3412,7 +3406,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** is-glob@4.0.3 - https://www.npmjs.com/package/is-glob/v/4.0.3 | MIT The MIT License (MIT) @@ -3438,7 +3432,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** glob-parent@5.1.2 - https://www.npmjs.com/package/glob-parent/v/5.1.2 | ISC The ISC License @@ -3458,7 +3452,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** braces@3.0.2 - https://www.npmjs.com/package/braces/v/3.0.2 | MIT The MIT License (MIT) @@ -3484,7 +3478,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** is-number@7.0.0 - https://www.npmjs.com/package/is-number/v/7.0.0 | MIT The MIT License (MIT) @@ -3510,7 +3504,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** to-regex-range@5.0.1 - https://www.npmjs.com/package/to-regex-range/v/5.0.1 | MIT The MIT License (MIT) @@ -3536,7 +3530,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** fill-range@7.0.1 - https://www.npmjs.com/package/fill-range/v/7.0.1 | MIT The MIT License (MIT) @@ -3562,7 +3556,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** binary-extensions@2.2.0 - https://www.npmjs.com/package/binary-extensions/v/2.2.0 | MIT MIT License @@ -3576,7 +3570,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** is-binary-path@2.1.0 - https://www.npmjs.com/package/is-binary-path/v/2.1.0 | MIT MIT License @@ -3590,7 +3584,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** chokidar@3.5.3 - https://www.npmjs.com/package/chokidar/v/3.5.3 | MIT The MIT License (MIT) @@ -3616,7 +3610,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** camelcase@6.3.0 - https://www.npmjs.com/package/camelcase/v/6.3.0 | MIT MIT License @@ -3630,7 +3624,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** decamelize@5.0.1 - https://www.npmjs.com/package/decamelize/v/5.0.1 | MIT MIT License @@ -3644,7 +3638,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** y18n@5.0.8 - https://www.npmjs.com/package/y18n/v/5.0.8 | ISC Copyright (c) 2015, Contributors @@ -3662,7 +3656,7 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** yargs-parser@20.2.9 - https://www.npmjs.com/package/yargs-parser/v/20.2.9 | ISC Copyright (c) 2016, Contributors @@ -3681,7 +3675,7 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** cliui@7.0.4 - https://www.npmjs.com/package/cliui/v/7.0.4 | ISC Copyright (c) 2015, Contributors @@ -3700,7 +3694,7 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- +---------------- ** escalade@3.1.1 - https://www.npmjs.com/package/escalade/v/3.1.1 | MIT MIT License @@ -3714,11 +3708,11 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** get-caller-file@2.0.5 - https://www.npmjs.com/package/get-caller-file/v/2.0.5 | ISC ---------------- +---------------- ** require-directory@2.1.1 - https://www.npmjs.com/package/require-directory/v/2.1.1 | MIT The MIT License (MIT) @@ -3745,7 +3739,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- ** yargs@16.2.0 - https://www.npmjs.com/package/yargs/v/16.2.0 | MIT MIT License @@ -3771,4 +3765,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- +---------------- diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index ab37d7cfbff41..8a765597626b5 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -32,8 +32,6 @@ "externals": [ "fsevents:optional" ], - "copyright": "AWS Cloud Development Kit (AWS CDK)\nCopyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", - "noticePath": "NOTICES", "resources": { "../../node_modules/vm2/lib/bridge.js": "lib/bridge.js", "../../node_modules/vm2/lib/setup-sandbox.js": "lib/setup-sandbox.js" diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index f9deb98650559..5b6c7711a880a 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -202,30 +202,6 @@ export class BundledCLI extends ValidationRule { private validateConfig(pkg: PackageJson, bundleProps: any): boolean { let valid = true; - // this is pretty crazy, but apparently there is a bug in yarn when NOTICE - // files are too big. see https://github.com/yarnpkg/yarn/issues/5420. - // as a workaround we use NOTICES for bundled packages. - // there is a pending PR to fix the issue, though it has been there for almost - // two years now (https://github.com/yarnpkg/yarn/pull/8093). - const noticeFilePath = 'NOTICES'; - if (bundleProps.noticePath !== noticeFilePath) { - pkg.report({ - message: `'cdk-package.bundle.noticePath' must be set to "${noticeFilePath}"`, - ruleName: `${this.name}/configuration`, - fix: () => pkg.json['cdk-package'].bundle.noticePath = noticeFilePath, - }); - valid = false; - } - - if (bundleProps.copyright !== NOTICE) { - pkg.report({ - message: `'cdk-package.bundle.copyright' must be set to "${NOTICE}"`, - ruleName: `${this.name}/configuration`, - fix: () => pkg.json['cdk-package'].bundle.copyright = NOTICE, - }); - valid = false; - } - if (bundleProps.licenses.join(',') !== BundledCLI.VALID_LICENSES.join(',')) { pkg.report({ message: `'cdk-package.bundle.licenses' must be set to "${BundledCLI.VALID_LICENSES}"`, @@ -273,11 +249,6 @@ export class NoticeFile extends ValidationRule { public readonly name = 'license/notice-file'; public validate(pkg: PackageJson): void { - if (pkg.json['cdk-package']?.bundle) { - // notice files are validated using the bundle tool, - // which allows for other file names. - return; - } fileShouldBeginWith(this.name, pkg, 'NOTICE', ...NOTICE.split('\n')); } } @@ -290,12 +261,6 @@ export class ThirdPartyAttributions extends ValidationRule { public validate(pkg: PackageJson): void { - if (pkg.json['cdk-package']?.bundle) { - // otherwise its attributions will be reported as unnecessary - // since bundled packages don't defined "bundledDependencies" - return; - } - const alwaysCheck = ['monocdk', 'aws-cdk-lib']; if (pkg.json.private && !alwaysCheck.includes(pkg.json.name)) { return; From a040e10cb5e426df78712a49401edfbab3fbdadd Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 17 Feb 2022 17:58:56 +0200 Subject: [PATCH 51/63] readme --- tools/@aws-cdk/node-bundle/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 3dffc7bf70039..7f3bee326d469 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -32,7 +32,7 @@ This tool takes care of all that: > This is currently done with [license-checker](https://www.npmjs.com/package/license-checker), but is subject to change. -- Enforce no circular imports are exhibited in your package, nor in your dependency clojure. +- Enforce no circular imports are exhibited in your package, nor in your dependency closure. > This is currently done with [madge](https://www.npmjs.com/package/madge), but is subject to change. From 4ba02736110e9f8d7f8bf59a7f3b79e8b0457722 Mon Sep 17 00:00:00 2001 From: epolon Date: Fri, 18 Feb 2022 16:45:09 +0200 Subject: [PATCH 52/63] optional entrypoint --- tools/@aws-cdk/node-bundle/src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index fa3ebea614656..ab98bd053458f 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -11,7 +11,7 @@ async function buildCommands() { const argv = yargs .usage('Usage: node-bundle COMMAND') - .option('entrypoint', { type: 'array', nargs: 1, desc: 'List of entrypoints to bundle', demandOption: true }) + .option('entrypoint', { type: 'array', nargs: 1, desc: 'List of entrypoints to bundle' }) .option('external', { type: 'array', nargs: 1, default: [], desc: 'Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional)' }) .option('license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) .option('resource', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) From d989b09ed684a27293db9ecbfa2a05746af75860 Mon Sep 17 00:00:00 2001 From: epolon Date: Sun, 20 Feb 2022 11:30:13 +0200 Subject: [PATCH 53/63] fix cli handling empty arrays --- tools/@aws-cdk/node-bundle/src/cli.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index ab98bd053458f..9566f18c82e35 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -27,17 +27,28 @@ async function buildCommands() { .argv; const command = argv._[0]; + + function undefinedIfEmpty(arr?: any[]): string[] | undefined { + if (!arr || arr.length === 0) return undefined; + return arr as string[]; + } + + const entryPointsArg = undefinedIfEmpty(argv.entrypoint); + const externalsArg = undefinedIfEmpty(argv.external); + const licensesArg = undefinedIfEmpty(argv.license); + const resourcesArg = undefinedIfEmpty(argv.resource) ?? []; + const resources: any = {}; - for (const resource of argv.resource as string[]) { + for (const resource of resourcesArg) { const parts = resource.split(':'); resources[parts[0]] = parts[1]; } const props: BundleProps = { packageDir: process.cwd(), - entryPoints: argv.entrypoint as string[], - externals: argv.external as string[], - licenses: argv.license as string[], + entryPoints: entryPointsArg, + externals: externalsArg, + licenses: licensesArg, resources: resources, dontAttribute: argv['dont-attribute'], test: argv.test, From 515aa482f806871cbd97d1ff388a13a5c774a149 Mon Sep 17 00:00:00 2001 From: epolon Date: Tue, 22 Feb 2022 19:18:05 +0200 Subject: [PATCH 54/63] more docs --- tools/@aws-cdk/node-bundle/README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 7f3bee326d469..0130f99278c12 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -71,13 +71,12 @@ Usage: node-bundle COMMAND Commands: node-bundle validate Validate the package is ready for bundling - node-bundle write Write the bundled version of the project to a temp directory + node-bundle write Write the bundled version of the project to a temp + directory node-bundle pack Write the bundle and create the tarball Options: - --entrypoint List of entrypoints to bundle [array] [required] - --copyright Copyright statement to be added to the notice file - [string] [required] + --entrypoint List of entrypoints to bundle [array] --external Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional) [array] [default: []] @@ -92,7 +91,6 @@ Options: created [string] --help Show help [boolean] --version Show version number [boolean] - ``` You can also use the programmatic access: @@ -102,14 +100,26 @@ import { Bundle } from '@aws-cdk/node-bundle'; const bundle = new Bundle({ packageDir: process.cwd(), - copyright: 'Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.', - entrypoints: ['lib/cli.js'], licenses: ['Apache-2.0', 'MIT'], }); bundle.pack(); ``` +### Integrate with your build process + +We recommend to integrate this tool in the following way: + +1. Add a `node-bundle validate` command as a post compile step. +2. Set your packaging command to `node-bundle pack`. + +This way, local dev builds will be validated not to break any functionality needed for bundling. +In addition, developers can run `node-bundle validate --fix` to automatically fix any (fixable) violations +and commit that to source code. + +For example, if a dependency is added but the attribution file has not been re-generated, +`validate` will catch this, and `validate --fix` will regenerate it. + ## Take into account By default, the tool will use the `main` directive of the `package.json` as From 52233c6b5a0dd0933a267eed22086383cb405e16 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 23 Feb 2022 11:29:43 +0200 Subject: [PATCH 55/63] add referal to the THIRD_PARTY_LICENSES file --- packages/aws-cdk/NOTICE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE index f80e579e74458..2fdce4d2a0591 100644 --- a/packages/aws-cdk/NOTICE +++ b/packages/aws-cdk/NOTICE @@ -12,3 +12,5 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +Third party attributions of this package can be found in the THIRD_PARTY_LICENSES file \ No newline at end of file From 4a9d43b71b5764371642491d77b51276175f38a5 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 23 Feb 2022 12:09:56 +0200 Subject: [PATCH 56/63] make package private --- tools/@aws-cdk/node-bundle/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 61173affe7713..1ceb3bf609378 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -1,5 +1,6 @@ { "name": "@aws-cdk/node-bundle", + "private": true, "bin": { "node-bundle": "bin/node-bundle" }, From d9ac029e87b645dba32c531965df0001a3f52791 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 23 Feb 2022 13:28:57 +0200 Subject: [PATCH 57/63] review --- packages/aws-cdk/package.json | 2 +- tools/@aws-cdk/node-bundle/.projenrc.js | 2 +- tools/@aws-cdk/node-bundle/README.md | 30 +++++-- tools/@aws-cdk/node-bundle/package.json | 1 - .../node-bundle/src/api/_attributions.ts | 29 +++---- tools/@aws-cdk/node-bundle/src/api/_shell.ts | 4 +- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 86 +++++++++++-------- .../@aws-cdk/node-bundle/src/api/violation.ts | 5 +- tools/@aws-cdk/node-bundle/src/cli.ts | 34 +++++--- .../node-bundle/test/api/bundle.test.ts | 8 +- tools/@aws-cdk/pkglint/lib/rules.ts | 8 +- 11 files changed, 122 insertions(+), 87 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 8a765597626b5..60b9d81c2c96a 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -36,7 +36,7 @@ "../../node_modules/vm2/lib/bridge.js": "lib/bridge.js", "../../node_modules/vm2/lib/setup-sandbox.js": "lib/setup-sandbox.js" }, - "licenses": [ + "allowedLicenses": [ "Apache-2.0", "MIT", "BSD-3-Clause", diff --git a/tools/@aws-cdk/node-bundle/.projenrc.js b/tools/@aws-cdk/node-bundle/.projenrc.js index f2da66222471c..e8205a405fd84 100644 --- a/tools/@aws-cdk/node-bundle/.projenrc.js +++ b/tools/@aws-cdk/node-bundle/.projenrc.js @@ -32,4 +32,4 @@ project.testTask.prependSpawn(project.compileTask); const buildAndTest = project.addTask('build+test'); buildAndTest.spawn(project.testTask); -project.synth(); \ No newline at end of file +project.synth(); diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 0130f99278c12..064618d40da5d 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -1,6 +1,6 @@ # node-bundle -Create bundled packages with zero dependencies and appropriate license attributions. +Create bundled packages with minimal dependencies and appropriate license attributions. ## Why @@ -19,22 +19,34 @@ creating self-contained nodejs packages. The resulting packages are still npm installable packages, but the entrypoints you specify are replaced with a bundled version of them, embedding all their dependencies inline. Note that embedding dependencies means you are effectively redistributing third-party software. -This has legal implications, since it requires proper attribution -of those dependencies, validating their licenses allow such redistribution. +This could have legal/licensing implications, and typically requires proper +attribution of the bundled dependencies, while validating their licenses allow +such redistribution. -This tool takes care of all that: +This tool does the following: - Bundle dependencies inside the package. - > This is currently done with [esbuild](), but is subject to change. + > Currently done with [esbuild](https://esbuild.github.io), but is subject to change. -- Validate and create NOTICE files with complete third-party attributions. +- Validate and create THIRD_PARTY_LICENCES files with complete third-party attributions. - > This is currently done with [license-checker](https://www.npmjs.com/package/license-checker), but is subject to change. + > Currently done with [license-checker](https://www.npmjs.com/package/license-checker), but is subject to change. - Enforce no circular imports are exhibited in your package, nor in your dependency closure. - > This is currently done with [madge](https://www.npmjs.com/package/madge), but is subject to change. + > Currently done with [madge](https://www.npmjs.com/package/madge), but is subject to change. + > This is necessary because circular imports mess up the declaration order of types in the bundled file. + +### Disclaimer + +- Features of this package rely on the dependencies' declared licensing information, etc... and if that is incorrect, the tool may not notice/warn about that. + +- The user of this package remains responsible for complying to their dependencies' licensing requirements. + +- While this package makes reasonable efforts to ensure the produced THIRD_PARTY_LICENSES file is correct, +the user is responsible for ensuring the output is correct (this is why it is recommended to check it into source control) +If unsure, users should seek legal counsel before releasing bundled artifacts. ## Alternative Approaches @@ -100,7 +112,7 @@ import { Bundle } from '@aws-cdk/node-bundle'; const bundle = new Bundle({ packageDir: process.cwd(), - licenses: ['Apache-2.0', 'MIT'], + allowedLicenses: ['Apache-2.0', 'MIT'], }); bundle.pack(); diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 1ceb3bf609378..61173affe7713 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -1,6 +1,5 @@ { "name": "@aws-cdk/node-bundle", - "private": true, "bin": { "node-bundle": "bin/node-bundle" }, diff --git a/tools/@aws-cdk/node-bundle/src/api/_attributions.ts b/tools/@aws-cdk/node-bundle/src/api/_attributions.ts index 8db1be0c0dd69..2273704bf2ab1 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_attributions.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_attributions.ts @@ -5,14 +5,6 @@ import { shell } from './_shell'; import type { Package } from './bundle'; import { Violation, ViolationType, ViolationsReport } from './violation'; -const DEFAULT_ALLOWED_LICENSES = [ - 'Apache-2.0', - 'MIT', - 'BSD-3-Clause', - 'ISC', - 'BSD-2-Clause', - '0BSD', -]; const ATTRIBUTION_SEPARATOR = '\n----------------\n'; @@ -41,11 +33,10 @@ export interface AttributionsProps { */ readonly filePath: string; /** - * List of valid licenses. + * List of allowed licenses. * - * @default - predefined list. */ - readonly validLicenses?: string[]; + readonly allowedLicenses: string[]; /** * Dependencies matching this pattern will be excluded from attribution. * @@ -62,7 +53,7 @@ export class Attributions { private readonly packageDir: string; private readonly packageName: string; private readonly dependencies: Package[]; - private readonly validLicenses: string[]; + private readonly allowedLicenses: string[]; private readonly dependenciesRoot: string; private readonly filePath: string; @@ -74,7 +65,7 @@ export class Attributions { this.packageName = props.packageName; this.filePath = path.join(this.packageDir, props.filePath); this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); - this.validLicenses = (props.validLicenses ?? DEFAULT_ALLOWED_LICENSES).map(l => l.toLowerCase()); + this.allowedLicenses = props.allowedLicenses.map(l => l.toLowerCase()); this.dependenciesRoot = props.dependenciesRoot; // without the generated notice content, this object is pretty much @@ -108,7 +99,7 @@ export class Attributions { } const invalidLicense: Violation[] = Array.from(this.attributions.values()) - .filter(a => a.licenses.length === 1 && !this.validLicenses.includes(a.licenses[0].toLowerCase())) + .filter(a => a.licenses.length === 1 && !this.allowedLicenses.includes(a.licenses[0].toLowerCase())) .map(a => ({ type: ViolationType.INVALID_LICENSE, message: `Dependency ${a.package} has an invalid license: ${a.licenses[0]}` })); const noLicense: Violation[] = Array.from(this.attributions.values()) @@ -239,11 +230,19 @@ interface Attribution { */ readonly url: string; /** - * Package license. + * Package licenses. + * + * Note that some packages will may have multiple licenses, + * which is why this is an array. In such cases, the license + * validation will fail since we currentl disallow this. */ readonly licenses: string[]; /** * Package license content. + * + * In case a package has multiple licenses, this will + * contain...one of them. It currently doesn't matter which + * one since it will not pass validation anyway. */ readonly licenseText?: string; /** diff --git a/tools/@aws-cdk/node-bundle/src/api/_shell.ts b/tools/@aws-cdk/node-bundle/src/api/_shell.ts index 5f5cbde0d1292..60e67b081fed2 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_shell.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_shell.ts @@ -6,10 +6,10 @@ export interface ShellOptions { } export function shell(command: string, options: ShellOptions = {}): string { - const stdio: child_process.StdioOptions = options.quiet ? ['ignore', 'pipe', 'pipe'] : ['ignore', process.stdout, process.stdout]; + const stdio: child_process.StdioOptions = options.quiet ? ['ignore', 'pipe', 'pipe'] : ['ignore', 'inherit', 'inherit']; const buffer = child_process.execSync(command, { cwd: options.cwd, stdio: stdio, }); - return buffer ? buffer.toString().trim() : ''; + return buffer ? buffer.toString('utf-8').trim() : ''; } diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index c7e1609b1b07e..6778d0a9f252d 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -6,6 +6,15 @@ import { Attributions } from './_attributions'; import { shell } from './_shell'; import { Violation, ViolationType, ViolationsReport } from './violation'; +const DEFAULT_ALLOWED_LICENSES = [ + 'Apache-2.0', + 'MIT', + 'BSD-3-Clause', + 'ISC', + 'BSD-2-Clause', + '0BSD', +]; + /** * Bundling properties. */ @@ -34,11 +43,9 @@ export interface BundleProps { /** * External packages that cannot be bundled. * - * These will remain a runtime dependency of the package. - * * @default - no external references. */ - readonly externals?: string[]; + readonly externals?: Externals; /** * External resources that need to be embedded in the bundle. @@ -48,15 +55,15 @@ export interface BundleProps { readonly resources?: {[src: string]: string}; /** - * A list of licenses that are valid for bundling. + * A list of licenses that are allowed for bundling. * If any dependency contains a license not in this list, bundling will fail. * * @default - Default list */ - readonly licenses?: string[]; + readonly allowedLicenses?: string[]; /** - * Packages matching this pattern will be excluded from attribution. + * Packages matching this regular expression will be excluded from attribution. */ readonly dontAttribute?: string; @@ -107,6 +114,25 @@ export interface Package { readonly version: string; } +/** + * External packages that cannot be bundled. + */ +export interface Externals { + + /** + * External packages that should be listed in the `dependencies` section + * of the manifest. + */ + readonly dependencies?: readonly string[]; + + /** + * External packages that should be listed in the `optionalDependencies` section + * of the manifest. + */ + readonly optionalDependencies?: readonly string[]; + +} + /** * Bundle class to validate and pack nodejs bundles. */ @@ -117,9 +143,9 @@ export class Bundle { private readonly packageDir: string; private readonly entryPoints: Record; - private readonly externals: string[]; + private readonly externals: Externals; private readonly resources: {[src: string]: string}; - private readonly validLicenses?: string[]; + private readonly allowedLicenses: string[]; private readonly dontAttribute?: string; private readonly test?: string; @@ -133,10 +159,10 @@ export class Bundle { this.packageDir = props.packageDir; this.noticePath = props.attributionsFile ?? 'THIRD_PARTY_LICENSES'; this.manifest = fs.readJsonSync(path.join(this.packageDir, 'package.json')); - this.externals = props.externals ?? []; + this.externals = props.externals ?? {}; this.resources = props.resources ?? {}; this.test = props.test; - this.validLicenses = props.licenses; + this.allowedLicenses = props.allowedLicenses ?? DEFAULT_ALLOWED_LICENSES; this.dontAttribute = props.dontAttribute; this.entryPoints = {}; @@ -300,7 +326,7 @@ export class Bundle { dependencies: this.dependencies, dependenciesRoot: this.dependenciesRoot, exclude: this.dontAttribute, - validLicenses: this.validLicenses, + allowedLicenses: this.allowedLicenses, }); } return this._attributions; @@ -369,7 +395,7 @@ export class Bundle { metafile: true, treeShaking: true, absWorkingDir: this.packageDir, - external: this.externals.map(e => e.split(':')[0]), + external: [...(this.externals.dependencies ?? []), ...(this.externals.optionalDependencies ?? [])], write: false, outdir: this.packageDir, allowOverwrite: true, @@ -418,37 +444,23 @@ export class Bundle { return violations; } - private validateAttributions(): Violation[] { + private validateAttributions(): readonly Violation[] { console.log('Validating attributions'); return this.attributions.validate().violations; } private addExternals(manifest: any) { - // external dependencies should be specified as runtime dependencies - for (const external of this.externals) { - - const parts = external.split(':'); - const name = parts[0]; - const type = parts[1]; - const version = this.findExternalDependencyVersion(name); - - switch (type) { - case 'optional': - manifest.optionalDependencies = manifest.optionalDependencies ?? {}; - manifest.optionalDependencies[name] = version; - break; - case 'peer': - manifest.peerDependencies = manifest.peerDependencies ?? {}; - manifest.peerDependencies[name] = version; - break; - case '': - manifest.dependencies = manifest.dependencies ?? {}; - manifest.dependencies[name] = version; - break; - default: - throw new Error(`Unsupported dependency type '${type}' for external dependency '${name}'`); - } + // external dependencies should be specified as runtime dependencies + for (const external of this.externals.dependencies ?? []) { + const version = this.findExternalDependencyVersion(external); + manifest.dependencies[external] = version; + } + + // external dependencies should be specified as optional dependencies + for (const external of this.externals.optionalDependencies ?? []) { + const version = this.findExternalDependencyVersion(external); + manifest.optionalDependencies[external] = version; } } diff --git a/tools/@aws-cdk/node-bundle/src/api/violation.ts b/tools/@aws-cdk/node-bundle/src/api/violation.ts index cc79bca264d8e..c03bceb1bf441 100644 --- a/tools/@aws-cdk/node-bundle/src/api/violation.ts +++ b/tools/@aws-cdk/node-bundle/src/api/violation.ts @@ -69,9 +69,8 @@ export class ViolationsReport { /** * The list of violations. */ - public get violations(): Violation[] { - // return a copy so the report cannot be mutated. - return [...this._violations]; + public get violations(): readonly Violation[] { + return this._violations; } /** diff --git a/tools/@aws-cdk/node-bundle/src/cli.ts b/tools/@aws-cdk/node-bundle/src/cli.ts index 9566f18c82e35..d286e0a78e024 100644 --- a/tools/@aws-cdk/node-bundle/src/cli.ts +++ b/tools/@aws-cdk/node-bundle/src/cli.ts @@ -13,7 +13,7 @@ async function buildCommands() { .usage('Usage: node-bundle COMMAND') .option('entrypoint', { type: 'array', nargs: 1, desc: 'List of entrypoints to bundle' }) .option('external', { type: 'array', nargs: 1, default: [], desc: 'Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional)' }) - .option('license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) + .option('allowed-license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) .option('resource', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) .option('dont-attribute', { type: 'string', desc: 'Dependencies matching this regular expressions wont be added to the notice file' }) .option('test', { type: 'string', desc: 'Validation command to sanity test the bundle after its created' }) @@ -33,22 +33,36 @@ async function buildCommands() { return arr as string[]; } - const entryPointsArg = undefinedIfEmpty(argv.entrypoint); - const externalsArg = undefinedIfEmpty(argv.external); - const licensesArg = undefinedIfEmpty(argv.license); - const resourcesArg = undefinedIfEmpty(argv.resource) ?? []; - const resources: any = {}; - for (const resource of resourcesArg) { + for (const resource of (argv.resource as string[])) { const parts = resource.split(':'); resources[parts[0]] = parts[1]; } + const optionalExternals = []; + const runtimeExternals = []; + + for (const external of (argv.external as string[])) { + const parts = external.split(':'); + const name = parts[0]; + const type = parts[1]; + switch (type) { + case 'optional': + optionalExternals.push(name); + break; + case 'runtime': + runtimeExternals.push(name); + break; + default: + throw new Error(`Unsupported dependency type '${type}' for external package '${name}'. Supported types are: ['optional', 'runtime']`); + } + } + const props: BundleProps = { packageDir: process.cwd(), - entryPoints: entryPointsArg, - externals: externalsArg, - licenses: licensesArg, + entryPoints: undefinedIfEmpty(argv.entrypoint), + externals: { dependencies: runtimeExternals, optionalDependencies: optionalExternals }, + allowedLicenses: undefinedIfEmpty(argv['allowed-license']), resources: resources, dontAttribute: argv['dont-attribute'], test: argv.test, diff --git a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts index 6dcef5f9a6eb9..de7f741bc880e 100644 --- a/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts +++ b/tools/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -16,7 +16,7 @@ test('validate', () => { packageDir: pkg.dir, entryPoints: [pkg.entrypoint], resources: { missing: 'bin/missing' }, - licenses: ['Apache-2.0'], + allowedLicenses: ['Apache-2.0'], }); const actual = new Set(bundle.validate().violations.map(v => `${v.type}: ${v.message}`)); const expected = new Set([ @@ -42,7 +42,7 @@ test('write', () => { const bundle = new Bundle({ packageDir: pkg.dir, entryPoints: [pkg.entrypoint], - licenses: ['Apache-2.0', 'MIT'], + allowedLicenses: ['Apache-2.0', 'MIT'], }); const bundleDir = bundle.write(); @@ -88,7 +88,7 @@ test('pack', () => { const bundle = new Bundle({ packageDir: pkg.dir, entryPoints: [pkg.entrypoint], - licenses: ['Apache-2.0', 'MIT'], + allowedLicenses: ['Apache-2.0', 'MIT'], }); bundle.pack(); @@ -110,7 +110,7 @@ test('validate and fix', () => { const bundle = new Bundle({ packageDir: pkg.dir, entryPoints: [pkg.entrypoint], - licenses: ['Apache-2.0', 'MIT'], + allowedLicenses: ['Apache-2.0', 'MIT'], }); try { diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 5b6c7711a880a..9010f7edb2527 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -169,7 +169,7 @@ export class LicenseFile extends ValidationRule { export class BundledCLI extends ValidationRule { - private static readonly VALID_LICENSES = [ + private static readonly ALLOWED_LICENSES = [ 'Apache-2.0', 'MIT', 'BSD-3-Clause', @@ -202,11 +202,11 @@ export class BundledCLI extends ValidationRule { private validateConfig(pkg: PackageJson, bundleProps: any): boolean { let valid = true; - if (bundleProps.licenses.join(',') !== BundledCLI.VALID_LICENSES.join(',')) { + if (bundleProps.allowedLicenses.join(',') !== BundledCLI.ALLOWED_LICENSES.join(',')) { pkg.report({ - message: `'cdk-package.bundle.licenses' must be set to "${BundledCLI.VALID_LICENSES}"`, + message: `'cdk-package.bundle.licenses' must be set to "${BundledCLI.ALLOWED_LICENSES}"`, ruleName: `${this.name}/configuration`, - fix: () => pkg.json['cdk-package'].bundle.licenses = BundledCLI.VALID_LICENSES, + fix: () => pkg.json['cdk-package'].bundle.licenses = BundledCLI.ALLOWED_LICENSES, }); valid = false; } From ac6f266926c9ce70b2e38629b7a00d3afb38f801 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 23 Feb 2022 13:34:51 +0200 Subject: [PATCH 58/63] regen cli usage --- tools/@aws-cdk/node-bundle/README.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 064618d40da5d..36fb025900c23 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -79,6 +79,7 @@ only CLI applications. Run the tool from the root directory of your package. ```console +$ node-bundle --help Usage: node-bundle COMMAND Commands: @@ -88,21 +89,21 @@ Commands: node-bundle pack Write the bundle and create the tarball Options: - --entrypoint List of entrypoints to bundle [array] - --external Packages in this list will be excluded from the bundle and - added as dependencies (example: fsevents:optional) + --entrypoint List of entrypoints to bundle [array] + --external Packages in this list will be excluded from the bundle and + added as dependencies (example: fsevents:optional) [array] [default: []] - --license List of valid licenses [array] [default: []] - --resource List of resources that need to be explicitly copied to the - bundle (example: - node_modules/proxy-agent/contextify.js:bin/contextify.js) + --allowed-license List of valid licenses [array] [default: []] + --resource List of resources that need to be explicitly copied to the + bundle (example: + node_modules/proxy-agent/contextify.js:bin/contextify.js) [array] [default: []] - --dont-attribute Dependencies matching this regular expressions wont be added - to the notice file [string] - --test Validation command to sanity test the bundle after its - created [string] - --help Show help [boolean] - --version Show version number [boolean] + --dont-attribute Dependencies matching this regular expressions wont be + added to the notice file [string] + --test Validation command to sanity test the bundle after its + created [string] + --help Show help [boolean] + --version Show version number [boolean] ``` You can also use the programmatic access: From 0f58de4b8c8a64ca9eeff659004743137a75f7b1 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Wed, 23 Feb 2022 14:00:31 +0200 Subject: [PATCH 59/63] Update tools/@aws-cdk/node-bundle/src/api/_attributions.ts Co-authored-by: Romain Marcadier --- tools/@aws-cdk/node-bundle/src/api/_attributions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/@aws-cdk/node-bundle/src/api/_attributions.ts b/tools/@aws-cdk/node-bundle/src/api/_attributions.ts index 2273704bf2ab1..011cb42bd3618 100644 --- a/tools/@aws-cdk/node-bundle/src/api/_attributions.ts +++ b/tools/@aws-cdk/node-bundle/src/api/_attributions.ts @@ -234,7 +234,7 @@ interface Attribution { * * Note that some packages will may have multiple licenses, * which is why this is an array. In such cases, the license - * validation will fail since we currentl disallow this. + * validation will fail since we currently disallow this. */ readonly licenses: string[]; /** From dfc8790b53d19a02bddd571b65e730e359a34a8e Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 23 Feb 2022 18:42:46 +0200 Subject: [PATCH 60/63] chore: npm-check-updates && yarn upgrade (#19109) Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date. --- package.json | 2 +- .../ecs-service-extensions/package.json | 2 +- packages/@aws-cdk/alexa-ask/package.json | 2 +- packages/@aws-cdk/app-delivery/package.json | 2 +- .../@aws-cdk/assert-internal/package.json | 2 +- packages/@aws-cdk/assert/package.json | 2 +- packages/@aws-cdk/assertions/package.json | 2 +- packages/@aws-cdk/assets/package.json | 2 +- .../@aws-cdk/aws-accessanalyzer/package.json | 2 +- packages/@aws-cdk/aws-acmpca/package.json | 2 +- packages/@aws-cdk/aws-amazonmq/package.json | 2 +- packages/@aws-cdk/aws-amplify/package.json | 2 +- packages/@aws-cdk/aws-apigateway/package.json | 2 +- .../aws-apigatewayv2-authorizers/package.json | 2 +- .../package.json | 2 +- .../@aws-cdk/aws-apigatewayv2/package.json | 2 +- packages/@aws-cdk/aws-appconfig/package.json | 2 +- packages/@aws-cdk/aws-appflow/package.json | 2 +- .../@aws-cdk/aws-appintegrations/package.json | 2 +- .../aws-applicationautoscaling/package.json | 2 +- .../aws-applicationinsights/package.json | 2 +- packages/@aws-cdk/aws-appmesh/package.json | 2 +- packages/@aws-cdk/aws-apprunner/package.json | 2 +- packages/@aws-cdk/aws-appstream/package.json | 2 +- packages/@aws-cdk/aws-appsync/package.json | 2 +- packages/@aws-cdk/aws-aps/package.json | 2 +- packages/@aws-cdk/aws-athena/package.json | 2 +- .../@aws-cdk/aws-auditmanager/package.json | 2 +- .../aws-autoscaling-common/package.json | 2 +- .../aws-autoscaling-hooktargets/package.json | 2 +- .../@aws-cdk/aws-autoscaling/package.json | 2 +- .../aws-autoscalingplans/package.json | 2 +- packages/@aws-cdk/aws-backup/package.json | 2 +- packages/@aws-cdk/aws-batch/package.json | 2 +- packages/@aws-cdk/aws-budgets/package.json | 2 +- packages/@aws-cdk/aws-cassandra/package.json | 2 +- packages/@aws-cdk/aws-ce/package.json | 2 +- .../aws-certificatemanager/package.json | 2 +- packages/@aws-cdk/aws-chatbot/package.json | 2 +- packages/@aws-cdk/aws-cloud9/package.json | 2 +- .../@aws-cdk/aws-cloudformation/package.json | 2 +- .../aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- .../aws-cloudwatch-actions/package.json | 2 +- packages/@aws-cdk/aws-cloudwatch/package.json | 2 +- .../@aws-cdk/aws-codeartifact/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-codedeploy/package.json | 2 +- .../aws-codeguruprofiler/package.json | 2 +- .../aws-codegurureviewer/package.json | 2 +- .../aws-codepipeline-actions/package.json | 2 +- .../@aws-cdk/aws-codepipeline/package.json | 2 +- packages/@aws-cdk/aws-codestar/package.json | 2 +- .../aws-codestarconnections/package.json | 2 +- .../aws-codestarnotifications/package.json | 2 +- .../aws-cognito-identitypool/package.json | 2 +- packages/@aws-cdk/aws-cognito/package.json | 2 +- packages/@aws-cdk/aws-config/package.json | 2 +- packages/@aws-cdk/aws-connect/package.json | 2 +- packages/@aws-cdk/aws-cur/package.json | 2 +- .../aws-customerprofiles/package.json | 2 +- packages/@aws-cdk/aws-databrew/package.json | 2 +- .../@aws-cdk/aws-datapipeline/package.json | 2 +- packages/@aws-cdk/aws-datasync/package.json | 2 +- packages/@aws-cdk/aws-dax/package.json | 2 +- packages/@aws-cdk/aws-detective/package.json | 2 +- packages/@aws-cdk/aws-devopsguru/package.json | 2 +- .../aws-directoryservice/package.json | 2 +- packages/@aws-cdk/aws-dlm/package.json | 2 +- packages/@aws-cdk/aws-dms/package.json | 2 +- packages/@aws-cdk/aws-docdb/package.json | 2 +- .../@aws-cdk/aws-dynamodb-global/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-ec2/package.json | 2 +- packages/@aws-cdk/aws-ecr-assets/package.json | 2 +- packages/@aws-cdk/aws-ecr/package.json | 2 +- .../@aws-cdk/aws-ecs-patterns/package.json | 2 +- packages/@aws-cdk/aws-ecs/package.json | 2 +- packages/@aws-cdk/aws-efs/package.json | 2 +- packages/@aws-cdk/aws-eks-legacy/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 6 +- .../@aws-cdk/aws-elasticache/package.json | 2 +- .../aws-elasticbeanstalk/package.json | 2 +- .../aws-elasticloadbalancing/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../aws-elasticloadbalancingv2/package.json | 2 +- .../@aws-cdk/aws-elasticsearch/package.json | 2 +- packages/@aws-cdk/aws-emr/package.json | 2 +- .../@aws-cdk/aws-emrcontainers/package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-events/package.json | 2 +- .../@aws-cdk/aws-eventschemas/package.json | 2 +- packages/@aws-cdk/aws-finspace/package.json | 2 +- packages/@aws-cdk/aws-fis/package.json | 2 +- packages/@aws-cdk/aws-fms/package.json | 2 +- packages/@aws-cdk/aws-forecast/package.json | 2 +- .../@aws-cdk/aws-frauddetector/package.json | 2 +- packages/@aws-cdk/aws-fsx/package.json | 2 +- packages/@aws-cdk/aws-gamelift/package.json | 2 +- .../package.json | 2 +- .../aws-globalaccelerator/package.json | 2 +- packages/@aws-cdk/aws-glue/package.json | 2 +- packages/@aws-cdk/aws-greengrass/package.json | 2 +- .../@aws-cdk/aws-greengrassv2/package.json | 2 +- .../@aws-cdk/aws-groundstation/package.json | 2 +- packages/@aws-cdk/aws-guardduty/package.json | 2 +- packages/@aws-cdk/aws-healthlake/package.json | 2 +- packages/@aws-cdk/aws-iam/package.json | 2 +- .../@aws-cdk/aws-imagebuilder/package.json | 2 +- packages/@aws-cdk/aws-inspector/package.json | 2 +- .../@aws-cdk/aws-inspectorv2/package.json | 2 +- .../@aws-cdk/aws-iot-actions/package.json | 2 +- packages/@aws-cdk/aws-iot/package.json | 2 +- packages/@aws-cdk/aws-iot1click/package.json | 2 +- .../@aws-cdk/aws-iotanalytics/package.json | 2 +- .../aws-iotcoredeviceadvisor/package.json | 2 +- .../aws-iotevents-actions/package.json | 2 +- packages/@aws-cdk/aws-iotevents/package.json | 2 +- .../@aws-cdk/aws-iotfleethub/package.json | 2 +- .../@aws-cdk/aws-iotsitewise/package.json | 2 +- .../@aws-cdk/aws-iotthingsgraph/package.json | 2 +- .../@aws-cdk/aws-iotwireless/package.json | 2 +- packages/@aws-cdk/aws-ivs/package.json | 2 +- .../@aws-cdk/aws-kafkaconnect/package.json | 2 +- packages/@aws-cdk/aws-kendra/package.json | 2 +- packages/@aws-cdk/aws-kinesis/package.json | 2 +- .../aws-kinesisanalytics-flink/package.json | 2 +- .../aws-kinesisanalytics/package.json | 2 +- .../aws-kinesisanalyticsv2/package.json | 2 +- .../package.json | 2 +- .../@aws-cdk/aws-kinesisfirehose/package.json | 2 +- .../@aws-cdk/aws-kinesisvideo/package.json | 2 +- packages/@aws-cdk/aws-kms/package.json | 2 +- .../@aws-cdk/aws-lakeformation/package.json | 2 +- .../aws-lambda-destinations/package.json | 2 +- .../aws-lambda-event-sources/package.json | 2 +- packages/@aws-cdk/aws-lambda-go/package.json | 2 +- .../@aws-cdk/aws-lambda-nodejs/package.json | 4 +- .../@aws-cdk/aws-lambda-python/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 2 +- .../@aws-cdk/aws-licensemanager/package.json | 2 +- packages/@aws-cdk/aws-lightsail/package.json | 2 +- packages/@aws-cdk/aws-location/package.json | 2 +- .../aws-logs-destinations/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- .../aws-lookoutequipment/package.json | 2 +- .../@aws-cdk/aws-lookoutmetrics/package.json | 2 +- .../@aws-cdk/aws-lookoutvision/package.json | 2 +- packages/@aws-cdk/aws-macie/package.json | 2 +- .../aws-managedblockchain/package.json | 2 +- .../@aws-cdk/aws-mediaconnect/package.json | 2 +- .../@aws-cdk/aws-mediaconvert/package.json | 2 +- packages/@aws-cdk/aws-medialive/package.json | 2 +- .../@aws-cdk/aws-mediapackage/package.json | 2 +- packages/@aws-cdk/aws-mediastore/package.json | 2 +- packages/@aws-cdk/aws-memorydb/package.json | 2 +- packages/@aws-cdk/aws-msk/package.json | 2 +- packages/@aws-cdk/aws-mwaa/package.json | 2 +- packages/@aws-cdk/aws-neptune/package.json | 2 +- .../@aws-cdk/aws-networkfirewall/package.json | 2 +- .../@aws-cdk/aws-networkmanager/package.json | 2 +- .../@aws-cdk/aws-nimblestudio/package.json | 2 +- .../aws-opensearchservice/package.json | 2 +- packages/@aws-cdk/aws-opsworks/package.json | 2 +- packages/@aws-cdk/aws-opsworkscm/package.json | 2 +- packages/@aws-cdk/aws-panorama/package.json | 2 +- packages/@aws-cdk/aws-pinpoint/package.json | 2 +- .../@aws-cdk/aws-pinpointemail/package.json | 2 +- packages/@aws-cdk/aws-qldb/package.json | 2 +- packages/@aws-cdk/aws-quicksight/package.json | 2 +- packages/@aws-cdk/aws-ram/package.json | 2 +- packages/@aws-cdk/aws-rds/package.json | 2 +- packages/@aws-cdk/aws-redshift/package.json | 2 +- .../@aws-cdk/aws-rekognition/package.json | 2 +- .../@aws-cdk/aws-resourcegroups/package.json | 2 +- packages/@aws-cdk/aws-robomaker/package.json | 2 +- .../aws-route53-patterns/package.json | 2 +- .../@aws-cdk/aws-route53-targets/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- .../aws-route53recoverycontrol/package.json | 2 +- .../aws-route53recoveryreadiness/package.json | 2 +- .../@aws-cdk/aws-route53resolver/package.json | 2 +- packages/@aws-cdk/aws-s3-assets/package.json | 2 +- .../@aws-cdk/aws-s3-deployment/package.json | 2 +- .../aws-s3-notifications/package.json | 2 +- packages/@aws-cdk/aws-s3/package.json | 2 +- .../@aws-cdk/aws-s3objectlambda/package.json | 2 +- packages/@aws-cdk/aws-s3outposts/package.json | 2 +- packages/@aws-cdk/aws-sagemaker/package.json | 2 +- packages/@aws-cdk/aws-sam/package.json | 2 +- packages/@aws-cdk/aws-sdb/package.json | 2 +- .../@aws-cdk/aws-secretsmanager/package.json | 2 +- .../@aws-cdk/aws-securityhub/package.json | 2 +- .../@aws-cdk/aws-servicecatalog/package.json | 2 +- .../package.json | 2 +- .../aws-servicediscovery/package.json | 2 +- .../@aws-cdk/aws-ses-actions/package.json | 2 +- packages/@aws-cdk/aws-ses/package.json | 2 +- packages/@aws-cdk/aws-signer/package.json | 2 +- .../aws-sns-subscriptions/package.json | 2 +- packages/@aws-cdk/aws-sns/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/aws-ssm/package.json | 2 +- .../@aws-cdk/aws-ssmcontacts/package.json | 2 +- .../@aws-cdk/aws-ssmincidents/package.json | 2 +- packages/@aws-cdk/aws-sso/package.json | 2 +- .../aws-stepfunctions-tasks/package.json | 2 +- .../@aws-cdk/aws-stepfunctions/package.json | 2 +- packages/@aws-cdk/aws-synthetics/package.json | 2 +- packages/@aws-cdk/aws-timestream/package.json | 2 +- packages/@aws-cdk/aws-transfer/package.json | 2 +- packages/@aws-cdk/aws-waf/package.json | 2 +- .../@aws-cdk/aws-wafregional/package.json | 2 +- packages/@aws-cdk/aws-wafv2/package.json | 2 +- packages/@aws-cdk/aws-wisdom/package.json | 2 +- packages/@aws-cdk/aws-workspaces/package.json | 2 +- packages/@aws-cdk/aws-xray/package.json | 2 +- .../@aws-cdk/cdk-assets-schema/package.json | 2 +- packages/@aws-cdk/cfnspec/package.json | 2 +- .../cloud-assembly-schema/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- .../@aws-cdk/custom-resources/package.json | 2 +- packages/@aws-cdk/cx-api/package.json | 2 +- .../example-construct-library/package.json | 2 +- .../@aws-cdk/lambda-layer-awscli/package.json | 2 +- .../lambda-layer-kubectl/package.json | 2 +- .../package.json | 2 +- packages/@aws-cdk/pipelines/package.json | 2 +- packages/@aws-cdk/region-info/package.json | 2 +- packages/@aws-cdk/triggers/package.json | 2 +- packages/@aws-cdk/yaml-cfn/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 2 +- .../rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk-migration/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/awslint/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/cdk-dasm/package.json | 2 +- tools/@aws-cdk/cdk-build-tools/package.json | 2 +- tools/@aws-cdk/cdk-release/package.json | 2 +- tools/@aws-cdk/cfn2ts/package.json | 2 +- tools/@aws-cdk/eslint-plugin/package.json | 2 +- .../@aws-cdk/individual-pkg-gen/package.json | 2 +- tools/@aws-cdk/pkglint/package.json | 2 +- tools/@aws-cdk/prlint/package.json | 2 +- tools/@aws-cdk/yarn-cling/package.json | 2 +- yarn.lock | 783 +++++++++--------- 253 files changed, 669 insertions(+), 624 deletions(-) diff --git a/package.json b/package.json index dbdf5fde2349e..9c9efa4f00664 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,9 @@ "jsii-pacmak": "^1.54.0", "jsii-reflect": "^1.54.0", "jsii-rosetta": "^1.54.0", - "semver": "^6.3.0", "lerna": "^4.0.0", "patch-package": "^6.4.7", + "semver": "^6.3.0", "standard-version": "^9.3.2", "typescript": "~3.9.10" }, diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 458d547a21a6f..3587f60c10eda 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -37,7 +37,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/aws-autoscaling": "0.0.0", diff --git a/packages/@aws-cdk/alexa-ask/package.json b/packages/@aws-cdk/alexa-ask/package.json index ece5934f1136a..2d533773cdc92 100644 --- a/packages/@aws-cdk/alexa-ask/package.json +++ b/packages/@aws-cdk/alexa-ask/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 4263aaa52bcf0..cb0dc160c9850 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -72,7 +72,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "fast-check": "^2.22.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/assert-internal/package.json b/packages/@aws-cdk/assert-internal/package.json index 03fb9d4d13706..b1074a77bd1a4 100644 --- a/packages/@aws-cdk/assert-internal/package.json +++ b/packages/@aws-cdk/assert-internal/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1", "ts-jest": "^27.1.3" }, diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index b462bcbbab2db..dc22fd90c4d0d 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -37,7 +37,7 @@ "@aws-cdk/assert-internal": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-cdk-migration": "0.0.0", "constructs": "^3.3.69", "jest": "^27.3.1", diff --git a/packages/@aws-cdk/assertions/package.json b/packages/@aws-cdk/assertions/package.json index 13d718b66e355..3c2533d04ae9d 100644 --- a/packages/@aws-cdk/assertions/package.json +++ b/packages/@aws-cdk/assertions/package.json @@ -65,7 +65,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "constructs": "^3.3.69", "jest": "^27.5.1", "ts-jest": "^27.1.3" diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 2da7192c43228..30adc5c82cfcb 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -80,7 +80,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/sinon": "^9.0.11", "aws-cdk": "0.0.0", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/aws-accessanalyzer/package.json b/packages/@aws-cdk/aws-accessanalyzer/package.json index faf809becc93b..ed8871901f393 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/package.json +++ b/packages/@aws-cdk/aws-accessanalyzer/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-acmpca/package.json b/packages/@aws-cdk/aws-acmpca/package.json index a4a7a79a1e8e6..8522c051e20b0 100644 --- a/packages/@aws-cdk/aws-acmpca/package.json +++ b/packages/@aws-cdk/aws-acmpca/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-amazonmq/package.json b/packages/@aws-cdk/aws-amazonmq/package.json index c7050a78a44e4..56d6e296c4ed0 100644 --- a/packages/@aws-cdk/aws-amazonmq/package.json +++ b/packages/@aws-cdk/aws-amazonmq/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-amplify/package.json b/packages/@aws-cdk/aws-amplify/package.json index e546c68ed28c4..7a221bfd747f5 100644 --- a/packages/@aws-cdk/aws-amplify/package.json +++ b/packages/@aws-cdk/aws-amplify/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/yaml": "1.9.6", "aws-sdk": "^2.848.0" }, diff --git a/packages/@aws-cdk/aws-apigateway/package.json b/packages/@aws-cdk/aws-apigateway/package.json index cff64a652688b..3243e168f0919 100644 --- a/packages/@aws-cdk/aws-apigateway/package.json +++ b/packages/@aws-cdk/aws-apigateway/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json b/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json index 084eb7c3dd027..dd8a9418e6e2c 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-apigatewayv2": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json index 2adf4f6882119..749d5fb08b479 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -81,7 +81,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-apigatewayv2": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 31ec578d85b51..088009ce5a483 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -89,7 +89,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-appconfig/package.json b/packages/@aws-cdk/aws-appconfig/package.json index 4f4abaaf6dc40..59a35b9f2f241 100644 --- a/packages/@aws-cdk/aws-appconfig/package.json +++ b/packages/@aws-cdk/aws-appconfig/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-appflow/package.json b/packages/@aws-cdk/aws-appflow/package.json index fd0648da5f582..e401c2c7c98de 100644 --- a/packages/@aws-cdk/aws-appflow/package.json +++ b/packages/@aws-cdk/aws-appflow/package.json @@ -82,7 +82,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-appintegrations/package.json b/packages/@aws-cdk/aws-appintegrations/package.json index cd4ecf81dd7c5..d0615ae38682c 100644 --- a/packages/@aws-cdk/aws-appintegrations/package.json +++ b/packages/@aws-cdk/aws-appintegrations/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index c04efc88262d7..95e7c514ff6f7 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "fast-check": "^2.22.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-applicationinsights/package.json b/packages/@aws-cdk/aws-applicationinsights/package.json index 38d8d1d6311c1..70ecad632f81f 100644 --- a/packages/@aws-cdk/aws-applicationinsights/package.json +++ b/packages/@aws-cdk/aws-applicationinsights/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index 491d5c31445de..81b3eff008d13 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -89,7 +89,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-apprunner/package.json b/packages/@aws-cdk/aws-apprunner/package.json index 0627cfbcc38fa..be5b3afe4c9cc 100644 --- a/packages/@aws-cdk/aws-apprunner/package.json +++ b/packages/@aws-cdk/aws-apprunner/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ecr": "0.0.0", diff --git a/packages/@aws-cdk/aws-appstream/package.json b/packages/@aws-cdk/aws-appstream/package.json index 059821e8a6b4b..0069735f46906 100644 --- a/packages/@aws-cdk/aws-appstream/package.json +++ b/packages/@aws-cdk/aws-appstream/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 29617fbae6289..f158ec0f97599 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-aps/package.json b/packages/@aws-cdk/aws-aps/package.json index a63226c0a8148..7fbef265f7a3b 100644 --- a/packages/@aws-cdk/aws-aps/package.json +++ b/packages/@aws-cdk/aws-aps/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index 1ad3e27f861c2..134a9cdbe2bdf 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-auditmanager/package.json b/packages/@aws-cdk/aws-auditmanager/package.json index a9a3738209a4d..16fe6cc71fd69 100644 --- a/packages/@aws-cdk/aws-auditmanager/package.json +++ b/packages/@aws-cdk/aws-auditmanager/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index f1b5163a378e7..69fd192599983 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -74,7 +74,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "fast-check": "^2.22.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index 9772f5697f278..164d2d933695c 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-autoscaling/package.json b/packages/@aws-cdk/aws-autoscaling/package.json index 0a1e455a1e4ac..09a081cdbd9fe 100644 --- a/packages/@aws-cdk/aws-autoscaling/package.json +++ b/packages/@aws-cdk/aws-autoscaling/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-autoscalingplans/package.json b/packages/@aws-cdk/aws-autoscalingplans/package.json index 6de1130ba56bb..26c9be8cc368f 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/package.json +++ b/packages/@aws-cdk/aws-autoscalingplans/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-backup/package.json b/packages/@aws-cdk/aws-backup/package.json index 5f0d0088cff3e..5462be05a3813 100644 --- a/packages/@aws-cdk/aws-backup/package.json +++ b/packages/@aws-cdk/aws-backup/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-dynamodb": "0.0.0", diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index 58db51b199e36..0c405c1a720f5 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-budgets/package.json b/packages/@aws-cdk/aws-budgets/package.json index 7b0506935bdb3..3da84da4dcca0 100644 --- a/packages/@aws-cdk/aws-budgets/package.json +++ b/packages/@aws-cdk/aws-budgets/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-cassandra/package.json b/packages/@aws-cdk/aws-cassandra/package.json index 70e21b61df3e3..5325bf8bfe1bf 100644 --- a/packages/@aws-cdk/aws-cassandra/package.json +++ b/packages/@aws-cdk/aws-cassandra/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-ce/package.json b/packages/@aws-cdk/aws-ce/package.json index 6332fc8cffd14..ff751b12bb50d 100644 --- a/packages/@aws-cdk/aws-ce/package.json +++ b/packages/@aws-cdk/aws-ce/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-certificatemanager/package.json b/packages/@aws-cdk/aws-certificatemanager/package.json index 86685caaf49ff..b2dcdedca636d 100644 --- a/packages/@aws-cdk/aws-certificatemanager/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-acmpca": "0.0.0", diff --git a/packages/@aws-cdk/aws-chatbot/package.json b/packages/@aws-cdk/aws-chatbot/package.json index 35a6887f3b5cb..259cf25fb4985 100644 --- a/packages/@aws-cdk/aws-chatbot/package.json +++ b/packages/@aws-cdk/aws-chatbot/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloud9/package.json b/packages/@aws-cdk/aws-cloud9/package.json index 7078ef97f408e..2fd6aab3799e2 100644 --- a/packages/@aws-cdk/aws-cloud9/package.json +++ b/packages/@aws-cdk/aws-cloud9/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-codecommit": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index ea4d03a27baef..710300daaacde 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index a7fd2e966e6fd..d7bea5cd1ecca 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -82,7 +82,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 66aa20bc41801..37ee6edb996a2 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 6997064a6f53d..d5b30cb2c16c8 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index bddb930d555fb..a54a582f66548 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudwatch/package.json b/packages/@aws-cdk/aws-cloudwatch/package.json index 0502a3a1cdcda..f263def7dfcd2 100644 --- a/packages/@aws-cdk/aws-cloudwatch/package.json +++ b/packages/@aws-cdk/aws-cloudwatch/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-codeartifact/package.json b/packages/@aws-cdk/aws-codeartifact/package.json index 943a1e3a421a7..9303cee955029 100644 --- a/packages/@aws-cdk/aws-codeartifact/package.json +++ b/packages/@aws-cdk/aws-codeartifact/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 4192c4d0a32e7..5f43a603aaa62 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -90,7 +90,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 9954ebae62d7b..108604988db31 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -91,7 +91,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index ec6d681fe9112..ff289e51bbe4c 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index e0ca94e657487..65ab5a7d206dc 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-codegurureviewer/package.json b/packages/@aws-cdk/aws-codegurureviewer/package.json index 6c72bd475e6ed..e0e2d1748e1ae 100644 --- a/packages/@aws-cdk/aws-codegurureviewer/package.json +++ b/packages/@aws-cdk/aws-codegurureviewer/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index 26bbb00b9905f..1bf26f89562e6 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/lodash": "^4.14.178", "jest": "^27.5.1", "lodash": "^4.17.21" diff --git a/packages/@aws-cdk/aws-codepipeline/package.json b/packages/@aws-cdk/aws-codepipeline/package.json index 9172b869a89ee..8d3f6978b445a 100644 --- a/packages/@aws-cdk/aws-codepipeline/package.json +++ b/packages/@aws-cdk/aws-codepipeline/package.json @@ -90,7 +90,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-codestar/package.json b/packages/@aws-cdk/aws-codestar/package.json index a2ae9b1cbd339..478f09bef3b9d 100644 --- a/packages/@aws-cdk/aws-codestar/package.json +++ b/packages/@aws-cdk/aws-codestar/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-s3": "0.0.0", diff --git a/packages/@aws-cdk/aws-codestarconnections/package.json b/packages/@aws-cdk/aws-codestarconnections/package.json index 9d06e3ea4db51..2e8cfc5deac99 100644 --- a/packages/@aws-cdk/aws-codestarconnections/package.json +++ b/packages/@aws-cdk/aws-codestarconnections/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-codestarnotifications/package.json b/packages/@aws-cdk/aws-codestarnotifications/package.json index e6d2bf301f3b4..5e181702720cf 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/package.json +++ b/packages/@aws-cdk/aws-codestarnotifications/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-cognito-identitypool/package.json b/packages/@aws-cdk/aws-cognito-identitypool/package.json index d17fa7b5a2c14..19171391ad7be 100644 --- a/packages/@aws-cdk/aws-cognito-identitypool/package.json +++ b/packages/@aws-cdk/aws-cognito-identitypool/package.json @@ -81,7 +81,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 889fcda97db30..7f38517f6abae 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/punycode": "^2.1.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-config/package.json b/packages/@aws-cdk/aws-config/package.json index 14857198dea75..8a121a8927bd4 100644 --- a/packages/@aws-cdk/aws-config/package.json +++ b/packages/@aws-cdk/aws-config/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-connect/package.json b/packages/@aws-cdk/aws-connect/package.json index 0d413aaf0db47..e9d851b1824a9 100644 --- a/packages/@aws-cdk/aws-connect/package.json +++ b/packages/@aws-cdk/aws-connect/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-cur/package.json b/packages/@aws-cdk/aws-cur/package.json index c871e8b723bc9..00adc1d4d1602 100644 --- a/packages/@aws-cdk/aws-cur/package.json +++ b/packages/@aws-cdk/aws-cur/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-customerprofiles/package.json b/packages/@aws-cdk/aws-customerprofiles/package.json index e73bd86cba198..d9a6f1632efab 100644 --- a/packages/@aws-cdk/aws-customerprofiles/package.json +++ b/packages/@aws-cdk/aws-customerprofiles/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-databrew/package.json b/packages/@aws-cdk/aws-databrew/package.json index 66e42d3cd4e94..749abf6bab9b7 100644 --- a/packages/@aws-cdk/aws-databrew/package.json +++ b/packages/@aws-cdk/aws-databrew/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-datapipeline/package.json b/packages/@aws-cdk/aws-datapipeline/package.json index 0aff6f0f1389c..24d3144f7c33d 100644 --- a/packages/@aws-cdk/aws-datapipeline/package.json +++ b/packages/@aws-cdk/aws-datapipeline/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-datasync/package.json b/packages/@aws-cdk/aws-datasync/package.json index 1dc0061ea02ec..ff9c4cdd4699b 100644 --- a/packages/@aws-cdk/aws-datasync/package.json +++ b/packages/@aws-cdk/aws-datasync/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-dax/package.json b/packages/@aws-cdk/aws-dax/package.json index c00396c2220ae..2901f449cf06e 100644 --- a/packages/@aws-cdk/aws-dax/package.json +++ b/packages/@aws-cdk/aws-dax/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-detective/package.json b/packages/@aws-cdk/aws-detective/package.json index 2522e915d02b3..cc061a9a00648 100644 --- a/packages/@aws-cdk/aws-detective/package.json +++ b/packages/@aws-cdk/aws-detective/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-devopsguru/package.json b/packages/@aws-cdk/aws-devopsguru/package.json index 2082aba14cbd3..9937e175014f4 100644 --- a/packages/@aws-cdk/aws-devopsguru/package.json +++ b/packages/@aws-cdk/aws-devopsguru/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-directoryservice/package.json b/packages/@aws-cdk/aws-directoryservice/package.json index 7e32fa22bdfc5..4d37918cd7b3a 100644 --- a/packages/@aws-cdk/aws-directoryservice/package.json +++ b/packages/@aws-cdk/aws-directoryservice/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-dlm/package.json b/packages/@aws-cdk/aws-dlm/package.json index d59d69ba32dc5..f1601bd7cc135 100644 --- a/packages/@aws-cdk/aws-dlm/package.json +++ b/packages/@aws-cdk/aws-dlm/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-dms/package.json b/packages/@aws-cdk/aws-dms/package.json index 2c7da4b13bac7..3f20999bb1e0a 100644 --- a/packages/@aws-cdk/aws-dms/package.json +++ b/packages/@aws-cdk/aws-dms/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-docdb/package.json b/packages/@aws-cdk/aws-docdb/package.json index 4242c8e2a7622..02721228f2097 100644 --- a/packages/@aws-cdk/aws-docdb/package.json +++ b/packages/@aws-cdk/aws-docdb/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb-global/package.json b/packages/@aws-cdk/aws-dynamodb-global/package.json index ccc610c15e2fb..5618565bc6119 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/package.json @@ -67,7 +67,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "peerDependencies": { diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 0f6067d29fe8a..f058c3d573fff 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/sinon": "^9.0.11", "aws-sdk": "^2.848.0", "aws-sdk-mock": "5.6.0", diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index 28e2500a32292..a874249bf5736 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index f8286a488a1fc..75fb178adb95a 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/proxyquire": "^1.3.28", "aws-cdk": "0.0.0", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/aws-ecr/package.json b/packages/@aws-cdk/aws-ecr/package.json index 3141f0c8dc6d1..ae13302f8642e 100644 --- a/packages/@aws-cdk/aws-ecr/package.json +++ b/packages/@aws-cdk/aws-ecr/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-events": "0.0.0", diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index f4b65d4f204be..72d98e55f86d1 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index 9eafbc50b4833..931a7d1b4ae1b 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/proxyquire": "^1.3.28", "jest": "^27.5.1", "proxyquire": "^2.1.3" diff --git a/packages/@aws-cdk/aws-efs/package.json b/packages/@aws-cdk/aws-efs/package.json index 09d1c1f6f2ca6..73151d18d3aff 100644 --- a/packages/@aws-cdk/aws-efs/package.json +++ b/packages/@aws-cdk/aws-efs/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks-legacy/package.json b/packages/@aws-cdk/aws-eks-legacy/package.json index 0ce369f8479fe..ede28f6869cdf 100644 --- a/packages/@aws-cdk/aws-eks-legacy/package.json +++ b/packages/@aws-cdk/aws-eks-legacy/package.json @@ -82,7 +82,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 56fd7729350a3..c20951c1559ac 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -85,12 +85,12 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/sinon": "^9.0.11", "@types/yaml": "1.9.6", "aws-sdk": "^2.848.0", - "cdk8s": "^1.5.17", - "cdk8s-plus-21": "^1.0.0-beta.84", + "cdk8s": "^1.5.24", + "cdk8s-plus-21": "^1.0.0-beta.90", "jest": "^27.5.1", "sinon": "^9.2.4" }, diff --git a/packages/@aws-cdk/aws-elasticache/package.json b/packages/@aws-cdk/aws-elasticache/package.json index 61fe8976e0ced..50e6f1e715664 100644 --- a/packages/@aws-cdk/aws-elasticache/package.json +++ b/packages/@aws-cdk/aws-elasticache/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/package.json b/packages/@aws-cdk/aws-elasticbeanstalk/package.json index 46506c219aedb..c3813016c4e6a 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/package.json +++ b/packages/@aws-cdk/aws-elasticbeanstalk/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/package.json b/packages/@aws-cdk/aws-elasticloadbalancing/package.json index c43acdd739437..be344c056d66e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancing/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 68546e4d7b7ab..bc600f17e2974 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -76,7 +76,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index 7a600e14a6493..b00b793851348 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -76,7 +76,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-ecs-patterns": "0.0.0" diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index 4d98964505e22..1668c5ffc511f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-elasticsearch/package.json b/packages/@aws-cdk/aws-elasticsearch/package.json index 0a5e8839a0843..bbcdd5dbe8061 100644 --- a/packages/@aws-cdk/aws-elasticsearch/package.json +++ b/packages/@aws-cdk/aws-elasticsearch/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-emr/package.json b/packages/@aws-cdk/aws-emr/package.json index ae9f2a89744ea..d8638f3174f7a 100644 --- a/packages/@aws-cdk/aws-emr/package.json +++ b/packages/@aws-cdk/aws-emr/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-emrcontainers/package.json b/packages/@aws-cdk/aws-emrcontainers/package.json index 5762e656d6761..72b6f669f603a 100644 --- a/packages/@aws-cdk/aws-emrcontainers/package.json +++ b/packages/@aws-cdk/aws-emrcontainers/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 77a2dea2bfa68..650961f9757ef 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1" diff --git a/packages/@aws-cdk/aws-events/package.json b/packages/@aws-cdk/aws-events/package.json index e9f0e1917745b..377a1c8ac9df9 100644 --- a/packages/@aws-cdk/aws-events/package.json +++ b/packages/@aws-cdk/aws-events/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-eventschemas/package.json b/packages/@aws-cdk/aws-eventschemas/package.json index d8d89608e6e95..42b0c59bdf000 100644 --- a/packages/@aws-cdk/aws-eventschemas/package.json +++ b/packages/@aws-cdk/aws-eventschemas/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-finspace/package.json b/packages/@aws-cdk/aws-finspace/package.json index 7c3ae60c58506..cdbf1478941c4 100644 --- a/packages/@aws-cdk/aws-finspace/package.json +++ b/packages/@aws-cdk/aws-finspace/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-fis/package.json b/packages/@aws-cdk/aws-fis/package.json index 614d64919c252..ca2716b5c2b54 100644 --- a/packages/@aws-cdk/aws-fis/package.json +++ b/packages/@aws-cdk/aws-fis/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-fms/package.json b/packages/@aws-cdk/aws-fms/package.json index 1366f66c49454..5ab1866fdca94 100644 --- a/packages/@aws-cdk/aws-fms/package.json +++ b/packages/@aws-cdk/aws-fms/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-forecast/package.json b/packages/@aws-cdk/aws-forecast/package.json index e4431039dc27c..f73f6e685b3f3 100644 --- a/packages/@aws-cdk/aws-forecast/package.json +++ b/packages/@aws-cdk/aws-forecast/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-frauddetector/package.json b/packages/@aws-cdk/aws-frauddetector/package.json index b30bf59153cd7..de77f2a097f9f 100644 --- a/packages/@aws-cdk/aws-frauddetector/package.json +++ b/packages/@aws-cdk/aws-frauddetector/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-fsx/package.json b/packages/@aws-cdk/aws-fsx/package.json index 0b0c1f0426004..0d1a669039c85 100644 --- a/packages/@aws-cdk/aws-fsx/package.json +++ b/packages/@aws-cdk/aws-fsx/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-gamelift/package.json b/packages/@aws-cdk/aws-gamelift/package.json index 8e0aa9635f092..401b1c4375cd7 100644 --- a/packages/@aws-cdk/aws-gamelift/package.json +++ b/packages/@aws-cdk/aws-gamelift/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json index a2247dd577855..ff31bbcb08cee 100644 --- a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json @@ -80,7 +80,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1" diff --git a/packages/@aws-cdk/aws-globalaccelerator/package.json b/packages/@aws-cdk/aws-globalaccelerator/package.json index 14f3c7036f24b..10223d0d40b55 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index 72d87b20c6ee1..29c190ddeca63 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-greengrass/package.json b/packages/@aws-cdk/aws-greengrass/package.json index d4b6a23bc436e..8677a50cafc70 100644 --- a/packages/@aws-cdk/aws-greengrass/package.json +++ b/packages/@aws-cdk/aws-greengrass/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-greengrassv2/package.json b/packages/@aws-cdk/aws-greengrassv2/package.json index af50ddd6ab9c6..4456cac21c5ff 100644 --- a/packages/@aws-cdk/aws-greengrassv2/package.json +++ b/packages/@aws-cdk/aws-greengrassv2/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-groundstation/package.json b/packages/@aws-cdk/aws-groundstation/package.json index faf4496480b5f..a6850e0bcd71a 100644 --- a/packages/@aws-cdk/aws-groundstation/package.json +++ b/packages/@aws-cdk/aws-groundstation/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-guardduty/package.json b/packages/@aws-cdk/aws-guardduty/package.json index e802c1d15247d..fd8c3f540cdd6 100644 --- a/packages/@aws-cdk/aws-guardduty/package.json +++ b/packages/@aws-cdk/aws-guardduty/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-healthlake/package.json b/packages/@aws-cdk/aws-healthlake/package.json index 20fabb1ffe47f..3c6e25ae6d523 100644 --- a/packages/@aws-cdk/aws-healthlake/package.json +++ b/packages/@aws-cdk/aws-healthlake/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 7172a6e453245..5a405fbce243d 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/sinon": "^9.0.11", "jest": "^27.5.1", "sinon": "^9.2.4" diff --git a/packages/@aws-cdk/aws-imagebuilder/package.json b/packages/@aws-cdk/aws-imagebuilder/package.json index bacd907148a73..6d7581afc8a3f 100644 --- a/packages/@aws-cdk/aws-imagebuilder/package.json +++ b/packages/@aws-cdk/aws-imagebuilder/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-inspector/package.json b/packages/@aws-cdk/aws-inspector/package.json index 5bdb7a30c188c..446b49eec052b 100644 --- a/packages/@aws-cdk/aws-inspector/package.json +++ b/packages/@aws-cdk/aws-inspector/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-inspectorv2/package.json b/packages/@aws-cdk/aws-inspectorv2/package.json index 58bc8bd45bf6b..6d3ec7b525446 100644 --- a/packages/@aws-cdk/aws-inspectorv2/package.json +++ b/packages/@aws-cdk/aws-inspectorv2/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-iot-actions/package.json b/packages/@aws-cdk/aws-iot-actions/package.json index 2567eea67ecda..a2db6d0529f63 100644 --- a/packages/@aws-cdk/aws-iot-actions/package.json +++ b/packages/@aws-cdk/aws-iot-actions/package.json @@ -82,7 +82,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "constructs": "^3.3.69", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-iot/package.json b/packages/@aws-cdk/aws-iot/package.json index 6f153018f0543..e83a310c74109 100644 --- a/packages/@aws-cdk/aws-iot/package.json +++ b/packages/@aws-cdk/aws-iot/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iot1click/package.json b/packages/@aws-cdk/aws-iot1click/package.json index 656dee749a698..d0550686c0a7f 100644 --- a/packages/@aws-cdk/aws-iot1click/package.json +++ b/packages/@aws-cdk/aws-iot1click/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-iotanalytics/package.json b/packages/@aws-cdk/aws-iotanalytics/package.json index 534ffed3675a9..081930aad26ad 100644 --- a/packages/@aws-cdk/aws-iotanalytics/package.json +++ b/packages/@aws-cdk/aws-iotanalytics/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json b/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json index ecb59fded3ba8..15acc04b2e0f6 100644 --- a/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json +++ b/packages/@aws-cdk/aws-iotcoredeviceadvisor/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-iotevents-actions/package.json b/packages/@aws-cdk/aws-iotevents-actions/package.json index 81cfc5979c269..457af7c3df4ae 100644 --- a/packages/@aws-cdk/aws-iotevents-actions/package.json +++ b/packages/@aws-cdk/aws-iotevents-actions/package.json @@ -74,7 +74,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iotevents/package.json b/packages/@aws-cdk/aws-iotevents/package.json index 4435cb7d970d2..3b3b352afe429 100644 --- a/packages/@aws-cdk/aws-iotevents/package.json +++ b/packages/@aws-cdk/aws-iotevents/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iotfleethub/package.json b/packages/@aws-cdk/aws-iotfleethub/package.json index dde15541e17b5..1908aae1aa512 100644 --- a/packages/@aws-cdk/aws-iotfleethub/package.json +++ b/packages/@aws-cdk/aws-iotfleethub/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-iotsitewise/package.json b/packages/@aws-cdk/aws-iotsitewise/package.json index d84b4f75d06dc..fabfefa58f1e9 100644 --- a/packages/@aws-cdk/aws-iotsitewise/package.json +++ b/packages/@aws-cdk/aws-iotsitewise/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-iotthingsgraph/package.json b/packages/@aws-cdk/aws-iotthingsgraph/package.json index fd5ffd5531c81..62af6298210fa 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/package.json +++ b/packages/@aws-cdk/aws-iotthingsgraph/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-iotwireless/package.json b/packages/@aws-cdk/aws-iotwireless/package.json index b5a5f1aee6dc7..684d07c5bd136 100644 --- a/packages/@aws-cdk/aws-iotwireless/package.json +++ b/packages/@aws-cdk/aws-iotwireless/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-ivs/package.json b/packages/@aws-cdk/aws-ivs/package.json index d078cf3eceeaa..4f8235a849a03 100644 --- a/packages/@aws-cdk/aws-ivs/package.json +++ b/packages/@aws-cdk/aws-ivs/package.json @@ -96,7 +96,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-kafkaconnect/package.json b/packages/@aws-cdk/aws-kafkaconnect/package.json index 76f3beafd989e..ec3eb36faaa42 100644 --- a/packages/@aws-cdk/aws-kafkaconnect/package.json +++ b/packages/@aws-cdk/aws-kafkaconnect/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-kendra/package.json b/packages/@aws-cdk/aws-kendra/package.json index 2da553adf56a5..805b53e719899 100644 --- a/packages/@aws-cdk/aws-kendra/package.json +++ b/packages/@aws-cdk/aws-kendra/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-kinesis/package.json b/packages/@aws-cdk/aws-kinesis/package.json index 0b1aea08d72df..6cc0092590712 100644 --- a/packages/@aws-cdk/aws-kinesis/package.json +++ b/packages/@aws-cdk/aws-kinesis/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json b/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json index 175bbb1087efb..fb639112e35c2 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-kinesisanalytics/package.json b/packages/@aws-cdk/aws-kinesisanalytics/package.json index 637452746b169..bbdb446edb571 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/package.json +++ b/packages/@aws-cdk/aws-kinesisanalytics/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-kinesisanalyticsv2/package.json b/packages/@aws-cdk/aws-kinesisanalyticsv2/package.json index 6efbd4c780c43..5e618783474d5 100644 --- a/packages/@aws-cdk/aws-kinesisanalyticsv2/package.json +++ b/packages/@aws-cdk/aws-kinesisanalyticsv2/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json index 968facf5dc44c..ad74666cd287a 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json @@ -78,7 +78,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-kinesisfirehose/package.json b/packages/@aws-cdk/aws-kinesisfirehose/package.json index 798a95fb5926e..066bfe78a218c 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-kinesisvideo/package.json b/packages/@aws-cdk/aws-kinesisvideo/package.json index 6cf6f391297a3..40faddbc9de2f 100644 --- a/packages/@aws-cdk/aws-kinesisvideo/package.json +++ b/packages/@aws-cdk/aws-kinesisvideo/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-kms/package.json b/packages/@aws-cdk/aws-kms/package.json index 9b0c7831162cb..333bedc7b8a93 100644 --- a/packages/@aws-cdk/aws-kms/package.json +++ b/packages/@aws-cdk/aws-kms/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-lakeformation/package.json b/packages/@aws-cdk/aws-lakeformation/package.json index 2c37cb38a608f..c7ceef39cb56d 100644 --- a/packages/@aws-cdk/aws-lakeformation/package.json +++ b/packages/@aws-cdk/aws-lakeformation/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index 862b9a8df52c6..8feb76b2523f3 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -76,7 +76,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda-event-sources/package.json b/packages/@aws-cdk/aws-lambda-event-sources/package.json index 9d4944ae6aa4e..c7253423991e4 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/package.json +++ b/packages/@aws-cdk/aws-lambda-event-sources/package.json @@ -75,7 +75,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda-go/package.json b/packages/@aws-cdk/aws-lambda-go/package.json index de8eb177e133d..0383c7c0bbdd2 100644 --- a/packages/@aws-cdk/aws-lambda-go/package.json +++ b/packages/@aws-cdk/aws-lambda-go/package.json @@ -78,7 +78,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index a18913f7a8353..76f4bdbbd1753 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -76,9 +76,9 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "delay": "5.0.0", - "esbuild": "^0.14.21" + "esbuild": "^0.14.23" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-python/package.json b/packages/@aws-cdk/aws-lambda-python/package.json index 1d4764316f4c9..74a9d8a8ffc0c 100644 --- a/packages/@aws-cdk/aws-lambda-python/package.json +++ b/packages/@aws-cdk/aws-lambda-python/package.json @@ -75,7 +75,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index af4143588daf2..1b9f58b6fcf21 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -90,7 +90,7 @@ "@aws-cdk/cfnspec": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/lodash": "^4.14.178", "jest": "^27.5.1", "lodash": "^4.17.21" diff --git a/packages/@aws-cdk/aws-licensemanager/package.json b/packages/@aws-cdk/aws-licensemanager/package.json index 2a080395c788e..7a41e125ce49d 100644 --- a/packages/@aws-cdk/aws-licensemanager/package.json +++ b/packages/@aws-cdk/aws-licensemanager/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-lightsail/package.json b/packages/@aws-cdk/aws-lightsail/package.json index c99305e2ad42c..8f71c3ebd1192 100644 --- a/packages/@aws-cdk/aws-lightsail/package.json +++ b/packages/@aws-cdk/aws-lightsail/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-location/package.json b/packages/@aws-cdk/aws-location/package.json index 7acaf2d81fd60..e686e64f27c41 100644 --- a/packages/@aws-cdk/aws-location/package.json +++ b/packages/@aws-cdk/aws-location/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index 88619b92ba0c4..07e783848cb15 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -76,7 +76,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index cdc6859dda1cd..770c2ff30e78c 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/sinon": "^9.0.11", "aws-sdk": "^2.848.0", "aws-sdk-mock": "5.6.0", diff --git a/packages/@aws-cdk/aws-lookoutequipment/package.json b/packages/@aws-cdk/aws-lookoutequipment/package.json index 26dc399bb1d3d..7218c3f7fd95f 100644 --- a/packages/@aws-cdk/aws-lookoutequipment/package.json +++ b/packages/@aws-cdk/aws-lookoutequipment/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-lookoutmetrics/package.json b/packages/@aws-cdk/aws-lookoutmetrics/package.json index 257c1ccad03c5..bce07b4f9fed7 100644 --- a/packages/@aws-cdk/aws-lookoutmetrics/package.json +++ b/packages/@aws-cdk/aws-lookoutmetrics/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-lookoutvision/package.json b/packages/@aws-cdk/aws-lookoutvision/package.json index 3722553279a80..f24b9b3a26db1 100644 --- a/packages/@aws-cdk/aws-lookoutvision/package.json +++ b/packages/@aws-cdk/aws-lookoutvision/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-macie/package.json b/packages/@aws-cdk/aws-macie/package.json index 0db2eaf329169..c24dd63ebd1ba 100644 --- a/packages/@aws-cdk/aws-macie/package.json +++ b/packages/@aws-cdk/aws-macie/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-managedblockchain/package.json b/packages/@aws-cdk/aws-managedblockchain/package.json index 8f8f77907edb4..9190b3c3b9955 100644 --- a/packages/@aws-cdk/aws-managedblockchain/package.json +++ b/packages/@aws-cdk/aws-managedblockchain/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-mediaconnect/package.json b/packages/@aws-cdk/aws-mediaconnect/package.json index ca2d9a593ea5a..5a67e0a1c0942 100644 --- a/packages/@aws-cdk/aws-mediaconnect/package.json +++ b/packages/@aws-cdk/aws-mediaconnect/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-mediaconvert/package.json b/packages/@aws-cdk/aws-mediaconvert/package.json index 0ee4ec64dcbe7..637617e65843e 100644 --- a/packages/@aws-cdk/aws-mediaconvert/package.json +++ b/packages/@aws-cdk/aws-mediaconvert/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-medialive/package.json b/packages/@aws-cdk/aws-medialive/package.json index f87426fc1fd81..dbe092b4b0dfb 100644 --- a/packages/@aws-cdk/aws-medialive/package.json +++ b/packages/@aws-cdk/aws-medialive/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-mediapackage/package.json b/packages/@aws-cdk/aws-mediapackage/package.json index 31e2b39fe0c9a..23f112ba5ae80 100644 --- a/packages/@aws-cdk/aws-mediapackage/package.json +++ b/packages/@aws-cdk/aws-mediapackage/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-mediastore/package.json b/packages/@aws-cdk/aws-mediastore/package.json index ece435e1c014f..73dc4e62f8961 100644 --- a/packages/@aws-cdk/aws-mediastore/package.json +++ b/packages/@aws-cdk/aws-mediastore/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-memorydb/package.json b/packages/@aws-cdk/aws-memorydb/package.json index b85421f3713f9..5db59ada0d550 100644 --- a/packages/@aws-cdk/aws-memorydb/package.json +++ b/packages/@aws-cdk/aws-memorydb/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-msk/package.json b/packages/@aws-cdk/aws-msk/package.json index adb6018fb557b..e175174ae9da6 100644 --- a/packages/@aws-cdk/aws-msk/package.json +++ b/packages/@aws-cdk/aws-msk/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-mwaa/package.json b/packages/@aws-cdk/aws-mwaa/package.json index f0a0cec6a6877..ab2d6061c871b 100644 --- a/packages/@aws-cdk/aws-mwaa/package.json +++ b/packages/@aws-cdk/aws-mwaa/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-neptune/package.json b/packages/@aws-cdk/aws-neptune/package.json index 27c8c35f6e980..73b0ac6867a50 100644 --- a/packages/@aws-cdk/aws-neptune/package.json +++ b/packages/@aws-cdk/aws-neptune/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-networkfirewall/package.json b/packages/@aws-cdk/aws-networkfirewall/package.json index 91e96fd0b3a46..937d63aa53730 100644 --- a/packages/@aws-cdk/aws-networkfirewall/package.json +++ b/packages/@aws-cdk/aws-networkfirewall/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-networkmanager/package.json b/packages/@aws-cdk/aws-networkmanager/package.json index 696efca60f8eb..c34d778bac829 100644 --- a/packages/@aws-cdk/aws-networkmanager/package.json +++ b/packages/@aws-cdk/aws-networkmanager/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-nimblestudio/package.json b/packages/@aws-cdk/aws-nimblestudio/package.json index c033e0066f94e..52ab33b43c1ca 100644 --- a/packages/@aws-cdk/aws-nimblestudio/package.json +++ b/packages/@aws-cdk/aws-nimblestudio/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-opensearchservice/package.json b/packages/@aws-cdk/aws-opensearchservice/package.json index f0d434006921e..1bece17b44f7a 100644 --- a/packages/@aws-cdk/aws-opensearchservice/package.json +++ b/packages/@aws-cdk/aws-opensearchservice/package.json @@ -89,7 +89,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-opsworks/package.json b/packages/@aws-cdk/aws-opsworks/package.json index 838ff7003ff62..011fa1d4d0790 100644 --- a/packages/@aws-cdk/aws-opsworks/package.json +++ b/packages/@aws-cdk/aws-opsworks/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-opsworkscm/package.json b/packages/@aws-cdk/aws-opsworkscm/package.json index 1220456e3ff0b..f429f37979df0 100644 --- a/packages/@aws-cdk/aws-opsworkscm/package.json +++ b/packages/@aws-cdk/aws-opsworkscm/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-panorama/package.json b/packages/@aws-cdk/aws-panorama/package.json index 37658a09b0c61..f766e427bbffd 100644 --- a/packages/@aws-cdk/aws-panorama/package.json +++ b/packages/@aws-cdk/aws-panorama/package.json @@ -95,7 +95,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-pinpoint/package.json b/packages/@aws-cdk/aws-pinpoint/package.json index 30801027c4e06..b4f9c8565e526 100644 --- a/packages/@aws-cdk/aws-pinpoint/package.json +++ b/packages/@aws-cdk/aws-pinpoint/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-pinpointemail/package.json b/packages/@aws-cdk/aws-pinpointemail/package.json index 26486ee72627b..3c51a3c74abd1 100644 --- a/packages/@aws-cdk/aws-pinpointemail/package.json +++ b/packages/@aws-cdk/aws-pinpointemail/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-qldb/package.json b/packages/@aws-cdk/aws-qldb/package.json index a35637354c0c1..9e4e6e0c90ac0 100644 --- a/packages/@aws-cdk/aws-qldb/package.json +++ b/packages/@aws-cdk/aws-qldb/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-quicksight/package.json b/packages/@aws-cdk/aws-quicksight/package.json index 270c171d3b5cb..79d41343ab08b 100644 --- a/packages/@aws-cdk/aws-quicksight/package.json +++ b/packages/@aws-cdk/aws-quicksight/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-ram/package.json b/packages/@aws-cdk/aws-ram/package.json index 1064bb16fc89f..ddf8049356491 100644 --- a/packages/@aws-cdk/aws-ram/package.json +++ b/packages/@aws-cdk/aws-ram/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index 174ea5579a8a6..3110738220ab1 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 6c214a6a8ab89..d6841a31195d5 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-rekognition/package.json b/packages/@aws-cdk/aws-rekognition/package.json index 9cf5d2e0d407d..1c92e782a9e64 100644 --- a/packages/@aws-cdk/aws-rekognition/package.json +++ b/packages/@aws-cdk/aws-rekognition/package.json @@ -95,7 +95,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-resourcegroups/package.json b/packages/@aws-cdk/aws-resourcegroups/package.json index caf23fb138d50..a17a9aa169e15 100644 --- a/packages/@aws-cdk/aws-resourcegroups/package.json +++ b/packages/@aws-cdk/aws-resourcegroups/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-robomaker/package.json b/packages/@aws-cdk/aws-robomaker/package.json index d40dc417d86d6..b96c0b59e92b4 100644 --- a/packages/@aws-cdk/aws-robomaker/package.json +++ b/packages/@aws-cdk/aws-robomaker/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index 1ee06cae1d0b8..2d4e248234582 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index 101ccb2e8c39c..7aca456bffc24 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -79,7 +79,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 6b85275fe8528..9cb18851a5db3 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-route53recoverycontrol/package.json b/packages/@aws-cdk/aws-route53recoverycontrol/package.json index 0ec2546ada38d..cde17f02ec86e 100644 --- a/packages/@aws-cdk/aws-route53recoverycontrol/package.json +++ b/packages/@aws-cdk/aws-route53recoverycontrol/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-route53recoveryreadiness/package.json b/packages/@aws-cdk/aws-route53recoveryreadiness/package.json index 6dcaed6cb8433..8feeeca412adb 100644 --- a/packages/@aws-cdk/aws-route53recoveryreadiness/package.json +++ b/packages/@aws-cdk/aws-route53recoveryreadiness/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-route53resolver/package.json b/packages/@aws-cdk/aws-route53resolver/package.json index 851453eb1279c..be0c3e79cea04 100644 --- a/packages/@aws-cdk/aws-route53resolver/package.json +++ b/packages/@aws-cdk/aws-route53resolver/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3-assets/package.json b/packages/@aws-cdk/aws-s3-assets/package.json index 80996d4ebc255..5291ae6cb726e 100644 --- a/packages/@aws-cdk/aws-s3-assets/package.json +++ b/packages/@aws-cdk/aws-s3-assets/package.json @@ -82,7 +82,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/assets": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 58ea46c3250ed..104ff0bc223d2 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -90,7 +90,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index 3b004ef015a21..32738cd1b0d93 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -75,7 +75,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3/package.json b/packages/@aws-cdk/aws-s3/package.json index 55531e2da34ff..13f96096a7018 100644 --- a/packages/@aws-cdk/aws-s3/package.json +++ b/packages/@aws-cdk/aws-s3/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3objectlambda/package.json b/packages/@aws-cdk/aws-s3objectlambda/package.json index 0e1020f5e6dc1..23f511c76cc9e 100644 --- a/packages/@aws-cdk/aws-s3objectlambda/package.json +++ b/packages/@aws-cdk/aws-s3objectlambda/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-s3outposts/package.json b/packages/@aws-cdk/aws-s3outposts/package.json index 9c1b9dc830771..0ad8877061133 100644 --- a/packages/@aws-cdk/aws-s3outposts/package.json +++ b/packages/@aws-cdk/aws-s3outposts/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-sagemaker/package.json b/packages/@aws-cdk/aws-sagemaker/package.json index 9741c8b8d96a3..cb5332a56fc47 100644 --- a/packages/@aws-cdk/aws-sagemaker/package.json +++ b/packages/@aws-cdk/aws-sagemaker/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 0b7d7cd0c97a9..bb86f7d0fceca 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1", "ts-jest": "^27.1.3" }, diff --git a/packages/@aws-cdk/aws-sdb/package.json b/packages/@aws-cdk/aws-sdb/package.json index 4636ae5160146..a4072de0aa01c 100644 --- a/packages/@aws-cdk/aws-sdb/package.json +++ b/packages/@aws-cdk/aws-sdb/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-secretsmanager/package.json b/packages/@aws-cdk/aws-secretsmanager/package.json index a289566a2728c..abf808fed6a01 100644 --- a/packages/@aws-cdk/aws-secretsmanager/package.json +++ b/packages/@aws-cdk/aws-secretsmanager/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-securityhub/package.json b/packages/@aws-cdk/aws-securityhub/package.json index 7c542fa20395b..2be17327b22a1 100644 --- a/packages/@aws-cdk/aws-securityhub/package.json +++ b/packages/@aws-cdk/aws-securityhub/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-servicecatalog/package.json b/packages/@aws-cdk/aws-servicecatalog/package.json index d5493a3813974..9a4c6500da1f8 100644 --- a/packages/@aws-cdk/aws-servicecatalog/package.json +++ b/packages/@aws-cdk/aws-servicecatalog/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-iam": "0.0.0", diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/package.json b/packages/@aws-cdk/aws-servicecatalogappregistry/package.json index 1db1a743a5952..96e9d4dd7967c 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/package.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-servicediscovery/package.json b/packages/@aws-cdk/aws-servicediscovery/package.json index 4a45183391e02..98567a421aa13 100644 --- a/packages/@aws-cdk/aws-servicediscovery/package.json +++ b/packages/@aws-cdk/aws-servicediscovery/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index e0f76df37ce79..92c00efabcbcb 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index e751bf00efd99..45d5852e16554 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-signer/package.json b/packages/@aws-cdk/aws-signer/package.json index 7f44205727a9b..0bc0f4f9d9522 100644 --- a/packages/@aws-cdk/aws-signer/package.json +++ b/packages/@aws-cdk/aws-signer/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 9e70dd36e2ba3..f295805a8b389 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -76,7 +76,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sns/package.json b/packages/@aws-cdk/aws-sns/package.json index 9d641f195de5b..b1664ed712223 100644 --- a/packages/@aws-cdk/aws-sns/package.json +++ b/packages/@aws-cdk/aws-sns/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 973e8275ec4bc..a6b12eaf10285 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-ssm/package.json b/packages/@aws-cdk/aws-ssm/package.json index 68e346b561e6c..65caf4f4c5873 100644 --- a/packages/@aws-cdk/aws-ssm/package.json +++ b/packages/@aws-cdk/aws-ssm/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-ssmcontacts/package.json b/packages/@aws-cdk/aws-ssmcontacts/package.json index ff883b494f4a9..bfce82c5f9d0a 100644 --- a/packages/@aws-cdk/aws-ssmcontacts/package.json +++ b/packages/@aws-cdk/aws-ssmcontacts/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-ssmincidents/package.json b/packages/@aws-cdk/aws-ssmincidents/package.json index a0663b40f9cd1..f014c6fc4ef38 100644 --- a/packages/@aws-cdk/aws-ssmincidents/package.json +++ b/packages/@aws-cdk/aws-ssmincidents/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-sso/package.json b/packages/@aws-cdk/aws-sso/package.json index 5a3e38bd255d2..349b3f7ef235a 100644 --- a/packages/@aws-cdk/aws-sso/package.json +++ b/packages/@aws-cdk/aws-sso/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 58936893a7f08..0bbda5a9263c7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -90,7 +90,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-stepfunctions/package.json b/packages/@aws-cdk/aws-stepfunctions/package.json index f9018098cd4d6..c901ae4980ad4 100644 --- a/packages/@aws-cdk/aws-stepfunctions/package.json +++ b/packages/@aws-cdk/aws-stepfunctions/package.json @@ -84,7 +84,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-synthetics/package.json b/packages/@aws-cdk/aws-synthetics/package.json index 66eb03b85dd8b..ed5b4eb9f4534 100644 --- a/packages/@aws-cdk/aws-synthetics/package.json +++ b/packages/@aws-cdk/aws-synthetics/package.json @@ -86,7 +86,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/aws-timestream/package.json b/packages/@aws-cdk/aws-timestream/package.json index 35305de3ba407..d630d3f2f818f 100644 --- a/packages/@aws-cdk/aws-timestream/package.json +++ b/packages/@aws-cdk/aws-timestream/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/aws-transfer/package.json b/packages/@aws-cdk/aws-transfer/package.json index 5c6fefa69391a..efeddaba3fff8 100644 --- a/packages/@aws-cdk/aws-transfer/package.json +++ b/packages/@aws-cdk/aws-transfer/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-waf/package.json b/packages/@aws-cdk/aws-waf/package.json index 8aaf46f4b625f..20c6e3c1a8896 100644 --- a/packages/@aws-cdk/aws-waf/package.json +++ b/packages/@aws-cdk/aws-waf/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-wafregional/package.json b/packages/@aws-cdk/aws-wafregional/package.json index 485d9962f8424..aa4997b25435f 100644 --- a/packages/@aws-cdk/aws-wafregional/package.json +++ b/packages/@aws-cdk/aws-wafregional/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-wafv2/package.json b/packages/@aws-cdk/aws-wafv2/package.json index 331e6229ca89b..3f6fa8ac9d3ff 100644 --- a/packages/@aws-cdk/aws-wafv2/package.json +++ b/packages/@aws-cdk/aws-wafv2/package.json @@ -85,7 +85,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-wisdom/package.json b/packages/@aws-cdk/aws-wisdom/package.json index 376daf9bdaaa8..f641345d8e7ea 100644 --- a/packages/@aws-cdk/aws-wisdom/package.json +++ b/packages/@aws-cdk/aws-wisdom/package.json @@ -88,7 +88,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-workspaces/package.json b/packages/@aws-cdk/aws-workspaces/package.json index 95758a0601e75..8f0da7bbbfc03 100644 --- a/packages/@aws-cdk/aws-workspaces/package.json +++ b/packages/@aws-cdk/aws-workspaces/package.json @@ -83,7 +83,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-xray/package.json b/packages/@aws-cdk/aws-xray/package.json index b41a6bb35eb27..83f4d9e17dfed 100644 --- a/packages/@aws-cdk/aws-xray/package.json +++ b/packages/@aws-cdk/aws-xray/package.json @@ -87,7 +87,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "@aws-cdk/core": "0.0.0" diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 9370ac05d5848..abec52ee08000 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -61,7 +61,7 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "repository": { diff --git a/packages/@aws-cdk/cfnspec/package.json b/packages/@aws-cdk/cfnspec/package.json index 655a14cb29f43..f299732ab20a0 100644 --- a/packages/@aws-cdk/cfnspec/package.json +++ b/packages/@aws-cdk/cfnspec/package.json @@ -32,7 +32,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/md5": "^2.3.2", "fast-json-patch": "^2.2.1", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 9b128f55c9de8..8ac885479f264 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -62,7 +62,7 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/mock-fs": "^4.13.1", "@types/semver": "^7.3.9", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 2ee3f60b337b0..a46cf4a5539a8 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/string-width": "^4.0.1", "fast-check": "^2.22.0", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index fc32910da3325..8e24b2f22e400 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -454,7 +454,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1", "ts-jest": "^27.1.3" }, diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index da4f6dafb1175..852c03fa918df 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -180,7 +180,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/lodash": "^4.14.178", "@types/minimatch": "^3.0.5", "@types/node": "^10.17.60", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 5ee0eb2d5e71e..af0a8eaa7d508 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -89,7 +89,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/aws-lambda": "^8.10.92", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/sinon": "^9.0.11", "aws-sdk": "^2.848.0", "aws-sdk-mock": "5.6.0", diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 090cb95dfaffb..90941529df1f3 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -68,7 +68,7 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/mock-fs": "^4.13.1", "@types/semver": "^7.3.9", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 40dcc891bc1e9..0846135bf2e90 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/lambda-layer-awscli/package.json b/packages/@aws-cdk/lambda-layer-awscli/package.json index e4aa927d4d7df..7daf454a10df1 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/package.json +++ b/packages/@aws-cdk/lambda-layer-awscli/package.json @@ -78,7 +78,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/lambda-layer-kubectl/package.json b/packages/@aws-cdk/lambda-layer-kubectl/package.json index a71a3ffded402..2a2223166c3ee 100644 --- a/packages/@aws-cdk/lambda-layer-kubectl/package.json +++ b/packages/@aws-cdk/lambda-layer-kubectl/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "pkglint": { diff --git a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json index 146f31a109482..8f0dfffef911b 100644 --- a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json +++ b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json @@ -77,7 +77,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json index 1249fa706977b..53fd337d2df98 100644 --- a/packages/@aws-cdk/pipelines/package.json +++ b/packages/@aws-cdk/pipelines/package.json @@ -48,7 +48,7 @@ "@aws-cdk/cdk-integ-tools": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "aws-sdk": "^2.848.0" }, "peerDependencies": { diff --git a/packages/@aws-cdk/region-info/package.json b/packages/@aws-cdk/region-info/package.json index f3400ed30b3e4..701e87c62a2c7 100644 --- a/packages/@aws-cdk/region-info/package.json +++ b/packages/@aws-cdk/region-info/package.json @@ -63,7 +63,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "fs-extra": "^9.1.0" }, "repository": { diff --git a/packages/@aws-cdk/triggers/package.json b/packages/@aws-cdk/triggers/package.json index a062d87d93ad6..3a52bcf9ebf61 100644 --- a/packages/@aws-cdk/triggers/package.json +++ b/packages/@aws-cdk/triggers/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "aws-sdk": "^2.848.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index dc7e2e4598ad1..819ed1a4c77d1 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/yaml": "^1.9.7", "jest": "^27.5.1" }, diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 5d16ebc9bc656..afbce52f06eb8 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -34,7 +34,7 @@ "license": "Apache-2.0", "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/node": "^10.17.60", "@aws-cdk/cdk-build-tools": "0.0.0", "constructs": "^3.3.69", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index fa08f9e613038..2e36b49a7b51f 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/glob": "^7.2.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/node": "^10.17.60", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0" diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 3a082f4fcf3d5..b710471c6b70f 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -353,7 +353,7 @@ "@types/fs-extra": "^8.1.2", "@types/node": "^10.17.60", "constructs": "^3.3.69", - "esbuild": "^0.14.21", + "esbuild": "^0.14.23", "fs-extra": "^9.1.0", "ts-node": "^9.1.1", "typescript": "~3.8.3" diff --git a/packages/aws-cdk-migration/package.json b/packages/aws-cdk-migration/package.json index 5b0832f7cf86e..fc601186248ca 100644 --- a/packages/aws-cdk-migration/package.json +++ b/packages/aws-cdk-migration/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/glob": "^7.2.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/node": "^10.17.60", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0" diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 60b9d81c2c96a..7247c28e3262b 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -60,7 +60,7 @@ "@types/archiver": "^5.3.1", "@types/fs-extra": "^8.1.2", "@types/glob": "^7.2.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/minimatch": "^3.0.5", "@types/mockery": "^1.4.30", "@types/node": "^10.17.60", diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 2aa0cd142a5cc..4f5a7bc8ef7a0 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/yargs": "^15.0.14", "@aws-cdk/pkglint": "0.0.0", "typescript": "~3.9.10", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index ef50654c8d7ed..6047c8edb3b6d 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/archiver": "^5.3.1", "@types/glob": "^7.2.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/mime": "^2.0.3", "@types/mock-fs": "^4.13.1", "@types/node": "^10.17.60", diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index c3250facd19b8..5132b2b673136 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -33,7 +33,7 @@ "yaml": "1.10.2" }, "devDependencies": { - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/yaml": "1.9.7", "jest": "^27.5.1", "typescript": "~3.9.10" diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 5e9d13e172b25..f8bfe8ca95c6e 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@aws-cdk/pkglint": "0.0.0", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/semver": "^7.3.9", "@types/yargs": "^15.0.14" }, diff --git a/tools/@aws-cdk/cdk-release/package.json b/tools/@aws-cdk/cdk-release/package.json index 9a9f3a123b109..35001433f704d 100644 --- a/tools/@aws-cdk/cdk-release/package.json +++ b/tools/@aws-cdk/cdk-release/package.json @@ -32,7 +32,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/changelog-parser": "^2.8.1", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/yargs": "^15.0.14", "jest": "^27.5.1" }, diff --git a/tools/@aws-cdk/cfn2ts/package.json b/tools/@aws-cdk/cfn2ts/package.json index d8125a9bf0a5a..e89ec2caa0bc8 100644 --- a/tools/@aws-cdk/cfn2ts/package.json +++ b/tools/@aws-cdk/cfn2ts/package.json @@ -41,7 +41,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/yargs": "^15.0.14", "jest": "^27.5.1" }, diff --git a/tools/@aws-cdk/eslint-plugin/package.json b/tools/@aws-cdk/eslint-plugin/package.json index 23c88859de30a..d5d9652ebbbf1 100644 --- a/tools/@aws-cdk/eslint-plugin/package.json +++ b/tools/@aws-cdk/eslint-plugin/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@types/eslint": "^7.29.0", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/node": "^10.17.60", "@types/estree": "*", "eslint-plugin-rulesdir": "^0.2.1", diff --git a/tools/@aws-cdk/individual-pkg-gen/package.json b/tools/@aws-cdk/individual-pkg-gen/package.json index b89d1f0a57161..77243452dcf65 100644 --- a/tools/@aws-cdk/individual-pkg-gen/package.json +++ b/tools/@aws-cdk/individual-pkg-gen/package.json @@ -29,7 +29,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/fs-extra": "^8.1.2", - "@types/jest": "^27.4.0" + "@types/jest": "^27.4.1" }, "dependencies": { "aws-cdk-migration": "0.0.0", diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index b3aec2db6c7dd..b76a5d1ebe899 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -40,7 +40,7 @@ "@aws-cdk/eslint-plugin": "0.0.0", "@types/fs-extra": "^8.1.2", "@types/glob": "^7.2.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/semver": "^7.3.9", "@types/yargs": "^15.0.14", "@typescript-eslint/eslint-plugin": "^4.33.0", diff --git a/tools/@aws-cdk/prlint/package.json b/tools/@aws-cdk/prlint/package.json index cbf9a88de470d..90e5a1da5d54a 100644 --- a/tools/@aws-cdk/prlint/package.json +++ b/tools/@aws-cdk/prlint/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/glob": "^7.2.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "jest": "^27.5.1", "make-runnable": "^1.3.10", "typescript": "~3.9.10" diff --git a/tools/@aws-cdk/yarn-cling/package.json b/tools/@aws-cdk/yarn-cling/package.json index 1ff18399c891d..c7a78825f68f8 100644 --- a/tools/@aws-cdk/yarn-cling/package.json +++ b/tools/@aws-cdk/yarn-cling/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@aws-cdk/pkglint": "0.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.4.1", "@types/node": "^10.17.60", "@types/semver": "^7.3.9", "@types/yarnpkg__lockfile": "^1.1.5", diff --git a/yarn.lock b/yarn.lock index 4597b8087cba2..087c6d66aceee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -52,9 +52,9 @@ integrity sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.0": - version "7.17.4" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.17.4.tgz#a22f1ae8999122873b3d18865e98c7a3936b8c8b" - integrity sha512-R9x5r4t4+hBqZTmioSnkrW+I6NmbojwjGT8p4G2Gw1thWbXIHGDnmGdLdFw0/7ljucdIrNRp7Npgb4CyBYzzJg== + version "7.17.5" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz#6cd2e836058c28f06a4ca8ee7ed955bbf37c8225" + integrity sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.16.7" @@ -129,9 +129,9 @@ "@babel/types" "^7.16.7" "@babel/helper-module-transforms@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz#7665faeb721a01ca5327ddc6bba15a5cb34b6a41" - integrity sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng== + version "7.17.6" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.6.tgz#3c3b03cc6617e33d68ef5a27a67419ac5199ccd0" + integrity sha512-2ULmRdqoOMpdvkbT8jONrZML/XALfzxlb052bldftkicAUy8AxSCkD5trDPQcwHNmolcl7wP6ehNqMlyUw6AaA== dependencies: "@babel/helper-environment-visitor" "^7.16.7" "@babel/helper-module-imports" "^7.16.7" @@ -139,8 +139,8 @@ "@babel/helper-split-export-declaration" "^7.16.7" "@babel/helper-validator-identifier" "^7.16.7" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/traverse" "^7.17.3" + "@babel/types" "^7.17.0" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0": version "7.16.7" @@ -294,7 +294,7 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.16.7", "@babel/traverse@^7.17.0", "@babel/traverse@^7.17.3", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.17.0", "@babel/traverse@^7.17.3", "@babel/traverse@^7.7.2": version "7.17.3" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz#0ae0f15b27d9a92ba1f2263358ea7c4e7db47b57" integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw== @@ -355,14 +355,14 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@eslint/eslintrc@^1.0.5": - version "1.0.5" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318" - integrity sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ== +"@eslint/eslintrc@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz#583d12dbec5d4f22f333f9669f7d0b7c7815b4d3" + integrity sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.2.0" + espree "^9.3.1" globals "^13.9.0" ignore "^4.0.6" import-fresh "^3.2.1" @@ -371,9 +371,9 @@ strip-json-comments "^3.1.1" "@gar/promisify@^1.0.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" - integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw== + version "1.1.3" + resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" + integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== "@humanwhocodes/config-array@^0.5.0": version "0.5.0" @@ -1356,7 +1356,22 @@ semver "^7.3.5" which "^2.0.2" -"@npmcli/installed-package-contents@^1.0.6": +"@npmcli/git@^3.0.0": + version "3.0.0" + resolved "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz#466a18980da6b646a8112a7676688ae5347deba3" + integrity sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA== + dependencies: + "@npmcli/promise-spawn" "^1.3.2" + lru-cache "^7.3.1" + mkdirp "^1.0.4" + npm-pick-manifest "^7.0.0" + proc-log "^2.0.0" + promise-inflight "^1.0.1" + promise-retry "^2.0.1" + semver "^7.3.5" + which "^2.0.2" + +"@npmcli/installed-package-contents@^1.0.6", "@npmcli/installed-package-contents@^1.0.7": version "1.0.7" resolved "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz#ab7408c6147911b970a8abe261ce512232a3f4fa" integrity sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw== @@ -1811,12 +1826,12 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/jest@^27.4.0": - version "27.4.0" - resolved "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz#037ab8b872067cae842a320841693080f9cb84ed" - integrity sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ== +"@types/jest@^27.4.0", "@types/jest@^27.4.1": + version "27.4.1" + resolved "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz#185cbe2926eaaf9662d340cc02e548ce9e11ab6d" + integrity sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw== dependencies: - jest-diff "^27.0.0" + jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" "@types/json-schema@*", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.9": @@ -1879,9 +1894,9 @@ integrity sha512-uv53RrNdhbkV/3VmVCtfImfYCWC3GTTRn3R11Whni3EJ+gb178tkZBVNj2edLY5CMrB749dQi+SJkg87jsN8UQ== "@types/node@*", "@types/node@>= 8": - version "17.0.18" - resolved "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz#3b4fed5cfb58010e3a2be4b6e74615e4847f1074" - integrity sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA== + version "17.0.20" + resolved "https://registry.npmjs.org/@types/node/-/node-17.0.20.tgz#29626bd9c9119df5b8194353d34044c895fe56e3" + integrity sha512-Q15Clj3lZSLnhVA6yKw1G7SQz46DeL9gO1TEgfK1OQGvMdQ6TUWmCeWf1QBUNkw2BDfV52i2YuYd9OF3ZwGhjw== "@types/node@^10.17.60": version "10.17.60" @@ -1889,9 +1904,9 @@ integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^12": - version "12.20.45" - resolved "https://registry.npmjs.org/@types/node/-/node-12.20.45.tgz#f4980d177999299d99cd4b290f7f39366509a44f" - integrity sha512-1Jg2Qv5tuxBqgQV04+wO5u+wmSHbHgpORCJdeCLM+E+YdPElpdHhgywU+M1V1InL8rfOtpqtOjswk+uXTKwx7w== + version "12.20.46" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.46.tgz#7e49dee4c54fd19584e6a9e0da5f3dc2e9136bc7" + integrity sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A== "@types/node@^16.9.2": version "16.11.25" @@ -2029,13 +2044,13 @@ tsutils "^3.21.0" "@typescript-eslint/eslint-plugin@^5": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz#3b866371d8d75c70f9b81535e7f7d3aa26527c7a" - integrity sha512-HJh33bgzXe6jGRocOj4FmefD7hRY4itgjzOrSs3JPrTNXsX7j5+nQPciAUj/1nZtwo2kAc3C75jZO+T23gzSGw== + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz#b2cd3e288f250ce8332d5035a2ff65aba3374ac4" + integrity sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw== dependencies: - "@typescript-eslint/scope-manager" "5.11.0" - "@typescript-eslint/type-utils" "5.11.0" - "@typescript-eslint/utils" "5.11.0" + "@typescript-eslint/scope-manager" "5.12.1" + "@typescript-eslint/type-utils" "5.12.1" + "@typescript-eslint/utils" "5.12.1" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -2066,13 +2081,13 @@ debug "^4.3.1" "@typescript-eslint/parser@^5": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.11.0.tgz#b4fcaf65513f9b34bdcbffdda055724a5efb7e04" - integrity sha512-x0DCjetHZYBRovJdr3U0zG9OOdNXUaFLJ82ehr1AlkArljJuwEsgnud+Q7umlGDFLFrs8tU8ybQDFocp/eX8mQ== + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz#b090289b553b8aa0899740d799d0f96e6f49771b" + integrity sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw== dependencies: - "@typescript-eslint/scope-manager" "5.11.0" - "@typescript-eslint/types" "5.11.0" - "@typescript-eslint/typescript-estree" "5.11.0" + "@typescript-eslint/scope-manager" "5.12.1" + "@typescript-eslint/types" "5.12.1" + "@typescript-eslint/typescript-estree" "5.12.1" debug "^4.3.2" "@typescript-eslint/scope-manager@4.33.0": @@ -2083,20 +2098,20 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" -"@typescript-eslint/scope-manager@5.11.0": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz#f5aef83ff253f457ecbee5f46f762298f0101e4b" - integrity sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA== +"@typescript-eslint/scope-manager@5.12.1": + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz#58734fd45d2d1dec49641aacc075fba5f0968817" + integrity sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ== dependencies: - "@typescript-eslint/types" "5.11.0" - "@typescript-eslint/visitor-keys" "5.11.0" + "@typescript-eslint/types" "5.12.1" + "@typescript-eslint/visitor-keys" "5.12.1" -"@typescript-eslint/type-utils@5.11.0": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.11.0.tgz#58be0ba73d1f6ef8983d79f7f0bc2209b253fefe" - integrity sha512-wDqdsYO6ofLaD4DsGZ0jGwxp4HrzD2YKulpEZXmgN3xo4BHJwf7kq49JTRpV0Gx6bxkSUmc9s0EIK1xPbFFpIA== +"@typescript-eslint/type-utils@5.12.1": + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz#8d58c6a0bb176b5e9a91581cda1a7f91a114d3f0" + integrity sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg== dependencies: - "@typescript-eslint/utils" "5.11.0" + "@typescript-eslint/utils" "5.12.1" debug "^4.3.2" tsutils "^3.21.0" @@ -2105,12 +2120,12 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/types@5.11.0": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz#ba345818a2540fdf2755c804dc2158517ab61188" - integrity sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ== +"@typescript-eslint/types@5.12.1": + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz#46a36a28ff4d946821b58fe5a73c81dc2e12aa89" + integrity sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA== -"@typescript-eslint/typescript-estree@4.33.0", "@typescript-eslint/typescript-estree@^4.8.2": +"@typescript-eslint/typescript-estree@4.33.0", "@typescript-eslint/typescript-estree@^4.33.0": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== @@ -2123,28 +2138,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.11.0": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz#53f9e09b88368191e52020af77c312a4777ffa43" - integrity sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg== +"@typescript-eslint/typescript-estree@5.12.1": + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz#6a9425b9c305bcbc38e2d1d9a24c08e15e02b722" + integrity sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw== dependencies: - "@typescript-eslint/types" "5.11.0" - "@typescript-eslint/visitor-keys" "5.11.0" + "@typescript-eslint/types" "5.12.1" + "@typescript-eslint/visitor-keys" "5.12.1" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.11.0": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz#d91548ef180d74c95d417950336d9260fdbe1dc5" - integrity sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw== +"@typescript-eslint/utils@5.12.1": + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz#447c24a05d9c33f9c6c64cb48f251f2371eef920" + integrity sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.11.0" - "@typescript-eslint/types" "5.11.0" - "@typescript-eslint/typescript-estree" "5.11.0" + "@typescript-eslint/scope-manager" "5.12.1" + "@typescript-eslint/types" "5.12.1" + "@typescript-eslint/typescript-estree" "5.12.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -2156,12 +2171,12 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@5.11.0": - version "5.11.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz#888542381f1a2ac745b06d110c83c0b261487ebb" - integrity sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA== +"@typescript-eslint/visitor-keys@5.12.1": + version "5.12.1" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz#f722da106c8f9695ae5640574225e45af3e52ec3" + integrity sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A== dependencies: - "@typescript-eslint/types" "5.11.0" + "@typescript-eslint/types" "5.12.1" eslint-visitor-keys "^3.0.0" "@xmldom/xmldom@^0.8.0": @@ -2238,9 +2253,9 @@ agent-base@6, agent-base@^6.0.0, agent-base@^6.0.2: debug "4" agentkeepalive@^4.1.3, agentkeepalive@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz#616ce94ccb41d1a39a45d203d8076fe98713062d" - integrity sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw== + version "4.2.1" + resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" + integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== dependencies: debug "^4.1.0" depd "^1.1.2" @@ -2491,11 +2506,16 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -ast-module-types@^2.3.2, ast-module-types@^2.4.0, ast-module-types@^2.7.0, ast-module-types@^2.7.1: +ast-module-types@^2.3.2, ast-module-types@^2.7.1: version "2.7.1" resolved "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz#3f7989ef8dfa1fdb82dfe0ab02bdfc7c77a57dd3" integrity sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw== +ast-module-types@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz#9a6d8a80f438b6b8fe4995699d700297f398bf81" + integrity sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ== + ast-types@^0.13.2: version "0.13.4" resolved "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" @@ -2543,9 +2563,9 @@ aws-sdk-mock@5.6.0: traverse "^0.6.6" aws-sdk@^2.596.0, aws-sdk@^2.848.0, aws-sdk@^2.928.0, aws-sdk@^2.979.0: - version "2.1074.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1074.0.tgz#be3283f781b3060cd67d5abef50d1edacefede70" - integrity sha512-tD478mkukglutjs+mq5FQmYFzz+l/wddl5u3tTMWTNa+j1eSL+AqaHPFM1rC3O9h98QqpKKzeKbLrPhGDvYaRg== + version "2.1079.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1079.0.tgz#41ede54aa4ba5ce77d4ffe202f9a1ee7869da2a8" + integrity sha512-WHYWiye9f2XYQ33Rj/uVw4VF/Qq/xrB9NDnGlRhgK8Ga7T20+8/iZD5/Z8wICVNZTsfUZ3g6LfkeZ1l+LZhHKw== dependencies: buffer "4.9.2" events "1.1.1" @@ -2718,14 +2738,14 @@ browser-process-hrtime@^1.0.0: integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browserslist@^4.17.5: - version "4.19.1" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz#4ac0435b35ab655896c31d53018b6dd5e9e4c9a3" - integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A== + version "4.19.3" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz#29b7caad327ecf2859485f696f9604214bedd383" + integrity sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg== dependencies: - caniuse-lite "^1.0.30001286" - electron-to-chromium "^1.4.17" + caniuse-lite "^1.0.30001312" + electron-to-chromium "^1.4.71" escalade "^3.1.1" - node-releases "^2.0.1" + node-releases "^2.0.2" picocolors "^1.0.0" bs-logger@0.x: @@ -2873,7 +2893,7 @@ camelcase@^6.2.0, camelcase@^6.3.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001286: +caniuse-lite@^1.0.30001312: version "1.0.30001312" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz#e11eba4b87e24d22697dae05455d5aea28550d5f" integrity sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ== @@ -2900,20 +2920,20 @@ cdk-generate-synthetic-examples@^0.1.6: jsii-rosetta "^1.53.0" yargs "^17.3.1" -cdk8s-plus-21@^1.0.0-beta.84: - version "1.0.0-beta.84" - resolved "https://registry.npmjs.org/cdk8s-plus-21/-/cdk8s-plus-21-1.0.0-beta.84.tgz#9a44281f79a5644c5457db0101fdf664d5e18db6" - integrity sha512-yp0bXNUuP6IOr3iJgu0ASEYUhN5u0TCqFF/ZRWm7Tp2jWMsMx829uJ/mkvbQlEFVLodbTKn84kY/enwN69wJVg== +cdk8s-plus-21@^1.0.0-beta.90: + version "1.0.0-beta.90" + resolved "https://registry.npmjs.org/cdk8s-plus-21/-/cdk8s-plus-21-1.0.0-beta.90.tgz#d2ee9abd8fea94506ef9a1256b206a0a61369d06" + integrity sha512-/8JTB9lg1Qd8ibeAMaPSP+yRcCDyCCTT9i/kY9TQzzEPBKTFpx8i9mVBRRB3VuWgO8gA3LTlvLSGI3+06+qtgg== dependencies: - minimatch "^3.1.1" + minimatch "^3.1.2" -cdk8s@^1.5.17: - version "1.5.17" - resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-1.5.17.tgz#88e7feba135cecd185013a472d0a8698dd1e1bdc" - integrity sha512-GcbdbVNqNLSgw3tEyKQQLLT0c6uVkia1W5gTfUNHfU1SigGQjhm9WWhKNnktxDVn9UiS/PFC5xDhJibbLRZJ0g== +cdk8s@^1.5.24: + version "1.5.24" + resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-1.5.24.tgz#e3f6aa6a38dabf98f04b4f14ae742050ea6177c1" + integrity sha512-9Rn6s0Gb8DinGl7UCrUu5NC4jPccRPYC8u7ybBWK6YjCMkERDZmNMTaRKnPSnh5bP6zYb16UUn2+L0+aRjTe1Q== dependencies: fast-json-patch "^2.2.1" - follow-redirects "^1.14.8" + follow-redirects "^1.14.9" yaml "2.0.0-7" chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: @@ -3140,7 +3160,7 @@ color-name@^1.1.4, color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.2: +color-support@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -3175,12 +3195,7 @@ commander@^7.2.0: resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -commander@~9.0.0: +commander@^9.0.0, commander@~9.0.0: version "9.0.0" resolved "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz#86d58f24ee98126568936bd1d3574e0308a99a40" integrity sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw== @@ -3259,9 +3274,9 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control- integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= constructs@^3.3.69: - version "3.3.218" - resolved "https://registry.npmjs.org/constructs/-/constructs-3.3.218.tgz#d51c76975b5b8bee1cf7267378be8da4b71bf218" - integrity sha512-nt9GWhxy0iZI1JKhP5y9e2EFt+fEzqy33Mhanrt4WpSqzC4in1Et5ZBZo4rc2uzSWFSaQZbl5b3rurO8SqKevw== + version "3.3.225" + resolved "https://registry.npmjs.org/constructs/-/constructs-3.3.225.tgz#351be7e35c9adc50991da1f2d22fc0d156ec3062" + integrity sha512-sTqaeWxDuQnXRGgHpKpnafFdzw6i0qCdA4wIkmk55uJ89u2LHirvxiU3BWdFZduEmMr3Jm5K3SvsBjWmzcfU2A== conventional-changelog-angular@^5.0.12: version "5.0.13" @@ -3748,14 +3763,14 @@ define-properties@^1.1.3: object-keys "^1.0.12" degenerator@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/degenerator/-/degenerator-3.0.1.tgz#7ef78ec0c8577a544477308ddf1d2d6e88d51f5b" - integrity sha512-LFsIFEeLPlKvAKXu7j3ssIG6RT0TbI7/GhsqrI0DnHASEQjXQ0LUSYcjJteGgRGmZbl1TnMSxpNQIAiJ7Du5TQ== + version "3.0.2" + resolved "https://registry.npmjs.org/degenerator/-/degenerator-3.0.2.tgz#6a61fcc42a702d6e50ff6023fe17bff435f68235" + integrity sha512-c0mef3SNQo56t6urUU6tdQAs+ThoD0o9B9MJ8HEt7NQcGEILCRFqQb7ZbP9JAv+QF1Ky5plydhMR/IrqWDm+TQ== dependencies: ast-types "^0.13.2" escodegen "^1.8.1" esprima "^4.0.0" - vm2 "^3.9.3" + vm2 "^3.9.8" delay@5.0.0: version "5.0.0" @@ -3772,7 +3787,12 @@ delegates@^1.0.0: resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -depd@^1.1.2, depd@~1.1.2: +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= @@ -3814,27 +3834,27 @@ detect-newline@^3.0.0, detect-newline@^3.1.0: integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== detective-amd@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detective-amd/-/detective-amd-3.1.0.tgz#92daee3214a0ca4522646cf333cac90a3fca6373" - integrity sha512-G7wGWT6f0VErjUkE2utCm7IUshT7nBh7aBBH2VBOiY9Dqy2DMens5iiOvYCuhstoIxRKLrnOvVAz4/EyPIAjnw== + version "3.1.2" + resolved "https://registry.npmjs.org/detective-amd/-/detective-amd-3.1.2.tgz#bf55eb5291c218b76d6224a3d07932ef13a9a357" + integrity sha512-jffU26dyqJ37JHR/o44La6CxtrDf3Rt9tvd2IbImJYxWKTMdBjctp37qoZ6ZcY80RHg+kzWz4bXn39e4P7cctQ== dependencies: - ast-module-types "^2.7.0" + ast-module-types "^3.0.0" escodegen "^2.0.0" get-amd-module-type "^3.0.0" - node-source-walk "^4.0.0" + node-source-walk "^4.2.0" detective-cjs@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/detective-cjs/-/detective-cjs-3.1.1.tgz#18da3e39a002d2098a1123d45ce1de1b0d9045a0" - integrity sha512-JQtNTBgFY6h8uT6pgph5QpV3IyxDv+z3qPk/FZRDT9TlFfm5dnRtpH39WtQEr1khqsUxVqXzKjZHpdoQvQbllg== + version "3.1.3" + resolved "https://registry.npmjs.org/detective-cjs/-/detective-cjs-3.1.3.tgz#50e107d67b37f459b0ec02966ceb7e20a73f268b" + integrity sha512-ljs7P0Yj9MK64B7G0eNl0ThWSYjhAaSYy+fQcpzaKalYl/UoQBOzOeLCSFEY1qEBhziZ3w7l46KG/nH+s+L7BQ== dependencies: - ast-module-types "^2.4.0" + ast-module-types "^3.0.0" node-source-walk "^4.0.0" detective-es6@^2.2.0, detective-es6@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/detective-es6/-/detective-es6-2.2.1.tgz#090c874e2cdcda677389cc2ae36f0b37faced187" - integrity sha512-22z7MblxkhsIQGuALeGwCKEfqNy4WmgDGmfJCwdXbfDkVYIiIDmY513hiIWBvX3kCmzvvWE7RR7kAYxs01wwKQ== + version "2.2.2" + resolved "https://registry.npmjs.org/detective-es6/-/detective-es6-2.2.2.tgz#ee5f880981d9fecae9a694007029a2f6f26d8d28" + integrity sha512-eZUKCUsbHm8xoeoCM0z6JFwvDfJ5Ww5HANo+jPR7AzkFpW9Mun3t/TqIF2jjeWa2TFbAiGaWESykf2OQp3oeMw== dependencies: node-source-walk "^4.0.0" @@ -3868,37 +3888,35 @@ detective-postcss@^5.0.0: postcss-values-parser "^5.0.0" detective-sass@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/detective-sass/-/detective-sass-3.0.1.tgz#496b819efd1f5c4dd3f0e19b43a8634bdd6927c4" - integrity sha512-oSbrBozRjJ+QFF4WJFbjPQKeakoaY1GiR380NPqwdbWYd5wfl5cLWv0l6LsJVqrgWfFN1bjFqSeo32Nxza8Lbw== + version "3.0.2" + resolved "https://registry.npmjs.org/detective-sass/-/detective-sass-3.0.2.tgz#e0f35aac79a4d2f6409c284d95b8f7ecd5973afd" + integrity sha512-DNVYbaSlmti/eztFGSfBw4nZvwsTaVXEQ4NsT/uFckxhJrNRFUh24d76KzoCC3aarvpZP9m8sC2L1XbLej4F7g== dependencies: - debug "^4.1.1" - gonzales-pe "^4.2.3" + gonzales-pe "^4.3.0" node-source-walk "^4.0.0" detective-scss@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/detective-scss/-/detective-scss-2.0.1.tgz#06f8c21ae6dedad1fccc26d544892d968083eaf8" - integrity sha512-VveyXW4WQE04s05KlJ8K0bG34jtHQVgTc9InspqoQxvnelj/rdgSAy7i2DXAazyQNFKlWSWbS+Ro2DWKFOKTPQ== + version "2.0.2" + resolved "https://registry.npmjs.org/detective-scss/-/detective-scss-2.0.2.tgz#7d2a642616d44bf677963484fa8754d9558b8235" + integrity sha512-hDWnWh/l0tht/7JQltumpVea/inmkBaanJUcXRB9kEEXVwVUMuZd6z7eusQ6GcBFrfifu3pX/XPyD7StjbAiBg== dependencies: - debug "^4.1.1" - gonzales-pe "^4.2.3" + gonzales-pe "^4.3.0" node-source-walk "^4.0.0" detective-stylus@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/detective-stylus/-/detective-stylus-1.0.0.tgz#50aee7db8babb990381f010c63fabba5b58e54cd" - integrity sha1-UK7n24uruZA4HwEMY/q7pbWOVM0= + version "1.0.3" + resolved "https://registry.npmjs.org/detective-stylus/-/detective-stylus-1.0.3.tgz#20a702936c9fd7d4203fd7a903314b5dd43ac713" + integrity sha512-4/bfIU5kqjwugymoxLXXLltzQNeQfxGoLm2eIaqtnkWxqbhap9puDVpJPVDx96hnptdERzS5Cy6p9N8/08A69Q== detective-typescript@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/detective-typescript/-/detective-typescript-7.0.0.tgz#8c8917f2e51d9e4ee49821abf759ff512dd897f2" - integrity sha512-y/Ev98AleGvl43YKTNcA2Q+lyFmsmCfTTNWy4cjEJxoLkbobcXtRS0Kvx06daCgr2GdtlwLfNzL553BkktfJoA== + version "7.0.2" + resolved "https://registry.npmjs.org/detective-typescript/-/detective-typescript-7.0.2.tgz#c6e00b4c28764741ef719662250e6b014a5f3c8e" + integrity sha512-unqovnhxzvkCz3m1/W4QW4qGsvXCU06aU2BAm8tkza+xLnp9SOFnob2QsTxUv5PdnQKfDvWcv9YeOeFckWejwA== dependencies: - "@typescript-eslint/typescript-estree" "^4.8.2" + "@typescript-eslint/typescript-estree" "^4.33.0" ast-module-types "^2.7.1" node-source-walk "^4.2.0" - typescript "^3.9.7" + typescript "^3.9.10" dezalgo@^1.0.0: version "1.0.3" @@ -4020,7 +4038,7 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.4.17: +electron-to-chromium@^1.4.71: version "1.4.71" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz#17056914465da0890ce00351a3b946fd4cd51ff6" integrity sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw== @@ -4186,125 +4204,125 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild-android-arm64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.21.tgz#8842d0c3b7c81fbe2dc46ddb416ffd6eb822184b" - integrity sha512-Bqgld1TY0wZv8TqiQmVxQFgYzz8ZmyzT7clXBDZFkOOdRybzsnj8AZuK1pwcLVA7Ya6XncHgJqIao7NFd3s0RQ== - -esbuild-darwin-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.21.tgz#ec7df02ad88ecf7f8fc23a3ed7917e07dea0c9c9" - integrity sha512-j+Eg+e13djzyYINVvAbOo2/zvZ2DivuJJTaBrJnJHSD7kUNuGHRkHoSfFjbI80KHkn091w350wdmXDNSgRjfYQ== - -esbuild-darwin-arm64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.21.tgz#0c2a977edec1ef54097ee56a911518c820d4e5e4" - integrity sha512-nDNTKWDPI0RuoPj5BhcSB2z5EmZJJAyRtZLIjyXSqSpAyoB8eyAKXl4lB8U2P78Fnh4Lh1le/fmpewXE04JhBQ== - -esbuild-freebsd-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.21.tgz#f5b5fc1d031286c3a0949d1bda7db774b7d0404e" - integrity sha512-zIurkCHXhxELiDZtLGiexi8t8onQc2LtuE+S7457H/pP0g0MLRKMrsn/IN4LDkNe6lvBjuoZZi2OfelOHn831g== - -esbuild-freebsd-arm64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.21.tgz#a05cab908013e4992b31a675850b8c44eb468c0c" - integrity sha512-wdxMmkJfbwcN+q85MpeUEamVZ40FNsBa9mPq8tAszDn8TRT2HoJvVRADPIIBa9SWWwlDChIMjkDKAnS3KS/sPA== - -esbuild-linux-32@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.21.tgz#638d244cc58b951f447addb4bade628d126ef84b" - integrity sha512-fmxvyzOPPh2xiEHojpCeIQP6pXcoKsWbz3ryDDIKLOsk4xp3GbpHIEAWP0xTeuhEbendmvBDVKbAVv3PnODXLg== - -esbuild-linux-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.21.tgz#8eb634abee928be7e35b985fafbfef2f2e31397f" - integrity sha512-edZyNOv1ql+kpmlzdqzzDjRQYls+tSyi4QFi+PdBhATJFUqHsnNELWA9vMSzAaInPOEaVUTA5Ml28XFChcy4DA== - -esbuild-linux-arm64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.21.tgz#e05599ea6253b58394157da162d856f3ead62f9e" - integrity sha512-t5qxRkq4zdQC0zXpzSB2bTtfLgOvR0C6BXYaRE/6/k8/4SrkZcTZBeNu+xGvwCU4b5dU9ST9pwIWkK6T1grS8g== - -esbuild-linux-arm@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.21.tgz#1ae1078231cf689d3ba894a32d3723c0be9b91fd" - integrity sha512-aSU5pUueK6afqmLQsbU+QcFBT62L+4G9hHMJDHWfxgid6hzhSmfRH9U/f+ymvxsSTr/HFRU4y7ox8ZyhlVl98w== - -esbuild-linux-mips64le@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.21.tgz#f05be62d126764e99b37edcac5bb49b78c7a8890" - integrity sha512-jLZLQGCNlUsmIHtGqNvBs3zN+7a4D9ckf0JZ+jQTwHdZJ1SgV9mAjbB980OFo66LoY+WeM7t3WEnq3FjI1zw4A== - -esbuild-linux-ppc64le@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.21.tgz#592c98d82dad7982268ef8deed858c4566f07ab1" - integrity sha512-4TWxpK391en2UBUw6GSrukToTDu6lL9vkm3Ll40HrI08WG3qcnJu7bl8e1+GzelDsiw1QmfAY/nNvJ6iaHRpCQ== - -esbuild-linux-riscv64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.21.tgz#0db7bd6f10d8f9afea973a7d6bf87b449b864b7b" - integrity sha512-fElngqOaOfTsF+u+oetDLHsPG74vB2ZaGZUqmGefAJn3a5z9Z2pNa4WpVbbKgHpaAAy5tWM1m1sbGohj6Ki6+Q== - -esbuild-linux-s390x@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.21.tgz#254a9354d34c9d1b41a3e21d2ec9269cbbb2c5df" - integrity sha512-brleZ6R5fYv0qQ7ZBwenQmP6i9TdvJCB092c/3D3pTLQHBGHJb5zWgKxOeS7bdHzmLy6a6W7GbFk6QKpjyD6QA== - -esbuild-netbsd-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.21.tgz#4cb783d060b02bf3b897a9a12cce2b3b547726f8" - integrity sha512-nCEgsLCQ8RoFWVV8pVI+kX66ICwbPP/M9vEa0NJGIEB/Vs5sVGMqkf67oln90XNSkbc0bPBDuo4G6FxlF7PN8g== - -esbuild-openbsd-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.21.tgz#f886b93feefddbe573528fa4b421c9c6e2bc969b" - integrity sha512-h9zLMyVD0T73MDTVYIb/qUTokwI6EJH9O6wESuTNq6+XpMSr6C5aYZ4fvFKdNELW+Xsod+yDS2hV2JTUAbFrLA== - -esbuild-sunos-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.21.tgz#3829e4d57d4cb6950837fe90b0b67cdfb37cf13a" - integrity sha512-Kl+7Cot32qd9oqpLdB1tEGXEkjBlijrIxMJ0+vlDFaqsODutif25on0IZlFxEBtL2Gosd4p5WCV1U7UskNQfXA== - -esbuild-windows-32@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.21.tgz#b858a22d1a82e53cdc59310cd56294133f7a95e7" - integrity sha512-V7vnTq67xPBUCk/9UtlolmQ798Ecjdr1ZoI1vcSgw7M82aSSt0eZdP6bh5KAFZU8pxDcx3qoHyWQfHYr11f22A== - -esbuild-windows-64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.21.tgz#7bb5a027d5720cf9caf18a4bedd11327208f1f12" - integrity sha512-kDgHjKOHwjfJDCyRGELzVxiP/RBJBTA+wyspf78MTTJQkyPuxH2vChReNdWc+dU2S4gIZFHMdP1Qrl/k22ZmaA== - -esbuild-windows-arm64@0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.21.tgz#25df54521ad602c826b262ea2e7cc1fe80f5c2f5" - integrity sha512-8Sbo0zpzgwWrwjQYLmHF78f7E2xg5Ve63bjB2ng3V2aManilnnTGaliq2snYg+NOX60+hEvJHRdVnuIAHW0lVw== - -esbuild@^0.14.17, esbuild@^0.14.21: - version "0.14.21" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.21.tgz#b3e05f900f1c4394f596d60d63d9816468f0f671" - integrity sha512-7WEoNMBJdLN993dr9h0CpFHPRc3yFZD+EAVY9lg6syJJ12gc5fHq8d75QRExuhnMkT2DaRiIKFThRvDWP+fO+A== +esbuild-android-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.23.tgz#c89b3c50b4f47668dcbeb0b34ee4615258818e71" + integrity sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw== + +esbuild-darwin-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.23.tgz#1c131e8cb133ed935ca32f824349a117c896a15b" + integrity sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug== + +esbuild-darwin-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.23.tgz#3c6245a50109dd84953f53d7833bd3b4f0e8c6fa" + integrity sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw== + +esbuild-freebsd-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.23.tgz#0cdc54e72d3dd9cd992f9c2960055e68a7f8650c" + integrity sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA== + +esbuild-freebsd-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.23.tgz#1d11faed3a0c429e99b7dddef84103eb509788b2" + integrity sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg== + +esbuild-linux-32@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.23.tgz#fd9f033fc27dcab61100cb1eb1c936893a68c841" + integrity sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ== + +esbuild-linux-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.23.tgz#c04c438514f1359ecb1529205d0c836d4165f198" + integrity sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ== + +esbuild-linux-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.23.tgz#d1b3ab2988ab0734886eb9e811726f7db099ab96" + integrity sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g== + +esbuild-linux-arm@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.23.tgz#df7558b6a5076f5eb9fd387c8704f768b61d97fb" + integrity sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw== + +esbuild-linux-mips64le@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.23.tgz#bb4c47fccc9493d460ffeb1f88e8a97a98a14f8b" + integrity sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw== + +esbuild-linux-ppc64le@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.23.tgz#a332dbc8a1b4e30cfe1261bfaa5cef57c9c8c02a" + integrity sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag== + +esbuild-linux-riscv64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.23.tgz#85675f3f931f5cd7cfb238fd82f77a62ffcb6d86" + integrity sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg== + +esbuild-linux-s390x@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.23.tgz#a526282a696e6d846f4c628f5315475518c0c0f0" + integrity sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA== + +esbuild-netbsd-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.23.tgz#8e456605694719aa1be4be266d6cd569c06dfaf5" + integrity sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g== + +esbuild-openbsd-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.23.tgz#f2fc51714b4ddabc86e4eb30ca101dd325db2f7d" + integrity sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA== + +esbuild-sunos-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.23.tgz#a408f33ea20e215909e20173a0fd78b1aaad1f8e" + integrity sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g== + +esbuild-windows-32@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.23.tgz#b9005bbff54dac3975ff355d5de2b5e37165d128" + integrity sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA== + +esbuild-windows-64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.23.tgz#2b5a99befeaca6aefdad32d738b945730a60a060" + integrity sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g== + +esbuild-windows-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz#edc560bbadb097eb45fc235aeacb942cb94a38c0" + integrity sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw== + +esbuild@^0.14.17, esbuild@^0.14.23: + version "0.14.23" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.23.tgz#95e842cb22bc0c7d82c140adc16788aac91469fe" + integrity sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig== optionalDependencies: - esbuild-android-arm64 "0.14.21" - esbuild-darwin-64 "0.14.21" - esbuild-darwin-arm64 "0.14.21" - esbuild-freebsd-64 "0.14.21" - esbuild-freebsd-arm64 "0.14.21" - esbuild-linux-32 "0.14.21" - esbuild-linux-64 "0.14.21" - esbuild-linux-arm "0.14.21" - esbuild-linux-arm64 "0.14.21" - esbuild-linux-mips64le "0.14.21" - esbuild-linux-ppc64le "0.14.21" - esbuild-linux-riscv64 "0.14.21" - esbuild-linux-s390x "0.14.21" - esbuild-netbsd-64 "0.14.21" - esbuild-openbsd-64 "0.14.21" - esbuild-sunos-64 "0.14.21" - esbuild-windows-32 "0.14.21" - esbuild-windows-64 "0.14.21" - esbuild-windows-arm64 "0.14.21" + esbuild-android-arm64 "0.14.23" + esbuild-darwin-64 "0.14.23" + esbuild-darwin-arm64 "0.14.23" + esbuild-freebsd-64 "0.14.23" + esbuild-freebsd-arm64 "0.14.23" + esbuild-linux-32 "0.14.23" + esbuild-linux-64 "0.14.23" + esbuild-linux-arm "0.14.23" + esbuild-linux-arm64 "0.14.23" + esbuild-linux-mips64le "0.14.23" + esbuild-linux-ppc64le "0.14.23" + esbuild-linux-riscv64 "0.14.23" + esbuild-linux-s390x "0.14.23" + esbuild-netbsd-64 "0.14.23" + esbuild-openbsd-64 "0.14.23" + esbuild-sunos-64 "0.14.23" + esbuild-windows-32 "0.14.23" + esbuild-windows-64 "0.14.23" + esbuild-windows-arm64 "0.14.23" escalade@^3.1.1: version "3.1.1" @@ -4456,10 +4474,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.0: - version "7.1.0" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz#c1f6ea30ac583031f203d65c73e723b01298f153" - integrity sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg== +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -4488,10 +4506,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1" - integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ== +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^7.32.0: version "7.32.0" @@ -4540,11 +4558,11 @@ eslint@^7.32.0: v8-compile-cache "^2.0.3" eslint@^8: - version "8.8.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz#9762b49abad0cb4952539ffdb0a046392e571a2d" - integrity sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ== + version "8.9.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz#a2a8227a99599adc4342fd9b854cb8d8d6412fdb" + integrity sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q== dependencies: - "@eslint/eslintrc" "^1.0.5" + "@eslint/eslintrc" "^1.1.0" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" @@ -4552,10 +4570,10 @@ eslint@^8: debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.0" + eslint-scope "^7.1.1" eslint-utils "^3.0.0" - eslint-visitor-keys "^3.2.0" - espree "^9.3.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.1" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -4589,14 +4607,14 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -espree@^9.2.0, espree@^9.3.0: - version "9.3.0" - resolved "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz#c1240d79183b72aaee6ccfa5a90bc9111df085a8" - integrity sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ== +espree@^9.3.1: + version "9.3.1" + resolved "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz#8793b4bc27ea4c778c19908e0719e7b8f4115bcd" + integrity sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ== dependencies: acorn "^8.7.0" acorn-jsx "^5.3.1" - eslint-visitor-keys "^3.1.0" + eslint-visitor-keys "^3.3.0" esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" @@ -4924,10 +4942,10 @@ flatten@^1.0.2: resolved "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -follow-redirects@^1.14.0, follow-redirects@^1.14.8: - version "1.14.8" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" - integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== +follow-redirects@^1.14.0, follow-redirects@^1.14.9: + version "1.14.9" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== foreach@^2.0.5: version "2.0.5" @@ -4988,9 +5006,9 @@ fs-constants@^1.0.0: integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" - integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + version "10.0.1" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8" + integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -5067,19 +5085,19 @@ functional-red-black-tree@^1.0.1: integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= gauge@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.0.tgz#afba07aa0374a93c6219603b1fb83eaa2264d8f8" - integrity sha512-F8sU45yQpjQjxKkm1UOAhf0U/O0aFt//Fl7hsrNVto+patMHjs7dPI9mFOGUKbhrgKm0S3EjW3scMFuQmWSROw== + version "4.0.2" + resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.2.tgz#c3777652f542b6ef62797246e8c7caddecb32cc7" + integrity sha512-aSPRm2CvA9R8QyU5eXMFPd+cYkyxLsXHd2l5/FOH2V/eml//M04G6KZOmTap07O1PvEwNcl2NndyLfK8g3QrKA== dependencies: ansi-regex "^5.0.1" aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" + color-support "^1.1.3" + console-control-strings "^1.1.0" has-unicode "^2.0.1" - signal-exit "^3.0.0" + signal-exit "^3.0.7" string-width "^4.2.3" strip-ansi "^6.0.1" - wide-align "^1.1.2" + wide-align "^1.1.5" gauge@~2.7.3: version "2.7.4" @@ -5319,7 +5337,7 @@ globby@^11.0.2, globby@^11.0.3, globby@^11.0.4: merge2 "^1.4.1" slash "^3.0.0" -gonzales-pe@^4.2.3: +gonzales-pe@^4.2.3, gonzales-pe@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz#fe9dec5f3c557eead09ff868c65826be54d067b3" integrity sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ== @@ -5471,15 +5489,15 @@ http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: - depd "~1.1.2" + depd "2.0.0" inherits "2.0.4" setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" + statuses "2.0.1" toidentifier "1.0.1" http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: @@ -6215,7 +6233,7 @@ jest-diff@^26.0.0: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.0.0, jest-diff@^27.5.1: +jest-diff@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== @@ -6339,7 +6357,7 @@ jest-leak-detector@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-matcher-utils@^27.5.1: +jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== @@ -7207,9 +7225,9 @@ lru-cache@^6.0.0: yallist "^4.0.0" lru-cache@^7.3.1: - version "7.3.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz#7702e80694ec2bf19865567a469f2b081fcf53f5" - integrity sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw== + version "7.4.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.4.0.tgz#2830a779b483e9723e20f26fa5278463c50599d8" + integrity sha512-YOfuyWa/Ee+PXbDm40j9WXyJrzQUynVbgn4Km643UYcWNcrSfRkKL0WaiUcxcIbkXcVTgNpDqSnPXntWXT75cw== lru-queue@^0.1.0: version "0.1.0" @@ -7271,10 +7289,10 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^10.0.1: - version "10.0.2" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.2.tgz#0afb38d2f951b17ebc482b0b16c8d77f39dfe389" - integrity sha512-JSFLK53NJP22FL/eAGOyKsWbc2G3v+toPMD7Dq9PJKQCvK0i3t8hGkKxe+3YZzwYa+c0kxRHu7uxH3fvO+rsaA== +make-fetch-happen@^10.0.2: + version "10.0.3" + resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz#94bbe675cf62a811dbab59668052388a078beaf2" + integrity sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag== dependencies: agentkeepalive "^4.2.0" cacache "^15.3.0" @@ -7500,14 +7518,14 @@ min-indent@^1.0.0: resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@>=3.1: +minimatch@>=3.1, minimatch@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.0.tgz#281d8402aaaeed18a9e8406ad99c46a19206c6ef" integrity sha512-EU+GCVjXD00yOUf1TwAHVP7v3fBD3A8RkkPYsWWKGWesxM/572sL53wJQnHxquHlRhYUV36wHkqrN8cdikKc2g== dependencies: brace-expansion "^2.0.1" -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -7649,11 +7667,11 @@ modify-values@^1.0.0: integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== module-definition@^3.3.1: - version "3.3.1" - resolved "https://registry.npmjs.org/module-definition/-/module-definition-3.3.1.tgz#fedef71667713e36988b93d0626a4fe7b35aebfc" - integrity sha512-kLidGPwQ2yq484nSD+D3JoJp4Etc0Ox9P0L34Pu/cU4X4HcG7k7p62XI5BBuvURWMRX3RPyuhOcBHbKus+UH4A== + version "3.4.0" + resolved "https://registry.npmjs.org/module-definition/-/module-definition-3.4.0.tgz#953a3861f65df5e43e80487df98bb35b70614c2b" + integrity sha512-XxJ88R1v458pifaSkPNLUTdSPNVGMP2SXVncVmApGO+gAfrLANiYe6JofymCzVceGOMwQE2xogxBSc8uB7XegA== dependencies: - ast-module-types "^2.7.1" + ast-module-types "^3.0.0" node-source-walk "^4.0.0" module-lookup-amd@^7.0.1: @@ -7704,9 +7722,9 @@ mute-stream@0.0.8, mute-stream@~0.0.4: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nanoid@^3.2.0: - version "3.3.0" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz#5906f776fd886c66c24f3653e0c46fcb1d4ad6b0" - integrity sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg== + version "3.3.1" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== natural-compare@^1.4.0: version "1.4.0" @@ -7843,15 +7861,15 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^2.0.1: +node-releases@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== node-source-walk@^4.0.0, node-source-walk@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/node-source-walk/-/node-source-walk-4.2.0.tgz#c2efe731ea8ba9c03c562aa0a9d984e54f27bc2c" - integrity sha512-hPs/QMe6zS94f5+jG3kk9E7TNm4P2SulrKiLWMzKszBfNZvL/V6wseHlTd7IvfW0NZWqPtK3+9yYNr+3USGteA== + version "4.3.0" + resolved "https://registry.npmjs.org/node-source-walk/-/node-source-walk-4.3.0.tgz#8336b56cfed23ac5180fe98f1e3bb6b11fd5317c" + integrity sha512-8Q1hXew6ETzqKRAs3jjLioSxNfT1cx74ooiF8RlAONwVMcfq+UdzLC2eB5qcPldUxaE5w3ytLkrmV1TGddhZTA== dependencies: "@babel/parser" "^7.0.0" @@ -7913,14 +7931,14 @@ npm-bundled@^1.1.1, npm-bundled@^1.1.2: npm-normalize-package-bin "^1.0.1" npm-check-updates@^12: - version "12.3.0" - resolved "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.3.0.tgz#d06faf0b07da72112d57828a6c2beff5970fa706" - integrity sha512-NcVpbVYZymmr7lVCwqz1wpkAgWNQ/XyyPy/yyR2IjCHU4Dr1lpIJgIgtC0PCDobcYuYXpYSIgIWZA7RFvq8+Rw== + version "12.4.0" + resolved "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.4.0.tgz#67e8e1b88551167368ec246dfd4302ce3007d83d" + integrity sha512-X14H74M8SVFkStmP1NDOMh0OjLB3mU2dwUeM71zyITJHkm08MASwwTcydW6YuGcNW1RUlVq1cQY2yWijv4zKUQ== dependencies: chalk "^4.1.2" cint "^8.2.1" cli-table "^0.3.11" - commander "^8.3.0" + commander "^9.0.0" fast-memoize "^2.5.2" find-up "5.0.0" fp-and-or "^0.1.3" @@ -7931,9 +7949,9 @@ npm-check-updates@^12: jsonlines "^0.1.1" libnpmconfig "^1.2.1" lodash "^4.17.21" - minimatch "^3.0.4" + minimatch "^5.0.0" p-map "^4.0.0" - pacote "^12.0.2" + pacote "^13.0.2" parse-github-url "^1.0.2" progress "^2.0.3" prompts "^2.4.2" @@ -7982,6 +8000,15 @@ npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-pack semver "^7.3.4" validate-npm-package-name "^3.0.0" +npm-package-arg@^9.0.0: + version "9.0.0" + resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.0.tgz#955a5e4735298fc23f71cb72da3574daa134340c" + integrity sha512-yhzXxeor+Zfhe5MGwPdDumz6HtNlj2pMekWB95IX3CC6uDNgde0oPKHDCLDPoJqQfd0HqAWt+y4Hs5m7CK1+9Q== + dependencies: + hosted-git-info "^4.1.0" + semver "^7.3.5" + validate-npm-package-name "^3.0.0" + npm-packlist@^2.1.4: version "2.2.2" resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz#076b97293fa620f632833186a7a8f65aaa6148c8" @@ -8012,6 +8039,16 @@ npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: npm-package-arg "^8.1.2" semver "^7.3.4" +npm-pick-manifest@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz#e3b18b09678a47e894f90941bef8204ea5d96c3b" + integrity sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ== + dependencies: + npm-install-checks "^4.0.0" + npm-normalize-package-bin "^1.0.1" + npm-package-arg "^9.0.0" + semver "^7.3.5" + npm-registry-fetch@^11.0.0: version "11.0.0" resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz#68c1bb810c46542760d62a6a965f85a702d43a76" @@ -8024,17 +8061,18 @@ npm-registry-fetch@^11.0.0: minizlib "^2.0.0" npm-package-arg "^8.0.0" -npm-registry-fetch@^12.0.0: - version "12.0.2" - resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-12.0.2.tgz#ae583bb3c902a60dae43675b5e33b5b1f6159f1e" - integrity sha512-Df5QT3RaJnXYuOwtXBXS9BWs+tHH2olvkCLh6jcR/b/u3DvPMlp3J0TvvYwplPKxHMOwfg287PYih9QqaVFoKA== +npm-registry-fetch@^13.0.0: + version "13.0.0" + resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz#f0cf807f661184217651e0465668e4fd255fd6a8" + integrity sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw== dependencies: - make-fetch-happen "^10.0.1" + make-fetch-happen "^10.0.2" minipass "^3.1.6" minipass-fetch "^1.4.1" minipass-json-stream "^1.0.1" minizlib "^2.1.2" - npm-package-arg "^8.1.5" + npm-package-arg "^9.0.0" + proc-log "^2.0.0" npm-registry-fetch@^9.0.0: version "9.0.0" @@ -8469,30 +8507,32 @@ pacote@^11.2.6: ssri "^8.0.1" tar "^6.1.0" -pacote@^12.0.2: - version "12.0.3" - resolved "https://registry.npmjs.org/pacote/-/pacote-12.0.3.tgz#b6f25868deb810e7e0ddf001be88da2bcaca57c7" - integrity sha512-CdYEl03JDrRO3x18uHjBYA9TyoW8gy+ThVcypcDkxPtKlw76e4ejhYB6i9lJ+/cebbjpqPW/CijjqxwDTts8Ow== +pacote@^13.0.2: + version "13.0.2" + resolved "https://registry.npmjs.org/pacote/-/pacote-13.0.2.tgz#3389b8338cdbec3a1fa433848cf00860f7c08ea6" + integrity sha512-3LyfvDk2BSJNFQZIcDqnLNa7IsYb6KwX3H9uZPwaHJFIX6Gv5N9QHU+s7mEs/RbN4/ta6KUT39LAi2l6EkBi5A== dependencies: - "@npmcli/git" "^2.1.0" - "@npmcli/installed-package-contents" "^1.0.6" + "@npmcli/git" "^3.0.0" + "@npmcli/installed-package-contents" "^1.0.7" "@npmcli/promise-spawn" "^1.2.0" "@npmcli/run-script" "^2.0.0" - cacache "^15.0.5" + cacache "^15.3.0" chownr "^2.0.0" fs-minipass "^2.1.0" infer-owner "^1.0.4" - minipass "^3.1.3" - mkdirp "^1.0.3" - npm-package-arg "^8.0.1" + minipass "^3.1.6" + mkdirp "^1.0.4" + npm-package-arg "^9.0.0" npm-packlist "^3.0.0" - npm-pick-manifest "^6.0.0" - npm-registry-fetch "^12.0.0" + npm-pick-manifest "^7.0.0" + npm-registry-fetch "^13.0.0" + proc-log "^2.0.0" promise-retry "^2.0.1" - read-package-json-fast "^2.0.1" + read-package-json "^4.1.1" + read-package-json-fast "^2.0.3" rimraf "^3.0.2" ssri "^8.0.1" - tar "^6.1.0" + tar "^6.1.11" pako@~1.0.2: version "1.0.11" @@ -8771,6 +8811,11 @@ printj@~1.3.1: resolved "https://registry.npmjs.org/printj/-/printj-1.3.1.tgz#9af6b1d55647a1587ac44f4c1654a4b95b8e12cb" integrity sha512-GA3TdL8szPK4AQ2YnOe/b+Y1jUFwmmGMMK/qbY7VcE3Z7FU8JstbKiKRzO6CIiAKPhTO8m01NoQ0V5f3jc4OGg== +proc-log@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz#25f8cb346a5d08e27f2422b3ca6ba8379bcbf8ba" + integrity sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -8789,9 +8834,9 @@ progress@^2.0.0, progress@^2.0.3: integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== projen@^0.52.13: - version "0.52.25" - resolved "https://registry.npmjs.org/projen/-/projen-0.52.25.tgz#366c4d9c0bce7020c94ab0cb073068e1308155f3" - integrity sha512-ulqS30UAH8Vb4zQ+MHmd1T1JW1uKRVwBgXfP5WK3a9UuXnUdKcTC3G9c1LbIcjTw1phRKHVuoE0XFa/k7LIDyg== + version "0.52.44" + resolved "https://registry.npmjs.org/projen/-/projen-0.52.44.tgz#12220e2ac58cb78d7b0fb1c1dc4162a5b917b765" + integrity sha512-CGo5YGwqBe+CTt9vo3Jxu9j19Fy9ZK7HemiHMxVDFl3gFGZmQp3OoArw8+5uHGxPK82PNcXpy4gz1VlSTP69IQ== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -8967,12 +9012,12 @@ quote-unquote@^1.0.0: integrity sha1-Z6mncUjv/q+BpNQoQEpxC6qsigs= raw-body@^2.2.0: - version "2.4.3" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c" - integrity sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g== + version "2.5.0" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.0.tgz#865890d9435243e9fe6141feb4decf929a6e1525" + integrity sha512-XpyZ6O7PVu3ItMQl0LslfsRoKxMOxi3SzDkrOtxMES5AqLFpYjQCryxI4LGygUN2jL+RgFsPkMPPlG7cg/47+A== dependencies: bytes "3.1.2" - http-errors "1.8.1" + http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" @@ -9020,7 +9065,7 @@ read-installed@~4.0.3: optionalDependencies: graceful-fs "^4.1.2" -read-package-json-fast@^2.0.1: +read-package-json-fast@^2.0.1, read-package-json-fast@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== @@ -9545,7 +9590,7 @@ side-channel@^1.0.3, side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -9830,10 +9875,10 @@ standard-version@^9, standard-version@^9.3.2: stringify-package "^1.0.1" yargs "^16.0.0" -"statuses@>= 1.5.0 < 2": - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== streamroller@^3.0.2: version "3.0.2" @@ -10067,7 +10112,7 @@ tar@^4.4.12: safe-buffer "^5.2.1" yallist "^3.1.1" -tar@^6.0.2, tar@^6.1.0, tar@^6.1.2: +tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: version "6.1.11" resolved "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== @@ -10429,7 +10474,7 @@ typescript-json-schema@^0.53.0: typescript "~4.5.0" yargs "^17.1.1" -typescript@^3.9.5, typescript@^3.9.7, typescript@~3.9.10: +typescript@^3.9.10, typescript@^3.9.5, typescript@^3.9.7, typescript@~3.9.10: version "3.9.10" resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== @@ -10659,7 +10704,7 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vm2@^3.9.3: +vm2@^3.9.8: version "3.9.8" resolved "https://registry.npmjs.org/vm2/-/vm2-3.9.8.tgz#e99c000db042735cd2f94d8db6c42163a17be04e" integrity sha512-/1PYg/BwdKzMPo8maOZ0heT7DLI0DAFTm7YQaz/Lim9oIaFZsJs3EdtalvXuBfZwczNwsYhju75NW4d6E+4q+w== @@ -10796,7 +10841,7 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wide-align@^1.1.0, wide-align@^1.1.2: +wide-align@^1.1.0, wide-align@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== From 0e9a15177ddda20e17c27e9df8a4939eb0b5f915 Mon Sep 17 00:00:00 2001 From: epolon Date: Wed, 23 Feb 2022 20:41:34 +0200 Subject: [PATCH 61/63] fix attributions --- packages/aws-cdk/THIRD_PARTY_LICENSES | 14 +++++++------- packages/aws-cdk/package.json | 8 +++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES index f02e8576f3d4b..f36cbfb82a1b9 100644 --- a/packages/aws-cdk/THIRD_PARTY_LICENSES +++ b/packages/aws-cdk/THIRD_PARTY_LICENSES @@ -357,7 +357,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- -** aws-sdk@2.1074.0 - https://www.npmjs.com/package/aws-sdk/v/2.1074.0 | Apache-2.0 +** aws-sdk@2.1079.0 - https://www.npmjs.com/package/aws-sdk/v/2.1079.0 | Apache-2.0 AWS SDK for JavaScript Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -1182,10 +1182,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- -** depd@1.1.2 - https://www.npmjs.com/package/depd/v/1.1.2 | MIT +** depd@2.0.0 - https://www.npmjs.com/package/depd/v/2.0.0 | MIT (The MIT License) -Copyright (c) 2014-2017 Douglas Christopher Wilson +Copyright (c) 2014-2018 Douglas Christopher Wilson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -1227,7 +1227,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------- -** statuses@1.5.0 - https://www.npmjs.com/package/statuses/v/1.5.0 | MIT +** statuses@2.0.1 - https://www.npmjs.com/package/statuses/v/2.0.1 | MIT The MIT License (MIT) @@ -1281,7 +1281,7 @@ SOFTWARE. ---------------- -** http-errors@1.8.1 - https://www.npmjs.com/package/http-errors/v/1.8.1 | MIT +** http-errors@2.0.0 - https://www.npmjs.com/package/http-errors/v/2.0.0 | MIT The MIT License (MIT) @@ -1388,7 +1388,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------- -** raw-body@2.4.3 - https://www.npmjs.com/package/raw-body/v/2.4.3 | MIT +** raw-body@2.5.0 - https://www.npmjs.com/package/raw-body/v/2.5.0 | MIT The MIT License (MIT) Copyright (c) 2013-2014 Jonathan Ong @@ -1678,7 +1678,7 @@ THE SOFTWARE. ---------------- -** degenerator@3.0.1 - https://www.npmjs.com/package/degenerator/v/3.0.1 | MIT +** degenerator@3.0.2 - https://www.npmjs.com/package/degenerator/v/3.0.2 | MIT ---------------- diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 7247c28e3262b..3705c63337e58 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -29,9 +29,11 @@ }, "cdk-package": { "bundle": { - "externals": [ - "fsevents:optional" - ], + "externals": { + "optionalDependencies": [ + "fsevents" + ] + }, "resources": { "../../node_modules/vm2/lib/bridge.js": "lib/bridge.js", "../../node_modules/vm2/lib/setup-sandbox.js": "lib/setup-sandbox.js" From 6df4268c539008d31155a2ce4585d8ac7fbf7d64 Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 24 Feb 2022 00:08:21 +0200 Subject: [PATCH 62/63] fix externals --- tools/@aws-cdk/node-bundle/src/api/bundle.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/@aws-cdk/node-bundle/src/api/bundle.ts b/tools/@aws-cdk/node-bundle/src/api/bundle.ts index 6778d0a9f252d..c438e059a8cf8 100644 --- a/tools/@aws-cdk/node-bundle/src/api/bundle.ts +++ b/tools/@aws-cdk/node-bundle/src/api/bundle.ts @@ -454,12 +454,14 @@ export class Bundle { // external dependencies should be specified as runtime dependencies for (const external of this.externals.dependencies ?? []) { const version = this.findExternalDependencyVersion(external); + manifest.dependencies = manifest.dependencies ?? {}; manifest.dependencies[external] = version; } // external dependencies should be specified as optional dependencies for (const external of this.externals.optionalDependencies ?? []) { const version = this.findExternalDependencyVersion(external); + manifest.optionalDependencies = manifest.optionalDependencies ?? {}; manifest.optionalDependencies[external] = version; } From 2e50f7fc87791e1f06f53cf87b3989ec8ff07fce Mon Sep 17 00:00:00 2001 From: epolon Date: Thu, 24 Feb 2022 01:19:57 +0200 Subject: [PATCH 63/63] external usage disclaimer --- tools/@aws-cdk/node-bundle/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/@aws-cdk/node-bundle/README.md b/tools/@aws-cdk/node-bundle/README.md index 36fb025900c23..c598805270eea 100644 --- a/tools/@aws-cdk/node-bundle/README.md +++ b/tools/@aws-cdk/node-bundle/README.md @@ -1,5 +1,8 @@ # node-bundle +> **NOTE:** This tool should only be used on packages in this repository, +> and is not intended for external usage. + Create bundled packages with minimal dependencies and appropriate license attributions. ## Why