@infoxchange/make-it-so 2.5.0 → 2.6.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.
@@ -0,0 +1,9 @@
1
+ import { Bucket } from "sst/constructs";
2
+ type ConstructScope = ConstructorParameters<typeof Bucket>[0];
3
+ type ConstructId = ConstructorParameters<typeof Bucket>[1];
4
+ type ConstructProps = Exclude<ConstructorParameters<typeof Bucket>[2], undefined>;
5
+ export declare class IxBucket extends Bucket {
6
+ constructor(scope: ConstructScope, id: ConstructId, props?: ConstructProps);
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=IxBucket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IxBucket.d.ts","sourceRoot":"","sources":["../../src/cdk-constructs/IxBucket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIxC,KAAK,cAAc,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,KAAK,WAAW,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3D,KAAK,cAAc,GAAG,OAAO,CAAC,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAElF,qBAAa,QAAS,SAAQ,MAAM;gBAEhC,KAAK,EAAE,cAAc,EACrB,EAAE,EAAE,WAAW,EACf,KAAK,GAAE,cAAmB;CAiB5B"}
@@ -0,0 +1,20 @@
1
+ import { Bucket } from "sst/constructs";
2
+ import { BucketEncryption } from "aws-cdk-lib/aws-s3";
3
+ import ixDeployConfig from "../deployConfig.js";
4
+ export class IxBucket extends Bucket {
5
+ constructor(scope, id, props = {}) {
6
+ const bucketProps = {
7
+ blockPublicACLs: true,
8
+ ...props,
9
+ cdk: {
10
+ ...props.cdk,
11
+ bucket: {
12
+ enforceSSL: true,
13
+ ...(ixDeployConfig.isIxDeploy ? { encryption: BucketEncryption.S3_MANAGED } : {}),
14
+ ...props.cdk?.bucket,
15
+ },
16
+ },
17
+ };
18
+ super(scope, id, bucketProps);
19
+ }
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infoxchange/make-it-so",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Makes deploying services to IX infra easy",
5
5
  "repository": "github:infoxchange/make-it-so",
6
6
  "type": "module",
@@ -0,0 +1,30 @@
1
+ import { Bucket } from "sst/constructs";
2
+ import { BucketEncryption } from "aws-cdk-lib/aws-s3";
3
+ import ixDeployConfig from "../deployConfig.js";
4
+
5
+ type ConstructScope = ConstructorParameters<typeof Bucket>[0];
6
+ type ConstructId = ConstructorParameters<typeof Bucket>[1];
7
+ type ConstructProps = Exclude<ConstructorParameters<typeof Bucket>[2], undefined>;
8
+
9
+ export class IxBucket extends Bucket {
10
+ constructor(
11
+ scope: ConstructScope,
12
+ id: ConstructId,
13
+ props: ConstructProps = {},
14
+ ) {
15
+ const bucketProps: ConstructProps = {
16
+ blockPublicACLs: true,
17
+ ...props,
18
+ cdk: {
19
+ ...props.cdk,
20
+ bucket: {
21
+ enforceSSL: true,
22
+ ...(ixDeployConfig.isIxDeploy ? { encryption: BucketEncryption.S3_MANAGED } : {}),
23
+ ...props.cdk?.bucket,
24
+ },
25
+
26
+ },
27
+ }
28
+
29
+ super(scope, id, bucketProps);
30
+ }}