@elsium-ai/testing 0.1.7 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -9
  2. package/package.json +10 -7
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- // @bun
2
1
  // ../core/src/errors.ts
3
2
  class ElsiumError extends Error {
4
3
  code;
@@ -89,7 +88,7 @@ class ElsiumError extends Error {
89
88
  }
90
89
  }
91
90
  // ../core/src/utils.ts
92
- import { randomBytes } from "crypto";
91
+ import { randomBytes } from "node:crypto";
93
92
  function cryptoHex(bytes) {
94
93
  return randomBytes(bytes).toString("hex");
95
94
  }
@@ -419,7 +418,7 @@ function mockProvider(options = {}) {
419
418
  };
420
419
  }
421
420
  // src/fixtures.ts
422
- import { createHash } from "crypto";
421
+ import { createHash } from "node:crypto";
423
422
  function hashMessages(messages) {
424
423
  const content = messages.map((m) => `${m.role}:${m.content}`).join("|");
425
424
  return createHash("sha256").update(content).digest("hex").slice(0, 16);
@@ -781,7 +780,7 @@ function formatEvalReport(result) {
781
780
  const lines = [];
782
781
  lines.push(`
783
782
  Eval Suite: ${result.name}`);
784
- lines.push(` ${"\u2500".repeat(50)}`);
783
+ lines.push(` ${"".repeat(50)}`);
785
784
  for (const r of result.results) {
786
785
  const icon = r.passed ? "PASS" : "FAIL";
787
786
  lines.push(` [${icon}] ${r.name} (${r.durationMs}ms)`);
@@ -793,14 +792,14 @@ function formatEvalReport(result) {
793
792
  }
794
793
  }
795
794
  }
796
- lines.push(` ${"\u2500".repeat(50)}`);
795
+ lines.push(` ${"".repeat(50)}`);
797
796
  lines.push(` Score: ${(result.score * 100).toFixed(1)}% | ${result.passed}/${result.total} passed | ${result.durationMs}ms`);
798
797
  lines.push("");
799
798
  return lines.join(`
800
799
  `);
801
800
  }
802
801
  // src/snapshot.ts
803
- import { createHash as createHash2 } from "crypto";
802
+ import { createHash as createHash2 } from "node:crypto";
804
803
  function createSnapshotStore(existing) {
805
804
  const snapshots = new Map;
806
805
  if (existing) {
@@ -975,8 +974,8 @@ function createPromptRegistry() {
975
974
  };
976
975
  }
977
976
  // src/regression.ts
978
- import { mkdirSync, readFileSync, writeFileSync } from "fs";
979
- import { dirname } from "path";
977
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
978
+ import { dirname } from "node:path";
980
979
  function makeEmptyResult(name) {
981
980
  return {
982
981
  name,
@@ -1131,7 +1130,7 @@ function createReplayPlayer(entriesOrJson) {
1131
1130
  };
1132
1131
  }
1133
1132
  // src/pinning.ts
1134
- import { createHash as createHash3 } from "crypto";
1133
+ import { createHash as createHash3 } from "node:crypto";
1135
1134
  function sha256(input) {
1136
1135
  return createHash3("sha256").update(input).digest("hex");
1137
1136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elsium-ai/testing",
3
- "version": "0.1.7",
3
+ "version": "0.2.1",
4
4
  "description": "Testing utilities, mock providers, fixtures, and eval framework for ElsiumAI",
5
5
  "license": "MIT",
6
6
  "author": "Eric Utrera <ebutrera9103@gmail.com>",
@@ -22,17 +22,20 @@
22
22
  "dist"
23
23
  ],
24
24
  "scripts": {
25
- "build": "bun build ./src/index.ts --outdir ./dist --target bun && bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
25
+ "build": "bun build ./src/index.ts --outdir ./dist --target node && bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
26
26
  "dev": "bun --watch src/index.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@elsium-ai/core": "workspace:*",
30
- "@elsium-ai/gateway": "workspace:*",
31
- "@elsium-ai/agents": "workspace:*",
32
- "@elsium-ai/tools": "workspace:*"
29
+ "@elsium-ai/core": "^0.2.1",
30
+ "@elsium-ai/gateway": "^0.2.1",
31
+ "@elsium-ai/agents": "^0.2.1",
32
+ "@elsium-ai/tools": "^0.2.1"
33
33
  },
34
34
  "devDependencies": {
35
- "bun-types": "^1.3.0",
36
35
  "typescript": "^5.7.0"
36
+ },
37
+ "publishConfig": {
38
+ "registry": "https://registry.npmjs.org",
39
+ "access": "public"
37
40
  }
38
41
  }