Skip to content

Commit

Permalink
feat: add segfault handler library
Browse files Browse the repository at this point in the history
This shouldn't cause any behaviour change other than improved logging when a native library produces a crash
  • Loading branch information
Julusian committed Oct 19, 2024
1 parent c08c991 commit 8d559c9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions companion/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// Setup some fixes before loading any imports
import './Util/FixImports.js'

// Setup segfault handler
import 'segfault-raub'

// Setup logging before anything else runs
import './Log/Controller.js'

Expand Down
1 change: 1 addition & 0 deletions companion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"p-debounce": "^4.0.0",
"p-queue": "^8.0.1",
"path-to-regexp": "^8.2.0",
"segfault-raub": "^2.3.0",
"selfsigned": "^2.4.1",
"semver": "^7.6.3",
"shuttle-control-usb": "^1.5.0",
Expand Down
1 change: 1 addition & 0 deletions companion/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = {
'@serialport/bindings-cpp': 'commonjs2 @serialport/bindings-cpp',
'@napi-rs/canvas': 'commonjs2 @napi-rs/canvas',
'better-sqlite3': 'commonjs2 better-sqlite3',
'segfault-raub': 'commonjs2 segfault-raub',
},
experiments: {
topLevelAwait: true,
Expand Down
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5440,6 +5440,20 @@ __metadata:
languageName: node
linkType: hard

"addon-tools-raub@npm:^8.0.0":
version: 8.0.0
resolution: "addon-tools-raub@npm:8.0.0"
dependencies:
node-gyp: "npm:latest"
peerDependencies:
node-addon-api: ^8.0.0
peerDependenciesMeta:
node-addon-api:
optional: true
checksum: 10c0/3c1709ec437dc7857dd97870af54cd3f13e5d8ee5ba0fdc36ed15f379fea62e35a63fbebf146a89031d5b3577ca44dad1031341fbee8ae09612e69f4a3c23729
languageName: node
linkType: hard

"ag-auth@npm:^2.1.0":
version: 2.1.0
resolution: "ag-auth@npm:2.1.0"
Expand Down Expand Up @@ -6690,6 +6704,7 @@ asn1@evs-broadcast/node-asn1:
p-debounce: "npm:^4.0.0"
p-queue: "npm:^8.0.1"
path-to-regexp: "npm:^8.2.0"
segfault-raub: "npm:^2.3.0"
selfsigned: "npm:^2.4.1"
semver: "npm:^7.6.3"
shuttle-control-usb: "npm:^1.5.0"
Expand Down Expand Up @@ -12637,6 +12652,16 @@ asn1@evs-broadcast/node-asn1:
languageName: node
linkType: hard

"segfault-raub@npm:^2.3.0":
version: 2.3.0
resolution: "segfault-raub@npm:2.3.0"
dependencies:
addon-tools-raub: "npm:^8.0.0"
node-gyp: "npm:latest"
checksum: 10c0/26a3a684d20398710c6dbfb92b79e083b18519271daacd9b49151f0bfa44dcdd4abd0bda04af3bb50bfbfbfa7fde3fcf2c29b6a65d986dc788aa4b8b65aba50b
languageName: node
linkType: hard

"selfsigned@npm:^2.4.1":
version: 2.4.1
resolution: "selfsigned@npm:2.4.1"
Expand Down

0 comments on commit 8d559c9

Please sign in to comment.