Skip to content

Commit c2bf1d0

Browse files
committed
refactor(toolkit): move deployment apis
1 parent b5cb910 commit c2bf1d0

File tree

96 files changed

+1106
-1129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1106
-1129
lines changed

.projenrc.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,11 @@ tmpToolkitHelpers.eslint?.addOverride({
786786

787787
tmpToolkitHelpers.gitignore.addPatterns('test/**/*.map');
788788

789+
tmpToolkitHelpers.npmignore?.addPatterns(
790+
'!lib/api/bootstrap/bootstrap-template.yaml',
791+
);
792+
tmpToolkitHelpers.postCompileTask.exec('mkdir -p ./lib/api/bootstrap/ && cp ../../aws-cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/');
793+
789794
//////////////////////////////////////////////////////////////////////
790795

791796
const cli = configureProject(

packages/@aws-cdk/tmp-toolkit-helpers/.npmignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/tmp-toolkit-helpers/.projen/tasks.json

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import type * as cxapi from '@aws-cdk/cx-api';
33
import type { BootstrapEnvironmentOptions, BootstrappingParameters } from './bootstrap-props';
44
import { BootstrapStack, bootstrapVersionFromTemplate } from './deploy-bootstrap';
55
import { legacyBootstrapTemplate } from './legacy-template';
6-
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
7-
import { IO, type IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
86
import { bundledPackageRootDir, loadStructuredFile, serializeStructure } from '../../util';
97
import type { SDK, SdkProvider } from '../aws-auth';
108
import type { SuccessfulDeployStackResult } from '../deployments';
9+
import { IO, type IoHelper } from '../io/private';
1110
import { Mode } from '../plugin';
11+
import { ToolkitError } from '../toolkit-error';
1212
import { DEFAULT_TOOLKIT_STACK_NAME } from '../toolkit-info';
1313

1414
export type BootstrapSource = { source: 'legacy' } | { source: 'default' } | { source: 'custom'; templateFile: string };

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import {
1111
BOOTSTRAP_VERSION_RESOURCE,
1212
DEFAULT_BOOTSTRAP_VARIANT,
1313
} from './bootstrap-props';
14-
import { IO, type IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
1514
import type { SDK, SdkProvider } from '../aws-auth';
1615
import type { SuccessfulDeployStackResult } from '../deployments';
1716
import { assertIsSuccessfulDeployStackResult } from '../deployments';
1817
import { deployStack } from '../deployments/deploy-stack';
1918
import { NoBootstrapStackEnvironmentResources } from '../environment';
19+
import { IO, type IoHelper } from '../io/private';
2020
import { Mode } from '../plugin';
2121
import { DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo } from '../toolkit-info';
2222

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export * from './bootstrap-environment';
2+
export * from './bootstrap-props';
3+
4+
// testing exports
5+
export { legacyBootstrapTemplate } from './legacy-template';

packages/aws-cdk/lib/api/cloudformation/evaluate-cloudformation-template.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/api/cloudformation/evaluate-cloudformation-template.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { CloudFormationStackArtifact } from '@aws-cdk/cx-api';
22
import type { Export, ListExportsCommandOutput, StackResourceSummary } from '@aws-sdk/client-cloudformation';
33
import type { SDK } from '../aws-auth';
4+
import { ToolkitError } from '../toolkit-error';
45
import type { NestedStackTemplates } from './nested-stack-helpers';
56
import type { Template } from './stack-helpers';
6-
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
7-
import { resourceMetadata } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/resource-metadata';
8-
import type { ResourceMetadata } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/resource-metadata';
7+
import type { ResourceMetadata } from '../resource-metadata';
8+
import { resourceMetadata } from '../resource-metadata';
99

1010
export interface ListStackResources {
1111
listStackResources(): Promise<StackResourceSummary[]>;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
export * from './nested-stack-templates';
1+
export * from './evaluate-cloudformation-template';
2+
export * from './template-body-parameter';
3+
export * from './nested-stack-helpers';
24
export * from './stack-helpers';

0 commit comments

Comments
 (0)