@medplum/cdk 2.0.24 → 2.0.25

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/esbuild.mjs ADDED
@@ -0,0 +1,47 @@
1
+ /* global console */
2
+ /* eslint no-console: "off" */
3
+
4
+ import esbuild from 'esbuild';
5
+ import { writeFileSync } from 'fs';
6
+
7
+ const options = {
8
+ entryPoints: ['./src/index.ts'],
9
+ bundle: true,
10
+ platform: 'node',
11
+ loader: { '.ts': 'ts' },
12
+ resolveExtensions: ['.ts'],
13
+ target: 'es2021',
14
+ tsconfig: 'tsconfig.json',
15
+ minify: true,
16
+ sourcemap: true,
17
+ external: [
18
+ '@aws-sdk/client-acm',
19
+ '@aws-sdk/client-ssm',
20
+ '@aws-sdk/client-sts',
21
+ 'aws-cdk-lib',
22
+ 'aws-cdk-lib/aws-ecr',
23
+ 'aws-cdk-lib/aws-rds',
24
+ 'cdk',
25
+ 'cdk-nag',
26
+ 'cdk-serverless-clamscan',
27
+ 'constructs',
28
+ ],
29
+ };
30
+
31
+ esbuild
32
+ .build({
33
+ ...options,
34
+ format: 'cjs',
35
+ outfile: './dist/cjs/index.cjs',
36
+ })
37
+ .then(() => writeFileSync('./dist/cjs/package.json', '{"type": "commonjs"}'))
38
+ .catch(console.error);
39
+
40
+ esbuild
41
+ .build({
42
+ ...options,
43
+ format: 'esm',
44
+ outfile: './dist/esm/index.mjs',
45
+ })
46
+ .then(() => writeFileSync('./dist/esm/package.json', '{"type": "module"}'))
47
+ .catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/cdk",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Medplum CDK Infra as Code",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "scripts": {
14
14
  "clean": "rimraf dist cdk.out",
15
- "build": "npm run clean && tsc && rollup --config rollup.config.mjs",
15
+ "build": "npm run clean && tsc --project tsconfig.build.json && node esbuild.mjs",
16
16
  "cdk": "cdk",
17
17
  "test": "jest --runInBand"
18
18
  },
package/src/backend.ts CHANGED
@@ -309,6 +309,7 @@ export class BackEnd extends Construct {
309
309
  },
310
310
  desiredCount: config.desiredServerCount,
311
311
  securityGroups: [fargateSecurityGroup],
312
+ healthCheckGracePeriod: Duration.minutes(5),
312
313
  });
313
314
 
314
315
  // Add dependencies - make sure Fargate service is created after RDS and Redis
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist/types",
5
+ "noEmit": false,
6
+ "emitDeclarationOnly": true
7
+ },
8
+ "exclude": ["**/*.test.ts"]
9
+ }
package/rollup.config.mjs DELETED
@@ -1,44 +0,0 @@
1
- import resolve from '@rollup/plugin-node-resolve';
2
- import typescript from '@rollup/plugin-typescript';
3
- import { mkdirSync, writeFileSync } from 'fs';
4
-
5
- const external = [
6
- '@aws-sdk/client-acm',
7
- '@aws-sdk/client-ssm',
8
- '@aws-sdk/client-sts',
9
- 'aws-cdk-lib',
10
- 'aws-cdk-lib/aws-ecr',
11
- 'aws-cdk-lib/aws-rds',
12
- 'cdk',
13
- 'cdk-nag',
14
- 'cdk-serverless-clamscan',
15
- 'constructs',
16
- ];
17
-
18
- const extensions = ['.ts'];
19
-
20
- const plugins = [
21
- resolve({ extensions }),
22
- typescript({ outDir: 'dist/cjs', declaration: false }),
23
- {
24
- buildEnd: () => {
25
- mkdirSync('./dist/cjs', { recursive: true });
26
- writeFileSync('./dist/cjs/package.json', '{"type": "commonjs"}');
27
- },
28
- },
29
- ];
30
-
31
- export default [
32
- {
33
- input: 'src/index.ts',
34
- output: [
35
- {
36
- file: 'dist/cjs/index.cjs',
37
- format: 'cjs',
38
- sourcemap: true,
39
- },
40
- ],
41
- plugins,
42
- external,
43
- },
44
- ];