@coldiq/mcp 5.4.3 → 5.4.4

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.
@@ -223,7 +223,7 @@ describe('registry', () => {
223
223
  })
224
224
 
225
225
  it('BlitzAPI folds industries into keywords (industry filter requires LinkedIn taxonomy)', () => {
226
- const providers = getProviders('search_companies')
226
+ const providers = getConfiguredProviders('search_companies')
227
227
  const blitz = providers.find((p) => p.id === 'blitzapi')!
228
228
  const result = blitz.mapParams({
229
229
  keywords: ['AI'],
@@ -246,7 +246,7 @@ describe('registry', () => {
246
246
  })
247
247
 
248
248
  it('BlitzAPI isApplicable rejects empty input but accepts basic narrowing filters', () => {
249
- const providers = getProviders('search_companies')
249
+ const providers = getConfiguredProviders('search_companies')
250
250
  const blitz = providers.find((p) => p.id === 'blitzapi')!
251
251
  expect(blitz.isApplicable!({})).toBe(false)
252
252
  expect(blitz.isApplicable!({ keywords: ['AI'] })).toBe(true)
@@ -255,7 +255,7 @@ describe('registry', () => {
255
255
  })
256
256
 
257
257
  it('BlitzAPI isApplicable rejects advanced filters it cannot apply', () => {
258
- const providers = getProviders('search_companies')
258
+ const providers = getConfiguredProviders('search_companies')
259
259
  const blitz = providers.find((p) => p.id === 'blitzapi')!
260
260
  expect(blitz.isApplicable!({ technologies: ['Salesforce'] })).toBe(false)
261
261
  expect(blitz.isApplicable!({ funding_stages: ['series_a'] })).toBe(false)
@@ -271,7 +271,7 @@ describe('registry', () => {
271
271
  })
272
272
 
273
273
  it('BlitzAPI postFilter enforces employee count when present, passes through when missing', () => {
274
- const providers = getProviders('search_companies')
274
+ const providers = getConfiguredProviders('search_companies')
275
275
  const blitz = providers.find((p) => p.id === 'blitzapi')!
276
276
  const results = [
277
277
  { name: 'A', employees_on_linkedin: 30 },
@@ -284,7 +284,7 @@ describe('registry', () => {
284
284
  })
285
285
 
286
286
  it('BlitzAPI postFilter is a no-op when no employee filters are set', () => {
287
- const providers = getProviders('search_companies')
287
+ const providers = getConfiguredProviders('search_companies')
288
288
  const blitz = providers.find((p) => p.id === 'blitzapi')!
289
289
  const results = [{ name: 'A', employees_on_linkedin: 30 }]
290
290
  const out = blitz.postFilter!({ results }, {}) as Record<string, unknown>
@@ -292,7 +292,7 @@ describe('registry', () => {
292
292
  })
293
293
 
294
294
  it('BlitzAPI caps max_results at 50', () => {
295
- const providers = getProviders('search_companies')
295
+ const providers = getConfiguredProviders('search_companies')
296
296
  const blitz = providers.find((p) => p.id === 'blitzapi')!
297
297
  const result = blitz.mapParams({ keywords: ['AI'], limit: 100 })
298
298
  expect((result.body as { max_results: number }).max_results).toBe(50)
@@ -472,7 +472,6 @@ describe('registry', () => {
472
472
  'fullenrich',
473
473
  'theirstack',
474
474
  'signalbase',
475
- 'blitzapi',
476
475
  'apollo',
477
476
  'limadata',
478
477
  'predictleads',
@@ -800,7 +799,7 @@ describe('registry', () => {
800
799
  const ids = getProviders('enrich_company').map((p) => p.id)
801
800
  expect(ids).toEqual([
802
801
  'apollo', 'limadata', 'prospeo',
803
- 'blitzapi', 'wiza', 'findymail', 'icypeas',
802
+ 'wiza', 'findymail', 'icypeas',
804
803
  'builtwith', 'openmart', 'linkupapi-by-domain', 'linkupapi-by-url', 'discolike',
805
804
  ])
806
805
  })
@@ -890,7 +889,7 @@ describe('registry', () => {
890
889
  })
891
890
 
892
891
  it('BlitzAPI is gated on linkedin_url and passes company_linkedin_url', () => {
893
- const bz = getProviders('enrich_company').find((p) => p.id === 'blitzapi')!
892
+ const bz = getConfiguredProviders('enrich_company').find((p) => p.id === 'blitzapi')!
894
893
  expect(bz.isApplicable!({ linkedin_url: 'https://linkedin.com/company/stripe' })).toBe(true)
895
894
  expect(bz.isApplicable!({ domain: 'stripe.com' })).toBe(false)
896
895
  expect(bz.mapParams({ linkedin_url: 'https://linkedin.com/company/stripe' }).body).toEqual({ company_linkedin_url: 'https://linkedin.com/company/stripe' })
@@ -1,14 +1,27 @@
1
1
  import { describe, it, expect } from 'vitest'
2
+ import { readFileSync } from 'node:fs'
3
+ import { fileURLToPath } from 'node:url'
2
4
  import { readPackageVersion } from '../src/version.js'
3
5
 
4
6
  describe('readPackageVersion', () => {
5
7
  it('reports the real package.json version relative to the caller URL', () => {
6
8
  // This test file sits at mcp/tests/, so '../package.json' from here is mcp/package.json.
7
9
  const version = readPackageVersion(import.meta.url)
8
- expect(version).toMatch(/^\d+\.\d+\.\d+/)
10
+ expect(version).toMatch(/^5\.4\.\d+$/)
9
11
  expect(version).not.toBe('0.1.0') // the old hardcoded placeholder
10
12
  })
11
13
 
14
+ it('keeps package.json and package-lock.json on the same 5.4.x version', () => {
15
+ const packageJsonPath = fileURLToPath(new URL('../package.json', import.meta.url))
16
+ const packageLockPath = fileURLToPath(new URL('../package-lock.json', import.meta.url))
17
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
18
+ const packageLock = JSON.parse(readFileSync(packageLockPath, 'utf8'))
19
+
20
+ expect(packageJson.version).toMatch(/^5\.4\.\d+$/)
21
+ expect(packageLock.version).toBe(packageJson.version)
22
+ expect(packageLock.packages[''].version).toBe(packageJson.version)
23
+ })
24
+
12
25
  it('falls back to 0.0.0 instead of throwing when package.json cannot be resolved', () => {
13
26
  const version = readPackageVersion('file:///nonexistent/deeply/nested/module.js')
14
27
  expect(version).toBe('0.0.0')