-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ts-client): add persisted predicates and periodic health check (#…
…658) Upgrades TS client to new breaking change with updated schema treatments and unit tests. **Breaking changes** * Instead of letting users define a predicate `uuid` by hand, it is now configured automatically by the client so users can only set the `name` and we can use that as a key to figure out if we had already registered a predicate before. This makes UUIDs be local to that running event observer and avoids collisions when pointing multiple observers to one single chainhook node. * Upgrades schema names and configuration options to better reflect what they do **Other features** * Adds on-disk predicate persistence for registered predicates: saves to disk and recalls upon restarts * Adds a configurable health check to make sure on-disk predicates are still healthy, and re-registers them if they are interrupted * Adds unit tests for new behavior
- Loading branch information
Showing
12 changed files
with
600 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "ts client: jest", | ||
"localRoot": "${workspaceFolder}/components/client/typescript", | ||
"program": "${workspaceFolder}/components/client/typescript/node_modules/jest/bin/jest", | ||
"args": [ | ||
"--runInBand", | ||
"--no-cache", | ||
], | ||
"outputCapture": "std", | ||
"console": "integratedTerminal", | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dist/ | ||
node_modules/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", | ||
], | ||
coverageProvider: "v8", | ||
// globalSetup: './tests/setup.ts', | ||
preset: 'ts-jest', | ||
rootDir: '', | ||
testPathIgnorePatterns: [ | ||
"/node_modules/", | ||
"/dist/" | ||
], | ||
transform: {}, | ||
transformIgnorePatterns: ["./dist/.+\\.js"] | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.