Skip to content

Commit 4751179

Browse files
[PRM-667] Removed refs and packages related to aws-sdk v2 (#302)
1 parent 935f591 commit 4751179

File tree

17 files changed

+1582
-1419
lines changed

17 files changed

+1582
-1419
lines changed

.github/workflows/base-node-service-jobs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ jobs:
5656
run: npm install
5757

5858
- name: Start LocalStack
59-
uses: LocalStack/setup-localstack@v0.2.5
59+
uses: LocalStack/setup-localstack@v0.3.0
60+
env:
61+
LOCALSTACK_ACKNOWLEDGE_ACCOUNT_REQUIREMENT: "1" # https://github.com/localstack/setup-localstack/issues/65
6062
with:
6163
install-awslocal: "true"
64+
use-pro: false
65+
image-tag: "4.14.0"
6266

6367
# https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html
6468
- name: Create AWS resources

services/ehr-out-service/package-lock.json

Lines changed: 103 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/ehr-out-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"expect": "^29.3.1",
3232
"express": "^5.2.1",
3333
"express-validator": "^7.3.1",
34-
"fast-xml-parser": "^4.2.5",
34+
"fast-xml-parser": "^5.5.9",
3535
"lodash.chunk": "^4.2.0",
3636
"lodash.clonedeep": "^4.5.0",
3737
"lodash.isequal": "^4.5.0",

services/ehr-out-service/src/__tests__/db.integration.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ describe('Database connection test', () => {
5151
// when
5252
await Promise.all(databaseOperationPromises);
5353

54-
const recordsAfterTransaction = await db.queryTableByInboundConversationId(
55-
INBOUND_CONVERSATION_ID
56-
);
54+
const recordsAfterTransaction =
55+
await db.queryTableByInboundConversationId(INBOUND_CONVERSATION_ID);
5756
const fragments = recordsAfterTransaction.filter(isFragment);
5857
// then
5958
fragments.forEach(fragment => {

services/ehr-out-service/src/middleware/auth.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ export const authenticateRequest = (req, res, next) => {
2121
}
2222

2323
if (!validAuthorizationKeys.includes(authorizationKey)) {
24-
logWarning(
25-
`Unsuccessful Request: ${req.method} ${
26-
req.originalUrl
27-
}, Invalid API Key presented`
28-
);
24+
logWarning(`Unsuccessful Request: ${req.method} ${req.originalUrl}, Invalid API Key presented`);
2925
res.status(403).json({
3026
error: `Authorization header is provided but not valid`
3127
});

services/ehr-out-service/src/services/transfer/transfer-out-fragments.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ export async function transferOutFragmentsForRetriedContinueRequest({
4242
}) {
4343
setCurrentSpanAttributes({ conversationId });
4444
logInfo(`Retrying the EHR Fragment transfer.`);
45-
const { inboundConversationId } = await getFragmentConversationAndMessageIdsFromEhrRepo(
46-
nhsNumber
47-
);
45+
const { inboundConversationId } =
46+
await getFragmentConversationAndMessageIdsFromEhrRepo(nhsNumber);
4847
logInfo('Retrieved all fragment Message IDs for transfer.');
4948

50-
const messageIdsWithReplacementsEligibleForSending = await getAllFragmentIdsToBeSent(
51-
inboundConversationId
52-
);
49+
const messageIdsWithReplacementsEligibleForSending =
50+
await getAllFragmentIdsToBeSent(inboundConversationId);
5351

5452
logInfo(
5553
`Found ${messageIdsWithReplacementsEligibleForSending.length} Message ID replacements eligible to be sent.`

services/ehr-out-service/test/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ const AWS_ACCOUNT_NO = '000000000000';
33
const LOCALSTACK_URL = 'http://localhost:4566';
44
const AWS_REGION = 'eu-west-2';
55
export const config = {
6-
nhsEnvironment: "dev",
7-
serviceUrl: "www.example.com",
6+
nhsEnvironment: 'dev',
7+
serviceUrl: 'www.example.com',
88
localstackEndpointUrl: LOCALSTACK_URL,
99
region: AWS_REGION,
1010
awsAccountNo: AWS_ACCOUNT_NO,

0 commit comments

Comments
 (0)