Skip to content

Commit b35ae13

Browse files
authored
fix: global script invocation (#13)
* fix: global script invocation * fix: make inputPath and outputPath required args
1 parent c2f6ecc commit b35ae13

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

package-lock.json

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

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "3.0.10",
44
"description": "Neon wrapper for Mozilla's dump_syms",
55
"main": "./dist/index.js",
6+
"bin": {
7+
"node-dump-syms": "./dist/bin/index.js"
8+
},
69
"scripts": {
710
"start": "ts-node ./bin/index.ts RUST_BACKTRACE=1 ./spec/test_data/linux/my-ubuntu-crasher ./out/my-ubuntu-crasher.sym",
811
"prestart": "npm run build:debug && npm run pretest",
@@ -19,6 +22,7 @@
1922
"copy:rust": "npx copyfiles native/index.node dist",
2023
"pretest": "rimraf out && mkdirp out",
2124
"test": "npm run test:rust && npm run test:tsc",
25+
"pretest:rust": "npm run build:rust-debug",
2226
"test:rust": "cargo test",
2327
"test:tsc": "ts-node ./node_modules/.bin/jasmine",
2428
"install": "npx @mapbox/node-pre-gyp install --fallback-to-build=false || npm run build:client",
@@ -46,7 +50,7 @@
4650
"@bugsplat/node-pre-gyp-github": "^1.4.5",
4751
"@mapbox/node-pre-gyp": "^1.0.11",
4852
"@types/jasmine": "^5.1.4",
49-
"@types/node": "^20.11.29",
53+
"@types/node": "^20.17.32",
5054
"cargo-cp-artifact": "^0.1.9",
5155
"copyfiles": "^2.4.1",
5256
"jasmine": "^5.1.0",

src/dump.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@ const nodeDumpSyms = require('../native/index.node');
22

33
export function dumpSyms(inputPath: string, outputPath: string): void {
44
// TODO BG support other options here
5+
if (!inputPath) {
6+
throw new Error('inputPath is required');
7+
}
8+
9+
if (!outputPath) {
10+
throw new Error('outputPath is required');
11+
}
12+
513
return nodeDumpSyms.dumpSymbols([inputPath], outputPath);
614
}

0 commit comments

Comments
 (0)