@hyperdx/cli 0.1.0-next.0 → 0.1.0
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/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/dist/{chunk-VAVYH44V.js → chunk-S7T44OTP.js} +11 -11
- package/dist/chunk-S7T44OTP.js.map +1 -0
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +10 -10
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.ts +2 -2
- package/dist/lib.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-VAVYH44V.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @hyperdx/cli
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5ca35ee: chore: first release
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 72ad2ff: style: rename apiKey input arg to serviceKey
|
|
12
|
+
|
|
13
|
+
## 0.1.0-next.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 72ad2ff: style: rename apiKey input arg to serviceKey
|
|
18
|
+
|
|
3
19
|
## 0.1.0-next.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
In your build pipeline, you will need to run the CLI tool. Here's how to run it:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npx @hyperdx/cli upload-sourcemaps --path="/path/to/sourcemaps" --
|
|
8
|
+
npx @hyperdx/cli upload-sourcemaps --path="/path/to/sourcemaps" --serviceKey="your-service-account-api-key"
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
You can also add this as an npm script
|
|
@@ -20,7 +20,7 @@ You can also add this as an npm script
|
|
|
20
20
|
}
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Optionally, you can set the `
|
|
23
|
+
Optionally, you can set the `HYPERDX_SERVICE_KEY` environment variable to avoid passing the `serviceKey` flag.
|
|
24
24
|
|
|
25
25
|
## Contributing
|
|
26
26
|
|
|
@@ -311,7 +311,7 @@ var require_package = __commonJS({
|
|
|
311
311
|
"package.json"(exports, module) {
|
|
312
312
|
module.exports = {
|
|
313
313
|
name: "@hyperdx/cli",
|
|
314
|
-
version: "0.1.0
|
|
314
|
+
version: "0.1.0",
|
|
315
315
|
description: "HyperDX command line tool",
|
|
316
316
|
publishConfig: {
|
|
317
317
|
access: "public"
|
|
@@ -3077,7 +3077,7 @@ import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSyn
|
|
|
3077
3077
|
import * as actualFS from "fs";
|
|
3078
3078
|
import { lstat, readdir, readlink, realpath } from "fs/promises";
|
|
3079
3079
|
|
|
3080
|
-
// ../../node_modules/minipass/dist/esm/index.js
|
|
3080
|
+
// ../../node_modules/path-scurry/node_modules/minipass/dist/esm/index.js
|
|
3081
3081
|
import { EventEmitter } from "events";
|
|
3082
3082
|
import Stream from "stream";
|
|
3083
3083
|
import { StringDecoder } from "string_decoder";
|
|
@@ -7442,18 +7442,18 @@ var mjs_default = Object.assign(glob, {
|
|
|
7442
7442
|
var pj = require_package();
|
|
7443
7443
|
var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
7444
7444
|
allowNoop,
|
|
7445
|
-
|
|
7445
|
+
serviceKey,
|
|
7446
7446
|
apiUrl,
|
|
7447
7447
|
basePath,
|
|
7448
7448
|
path: path2,
|
|
7449
7449
|
releaseId
|
|
7450
7450
|
}) {
|
|
7451
7451
|
var _a4;
|
|
7452
|
-
if (!
|
|
7453
|
-
if (process.env.
|
|
7454
|
-
|
|
7452
|
+
if (!serviceKey || serviceKey === "") {
|
|
7453
|
+
if (process.env.HYPERDX_SERVICE_KEY) {
|
|
7454
|
+
serviceKey = process.env.HYPERDX_SERVICE_KEY;
|
|
7455
7455
|
} else {
|
|
7456
|
-
throw new Error("
|
|
7456
|
+
throw new Error("service key cannot be empty");
|
|
7457
7457
|
}
|
|
7458
7458
|
}
|
|
7459
7459
|
const backend = apiUrl || "https://api.hyperdx.io";
|
|
@@ -7461,7 +7461,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7461
7461
|
method: "get",
|
|
7462
7462
|
headers: {
|
|
7463
7463
|
"Content-Type": "application/json",
|
|
7464
|
-
Authorization: `Bearer ${
|
|
7464
|
+
Authorization: `Bearer ${serviceKey}`
|
|
7465
7465
|
}
|
|
7466
7466
|
}).then((response) => response.json()).then((data) => {
|
|
7467
7467
|
return data;
|
|
@@ -7470,7 +7470,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7470
7470
|
});
|
|
7471
7471
|
const teamId = (_a4 = res == null ? void 0 : res.user) == null ? void 0 : _a4.team;
|
|
7472
7472
|
if (!teamId) {
|
|
7473
|
-
throw new Error("invalid
|
|
7473
|
+
throw new Error("invalid service key");
|
|
7474
7474
|
}
|
|
7475
7475
|
console.info(`Starting to upload source maps from ${path2}`);
|
|
7476
7476
|
const fileList = yield getAllSourceMapFiles([path2], { allowNoop });
|
|
@@ -7492,7 +7492,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7492
7492
|
method: "post",
|
|
7493
7493
|
headers: {
|
|
7494
7494
|
"Content-Type": "application/json",
|
|
7495
|
-
Authorization: `Bearer ${
|
|
7495
|
+
Authorization: `Bearer ${serviceKey}`
|
|
7496
7496
|
},
|
|
7497
7497
|
body: JSON.stringify({
|
|
7498
7498
|
pkgVersion: pj.version,
|
|
@@ -7577,4 +7577,4 @@ function uploadFile(filePath, uploadUrl, name) {
|
|
|
7577
7577
|
export {
|
|
7578
7578
|
uploadSourcemaps
|
|
7579
7579
|
};
|
|
7580
|
-
//# sourceMappingURL=chunk-
|
|
7580
|
+
//# sourceMappingURL=chunk-S7T44OTP.js.map
|