Skip to content
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

Handle system state messages #149

Merged
merged 21 commits into from
May 13, 2022
Merged

Conversation

slevertbiot
Copy link

No description provided.

@slevertbiot
Copy link
Author

slevertbiot commented May 12, 2022

I've altered this project in two significant ways. It's now a typescript project and it's broken out into multiple source files.

From a CI/CD perspective, I believe we now need to create a zip file of the transpiled js files in the dist folder and deploy the zip. I'll raise a story for devops to address this.

"watch": "concurrently \"tsc -w\" \"nodemon --watch ./build/ --exec npm run start\"",
"test": "NODE_ENV=test jest --runInBand --silent",
"testInteractive": "NODE_ENV=test jest --runInBand --silent --watchAll",
"postinstall": "cd ../.. && husky install udmif/api/.husky"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this line be changed to be:

"postinstall": "cd ../.. && husky install udmif/event-handler/.husky"

You'll also need to add a pre-commit file in an event-handler/.husky folder like we've done in web/.husky and api/.husky. Don't worry about the _ folder in .husky, that's autogenerated. The contents of the pre-commit file should be:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd udmif/event-handler
npx lint-staged

return event;
}

export function getDocumentKey(message): DeviceKey {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific type for a message? What about for event above in decodeEventData and handleUdmiEvent?

@slevertbiot slevertbiot merged commit 1ef9d14 into master May 13, 2022
@slevertbiot slevertbiot deleted the handle-system-state-messages branch August 4, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants