From 61fa1e994ade87c8377ec630c49182dcbbabdae5 Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Fri, 4 Oct 2024 17:28:44 -0700 Subject: [PATCH 1/2] change AWS env var names to avoid conflicting with EFP RecordRTC names --- packages/data/src/environment.d.ts | 8 ++++---- packages/data/src/lookitS3.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/data/src/environment.d.ts b/packages/data/src/environment.d.ts index 05d26ee3..ced33c27 100644 --- a/packages/data/src/environment.d.ts +++ b/packages/data/src/environment.d.ts @@ -1,10 +1,10 @@ declare global { namespace NodeJS { interface ProcessEnv { - S3_REGION: string; - S3_ACCESS_KEY_ID: string; - S3_SECRET_ACCESS_KEY: string; - S3_BUCKET: string; + JSPSYCH_S3_REGION: string; + JSPSYCH_S3_ACCESS_KEY_ID: string; + JSPSYCH_S3_SECRET_ACCESS_KEY: string; + JSPSYCH_S3_BUCKET: string; } } } diff --git a/packages/data/src/lookitS3.ts b/packages/data/src/lookitS3.ts index a1a0bcf3..cfb7c6ce 100644 --- a/packages/data/src/lookitS3.ts +++ b/packages/data/src/lookitS3.ts @@ -15,7 +15,7 @@ class LookitS3 { private s3: S3Client; private uploadId: string = ""; private key: string; - private bucket: string = process.env.S3_BUCKET; + private bucket: string = process.env.JSPSYCH_S3_BUCKET; private complete: boolean = false; public static readonly minUploadSize: number = 5 * 1024 * 1024; @@ -30,10 +30,10 @@ class LookitS3 { this.key = key; try { this.s3 = new S3Client({ - region: process.env.S3_REGION, + region: process.env.JSPSYCH_S3_REGION, credentials: { - accessKeyId: process.env.S3_ACCESS_KEY_ID, - secretAccessKey: process.env.S3_SECRET_ACCESS_KEY, + accessKeyId: process.env.JSPSYCH_S3_ACCESS_KEY_ID, + secretAccessKey: process.env.JSPSYCH_S3_SECRET_ACCESS_KEY, }, }); } catch (e) { From a4b87fe12cd17388e3bd9671e27ee3c0ad6aca19 Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Mon, 7 Oct 2024 10:11:19 -0700 Subject: [PATCH 2/2] add changeset --- .changeset/sharp-toes-learn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sharp-toes-learn.md diff --git a/.changeset/sharp-toes-learn.md b/.changeset/sharp-toes-learn.md new file mode 100644 index 00000000..0a001cf8 --- /dev/null +++ b/.changeset/sharp-toes-learn.md @@ -0,0 +1,5 @@ +--- +"@lookit/data": patch +--- + +Update AWS environment variable names to avoid naming conflicts with RecordRTC AWS variables.