axiom 0.28.0 → 0.29.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/bin.cjs CHANGED
@@ -260,7 +260,7 @@ var import_api4 = require("@opentelemetry/api");
260
260
  // package.json
261
261
  var package_default = {
262
262
  name: "axiom",
263
- version: "0.28.0",
263
+ version: "0.29.0",
264
264
  type: "module",
265
265
  author: "Axiom, Inc.",
266
266
  contributors: [
@@ -921,10 +921,7 @@ var buildConsoleUrl = (urlString) => {
921
921
  return `${url.protocol}//app.${url.host.split("api.").at(-1)}`;
922
922
  };
923
923
  function resolveAxiomConnection(config) {
924
- let consoleEndpointUrl = buildConsoleUrl(config.eval.url);
925
- if ("__overrideEndpointUrl" in config.eval) {
926
- consoleEndpointUrl = config.eval.__overrideEndpointUrl;
927
- }
924
+ const consoleEndpointUrl = getConsoleUrl() ?? buildConsoleUrl(config.eval.url);
928
925
  return {
929
926
  url: config.eval.url,
930
927
  consoleEndpointUrl,
@@ -1545,11 +1542,11 @@ function setupEvalProvider(connection) {
1545
1542
  axiomProvider = new import_sdk_trace_node.NodeTracerProvider({
1546
1543
  resource: (0, import_resources.resourceFromAttributes)({
1547
1544
  ["service.name"]: "axiom",
1548
- ["service.version"]: "0.28.0"
1545
+ ["service.version"]: "0.29.0"
1549
1546
  }),
1550
1547
  spanProcessors: [processor]
1551
1548
  });
1552
- axiomTracer = axiomProvider.getTracer("axiom", "0.28.0");
1549
+ axiomTracer = axiomProvider.getTracer("axiom", "0.29.0");
1553
1550
  }
1554
1551
  async function initInstrumentation(config) {
1555
1552
  if (initialized) {
@@ -1561,7 +1558,7 @@ async function initInstrumentation(config) {
1561
1558
  }
1562
1559
  initializationPromise = (async () => {
1563
1560
  if (!config.enabled) {
1564
- axiomTracer = import_api10.trace.getTracer("axiom", "0.28.0");
1561
+ axiomTracer = import_api10.trace.getTracer("axiom", "0.29.0");
1565
1562
  initialized = true;
1566
1563
  return;
1567
1564
  }
@@ -1775,6 +1772,10 @@ function isGlob(str) {
1775
1772
 
1776
1773
  // src/cli/commands/eval.command.ts
1777
1774
  var createRunId = (0, import_nanoid.customAlphabet)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 10);
1775
+ var consoleUrl;
1776
+ function getConsoleUrl() {
1777
+ return consoleUrl;
1778
+ }
1778
1779
  function getDefaultToken(value) {
1779
1780
  if (typeof value === "string") {
1780
1781
  return value;
@@ -1803,7 +1804,7 @@ var loadEvalCommand = (program2, flagOverrides = {}) => {
1803
1804
  ".",
1804
1805
  "any *.eval.ts file in current directory"
1805
1806
  )
1806
- ).option("-w, --watch true", "keep server running and watch for changes", false).option("-t, --token <TOKEN>", "axiom token", getDefaultToken).option("-d, --dataset <DATASET>", "axiom dataset name", process.env.AXIOM_DATASET).option("-u, --url <AXIOM URL>", "axiom url", getDefaultUrl).option("-o, --org-id <ORG ID>", "axiom organization id", getDefaultOrgId).option("-b, --baseline <BASELINE ID>", "id of baseline evaluation to compare against").option("--debug", "run locally without sending to Axiom or loading baselines", false).option("--list", "list evaluations and test cases without running them", false).action(async (target, options) => {
1807
+ ).option("-w, --watch true", "keep server running and watch for changes", false).option("-t, --token <TOKEN>", "axiom token", getDefaultToken).option("-d, --dataset <DATASET>", "axiom dataset name", process.env.AXIOM_DATASET).option("-u, --url <AXIOM URL>", "axiom url", getDefaultUrl).option("-o, --org-id <ORG ID>", "axiom organization id", getDefaultOrgId).option("-b, --baseline <BASELINE ID>", "id of baseline evaluation to compare against").option("--debug", "run locally without sending to Axiom or loading baselines", false).option("--list", "list evaluations and test cases without running them", false).addOption(new import_commander.Option("-c, --console-url <URL>", "console url override").hideHelp()).action(async (target, options) => {
1807
1808
  try {
1808
1809
  if (options.debug) {
1809
1810
  process.env.AXIOM_DEBUG = "true";
@@ -1848,6 +1849,7 @@ var loadEvalCommand = (program2, flagOverrides = {}) => {
1848
1849
  console.log("");
1849
1850
  }
1850
1851
  const runId = createRunId();
1852
+ consoleUrl = options.consoleUrl;
1851
1853
  await runEvalWithContext(flagOverrides, async () => {
1852
1854
  return runVitest(".", {
1853
1855
  watch: options.watch,
@@ -2333,7 +2335,7 @@ var import_commander2 = require("commander");
2333
2335
  var loadVersionCommand = (program2) => {
2334
2336
  return program2.addCommand(
2335
2337
  new import_commander2.Command("version").description("cli version").action(() => {
2336
- console.log("0.28.0");
2338
+ console.log("0.29.0");
2337
2339
  })
2338
2340
  );
2339
2341
  };
@@ -2343,7 +2345,7 @@ var { loadEnvConfig } = import_env.default;
2343
2345
  loadEnvConfig(process.cwd());
2344
2346
  var { cleanedArgv, overrides } = extractOverrides(process.argv.slice(2));
2345
2347
  var program = new import_commander3.Command();
2346
- program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.28.0");
2348
+ program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.29.0");
2347
2349
  program.hook("preAction", async (_, actionCommand) => {
2348
2350
  const commandName = actionCommand.name();
2349
2351
  const parentCommand = actionCommand.parent;