Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(hcc): keep metric inventories compatible with CommonJS
Alfredo Lopez5fed9f274296
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.jsonindex b27f5eef3..d4c6a7b3b 100644--- a/host-context-controller/package-lock.json+++ b/host-context-controller/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-host-context-controller",- "version": "0.1.298",+ "version": "0.1.299","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-host-context-controller",- "version": "0.1.298",+ "version": "0.1.299","license": "SEE LICENSE IN LICENSE","dependencies": {"@clerum/codex-catalog-projection": "file:../packages/codex-catalog-projection",diff --git a/host-context-controller/package.json b/host-context-controller/package.jsonindex 625714367..584a62378 100644--- a/host-context-controller/package.json+++ b/host-context-controller/package.json@@ -1,6 +1,6 @@{"name": "clerum-host-context-controller",- "version": "0.1.298",+ "version": "0.1.299","description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API","main": "dist/main.js","engines": {diff --git a/host-context-controller/src/createMetrics.test.ts b/host-context-controller/src/createMetrics.test.tsindex 9b65b5185..e142448c0 100644--- a/host-context-controller/src/createMetrics.test.ts+++ b/host-context-controller/src/createMetrics.test.ts@@ -34,7 +34,7 @@ describe('Kubernetes create instrumentation', () => {it('instruments the complete production create inventory with the matching kind', () => {const kinds: string[] = []- const root = new URL('.', import.meta.url).pathname+ const root = __dirnamefor (const relative of readdirSync(root, { recursive: true }) as string[]) {if (!relative.endsWith('.ts') ||diff --git a/host-context-controller/src/existenceReadMetrics.test.ts b/host-context-controller/src/existenceReadMetrics.test.tsindex d5923a833..fcda96ca0 100644--- a/host-context-controller/src/existenceReadMetrics.test.ts+++ b/host-context-controller/src/existenceReadMetrics.test.ts@@ -1,6 +1,7 @@import { beforeEach, describe, expect, it, vi } from 'vitest'import type * as k8s from '@kubernetes/client-node'import { readFileSync } from 'node:fs'+import { join } from 'node:path'import ts from 'typescript'import { CREATE_KINDS, createsTotal, existenceReadsTotal, registry } from './metrics'import { applyNetworkPolicy, observeExistenceRead } from './utils'@@ -38,7 +39,7 @@ it('observes the documented physical GET expressions without wrapping snapshotsfor (const [path, expected] of Object.entries(inventory)) {const source = ts.createSourceFile(path,- readFileSync(new URL(path, import.meta.url), 'utf8'),+ readFileSync(join(__dirname, path), 'utf8'),ts.ScriptTarget.Latest,true)