-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: broken daemon build #170
Changes from all commits
4a4254a
e81e9bc
490175c
1320606
eca26e8
5ab8f08
0cd68d0
851d3ed
77c7daf
3e1a48f
536ee04
e598805
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
export const mockedAddAlert = jest.fn(); | ||
export default jest.mock('@src/utils/alerting.utils', () => ({ | ||
addAlert: mockedAddAlert.mockReturnValue(Promise.resolve()), | ||
})); | ||
export default jest.mock('@src/utils/alerting.utils', () => { | ||
const originalModule = jest.requireActual('@src/utils/alerting.utils'); | ||
|
||
return { | ||
...originalModule, | ||
addAlert: mockedAddAlert.mockReturnValue(Promise.resolve()), | ||
}; | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Copyright (c) Hathor Labs and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
export * from './src/types'; | ||
export * from './src/utils/index.utils'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,8 @@ | |
|
||
import { SendMessageCommand, SQSClient } from '@aws-sdk/client-sqs'; | ||
import { Severity } from '../types'; | ||
import { assertEnvVariablesExistence } from './index.utils'; | ||
import { Logger } from 'winston'; | ||
|
||
assertEnvVariablesExistence([ | ||
'NETWORK', | ||
'APPLICATION_NAME', | ||
'ACCOUNT_ID', | ||
'ALERT_MANAGER_REGION', | ||
'ALERT_MANAGER_TOPIC', | ||
]); | ||
|
||
Comment on lines
-13
to
-20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a config method that already checks for those variables and this check shouldn't be in a lib |
||
/** | ||
* Adds a message to the SQS alerting queue | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,12 @@ | |
"outDir": "./dist", | ||
"types": ["node", "jest"] | ||
}, | ||
// The common module is not deployed to npm and is an internal tool, | ||
// we want it to have its own tsconfig, so this is instructing typescript | ||
// to compile its tsconfig.json file | ||
"references": [ | ||
{ "path": "../../node_modules/@wallet-service/common" } | ||
], | ||
Comment on lines
+16
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes tsconfig compile the common module tsconfig There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question(non-blocking): Should we add these instructions to a document on the repository itself? There seem to be many of those small details that can break the production environment and delay future maintenance releases if left unchecked. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just found out that typescript implements its own JSON parser, which allows for comments in JSON Added a comment in tsconfig.json in 536ee04 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also created an issue so we document these details better There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! It will surely help with future maintenance |
||
"include": [ | ||
"src/**/*.ts" | ||
], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the -A flag because otherwise we wouldn't be able to use wallet-lib as a peer dependency and would have issues with bitcore-lib
This is not installing dependencies from the wallet-service lambdas as we are ignoring its package in
.dockerignore