@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/dist/index.cjs
CHANGED
|
@@ -313,7 +313,7 @@ var require_package = __commonJS({
|
|
|
313
313
|
"package.json"(exports, module2) {
|
|
314
314
|
module2.exports = {
|
|
315
315
|
name: "@hyperdx/cli",
|
|
316
|
-
version: "0.1.0
|
|
316
|
+
version: "0.1.0",
|
|
317
317
|
description: "HyperDX command line tool",
|
|
318
318
|
publishConfig: {
|
|
319
319
|
access: "public"
|
|
@@ -3082,7 +3082,7 @@ var import_fs = require("fs");
|
|
|
3082
3082
|
var actualFS = __toESM(require("fs"), 1);
|
|
3083
3083
|
var import_promises = require("fs/promises");
|
|
3084
3084
|
|
|
3085
|
-
// ../../node_modules/minipass/dist/esm/index.js
|
|
3085
|
+
// ../../node_modules/path-scurry/node_modules/minipass/dist/esm/index.js
|
|
3086
3086
|
var import_node_events = require("events");
|
|
3087
3087
|
var import_node_stream = __toESM(require("stream"), 1);
|
|
3088
3088
|
var import_node_string_decoder = require("string_decoder");
|
|
@@ -7447,18 +7447,18 @@ var mjs_default = Object.assign(glob, {
|
|
|
7447
7447
|
var pj = require_package();
|
|
7448
7448
|
var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
7449
7449
|
allowNoop,
|
|
7450
|
-
|
|
7450
|
+
serviceKey,
|
|
7451
7451
|
apiUrl,
|
|
7452
7452
|
basePath,
|
|
7453
7453
|
path: path2,
|
|
7454
7454
|
releaseId
|
|
7455
7455
|
}) {
|
|
7456
7456
|
var _a4;
|
|
7457
|
-
if (!
|
|
7458
|
-
if (process.env.
|
|
7459
|
-
|
|
7457
|
+
if (!serviceKey || serviceKey === "") {
|
|
7458
|
+
if (process.env.HYPERDX_SERVICE_KEY) {
|
|
7459
|
+
serviceKey = process.env.HYPERDX_SERVICE_KEY;
|
|
7460
7460
|
} else {
|
|
7461
|
-
throw new Error("
|
|
7461
|
+
throw new Error("service key cannot be empty");
|
|
7462
7462
|
}
|
|
7463
7463
|
}
|
|
7464
7464
|
const backend = apiUrl || "https://api.hyperdx.io";
|
|
@@ -7466,7 +7466,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7466
7466
|
method: "get",
|
|
7467
7467
|
headers: {
|
|
7468
7468
|
"Content-Type": "application/json",
|
|
7469
|
-
Authorization: `Bearer ${
|
|
7469
|
+
Authorization: `Bearer ${serviceKey}`
|
|
7470
7470
|
}
|
|
7471
7471
|
}).then((response) => response.json()).then((data) => {
|
|
7472
7472
|
return data;
|
|
@@ -7475,7 +7475,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7475
7475
|
});
|
|
7476
7476
|
const teamId = (_a4 = res == null ? void 0 : res.user) == null ? void 0 : _a4.team;
|
|
7477
7477
|
if (!teamId) {
|
|
7478
|
-
throw new Error("invalid
|
|
7478
|
+
throw new Error("invalid service key");
|
|
7479
7479
|
}
|
|
7480
7480
|
console.info(`Starting to upload source maps from ${path2}`);
|
|
7481
7481
|
const fileList = yield getAllSourceMapFiles([path2], { allowNoop });
|
|
@@ -7497,7 +7497,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7497
7497
|
method: "post",
|
|
7498
7498
|
headers: {
|
|
7499
7499
|
"Content-Type": "application/json",
|
|
7500
|
-
Authorization: `Bearer ${
|
|
7500
|
+
Authorization: `Bearer ${serviceKey}`
|
|
7501
7501
|
},
|
|
7502
7502
|
body: JSON.stringify({
|
|
7503
7503
|
pkgVersion: pj.version,
|
|
@@ -7581,7 +7581,7 @@ function uploadFile(filePath, uploadUrl, name) {
|
|
|
7581
7581
|
|
|
7582
7582
|
// src/index.ts
|
|
7583
7583
|
import_commander.program.name("@hyperdx/cli").description("HyperDX Command Line Interface");
|
|
7584
|
-
import_commander.program.command("upload-sourcemaps").option("-k, --
|
|
7584
|
+
import_commander.program.command("upload-sourcemaps").option("-k, --serviceKey <string>", "The HyperDX service account API key").option(
|
|
7585
7585
|
"-u, --apiUrl [string]",
|
|
7586
7586
|
"An optional api url for self-hosted deployments"
|
|
7587
7587
|
).option(
|