bluera-knowledge 0.9.32 → 0.9.34

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.
Files changed (196) hide show
  1. package/.claude/hooks/post-edit-check.sh +5 -3
  2. package/.claude/skills/atomic-commits/SKILL.md +3 -1
  3. package/.husky/pre-commit +3 -2
  4. package/.prettierrc +9 -0
  5. package/.versionrc.json +1 -1
  6. package/CHANGELOG.md +33 -0
  7. package/CLAUDE.md +6 -0
  8. package/README.md +25 -13
  9. package/bun.lock +277 -33
  10. package/dist/{chunk-L2YVNC63.js → chunk-6FHWC36B.js} +9 -1
  11. package/dist/chunk-6FHWC36B.js.map +1 -0
  12. package/dist/{chunk-RST4XGRL.js → chunk-DC7CGSGT.js} +288 -241
  13. package/dist/chunk-DC7CGSGT.js.map +1 -0
  14. package/dist/{chunk-6PBP5DVD.js → chunk-WFNPNAAP.js} +3212 -3054
  15. package/dist/chunk-WFNPNAAP.js.map +1 -0
  16. package/dist/{chunk-WT2DAEO7.js → chunk-Z2KKVH45.js} +548 -482
  17. package/dist/chunk-Z2KKVH45.js.map +1 -0
  18. package/dist/index.js +871 -758
  19. package/dist/index.js.map +1 -1
  20. package/dist/mcp/server.js +3 -3
  21. package/dist/watch.service-BJV3TI3F.js +7 -0
  22. package/dist/workers/background-worker-cli.js +46 -45
  23. package/dist/workers/background-worker-cli.js.map +1 -1
  24. package/eslint.config.js +43 -1
  25. package/package.json +18 -11
  26. package/plugin.json +8 -0
  27. package/python/requirements.txt +1 -1
  28. package/src/analysis/ast-parser.test.ts +12 -11
  29. package/src/analysis/ast-parser.ts +28 -22
  30. package/src/analysis/code-graph.test.ts +52 -62
  31. package/src/analysis/code-graph.ts +9 -13
  32. package/src/analysis/dependency-usage-analyzer.test.ts +91 -271
  33. package/src/analysis/dependency-usage-analyzer.ts +52 -24
  34. package/src/analysis/go-ast-parser.test.ts +22 -22
  35. package/src/analysis/go-ast-parser.ts +18 -25
  36. package/src/analysis/parser-factory.test.ts +9 -9
  37. package/src/analysis/parser-factory.ts +3 -3
  38. package/src/analysis/python-ast-parser.test.ts +27 -27
  39. package/src/analysis/python-ast-parser.ts +2 -2
  40. package/src/analysis/repo-url-resolver.test.ts +82 -82
  41. package/src/analysis/rust-ast-parser.test.ts +19 -19
  42. package/src/analysis/rust-ast-parser.ts +17 -27
  43. package/src/analysis/tree-sitter-parser.test.ts +3 -3
  44. package/src/analysis/tree-sitter-parser.ts +10 -16
  45. package/src/cli/commands/crawl.test.ts +40 -24
  46. package/src/cli/commands/crawl.ts +186 -166
  47. package/src/cli/commands/index-cmd.test.ts +90 -90
  48. package/src/cli/commands/index-cmd.ts +52 -36
  49. package/src/cli/commands/mcp.test.ts +6 -6
  50. package/src/cli/commands/mcp.ts +2 -2
  51. package/src/cli/commands/plugin-api.test.ts +16 -18
  52. package/src/cli/commands/plugin-api.ts +9 -6
  53. package/src/cli/commands/search.test.ts +16 -7
  54. package/src/cli/commands/search.ts +124 -87
  55. package/src/cli/commands/serve.test.ts +67 -25
  56. package/src/cli/commands/serve.ts +18 -3
  57. package/src/cli/commands/setup.test.ts +176 -101
  58. package/src/cli/commands/setup.ts +140 -117
  59. package/src/cli/commands/store.test.ts +82 -53
  60. package/src/cli/commands/store.ts +56 -37
  61. package/src/cli/program.ts +2 -2
  62. package/src/crawl/article-converter.test.ts +4 -1
  63. package/src/crawl/article-converter.ts +46 -31
  64. package/src/crawl/bridge.test.ts +240 -132
  65. package/src/crawl/bridge.ts +87 -30
  66. package/src/crawl/claude-client.test.ts +124 -56
  67. package/src/crawl/claude-client.ts +7 -15
  68. package/src/crawl/intelligent-crawler.test.ts +65 -22
  69. package/src/crawl/intelligent-crawler.ts +86 -53
  70. package/src/crawl/markdown-utils.ts +1 -4
  71. package/src/db/embeddings.ts +4 -6
  72. package/src/db/lance.test.ts +4 -4
  73. package/src/db/lance.ts +16 -12
  74. package/src/index.ts +26 -17
  75. package/src/logging/index.ts +1 -5
  76. package/src/logging/logger.ts +3 -5
  77. package/src/logging/payload.test.ts +1 -1
  78. package/src/logging/payload.ts +3 -5
  79. package/src/mcp/commands/index.ts +2 -2
  80. package/src/mcp/commands/job.commands.ts +12 -18
  81. package/src/mcp/commands/meta.commands.ts +13 -13
  82. package/src/mcp/commands/registry.ts +5 -8
  83. package/src/mcp/commands/store.commands.ts +19 -19
  84. package/src/mcp/handlers/execute.handler.test.ts +10 -10
  85. package/src/mcp/handlers/execute.handler.ts +4 -5
  86. package/src/mcp/handlers/index.ts +10 -14
  87. package/src/mcp/handlers/job.handler.test.ts +10 -10
  88. package/src/mcp/handlers/job.handler.ts +22 -25
  89. package/src/mcp/handlers/search.handler.test.ts +36 -65
  90. package/src/mcp/handlers/search.handler.ts +135 -104
  91. package/src/mcp/handlers/store.handler.test.ts +41 -52
  92. package/src/mcp/handlers/store.handler.ts +108 -88
  93. package/src/mcp/schemas/index.test.ts +73 -68
  94. package/src/mcp/schemas/index.ts +18 -12
  95. package/src/mcp/server.test.ts +1 -1
  96. package/src/mcp/server.ts +59 -46
  97. package/src/plugin/commands.test.ts +230 -95
  98. package/src/plugin/commands.ts +24 -25
  99. package/src/plugin/dependency-analyzer.test.ts +52 -52
  100. package/src/plugin/dependency-analyzer.ts +85 -22
  101. package/src/plugin/git-clone.test.ts +24 -13
  102. package/src/plugin/git-clone.ts +3 -7
  103. package/src/server/app.test.ts +109 -109
  104. package/src/server/app.ts +32 -23
  105. package/src/server/index.test.ts +64 -66
  106. package/src/services/chunking.service.test.ts +32 -32
  107. package/src/services/chunking.service.ts +16 -9
  108. package/src/services/code-graph.service.test.ts +30 -36
  109. package/src/services/code-graph.service.ts +24 -10
  110. package/src/services/code-unit.service.test.ts +55 -11
  111. package/src/services/code-unit.service.ts +85 -11
  112. package/src/services/config.service.test.ts +37 -18
  113. package/src/services/config.service.ts +30 -7
  114. package/src/services/index.service.test.ts +49 -18
  115. package/src/services/index.service.ts +98 -48
  116. package/src/services/index.ts +6 -9
  117. package/src/services/job.service.test.ts +22 -22
  118. package/src/services/job.service.ts +18 -18
  119. package/src/services/project-root.service.test.ts +1 -3
  120. package/src/services/search.service.test.ts +248 -120
  121. package/src/services/search.service.ts +286 -156
  122. package/src/services/services.test.ts +1 -1
  123. package/src/services/snippet.service.test.ts +14 -6
  124. package/src/services/snippet.service.ts +7 -5
  125. package/src/services/store.service.test.ts +68 -29
  126. package/src/services/store.service.ts +41 -12
  127. package/src/services/watch.service.test.ts +34 -14
  128. package/src/services/watch.service.ts +11 -1
  129. package/src/types/brands.test.ts +3 -1
  130. package/src/types/index.ts +2 -13
  131. package/src/types/search.ts +10 -8
  132. package/src/utils/type-guards.test.ts +20 -15
  133. package/src/utils/type-guards.ts +1 -1
  134. package/src/workers/background-worker-cli.ts +2 -2
  135. package/src/workers/background-worker.test.ts +54 -40
  136. package/src/workers/background-worker.ts +76 -60
  137. package/src/workers/spawn-worker.test.ts +22 -10
  138. package/src/workers/spawn-worker.ts +6 -6
  139. package/tests/analysis/ast-parser.test.ts +3 -3
  140. package/tests/analysis/code-graph.test.ts +5 -5
  141. package/tests/fixtures/code-snippets/api/error-handling.ts +4 -15
  142. package/tests/fixtures/code-snippets/api/rest-controller.ts +3 -9
  143. package/tests/fixtures/code-snippets/auth/jwt-auth.ts +5 -21
  144. package/tests/fixtures/code-snippets/auth/oauth-flow.ts +4 -4
  145. package/tests/fixtures/code-snippets/database/repository-pattern.ts +11 -3
  146. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/handler.ts +2 -2
  147. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-pages/handler.ts +1 -1
  148. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/serve-static.ts +2 -2
  149. package/tests/fixtures/corpus/oss-repos/hono/src/client/client.ts +2 -2
  150. package/tests/fixtures/corpus/oss-repos/hono/src/client/types.ts +22 -20
  151. package/tests/fixtures/corpus/oss-repos/hono/src/context.ts +13 -10
  152. package/tests/fixtures/corpus/oss-repos/hono/src/helper/accepts/accepts.ts +10 -7
  153. package/tests/fixtures/corpus/oss-repos/hono/src/helper/adapter/index.ts +2 -2
  154. package/tests/fixtures/corpus/oss-repos/hono/src/helper/css/index.ts +1 -1
  155. package/tests/fixtures/corpus/oss-repos/hono/src/helper/factory/index.ts +16 -16
  156. package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/ssg.ts +2 -2
  157. package/tests/fixtures/corpus/oss-repos/hono/src/hono-base.ts +3 -3
  158. package/tests/fixtures/corpus/oss-repos/hono/src/hono.ts +1 -1
  159. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/css.ts +2 -2
  160. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/intrinsic-element/components.ts +1 -1
  161. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/render.ts +7 -7
  162. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/hooks/index.ts +3 -3
  163. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-element/components.ts +1 -1
  164. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/utils.ts +6 -6
  165. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jsx-renderer/index.ts +3 -3
  166. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/serve-static/index.ts +1 -1
  167. package/tests/fixtures/corpus/oss-repos/hono/src/preset/quick.ts +1 -1
  168. package/tests/fixtures/corpus/oss-repos/hono/src/preset/tiny.ts +1 -1
  169. package/tests/fixtures/corpus/oss-repos/hono/src/router/pattern-router/router.ts +2 -2
  170. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/node.ts +4 -4
  171. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/router.ts +1 -1
  172. package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/node.ts +1 -1
  173. package/tests/fixtures/corpus/oss-repos/hono/src/types.ts +166 -169
  174. package/tests/fixtures/corpus/oss-repos/hono/src/utils/body.ts +8 -8
  175. package/tests/fixtures/corpus/oss-repos/hono/src/utils/color.ts +3 -3
  176. package/tests/fixtures/corpus/oss-repos/hono/src/utils/cookie.ts +2 -2
  177. package/tests/fixtures/corpus/oss-repos/hono/src/utils/encode.ts +2 -2
  178. package/tests/fixtures/corpus/oss-repos/hono/src/utils/types.ts +30 -33
  179. package/tests/fixtures/corpus/oss-repos/hono/src/validator/validator.ts +2 -2
  180. package/tests/fixtures/test-server.ts +3 -2
  181. package/tests/helpers/performance-metrics.ts +8 -25
  182. package/tests/helpers/search-relevance.ts +14 -69
  183. package/tests/integration/cli-consistency.test.ts +5 -4
  184. package/tests/integration/python-bridge.test.ts +13 -3
  185. package/tests/mcp/server.test.ts +1 -1
  186. package/tests/services/code-unit.service.test.ts +48 -0
  187. package/tests/services/job.service.test.ts +124 -0
  188. package/tests/services/search.progressive-context.test.ts +2 -2
  189. package/.claude-plugin/plugin.json +0 -13
  190. package/dist/chunk-6PBP5DVD.js.map +0 -1
  191. package/dist/chunk-L2YVNC63.js.map +0 -1
  192. package/dist/chunk-RST4XGRL.js.map +0 -1
  193. package/dist/chunk-WT2DAEO7.js.map +0 -1
  194. package/dist/watch.service-YAIKKDCF.js +0 -7
  195. package/skills/atomic-commits/SKILL.md +0 -77
  196. /package/dist/{watch.service-YAIKKDCF.js.map → watch.service-BJV3TI3F.js.map} +0 -0
