mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-26 03:48:11 +08:00
934cc5c69b
* Added TS. Updated build and linting config. Added types. * [ts-migrate][.] Rename files from JS/JSX to TS/TSX Co-authored-by: ts-migrate <> * [ts-migrate][.] Run TS Migrate Co-authored-by: ts-migrate <> * Corrected files mangled by ts-migrate. * Updated lint config, minor linting. * Re-enabled Husky. * Updated tests and config. * Reverted webpack devtool config. * Removed obsolete snapshots. * Added annotations snap. * Updated tsconfig includes wrt linting. * Removed ts-migrate. Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
28 lines
749 B
TypeScript
28 lines
749 B
TypeScript
// @ts-ignore FIXME revisit from ts-migrate
|
|
const {
|
|
SecretsManagerClient,
|
|
GetSecretValueCommand,
|
|
} = require("@aws-sdk/client-secrets-manager");
|
|
|
|
const { setup } = require("jest-environment-puppeteer");
|
|
|
|
const client = new SecretsManagerClient({ region: "us-west-2" });
|
|
|
|
const deploymentStage = process.env.DEPLOYMENT_STAGE || "test";
|
|
|
|
const secretValueRequest = {
|
|
SecretId: `corpora/backend/${deploymentStage}/auth0-secret`,
|
|
};
|
|
|
|
const command = new GetSecretValueCommand(secretValueRequest);
|
|
|
|
module.exports = async () => {
|
|
await setup();
|
|
try {
|
|
const secret = JSON.parse((await client.send(command)).SecretString);
|
|
process.env.TEST_ACCOUNT_PASS = secret.test_account_password;
|
|
} catch (error) {
|
|
console.error(error);
|
|
}
|
|
};
|