@hyperdx/cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -17
- package/dist/cli.js +144634 -0
- package/package.json +38 -40
- package/CHANGELOG.md +0 -29
- package/LICENSE +0 -21
- package/dist/chunk-XRDNHVYP.js +0 -7586
- package/dist/chunk-XRDNHVYP.js.map +0 -1
- package/dist/index.cjs +0 -7609
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -28
- package/dist/index.js.map +0 -1
- package/dist/lib.cjs +0 -7597
- package/dist/lib.cjs.map +0 -1
- package/dist/lib.d.ts +0 -11
- package/dist/lib.js +0 -7
- package/dist/lib.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @hyperdx/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command line interface for HyperDX.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Uploading Source Maps
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Upload JavaScript source maps to HyperDX for stack trace de-obfuscation.
|
|
8
|
+
|
|
9
|
+
In your build pipeline, run the CLI tool:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @hyperdx/cli upload-sourcemaps \
|
|
13
|
+
--serviceKey "$HYPERDX_API_ACCESS_KEY" \
|
|
14
|
+
--apiUrl "$HYPERDX_API_URL" \
|
|
15
|
+
--path .next \
|
|
16
|
+
--releaseId "$RELEASE_ID"
|
|
9
17
|
```
|
|
10
18
|
|
|
11
|
-
You can also add this as an npm script
|
|
19
|
+
You can also add this as an npm script:
|
|
12
20
|
|
|
13
21
|
```json
|
|
14
|
-
// In package.json
|
|
15
|
-
|
|
16
22
|
{
|
|
17
23
|
"scripts": {
|
|
18
|
-
"upload-sourcemaps": "npx @hyperdx/cli upload-sourcemaps --path=\"
|
|
24
|
+
"upload-sourcemaps": "npx @hyperdx/cli upload-sourcemaps --path=\".next\""
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
### Options
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
| Flag | Description | Default |
|
|
32
|
+
| ------------------------- | ------------------------------------------------------ | ------- |
|
|
33
|
+
| `-k, --serviceKey <key>` | HyperDX service account API key | |
|
|
34
|
+
| `-p, --path <dir>` | Directory containing sourcemaps | `.` |
|
|
35
|
+
| `-u, --apiUrl <url>` | HyperDX API URL (required for self-hosted deployments) | |
|
|
36
|
+
| `-rid, --releaseId <id>` | Release ID to associate with the sourcemaps | |
|
|
37
|
+
| `-bp, --basePath <path>` | Base path for the uploaded sourcemaps | |
|
|
26
38
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
yarn build
|
|
31
|
-
node dist/index.js upload ...
|
|
32
|
-
```
|
|
39
|
+
Optionally, set the `HYPERDX_SERVICE_KEY` environment variable to avoid passing
|
|
40
|
+
the `--serviceKey` flag.
|