@terreno/ai 0.11.5 → 0.11.6

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/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "@types/multer": "^1.4.12",
23
23
  "@types/passport-local-mongoose": "^6.1.5",
24
24
  "@types/supertest": "^6.0.2",
25
- "@terreno/api": "0.11.5",
25
+ "@terreno/api": "0.11.6",
26
26
  "mongoose": "8.23.0",
27
27
  "passport-local-mongoose": "^9.0.1",
28
28
  "supertest": "^7.0.0",
@@ -63,7 +63,7 @@
63
63
  "access": "public"
64
64
  },
65
65
  "peerDependencies": {
66
- "@terreno/api": "0.11.5",
66
+ "@terreno/api": "0.11.6",
67
67
  "mongoose": "^8.0.0"
68
68
  },
69
69
  "repository": {
@@ -82,5 +82,5 @@
82
82
  "test:coverage": "bun run ../scripts/check-coverage.ts"
83
83
  },
84
84
  "types": "dist/index.d.ts",
85
- "version": "0.11.5"
85
+ "version": "0.11.6"
86
86
  }
@@ -1,11 +1,8 @@
1
1
  import {beforeEach, describe, expect, it, mock} from "bun:test";
2
2
 
3
3
  const shutdownMock = mock(async () => {});
4
- let ctorCalls = 0;
5
4
  class FakeLangfuseClient {
6
- constructor(public opts: {baseUrl?: string; publicKey: string; secretKey: string}) {
7
- ctorCalls += 1;
8
- }
5
+ constructor(public opts: {baseUrl?: string; publicKey: string; secretKey: string}) {}
9
6
  async shutdown(): Promise<void> {
10
7
  return shutdownMock();
11
8
  }
@@ -21,7 +18,6 @@ const {getLangfuseClient, initLangfuseClient, isLangfuseInitialized, shutdownLan
21
18
  describe("langfuseClient", () => {
22
19
  beforeEach(async () => {
23
20
  await shutdownLangfuseClient();
24
- ctorCalls = 0;
25
21
  });
26
22
 
27
23
  it("throws when accessing client before initialization", () => {
@@ -122,8 +122,8 @@ describe("getPrompt", () => {
122
122
  expect(cached).toBeTruthy();
123
123
  const expectedExpiryMs = Date.now() + 120_000;
124
124
  // Allow some slack for test execution time
125
- expect(cached!.expiresAt.getTime()).toBeGreaterThan(expectedExpiryMs - 5000);
126
- expect(cached!.expiresAt.getTime()).toBeLessThan(expectedExpiryMs + 5000);
125
+ expect(cached?.expiresAt.getTime()).toBeGreaterThan(expectedExpiryMs - 5000);
126
+ expect(cached?.expiresAt.getTime()).toBeLessThan(expectedExpiryMs + 5000);
127
127
  });
128
128
 
129
129
  it("throws when Langfuse fetch fails", async () => {