@aws-cdk/toolkit-lib 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["shared-public.ts", "../../../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/diff.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/hotswap.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts", "../../../tmp-toolkit-helpers/src/api/require-approval.ts"],
4
- "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/api';\n", "/**\n * Which stacks should be selected from a cloud assembly\n */\nexport enum StackSelectionStrategy {\n /**\n * Returns all stacks in the app regardless of patterns,\n * including stacks inside nested assemblies.\n */\n ALL_STACKS = 'all-stacks',\n\n /**\n * Returns all stacks in the main (top level) assembly only.\n */\n MAIN_ASSEMBLY = 'main-assembly',\n\n /**\n * If the assembly includes a single stack, returns it.\n * Otherwise throws an exception.\n */\n ONLY_SINGLE = 'only-single',\n\n /**\n * Return stacks matched by patterns.\n * If no stacks are found, execution is halted successfully.\n * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN`\n */\n PATTERN_MATCH = 'pattern-match',\n\n /**\n * Return stacks matched by patterns.\n * Throws an exception if the patterns don't match at least one stack in the assembly.\n */\n PATTERN_MUST_MATCH = 'pattern-must-match',\n\n /**\n * Returns if exactly one stack is matched by the pattern(s).\n * Throws an exception if no stack, or more than exactly one stack are matched.\n */\n PATTERN_MUST_MATCH_SINGLE = 'pattern-must-match-single',\n}\n\n/**\n * When selecting stacks, what other stacks to include because of dependencies\n */\nexport enum ExpandStackSelection {\n /**\n * Don't select any extra stacks\n */\n NONE = 'none',\n\n /**\n * Include stacks that this stack depends on\n */\n UPSTREAM = 'upstream',\n\n /**\n * Include stacks that depend on this stack\n */\n DOWNSTREAM = 'downstream',\n\n /**\n * @TODO\n * Include both directions.\n * I.e. stacks that this stack depends on, and stacks that depend on this stack.\n */\n // FULL = 'full',\n}\n\n/**\n * A specification of which stacks should be selected\n */\nexport interface StackSelector {\n /**\n * The behavior if if no selectors are provided.\n */\n strategy: StackSelectionStrategy;\n\n /**\n * A list of patterns to match the stack hierarchical ids\n * Only used with `PATTERN_*` selection strategies.\n */\n patterns?: string[];\n\n /**\n * Expand the selection to upstream/downstream stacks.\n * @default ExpandStackSelection.None only select the specified/matched stacks\n */\n expand?: ExpandStackSelection;\n\n /**\n * By default, we throw an exception if the assembly contains no stacks.\n * Set to `false`, to halt execution for empty assemblies without error.\n *\n * Note that actions can still throw if a stack selection result is empty,\n * but the assembly contains stacks in principle.\n *\n * @default true\n */\n failOnEmpty?: boolean;\n}\n", "/**\n * Different types of permission related changes in a diff\n */\nexport enum PermissionChangeType {\n /**\n * No permission changes\n */\n NONE = 'none',\n\n /**\n * Permissions are broadening\n */\n BROADENING = 'broadening',\n\n /**\n * Permissions are changed but not broadening\n */\n NON_BROADENING = 'non-broadening',\n}\n", "import type { PropertyDifference, Resource } from '@aws-cdk/cloudformation-diff';\nimport type * as cxapi from '@aws-cdk/cx-api';\nimport type { Duration } from './types';\nimport type { ResourceMetadata } from '../../resource-metadata/resource-metadata';\n\n/**\n * A resource affected by a change\n */\nexport interface AffectedResource {\n /**\n * The logical ID of the affected resource in the template\n */\n readonly logicalId: string;\n /**\n * The CloudFormation type of the resource\n * This could be a custom type.\n */\n readonly resourceType: string;\n /**\n * The friendly description of the affected resource\n */\n readonly description?: string;\n /**\n * The physical name of the resource when deployed.\n *\n * A physical name is not always available, e.g. new resources will not have one until after the deployment\n */\n readonly physicalName?: string;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\n/**\n * Represents a change in a resource\n */\nexport interface ResourceChange {\n /**\n * The logical ID of the resource which is being changed\n */\n readonly logicalId: string;\n /**\n * The value the resource is being updated from\n */\n readonly oldValue: Resource;\n /**\n * The value the resource is being updated to\n */\n readonly newValue: Resource;\n /**\n * The changes made to the resource properties\n */\n readonly propertyUpdates: Record<string, PropertyDifference<unknown>>;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\n/**\n * A change that can be hotswapped\n */\nexport interface HotswappableChange {\n /**\n * The resource change that is causing the hotswap.\n */\n readonly cause: ResourceChange;\n /**\n * A list of resources that are being hotswapped as part of the change\n */\n readonly resources: AffectedResource[];\n}\n\nexport enum NonHotswappableReason {\n /**\n * Tags are not hotswappable\n */\n TAGS = 'tags',\n /**\n * Changed resource properties are not hotswappable on this resource type\n */\n PROPERTIES = 'properties',\n /**\n * A stack output has changed\n */\n OUTPUT = 'output',\n /**\n * A dependant resource is not hotswappable\n */\n DEPENDENCY_UNSUPPORTED = 'dependency-unsupported',\n /**\n * The resource type is not hotswappable\n */\n RESOURCE_UNSUPPORTED = 'resource-unsupported',\n /**\n * The resource is created in the deployment\n */\n RESOURCE_CREATION = 'resource-creation',\n /**\n * The resource is removed in the deployment\n */\n RESOURCE_DELETION = 'resource-deletion',\n /**\n * The resource identified by the logical id has its type changed\n */\n RESOURCE_TYPE_CHANGED = 'resource-type-changed',\n /**\n * The nested stack is created in the deployment\n */\n NESTED_STACK_CREATION = 'nested-stack-creation',\n}\n\nexport interface RejectionSubject {\n /**\n * The type of the rejection subject, e.g. Resource or Output\n */\n readonly type: string;\n\n /**\n * The logical ID of the change that is not hotswappable\n */\n readonly logicalId: string;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\nexport interface ResourceSubject extends RejectionSubject {\n /**\n * A rejected resource\n */\n readonly type: 'Resource';\n /**\n * The type of the rejected resource\n */\n readonly resourceType: string;\n /**\n * The list of properties that are cause for the rejection\n */\n readonly rejectedProperties?: string[];\n}\n\nexport interface OutputSubject extends RejectionSubject {\n /**\n * A rejected output\n */\n readonly type: 'Output';\n}\n\n/**\n * A change that can not be hotswapped\n */\nexport interface NonHotswappableChange {\n /**\n * The subject of the change that was rejected\n */\n readonly subject: ResourceSubject | OutputSubject;\n /**\n * Why was this change was deemed non-hotswappable\n */\n readonly reason: NonHotswappableReason;\n /**\n * Tells the user exactly why this change was deemed non-hotswappable and what its logical ID is.\n * If not specified, `displayReason` default to state that the properties listed in `rejectedChanges` are not hotswappable.\n */\n readonly description: string;\n}\n\nexport interface HotswapDeploymentAttempt {\n /**\n * The stack that's currently being deployed\n */\n readonly stack: cxapi.CloudFormationStackArtifact;\n\n /**\n * The mode the hotswap deployment was initiated with.\n */\n readonly mode: 'hotswap-only' | 'fall-back';\n}\n\n/**\n * Information about a hotswap deployment\n */\nexport interface HotswapDeploymentDetails {\n /**\n * The stack that's currently being deployed\n */\n readonly stack: cxapi.CloudFormationStackArtifact;\n\n /**\n * The mode the hotswap deployment was initiated with.\n */\n readonly mode: 'hotswap-only' | 'fall-back';\n /**\n * The changes that were deemed hotswappable\n */\n readonly hotswappableChanges: HotswappableChange[];\n /**\n * The changes that were deemed not hotswappable\n */\n readonly nonHotswappableChanges: NonHotswappableChange[];\n}\n\n/**\n * The result of an attempted hotswap deployment\n */\nexport interface HotswapResult extends Duration, HotswapDeploymentDetails {\n /**\n * Whether hotswapping happened or not.\n *\n * `false` indicates that the deployment could not be hotswapped and full deployment may be attempted as fallback.\n */\n readonly hotswapped: boolean;\n}\n", "import type * as cxapi from '@aws-cdk/cx-api';\n\nconst TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): ToolkitError {\n return new ToolkitError(message, 'toolkit', error);\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n /**\n * Denotes the source of the error as the toolkit.\n */\n public readonly source: 'toolkit' | 'user';\n\n /**\n * The specific original cause of the error, if available\n */\n public readonly cause?: unknown;\n\n constructor(message: string, type: string = 'toolkit', cause?: unknown) {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n this.source = 'toolkit';\n this.cause = cause;\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error causes by cloud assembly synthesis\n *\n * This includes errors thrown during app execution, as well as failing annotations.\n */\nexport class AssemblyError extends ToolkitError {\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): AssemblyError {\n return new AssemblyError(message, undefined, error);\n }\n\n /**\n * An AssemblyError with a list of stacks as cause\n */\n public static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError {\n return new AssemblyError(message, stacks);\n }\n\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n /**\n * The stacks that caused the error, if available\n *\n * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.\n * Absence indicates synthesis didn't fully complete.\n */\n public readonly stacks?: cxapi.CloudFormationStackArtifact[];\n\n private constructor(message: string, stacks?: cxapi.CloudFormationStackArtifact[], cause?: unknown) {\n super(message, 'assembly', cause);\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n this.stacks = stacks;\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n", "/**\n * @deprecated\n */\nexport enum RequireApproval {\n /**\n * Never require any security approvals\n */\n NEVER = 'never',\n /**\n * Any security changes require an approval\n */\n ANY_CHANGE = 'any-change',\n /**\n * Require approval only for changes that are access broadening\n */\n BROADENING = 'broadening',\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AI,eAAc,SAAS,MAAM;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA,EAKgB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQT;AAAA,EAER,YAAY,SAAiB,QAA8C,OAAiB;AAClG,UAAM,SAAS,YAAY,KAAK;AAChC,WAAO,eAAe,MAAM,eAAc,SAAS;AACnD,WAAO,eAAe,MAAM,uBAAuB,EAAE,OAAO,KAAK,CAAC;AAClE,SAAK,SAAS;AAAA,EAChB;AACF;AAKO,IAAM,uBAAN,MAAM,8BAA6B,aAAa;AAAA;AAAA;AAAA;AAAA,EAIrC,SAAS;AAAA,EAEzB,YAAY,SAAiB;AAC3B,UAAM,SAAS,kBAAkB;AACjC,WAAO,eAAe,MAAM,sBAAqB,SAAS;AAC1D,WAAO,eAAe,MAAM,+BAA+B,EAAE,OAAO,KAAK,CAAC;AAAA,EAC5E;AACF;;;AC5IO,IAAK,kBAAL,kBAAKC,qBAAL;AAIL,EAAAA,iBAAA,WAAQ;AAIR,EAAAA,iBAAA,gBAAa;AAIb,EAAAA,iBAAA,gBAAa;AAZH,SAAAA;AAAA,GAAA;",
6
- "names": ["StackSelectionStrategy", "ExpandStackSelection", "PermissionChangeType", "NonHotswappableReason", "RequireApproval"]
3
+ "sources": ["shared-public.ts", "../../../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts", "../../../tmp-toolkit-helpers/src/api/diff/diff-formatter.ts", "../../../tmp-toolkit-helpers/src/api/io/private/span.ts", "../../../tmp-toolkit-helpers/src/util/archive.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts", "../../../tmp-toolkit-helpers/src/util/types.ts", "../../../tmp-toolkit-helpers/src/util/yaml-cfn.ts", "../../../tmp-toolkit-helpers/src/util/version-range.ts", "../../../tmp-toolkit-helpers/src/api/io/private/level-priority.ts", "../../../tmp-toolkit-helpers/src/api/io/private/message-maker.ts", "../../../tmp-toolkit-helpers/src/api/io/private/messages.ts", "../../../tmp-toolkit-helpers/src/api/io/private/io-default-messages.ts", "../../../tmp-toolkit-helpers/src/api/require-approval.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/diff.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/hotswap.ts", "../../../tmp-toolkit-helpers/src/api/resource-import/importer.ts"],
4
+ "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/api';\n", "/**\n * Which stacks should be selected from a cloud assembly\n */\nexport enum StackSelectionStrategy {\n /**\n * Returns all stacks in the app regardless of patterns,\n * including stacks inside nested assemblies.\n */\n ALL_STACKS = 'all-stacks',\n\n /**\n * Returns all stacks in the main (top level) assembly only.\n */\n MAIN_ASSEMBLY = 'main-assembly',\n\n /**\n * If the assembly includes a single stack, returns it.\n * Otherwise throws an exception.\n */\n ONLY_SINGLE = 'only-single',\n\n /**\n * Return stacks matched by patterns.\n * If no stacks are found, execution is halted successfully.\n * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN`\n */\n PATTERN_MATCH = 'pattern-match',\n\n /**\n * Return stacks matched by patterns.\n * Throws an exception if the patterns don't match at least one stack in the assembly.\n */\n PATTERN_MUST_MATCH = 'pattern-must-match',\n\n /**\n * Returns if exactly one stack is matched by the pattern(s).\n * Throws an exception if no stack, or more than exactly one stack are matched.\n */\n PATTERN_MUST_MATCH_SINGLE = 'pattern-must-match-single',\n}\n\n/**\n * When selecting stacks, what other stacks to include because of dependencies\n */\nexport enum ExpandStackSelection {\n /**\n * Don't select any extra stacks\n */\n NONE = 'none',\n\n /**\n * Include stacks that this stack depends on\n */\n UPSTREAM = 'upstream',\n\n /**\n * Include stacks that depend on this stack\n */\n DOWNSTREAM = 'downstream',\n\n /**\n * @TODO\n * Include both directions.\n * I.e. stacks that this stack depends on, and stacks that depend on this stack.\n */\n // FULL = 'full',\n}\n\n/**\n * A specification of which stacks should be selected\n */\nexport interface StackSelector {\n /**\n * The behavior if if no selectors are provided.\n */\n strategy: StackSelectionStrategy;\n\n /**\n * A list of patterns to match the stack hierarchical ids\n * Only used with `PATTERN_*` selection strategies.\n */\n patterns?: string[];\n\n /**\n * Expand the selection to upstream/downstream stacks.\n * @default ExpandStackSelection.None only select the specified/matched stacks\n */\n expand?: ExpandStackSelection;\n\n /**\n * By default, we throw an exception if the assembly contains no stacks.\n * Set to `false`, to halt execution for empty assemblies without error.\n *\n * Note that actions can still throw if a stack selection result is empty,\n * but the assembly contains stacks in principle.\n *\n * @default true\n */\n failOnEmpty?: boolean;\n}\n", "import { format } from 'node:util';\nimport { Writable } from 'stream';\nimport * as cxschema from '@aws-cdk/cloud-assembly-schema';\nimport {\n type DescribeChangeSetOutput,\n type TemplateDiff,\n fullDiff,\n formatSecurityChanges,\n formatDifferences,\n mangleLikeCloudFormation,\n} from '@aws-cdk/cloudformation-diff';\nimport type * as cxapi from '@aws-cdk/cx-api';\nimport * as chalk from 'chalk';\n\nimport type { NestedStackTemplates } from '../cloudformation/nested-stack-templates';\nimport type { IoHelper } from '../io/private';\nimport { IoDefaultMessages } from '../io/private';\nimport { RequireApproval } from '../require-approval';\nimport { ToolkitError } from '../toolkit-error';\n\n/*\n * Custom writable stream that collects text into a string buffer.\n * Used on classes that take in and directly write to a stream, but\n * we intend to capture the output rather than print.\n */\nclass StringWriteStream extends Writable {\n private buffer: string[] = [];\n\n constructor() {\n super();\n }\n\n _write(chunk: any, _encoding: string, callback: (error?: Error | null) => void): void {\n this.buffer.push(chunk.toString());\n callback();\n }\n\n toString(): string {\n return this.buffer.join('');\n }\n}\n\n/**\n * Output of formatSecurityDiff\n */\ninterface FormatSecurityDiffOutput {\n /**\n * Complete formatted security diff, if it is prompt-worthy\n */\n readonly formattedDiff?: string;\n}\n\n/**\n * Output of formatStackDiff\n */\ninterface FormatStackDiffOutput {\n /**\n * Number of stacks with diff changes\n */\n readonly numStacksWithChanges: number;\n\n /**\n * Complete formatted diff\n */\n readonly formattedDiff: string;\n}\n\n/**\n * Props for the Diff Formatter\n */\ninterface DiffFormatterProps {\n /**\n * Helper for the IoHost class\n */\n readonly ioHelper: IoHelper;\n\n /**\n * The old/current state of the stack.\n */\n readonly oldTemplate: any;\n\n /**\n * The new/target state of the stack.\n */\n readonly newTemplate: cxapi.CloudFormationStackArtifact;\n}\n\n/**\n * Properties specific to formatting the security diff\n */\ninterface FormatSecurityDiffOptions {\n /**\n * The approval level of the security diff\n */\n readonly requireApproval: RequireApproval;\n\n /**\n * The name of the Stack.\n */\n readonly stackName?: string;\n\n /**\n * The changeSet for the Stack.\n *\n * @default undefined\n */\n readonly changeSet?: DescribeChangeSetOutput;\n}\n\n/**\n * PRoperties specific to formatting the stack diff\n */\ninterface FormatStackDiffOptions {\n /**\n * do not filter out AWS::CDK::Metadata or Rules\n *\n * @default false\n */\n readonly strict?: boolean;\n\n /**\n * lines of context to use in arbitrary JSON diff\n *\n * @default 3\n */\n readonly context?: number;\n\n /**\n * silences \\'There were no differences\\' messages\n *\n * @default false\n */\n readonly quiet?: boolean;\n\n /**\n * The name of the stack\n */\n readonly stackName?: string;\n\n /**\n * @default undefined\n */\n readonly changeSet?: DescribeChangeSetOutput;\n\n /**\n * @default false\n */\n readonly isImport?: boolean;\n\n /**\n * @default undefined\n */\n readonly nestedStackTemplates?: { [nestedStackLogicalId: string]: NestedStackTemplates };\n}\n\ninterface ReusableStackDiffOptions extends Omit<FormatStackDiffOptions, 'stackName' | 'nestedStackTemplates'> {\n readonly ioDefaultHelper: IoDefaultMessages;\n}\n\n/**\n * Class for formatting the diff output\n */\nexport class DiffFormatter {\n private readonly ioHelper: IoHelper;\n private readonly oldTemplate: any;\n private readonly newTemplate: cxapi.CloudFormationStackArtifact;\n\n constructor(props: DiffFormatterProps) {\n this.ioHelper = props.ioHelper;\n this.oldTemplate = props.oldTemplate;\n this.newTemplate = props.newTemplate;\n }\n\n /**\n * Format the stack diff\n */\n public formatStackDiff(options: FormatStackDiffOptions): FormatStackDiffOutput {\n const ioDefaultHelper = new IoDefaultMessages(this.ioHelper);\n return this.formatStackDiffHelper(\n this.oldTemplate,\n options.stackName,\n options.nestedStackTemplates,\n {\n ...options,\n ioDefaultHelper,\n },\n );\n }\n\n private formatStackDiffHelper(\n oldTemplate: any,\n stackName: string | undefined,\n nestedStackTemplates: { [nestedStackLogicalId: string]: NestedStackTemplates } | undefined,\n options: ReusableStackDiffOptions,\n ) {\n let diff = fullDiff(oldTemplate, this.newTemplate.template, options.changeSet, options.isImport);\n\n // The stack diff is formatted via `Formatter`, which takes in a stream\n // and sends its output directly to that stream. To faciliate use of the\n // global CliIoHost, we create our own stream to capture the output of\n // `Formatter` and return the output as a string for the consumer of\n // `formatStackDiff` to decide what to do with it.\n const stream = new StringWriteStream();\n\n let numStacksWithChanges = 0;\n let formattedDiff = '';\n let filteredChangesCount = 0;\n try {\n // must output the stack name if there are differences, even if quiet\n if (stackName && (!options.quiet || !diff.isEmpty)) {\n stream.write(format(`Stack ${chalk.bold(stackName)}\\n`));\n }\n\n if (!options.quiet && options.isImport) {\n stream.write('Parameters and rules created during migration do not affect resource configuration.\\n');\n }\n\n // detect and filter out mangled characters from the diff\n if (diff.differenceCount && !options.strict) {\n const mangledNewTemplate = JSON.parse(mangleLikeCloudFormation(JSON.stringify(this.newTemplate.template)));\n const mangledDiff = fullDiff(this.oldTemplate, mangledNewTemplate, options.changeSet);\n filteredChangesCount = Math.max(0, diff.differenceCount - mangledDiff.differenceCount);\n if (filteredChangesCount > 0) {\n diff = mangledDiff;\n }\n }\n\n // filter out 'AWS::CDK::Metadata' resources from the template\n // filter out 'CheckBootstrapVersion' rules from the template\n if (!options.strict) {\n obscureDiff(diff);\n }\n\n if (!diff.isEmpty) {\n numStacksWithChanges++;\n\n // formatDifferences updates the stream with the formatted stack diff\n formatDifferences(stream, diff, {\n ...logicalIdMapFromTemplate(this.oldTemplate),\n ...buildLogicalToPathMap(this.newTemplate),\n }, options.context);\n } else if (!options.quiet) {\n stream.write(chalk.green('There were no differences\\n'));\n }\n\n if (filteredChangesCount > 0) {\n stream.write(chalk.yellow(`Omitted ${filteredChangesCount} changes because they are likely mangled non-ASCII characters. Use --strict to print them.\\n`));\n }\n } finally {\n // store the stream containing a formatted stack diff\n formattedDiff = stream.toString();\n stream.end();\n }\n\n for (const nestedStackLogicalId of Object.keys(nestedStackTemplates ?? {})) {\n if (!nestedStackTemplates) {\n break;\n }\n const nestedStack = nestedStackTemplates[nestedStackLogicalId];\n\n (this.newTemplate as any)._template = nestedStack.generatedTemplate;\n const nextDiff = this.formatStackDiffHelper(\n nestedStack.deployedTemplate,\n nestedStack.physicalName ?? nestedStackLogicalId,\n nestedStack.nestedStackTemplates,\n options,\n );\n numStacksWithChanges += nextDiff.numStacksWithChanges;\n formattedDiff += nextDiff.formattedDiff;\n }\n\n return {\n numStacksWithChanges,\n formattedDiff,\n };\n }\n\n /**\n * Format the security diff\n */\n public formatSecurityDiff(options: FormatSecurityDiffOptions): FormatSecurityDiffOutput {\n const ioDefaultHelper = new IoDefaultMessages(this.ioHelper);\n\n const diff = fullDiff(this.oldTemplate, this.newTemplate.template, options.changeSet);\n\n if (diffRequiresApproval(diff, options.requireApproval)) {\n // The security diff is formatted via `Formatter`, which takes in a stream\n // and sends its output directly to that stream. To faciliate use of the\n // global CliIoHost, we create our own stream to capture the output of\n // `Formatter` and return the output as a string for the consumer of\n // `formatSecurityDiff` to decide what to do with it.\n const stream = new StringWriteStream();\n\n stream.write(format(`Stack ${chalk.bold(options.stackName)}\\n`));\n\n // eslint-disable-next-line max-len\n ioDefaultHelper.warning(`This deployment will make potentially sensitive changes according to your current security approval level (--require-approval ${options.requireApproval}).`);\n ioDefaultHelper.warning('Please confirm you intend to make the following modifications:\\n');\n try {\n // formatSecurityChanges updates the stream with the formatted security diff\n formatSecurityChanges(stream, diff, buildLogicalToPathMap(this.newTemplate));\n } finally {\n stream.end();\n }\n // store the stream containing a formatted stack diff\n const formattedDiff = stream.toString();\n return { formattedDiff };\n }\n return {};\n }\n}\n\n/**\n * Return whether the diff has security-impacting changes that need confirmation\n *\n * TODO: Filter the security impact determination based off of an enum that allows\n * us to pick minimum \"severities\" to alert on.\n */\nfunction diffRequiresApproval(diff: TemplateDiff, requireApproval: RequireApproval) {\n switch (requireApproval) {\n case RequireApproval.NEVER: return false;\n case RequireApproval.ANY_CHANGE: return diff.permissionsAnyChanges;\n case RequireApproval.BROADENING: return diff.permissionsBroadened;\n default: throw new ToolkitError(`Unrecognized approval level: ${requireApproval}`);\n }\n}\n\nfunction buildLogicalToPathMap(stack: cxapi.CloudFormationStackArtifact) {\n const map: { [id: string]: string } = {};\n for (const md of stack.findMetadataByType(cxschema.ArtifactMetadataEntryType.LOGICAL_ID)) {\n map[md.data as string] = md.path;\n }\n return map;\n}\n\nfunction logicalIdMapFromTemplate(template: any) {\n const ret: Record<string, string> = {};\n\n for (const [logicalId, resource] of Object.entries(template.Resources ?? {})) {\n const path = (resource as any)?.Metadata?.['aws:cdk:path'];\n if (path) {\n ret[logicalId] = path;\n }\n }\n return ret;\n}\n\n/**\n * Remove any template elements that we don't want to show users.\n * This is currently:\n * - AWS::CDK::Metadata resource\n * - CheckBootstrapVersion Rule\n */\nfunction obscureDiff(diff: TemplateDiff) {\n if (diff.unknown) {\n // see https://github.com/aws/aws-cdk/issues/17942\n diff.unknown = diff.unknown.filter(change => {\n if (!change) {\n return true;\n }\n if (change.newValue?.CheckBootstrapVersion) {\n return false;\n }\n if (change.oldValue?.CheckBootstrapVersion) {\n return false;\n }\n return true;\n });\n }\n\n if (diff.resources) {\n diff.resources = diff.resources.filter(change => {\n if (!change) {\n return true;\n }\n if (change.newResourceType === 'AWS::CDK::Metadata') {\n return false;\n }\n if (change.oldResourceType === 'AWS::CDK::Metadata') {\n return false;\n }\n return true;\n });\n }\n}\n", "import * as util from 'node:util';\nimport * as uuid from 'uuid';\nimport type { ActionLessMessage, IoHelper } from './io-helper';\nimport type { IoMessageMaker } from './message-maker';\nimport { formatTime } from '../../../util';\nimport type { Duration } from '../payloads/types';\n\nexport interface SpanEnd {\n readonly duration: number;\n}\n\n/**\n * Describes a specific span\n *\n * A span definition is a pair of `IoMessageMaker`s to create a start and end message of the span respectively.\n * It also has a display name, that is used for auto-generated message text when they are not provided.\n */\nexport interface SpanDefinition<S extends object, E extends SpanEnd> {\n readonly name: string;\n readonly start: IoMessageMaker<S>;\n readonly end: IoMessageMaker<E>;\n}\n\n/**\n * Used in conditional types to check if a type (e.g. after omitting fields) is an empty object\n * This is needed because counter-intuitive neither `object` nor `{}` represent that.\n */\ntype EmptyObject = {\n [index: string | number | symbol]: never;\n}\n\n/**\n * Helper type to force a parameter to be not present of the computed type is an empty object\n */\ntype VoidWhenEmpty<T> = T extends EmptyObject ? void : T\n\n/**\n * Helper type to force a parameter to be an empty object if the computed type is an empty object\n * This is weird, but some computed types (e.g. using `Omit`) don't end up enforcing this.\n */\ntype ForceEmpty<T> = T extends EmptyObject ? EmptyObject : T\n\n/**\n * Make some properties optional\n */\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\n/**\n * Ending the span returns the observed duration\n */\ninterface ElapsedTime {\n readonly asMs: number;\n readonly asSec: number;\n}\n\n/**\n * A message span that can be ended and read times from\n */\nexport interface IMessageSpan<E extends SpanEnd> {\n /**\n * Get the time elapsed since the start\n */\n elapsedTime(): Promise<ElapsedTime>;\n /**\n * Sends a simple, generic message with the current timing\n * For more complex intermediate messages, get the `elapsedTime` and use `notify`\n */\n timing(maker: IoMessageMaker<Duration>, message?: string): Promise<ElapsedTime>;\n /**\n * Sends an arbitrary intermediate message as part of the span\n */\n notify(message: ActionLessMessage<unknown>): Promise<void>;\n /**\n * End the span with a payload\n */\n end(payload: VoidWhenEmpty<Omit<E, keyof SpanEnd>>): Promise<ElapsedTime>;\n /**\n * End the span with a payload, overwriting\n */\n end(payload: VoidWhenEmpty<Optional<E, keyof SpanEnd>>): Promise<ElapsedTime>;\n /**\n * End the span with a message and payload\n */\n end(message: string, payload: ForceEmpty<Optional<E, keyof SpanEnd>>): Promise<ElapsedTime>;\n}\n\n/**\n * Helper class to make spans around blocks of work\n *\n * Blocks are enclosed by a start and end message.\n * All messages of the span share a unique id.\n * The end message contains the time passed between start and end.\n */\nexport class SpanMaker<S extends object, E extends SpanEnd> {\n private readonly definition: SpanDefinition<S, E>;\n private readonly ioHelper: IoHelper;\n\n public constructor(ioHelper: IoHelper, definition: SpanDefinition<S, E>) {\n this.definition = definition;\n this.ioHelper = ioHelper;\n }\n\n /**\n * Starts the span and initially notifies the IoHost\n * @returns a message span\n */\n public async begin(payload: VoidWhenEmpty<S>): Promise<IMessageSpan<E>>;\n public async begin(message: string, payload: S): Promise<IMessageSpan<E>>;\n public async begin(a: any, b?: S): Promise<IMessageSpan<E>> {\n const spanId = uuid.v4();\n const startTime = new Date().getTime();\n\n const notify = (msg: ActionLessMessage<unknown>): Promise<void> => {\n return this.ioHelper.notify(withSpanId(spanId, msg));\n };\n\n const startInput = parseArgs<S>(a, b);\n const startMsg = startInput.message ?? `Starting ${this.definition.name} ...`;\n const startPayload = startInput.payload;\n\n await notify(this.definition.start.msg(\n startMsg,\n startPayload,\n ));\n\n const timingMsgTemplate = '\\n\u2728 %s time: %ds\\n';\n const time = () => {\n const elapsedTime = new Date().getTime() - startTime;\n return {\n asMs: elapsedTime,\n asSec: formatTime(elapsedTime),\n };\n };\n\n return {\n elapsedTime: async (): Promise<ElapsedTime> => {\n return time();\n },\n\n notify: async(msg: ActionLessMessage<unknown>): Promise<void> => {\n await notify(msg);\n },\n\n timing: async(maker: IoMessageMaker<Duration>, message?: string): Promise<ElapsedTime> => {\n const duration = time();\n const timingMsg = message ? message : util.format(timingMsgTemplate, this.definition.name, duration.asSec);\n await notify(maker.msg(timingMsg, {\n duration: duration.asMs,\n }));\n return duration;\n },\n\n end: async (x: any, y?: ForceEmpty<Optional<E, keyof SpanEnd>>): Promise<ElapsedTime> => {\n const duration = time();\n\n const endInput = parseArgs<ForceEmpty<Optional<E, keyof SpanEnd>>>(x, y);\n const endMsg = endInput.message ?? util.format(timingMsgTemplate, this.definition.name, duration.asSec);\n const endPayload = endInput.payload;\n\n await notify(this.definition.end.msg(\n endMsg, {\n duration: duration.asMs,\n ...endPayload,\n } as E));\n\n return duration;\n },\n };\n }\n}\n\nfunction parseArgs<S extends object>(first: any, second?: S): { message: string | undefined; payload: S } {\n const firstIsMessage = typeof first === 'string';\n\n // When the first argument is a string or we have a second argument, then the first arg is the message\n const message = (firstIsMessage || second) ? first : undefined;\n\n // When the first argument is a string or we have a second argument,\n // then the second arg is the payload, otherwise the first arg is the payload\n const payload = (firstIsMessage || second) ? second : first;\n\n return {\n message,\n payload,\n };\n}\n\nfunction withSpanId(span: string, message: ActionLessMessage<unknown>): ActionLessMessage<unknown> {\n return {\n ...message,\n span,\n };\n}\n", "import { error } from 'console';\nimport { createWriteStream, promises as fs } from 'fs';\nimport * as path from 'path';\nimport * as glob from 'glob';\nimport { formatErrorMessage } from './format-error';\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nconst archiver = require('archiver');\n\n// Adapted from cdk-assets\nexport async function zipDirectory(directory: string, outputFile: string): Promise<void> {\n // We write to a temporary file and rename at the last moment. This is so that if we are\n // interrupted during this process, we don't leave a half-finished file in the target location.\n const temporaryOutputFile = `${outputFile}.${randomString()}._tmp`;\n await writeZipFile(directory, temporaryOutputFile);\n await moveIntoPlace(temporaryOutputFile, outputFile);\n}\n\nfunction writeZipFile(directory: string, outputFile: string): Promise<void> {\n return new Promise(async (ok, fail) => {\n // The below options are needed to support following symlinks when building zip files:\n // - nodir: This will prevent symlinks themselves from being copied into the zip.\n // - follow: This will follow symlinks and copy the files within.\n const globOptions = {\n dot: true,\n nodir: true,\n follow: true,\n cwd: directory,\n };\n const files = glob.sync('**', globOptions); // The output here is already sorted\n\n const output = createWriteStream(outputFile);\n\n const archive = archiver('zip');\n archive.on('warning', fail);\n archive.on('error', fail);\n\n // archive has been finalized and the output file descriptor has closed, resolve promise\n // this has to be done before calling `finalize` since the events may fire immediately after.\n // see https://www.npmjs.com/package/archiver\n output.once('close', ok);\n\n archive.pipe(output);\n\n // Append files serially to ensure file order\n for (const file of files) {\n const fullPath = path.resolve(directory, file);\n // Exactly 2 promises\n // eslint-disable-next-line @cdklabs/promiseall-no-unbounded-parallelism\n const [data, stat] = await Promise.all([fs.readFile(fullPath), fs.stat(fullPath)]);\n archive.append(data, {\n name: file,\n mode: stat.mode,\n });\n }\n\n await archive.finalize();\n });\n}\n\n/**\n * Rename the file to the target location, taking into account:\n *\n * - That we may see EPERM on Windows while an Antivirus scanner still has the\n * file open, so retry a couple of times.\n * - This same function may be called in parallel and be interrupted at any point.\n */\nasync function moveIntoPlace(source: string, target: string) {\n let delay = 100;\n let attempts = 5;\n while (true) {\n try {\n // 'rename' is guaranteed to overwrite an existing target, as long as it is a file (not a directory)\n await fs.rename(source, target);\n return;\n } catch (e: any) {\n if (e.code !== 'EPERM' || attempts-- <= 0) {\n throw e;\n }\n error(formatErrorMessage(e));\n await sleep(Math.floor(Math.random() * delay));\n delay *= 2;\n }\n }\n}\n\nfunction sleep(ms: number) {\n return new Promise(ok => setTimeout(ok, ms));\n}\n\nfunction randomString() {\n return Math.random().toString(36).replace(/[^a-z0-9]+/g, '');\n}\n", "import type * as cxapi from '@aws-cdk/cx-api';\n\nconst TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): ToolkitError {\n return new ToolkitError(message, 'toolkit', error);\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n /**\n * Denotes the source of the error as the toolkit.\n */\n public readonly source: 'toolkit' | 'user';\n\n /**\n * The specific original cause of the error, if available\n */\n public readonly cause?: unknown;\n\n constructor(message: string, type: string = 'toolkit', cause?: unknown) {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n this.source = 'toolkit';\n this.cause = cause;\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error causes by cloud assembly synthesis\n *\n * This includes errors thrown during app execution, as well as failing annotations.\n */\nexport class AssemblyError extends ToolkitError {\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): AssemblyError {\n return new AssemblyError(message, undefined, error);\n }\n\n /**\n * An AssemblyError with a list of stacks as cause\n */\n public static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError {\n return new AssemblyError(message, stacks);\n }\n\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n /**\n * The stacks that caused the error, if available\n *\n * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.\n * Absence indicates synthesis didn't fully complete.\n */\n public readonly stacks?: cxapi.CloudFormationStackArtifact[];\n\n private constructor(message: string, stacks?: cxapi.CloudFormationStackArtifact[], cause?: unknown) {\n super(message, 'assembly', cause);\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n this.stacks = stacks;\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n", "/**\n * Type of a map mapping strings to some arbitrary type\n *\n * Name is not ideal, but:\n *\n * - Cannot call it Object, that already means something.\n * - Cannot call it Dict or Dictionary, since in other languages\n * those also allow specifying the key type.\n */\nexport type Obj<T> = {[key: string]: T};\n\n/**\n * Return whether the given value is an object\n *\n * Even though arrays technically are objects, we usually want to treat them differently,\n * so we return false in those cases.\n */\nexport function isObject(x: any): x is Obj<any> {\n return x !== null && typeof x === 'object' && !isArray(x);\n}\n\n/**\n * Return whether the given value is an array\n */\nexport const isArray = Array.isArray;\n\n/**\n * Return the value of the first argument if it's not undefined, otherwise the default\n */\nexport function ifDefined<T>(x: T | undefined, def: T): T {\n return typeof x !== 'undefined' ? x : def;\n}\n", "import * as yaml from 'yaml';\nimport type * as yaml_cst from 'yaml/parse-cst';\nimport * as yaml_types from 'yaml/types';\n\n/**\n * Serializes the given data structure into valid YAML.\n *\n * @param obj the data structure to serialize\n * @returns a string containing the YAML representation of {@param obj}\n */\nexport function serialize(obj: any): string {\n const oldFold = yaml_types.strOptions.fold.lineWidth;\n try {\n yaml_types.strOptions.fold.lineWidth = 0;\n return yaml.stringify(obj, { schema: 'yaml-1.1' });\n } finally {\n yaml_types.strOptions.fold.lineWidth = oldFold;\n }\n}\n\n/**\n * Deserialize the YAML into the appropriate data structure.\n *\n * @param str the string containing YAML\n * @returns the data structure the YAML represents\n * (most often in case of CloudFormation, an object)\n */\nexport function deserialize(str: string): any {\n return parseYamlStrWithCfnTags(str);\n}\n\nfunction makeTagForCfnIntrinsic(intrinsicName: string, addFnPrefix: boolean): yaml_types.Schema.CustomTag {\n return {\n identify(value: any) {\n return typeof value === 'string';\n },\n tag: `!${intrinsicName}`,\n resolve: (_doc: yaml.Document, cstNode: yaml_cst.CST.Node) => {\n const ret: any = {};\n ret[addFnPrefix ? `Fn::${intrinsicName}` : intrinsicName] =\n // the +1 is to account for the ! the short form begins with\n parseYamlStrWithCfnTags(cstNode.toString().substring(intrinsicName.length + 1));\n return ret;\n },\n };\n}\n\nconst shortForms: yaml_types.Schema.CustomTag[] = [\n 'Base64', 'Cidr', 'FindInMap', 'GetAZs', 'ImportValue', 'Join', 'Sub',\n 'Select', 'Split', 'Transform', 'And', 'Equals', 'If', 'Not', 'Or', 'GetAtt',\n].map(name => makeTagForCfnIntrinsic(name, true)).concat(\n makeTagForCfnIntrinsic('Ref', false),\n makeTagForCfnIntrinsic('Condition', false),\n);\n\nfunction parseYamlStrWithCfnTags(text: string): any {\n return yaml.parse(text, {\n customTags: shortForms,\n schema: 'core',\n });\n}\n", "import * as semver from 'semver';\nimport { ToolkitError } from '../api/toolkit-error';\n\n// bracket - https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN401\n// pep - https://www.python.org/dev/peps/pep-0440/#version-specifiers\nexport type RangeType = 'bracket' | 'pep'\n\nexport function rangeFromSemver(ver: string, targetType: RangeType) {\n const re = ver.match(/^([^\\d]*)([\\d.]*)$/);\n if (!re || !semver.valid(re[2])) {\n throw new ToolkitError('not a semver or unsupported range syntax');\n }\n const prefixPart = re[1];\n const verPart = re[2];\n\n switch (targetType) {\n case 'bracket':\n switch (prefixPart) {\n case '':\n // if there's no prefix and the remaining is a valid semver, there's no range specified\n return ver;\n case '^':\n return `[${verPart},${semver.major(verPart)+1}.0.0)`;\n default:\n throw new ToolkitError(`unsupported range syntax - ${prefixPart}`);\n }\n case 'pep':\n switch (prefixPart) {\n case '':\n // if there's no prefix and the remaining is a valid semver, there's no range specified\n return `==${ver}`;\n case '^':\n return `>=${verPart},<${semver.major(verPart)+1}.0.0`;\n default:\n throw new ToolkitError(`unsupported range syntax - ${prefixPart}`);\n }\n }\n}\n", "import type { IoMessageLevel } from '../';\n\n/**\n * Keep this list ordered from most to least verbose.\n * Every level \"includes\" all of the levels below it.\n * This is used to compare levels of messages to determine what should be logged.\n */\nconst levels = [\n 'trace',\n 'debug',\n 'info',\n 'warn',\n 'result',\n 'error',\n] as const;\n\n// compare levels helper\n// helper to convert the array into a map with numbers\nconst orderedLevels: Record<typeof levels[number], number> = Object.fromEntries(Object.entries(levels).map(a => a.reverse()));\nfunction compareFn(a: IoMessageLevel, b: IoMessageLevel): number {\n return orderedLevels[a] - orderedLevels[b];\n}\n\n/**\n * Determines if a message is relevant for the given log level.\n *\n * @param msg The message to compare.\n * @param level The level to compare against.\n * @returns true if the message is relevant for the given level.\n */\nexport function isMessageRelevantForLevel(msg: { level: IoMessageLevel}, level: IoMessageLevel): boolean {\n return compareFn(msg.level, level) >= 0;\n}\n\n", "import type { IoMessage, IoMessageCode, IoMessageLevel } from '../io-message';\nimport type { ActionLessMessage, ActionLessRequest } from './io-helper';\n\n/**\n * Information for each IO Message Code.\n */\ninterface CodeInfo {\n /**\n * The message code.\n */\n readonly code: IoMessageCode;\n\n /**\n * A brief description of the meaning of this IO Message.\n */\n readonly description: string;\n\n /**\n * The name of the payload interface, if applicable.\n * Some Io Messages include a payload, with a specific interface. The name of\n * the interface is specified here so that it can be linked with the message\n * when documentation is generated.\n *\n * The interface _must_ be exposed directly from toolkit-lib, so that it will\n * have a documentation page generated (that can be linked to).\n */\n readonly interface?: string;\n}\n\n/**\n * Information for each IO Message\n */\ninterface MessageInfo extends CodeInfo {\n /**\n * The message level\n */\n readonly level: IoMessageLevel;\n}\n\n/**\n * An interface that can produce messages for a specific code.\n */\nexport interface IoMessageMaker<T> extends MessageInfo {\n /**\n * Create a message for this code, with or without payload.\n */\n msg: [T] extends [AbsentData] ? (message: string) => ActionLessMessage<AbsentData> : (message: string, data: T) => ActionLessMessage<T>;\n\n /**\n * Returns whether the given `IoMessage` instance matches the current message definition\n */\n is(x: IoMessage<unknown>): x is IoMessage<T>;\n}\n\n/**\n * Produce an IoMessageMaker for the provided level and code info.\n */\nfunction message<T = AbsentData>(level: IoMessageLevel, details: CodeInfo): IoMessageMaker<T> {\n const maker = (text: string, data: T) => ({\n time: new Date(),\n level,\n code: details.code,\n message: text,\n data,\n } as ActionLessMessage<T>);\n\n return {\n ...details,\n level,\n msg: maker as any,\n is: (m): m is IoMessage<T> => m.code === details.code,\n };\n}\n\n/**\n * A type that is impossible for a user to replicate\n * This is used to ensure that results always have a proper type generic declared.\n */\ndeclare const privateKey: unique symbol;\nexport type ImpossibleType = {\n readonly [privateKey]: typeof privateKey;\n};\n\n// Create `IoMessageMaker`s for a given level and type check that calls with payload are using the correct interface\ntype CodeInfoMaybeInterface<T> = [T] extends [AbsentData] ? Omit<CodeInfo, 'interface'> : Required<CodeInfo>;\n\n/**\n * The type we use to represent an absent data field\n *\n * This is here to make it easy to change between `undefined`, `void`\n * and `never`.\n *\n * Not a lot of difference between `undefined` and `void`, but `void`\n * reads better.\n */\ntype AbsentData = void;\n\nexport const trace = <T = AbsentData>(details: CodeInfoMaybeInterface<T>) => message<T>('trace', details);\nexport const debug = <T = AbsentData>(details: CodeInfoMaybeInterface<T>) => message<T>('debug', details);\nexport const info = <T = AbsentData>(details: CodeInfoMaybeInterface<T>) => message<T>('info', details);\nexport const warn = <T = AbsentData>(details: CodeInfoMaybeInterface<T>) => message<T>('warn', details);\nexport const error = <T = AbsentData>(details: CodeInfoMaybeInterface<T>) => message<T>('error', details);\nexport const result = <T extends object = ImpossibleType>(details: Required<CodeInfo>) => message<T>('result', details);\n\ninterface RequestInfo<U> extends CodeInfo {\n readonly defaultResponse: U;\n}\n\n/**\n * An interface that can produce requests for a specific code.\n */\nexport interface IoRequestMaker<T, U> extends MessageInfo {\n /**\n * Create a message for this code, with or without payload.\n */\n req: [T] extends [AbsentData] ? (message: string) => ActionLessMessage<AbsentData> : (message: string, data: T) => ActionLessRequest<T, U>;\n}\n\n/**\n * Produce an IoRequestMaker for the provided level and request info.\n */\nfunction request<T = AbsentData, U = ImpossibleType>(level: IoMessageLevel, details: RequestInfo<U>): IoRequestMaker<T, U> {\n const maker = (text: string, data: T) => ({\n time: new Date(),\n level,\n code: details.code,\n message: text,\n data,\n defaultResponse: details.defaultResponse,\n } as ActionLessRequest<T, U>);\n\n return {\n ...details,\n level,\n req: maker as any,\n };\n}\n\n/**\n * A request that is a simple yes/no question, with the expectation that 'yes' is the default.\n */\nexport const confirm = <T extends object = ImpossibleType>(details: Required<Omit<RequestInfo<boolean>, 'defaultResponse'>>) => request<T, boolean>('info', {\n ...details,\n defaultResponse: true,\n});\n", "import type * as cxapi from '@aws-cdk/cx-api';\nimport * as make from './message-maker';\nimport type { SpanDefinition } from './span';\nimport type { DiffResult } from '../payloads';\nimport type { BootstrapEnvironmentProgress } from '../payloads/bootstrap-environment-progress';\nimport type { MissingContext, UpdatedContext } from '../payloads/context';\nimport type { BuildAsset, DeployConfirmationRequest, PublishAsset, StackDeployProgress, SuccessfulDeployStackResult } from '../payloads/deploy';\nimport type { StackDestroy, StackDestroyProgress } from '../payloads/destroy';\nimport type { HotswapDeploymentDetails, HotswapDeploymentAttempt, HotswappableChange, HotswapResult } from '../payloads/hotswap';\nimport type { StackDetailsPayload } from '../payloads/list';\nimport type { CloudWatchLogEvent, CloudWatchLogMonitorControlEvent } from '../payloads/logs-monitor';\nimport type { StackRollbackProgress } from '../payloads/rollback';\nimport type { SdkTrace } from '../payloads/sdk-trace';\nimport type { StackActivity, StackMonitoringControlEvent } from '../payloads/stack-activity';\nimport type { StackSelectionDetails } from '../payloads/synth';\nimport type { AssemblyData, ConfirmationRequest, ContextProviderMessageSource, Duration, ErrorPayload, StackAndAssemblyData } from '../payloads/types';\nimport type { FileWatchEvent, WatchSettings } from '../payloads/watch';\n\n/**\n * We have a rough system by which we assign message codes:\n * - First digit groups messages by action, e.g. synth or deploy\n * - X000-X009 are reserved for timings\n * - X900-X999 are reserved for results\n */\nexport const IO = {\n // Defaults (0000)\n DEFAULT_TOOLKIT_INFO: make.info({\n code: 'CDK_TOOLKIT_I0000',\n description: 'Default info messages emitted from the Toolkit',\n }),\n DEFAULT_TOOLKIT_DEBUG: make.debug({\n code: 'CDK_TOOLKIT_I0000',\n description: 'Default debug messages emitted from the Toolkit',\n }),\n DEFAULT_TOOLKIT_WARN: make.warn({\n code: 'CDK_TOOLKIT_W0000',\n description: 'Default warning messages emitted from the Toolkit',\n }),\n DEFAULT_TOOLKIT_ERROR: make.error({\n code: 'CDK_TOOLKIT_E0000',\n description: 'Default error messages emitted from the Toolkit',\n }),\n DEFAULT_TOOLKIT_TRACE: make.trace({\n code: 'CDK_TOOLKIT_I0000',\n description: 'Default trace messages emitted from the Toolkit',\n }),\n\n // 1: Synth (1xxx)\n CDK_TOOLKIT_I1000: make.info<Duration>({\n code: 'CDK_TOOLKIT_I1000',\n description: 'Provides synthesis times.',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I1001: make.trace<StackSelectionDetails>({\n code: 'CDK_TOOLKIT_I1001',\n description: 'Cloud Assembly synthesis is starting',\n interface: 'StackSelectionDetails',\n }),\n CDK_TOOLKIT_I1901: make.result<StackAndAssemblyData>({\n code: 'CDK_TOOLKIT_I1901',\n description: 'Provides stack data',\n interface: 'StackAndAssemblyData',\n }),\n CDK_TOOLKIT_I1902: make.result<AssemblyData>({\n code: 'CDK_TOOLKIT_I1902',\n description: 'Successfully deployed stacks',\n interface: 'AssemblyData',\n }),\n\n // 2: List (2xxx)\n CDK_TOOLKIT_I2901: make.result<StackDetailsPayload>({\n code: 'CDK_TOOLKIT_I2901',\n description: 'Provides details on the selected stacks and their dependencies',\n interface: 'StackDetailsPayload',\n }),\n\n // 3: Import & Migrate\n CDK_TOOLKIT_E3900: make.error<ErrorPayload>({\n code: 'CDK_TOOLKIT_E3900',\n description: 'Resource import failed',\n interface: 'ErrorPayload',\n }),\n\n // 4: Diff (4xxx)\n CDK_TOOLKIT_I4000: make.trace<StackSelectionDetails>({\n code: 'CDK_TOOLKIT_I4000',\n description: 'Diff stacks is starting',\n interface: 'StackSelectionDetails',\n }),\n CDK_TOOLKIT_I4001: make.info<DiffResult>({\n code: 'CDK_TOOLKIT_I4001',\n description: 'Output of the diff command',\n interface: 'DiffResult',\n }),\n\n // 5: Deploy & Watch (5xxx)\n CDK_TOOLKIT_I5000: make.info<Duration>({\n code: 'CDK_TOOLKIT_I5000',\n description: 'Provides deployment times',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I5001: make.info<Duration>({\n code: 'CDK_TOOLKIT_I5001',\n description: 'Provides total time in deploy action, including synth and rollback',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I5002: make.info<Duration>({\n code: 'CDK_TOOLKIT_I5002',\n description: 'Provides time for resource migration',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_W5021: make.warn({\n code: 'CDK_TOOLKIT_W5021',\n description: 'Empty non-existent stack, deployment is skipped',\n }),\n CDK_TOOLKIT_W5022: make.warn({\n code: 'CDK_TOOLKIT_W5022',\n description: 'Empty existing stack, stack will be destroyed',\n }),\n CDK_TOOLKIT_I5031: make.info({\n code: 'CDK_TOOLKIT_I5031',\n description: 'Informs about any log groups that are traced as part of the deployment',\n }),\n CDK_TOOLKIT_I5032: make.debug<CloudWatchLogMonitorControlEvent>({\n code: 'CDK_TOOLKIT_I5032',\n description: 'Start monitoring log groups',\n interface: 'CloudWatchLogMonitorControlEvent',\n }),\n CDK_TOOLKIT_I5033: make.info<CloudWatchLogEvent>({\n code: 'CDK_TOOLKIT_I5033',\n description: 'A log event received from Cloud Watch',\n interface: 'CloudWatchLogEvent',\n }),\n CDK_TOOLKIT_I5034: make.debug<CloudWatchLogMonitorControlEvent>({\n code: 'CDK_TOOLKIT_I5034',\n description: 'Stop monitoring log groups',\n interface: 'CloudWatchLogMonitorControlEvent',\n }),\n CDK_TOOLKIT_E5035: make.error<ErrorPayload>({\n code: 'CDK_TOOLKIT_E5035',\n description: 'A log monitoring error',\n interface: 'ErrorPayload',\n }),\n CDK_TOOLKIT_I5050: make.confirm<ConfirmationRequest>({\n code: 'CDK_TOOLKIT_I5050',\n description: 'Confirm rollback during deployment',\n interface: 'ConfirmationRequest',\n }),\n CDK_TOOLKIT_I5060: make.confirm<DeployConfirmationRequest>({\n code: 'CDK_TOOLKIT_I5060',\n description: 'Confirm deploy security sensitive changes',\n interface: 'DeployConfirmationRequest',\n }),\n CDK_TOOLKIT_I5100: make.info<StackDeployProgress>({\n code: 'CDK_TOOLKIT_I5100',\n description: 'Stack deploy progress',\n interface: 'StackDeployProgress',\n }),\n\n // Assets (52xx)\n CDK_TOOLKIT_I5210: make.trace<BuildAsset>({\n code: 'CDK_TOOLKIT_I5210',\n description: 'Started building a specific asset',\n interface: 'BuildAsset',\n }),\n CDK_TOOLKIT_I5211: make.trace<Duration>({\n code: 'CDK_TOOLKIT_I5211',\n description: 'Building the asset has completed',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I5220: make.trace<PublishAsset>({\n code: 'CDK_TOOLKIT_I5220',\n description: 'Started publishing a specific asset',\n interface: 'PublishAsset',\n }),\n CDK_TOOLKIT_I5221: make.trace<Duration>({\n code: 'CDK_TOOLKIT_I5221',\n description: 'Publishing the asset has completed',\n interface: 'Duration',\n }),\n\n // Watch (53xx)\n CDK_TOOLKIT_I5310: make.debug<WatchSettings>({\n code: 'CDK_TOOLKIT_I5310',\n description: 'The computed settings used for file watching',\n interface: 'WatchSettings',\n }),\n CDK_TOOLKIT_I5311: make.info<FileWatchEvent>({\n code: 'CDK_TOOLKIT_I5311',\n description: 'File watching started',\n interface: 'FileWatchEvent',\n }),\n CDK_TOOLKIT_I5312: make.info<FileWatchEvent>({\n code: 'CDK_TOOLKIT_I5312',\n description: 'File event detected, starting deployment',\n interface: 'FileWatchEvent',\n }),\n CDK_TOOLKIT_I5313: make.info<FileWatchEvent>({\n code: 'CDK_TOOLKIT_I5313',\n description: 'File event detected during active deployment, changes are queued',\n interface: 'FileWatchEvent',\n }),\n CDK_TOOLKIT_I5314: make.info({\n code: 'CDK_TOOLKIT_I5314',\n description: 'Initial watch deployment started',\n }),\n CDK_TOOLKIT_I5315: make.info({\n code: 'CDK_TOOLKIT_I5315',\n description: 'Queued watch deployment started',\n }),\n\n // Hotswap (54xx)\n CDK_TOOLKIT_I5400: make.trace<HotswapDeploymentAttempt>({\n code: 'CDK_TOOLKIT_I5400',\n description: 'Attempting a hotswap deployment',\n interface: 'HotswapDeploymentAttempt',\n }),\n CDK_TOOLKIT_I5401: make.trace<HotswapDeploymentDetails>({\n code: 'CDK_TOOLKIT_I5401',\n description: 'Computed details for the hotswap deployment',\n interface: 'HotswapDeploymentDetails',\n }),\n CDK_TOOLKIT_I5402: make.info<HotswappableChange>({\n code: 'CDK_TOOLKIT_I5402',\n description: 'A hotswappable change is processed as part of a hotswap deployment',\n interface: 'HotswappableChange',\n }),\n CDK_TOOLKIT_I5403: make.info<HotswappableChange>({\n code: 'CDK_TOOLKIT_I5403',\n description: 'The hotswappable change has completed processing',\n interface: 'HotswappableChange',\n }),\n CDK_TOOLKIT_I5410: make.info<HotswapResult>({\n code: 'CDK_TOOLKIT_I5410',\n description: 'Hotswap deployment has ended, a full deployment might still follow if needed',\n interface: 'HotswapResult',\n }),\n\n // Stack Monitor (55xx)\n CDK_TOOLKIT_I5501: make.info<StackMonitoringControlEvent>({\n code: 'CDK_TOOLKIT_I5501',\n description: 'Stack Monitoring: Start monitoring of a single stack',\n interface: 'StackMonitoringControlEvent',\n }),\n CDK_TOOLKIT_I5502: make.info<StackActivity>({\n code: 'CDK_TOOLKIT_I5502',\n description: 'Stack Monitoring: Activity event for a single stack',\n interface: 'StackActivity',\n }),\n CDK_TOOLKIT_I5503: make.info<StackMonitoringControlEvent>({\n code: 'CDK_TOOLKIT_I5503',\n description: 'Stack Monitoring: Finished monitoring of a single stack',\n interface: 'StackMonitoringControlEvent',\n }),\n\n // Success (59xx)\n CDK_TOOLKIT_I5900: make.result<SuccessfulDeployStackResult>({\n code: 'CDK_TOOLKIT_I5900',\n description: 'Deployment results on success',\n interface: 'SuccessfulDeployStackResult',\n }),\n CDK_TOOLKIT_I5901: make.info({\n code: 'CDK_TOOLKIT_I5901',\n description: 'Generic deployment success messages',\n }),\n CDK_TOOLKIT_W5400: make.warn({\n code: 'CDK_TOOLKIT_W5400',\n description: 'Hotswap disclosure message',\n }),\n\n // errors\n CDK_TOOLKIT_E5001: make.error({\n code: 'CDK_TOOLKIT_E5001',\n description: 'No stacks found',\n }),\n CDK_TOOLKIT_E5500: make.error<ErrorPayload>({\n code: 'CDK_TOOLKIT_E5500',\n description: 'Stack Monitoring error',\n interface: 'ErrorPayload',\n }),\n\n // 6: Rollback (6xxx)\n CDK_TOOLKIT_I6000: make.info<Duration>({\n code: 'CDK_TOOLKIT_I6000',\n description: 'Provides rollback times',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I6100: make.info<StackRollbackProgress>({\n code: 'CDK_TOOLKIT_I6100',\n description: 'Stack rollback progress',\n interface: 'StackRollbackProgress',\n }),\n\n CDK_TOOLKIT_E6001: make.error({\n code: 'CDK_TOOLKIT_E6001',\n description: 'No stacks found',\n }),\n CDK_TOOLKIT_E6900: make.error<ErrorPayload>({\n code: 'CDK_TOOLKIT_E6900',\n description: 'Rollback failed',\n interface: 'ErrorPayload',\n }),\n\n // 7: Destroy (7xxx)\n CDK_TOOLKIT_I7000: make.info<Duration>({\n code: 'CDK_TOOLKIT_I7000',\n description: 'Provides destroy times',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I7001: make.trace<Duration>({\n code: 'CDK_TOOLKIT_I7001',\n description: 'Provides destroy time for a single stack',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I7010: make.confirm<ConfirmationRequest>({\n code: 'CDK_TOOLKIT_I7010',\n description: 'Confirm destroy stacks',\n interface: 'ConfirmationRequest',\n }),\n CDK_TOOLKIT_I7100: make.info<StackDestroyProgress>({\n code: 'CDK_TOOLKIT_I7100',\n description: 'Stack destroy progress',\n interface: 'StackDestroyProgress',\n }),\n CDK_TOOLKIT_I7101: make.trace<StackDestroy>({\n code: 'CDK_TOOLKIT_I7101',\n description: 'Start stack destroying',\n interface: 'StackDestroy',\n }),\n\n CDK_TOOLKIT_I7900: make.result<cxapi.CloudFormationStackArtifact>({\n code: 'CDK_TOOLKIT_I7900',\n description: 'Stack deletion succeeded',\n interface: 'cxapi.CloudFormationStackArtifact',\n }),\n\n CDK_TOOLKIT_E7010: make.error({\n code: 'CDK_TOOLKIT_E7010',\n description: 'Action was aborted due to negative confirmation of request',\n }),\n CDK_TOOLKIT_E7900: make.error<ErrorPayload>({\n code: 'CDK_TOOLKIT_E7900',\n description: 'Stack deletion failed',\n interface: 'ErrorPayload',\n }),\n\n // 9: Bootstrap (9xxx)\n CDK_TOOLKIT_I9000: make.info<Duration>({\n code: 'CDK_TOOLKIT_I9000',\n description: 'Provides bootstrap times',\n interface: 'Duration',\n }),\n CDK_TOOLKIT_I9100: make.info<BootstrapEnvironmentProgress>({\n code: 'CDK_TOOLKIT_I9100',\n description: 'Bootstrap progress',\n interface: 'BootstrapEnvironmentProgress',\n }),\n\n CDK_TOOLKIT_I9900: make.result<{ environment: cxapi.Environment }>({\n code: 'CDK_TOOLKIT_I9900',\n description: 'Bootstrap results on success',\n interface: 'cxapi.Environment',\n }),\n CDK_TOOLKIT_E9900: make.error<ErrorPayload>({\n code: 'CDK_TOOLKIT_E9900',\n description: 'Bootstrap failed',\n interface: 'ErrorPayload',\n }),\n\n // Notices\n CDK_TOOLKIT_I0100: make.info({\n code: 'CDK_TOOLKIT_I0100',\n description: 'Notices decoration (the header or footer of a list of notices)',\n }),\n CDK_TOOLKIT_W0101: make.warn({\n code: 'CDK_TOOLKIT_W0101',\n description: 'A notice that is marked as a warning',\n }),\n CDK_TOOLKIT_E0101: make.error({\n code: 'CDK_TOOLKIT_E0101',\n description: 'A notice that is marked as an error',\n }),\n CDK_TOOLKIT_I0101: make.info({\n code: 'CDK_TOOLKIT_I0101',\n description: 'A notice that is marked as informational',\n }),\n\n // Assembly codes\n DEFAULT_ASSEMBLY_TRACE: make.trace({\n code: 'CDK_ASSEMBLY_I0000',\n description: 'Default trace messages emitted from Cloud Assembly operations',\n }),\n DEFAULT_ASSEMBLY_DEBUG: make.debug({\n code: 'CDK_ASSEMBLY_I0000',\n description: 'Default debug messages emitted from Cloud Assembly operations',\n }),\n DEFAULT_ASSEMBLY_INFO: make.info({\n code: 'CDK_ASSEMBLY_I0000',\n description: 'Default info messages emitted from Cloud Assembly operations',\n }),\n DEFAULT_ASSEMBLY_WARN: make.warn({\n code: 'CDK_ASSEMBLY_W0000',\n description: 'Default warning messages emitted from Cloud Assembly operations',\n }),\n\n CDK_ASSEMBLY_I0010: make.debug({\n code: 'CDK_ASSEMBLY_I0010',\n description: 'Generic environment preparation debug messages',\n }),\n CDK_ASSEMBLY_W0010: make.warn({\n code: 'CDK_ASSEMBLY_W0010',\n description: 'Emitted if the found framework version does not support context overflow',\n }),\n CDK_ASSEMBLY_I0042: make.debug<UpdatedContext>({\n code: 'CDK_ASSEMBLY_I0042',\n description: 'Writing updated context',\n interface: 'UpdatedContext',\n }),\n CDK_ASSEMBLY_I0240: make.debug<MissingContext>({\n code: 'CDK_ASSEMBLY_I0240',\n description: 'Context lookup was stopped as no further progress was made. ',\n interface: 'MissingContext',\n }),\n CDK_ASSEMBLY_I0241: make.debug<MissingContext>({\n code: 'CDK_ASSEMBLY_I0241',\n description: 'Fetching missing context. This is an iterative message that may appear multiple times with different missing keys.',\n interface: 'MissingContext',\n }),\n CDK_ASSEMBLY_I1000: make.debug({\n code: 'CDK_ASSEMBLY_I1000',\n description: 'Cloud assembly output starts',\n }),\n CDK_ASSEMBLY_I1001: make.info({\n code: 'CDK_ASSEMBLY_I1001',\n description: 'Output lines emitted by the cloud assembly to stdout',\n }),\n CDK_ASSEMBLY_E1002: make.error({\n code: 'CDK_ASSEMBLY_E1002',\n description: 'Output lines emitted by the cloud assembly to stderr',\n }),\n CDK_ASSEMBLY_I1003: make.info({\n code: 'CDK_ASSEMBLY_I1003',\n description: 'Cloud assembly output finished',\n }),\n CDK_ASSEMBLY_E1111: make.error<ErrorPayload>({\n code: 'CDK_ASSEMBLY_E1111',\n description: 'Incompatible CDK CLI version. Upgrade needed.',\n interface: 'ErrorPayload',\n }),\n\n CDK_ASSEMBLY_I0150: make.debug<never>({\n code: 'CDK_ASSEMBLY_I0150',\n description: 'Indicates the use of a pre-synthesized cloud assembly directory',\n }),\n\n CDK_ASSEMBLY_I0300: make.info<ContextProviderMessageSource>({\n code: 'CDK_ASSEMBLY_I0300',\n description: 'An info message emitted by a Context Provider',\n interface: 'ContextProviderMessageSource',\n }),\n CDK_ASSEMBLY_I0301: make.debug<ContextProviderMessageSource>({\n code: 'CDK_ASSEMBLY_I0301',\n description: 'A debug message emitted by a Context Provider',\n interface: 'ContextProviderMessageSource',\n }),\n\n // Assembly Annotations\n CDK_ASSEMBLY_I9999: make.info<cxapi.SynthesisMessage>({\n code: 'CDK_ASSEMBLY_I9999',\n description: 'Annotations emitted by the cloud assembly',\n interface: 'cxapi.SynthesisMessage',\n }),\n CDK_ASSEMBLY_W9999: make.warn<cxapi.SynthesisMessage>({\n code: 'CDK_ASSEMBLY_W9999',\n description: 'Warnings emitted by the cloud assembly',\n interface: 'cxapi.SynthesisMessage',\n }),\n CDK_ASSEMBLY_E9999: make.error<cxapi.SynthesisMessage>({\n code: 'CDK_ASSEMBLY_E9999',\n description: 'Errors emitted by the cloud assembly',\n interface: 'cxapi.SynthesisMessage',\n }),\n\n // SDK codes\n CDK_SDK_I0000: make.trace({\n code: 'CDK_SDK_I0000',\n description: 'An SDK message.',\n }),\n CDK_SDK_I0100: make.trace<SdkTrace>({\n code: 'CDK_SDK_I0100',\n description: 'An SDK trace. SDK traces are emitted as traces to the IoHost, but contain the original SDK logging level.',\n interface: 'SdkTrace',\n }),\n};\n\n//////////////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Payload type of the end message must extend Duration\n */\nexport const SPAN = {\n SYNTH_ASSEMBLY: {\n name: 'Synthesis',\n start: IO.CDK_TOOLKIT_I1001,\n end: IO.CDK_TOOLKIT_I1000,\n },\n DEPLOY_STACK: {\n name: 'Deployment',\n start: IO.CDK_TOOLKIT_I5100,\n end: IO.CDK_TOOLKIT_I5001,\n },\n ROLLBACK_STACK: {\n name: 'Rollback',\n start: IO.CDK_TOOLKIT_I6100,\n end: IO.CDK_TOOLKIT_I6000,\n },\n DIFF_STACK: {\n name: 'Diff',\n start: IO.CDK_TOOLKIT_I4000,\n end: IO.CDK_TOOLKIT_I4001,\n },\n DESTROY_STACK: {\n name: 'Destroy',\n start: IO.CDK_TOOLKIT_I7100,\n end: IO.CDK_TOOLKIT_I7001,\n },\n DESTROY_ACTION: {\n name: 'Destroy',\n start: IO.CDK_TOOLKIT_I7101,\n end: IO.CDK_TOOLKIT_I7000,\n },\n BOOTSTRAP_SINGLE: {\n name: 'Bootstrap',\n start: IO.CDK_TOOLKIT_I9100,\n end: IO.CDK_TOOLKIT_I9000,\n },\n BUILD_ASSET: {\n name: 'Build Asset',\n start: IO.CDK_TOOLKIT_I5210,\n end: IO.CDK_TOOLKIT_I5211,\n },\n PUBLISH_ASSET: {\n name: 'Publish Asset',\n start: IO.CDK_TOOLKIT_I5220,\n end: IO.CDK_TOOLKIT_I5221,\n },\n HOTSWAP: {\n name: 'hotswap-deployment',\n start: IO.CDK_TOOLKIT_I5400,\n end: IO.CDK_TOOLKIT_I5410,\n },\n} satisfies Record<string, SpanDefinition<any, any>>;\n", "import * as util from 'util';\nimport type { ActionLessMessage, ActionLessRequest, IoHelper } from './io-helper';\nimport type { IoMessageMaker } from './message-maker';\nimport { IO } from './messages';\n\n/**\n * Helper class to emit standard log messages to an IoHost\n *\n * It wraps an `IoHelper`, and adds convenience methods to emit default messages\n * for the various log levels.\n */\nexport class IoDefaultMessages {\n constructor(private readonly ioHelper: IoHelper) {\n }\n\n public notify(msg: ActionLessMessage<unknown>): Promise<void> {\n return this.ioHelper.notify(msg);\n }\n\n public requestResponse<T, U>(msg: ActionLessRequest<T, U>): Promise<U> {\n return this.ioHelper.requestResponse(msg);\n }\n\n public error(input: string, ...args: unknown[]) {\n this.emitMessage(IO.DEFAULT_TOOLKIT_ERROR, input, ...args);\n }\n\n public warn(input: string, ...args: unknown[]) {\n this.emitMessage(IO.DEFAULT_TOOLKIT_WARN, input, ...args);\n }\n\n public warning(input: string, ...args: unknown[]) {\n this.emitMessage(IO.DEFAULT_TOOLKIT_WARN, input, ...args);\n }\n\n public info(input: string, ...args: unknown[]) {\n this.emitMessage(IO.DEFAULT_TOOLKIT_INFO, input, ...args);\n }\n\n public debug(input: string, ...args: unknown[]) {\n this.emitMessage(IO.DEFAULT_TOOLKIT_DEBUG, input, ...args);\n }\n\n public trace(input: string, ...args: unknown[]) {\n this.emitMessage(IO.DEFAULT_TOOLKIT_TRACE, input, ...args);\n }\n\n public result(input: string, ...args: unknown[]) {\n const message = args.length > 0 ? util.format(input, ...args) : input;\n // This is just the default \"info\" message but with a level of \"result\"\n void this.ioHelper.notify({\n time: new Date(),\n code: IO.DEFAULT_TOOLKIT_INFO.code,\n level: 'result',\n message,\n data: undefined,\n });\n }\n\n private emitMessage(maker: IoMessageMaker<void>, input: string, ...args: unknown[]) {\n // Format message if args are provided\n const message = args.length > 0 ? util.format(input, ...args) : input;\n void this.ioHelper.notify(maker.msg(message));\n }\n}\n", "/**\n * @deprecated\n */\nexport enum RequireApproval {\n /**\n * Never require any security approvals\n */\n NEVER = 'never',\n /**\n * Any security changes require an approval\n */\n ANY_CHANGE = 'any-change',\n /**\n * Require approval only for changes that are access broadening\n */\n BROADENING = 'broadening',\n}\n", "import type { Duration } from './types';\n\n/**\n * Different types of permission related changes in a diff\n */\nexport enum PermissionChangeType {\n /**\n * No permission changes\n */\n NONE = 'none',\n\n /**\n * Permissions are broadening\n */\n BROADENING = 'broadening',\n\n /**\n * Permissions are changed but not broadening\n */\n NON_BROADENING = 'non-broadening',\n}\n\n/**\n * Output of the diff command\n */\nexport interface DiffResult extends Duration {\n /**\n * Stack diff formatted as a string\n */\n readonly formattedStackDiff: string;\n\n /**\n * Security diff formatted as a string\n */\n readonly formattedSecurityDiff: string;\n}\n", "import type { PropertyDifference, Resource } from '@aws-cdk/cloudformation-diff';\nimport type * as cxapi from '@aws-cdk/cx-api';\nimport type { Duration } from './types';\nimport type { ResourceMetadata } from '../../resource-metadata/resource-metadata';\n\n/**\n * A resource affected by a change\n */\nexport interface AffectedResource {\n /**\n * The logical ID of the affected resource in the template\n */\n readonly logicalId: string;\n /**\n * The CloudFormation type of the resource\n * This could be a custom type.\n */\n readonly resourceType: string;\n /**\n * The friendly description of the affected resource\n */\n readonly description?: string;\n /**\n * The physical name of the resource when deployed.\n *\n * A physical name is not always available, e.g. new resources will not have one until after the deployment\n */\n readonly physicalName?: string;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\n/**\n * Represents a change in a resource\n */\nexport interface ResourceChange {\n /**\n * The logical ID of the resource which is being changed\n */\n readonly logicalId: string;\n /**\n * The value the resource is being updated from\n */\n readonly oldValue: Resource;\n /**\n * The value the resource is being updated to\n */\n readonly newValue: Resource;\n /**\n * The changes made to the resource properties\n */\n readonly propertyUpdates: Record<string, PropertyDifference<unknown>>;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\n/**\n * A change that can be hotswapped\n */\nexport interface HotswappableChange {\n /**\n * The resource change that is causing the hotswap.\n */\n readonly cause: ResourceChange;\n /**\n * A list of resources that are being hotswapped as part of the change\n */\n readonly resources: AffectedResource[];\n}\n\nexport enum NonHotswappableReason {\n /**\n * Tags are not hotswappable\n */\n TAGS = 'tags',\n /**\n * Changed resource properties are not hotswappable on this resource type\n */\n PROPERTIES = 'properties',\n /**\n * A stack output has changed\n */\n OUTPUT = 'output',\n /**\n * A dependant resource is not hotswappable\n */\n DEPENDENCY_UNSUPPORTED = 'dependency-unsupported',\n /**\n * The resource type is not hotswappable\n */\n RESOURCE_UNSUPPORTED = 'resource-unsupported',\n /**\n * The resource is created in the deployment\n */\n RESOURCE_CREATION = 'resource-creation',\n /**\n * The resource is removed in the deployment\n */\n RESOURCE_DELETION = 'resource-deletion',\n /**\n * The resource identified by the logical id has its type changed\n */\n RESOURCE_TYPE_CHANGED = 'resource-type-changed',\n /**\n * The nested stack is created in the deployment\n */\n NESTED_STACK_CREATION = 'nested-stack-creation',\n}\n\nexport interface RejectionSubject {\n /**\n * The type of the rejection subject, e.g. Resource or Output\n */\n readonly type: string;\n\n /**\n * The logical ID of the change that is not hotswappable\n */\n readonly logicalId: string;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\nexport interface ResourceSubject extends RejectionSubject {\n /**\n * A rejected resource\n */\n readonly type: 'Resource';\n /**\n * The type of the rejected resource\n */\n readonly resourceType: string;\n /**\n * The list of properties that are cause for the rejection\n */\n readonly rejectedProperties?: string[];\n}\n\nexport interface OutputSubject extends RejectionSubject {\n /**\n * A rejected output\n */\n readonly type: 'Output';\n}\n\n/**\n * A change that can not be hotswapped\n */\nexport interface NonHotswappableChange {\n /**\n * The subject of the change that was rejected\n */\n readonly subject: ResourceSubject | OutputSubject;\n /**\n * Why was this change was deemed non-hotswappable\n */\n readonly reason: NonHotswappableReason;\n /**\n * Tells the user exactly why this change was deemed non-hotswappable and what its logical ID is.\n * If not specified, `displayReason` default to state that the properties listed in `rejectedChanges` are not hotswappable.\n */\n readonly description: string;\n}\n\nexport interface HotswapDeploymentAttempt {\n /**\n * The stack that's currently being deployed\n */\n readonly stack: cxapi.CloudFormationStackArtifact;\n\n /**\n * The mode the hotswap deployment was initiated with.\n */\n readonly mode: 'hotswap-only' | 'fall-back';\n}\n\n/**\n * Information about a hotswap deployment\n */\nexport interface HotswapDeploymentDetails {\n /**\n * The stack that's currently being deployed\n */\n readonly stack: cxapi.CloudFormationStackArtifact;\n\n /**\n * The mode the hotswap deployment was initiated with.\n */\n readonly mode: 'hotswap-only' | 'fall-back';\n /**\n * The changes that were deemed hotswappable\n */\n readonly hotswappableChanges: HotswappableChange[];\n /**\n * The changes that were deemed not hotswappable\n */\n readonly nonHotswappableChanges: NonHotswappableChange[];\n}\n\n/**\n * The result of an attempted hotswap deployment\n */\nexport interface HotswapResult extends Duration, HotswapDeploymentDetails {\n /**\n * Whether hotswapping happened or not.\n *\n * `false` indicates that the deployment could not be hotswapped and full deployment may be attempted as fallback.\n */\n readonly hotswapped: boolean;\n}\n", "import type { CloudFormationStackArtifact } from '@aws-cdk/cx-api';\n\n/**\n * Removes CDKMetadata and Outputs in the template so that only resources for importing are left.\n * @returns template with import resources only\n */\nexport function removeNonImportResources(stack: CloudFormationStackArtifact) {\n const template = stack.template;\n delete template.Resources.CDKMetadata;\n delete template.Outputs;\n return template;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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A,oBAAiB;AAdP,SAAAA;AAAA,GAAA;;;AC2EL,IAAK,wBAAL,kBAAKC,2BAAL;AAIL,EAAAA,uBAAA,UAAO;AAIP,EAAAA,uBAAA,gBAAa;AAIb,EAAAA,uBAAA,YAAS;AAIT,EAAAA,uBAAA,4BAAyB;AAIzB,EAAAA,uBAAA,0BAAuB;AAIvB,EAAAA,uBAAA,uBAAoB;AAIpB,EAAAA,uBAAA,uBAAoB;AAIpB,EAAAA,uBAAA,2BAAwB;AAIxB,EAAAA,uBAAA,2BAAwB;AApCd,SAAAA;AAAA,GAAA;;;AC1EL,SAAS,yBAAyB,OAAoC;AAC3E,QAAM,WAAW,MAAM;AACvB,SAAO,SAAS,UAAU;AAC1B,SAAO,SAAS;AAChB,SAAO;AACT;",
6
+ "names": ["StackSelectionStrategy", "ExpandStackSelection", "message", "error", "message", "RequireApproval", "PermissionChangeType", "NonHotswappableReason"]
7
7
  }