@@ -169,7 +169,7 @@ export interface ToSSGOptions {
169
169
  export const fetchRoutesContent = function* <
170
170
  E extends Env = Env,
171
171
  S extends Schema = {},
172
- BasePath extends string = '/'
172
+ BasePath extends string = '/',
173
173
  >(
174
174
  app: Hono<E, S, BasePath>,
175
175
  beforeRequestHook?: BeforeRequestHook,
@@ -323,7 +323,7 @@ export interface ToSSGInterface {
323
323
  export interface ToSSGAdaptorInterface<
324
324
  E extends Env = Env,
325
325
  S extends Schema = {},
326
- BasePath extends string = '/'
326
+ BasePath extends string = '/',
327
327
  > {
328
328
  (app: Hono<E, S, BasePath>, options?: ToSSGOptions): Promise<ToSSGResult>
329
329
  }
@@ -171,7 +171,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
171
171
  const strict = options.strict ?? true
172
172
  delete options.strict
173
173
  Object.assign(this, options)
174
- this.getPath = strict ? options.getPath ?? getPath : getPathNoStrict
174
+ this.getPath = strict ? (options.getPath ?? getPath) : getPathNoStrict
175
175
  }
176
176
 
177
177
  private clone(): Hono<E, S, BasePath> {
@@ -208,7 +208,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
208
208
  SubPath extends string,
209
209
  SubEnv extends Env,
210
210
  SubSchema extends Schema,
211
- SubBasePath extends string
211
+ SubBasePath extends string,
212
212
  >(
213
213
  path: SubPath,
214
214
  app: Hono<SubEnv, SubSchema, SubBasePath>
@@ -434,7 +434,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
434
434
  resolved || (c.finalized ? c.res : this.notFoundHandler(c))
435
435
  )
436
436
  .catch((err: Error) => this.handleError(err, c))
437
- : res ?? this.notFoundHandler(c)
437
+ : (res ?? this.notFoundHandler(c))
438
438
  }
439
439
 
440
440
  const composed = compose<Context>(matchResult[0], this.errorHandler, this.notFoundHandler)
@@ -16,7 +16,7 @@ import type { BlankEnv, BlankSchema, Env, Schema } from './types'
16
16
  export class Hono<
17
17
  E extends Env = BlankEnv,
18
18
  S extends Schema = BlankSchema,
19
- BasePath extends string = '/'
19
+ BasePath extends string = '/',
20
20
  > extends HonoBase<E, S, BasePath> {
21
21
  /**
22
22
  * Creates an instance of the Hono class.
@@ -66,7 +66,7 @@ interface CreateCssJsxDomObjectsType {
66
66
  {
67
67
  toString(this: CssClassName): string
68
68
  },
69
- FC<PropsWithChildren<void>>
69
+ FC<PropsWithChildren<void>>,
70
70
  ]
71
71
  }
72
72
 
@@ -133,7 +133,7 @@ export const createCssJsxDomObjects: CreateCssJsxDomObjectsType = ({ id }) => {
133
133
  ),
134
134
  },
135
135
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
136
- } as any)
136
+ }) as any
137
137
 
138
138
  return [cssObject, Style] as const
139
139
  }
@@ -108,7 +108,7 @@ const documentMetadataTag = (
108
108
  existingElements = head.querySelectorAll<HTMLElement>(tag)
109
109
  }
110
110
 
111
- precedence = supportSort ? precedence ?? '' : undefined
111
+ precedence = supportSort ? (precedence ?? '') : undefined
112
112
  if (supportSort) {
113
113
  restProps[dataPrecedenceAttr] = precedence
114
114
  }
@@ -51,7 +51,7 @@ export type NodeObject = {
51
51
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
52
  any[][], // stash for hooks
53
53
  LocalJSXContexts, // context
54
- [Context, Function, NodeObject] // [context, error handler, node] for closest error boundary or suspense
54
+ [Context, Function, NodeObject], // [context, error handler, node] for closest error boundary or suspense
55
55
  ]
56
56
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
57
  | [number, any[][]]
@@ -88,7 +88,7 @@ export type Context =
88
88
  UpdateHook, // update hook
89
89
  boolean, // is in view transition
90
90
  boolean, // is in top level render
91
- [Context, Function, NodeObject][] // [context, error handler, node] stack for this context
91
+ [Context, Function, NodeObject][], // [context, error handler, node] stack for this context
92
92
  ]
93
93
  | [PendingType, boolean, UpdateHook, boolean]
94
94
  | [PendingType, boolean, UpdateHook]
@@ -462,8 +462,8 @@ export const build = (context: Context, node: NodeObject, children?: Child[]): v
462
462
  const oldVChildren: Node[] | undefined = buildWithPreviousChildren
463
463
  ? [...(node.pC as Node[])]
464
464
  : node.vC
465
- ? [...node.vC]
466
- : undefined
465
+ ? [...node.vC]
466
+ : undefined
467
467
  const vChildren: Node[] = []
468
468
  let prevNode: Node | undefined
469
469
  for (let i = 0; i < children.length; i++) {
@@ -491,8 +491,8 @@ export const build = (context: Context, node: NodeObject, children?: Child[]): v
491
491
  isNodeString(child)
492
492
  ? (c) => isNodeString(c)
493
493
  : child.key !== undefined
494
- ? (c) => c.key === (child as Node).key && c.tag === (child as Node).tag
495
- : (c) => c.tag === (child as Node).tag
494
+ ? (c) => c.key === (child as Node).key && c.tag === (child as Node).tag
495
+ : (c) => c.tag === (child as Node).tag
496
496
  )
497
497
 
498
498
  if (i !== -1) {
@@ -769,4 +769,4 @@ export const createPortal = (children: Child, container: HTMLElement, key?: stri
769
769
  e: container,
770
770
  p: 1,
771
771
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
772
- } as any)
772
+ }) as any
@@ -16,7 +16,7 @@ export type EffectData = [
16
16
  (() => void | (() => void)) | undefined, // layout effect
17
17
  (() => void) | undefined, // cleanup
18
18
  (() => void) | undefined, // effect
19
- (() => void) | undefined // insertion effect
19
+ (() => void) | undefined, // insertion effect
20
20
  ]
21
21
 
22
22
  const resolvedPromiseValueMap: WeakMap<Promise<unknown>, unknown> = new WeakMap<
@@ -36,7 +36,7 @@ const isDepsChanged = (
36
36
  let viewTransitionState:
37
37
  | [
38
38
  boolean, // isUpdating
39
- boolean // useViewTransition() is called
39
+ boolean, // useViewTransition() is called
40
40
  ]
41
41
  | undefined = undefined
42
42
 
@@ -208,7 +208,7 @@ export const useState: UseStateType = <T>(
208
208
  if (pendingStack.length) {
209
209
  const [pendingType, pendingPromise] = pendingStack.at(-1) as [
210
210
  PendingType | 3,
211
- Promise<void>
211
+ Promise<void>,
212
212
  ]
213
213
  Promise.all([
214
214
  pendingType === 3
@@ -85,7 +85,7 @@ const documentMetadataTag = (tag: string, children: Child, props: Props, sort: b
85
85
 
86
86
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
87
87
  let { precedence, blocking, ...restProps } = props
88
- precedence = sort ? precedence ?? '' : undefined
88
+ precedence = sort ? (precedence ?? '') : undefined
89
89
  if (sort) {
90
90
  restProps[dataPrecedenceAttr] = precedence
91
91
  }
@@ -25,12 +25,12 @@ export const styleObjectForEach = (
25
25
  v == null
26
26
  ? null
27
27
  : typeof v === 'number'
28
- ? !key.match(
29
- /^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/
30
- )
31
- ? `${v}px`
32
- : `${v}`
33
- : v
28
+ ? !key.match(
29
+ /^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/
30
+ )
31
+ ? `${v}px`
32
+ : `${v}`
33
+ : v
34
34
  )
35
35
  }
36
36
  }
@@ -37,8 +37,8 @@ const createRenderer =
37
37
  typeof options?.docType === 'string'
38
38
  ? options.docType
39
39
  : options?.docType === false
40
- ? ''
41
- : '<!DOCTYPE html>'
40
+ ? ''
41
+ : '<!DOCTYPE html>'
42
42
 
43
43
  const currentLayout = component
44
44
  ? jsx(
@@ -148,7 +148,7 @@ export const jsxRenderer = (
148
148
  export const useRequestContext = <
149
149
  E extends Env = any,
150
150
  P extends string = any,
151
- I extends Input = {}
151
+ I extends Input = {},
152
152
  >(): Context<E, P, I> => {
153
153
  const c = useContext(RequestContext)
154
154
  if (!c) {
@@ -97,7 +97,7 @@ export const serveStatic = <E extends Env = Env>(
97
97
  }
98
98
 
99
99
  const mimeType = options.mimes
100
- ? getMimeType(path, options.mimes) ?? getMimeType(path)
100
+ ? (getMimeType(path, options.mimes) ?? getMimeType(path))
101
101
  : getMimeType(path)
102
102
 
103
103
  if (mimeType) {
@@ -13,7 +13,7 @@ import type { BlankEnv, BlankSchema, Env, Schema } from '../types'
13
13
  export class Hono<
14
14
  E extends Env = BlankEnv,
15
15
  S extends Schema = BlankSchema,
16
- BasePath extends string = '/'
16
+ BasePath extends string = '/',
17
17
  > extends HonoBase<E, S, BasePath> {
18
18
  constructor(options: HonoOptions<E> = {}) {
19
19
  super(options)
@@ -11,7 +11,7 @@ import type { BlankEnv, BlankSchema, Env, Schema } from '../types'
11
11
  export class Hono<
12
12
  E extends Env = BlankEnv,
13
13
  S extends Schema = BlankSchema,
14
- BasePath extends string = '/'
14
+ BasePath extends string = '/',
15
15
  > extends HonoBase<E, S, BasePath> {
16
16
  constructor(options: HonoOptions<E> = {}) {
17
17
  super(options)
@@ -23,8 +23,8 @@ export class PatternRouter<T> implements Router<T> {
23
23
  return match
24
24
  ? `/(?<${match[1]}>${match[2] || '[^/]+'})`
25
25
  : part === '/*'
26
- ? '/[^/]+'
27
- : part.replace(/[.\\+*[^\]$()]/g, '\\$&')
26
+ ? '/[^/]+'
27
+ : part.replace(/[.\\+*[^\]$()]/g, '\\$&')
28
28
  }
29
29
  )
30
30
 
@@ -73,8 +73,8 @@ export class Node {
73
73
  ? ['', '', ONLY_WILDCARD_REG_EXP_STR] // '*' matches to all the trailing paths
74
74
  : ['', '', LABEL_REG_EXP_STR]
75
75
  : token === '/*'
76
- ? ['', '', TAIL_WILDCARD_REG_EXP_STR] // '/path/to/*' is /\/path\/to(?:|/.*)$
77
- : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/)
76
+ ? ['', '', TAIL_WILDCARD_REG_EXP_STR] // '/path/to/*' is /\/path\/to(?:|/.*)$
77
+ : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/)
78
78
 
79
79
  let node
80
80
  if (pattern) {
@@ -138,8 +138,8 @@ export class Node {
138
138
  (typeof c.varIndex === 'number'
139
139
  ? `(${k})@${c.varIndex}`
140
140
  : regExpMetaChars.has(k)
141
- ? `\\${k}`
142
- : k) + c.buildRegExpStr()
141
+ ? `\\${k}`
142
+ : k) + c.buildRegExpStr()
143
143
  )
144
144
  })
145
145
 
@@ -259,7 +259,7 @@ export class RegExpRouter<T> implements Router<T> {
259
259
  routes.push(
260
260
  ...(Object.keys(r[METHOD_NAME_ALL]).map((path) => [path, r[METHOD_NAME_ALL][path]]) as [
261
261
  string,
262
- HandlerWithMetadata<T>[]
262
+ HandlerWithMetadata<T>[],
263
263
  ][])
264
264
  )
265
265
  }
@@ -103,7 +103,7 @@ export class Node<T> {
103
103
  handlerSet.possibleKeys.forEach((key) => {
104
104
  const processed = processedSet[handlerSet.name]
105
105
  handlerSet.params[key] =
106
- params[key] && !processed ? params[key] : nodeParams[key] ?? params[key]
106
+ params[key] && !processed ? params[key] : (nodeParams[key] ?? params[key])
107
107
  processedSet[handlerSet.name] = true
108
108
  })
109
109
  handlerSets.push(handlerSet)