@bhooai/nexus-ai-client 2.0.15 → 2.0.17

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bhooai/nexus-ai-client",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,4 +1,4 @@
1
- import { describe, it, expect, afterEach, beforeEach } from 'vitest';
1
+ import { describe, it, expect, afterEach, vi } from 'vitest';
2
2
  import { createServer, type Server, type IncomingMessage, type ServerResponse } from 'node:http';
3
3
  import { AiClient, AiError } from '../src/index.js';
4
4
  import type { ChatCompletionChunk } from '../src/index.js';
@@ -44,15 +44,12 @@ afterEach(() => {
44
44
  servers = [];
45
45
  });
46
46
 
47
- /** Licensed features need a master key fixture, never a real secret. */
48
- const PREV_LICENSE = process.env.NEXUS_LICENSE_KEY;
49
- beforeEach(() => {
50
- process.env.NEXUS_LICENSE_KEY = 'nxl_test_master_key_001';
51
- });
52
- afterEach(() => {
53
- if (PREV_LICENSE === undefined) delete process.env.NEXUS_LICENSE_KEY;
54
- else process.env.NEXUS_LICENSE_KEY = PREV_LICENSE;
55
- });
47
+ // The license gate is verified at app boot (ensureLicense); these tests exercise
48
+ // the client itself, so stub the gate.
49
+ vi.mock('@bhooai/nexus-crypto', () => ({
50
+ requireLicense: () => {},
51
+ LicenseError: class LicenseError extends Error {},
52
+ }));
56
53
 
57
54
  describe('AiClient', () => {
58
55
  it('chat (non-stream) parses the response', async () => {