@elsium-ai/observe 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.
- package/dist/index.js +3 -4
- package/package.json +7 -4
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
|
}
|
|
@@ -675,7 +674,7 @@ function createMetrics(options) {
|
|
|
675
674
|
};
|
|
676
675
|
}
|
|
677
676
|
// src/audit.ts
|
|
678
|
-
import { createHash } from "crypto";
|
|
677
|
+
import { createHash } from "node:crypto";
|
|
679
678
|
function computeEventHash(event, previousHash) {
|
|
680
679
|
const content = JSON.stringify({
|
|
681
680
|
id: event.id,
|
|
@@ -836,7 +835,7 @@ function auditMiddleware(auditTrail) {
|
|
|
836
835
|
};
|
|
837
836
|
}
|
|
838
837
|
// src/provenance.ts
|
|
839
|
-
import { createHash as createHash2 } from "crypto";
|
|
838
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
840
839
|
function sha256(input) {
|
|
841
840
|
return createHash2("sha256").update(input).digest("hex");
|
|
842
841
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elsium-ai/observe",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Observability, tracing, and cost tracking for ElsiumAI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Eric Utrera <ebutrera9103@gmail.com>",
|
|
@@ -22,14 +22,17 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "bun build ./src/index.ts --outdir ./dist --target
|
|
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": "
|
|
29
|
+
"@elsium-ai/core": "^0.2.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"bun-types": "^1.3.0",
|
|
33
32
|
"typescript": "^5.7.0"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"registry": "https://registry.npmjs.org",
|
|
36
|
+
"access": "public"
|
|
34
37
|
}
|
|
35
38
|
}
|