@iacmp/core 1.1.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/LICENSE +21 -0
- package/dist/constructs/cache.d.ts +31 -0
- package/dist/constructs/cache.d.ts.map +1 -0
- package/dist/constructs/cache.js +31 -0
- package/dist/constructs/cache.js.map +1 -0
- package/dist/constructs/compute.d.ts +62 -0
- package/dist/constructs/compute.d.ts.map +1 -0
- package/dist/constructs/compute.js +57 -0
- package/dist/constructs/compute.js.map +1 -0
- package/dist/constructs/custom.d.ts +32 -0
- package/dist/constructs/custom.d.ts.map +1 -0
- package/dist/constructs/custom.js +18 -0
- package/dist/constructs/custom.js.map +1 -0
- package/dist/constructs/database.d.ts +59 -0
- package/dist/constructs/database.d.ts.map +1 -0
- package/dist/constructs/database.js +49 -0
- package/dist/constructs/database.js.map +1 -0
- package/dist/constructs/events.d.ts +22 -0
- package/dist/constructs/events.d.ts.map +1 -0
- package/dist/constructs/events.js +18 -0
- package/dist/constructs/events.js.map +1 -0
- package/dist/constructs/function.d.ts +46 -0
- package/dist/constructs/function.d.ts.map +1 -0
- package/dist/constructs/function.js +31 -0
- package/dist/constructs/function.js.map +1 -0
- package/dist/constructs/messaging.d.ts +34 -0
- package/dist/constructs/messaging.d.ts.map +1 -0
- package/dist/constructs/messaging.js +29 -0
- package/dist/constructs/messaging.js.map +1 -0
- package/dist/constructs/monitoring.d.ts +59 -0
- package/dist/constructs/monitoring.d.ts.map +1 -0
- package/dist/constructs/monitoring.js +49 -0
- package/dist/constructs/monitoring.js.map +1 -0
- package/dist/constructs/network.d.ts +134 -0
- package/dist/constructs/network.d.ts.map +1 -0
- package/dist/constructs/network.js +94 -0
- package/dist/constructs/network.js.map +1 -0
- package/dist/constructs/policy.d.ts +24 -0
- package/dist/constructs/policy.d.ts.map +1 -0
- package/dist/constructs/policy.js +28 -0
- package/dist/constructs/policy.js.map +1 -0
- package/dist/constructs/secret.d.ts +30 -0
- package/dist/constructs/secret.d.ts.map +1 -0
- package/dist/constructs/secret.js +34 -0
- package/dist/constructs/secret.js.map +1 -0
- package/dist/constructs/storage.d.ts +49 -0
- package/dist/constructs/storage.d.ts.map +1 -0
- package/dist/constructs/storage.js +40 -0
- package/dist/constructs/storage.js.map +1 -0
- package/dist/constructs/workflow.d.ts +21 -0
- package/dist/constructs/workflow.d.ts.map +1 -0
- package/dist/constructs/workflow.js +21 -0
- package/dist/constructs/workflow.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/stack.d.ts +17 -0
- package/dist/stack.d.ts.map +1 -0
- package/dist/stack.js +19 -0
- package/dist/stack.js.map +1 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Caio Melo / melocalex
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Stack, BaseConstruct } from '../stack';
|
|
2
|
+
export interface CacheRedisProps {
|
|
3
|
+
nodeType?: 'small' | 'medium' | 'large';
|
|
4
|
+
numCacheNodes?: number;
|
|
5
|
+
automaticFailoverEnabled?: boolean;
|
|
6
|
+
atRestEncryptionEnabled?: boolean;
|
|
7
|
+
transitEncryptionEnabled?: boolean;
|
|
8
|
+
version?: string;
|
|
9
|
+
subnetGroupName?: string;
|
|
10
|
+
securityGroupIds?: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface CacheMemcachedProps {
|
|
13
|
+
nodeType?: 'small' | 'medium' | 'large';
|
|
14
|
+
numCacheNodes?: number;
|
|
15
|
+
subnetGroupName?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace Cache {
|
|
18
|
+
class Redis implements BaseConstruct {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly type = "Cache.Redis";
|
|
21
|
+
readonly props: Record<string, unknown>;
|
|
22
|
+
constructor(stack: Stack, id: string, props: CacheRedisProps);
|
|
23
|
+
}
|
|
24
|
+
class Memcached implements BaseConstruct {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly type = "Cache.Memcached";
|
|
27
|
+
readonly props: Record<string, unknown>;
|
|
28
|
+
constructor(stack: Stack, id: string, props: CacheMemcachedProps);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/constructs/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA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{
|
|
6
|
+
class Redis {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Cache.Redis';
|
|
9
|
+
props;
|
|
10
|
+
constructor(stack, id, props) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.props = props;
|
|
13
|
+
stack.addConstruct(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Cache.Redis = Redis;
|
|
17
|
+
class Memcached {
|
|
18
|
+
id;
|
|
19
|
+
type = 'Cache.Memcached';
|
|
20
|
+
props;
|
|
21
|
+
constructor(stack, id, props) {
|
|
22
|
+
this.id = id;
|
|
23
|
+
if ((props.numCacheNodes ?? 1) < 1)
|
|
24
|
+
throw new Error(`Cache.Memcached "${id}": numCacheNodes deve ser >= 1`);
|
|
25
|
+
this.props = props;
|
|
26
|
+
stack.addConstruct(this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
Cache.Memcached = Memcached;
|
|
30
|
+
})(Cache || (exports.Cache = Cache = {}));
|
|
31
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/constructs/cache.ts"],"names":[],"mappings":";;;AAmBA,IAAiB,KAAK,CAoBrB;AApBD,WAAiB,KAAK;IACpB,MAAa,KAAK;QAGmB;QAF1B,IAAI,GAAG,aAAa,CAAC;QACrB,KAAK,CAA0B;QACxC,YAAY,KAAY,EAAW,EAAU,EAAE,KAAsB;YAAlC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IAPY,WAAK,QAOjB,CAAA;IAED,MAAa,SAAS;QAGe;QAF1B,IAAI,GAAG,iBAAiB,CAAC;QACzB,KAAK,CAA0B;QACxC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA0B;YAAtC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,CAAC,GAAG,CAAC;gBAChC,MAAM,IAAI,KAAK,CAAC,oBAAoB,EAAE,gCAAgC,CAAC,CAAC;YAC1E,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IATY,eAAS,YASrB,CAAA;AACH,CAAC,EApBgB,KAAK,qBAAL,KAAK,QAoBrB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Stack, BaseConstruct } from '../stack';
|
|
2
|
+
export interface ComputeInstanceProps {
|
|
3
|
+
instanceType: 'small' | 'medium' | 'large';
|
|
4
|
+
image: string;
|
|
5
|
+
region?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ComputeAutoScalingProps {
|
|
8
|
+
instanceType: 'small' | 'medium' | 'large';
|
|
9
|
+
image: string;
|
|
10
|
+
minCapacity: number;
|
|
11
|
+
maxCapacity: number;
|
|
12
|
+
desiredCapacity?: number;
|
|
13
|
+
targetCpuUtilization?: number;
|
|
14
|
+
subnetIds?: string[];
|
|
15
|
+
securityGroupIds?: string[];
|
|
16
|
+
healthCheckPath?: string;
|
|
17
|
+
healthCheckPort?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ComputeContainerProps {
|
|
20
|
+
image: string;
|
|
21
|
+
cpu?: number;
|
|
22
|
+
memory?: number;
|
|
23
|
+
port?: number;
|
|
24
|
+
environment?: Record<string, string>;
|
|
25
|
+
desiredCount?: number;
|
|
26
|
+
publicIp?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ComputeKubernetesProps {
|
|
29
|
+
version?: string;
|
|
30
|
+
nodeInstanceType?: 'small' | 'medium' | 'large';
|
|
31
|
+
minNodes?: number;
|
|
32
|
+
maxNodes?: number;
|
|
33
|
+
desiredNodes?: number;
|
|
34
|
+
privateCluster?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare namespace Compute {
|
|
37
|
+
class Instance implements BaseConstruct {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly type = "Compute.Instance";
|
|
40
|
+
readonly props: Record<string, unknown>;
|
|
41
|
+
constructor(stack: Stack, id: string, props: ComputeInstanceProps);
|
|
42
|
+
}
|
|
43
|
+
class AutoScaling implements BaseConstruct {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly type = "Compute.AutoScaling";
|
|
46
|
+
readonly props: Record<string, unknown>;
|
|
47
|
+
constructor(stack: Stack, id: string, props: ComputeAutoScalingProps);
|
|
48
|
+
}
|
|
49
|
+
class Container implements BaseConstruct {
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly type = "Compute.Container";
|
|
52
|
+
readonly props: Record<string, unknown>;
|
|
53
|
+
constructor(stack: Stack, id: string, props: ComputeContainerProps);
|
|
54
|
+
}
|
|
55
|
+
class Kubernetes implements BaseConstruct {
|
|
56
|
+
readonly id: string;
|
|
57
|
+
readonly type = "Compute.Kubernetes";
|
|
58
|
+
readonly props: Record<string, unknown>;
|
|
59
|
+
constructor(stack: Stack, id: string, props: ComputeKubernetesProps);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=compute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../src/constructs/compute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACp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I,yBAAyB;QACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB;KAQ9E;IAED,MAAa,SAAU,YAAW,aAAa;QAGnB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAF7C,QAAQ,CAAC,IAAI,uBAAuB;QACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB;KAM5E;IAED,MAAa,UAAW,YAAW,aAAa;QAGpB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAF7C,QAAQ,CAAC,IAAI,wBAAwB;QACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB;KAI7E;CACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Compute = void 0;
|
|
4
|
+
var Compute;
|
|
5
|
+
(function (Compute) {
|
|
6
|
+
class Instance {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Compute.Instance';
|
|
9
|
+
props;
|
|
10
|
+
constructor(stack, id, props) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.props = props;
|
|
13
|
+
stack.addConstruct(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Compute.Instance = Instance;
|
|
17
|
+
class AutoScaling {
|
|
18
|
+
id;
|
|
19
|
+
type = 'Compute.AutoScaling';
|
|
20
|
+
props;
|
|
21
|
+
constructor(stack, id, props) {
|
|
22
|
+
this.id = id;
|
|
23
|
+
if (props.minCapacity < 0)
|
|
24
|
+
throw new Error(`Compute.AutoScaling "${id}": minCapacity deve ser >= 0`);
|
|
25
|
+
if (props.maxCapacity < props.minCapacity)
|
|
26
|
+
throw new Error(`Compute.AutoScaling "${id}": maxCapacity deve ser >= minCapacity`);
|
|
27
|
+
this.props = props;
|
|
28
|
+
stack.addConstruct(this);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
Compute.AutoScaling = AutoScaling;
|
|
32
|
+
class Container {
|
|
33
|
+
id;
|
|
34
|
+
type = 'Compute.Container';
|
|
35
|
+
props;
|
|
36
|
+
constructor(stack, id, props) {
|
|
37
|
+
this.id = id;
|
|
38
|
+
if (!props.image)
|
|
39
|
+
throw new Error(`Compute.Container "${id}": image é obrigatório`);
|
|
40
|
+
this.props = props;
|
|
41
|
+
stack.addConstruct(this);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
Compute.Container = Container;
|
|
45
|
+
class Kubernetes {
|
|
46
|
+
id;
|
|
47
|
+
type = 'Compute.Kubernetes';
|
|
48
|
+
props;
|
|
49
|
+
constructor(stack, id, props) {
|
|
50
|
+
this.id = id;
|
|
51
|
+
this.props = props;
|
|
52
|
+
stack.addConstruct(this);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
Compute.Kubernetes = Kubernetes;
|
|
56
|
+
})(Compute || (exports.Compute = Compute = {}));
|
|
57
|
+
//# sourceMappingURL=compute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute.js","sourceRoot":"","sources":["../../src/constructs/compute.ts"],"names":[],"mappings":";;;AAwCA,IAAiB,OAAO,CA0CvB;AA1CD,WAAiB,OAAO;IACtB,MAAa,QAAQ;QAGgB;QAF1B,IAAI,GAAG,kBAAkB,CAAC;QAC1B,KAAK,CAA0B;QACxC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA2B;YAAvC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA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,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IAPY,kBAAU,aAOtB,CAAA;AACH,CAAC,EA1CgB,OAAO,uBAAP,OAAO,QA0CvB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Stack, BaseConstruct } from '../stack';
|
|
2
|
+
export interface CustomResourceProps {
|
|
3
|
+
description?: string;
|
|
4
|
+
cloudformation?: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
arm?: {
|
|
9
|
+
type: string;
|
|
10
|
+
apiVersion: string;
|
|
11
|
+
properties: Record<string, unknown>;
|
|
12
|
+
sku?: Record<string, unknown>;
|
|
13
|
+
kind?: string;
|
|
14
|
+
};
|
|
15
|
+
deploymentManager?: {
|
|
16
|
+
type: string;
|
|
17
|
+
properties: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
terraform?: {
|
|
20
|
+
type: string;
|
|
21
|
+
body: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare namespace Custom {
|
|
25
|
+
class Resource implements BaseConstruct {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly type = "Custom.Resource";
|
|
28
|
+
readonly props: Record<string, unknown>;
|
|
29
|
+
constructor(stack: Stack, id: string, props: CustomResourceProps);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=custom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/constructs/custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IACvE,GAAG,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9H,iBAAiB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAC1E,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;CAC7D;AAED,yBAAiB,MAAM,CAAC;IACtB,MAAa,QAAS,YAAW,aAAa;QAIlB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAH7C,QAAQ,CAAC,IAAI,qBAAqB;QAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAE5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;KAI1E;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Custom = void 0;
|
|
4
|
+
var Custom;
|
|
5
|
+
(function (Custom) {
|
|
6
|
+
class Resource {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Custom.Resource';
|
|
9
|
+
props;
|
|
10
|
+
constructor(stack, id, props) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.props = props;
|
|
13
|
+
stack.addConstruct(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Custom.Resource = Resource;
|
|
17
|
+
})(Custom || (exports.Custom = Custom = {}));
|
|
18
|
+
//# sourceMappingURL=custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/constructs/custom.ts"],"names":[],"mappings":";;;AAUA,IAAiB,MAAM,CAUtB;AAVD,WAAiB,MAAM;IACrB,MAAa,QAAQ;QAIgB;QAH1B,IAAI,GAAG,iBAAiB,CAAC;QACzB,KAAK,CAA0B;QAExC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA0B;YAAtC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IARY,eAAQ,WAQpB,CAAA;AACH,CAAC,EAVgB,MAAM,sBAAN,MAAM,QAUtB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Stack, BaseConstruct } from '../stack';
|
|
2
|
+
export type SQLEngine = 'mysql' | 'postgres' | 'mariadb' | 'oracle' | 'sqlserver';
|
|
3
|
+
export interface DatabaseSQLProps {
|
|
4
|
+
engine: SQLEngine;
|
|
5
|
+
instanceType?: string;
|
|
6
|
+
multiAz?: boolean;
|
|
7
|
+
storageGb?: number;
|
|
8
|
+
backupRetentionDays?: number;
|
|
9
|
+
deletionProtection?: boolean;
|
|
10
|
+
/** Edição do Oracle ou SQL Server quando aplicável.
|
|
11
|
+
* Oracle: 'ee' | 'se2' (padrão: 'se2')
|
|
12
|
+
* SQL Server: 'ex' | 'web' | 'se' | 'ee' (padrão: 'ex')
|
|
13
|
+
*/
|
|
14
|
+
edition?: string;
|
|
15
|
+
/** Licença: 'license-included' | 'bring-your-own-license' (padrão: 'license-included') */
|
|
16
|
+
licenseModel?: 'license-included' | 'bring-your-own-license';
|
|
17
|
+
}
|
|
18
|
+
export interface DatabaseDocumentDBProps {
|
|
19
|
+
instanceType?: string;
|
|
20
|
+
instances?: number;
|
|
21
|
+
deletionProtection?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface DatabaseDynamoDBProps {
|
|
24
|
+
partitionKey: string;
|
|
25
|
+
sortKey?: string;
|
|
26
|
+
billingMode?: 'PAY_PER_REQUEST' | 'PROVISIONED';
|
|
27
|
+
readCapacity?: number;
|
|
28
|
+
writeCapacity?: number;
|
|
29
|
+
ttlAttribute?: string;
|
|
30
|
+
pointInTimeRecovery?: boolean;
|
|
31
|
+
streamEnabled?: boolean;
|
|
32
|
+
globalSecondaryIndexes?: Array<{
|
|
33
|
+
name: string;
|
|
34
|
+
partitionKey: string;
|
|
35
|
+
sortKey?: string;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
export declare namespace Database {
|
|
39
|
+
class SQL implements BaseConstruct {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly type = "Database.SQL";
|
|
42
|
+
readonly props: Record<string, unknown>;
|
|
43
|
+
static readonly SUPPORTED_ENGINES: SQLEngine[];
|
|
44
|
+
constructor(stack: Stack, id: string, props: DatabaseSQLProps);
|
|
45
|
+
}
|
|
46
|
+
class DocumentDB implements BaseConstruct {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly type = "Database.DocumentDB";
|
|
49
|
+
readonly props: Record<string, unknown>;
|
|
50
|
+
constructor(stack: Stack, id: string, props: DatabaseDocumentDBProps);
|
|
51
|
+
}
|
|
52
|
+
class DynamoDB implements BaseConstruct {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly type = "Database.DynamoDB";
|
|
55
|
+
readonly props: Record<string, unknown>;
|
|
56
|
+
constructor(stack: Stack, id: string, props: DatabaseDynamoDBProps);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/constructs/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,E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AAC,IAAI,kBAAkB;QAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAExC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,EAAE,CAE5C;oBAEU,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB;KAUvE;IAED,MAAa,UAAW,YAAW,aAAa;QAGpB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAF7C,QAAQ,CAAC,IAAI,yBAAyB;QACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB;KAI9E;IAED,MAAa,QAAS,YAAW,aAAa;QAGlB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAF7C,QAAQ,CAAC,IAAI,uBAAuB;QACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB;KAM5E;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Database = void 0;
|
|
4
|
+
var Database;
|
|
5
|
+
(function (Database) {
|
|
6
|
+
class SQL {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Database.SQL';
|
|
9
|
+
props;
|
|
10
|
+
static SUPPORTED_ENGINES = [
|
|
11
|
+
'mysql', 'postgres', 'mariadb', 'oracle', 'sqlserver',
|
|
12
|
+
];
|
|
13
|
+
constructor(stack, id, props) {
|
|
14
|
+
this.id = id;
|
|
15
|
+
if (!SQL.SUPPORTED_ENGINES.includes(props.engine)) {
|
|
16
|
+
throw new Error(`Database.SQL "${id}": engine inválido "${props.engine}". ` +
|
|
17
|
+
`Use um dos valores suportados: ${SQL.SUPPORTED_ENGINES.join(', ')}.`);
|
|
18
|
+
}
|
|
19
|
+
this.props = props;
|
|
20
|
+
stack.addConstruct(this);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
Database.SQL = SQL;
|
|
24
|
+
class DocumentDB {
|
|
25
|
+
id;
|
|
26
|
+
type = 'Database.DocumentDB';
|
|
27
|
+
props;
|
|
28
|
+
constructor(stack, id, props) {
|
|
29
|
+
this.id = id;
|
|
30
|
+
this.props = props;
|
|
31
|
+
stack.addConstruct(this);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
Database.DocumentDB = DocumentDB;
|
|
35
|
+
class DynamoDB {
|
|
36
|
+
id;
|
|
37
|
+
type = 'Database.DynamoDB';
|
|
38
|
+
props;
|
|
39
|
+
constructor(stack, id, props) {
|
|
40
|
+
this.id = id;
|
|
41
|
+
if (!props.partitionKey)
|
|
42
|
+
throw new Error(`Database.DynamoDB "${id}": partitionKey é obrigatório`);
|
|
43
|
+
this.props = props;
|
|
44
|
+
stack.addConstruct(this);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
Database.DynamoDB = DynamoDB;
|
|
48
|
+
})(Database || (exports.Database = Database = {}));
|
|
49
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/constructs/database.ts"],"names":[],"mappings":";;;AA+CA,IAAiB,QAAQ,CAwCxB;AAxCD,WAAiB,QAAQ;IACvB,MAAa,GAAG;QAQqB;QAP1B,IAAI,GAAG,cAAc,CAAC;QACtB,KAAK,CAA0B;QAExC,MAAM,CAAU,iBAAiB,GAAgB;YAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW;SACtD,CAAC;QAEF,YAAY,KAAY,EAAW,EAAU,EAAE,KAAuB;YAAnC,OAAE,GAAF,EAAE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Rule {
|
|
3
|
+
name: string;
|
|
4
|
+
source?: string[];
|
|
5
|
+
detailTypes?: string[];
|
|
6
|
+
targetArn?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface EventBridgeProps {
|
|
10
|
+
busName?: string;
|
|
11
|
+
rules?: EventBridgeRule[];
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace Events {
|
|
15
|
+
class EventBridge implements BaseConstruct {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly type = "Events.EventBridge";
|
|
18
|
+
readonly props: Record<string, unknown>;
|
|
19
|
+
constructor(stack: Stack, id: string, props: EventBridgeProps);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/constructs/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,yBAAiB,MAAM,CAAC;IACtB,MAAa,WAAY,YAAW,aAAa;QAIrB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAH7C,QAAQ,CAAC,IAAI,wBAAwB;QACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAE5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB;KAIvE;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Events = void 0;
|
|
4
|
+
var Events;
|
|
5
|
+
(function (Events) {
|
|
6
|
+
class EventBridge {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Events.EventBridge';
|
|
9
|
+
props;
|
|
10
|
+
constructor(stack, id, props) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.props = props;
|
|
13
|
+
stack.addConstruct(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Events.EventBridge = EventBridge;
|
|
17
|
+
})(Events || (exports.Events = Events = {}));
|
|
18
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/constructs/events.ts"],"names":[],"mappings":";;;AAgBA,IAAiB,MAAM,CAUtB;AAVD,WAAiB,MAAM;IACrB,MAAa,WAAW;QAIa;QAH1B,IAAI,GAAG,oBAAoB,CAAC;QAC5B,KAAK,CAA0B;QAExC,YAAY,KAAY,EAAW,EAAU,EAAE,KAAuB;YAAnC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IARY,kBAAW,cAQvB,CAAA;AACH,CAAC,EAVgB,MAAM,sBAAN,MAAM,QAUtB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Stack, BaseConstruct } from '../stack';
|
|
2
|
+
export interface FunctionLambdaProps {
|
|
3
|
+
runtime: 'nodejs20' | 'nodejs18' | 'python3.12' | 'python3.11' | 'java21' | 'go1.x' | 'dotnet8';
|
|
4
|
+
handler: string;
|
|
5
|
+
code: string;
|
|
6
|
+
memory?: number;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
environment?: Record<string, string>;
|
|
9
|
+
reservedConcurrency?: number;
|
|
10
|
+
layerArns?: string[];
|
|
11
|
+
vpcId?: string;
|
|
12
|
+
subnetIds?: string[];
|
|
13
|
+
securityGroupIds?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface FunctionApiGatewayProps {
|
|
16
|
+
name: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
type?: 'REST' | 'HTTP' | 'WEBSOCKET';
|
|
19
|
+
stageName?: string;
|
|
20
|
+
cors?: boolean;
|
|
21
|
+
authType?: 'NONE' | 'JWT' | 'AWS_IAM' | 'COGNITO';
|
|
22
|
+
authorizerLambdaId?: string;
|
|
23
|
+
throttlingBurstLimit?: number;
|
|
24
|
+
throttlingRateLimit?: number;
|
|
25
|
+
routes?: Array<{
|
|
26
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'ANY';
|
|
27
|
+
path: string;
|
|
28
|
+
lambdaId?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace Fn {
|
|
33
|
+
class Lambda implements BaseConstruct {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly type = "Function.Lambda";
|
|
36
|
+
readonly props: Record<string, unknown>;
|
|
37
|
+
constructor(stack: Stack, id: string, props: FunctionLambdaProps);
|
|
38
|
+
}
|
|
39
|
+
class ApiGateway implements BaseConstruct {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly type = "Function.ApiGateway";
|
|
42
|
+
readonly props: Record<string, unknown>;
|
|
43
|
+
constructor(stack: Stack, id: string, props: FunctionApiGatewayProps);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../src/constructs/function.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AC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;CACJ;AAED,yBAAiB,EAAE,CAAC;IAClB,MAAa,MAAO,YAAW,aAAa;QAGhB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAF7C,QAAQ,CAAC,IAAI,qBAAqB;QAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;KAI1E;IAED,MAAa,UAAW,YAAW,aAAa;QAGpB,QAAQ,CAAC,EAAE,EAAE,MAAM;QAF7C,QAAQ,CAAC,IAAI,yBAAyB;QACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAC5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB;KAM9E;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Fn = void 0;
|
|
4
|
+
var Fn;
|
|
5
|
+
(function (Fn) {
|
|
6
|
+
class Lambda {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Function.Lambda';
|
|
9
|
+
props;
|
|
10
|
+
constructor(stack, id, props) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.props = props;
|
|
13
|
+
stack.addConstruct(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Fn.Lambda = Lambda;
|
|
17
|
+
class ApiGateway {
|
|
18
|
+
id;
|
|
19
|
+
type = 'Function.ApiGateway';
|
|
20
|
+
props;
|
|
21
|
+
constructor(stack, id, props) {
|
|
22
|
+
this.id = id;
|
|
23
|
+
if (!props.name)
|
|
24
|
+
throw new Error(`Fn.ApiGateway "${id}": name é obrigatório`);
|
|
25
|
+
this.props = props;
|
|
26
|
+
stack.addConstruct(this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
Fn.ApiGateway = ApiGateway;
|
|
30
|
+
})(Fn || (exports.Fn = Fn = {}));
|
|
31
|
+
//# sourceMappingURL=function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../src/constructs/function.ts"],"names":[],"mappings":";;;AAkCA,IAAiB,EAAE,CAoBlB;AApBD,WAAiB,EAAE;IACjB,MAAa,MAAM;QAGkB;QAF1B,IAAI,GAAG,iBAAiB,CAAC;QACzB,KAAK,CAA0B;QACxC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA0B;YAAtC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IAPY,SAAM,SAOlB,CAAA;IAED,MAAa,UAAU;QAGc;QAF1B,IAAI,GAAG,qBAAqB,CAAC;QAC7B,KAAK,CAA0B;QACxC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA8B;YAA1C,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,CAAC,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC;YAC/D,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IATY,aAAU,aAStB,CAAA;AACH,CAAC,EApBgB,EAAE,kBAAF,EAAE,QAoBlB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Stack, BaseConstruct } from '../stack';
|
|
2
|
+
export interface MessagingQueueProps {
|
|
3
|
+
visibilityTimeoutSeconds?: number;
|
|
4
|
+
messageRetentionSeconds?: number;
|
|
5
|
+
delaySeconds?: number;
|
|
6
|
+
fifo?: boolean;
|
|
7
|
+
dlqArn?: string;
|
|
8
|
+
maxReceiveCount?: number;
|
|
9
|
+
encrypted?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface MessagingTopicProps {
|
|
12
|
+
displayName?: string;
|
|
13
|
+
fifo?: boolean;
|
|
14
|
+
encrypted?: boolean;
|
|
15
|
+
subscriptions?: Array<{
|
|
16
|
+
protocol: 'lambda' | 'sqs' | 'email' | 'http' | 'https';
|
|
17
|
+
endpoint: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace Messaging {
|
|
21
|
+
class Queue implements BaseConstruct {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly type = "Messaging.Queue";
|
|
24
|
+
readonly props: Record<string, unknown>;
|
|
25
|
+
constructor(stack: Stack, id: string, props: MessagingQueueProps);
|
|
26
|
+
}
|
|
27
|
+
class Topic implements BaseConstruct {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly type = "Messaging.Topic";
|
|
30
|
+
readonly props: Record<string, unknown>;
|
|
31
|
+
constructor(stack: Stack, id: string, props: MessagingTopicProps);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=messaging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/constructs/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,KAAK,CAAC;QACpB,QAAQ,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;QACxD,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ;AAED,yBAAiB,SAAS,CAAC;IACzB,MAAa,KAAM,YAAW,aAAa;QAIf,QAAQ,CAAC,EAAE,EAAE,MAAM;QAH7C,QAAQ,CAAC,IAAI,qBAAqB;QAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAE5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;KAI1E;IAED,MAAa,KAAM,YAAW,aAAa;QAIf,QAAQ,CAAC,EAAE,EAAE,MAAM;QAH7C,QAAQ,CAAC,IAAI,qBAAqB;QAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBAE5B,KAAK,EAAE,KAAK,EAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;KAI1E;CACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Messaging = void 0;
|
|
4
|
+
var Messaging;
|
|
5
|
+
(function (Messaging) {
|
|
6
|
+
class Queue {
|
|
7
|
+
id;
|
|
8
|
+
type = 'Messaging.Queue';
|
|
9
|
+
props;
|
|
10
|
+
constructor(stack, id, props) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
this.props = props;
|
|
13
|
+
stack.addConstruct(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Messaging.Queue = Queue;
|
|
17
|
+
class Topic {
|
|
18
|
+
id;
|
|
19
|
+
type = 'Messaging.Topic';
|
|
20
|
+
props;
|
|
21
|
+
constructor(stack, id, props) {
|
|
22
|
+
this.id = id;
|
|
23
|
+
this.props = props;
|
|
24
|
+
stack.addConstruct(this);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
Messaging.Topic = Topic;
|
|
28
|
+
})(Messaging || (exports.Messaging = Messaging = {}));
|
|
29
|
+
//# sourceMappingURL=messaging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../src/constructs/messaging.ts"],"names":[],"mappings":";;;AAsBA,IAAiB,SAAS,CAoBzB;AApBD,WAAiB,SAAS;IACxB,MAAa,KAAK;QAImB;QAH1B,IAAI,GAAG,iBAAiB,CAAC;QACzB,KAAK,CAA0B;QAExC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA0B;YAAtC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IARY,eAAK,QAQjB,CAAA;IAED,MAAa,KAAK;QAImB;QAH1B,IAAI,GAAG,iBAAiB,CAAC;QACzB,KAAK,CAA0B;QAExC,YAAY,KAAY,EAAW,EAAU,EAAE,KAA0B;YAAtC,OAAE,GAAF,EAAE,CAAQ;YAC3C,IAAI,CAAC,KAAK,GAAG,KAA2C,CAAC;YACzD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF;IARY,eAAK,QAQjB,CAAA;AACH,CAAC,EApBgB,SAAS,yBAAT,SAAS,QAoBzB"}
|