@aws-cdk/toolkit-lib 0.1.8 → 0.2.0
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.
- package/api-extractor.json +36 -0
- package/build-info.json +2 -2
- package/db.json.gz +0 -0
- package/lib/actions/bootstrap/index.d.ts +1 -1
- package/lib/actions/bootstrap/index.js +1 -1
- package/lib/actions/deploy/index.d.ts +1 -21
- package/lib/actions/deploy/index.js +1 -1
- package/lib/actions/deploy/private/deploy-options.d.ts +16 -4
- package/lib/actions/deploy/private/deploy-options.js +1 -1
- package/lib/actions/deploy/private/helpers.d.ts +3 -3
- package/lib/actions/deploy/private/helpers.js +5 -5
- package/lib/actions/destroy/index.d.ts +0 -6
- package/lib/actions/destroy/index.js +1 -1
- package/lib/actions/diff/index.d.ts +1 -1
- package/lib/actions/diff/index.js +1 -1
- package/lib/actions/diff/private/helpers.d.ts +3 -0
- package/lib/actions/diff/private/helpers.js +89 -1
- package/lib/actions/watch/index.d.ts +0 -14
- package/lib/actions/watch/index.js +1 -1
- package/lib/api/cloud-assembly/index.d.ts +1 -1
- package/lib/api/cloud-assembly/index.js +4 -2
- package/lib/api/cloud-assembly/private/context-aware-source.d.ts +1 -1
- package/lib/api/cloud-assembly/private/context-aware-source.js +5 -4
- package/lib/api/cloud-assembly/private/exec.js +5 -4
- package/lib/api/cloud-assembly/private/prepare-source.d.ts +1 -1
- package/lib/api/cloud-assembly/private/prepare-source.js +11 -10
- package/lib/api/cloud-assembly/private/source-builder.d.ts +0 -6
- package/lib/api/cloud-assembly/private/source-builder.js +6 -6
- package/lib/api/cloud-assembly/private/stack-assembly.d.ts +2 -2
- package/lib/api/cloud-assembly/private/stack-assembly.js +10 -10
- package/lib/api/shared-private.d.ts +4 -0
- package/lib/api/shared-private.js +11283 -52
- package/lib/api/shared-private.js.map +4 -4
- package/lib/api/shared-public.d.ts +266 -1386
- package/lib/api/shared-public.js +32 -923
- package/lib/api/shared-public.js.map +4 -4
- package/lib/index_bg.wasm +0 -0
- package/lib/private/util.js +35 -14
- package/lib/private/util.js.map +4 -4
- package/lib/toolkit/index.d.ts +2 -1
- package/lib/toolkit/index.js +3 -2
- package/lib/toolkit/non-interactive-io-host.d.ts +80 -0
- package/lib/toolkit/non-interactive-io-host.js +129 -0
- package/lib/toolkit/private/index.d.ts +1 -2
- package/lib/toolkit/private/index.js +1 -1
- package/lib/toolkit/toolkit.d.ts +39 -24
- package/lib/toolkit/toolkit.js +137 -170
- package/lib/toolkit/types.d.ts +163 -0
- package/lib/toolkit/types.js +3 -0
- package/lib/util/promises.d.ts +12 -0
- package/lib/util/promises.js +17 -0
- package/lib/util/shell-env.d.ts +10 -0
- package/lib/util/shell-env.js +19 -0
- package/package.json +14 -11
- package/tsconfig.dts.json +9 -0
- package/lib/api/aws-cdk.d.ts +0 -20
- package/lib/api/aws-cdk.js +0 -11041
- package/lib/api/aws-cdk.js.map +0 -7
package/lib/toolkit/toolkit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DeployResult, DestroyResult, RollbackResult } from './types';
|
|
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';
|
|
@@ -16,13 +16,13 @@ export interface ToolkitOptions {
|
|
|
16
16
|
/**
|
|
17
17
|
* The IoHost implementation, handling the inline interactions between the Toolkit and an integration.
|
|
18
18
|
*/
|
|
19
|
-
ioHost?: IIoHost;
|
|
19
|
+
readonly ioHost?: IIoHost;
|
|
20
20
|
/**
|
|
21
21
|
* Allow emojis in messages sent to the IoHost.
|
|
22
22
|
*
|
|
23
23
|
* @default true
|
|
24
24
|
*/
|
|
25
|
-
emojis?: boolean;
|
|
25
|
+
readonly emojis?: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Whether to allow ANSI colors and formatting in IoHost messages.
|
|
28
28
|
* Setting this value to `false` enforces that no color or style shows up
|
|
@@ -31,28 +31,28 @@ export interface ToolkitOptions {
|
|
|
31
31
|
*
|
|
32
32
|
* @default - detects color from the TTY status of the IoHost
|
|
33
33
|
*/
|
|
34
|
-
color?: boolean;
|
|
34
|
+
readonly color?: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Configuration options for the SDK.
|
|
37
37
|
*/
|
|
38
|
-
sdkConfig?: SdkConfig;
|
|
38
|
+
readonly sdkConfig?: SdkConfig;
|
|
39
39
|
/**
|
|
40
40
|
* Name of the toolkit stack to be used.
|
|
41
41
|
*
|
|
42
42
|
* @default "CDKToolkit"
|
|
43
43
|
*/
|
|
44
|
-
toolkitStackName?: string;
|
|
44
|
+
readonly toolkitStackName?: string;
|
|
45
45
|
/**
|
|
46
46
|
* Fail Cloud Assemblies
|
|
47
47
|
*
|
|
48
48
|
* @default "error"
|
|
49
49
|
*/
|
|
50
|
-
assemblyFailureAt?: 'error' | 'warn' | 'none';
|
|
50
|
+
readonly assemblyFailureAt?: 'error' | 'warn' | 'none';
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* The AWS CDK Programmatic Toolkit
|
|
54
54
|
*/
|
|
55
|
-
export declare class Toolkit extends CloudAssemblySourceBuilder
|
|
55
|
+
export declare class Toolkit extends CloudAssemblySourceBuilder {
|
|
56
56
|
private readonly props;
|
|
57
57
|
/**
|
|
58
58
|
* The toolkit stack name used for bootstrapping resources.
|
|
@@ -62,18 +62,11 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
62
62
|
* The IoHost of this Toolkit
|
|
63
63
|
*/
|
|
64
64
|
readonly ioHost: IIoHost;
|
|
65
|
-
private _sdkProvider?;
|
|
66
|
-
constructor(props?: ToolkitOptions);
|
|
67
|
-
dispose(): Promise<void>;
|
|
68
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
69
65
|
/**
|
|
70
|
-
*
|
|
66
|
+
* Cache of the internal SDK Provider instance
|
|
71
67
|
*/
|
|
72
|
-
private
|
|
73
|
-
|
|
74
|
-
* Helper to provide the CloudAssemblySourceBuilder with required toolkit services
|
|
75
|
-
*/
|
|
76
|
-
protected sourceBuilderServices(): Promise<ToolkitServices>;
|
|
68
|
+
private sdkProviderCache?;
|
|
69
|
+
constructor(props?: ToolkitOptions);
|
|
77
70
|
/**
|
|
78
71
|
* Bootstrap Action
|
|
79
72
|
*/
|
|
@@ -97,7 +90,7 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
97
90
|
*
|
|
98
91
|
* Deploys the selected stacks into an AWS account
|
|
99
92
|
*/
|
|
100
|
-
deploy(cx: ICloudAssemblySource, options?: DeployOptions): Promise<
|
|
93
|
+
deploy(cx: ICloudAssemblySource, options?: DeployOptions): Promise<DeployResult>;
|
|
101
94
|
/**
|
|
102
95
|
* Helper to allow deploy being called as part of the watch action.
|
|
103
96
|
*/
|
|
@@ -105,16 +98,18 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
105
98
|
/**
|
|
106
99
|
* Watch Action
|
|
107
100
|
*
|
|
108
|
-
* Continuously observe project files and deploy the selected stacks
|
|
109
|
-
* Implies hotswap deployments.
|
|
101
|
+
* Continuously observe project files and deploy the selected stacks
|
|
102
|
+
* automatically when changes are detected. Implies hotswap deployments.
|
|
103
|
+
*
|
|
104
|
+
* This function returns immediately, starting a watcher in the background.
|
|
110
105
|
*/
|
|
111
|
-
watch(cx: ICloudAssemblySource, options: WatchOptions): Promise<
|
|
106
|
+
watch(cx: ICloudAssemblySource, options: WatchOptions): Promise<IWatcher>;
|
|
112
107
|
/**
|
|
113
108
|
* Rollback Action
|
|
114
109
|
*
|
|
115
110
|
* Rolls back the selected stacks.
|
|
116
111
|
*/
|
|
117
|
-
rollback(cx: ICloudAssemblySource, options: RollbackOptions): Promise<
|
|
112
|
+
rollback(cx: ICloudAssemblySource, options: RollbackOptions): Promise<RollbackResult>;
|
|
118
113
|
/**
|
|
119
114
|
* Helper to allow rollback being called as part of the deploy or watch action.
|
|
120
115
|
*/
|
|
@@ -124,7 +119,7 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
124
119
|
*
|
|
125
120
|
* Destroys the selected Stacks.
|
|
126
121
|
*/
|
|
127
|
-
destroy(cx: ICloudAssemblySource, options: DestroyOptions): Promise<
|
|
122
|
+
destroy(cx: ICloudAssemblySource, options: DestroyOptions): Promise<DestroyResult>;
|
|
128
123
|
/**
|
|
129
124
|
* Helper to allow destroy being called as part of the deploy action.
|
|
130
125
|
*/
|
|
@@ -139,3 +134,23 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
139
134
|
private deploymentsForAction;
|
|
140
135
|
private invokeDeployFromWatch;
|
|
141
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* The result of a `cdk.watch()` operation.
|
|
139
|
+
*/
|
|
140
|
+
export interface IWatcher extends AsyncDisposable {
|
|
141
|
+
/**
|
|
142
|
+
* Stop the watcher and wait for the current watch iteration to complete.
|
|
143
|
+
*
|
|
144
|
+
* An alias for `[Symbol.asyncDispose]`, as a more readable alternative for
|
|
145
|
+
* environments that don't support the Disposable APIs yet.
|
|
146
|
+
*/
|
|
147
|
+
dispose(): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Wait for the watcher to stop.
|
|
150
|
+
*
|
|
151
|
+
* The watcher will only stop if `dispose()` or `[Symbol.asyncDispose]()` are called.
|
|
152
|
+
*
|
|
153
|
+
* If neither of those is called, awaiting this promise will wait forever.
|
|
154
|
+
*/
|
|
155
|
+
waitForEnd(): Promise<void>;
|
|
156
|
+
}
|