@aws-cdk/toolkit-lib 0.1.7 → 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 -2
- package/lib/actions/bootstrap/index.js +13 -6
- 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 +20 -16
- package/lib/actions/diff/index.js +4 -1
- package/lib/actions/diff/private/helpers.d.ts +3 -0
- package/lib/actions/diff/private/helpers.js +89 -1
- package/lib/actions/index.d.ts +1 -0
- package/lib/actions/index.js +2 -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 +50 -40
- package/lib/api/cloud-assembly/private/prepare-source.js +117 -97
- package/lib/api/cloud-assembly/private/source-builder.d.ts +0 -6
- package/lib/api/cloud-assembly/private/source-builder.js +14 -13
- package/lib/api/cloud-assembly/private/stack-assembly.d.ts +3 -3
- package/lib/api/cloud-assembly/private/stack-assembly.js +12 -12
- package/lib/api/shared-private.d.ts +4 -0
- package/lib/api/shared-private.js +11306 -52
- package/lib/api/shared-private.js.map +4 -4
- package/lib/api/shared-public.d.ts +259 -1104
- package/lib/api/shared-public.js +38 -61
- package/lib/api/shared-public.js.map +4 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index_bg.wasm +0 -0
- package/lib/private/dispose-polyfill.d.ts +1 -0
- package/lib/private/dispose-polyfill.js +20 -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 +2 -3
- package/lib/toolkit/private/index.js +4 -4
- package/lib/toolkit/toolkit.d.ts +44 -24
- package/lib/toolkit/toolkit.js +191 -93
- 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 +24 -21
- package/tsconfig.dts.json +9 -0
- package/lib/api/aws-cdk.d.ts +0 -20
- package/lib/api/aws-cdk.js +0 -10917
- package/lib/api/aws-cdk.js.map +0 -7
package/lib/toolkit/toolkit.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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';
|
|
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';
|
|
@@ -15,13 +16,13 @@ export interface ToolkitOptions {
|
|
|
15
16
|
/**
|
|
16
17
|
* The IoHost implementation, handling the inline interactions between the Toolkit and an integration.
|
|
17
18
|
*/
|
|
18
|
-
ioHost?: IIoHost;
|
|
19
|
+
readonly ioHost?: IIoHost;
|
|
19
20
|
/**
|
|
20
21
|
* Allow emojis in messages sent to the IoHost.
|
|
21
22
|
*
|
|
22
23
|
* @default true
|
|
23
24
|
*/
|
|
24
|
-
emojis?: boolean;
|
|
25
|
+
readonly emojis?: boolean;
|
|
25
26
|
/**
|
|
26
27
|
* Whether to allow ANSI colors and formatting in IoHost messages.
|
|
27
28
|
* Setting this value to `false` enforces that no color or style shows up
|
|
@@ -30,28 +31,28 @@ export interface ToolkitOptions {
|
|
|
30
31
|
*
|
|
31
32
|
* @default - detects color from the TTY status of the IoHost
|
|
32
33
|
*/
|
|
33
|
-
color?: boolean;
|
|
34
|
+
readonly color?: boolean;
|
|
34
35
|
/**
|
|
35
36
|
* Configuration options for the SDK.
|
|
36
37
|
*/
|
|
37
|
-
sdkConfig?: SdkConfig;
|
|
38
|
+
readonly sdkConfig?: SdkConfig;
|
|
38
39
|
/**
|
|
39
40
|
* Name of the toolkit stack to be used.
|
|
40
41
|
*
|
|
41
42
|
* @default "CDKToolkit"
|
|
42
43
|
*/
|
|
43
|
-
toolkitStackName?: string;
|
|
44
|
+
readonly toolkitStackName?: string;
|
|
44
45
|
/**
|
|
45
46
|
* Fail Cloud Assemblies
|
|
46
47
|
*
|
|
47
48
|
* @default "error"
|
|
48
49
|
*/
|
|
49
|
-
assemblyFailureAt?: 'error' | 'warn' | 'none';
|
|
50
|
+
readonly assemblyFailureAt?: 'error' | 'warn' | 'none';
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* The AWS CDK Programmatic Toolkit
|
|
53
54
|
*/
|
|
54
|
-
export declare class Toolkit extends CloudAssemblySourceBuilder
|
|
55
|
+
export declare class Toolkit extends CloudAssemblySourceBuilder {
|
|
55
56
|
private readonly props;
|
|
56
57
|
/**
|
|
57
58
|
* The toolkit stack name used for bootstrapping resources.
|
|
@@ -61,18 +62,11 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
61
62
|
* The IoHost of this Toolkit
|
|
62
63
|
*/
|
|
63
64
|
readonly ioHost: IIoHost;
|
|
64
|
-
private _sdkProvider?;
|
|
65
|
-
constructor(props?: ToolkitOptions);
|
|
66
|
-
dispose(): Promise<void>;
|
|
67
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
68
65
|
/**
|
|
69
|
-
*
|
|
66
|
+
* Cache of the internal SDK Provider instance
|
|
70
67
|
*/
|
|
71
|
-
private
|
|
72
|
-
|
|
73
|
-
* Helper to provide the CloudAssemblySourceBuilder with required toolkit services
|
|
74
|
-
*/
|
|
75
|
-
protected sourceBuilderServices(): Promise<ToolkitServices>;
|
|
68
|
+
private sdkProviderCache?;
|
|
69
|
+
constructor(props?: ToolkitOptions);
|
|
76
70
|
/**
|
|
77
71
|
* Bootstrap Action
|
|
78
72
|
*/
|
|
@@ -81,6 +75,10 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
81
75
|
* Synth Action
|
|
82
76
|
*/
|
|
83
77
|
synth(cx: ICloudAssemblySource, options?: SynthOptions): Promise<ICloudAssemblySource>;
|
|
78
|
+
/**
|
|
79
|
+
* Diff Action
|
|
80
|
+
*/
|
|
81
|
+
diff(cx: ICloudAssemblySource, options: DiffOptions): Promise<void>;
|
|
84
82
|
/**
|
|
85
83
|
* List Action
|
|
86
84
|
*
|
|
@@ -92,7 +90,7 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
92
90
|
*
|
|
93
91
|
* Deploys the selected stacks into an AWS account
|
|
94
92
|
*/
|
|
95
|
-
deploy(cx: ICloudAssemblySource, options?: DeployOptions): Promise<
|
|
93
|
+
deploy(cx: ICloudAssemblySource, options?: DeployOptions): Promise<DeployResult>;
|
|
96
94
|
/**
|
|
97
95
|
* Helper to allow deploy being called as part of the watch action.
|
|
98
96
|
*/
|
|
@@ -100,16 +98,18 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
100
98
|
/**
|
|
101
99
|
* Watch Action
|
|
102
100
|
*
|
|
103
|
-
* Continuously observe project files and deploy the selected stacks
|
|
104
|
-
* 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.
|
|
105
105
|
*/
|
|
106
|
-
watch(cx: ICloudAssemblySource, options: WatchOptions): Promise<
|
|
106
|
+
watch(cx: ICloudAssemblySource, options: WatchOptions): Promise<IWatcher>;
|
|
107
107
|
/**
|
|
108
108
|
* Rollback Action
|
|
109
109
|
*
|
|
110
110
|
* Rolls back the selected stacks.
|
|
111
111
|
*/
|
|
112
|
-
rollback(cx: ICloudAssemblySource, options: RollbackOptions): Promise<
|
|
112
|
+
rollback(cx: ICloudAssemblySource, options: RollbackOptions): Promise<RollbackResult>;
|
|
113
113
|
/**
|
|
114
114
|
* Helper to allow rollback being called as part of the deploy or watch action.
|
|
115
115
|
*/
|
|
@@ -119,7 +119,7 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
119
119
|
*
|
|
120
120
|
* Destroys the selected Stacks.
|
|
121
121
|
*/
|
|
122
|
-
destroy(cx: ICloudAssemblySource, options: DestroyOptions): Promise<
|
|
122
|
+
destroy(cx: ICloudAssemblySource, options: DestroyOptions): Promise<DestroyResult>;
|
|
123
123
|
/**
|
|
124
124
|
* Helper to allow destroy being called as part of the deploy action.
|
|
125
125
|
*/
|
|
@@ -134,3 +134,23 @@ export declare class Toolkit extends CloudAssemblySourceBuilder implements Async
|
|
|
134
134
|
private deploymentsForAction;
|
|
135
135
|
private invokeDeployFromWatch;
|
|
136
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
|
+
}
|