@santi020k/lumen-mcp 0.4.0 → 1.1.0

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.
@@ -6,7 +6,7 @@ const host = process.env.LUMEN_MCP_HOST ?? '127.0.0.1'
6
6
 
7
7
  const allowedHosts = process.env.LUMEN_MCP_ALLOWED_HOSTS
8
8
  ?.split(',')
9
- .map((value) => value.trim())
9
+ .map(value => value.trim())
10
10
  .filter(Boolean)
11
11
 
12
12
  try {
@@ -6,11 +6,11 @@ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..')
6
6
  const repoRoot = resolve(packageRoot, '../..')
7
7
  const distEntry = join(packageRoot, 'dist/index.js')
8
8
 
9
- const filesIn = async (directory) => {
9
+ const filesIn = async directory => {
10
10
  const fs = await import('node:fs/promises')
11
11
  const entries = await fs.readdir(directory, { withFileTypes: true })
12
12
 
13
- const nested = await Promise.all(entries.map((entry) => {
13
+ const nested = await Promise.all(entries.map(entry => {
14
14
  const path = join(directory, entry.name)
15
15
 
16
16
  return entry.isDirectory() ? filesIn(path) : [path]
@@ -30,16 +30,14 @@ const needsBuild = async () => {
30
30
 
31
31
  const outputTime = (await fs.stat(distEntry)).mtimeMs
32
32
  const sourceFiles = await filesIn(join(packageRoot, 'src'))
33
- const sourceTimes = await Promise.all(sourceFiles.map(async (path) => (await fs.stat(path)).mtimeMs))
33
+ const sourceTimes = await Promise.all(sourceFiles.map(async path => (await fs.stat(path)).mtimeMs))
34
34
 
35
- return sourceTimes.some((modifiedTime) => modifiedTime > outputTime)
35
+ return sourceTimes.some(modifiedTime => modifiedTime > outputTime)
36
36
  }
37
37
 
38
38
  if (await needsBuild()) {
39
39
  const build = spawnSync(
40
- 'pnpm',
41
- ['--filter', '@santi020k/lumen-mcp', 'build'],
42
- {
40
+ 'pnpm', ['--filter', '@santi020k/lumen-mcp', 'build'], {
43
41
  cwd: repoRoot,
44
42
  stdio: ['ignore', process.stderr, process.stderr]
45
43
  }
package/bin/lumen-mcp.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { startLumenMcp } from '../dist/index.js'
3
3
 
4
- startLumenMcp().catch((error) => {
4
+ startLumenMcp().catch(error => {
5
5
  process.stderr.write('lumen-mcp failed to start: ' + String(error) + '\n')
6
6
 
7
7
  process.exitCode = 1