@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/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  uploadSourcemaps
4
- } from "./chunk-VAVYH44V.js";
4
+ } from "./chunk-S7T44OTP.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, --apiKey <string>", "The HyperDX personal api access key").option(
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, --apiKey <string>', 'The HyperDX personal api access 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,yBAAyB,qCAAqC,EACrE;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":[]}
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.0",
320
+ version: "0.1.0",
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
- apiKey,
7456
+ serviceKey,
7457
7457
  apiUrl,
7458
7458
  basePath,
7459
7459
  path: path2,
7460
7460
  releaseId
7461
7461
  }) {
7462
7462
  var _a4;
7463
- if (!apiKey || apiKey === "") {
7464
- if (process.env.HYPERDX_API_ACCESS_KEY) {
7465
- apiKey = process.env.HYPERDX_API_ACCESS_KEY;
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("api key cannot be empty");
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 ${apiKey}`
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 api key");
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 ${apiKey}`
7506
+ Authorization: `Bearer ${serviceKey}`
7507
7507
  },
7508
7508
  body: JSON.stringify({
7509
7509
  pkgVersion: pj.version,