package/lib/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @module toolkit-lib
3
3
  */
4
+ import './private/dispose-polyfill';
4
5
  export * from './toolkit';
5
6
  export * from './actions';
6
7
  export * from './api/aws-auth';
package/lib/index.js CHANGED
@@ -17,6 +17,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
17
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
+ // Polyfills first
21
+ require("./private/dispose-polyfill");
20
22
  // The main show
21
23
  __exportStar(require("./toolkit"), exports);
22
24
  __exportStar(require("./actions"), exports);
@@ -25,4 +27,4 @@ __exportStar(require("./api/aws-auth"), exports);
25
27
  __exportStar(require("./api/cloud-assembly"), exports);
26
28
  __exportStar(require("./api/io"), exports);
27
29
  __exportStar(require("./api/shared-public"), exports);
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiL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dC1saWJcbiAqL1xuXG4vLyBQb2x5ZmlsbHMgZmlyc3RcbmltcG9ydCAnLi9wcml2YXRlL2Rpc3Bvc2UtcG9seWZpbGwnO1xuXG4vLyBUaGUgbWFpbiBzaG93XG5leHBvcnQgKiBmcm9tICcuL3Rvb2xraXQnO1xuZXhwb3J0ICogZnJvbSAnLi9hY3Rpb25zJztcblxuLy8gU3VwcG9ydGluZyBhY3RzXG5leHBvcnQgKiBmcm9tICcuL2FwaS9hd3MtYXV0aCc7XG5leHBvcnQgKiBmcm9tICcuL2FwaS9jbG91ZC1hc3NlbWJseSc7XG5leHBvcnQgKiBmcm9tICcuL2FwaS9pbyc7XG5leHBvcnQgKiBmcm9tICcuL2FwaS9zaGFyZWQtcHVibGljJztcbiJdfQ==
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // This file needs to be imported as one of the first files in the library.
4
+ // It polyfills some symbols that the new JavaScript "Disposable" API introduces.
5
+ //
6
+ // See <https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html>
7
+ //
8
+ // In short, the new proposal is a `using`/`await using` statement, which will automatically
9
+ // call methods named `[Symbol.dispose]` and `[Symbol.asyncDispose]` on objects.
10
+ //
11
+ // TypeScript knows about those symbols, and it will downlevel the `using` syntax to
12
+ // plain JavaScript... but it doesn't define the Symbols themselves! They must exist
13
+ // in the environment, or code defining objects using those Symbol names will fail.
14
+ //
15
+ // MDN doesn't even know that Node 22 has them already; for broadest compatibility,
16
+ // we just polyfill them here. Their value doesn't matter, they just need to exist
17
+ // and be unique symbols.
18
+ Symbol.dispose ??= Symbol('Symbol.dispose');
19
+ Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose');
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zZS1wb2x5ZmlsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2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1gIG9uIG9iamVjdHMuXG4vL1xuLy8gVHlwZVNjcmlwdCBrbm93cyBhYm91dCB0aG9zZSBzeW1ib2xzLCBhbmQgaXQgd2lsbCBkb3dubGV2ZWwgdGhlIGB1c2luZ2Agc3ludGF4IHRvXG4vLyBwbGFpbiBKYXZhU2NyaXB0Li4uIGJ1dCBpdCBkb2Vzbid0IGRlZmluZSB0aGUgU3ltYm9scyB0aGVtc2VsdmVzISBUaGV5IG11c3QgZXhpc3Rcbi8vIGluIHRoZSBlbnZpcm9ubWVudCwgb3IgY29kZSBkZWZpbmluZyBvYmplY3RzIHVzaW5nIHRob3NlIFN5bWJvbCBuYW1lcyB3aWxsIGZhaWwuXG4vL1xuLy8gTUROIGRvZXNuJ3QgZXZlbiBrbm93IHRoYXQgTm9kZSAyMiBoYXMgdGhlbSBhbHJlYWR5OyBmb3IgYnJvYWRlc3QgY29tcGF0aWJpbGl0eSxcbi8vIHdlIGp1c3QgcG9seWZpbGwgdGhlbSBoZXJlLiBUaGVpciB2YWx1ZSBkb2Vzbid0IG1hdHRlciwgdGhleSBqdXN0IG5lZWQgdG8gZXhpc3Rcbi8vIGFuZCBiZSB1bmlxdWUgc3ltYm9scy5cbihTeW1ib2wgYXMgYW55KS5kaXNwb3NlID8/PSBTeW1ib2woJ1N5bWJvbC5kaXNwb3NlJyk7XG4oU3ltYm9sIGFzIGFueSkuYXN5bmNEaXNwb3NlID8/PSBTeW1ib2woJ1N5bWJvbC5hc3luY0Rpc3Bvc2UnKTtcbiJdfQ==
@@ -15,4 +15,4 @@ export interface ToolkitServices {
15
15
  * @param cache if the assembly should be cached, default: `true`
16
16
  * @returns the CloudAssembly object
17
17
  */
18
- export declare function assemblyFromSource(assemblySource: ICloudAssemblySource, cache?: boolean): Promise<StackAssembly>;
18
+ export declare function assemblyFromSource(ioHelper: IoHelper, assemblySource: ICloudAssemblySource, cache?: boolean): Promise<StackAssembly>;
@@ -8,13 +8,13 @@ const private_1 = require("../../api/cloud-assembly/private");
8
8
  * @param cache if the assembly should be cached, default: `true`
9
9
  * @returns the CloudAssembly object
10
10
  */
11
- async function assemblyFromSource(assemblySource, cache = true) {
11
+ async function assemblyFromSource(ioHelper, assemblySource, cache = true) {
12
12
  if (assemblySource instanceof private_1.StackAssembly) {
13
13
  return assemblySource;
14
14
  }
15
15
  if (cache) {
16
- return new private_1.StackAssembly(await new private_1.CachedCloudAssemblySource(assemblySource).produce());
16
+ return new private_1.StackAssembly(await new private_1.CachedCloudAssemblySource(assemblySource).produce(), ioHelper);
17
17
  }
18
- return new private_1.StackAssembly(await assemblySource.produce());
18
+ return new private_1.StackAssembly(await assemblySource.produce(), ioHelper);
19
19
  }
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQW9CQSxnREFVQztBQTNCRCw4REFBNEY7QUFXNUY7Ozs7O0dBS0c7QUFDSSxLQUFLLFVBQVUsa0JBQWtCLENBQUMsY0FBb0MsRUFBRSxRQUFpQixJQUFJO0lBQ2xHLElBQUksY0FBYyxZQUFZLHVCQUFhLEVBQUUsQ0FBQztRQUM1QyxPQUFPLGNBQWMsQ0FBQztJQUN4QixDQUFDO0lBRUQsSUFBSSxLQUFLLEVBQUUsQ0FBQztRQUNWLE9BQU8sSUFBSSx1QkFBYSxDQUFDLE1BQU0sSUFBSSxtQ0FBeUIsQ0FBQyxjQUFjLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBQzFGLENBQUM7SUFFRCxPQUFPLElBQUksdUJBQWEsQ0FBQyxNQUFNLGNBQWMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0FBQzNELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbmltcG9ydCB0eXBlIHsgU2RrUHJvdmlkZXIgfSBmcm9tICcuLi8uLi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x5U291cmNlIGluc3RhbmNlb2YgU3RhY2tBc3NlbWJseSkge1xuICAgIHJldHVybiBhc3NlbWJseVNvdXJjZTtcbiAgfVxuXG4gIGlmIChjYWNoZSkge1xuICAgIHJldHVybiBuZXcgU3RhY2tBc3NlbWJseShhd2FpdCBuZXcgQ2FjaGVkQ2xvdWRBc3NlbWJseVNvdXJjZShhc3NlbWJseVNvdXJjZSkucHJvZHVjZSgpLCBpb0hlbHBlcik7XG4gIH1cblxuICByZXR1cm4gbmV3IFN0YWNrQXNzZW1ibHkoYXdhaXQgYXNzZW1ibHlTb3VyY2UucHJvZHVjZSgpLCBpb0hlbHBlcik7XG59XG4iXX0=
@@ -2,6 +2,7 @@ import type { ToolkitServices } from './private';
2
2
  import type { BootstrapEnvironments, BootstrapOptions, BootstrapResult } from '../actions/bootstrap';
3
3
  import { type DeployOptions } from '../actions/deploy';
4
4
  import { type DestroyOptions } from '../actions/destroy';
5
+ import type { DiffOptions } from '../actions/diff';
5
6
  import { type ListOptions } from '../actions/list';
6
7
  import { type RollbackOptions } from '../actions/rollback';
7
8
  import { type SynthOptions } from '../actions/synth';
@@ -81,6 +82,10 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
81
82
  * Synth Action
82
83
  */
83
84
  synth(cx: ICloudAssemblySource, options?: SynthOptions): Promise<ICloudAssemblySource>;
85
+ /**
86
+ * Diff Action
87
+ */
88
+ diff(cx: ICloudAssemblySource, options: DiffOptions): Promise<void>;
84
89
  /**
85
90
  * List Action
86
91
  *