@medplum/cli 2.1.1 → 2.1.3

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,14 @@
1
+ import { StackResource } from '@aws-sdk/client-cloudformation';
2
+ export interface UpdateBucketPoliciesOptions {
3
+ dryrun?: boolean;
4
+ }
5
+ /**
6
+ * The AWS "update-bucket-policies" command adds necessary policy statements to S3 bucket policy documents.
7
+ *
8
+ * This is necessary for Medplum deployments outside of the us-east-1 region.
9
+ *
10
+ * @param tag The Medplum stack tag.
11
+ * @param options The update options.
12
+ */
13
+ export declare function updateBucketPoliciesCommand(tag: string, options: UpdateBucketPoliciesOptions): Promise<void>;
14
+ export declare function updateBucketPolicy(friendlyName: string, bucketResource: StackResource | undefined, distributionResource: StackResource | undefined, oaiResource: StackResource | undefined, options: UpdateBucketPoliciesOptions): Promise<void>;
@@ -9,7 +9,10 @@ export interface MedplumStackDetails {
9
9
  ecsService?: StackResource;
10
10
  appBucket?: StackResource;
11
11
  appDistribution?: StackResource;
12
+ appOriginAccessIdentity?: StackResource;
12
13
  storageBucket?: StackResource;
14
+ storageDistribution?: StackResource;
15
+ storageOriginAccessIdentity?: StackResource;
13
16
  }
14
17
  export declare const cloudFormationClient: CloudFormationClient;
15
18
  export declare const cloudFrontClient: CloudFrontClient;
@@ -46,3 +49,12 @@ export declare function printStackDetails(details: MedplumStackDetails): void;
46
49
  * @returns The ECS service name.
47
50
  */
48
51
  export declare function getEcsServiceName(resource: StackResource | undefined): string | undefined;
52
+ /**
53
+ * Creates a CloudFront invalidation to clear the cache for all files.
54
+ * This is not strictly necessary, but it helps to ensure that the latest version of the app is served.
55
+ * In a perfect world, every deploy is clean, and hashed resources should be cached forever.
56
+ * However, we do not recalculate hashes after variable replacements.
57
+ * So if variables change, we need to invalidate the cache.
58
+ * @param distributionId The CloudFront distribution ID.
59
+ */
60
+ export declare function createInvalidation(distributionId: string): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const hl7: Command;
3
+ export declare function generateSampleHl7Message(): string;
@@ -1,5 +1,5 @@
1
1
  import { MedplumClient, MedplumClientOptions } from '@medplum/core';
2
2
  export declare function createMedplumClient(options: MedplumClientOptions & {
3
3
  profile?: string;
4
- }): Promise<MedplumClient>;
4
+ }, setupCredentials?: boolean): Promise<MedplumClient>;
5
5
  export declare function onUnauthenticated(): void;
@@ -4,12 +4,12 @@ import { Bot, Extension } from '@medplum/fhirtypes';
4
4
  import internal from 'stream';
5
5
  import { FileSystemStorage } from './storage';
6
6
  interface MedplumConfig {
7
- readonly baseUrl?: string;
8
- readonly clientId?: string;
9
- readonly googleClientId?: string;
10
- readonly recaptchaSiteKey?: string;
11
- readonly registerEnabled?: boolean;
12
- readonly bots?: MedplumBotConfig[];
7
+ baseUrl?: string;
8
+ clientId?: string;
9
+ googleClientId?: string;
10
+ recaptchaSiteKey?: string;
11
+ registerEnabled?: boolean;
12
+ bots?: MedplumBotConfig[];
13
13
  }
14
14
  interface MedplumBotConfig {
15
15
  readonly name: string;
@@ -37,7 +37,7 @@ export interface Profile {
37
37
  export declare function prettyPrint(input: unknown): void;
38
38
  export declare function saveBot(medplum: MedplumClient, botConfig: MedplumBotConfig, bot: Bot): Promise<void>;
39
39
  export declare function deployBot(medplum: MedplumClient, botConfig: MedplumBotConfig, bot: Bot): Promise<void>;
40
- export declare function createBot(medplum: MedplumClient, argv: string[]): Promise<void>;
40
+ export declare function createBot(medplum: MedplumClient, botName: string, projectId: string, sourceFile: string, distFile: string, runtimeVersion?: string): Promise<void>;
41
41
  export declare function readBotConfigs(botName: string): MedplumBotConfig[];
42
42
  export declare function readConfig(tagName?: string): MedplumConfig | undefined;
43
43
  /**
@@ -52,7 +52,7 @@ export declare function readConfig(tagName?: string): MedplumConfig | undefined;
52
52
  export declare function safeTarExtractor(destinationDir: string): internal.Writable;
53
53
  export declare function getUnsupportedExtension(): Extension;
54
54
  export declare function getCodeContentType(filename: string): string;
55
- export declare function saveProfile(profileName: string, options: Profile): void;
55
+ export declare function saveProfile(profileName: string, options: Profile): Profile;
56
56
  export declare function loadProfile(profileName: string): Profile;
57
57
  export declare function profileExists(storage: FileSystemStorage, profile: string): boolean;
58
58
  export declare function jwtBearerLogin(medplum: MedplumClient, profile: Profile): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/cli",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Medplum Command Line Interface",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",
@@ -20,27 +20,28 @@
20
20
  "test": "jest"
21
21
  },
22
22
  "dependencies": {
23
- "@aws-sdk/client-acm": "3.395.0",
24
- "@aws-sdk/client-cloudformation": "3.395.0",
25
- "@aws-sdk/client-cloudfront": "3.395.0",
26
- "@aws-sdk/client-ecs": "3.395.0",
27
- "@aws-sdk/client-s3": "3.395.0",
28
- "@aws-sdk/client-ssm": "3.395.0",
29
- "@aws-sdk/client-sts": "3.395.0",
30
- "@aws-sdk/types": "3.391.0",
23
+ "@aws-sdk/client-acm": "3.414.0",
24
+ "@aws-sdk/client-cloudformation": "3.414.0",
25
+ "@aws-sdk/client-cloudfront": "3.414.0",
26
+ "@aws-sdk/client-ecs": "3.414.0",
27
+ "@aws-sdk/client-s3": "3.414.0",
28
+ "@aws-sdk/client-ssm": "3.414.0",
29
+ "@aws-sdk/client-sts": "3.414.0",
30
+ "@aws-sdk/types": "3.413.0",
31
31
  "@medplum/core": "*",
32
+ "@medplum/hl7": "*",
32
33
  "aws-sdk-client-mock": "3.0.0",
33
34
  "commander": "11.0.0",
34
35
  "dotenv": "16.3.1",
35
36
  "fast-glob": "3.3.1",
36
37
  "node-fetch": "2.7.0",
37
- "tar": "6.1.15"
38
+ "tar": "6.2.0"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@medplum/fhirtypes": "*",
41
42
  "@medplum/mock": "*",
42
- "@types/node-fetch": "2.6.4",
43
- "@types/tar": "6.1.5"
43
+ "@types/node-fetch": "2.6.5",
44
+ "@types/tar": "6.1.6"
44
45
  },
45
46
  "bin": {
46
47
  "medplum": "./dist/cjs/index.cjs"