Skip to content

Commit

Permalink
feat(cb2-9045): fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
naathanbrown committed Sep 13, 2023
1 parent 02a2de3 commit 8a2aece
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
with:
args: '--all-projects'
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
59 changes: 19 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ts-jest": "^26.1.1",
"ts-node": "^8.5.4",
"tslint": "^6.0.0",
"typescript": "3.8.3"
"typescript": "4.4.4"
},
"dependencies": {
"@types/js-yaml": "^3.12.2",
Expand Down
10 changes: 5 additions & 5 deletions src/utils/Configuration.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-ignore
import * as yml from 'node-yaml';
import { Handler } from 'aws-lambda';
import { IConfig, IFunctionEvent, IInvokeConfig, INotifyConfig, ISecretConfig } from '../models';
import { ERRORS } from './Enums';
import SecretsManager, { GetSecretValueRequest, GetSecretValueResponse } from 'aws-sdk/clients/secretsmanager';
import { safeLoad } from 'js-yaml';
import * as AWSXray from 'aws-xray-sdk';
import { safeLoad } from 'js-yaml';
import * as yml from 'node-yaml';
import { IConfig, IFunctionEvent, IInvokeConfig, INotifyConfig, ISecretConfig } from '../models';
import { ERRORS } from './Enums';

class Configuration {
private static instance: Configuration;
Expand Down Expand Up @@ -137,7 +137,7 @@ class Configuration {
};
const resp: GetSecretValueResponse = await this.secretsClient.getSecretValue(req).promise();
try {
secret = await safeLoad(resp.SecretString as string);
secret = (await safeLoad(resp.SecretString as string)) as ISecretConfig;
} catch (e) {
throw new Error(ERRORS.SECRET_STRING_EMPTY);
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/decleration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'node-yaml';
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"resolveJsonModule": true,
"experimentalDecorators": true,
"pretty": true
"pretty": true,
"useUnknownInCatchVariables": false
}
}

0 comments on commit 8a2aece

Please sign in to comment.