@@ -62,12 +62,12 @@ import * as core from 'aws-cdk-lib/core';
62
62
declare const cdk: Toolkit ;
63
63
64
64
const cx = cdk .fromAssemblyBuilder (async () => {
65
- const app = new core .App ();
65
+ const app = new core .App ();
66
66
67
- // Define your stacks here
68
- new MyStack (app , ' MyStack' );
67
+ // Define your stacks here
68
+ new MyStack (app , ' MyStack' );
69
69
70
- return app .synth ();
70
+ return app .synth ();
71
71
});
72
72
```
73
73
@@ -82,11 +82,11 @@ The following is a basic example that creates a deployment of the `MyStack` stac
82
82
declare const cdk: Toolkit ;
83
83
declare const cx: ICloudAssemblySource ;
84
84
85
- await toolkit .deploy (cloudAssembly , {
86
- stacks: {
87
- strategy: StackSelectionStrategy .PATTERN_MUST_MATCH ,
88
- patterns: [" MyStack" ],
89
- },
85
+ await cdk .deploy (cx , {
86
+ stacks: {
87
+ strategy: StackSelectionStrategy .PATTERN_MUST_MATCH ,
88
+ patterns: [" MyStack" ],
89
+ },
90
90
});
91
91
```
92
92
@@ -231,9 +231,9 @@ The following is an example implementation that simply logs all message objects
231
231
232
232
``` ts
233
233
const toolkit = new toolkitLib .Toolkit ({
234
- ioHost: {
234
+ ioHost: {
235
235
notify : async function (msg ) {
236
- console .log (msg );
236
+ console .log (msg );
237
237
},
238
238
requestResponse : async function (msg ) {
239
239
console .log (msg );
@@ -322,12 +322,12 @@ Alternatively a inline `AssemblyBuilder` function can be used to build a CDK app
322
322
declare const cdk: Toolkit ;
323
323
324
324
const cx = cdk .fromAssemblyBuilder (async () => {
325
- const app = new core .App ();
325
+ const app = new core .App ();
326
326
327
- // Define your stacks here
328
- new MyStack (app , ' MyStack' );
327
+ // Define your stacks here
328
+ new MyStack (app , ' MyStack' );
329
329
330
- return app .synth ();
330
+ return app .synth ();
331
331
});
332
332
```
333
333
@@ -403,7 +403,7 @@ declare const cx: ICloudAssemblySource;
403
403
try {
404
404
// Attempt a CDK Toolkit operation
405
405
const deployment = await cdk .deploy (cloudAssembly , {
406
- stacks: [' MyStack' ]
406
+ stacks: [' MyStack' ]
407
407
});
408
408
409
409
} catch (error ) {
@@ -425,8 +425,8 @@ try {
425
425
console .error (' Generic Toolkit error:' , error .message );
426
426
427
427
} else {
428
- // Handle unexpected errors
429
- console .error (' Unexpected error:' , error );
428
+ // Handle unexpected errors
429
+ console .error (' Unexpected error:' , error );
430
430
}
431
431
}
432
432
```
0 commit comments