Skip to content

Commit 969b10b

Browse files
authored
refactor(toolkit-lib): move payloads out of api (#325)
The message payload interfaces never were an api. They just ended up there by chance. Move them to their own top-level module. This has the side-effect that it will make future diffs slightly nicer. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 78e3133 commit 969b10b

34 files changed

+35
-33
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export * from './io-host';
22
export * from './io-message';
33
export * from './toolkit-action';
4-
export * from './payloads';

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/private/messages.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import type * as cxapi from '@aws-cdk/cx-api';
22
import * as make from './message-maker';
33
import type { SpanDefinition } from './span';
4-
import type { DiffResult } from '../payloads';
5-
import type { BootstrapEnvironmentProgress } from '../payloads/bootstrap-environment-progress';
6-
import type { MissingContext, UpdatedContext } from '../payloads/context';
7-
import type { BuildAsset, DeployConfirmationRequest, PublishAsset, StackDeployProgress, SuccessfulDeployStackResult } from '../payloads/deploy';
8-
import type { StackDestroy, StackDestroyProgress } from '../payloads/destroy';
9-
import type { HotswapDeploymentDetails, HotswapDeploymentAttempt, HotswappableChange, HotswapResult } from '../payloads/hotswap';
10-
import type { StackDetailsPayload } from '../payloads/list';
11-
import type { CloudWatchLogEvent, CloudWatchLogMonitorControlEvent } from '../payloads/logs-monitor';
12-
import type { StackRollbackProgress } from '../payloads/rollback';
13-
import type { SdkTrace } from '../payloads/sdk-trace';
14-
import type { StackActivity, StackMonitoringControlEvent } from '../payloads/stack-activity';
15-
import type { StackSelectionDetails } from '../payloads/synth';
16-
import type { AssemblyData, ConfirmationRequest, ContextProviderMessageSource, Duration, ErrorPayload, StackAndAssemblyData } from '../payloads/types';
17-
import type { FileWatchEvent, WatchSettings } from '../payloads/watch';
4+
import type { DiffResult } from '../../../payloads';
5+
import type { BootstrapEnvironmentProgress } from '../../../payloads/bootstrap-environment-progress';
6+
import type { MissingContext, UpdatedContext } from '../../../payloads/context';
7+
import type { BuildAsset, DeployConfirmationRequest, PublishAsset, StackDeployProgress, SuccessfulDeployStackResult } from '../../../payloads/deploy';
8+
import type { StackDestroy, StackDestroyProgress } from '../../../payloads/destroy';
9+
import type { HotswapDeploymentDetails, HotswapDeploymentAttempt, HotswappableChange, HotswapResult } from '../../../payloads/hotswap';
10+
import type { StackDetailsPayload } from '../../../payloads/list';
11+
import type { CloudWatchLogEvent, CloudWatchLogMonitorControlEvent } from '../../../payloads/logs-monitor';
12+
import type { StackRollbackProgress } from '../../../payloads/rollback';
13+
import type { SdkTrace } from '../../../payloads/sdk-trace';
14+
import type { StackActivity, StackMonitoringControlEvent } from '../../../payloads/stack-activity';
15+
import type { StackSelectionDetails } from '../../../payloads/synth';
16+
import type { AssemblyData, ConfirmationRequest, ContextProviderMessageSource, Duration, ErrorPayload, StackAndAssemblyData } from '../../../payloads/types';
17+
import type { FileWatchEvent, WatchSettings } from '../../../payloads/watch';
1818

1919
/**
2020
* We have a rough system by which we assign message codes:

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/private/span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as util from 'node:util';
22
import * as uuid from 'uuid';
33
import type { ActionLessMessage, IoHelper } from './io-helper';
44
import type { IoMessageMaker } from './message-maker';
5+
import type { Duration } from '../../../payloads/types';
56
import { formatTime } from '../../../util';
6-
import type { Duration } from '../payloads/types';
77

88
export interface SpanEnd {
99
readonly duration: number;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './api';
2+
export * from './payloads';
23
export * from './util';

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/bootstrap-environment-progress.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/payloads/bootstrap-environment-progress.ts

File renamed without changes.

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/context.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/payloads/context.ts

File renamed without changes.

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/deploy.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/payloads/deploy.ts

File renamed without changes.

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/destroy.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/payloads/destroy.ts

File renamed without changes.

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/diff.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/payloads/diff.ts

File renamed without changes.

packages/@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/hotswap.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/payloads/hotswap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { PropertyDifference, Resource } from '@aws-cdk/cloudformation-diff';
22
import type * as cxapi from '@aws-cdk/cx-api';
33
import type { Duration } from './types';
4-
import type { ResourceMetadata } from '../../resource-metadata/resource-metadata';
4+
import type { ResourceMetadata } from '../api/resource-metadata/resource-metadata';
55

66
/**
77
* A resource affected by a change

0 commit comments

Comments
 (0)