@hyperdx/cli 0.1.0-next.0 → 0.1.0-next.1
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 +6 -0
- package/README.md +2 -2
- package/dist/{chunk-VAVYH44V.js → chunk-C6NAKRYT.js} +11 -11
- package/dist/chunk-C6NAKRYT.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.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
uploadSourcemaps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-C6NAKRYT.js";
|
|
5
5
|
|
|
6
6
|
// src/index.ts
|
|
7
7
|
import { program } from "commander";
|
|
8
8
|
program.name("@hyperdx/cli").description("HyperDX Command Line Interface");
|
|
9
|
-
program.command("upload-sourcemaps").option("-k, --
|
|
9
|
+
program.command("upload-sourcemaps").option("-k, --serviceKey <string>", "The HyperDX service account API key").option(
|
|
10
10
|
"-u, --apiUrl [string]",
|
|
11
11
|
"An optional api url for self-hosted deployments"
|
|
12
12
|
).option(
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { program } from 'commander';\nimport { uploadSourcemaps } from './lib.js';\n\nprogram.name('@hyperdx/cli').description('HyperDX Command Line Interface');\n\nprogram\n .command('upload-sourcemaps')\n .option('-k, --
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { program } from 'commander';\nimport { uploadSourcemaps } from './lib.js';\n\nprogram.name('@hyperdx/cli').description('HyperDX Command Line Interface');\n\nprogram\n .command('upload-sourcemaps')\n .option('-k, --serviceKey <string>', 'The HyperDX service account API key')\n .option(\n '-u, --apiUrl [string]',\n 'An optional api url for self-hosted deployments',\n )\n .option(\n '-rid, --releaseId [string]',\n 'An optional release id to associate the sourcemaps with',\n )\n .option(\n '-p, --path [string]',\n 'Sets the directory of where the sourcemaps are',\n '.',\n )\n .option(\n '-bp, --basePath [string]',\n 'An optional base path for the uploaded sourcemaps',\n )\n .action(uploadSourcemaps);\n\nprogram.parse();\n"],"mappings":";;;;;;AACA,SAAS,eAAe;AAGxB,QAAQ,KAAK,cAAc,EAAE,YAAY,gCAAgC;AAEzE,QACG,QAAQ,mBAAmB,EAC3B,OAAO,6BAA6B,qCAAqC,EACzE;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC,OAAO,gBAAgB;AAE1B,QAAQ,MAAM;","names":[]}
|
package/dist/lib.cjs
CHANGED
|
@@ -317,7 +317,7 @@ var require_package = __commonJS({
|
|
|
317
317
|
"package.json"(exports, module2) {
|
|
318
318
|
module2.exports = {
|
|
319
319
|
name: "@hyperdx/cli",
|
|
320
|
-
version: "0.1.0-next.
|
|
320
|
+
version: "0.1.0-next.1",
|
|
321
321
|
description: "HyperDX command line tool",
|
|
322
322
|
publishConfig: {
|
|
323
323
|
access: "public"
|
|
@@ -3088,7 +3088,7 @@ var import_fs = require("fs");
|
|
|
3088
3088
|
var actualFS = __toESM(require("fs"), 1);
|
|
3089
3089
|
var import_promises = require("fs/promises");
|
|
3090
3090
|
|
|
3091
|
-
// ../../node_modules/minipass/dist/esm/index.js
|
|
3091
|
+
// ../../node_modules/path-scurry/node_modules/minipass/dist/esm/index.js
|
|
3092
3092
|
var import_node_events = require("events");
|
|
3093
3093
|
var import_node_stream = __toESM(require("stream"), 1);
|
|
3094
3094
|
var import_node_string_decoder = require("string_decoder");
|
|
@@ -7453,18 +7453,18 @@ var mjs_default = Object.assign(glob, {
|
|
|
7453
7453
|
var pj = require_package();
|
|
7454
7454
|
var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
7455
7455
|
allowNoop,
|
|
7456
|
-
|
|
7456
|
+
serviceKey,
|
|
7457
7457
|
apiUrl,
|
|
7458
7458
|
basePath,
|
|
7459
7459
|
path: path2,
|
|
7460
7460
|
releaseId
|
|
7461
7461
|
}) {
|
|
7462
7462
|
var _a4;
|
|
7463
|
-
if (!
|
|
7464
|
-
if (process.env.
|
|
7465
|
-
|
|
7463
|
+
if (!serviceKey || serviceKey === "") {
|
|
7464
|
+
if (process.env.HYPERDX_SERVICE_KEY) {
|
|
7465
|
+
serviceKey = process.env.HYPERDX_SERVICE_KEY;
|
|
7466
7466
|
} else {
|
|
7467
|
-
throw new Error("
|
|
7467
|
+
throw new Error("service key cannot be empty");
|
|
7468
7468
|
}
|
|
7469
7469
|
}
|
|
7470
7470
|
const backend = apiUrl || "https://api.hyperdx.io";
|
|
@@ -7472,7 +7472,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7472
7472
|
method: "get",
|
|
7473
7473
|
headers: {
|
|
7474
7474
|
"Content-Type": "application/json",
|
|
7475
|
-
Authorization: `Bearer ${
|
|
7475
|
+
Authorization: `Bearer ${serviceKey}`
|
|
7476
7476
|
}
|
|
7477
7477
|
}).then((response) => response.json()).then((data) => {
|
|
7478
7478
|
return data;
|
|
@@ -7481,7 +7481,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7481
7481
|
});
|
|
7482
7482
|
const teamId = (_a4 = res == null ? void 0 : res.user) == null ? void 0 : _a4.team;
|
|
7483
7483
|
if (!teamId) {
|
|
7484
|
-
throw new Error("invalid
|
|
7484
|
+
throw new Error("invalid service key");
|
|
7485
7485
|
}
|
|
7486
7486
|
console.info(`Starting to upload source maps from ${path2}`);
|
|
7487
7487
|
const fileList = yield getAllSourceMapFiles([path2], { allowNoop });
|
|
@@ -7503,7 +7503,7 @@ var uploadSourcemaps = (_0) => __async(void 0, [_0], function* ({
|
|
|
7503
7503
|
method: "post",
|
|
7504
7504
|
headers: {
|
|
7505
7505
|
"Content-Type": "application/json",
|
|
7506
|
-
Authorization: `Bearer ${
|
|
7506
|
+
Authorization: `Bearer ${serviceKey}`
|
|
7507
7507
|
},
|
|
7508
7508
|
body: JSON.stringify({
|
|
7509
7509
|
pkgVersion: pj.version,
|