@skillcap/gdh 3.2.0 → 3.2.2

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 (636) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/README.md +1 -1
  3. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +139 -0
  4. package/node_modules/@clack/core/CHANGELOG.md +8 -0
  5. package/node_modules/@clack/core/dist/index.d.mts +18 -4
  6. package/node_modules/@clack/core/dist/index.mjs +16 -10
  7. package/node_modules/@clack/core/dist/index.mjs.map +1 -1
  8. package/node_modules/@clack/core/package.json +5 -2
  9. package/node_modules/@clack/prompts/CHANGELOG.md +15 -0
  10. package/node_modules/@clack/prompts/README.md +107 -2
  11. package/node_modules/@clack/prompts/dist/index.d.mts +16 -11
  12. package/node_modules/@clack/prompts/dist/index.mjs +114 -107
  13. package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
  14. package/node_modules/@clack/prompts/package.json +7 -4
  15. package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
  16. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +1 -1
  17. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
  18. package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts.map +1 -1
  19. package/node_modules/@gdh/adapters/dist/claude-settings-patch.js +4 -2
  20. package/node_modules/@gdh/adapters/dist/claude-settings-patch.js.map +1 -1
  21. package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts +1 -1
  22. package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
  23. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +2 -2
  24. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
  25. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts +1 -1
  26. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
  27. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +2 -2
  28. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
  29. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts +1 -1
  30. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts.map +1 -1
  31. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +2 -2
  32. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js.map +1 -1
  33. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts.map +1 -1
  34. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js +1 -1
  35. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js.map +1 -1
  36. package/node_modules/@gdh/adapters/dist/durable-backup.d.ts.map +1 -1
  37. package/node_modules/@gdh/adapters/dist/durable-backup.js +3 -5
  38. package/node_modules/@gdh/adapters/dist/durable-backup.js.map +1 -1
  39. package/node_modules/@gdh/adapters/dist/index.d.ts +11 -37
  40. package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
  41. package/node_modules/@gdh/adapters/dist/index.js +18 -90
  42. package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
  43. package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts.map +1 -1
  44. package/node_modules/@gdh/adapters/dist/inventory-sweep.js +1 -3
  45. package/node_modules/@gdh/adapters/dist/inventory-sweep.js.map +1 -1
  46. package/node_modules/@gdh/adapters/dist/managed-surfaces.d.ts +32 -0
  47. package/node_modules/@gdh/adapters/dist/managed-surfaces.d.ts.map +1 -0
  48. package/node_modules/@gdh/adapters/dist/managed-surfaces.js +66 -0
  49. package/node_modules/@gdh/adapters/dist/managed-surfaces.js.map +1 -0
  50. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts +1 -1
  51. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts.map +1 -1
  52. package/node_modules/@gdh/adapters/dist/process-orchestration.js +3 -2
  53. package/node_modules/@gdh/adapters/dist/process-orchestration.js.map +1 -1
  54. package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts.map +1 -1
  55. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +11 -23
  56. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
  57. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
  58. package/node_modules/@gdh/adapters/dist/skill-rendering.js +3 -9
  59. package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
  60. package/node_modules/@gdh/adapters/dist/template-assets.js.map +1 -1
  61. package/node_modules/@gdh/adapters/dist/templates/claude-statusline.js.tpl +1 -2
  62. package/node_modules/@gdh/adapters/package.json +7 -8
  63. package/node_modules/@gdh/authoring/dist/authoring-state-store.d.ts.map +1 -1
  64. package/node_modules/@gdh/authoring/dist/authoring-state-store.js.map +1 -1
  65. package/node_modules/@gdh/authoring/dist/cache.d.ts.map +1 -1
  66. package/node_modules/@gdh/authoring/dist/cache.js.map +1 -1
  67. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts +2 -2
  68. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts.map +1 -1
  69. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js +2 -2
  70. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js.map +1 -1
  71. package/node_modules/@gdh/authoring/dist/diagnostics-broker.d.ts.map +1 -1
  72. package/node_modules/@gdh/authoring/dist/diagnostics-broker.js +15 -12
  73. package/node_modules/@gdh/authoring/dist/diagnostics-broker.js.map +1 -1
  74. package/node_modules/@gdh/authoring/dist/lsp-broker-snapshot.d.ts.map +1 -1
  75. package/node_modules/@gdh/authoring/dist/lsp-broker-snapshot.js.map +1 -1
  76. package/node_modules/@gdh/authoring/dist/lsp-client.d.ts.map +1 -1
  77. package/node_modules/@gdh/authoring/dist/lsp-client.js.map +1 -1
  78. package/node_modules/@gdh/authoring/dist/lsp-constants.d.ts +17 -0
  79. package/node_modules/@gdh/authoring/dist/lsp-constants.d.ts.map +1 -0
  80. package/node_modules/@gdh/authoring/dist/lsp-constants.js +17 -0
  81. package/node_modules/@gdh/authoring/dist/lsp-constants.js.map +1 -0
  82. package/node_modules/@gdh/authoring/dist/lsp-warmup.d.ts.map +1 -1
  83. package/node_modules/@gdh/authoring/dist/lsp-warmup.js +2 -4
  84. package/node_modules/@gdh/authoring/dist/lsp-warmup.js.map +1 -1
  85. package/node_modules/@gdh/authoring/dist/lsp.d.ts.map +1 -1
  86. package/node_modules/@gdh/authoring/dist/lsp.js +8 -46
  87. package/node_modules/@gdh/authoring/dist/lsp.js.map +1 -1
  88. package/node_modules/@gdh/authoring/dist/prepare.d.ts.map +1 -1
  89. package/node_modules/@gdh/authoring/dist/prepare.js +1 -3
  90. package/node_modules/@gdh/authoring/dist/prepare.js.map +1 -1
  91. package/node_modules/@gdh/authoring/dist/project.d.ts.map +1 -1
  92. package/node_modules/@gdh/authoring/dist/project.js +4 -13
  93. package/node_modules/@gdh/authoring/dist/project.js.map +1 -1
  94. package/node_modules/@gdh/authoring/dist/report.d.ts.map +1 -1
  95. package/node_modules/@gdh/authoring/dist/report.js +2 -11
  96. package/node_modules/@gdh/authoring/dist/report.js.map +1 -1
  97. package/node_modules/@gdh/authoring/dist/scene-resource.d.ts.map +1 -1
  98. package/node_modules/@gdh/authoring/dist/scene-resource.js.map +1 -1
  99. package/node_modules/@gdh/authoring/dist/tcp-port.d.ts +2 -0
  100. package/node_modules/@gdh/authoring/dist/tcp-port.d.ts.map +1 -0
  101. package/node_modules/@gdh/authoring/dist/tcp-port.js +23 -0
  102. package/node_modules/@gdh/authoring/dist/tcp-port.js.map +1 -0
  103. package/node_modules/@gdh/authoring/dist/warmup.d.ts.map +1 -1
  104. package/node_modules/@gdh/authoring/dist/warmup.js.map +1 -1
  105. package/node_modules/@gdh/authoring/package.json +2 -2
  106. package/node_modules/@gdh/cli/dist/args.d.ts +44 -0
  107. package/node_modules/@gdh/cli/dist/args.d.ts.map +1 -0
  108. package/node_modules/@gdh/cli/dist/args.js +124 -0
  109. package/node_modules/@gdh/cli/dist/args.js.map +1 -0
  110. package/node_modules/@gdh/cli/dist/bridge-session.d.ts +1 -1
  111. package/node_modules/@gdh/cli/dist/bridge-session.d.ts.map +1 -1
  112. package/node_modules/@gdh/cli/dist/bridge-session.js +8 -7
  113. package/node_modules/@gdh/cli/dist/bridge-session.js.map +1 -1
  114. package/node_modules/@gdh/cli/dist/index.d.ts +4 -52
  115. package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
  116. package/node_modules/@gdh/cli/dist/index.js +8 -197
  117. package/node_modules/@gdh/cli/dist/index.js.map +1 -1
  118. package/node_modules/@gdh/cli/dist/io.d.ts +10 -0
  119. package/node_modules/@gdh/cli/dist/io.d.ts.map +1 -0
  120. package/node_modules/@gdh/cli/dist/io.js +26 -0
  121. package/node_modules/@gdh/cli/dist/io.js.map +1 -0
  122. package/node_modules/@gdh/cli/dist/migrate.d.ts +1 -1
  123. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  124. package/node_modules/@gdh/cli/dist/migrate.js +23 -30
  125. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  126. package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
  127. package/node_modules/@gdh/cli/dist/self-update.js +13 -20
  128. package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
  129. package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
  130. package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
  131. package/node_modules/@gdh/cli/dist/status-command.d.ts +3 -0
  132. package/node_modules/@gdh/cli/dist/status-command.d.ts.map +1 -0
  133. package/node_modules/@gdh/cli/dist/status-command.js +44 -0
  134. package/node_modules/@gdh/cli/dist/status-command.js.map +1 -0
  135. package/node_modules/@gdh/cli/dist/update-banner.d.ts.map +1 -1
  136. package/node_modules/@gdh/cli/dist/update-banner.js +1 -1
  137. package/node_modules/@gdh/cli/dist/update-banner.js.map +1 -1
  138. package/node_modules/@gdh/cli/package.json +11 -11
  139. package/node_modules/@gdh/core/dist/dev-mode.d.ts.map +1 -1
  140. package/node_modules/@gdh/core/dist/dev-mode.js.map +1 -1
  141. package/node_modules/@gdh/core/dist/editor-operation-runner.d.ts +3 -0
  142. package/node_modules/@gdh/core/dist/editor-operation-runner.d.ts.map +1 -0
  143. package/node_modules/@gdh/core/dist/editor-operation-runner.js +682 -0
  144. package/node_modules/@gdh/core/dist/editor-operation-runner.js.map +1 -0
  145. package/node_modules/@gdh/core/dist/git-root.d.ts.map +1 -1
  146. package/node_modules/@gdh/core/dist/git-root.js +4 -1
  147. package/node_modules/@gdh/core/dist/git-root.js.map +1 -1
  148. package/node_modules/@gdh/core/dist/godot-docs-version.d.ts.map +1 -1
  149. package/node_modules/@gdh/core/dist/godot-docs-version.js.map +1 -1
  150. package/node_modules/@gdh/core/dist/godot-stderr-fatality.d.ts.map +1 -1
  151. package/node_modules/@gdh/core/dist/godot-stderr-fatality.js +1 -2
  152. package/node_modules/@gdh/core/dist/godot-stderr-fatality.js.map +1 -1
  153. package/node_modules/@gdh/core/dist/index.d.ts +11 -5
  154. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  155. package/node_modules/@gdh/core/dist/index.js +20 -5
  156. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  157. package/node_modules/@gdh/core/dist/managed-gitignore.d.ts.map +1 -1
  158. package/node_modules/@gdh/core/dist/managed-gitignore.js +4 -14
  159. package/node_modules/@gdh/core/dist/managed-gitignore.js.map +1 -1
  160. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts.map +1 -1
  161. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js +2 -2
  162. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js.map +1 -1
  163. package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts.map +1 -1
  164. package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js +6 -14
  165. package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js.map +1 -1
  166. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts.map +1 -1
  167. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js +7 -23
  168. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js.map +1 -1
  169. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts.map +1 -1
  170. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js.map +1 -1
  171. package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts.map +1 -1
  172. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js +1 -2
  173. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js.map +1 -1
  174. package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts.map +1 -1
  175. package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts.map +1 -1
  176. package/node_modules/@gdh/core/dist/migrations/golden-harness.js.map +1 -1
  177. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -1
  178. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -1
  179. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts +5 -5
  180. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts.map +1 -1
  181. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js +4 -7
  182. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js.map +1 -1
  183. package/node_modules/@gdh/core/dist/migrations/probes.d.ts.map +1 -1
  184. package/node_modules/@gdh/core/dist/migrations/probes.js.map +1 -1
  185. package/node_modules/@gdh/core/dist/migrations/registry.d.ts +1 -1
  186. package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -1
  187. package/node_modules/@gdh/core/dist/migrations/registry.js +3 -6
  188. package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -1
  189. package/node_modules/@gdh/core/dist/official-docs.d.ts.map +1 -1
  190. package/node_modules/@gdh/core/dist/release-span-preview.d.ts.map +1 -1
  191. package/node_modules/@gdh/core/dist/release-span-preview.js +1 -1
  192. package/node_modules/@gdh/core/dist/release-span-preview.js.map +1 -1
  193. package/node_modules/@gdh/core/dist/release-span-update-contract.d.ts.map +1 -1
  194. package/node_modules/@gdh/core/dist/release-span-update-contract.js +5 -10
  195. package/node_modules/@gdh/core/dist/release-span-update-contract.js.map +1 -1
  196. package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts.map +1 -1
  197. package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js.map +1 -1
  198. package/node_modules/@gdh/core/dist/state/migration-state.d.ts.map +1 -1
  199. package/node_modules/@gdh/core/dist/state/migration-state.js +3 -8
  200. package/node_modules/@gdh/core/dist/state/migration-state.js.map +1 -1
  201. package/node_modules/@gdh/core/dist/state/migration-trace.d.ts.map +1 -1
  202. package/node_modules/@gdh/core/dist/state/migration-trace.js +3 -8
  203. package/node_modules/@gdh/core/dist/state/migration-trace.js.map +1 -1
  204. package/node_modules/@gdh/core/dist/state/render-inventory.d.ts.map +1 -1
  205. package/node_modules/@gdh/core/dist/state/render-inventory.js.map +1 -1
  206. package/node_modules/@gdh/core/dist/update-cache.d.ts.map +1 -1
  207. package/node_modules/@gdh/core/dist/update-cache.js.map +1 -1
  208. package/node_modules/@gdh/core/dist/update-probe.d.ts.map +1 -1
  209. package/node_modules/@gdh/core/dist/update-probe.js +1 -3
  210. package/node_modules/@gdh/core/dist/update-probe.js.map +1 -1
  211. package/node_modules/@gdh/core/package.json +1 -1
  212. package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
  213. package/node_modules/@gdh/docs/dist/agent-contract.js +2 -4
  214. package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
  215. package/node_modules/@gdh/docs/dist/files.d.ts +1 -1
  216. package/node_modules/@gdh/docs/dist/files.d.ts.map +1 -1
  217. package/node_modules/@gdh/docs/dist/guidance.js +1 -1
  218. package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
  219. package/node_modules/@gdh/docs/dist/index.d.ts +4 -4
  220. package/node_modules/@gdh/docs/dist/index.d.ts.map +1 -1
  221. package/node_modules/@gdh/docs/dist/index.js +3 -3
  222. package/node_modules/@gdh/docs/dist/index.js.map +1 -1
  223. package/node_modules/@gdh/docs/dist/official-docs.d.ts.map +1 -1
  224. package/node_modules/@gdh/docs/dist/official-docs.js +16 -5
  225. package/node_modules/@gdh/docs/dist/official-docs.js.map +1 -1
  226. package/node_modules/@gdh/docs/dist/query.d.ts.map +1 -1
  227. package/node_modules/@gdh/docs/dist/query.js +8 -3
  228. package/node_modules/@gdh/docs/dist/query.js.map +1 -1
  229. package/node_modules/@gdh/docs/dist/recovery-hints.d.ts.map +1 -1
  230. package/node_modules/@gdh/docs/dist/recovery-hints.js +0 -1
  231. package/node_modules/@gdh/docs/dist/recovery-hints.js.map +1 -1
  232. package/node_modules/@gdh/docs/dist/template-assets.js.map +1 -1
  233. package/node_modules/@gdh/docs/package.json +2 -2
  234. package/node_modules/@gdh/editor/dist/index.d.ts +1 -3
  235. package/node_modules/@gdh/editor/dist/index.d.ts.map +1 -1
  236. package/node_modules/@gdh/editor/dist/index.js +9 -682
  237. package/node_modules/@gdh/editor/dist/index.js.map +1 -1
  238. package/node_modules/@gdh/editor/package.json +2 -2
  239. package/node_modules/@gdh/mcp/dist/bridge-tools.d.ts +8 -1
  240. package/node_modules/@gdh/mcp/dist/bridge-tools.d.ts.map +1 -1
  241. package/node_modules/@gdh/mcp/dist/bridge-tools.js +81 -2
  242. package/node_modules/@gdh/mcp/dist/bridge-tools.js.map +1 -1
  243. package/node_modules/@gdh/mcp/dist/index.d.ts.map +1 -1
  244. package/node_modules/@gdh/mcp/dist/index.js +10 -77
  245. package/node_modules/@gdh/mcp/dist/index.js.map +1 -1
  246. package/node_modules/@gdh/mcp/package.json +8 -10
  247. package/node_modules/@gdh/observability/dist/guidance-audit.d.ts.map +1 -1
  248. package/node_modules/@gdh/observability/dist/guidance-audit.js +11 -21
  249. package/node_modules/@gdh/observability/dist/guidance-audit.js.map +1 -1
  250. package/node_modules/@gdh/observability/dist/index.d.ts +2 -2
  251. package/node_modules/@gdh/observability/dist/index.d.ts.map +1 -1
  252. package/node_modules/@gdh/observability/dist/index.js +1 -1
  253. package/node_modules/@gdh/observability/dist/index.js.map +1 -1
  254. package/node_modules/@gdh/observability/dist/runtime-bundles.d.ts.map +1 -1
  255. package/node_modules/@gdh/observability/dist/runtime-bundles.js +3 -10
  256. package/node_modules/@gdh/observability/dist/runtime-bundles.js.map +1 -1
  257. package/node_modules/@gdh/observability/dist/runtime-corpus.d.ts.map +1 -1
  258. package/node_modules/@gdh/observability/dist/runtime-corpus.js +1 -1
  259. package/node_modules/@gdh/observability/dist/runtime-corpus.js.map +1 -1
  260. package/node_modules/@gdh/observability/package.json +3 -2
  261. package/node_modules/@gdh/runtime/dist/bridge-broker-client.d.ts +1 -1
  262. package/node_modules/@gdh/runtime/dist/bridge-broker-client.d.ts.map +1 -1
  263. package/node_modules/@gdh/runtime/dist/bridge-broker-client.js +0 -1
  264. package/node_modules/@gdh/runtime/dist/bridge-broker-client.js.map +1 -1
  265. package/node_modules/@gdh/runtime/dist/bridge-broker.d.ts +1 -1
  266. package/node_modules/@gdh/runtime/dist/bridge-broker.d.ts.map +1 -1
  267. package/node_modules/@gdh/runtime/dist/bridge-broker.js +9 -5
  268. package/node_modules/@gdh/runtime/dist/bridge-broker.js.map +1 -1
  269. package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts +1 -1
  270. package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts.map +1 -1
  271. package/node_modules/@gdh/runtime/dist/bridge-surface.js +2 -2
  272. package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
  273. package/node_modules/@gdh/runtime/dist/docker-provider.d.ts +1 -1
  274. package/node_modules/@gdh/runtime/dist/docker-provider.d.ts.map +1 -1
  275. package/node_modules/@gdh/runtime/dist/docker-provider.js +5 -16
  276. package/node_modules/@gdh/runtime/dist/docker-provider.js.map +1 -1
  277. package/node_modules/@gdh/runtime/dist/index.js +2 -1
  278. package/node_modules/@gdh/runtime/dist/index.js.map +1 -1
  279. package/node_modules/@gdh/runtime/dist/knowledge-surface.d.ts.map +1 -1
  280. package/node_modules/@gdh/runtime/dist/knowledge-surface.js +21 -10
  281. package/node_modules/@gdh/runtime/dist/knowledge-surface.js.map +1 -1
  282. package/node_modules/@gdh/runtime/package.json +2 -3
  283. package/node_modules/@gdh/scan/dist/detect-existing-onboarding.d.ts.map +1 -1
  284. package/node_modules/@gdh/scan/dist/detect-existing-onboarding.js +1 -5
  285. package/node_modules/@gdh/scan/dist/detect-existing-onboarding.js.map +1 -1
  286. package/node_modules/@gdh/scan/dist/index.d.ts +3 -3
  287. package/node_modules/@gdh/scan/dist/index.d.ts.map +1 -1
  288. package/node_modules/@gdh/scan/dist/index.js +3 -3
  289. package/node_modules/@gdh/scan/dist/index.js.map +1 -1
  290. package/node_modules/@gdh/scan/dist/inventory-cache.js +1 -1
  291. package/node_modules/@gdh/scan/dist/inventory-cache.js.map +1 -1
  292. package/node_modules/@gdh/scan/dist/onboard.d.ts +1 -2
  293. package/node_modules/@gdh/scan/dist/onboard.d.ts.map +1 -1
  294. package/node_modules/@gdh/scan/dist/onboard.js +4 -5
  295. package/node_modules/@gdh/scan/dist/onboard.js.map +1 -1
  296. package/node_modules/@gdh/scan/dist/scan.d.ts.map +1 -1
  297. package/node_modules/@gdh/scan/dist/scan.js +4 -2
  298. package/node_modules/@gdh/scan/dist/scan.js.map +1 -1
  299. package/node_modules/@gdh/scan/package.json +3 -3
  300. package/node_modules/@gdh/verify/dist/corpus.d.ts.map +1 -1
  301. package/node_modules/@gdh/verify/dist/corpus.js +7 -6
  302. package/node_modules/@gdh/verify/dist/corpus.js.map +1 -1
  303. package/node_modules/@gdh/verify/dist/index.d.ts.map +1 -1
  304. package/node_modules/@gdh/verify/dist/index.js +0 -1
  305. package/node_modules/@gdh/verify/dist/index.js.map +1 -1
  306. package/node_modules/@gdh/verify/dist/readiness.d.ts.map +1 -1
  307. package/node_modules/@gdh/verify/dist/readiness.js.map +1 -1
  308. package/node_modules/@gdh/verify/dist/scenarios.d.ts +1 -1
  309. package/node_modules/@gdh/verify/dist/scenarios.d.ts.map +1 -1
  310. package/node_modules/@gdh/verify/dist/scenarios.js +14 -11
  311. package/node_modules/@gdh/verify/dist/scenarios.js.map +1 -1
  312. package/node_modules/@gdh/verify/package.json +6 -7
  313. package/node_modules/@hono/node-server/dist/index.js +22 -0
  314. package/node_modules/@hono/node-server/dist/index.mjs +22 -0
  315. package/node_modules/@hono/node-server/dist/listener.js +22 -0
  316. package/node_modules/@hono/node-server/dist/listener.mjs +22 -0
  317. package/node_modules/@hono/node-server/dist/request.js +11 -0
  318. package/node_modules/@hono/node-server/dist/request.mjs +11 -0
  319. package/node_modules/@hono/node-server/dist/response.js +11 -0
  320. package/node_modules/@hono/node-server/dist/response.mjs +11 -0
  321. package/node_modules/@hono/node-server/dist/server.js +22 -0
  322. package/node_modules/@hono/node-server/dist/server.mjs +22 -0
  323. package/node_modules/@hono/node-server/dist/utils.d.mts +2 -2
  324. package/node_modules/@hono/node-server/dist/utils.d.ts +2 -2
  325. package/node_modules/@hono/node-server/dist/vercel.js +22 -0
  326. package/node_modules/@hono/node-server/dist/vercel.mjs +22 -0
  327. package/node_modules/@hono/node-server/package.json +1 -1
  328. package/node_modules/ajv/README.md +1 -1
  329. package/node_modules/ajv/dist/core.js +1 -1
  330. package/node_modules/ajv/dist/core.js.map +1 -1
  331. package/node_modules/ajv/lib/core.ts +1 -1
  332. package/node_modules/ajv/package.json +2 -3
  333. package/node_modules/eventsource-parser/LICENSE +1 -1
  334. package/node_modules/eventsource-parser/dist/index.cjs +104 -44
  335. package/node_modules/eventsource-parser/dist/index.cjs.map +1 -1
  336. package/node_modules/eventsource-parser/dist/index.d.cts +23 -21
  337. package/node_modules/eventsource-parser/dist/index.d.ts +23 -21
  338. package/node_modules/eventsource-parser/dist/index.js +104 -44
  339. package/node_modules/eventsource-parser/dist/index.js.map +1 -1
  340. package/node_modules/eventsource-parser/dist/stream.d.cts +22 -19
  341. package/node_modules/eventsource-parser/dist/stream.d.ts +22 -19
  342. package/node_modules/eventsource-parser/package.json +54 -77
  343. package/node_modules/eventsource-parser/src/parse.ts +270 -107
  344. package/node_modules/express-rate-limit/dist/index.cjs +51 -10
  345. package/node_modules/express-rate-limit/dist/index.d.cts +31 -1
  346. package/node_modules/express-rate-limit/dist/index.d.mts +31 -1
  347. package/node_modules/express-rate-limit/dist/index.d.ts +31 -1
  348. package/node_modules/express-rate-limit/dist/index.mjs +51 -10
  349. package/node_modules/express-rate-limit/package.json +3 -2
  350. package/node_modules/express-rate-limit/readme.md +3 -0
  351. package/node_modules/fast-string-truncated-width/dist/index.js +36 -96
  352. package/node_modules/fast-string-truncated-width/dist/types.d.ts +0 -3
  353. package/node_modules/fast-string-truncated-width/dist/utils.d.ts +3 -3
  354. package/node_modules/fast-string-truncated-width/dist/utils.js +14 -9
  355. package/node_modules/fast-string-truncated-width/package.json +1 -1
  356. package/node_modules/fast-string-truncated-width/readme.md +2 -3
  357. package/node_modules/fast-string-width/package.json +2 -2
  358. package/node_modules/fast-string-width/readme.md +0 -3
  359. package/node_modules/fast-uri/.github/workflows/ci.yml +12 -7
  360. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  361. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
  362. package/node_modules/fast-uri/LICENSE +1 -3
  363. package/node_modules/fast-uri/README.md +13 -4
  364. package/node_modules/fast-uri/index.js +90 -24
  365. package/node_modules/fast-uri/lib/utils.js +129 -22
  366. package/node_modules/fast-uri/package.json +3 -4
  367. package/node_modules/fast-wrap-ansi/lib/main.js +4 -1
  368. package/node_modules/fast-wrap-ansi/lib/main.js.map +1 -1
  369. package/node_modules/fast-wrap-ansi/package.json +2 -2
  370. package/node_modules/get-intrinsic/CHANGELOG.md +0 -7
  371. package/node_modules/get-intrinsic/index.js +13 -8
  372. package/node_modules/get-intrinsic/package.json +4 -7
  373. package/node_modules/hasown/CHANGELOG.md +11 -0
  374. package/node_modules/hasown/eslint.config.mjs +6 -0
  375. package/node_modules/hasown/index.d.ts +1 -0
  376. package/node_modules/hasown/package.json +14 -14
  377. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +9 -2
  378. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +9 -2
  379. package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +2 -0
  380. package/node_modules/hono/dist/cjs/jsx/base.js +7 -1
  381. package/node_modules/hono/dist/cjs/jsx/dom/render.js +22 -9
  382. package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +3 -0
  383. package/node_modules/hono/dist/cjs/jsx/utils.js +155 -5
  384. package/node_modules/hono/dist/cjs/middleware/body-limit/index.js +21 -30
  385. package/node_modules/hono/dist/cjs/middleware/cache/index.js +11 -3
  386. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
  387. package/node_modules/hono/dist/cjs/middleware/method-override/index.js +1 -1
  388. package/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +2 -2
  389. package/node_modules/hono/dist/cjs/utils/jwt/jws.js +1 -1
  390. package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +12 -6
  391. package/node_modules/hono/dist/helper/ssg/ssg.js +2 -0
  392. package/node_modules/hono/dist/jsx/base.js +13 -2
  393. package/node_modules/hono/dist/jsx/dom/render.js +22 -9
  394. package/node_modules/hono/dist/jsx/jsx-runtime.js +4 -1
  395. package/node_modules/hono/dist/jsx/utils.js +153 -5
  396. package/node_modules/hono/dist/middleware/body-limit/index.js +21 -30
  397. package/node_modules/hono/dist/middleware/cache/index.js +11 -3
  398. package/node_modules/hono/dist/middleware/cors/index.js +2 -5
  399. package/node_modules/hono/dist/middleware/method-override/index.js +1 -1
  400. package/node_modules/hono/dist/middleware/trailing-slash/index.js +2 -2
  401. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
  402. package/node_modules/hono/dist/types/jsx/utils.d.ts +3 -1
  403. package/node_modules/hono/dist/types/middleware/cache/index.d.ts +2 -0
  404. package/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
  405. package/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +16 -0
  406. package/node_modules/hono/dist/types/types.d.ts +116 -116
  407. package/node_modules/hono/dist/utils/jwt/jws.js +1 -1
  408. package/node_modules/hono/dist/utils/jwt/jwt.js +12 -6
  409. package/node_modules/hono/package.json +1 -1
  410. package/node_modules/ip-address/README.md +249 -76
  411. package/node_modules/ip-address/dist/address-error.d.ts +0 -1
  412. package/node_modules/ip-address/dist/address-error.js.map +1 -1
  413. package/node_modules/ip-address/dist/common.d.ts +6 -1
  414. package/node_modules/ip-address/dist/common.js +21 -0
  415. package/node_modules/ip-address/dist/common.js.map +1 -1
  416. package/node_modules/ip-address/dist/ip-address.d.ts +0 -1
  417. package/node_modules/ip-address/dist/ip-address.js.map +1 -1
  418. package/node_modules/ip-address/dist/ipv4.d.ts +115 -57
  419. package/node_modules/ip-address/dist/ipv4.js +193 -68
  420. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  421. package/node_modules/ip-address/dist/ipv6.d.ts +172 -111
  422. package/node_modules/ip-address/dist/ipv6.js +345 -131
  423. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  424. package/node_modules/ip-address/dist/v4/constants.d.ts +0 -1
  425. package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  426. package/node_modules/ip-address/dist/v6/constants.d.ts +0 -1
  427. package/node_modules/ip-address/dist/v6/constants.js +5 -0
  428. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  429. package/node_modules/ip-address/dist/v6/helpers.d.ts +1 -1
  430. package/node_modules/ip-address/dist/v6/helpers.js +12 -3
  431. package/node_modules/ip-address/dist/v6/helpers.js.map +1 -1
  432. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -1
  433. package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -1
  434. package/node_modules/ip-address/package.json +45 -35
  435. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  436. package/node_modules/jose/dist/webapi/lib/pbes2kw.js +3 -0
  437. package/node_modules/jose/package.json +1 -1
  438. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -3
  439. package/node_modules/yaml/browser/dist/nodes/Alias.js +2 -0
  440. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +11 -8
  441. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -1
  442. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +5 -3
  443. package/node_modules/yaml/dist/nodes/Alias.js +2 -0
  444. package/node_modules/yaml/dist/nodes/Scalar.d.ts +5 -1
  445. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +10 -7
  446. package/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -1
  447. package/node_modules/yaml/package.json +1 -1
  448. package/node_modules/zod/README.md +1 -18
  449. package/node_modules/zod/locales/package.json +2 -1
  450. package/node_modules/zod/mini/package.json +2 -1
  451. package/node_modules/zod/package.json +1 -1
  452. package/node_modules/zod/src/v4/classic/errors.ts +2 -2
  453. package/node_modules/zod/src/v4/classic/external.ts +1 -0
  454. package/node_modules/zod/src/v4/classic/from-json-schema.ts +39 -23
  455. package/node_modules/zod/src/v4/classic/parse.ts +6 -6
  456. package/node_modules/zod/src/v4/classic/schemas.ts +414 -151
  457. package/node_modules/zod/src/v4/core/api.ts +31 -6
  458. package/node_modules/zod/src/v4/core/checks.ts +1 -1
  459. package/node_modules/zod/src/v4/core/core.ts +17 -2
  460. package/node_modules/zod/src/v4/core/errors.ts +31 -24
  461. package/node_modules/zod/src/v4/core/json-schema-processors.ts +17 -18
  462. package/node_modules/zod/src/v4/core/parse.ts +7 -7
  463. package/node_modules/zod/src/v4/core/regexes.ts +8 -1
  464. package/node_modules/zod/src/v4/core/schemas.ts +263 -71
  465. package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -1
  466. package/node_modules/zod/src/v4/core/util.ts +52 -35
  467. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  468. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  469. package/node_modules/zod/src/v4/locales/en.ts +4 -0
  470. package/node_modules/zod/src/v4/locales/fr.ts +24 -8
  471. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  472. package/node_modules/zod/src/v4/locales/index.ts +3 -0
  473. package/node_modules/zod/src/v4/locales/it.ts +1 -1
  474. package/node_modules/zod/src/v4/locales/ka.ts +8 -8
  475. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  476. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  477. package/node_modules/zod/src/v4/mini/external.ts +1 -0
  478. package/node_modules/zod/src/v4/mini/schemas.ts +56 -25
  479. package/node_modules/zod/v3/package.json +2 -1
  480. package/node_modules/zod/v4/classic/errors.js +2 -2
  481. package/node_modules/zod/v4/classic/external.d.cts +1 -0
  482. package/node_modules/zod/v4/classic/external.d.ts +1 -0
  483. package/node_modules/zod/v4/classic/from-json-schema.cjs +31 -16
  484. package/node_modules/zod/v4/classic/from-json-schema.js +31 -16
  485. package/node_modules/zod/v4/classic/package.json +2 -1
  486. package/node_modules/zod/v4/classic/schemas.cjs +358 -119
  487. package/node_modules/zod/v4/classic/schemas.d.cts +42 -14
  488. package/node_modules/zod/v4/classic/schemas.d.ts +42 -14
  489. package/node_modules/zod/v4/classic/schemas.js +356 -118
  490. package/node_modules/zod/v4/core/api.cjs +7 -2
  491. package/node_modules/zod/v4/core/api.d.cts +26 -5
  492. package/node_modules/zod/v4/core/api.d.ts +26 -5
  493. package/node_modules/zod/v4/core/api.js +7 -2
  494. package/node_modules/zod/v4/core/checks.d.cts +1 -1
  495. package/node_modules/zod/v4/core/checks.d.ts +1 -1
  496. package/node_modules/zod/v4/core/core.cjs +3 -1
  497. package/node_modules/zod/v4/core/core.js +4 -2
  498. package/node_modules/zod/v4/core/errors.cjs +26 -23
  499. package/node_modules/zod/v4/core/errors.d.cts +1 -0
  500. package/node_modules/zod/v4/core/errors.d.ts +1 -0
  501. package/node_modules/zod/v4/core/errors.js +26 -23
  502. package/node_modules/zod/v4/core/json-schema-processors.cjs +16 -20
  503. package/node_modules/zod/v4/core/json-schema-processors.js +16 -20
  504. package/node_modules/zod/v4/core/package.json +2 -1
  505. package/node_modules/zod/v4/core/parse.cjs +7 -7
  506. package/node_modules/zod/v4/core/parse.js +7 -7
  507. package/node_modules/zod/v4/core/regexes.cjs +9 -3
  508. package/node_modules/zod/v4/core/regexes.d.cts +6 -0
  509. package/node_modules/zod/v4/core/regexes.d.ts +6 -0
  510. package/node_modules/zod/v4/core/regexes.js +7 -1
  511. package/node_modules/zod/v4/core/schemas.cjs +211 -65
  512. package/node_modules/zod/v4/core/schemas.d.cts +39 -1
  513. package/node_modules/zod/v4/core/schemas.d.ts +39 -1
  514. package/node_modules/zod/v4/core/schemas.js +210 -64
  515. package/node_modules/zod/v4/core/to-json-schema.cjs +12 -1
  516. package/node_modules/zod/v4/core/to-json-schema.js +12 -1
  517. package/node_modules/zod/v4/core/util.cjs +54 -30
  518. package/node_modules/zod/v4/core/util.d.cts +1 -0
  519. package/node_modules/zod/v4/core/util.d.ts +1 -0
  520. package/node_modules/zod/v4/core/util.js +55 -32
  521. package/node_modules/zod/v4/core/versions.cjs +2 -2
  522. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  523. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  524. package/node_modules/zod/v4/core/versions.js +2 -2
  525. package/node_modules/zod/v4/locales/el.cjs +136 -0
  526. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  527. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  528. package/node_modules/zod/v4/locales/el.js +109 -0
  529. package/node_modules/zod/v4/locales/en.cjs +4 -0
  530. package/node_modules/zod/v4/locales/en.js +4 -0
  531. package/node_modules/zod/v4/locales/fr.cjs +24 -7
  532. package/node_modules/zod/v4/locales/fr.js +24 -7
  533. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  534. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  535. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  536. package/node_modules/zod/v4/locales/hr.js +122 -0
  537. package/node_modules/zod/v4/locales/index.cjs +8 -1
  538. package/node_modules/zod/v4/locales/index.d.cts +3 -0
  539. package/node_modules/zod/v4/locales/index.d.ts +3 -0
  540. package/node_modules/zod/v4/locales/index.js +3 -0
  541. package/node_modules/zod/v4/locales/it.cjs +1 -1
  542. package/node_modules/zod/v4/locales/it.js +1 -1
  543. package/node_modules/zod/v4/locales/ka.cjs +8 -8
  544. package/node_modules/zod/v4/locales/ka.js +8 -8
  545. package/node_modules/zod/v4/locales/package.json +2 -1
  546. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  547. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  548. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  549. package/node_modules/zod/v4/locales/ro.js +119 -0
  550. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  551. package/node_modules/zod/v4/locales/uz.js +1 -0
  552. package/node_modules/zod/v4/mini/external.d.cts +1 -0
  553. package/node_modules/zod/v4/mini/external.d.ts +1 -0
  554. package/node_modules/zod/v4/mini/package.json +2 -1
  555. package/node_modules/zod/v4/mini/schemas.cjs +41 -4
  556. package/node_modules/zod/v4/mini/schemas.d.cts +28 -10
  557. package/node_modules/zod/v4/mini/schemas.d.ts +28 -10
  558. package/node_modules/zod/v4/mini/schemas.js +40 -4
  559. package/node_modules/zod/v4/package.json +2 -1
  560. package/node_modules/zod/v4-mini/package.json +2 -1
  561. package/package.json +12 -12
  562. package/node_modules/async-function/.eslintrc +0 -16
  563. package/node_modules/async-function/.github/FUNDING.yml +0 -12
  564. package/node_modules/async-function/.nycrc +0 -9
  565. package/node_modules/async-function/CHANGELOG.md +0 -16
  566. package/node_modules/async-function/LICENSE +0 -21
  567. package/node_modules/async-function/README.md +0 -51
  568. package/node_modules/async-function/index.d.mts +0 -3
  569. package/node_modules/async-function/index.d.ts +0 -13
  570. package/node_modules/async-function/index.js +0 -8
  571. package/node_modules/async-function/index.mjs +0 -4
  572. package/node_modules/async-function/legacy.js +0 -18
  573. package/node_modules/async-function/package.json +0 -86
  574. package/node_modules/async-function/require.mjs +0 -5
  575. package/node_modules/async-function/tsconfig.json +0 -9
  576. package/node_modules/async-generator-function/.eslintrc +0 -26
  577. package/node_modules/async-generator-function/.github/FUNDING.yml +0 -12
  578. package/node_modules/async-generator-function/.nycrc +0 -9
  579. package/node_modules/async-generator-function/CHANGELOG.md +0 -15
  580. package/node_modules/async-generator-function/LICENSE +0 -21
  581. package/node_modules/async-generator-function/README.md +0 -52
  582. package/node_modules/async-generator-function/index.d.mts +0 -3
  583. package/node_modules/async-generator-function/index.d.ts +0 -22
  584. package/node_modules/async-generator-function/index.js +0 -8
  585. package/node_modules/async-generator-function/index.mjs +0 -4
  586. package/node_modules/async-generator-function/legacy.js +0 -18
  587. package/node_modules/async-generator-function/package.json +0 -87
  588. package/node_modules/async-generator-function/require.mjs +0 -5
  589. package/node_modules/async-generator-function/tsconfig.json +0 -9
  590. package/node_modules/fast-uri/.github/.stale.yml +0 -21
  591. package/node_modules/fast-uri/.github/tests_checker.yml +0 -8
  592. package/node_modules/generator-function/.eslintrc +0 -16
  593. package/node_modules/generator-function/.github/FUNDING.yml +0 -12
  594. package/node_modules/generator-function/.nycrc +0 -9
  595. package/node_modules/generator-function/CHANGELOG.md +0 -27
  596. package/node_modules/generator-function/LICENSE.md +0 -7
  597. package/node_modules/generator-function/README.md +0 -51
  598. package/node_modules/generator-function/index.d.mts +0 -3
  599. package/node_modules/generator-function/index.d.ts +0 -3
  600. package/node_modules/generator-function/index.js +0 -8
  601. package/node_modules/generator-function/index.mjs +0 -4
  602. package/node_modules/generator-function/legacy.js +0 -18
  603. package/node_modules/generator-function/package.json +0 -88
  604. package/node_modules/generator-function/require.mjs +0 -5
  605. package/node_modules/generator-function/tsconfig.json +0 -9
  606. package/node_modules/hasown/.eslintrc +0 -5
  607. package/node_modules/ip-address/dist/address-error.d.ts.map +0 -1
  608. package/node_modules/ip-address/dist/common.d.ts.map +0 -1
  609. package/node_modules/ip-address/dist/ip-address.d.ts.map +0 -1
  610. package/node_modules/ip-address/dist/ipv4.d.ts.map +0 -1
  611. package/node_modules/ip-address/dist/ipv6.d.ts.map +0 -1
  612. package/node_modules/ip-address/dist/v4/constants.d.ts.map +0 -1
  613. package/node_modules/ip-address/dist/v6/constants.d.ts.map +0 -1
  614. package/node_modules/ip-address/dist/v6/helpers.d.ts.map +0 -1
  615. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts.map +0 -1
  616. package/node_modules/ip-address/src/address-error.ts +0 -11
  617. package/node_modules/ip-address/src/common.ts +0 -55
  618. package/node_modules/ip-address/src/ip-address.ts +0 -7
  619. package/node_modules/ip-address/src/ipv4.ts +0 -394
  620. package/node_modules/ip-address/src/ipv6.ts +0 -1212
  621. package/node_modules/ip-address/src/v4/constants.ts +0 -7
  622. package/node_modules/ip-address/src/v6/constants.ts +0 -79
  623. package/node_modules/ip-address/src/v6/helpers.ts +0 -48
  624. package/node_modules/ip-address/src/v6/regular-expressions.ts +0 -94
  625. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/.npmignore +0 -0
  626. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/LICENSE +0 -0
  627. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/README.md +0 -0
  628. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/index.js +0 -0
  629. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/mode.js +0 -0
  630. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/package.json +0 -0
  631. /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/windows.js +0 -0
  632. /package/node_modules/{cross-spawn/node_modules/which → which}/LICENSE +0 -0
  633. /package/node_modules/{cross-spawn/node_modules/which → which}/README.md +0 -0
  634. /package/node_modules/{cross-spawn/node_modules/which → which}/bin/node-which +0 -0
  635. /package/node_modules/{cross-spawn/node_modules/which → which}/package.json +0 -0
  636. /package/node_modules/{cross-spawn/node_modules/which → which}/which.js +0 -0
@@ -201,6 +201,16 @@ var MemoryStore = class {
201
201
  // source/rate-limit.ts
202
202
  var import_node_net3 = require("node:net");
203
203
 
204
+ // source/console-logger.ts
205
+ var ConsoleLogger = {
206
+ warn(...args) {
207
+ console.warn(...args.reverse());
208
+ },
209
+ error(...args) {
210
+ console.error(...args.reverse());
211
+ }
212
+ };
213
+
204
214
  // source/headers.ts
205
215
  var import_node_buffer = require("node:buffer");
206
216
  var import_node_crypto = require("node:crypto");
@@ -548,7 +558,8 @@ var validations = {
548
558
  validate: true,
549
559
  headers: true,
550
560
  max: true,
551
- passOnStoreError: true
561
+ passOnStoreError: true,
562
+ logger: true
552
563
  };
553
564
  const validOptions = Object.keys(optionsMap).concat(
554
565
  "draft_polli_ratelimit_headers",
@@ -661,7 +672,15 @@ var validations = {
661
672
  }
662
673
  }
663
674
  };
664
- var getValidations = (_enabled) => {
675
+ function validateLogger(logger) {
676
+ if (typeof logger !== "object" || typeof logger.error !== "function" || typeof logger.warn !== "function") {
677
+ throw new TypeError(
678
+ "Provided logger does not implement the Logger interface"
679
+ );
680
+ }
681
+ }
682
+ var getValidations = (_enabled, logger) => {
683
+ validateLogger(logger);
665
684
  let enabled;
666
685
  if (typeof _enabled === "boolean") {
667
686
  enabled = {
@@ -687,8 +706,8 @@ var getValidations = (_enabled) => {
687
706
  args
688
707
  );
689
708
  } catch (error) {
690
- if (error instanceof ChangeWarning) console.warn(error);
691
- else console.error(error);
709
+ if (error instanceof ChangeWarning) logger.warn(error);
710
+ else logger.error(error);
692
711
  }
693
712
  };
694
713
  }
@@ -741,7 +760,11 @@ var getOptionsFromConfig = (config) => {
741
760
  };
742
761
  var parseOptions = (passedOptions) => {
743
762
  const notUndefinedOptions = omitUndefinedProperties(passedOptions);
744
- const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
763
+ const logger = passedOptions.logger ?? ConsoleLogger;
764
+ const validations2 = getValidations(
765
+ notUndefinedOptions?.validate ?? true,
766
+ logger
767
+ );
745
768
  validations2.validationsConfig();
746
769
  validations2.knownOptions(passedOptions);
747
770
  validations2.draftPolliHeaders(
@@ -816,7 +839,8 @@ var parseOptions = (passedOptions) => {
816
839
  notUndefinedOptions.store ?? new MemoryStore(validations2)
817
840
  ),
818
841
  // Print an error to the console if a few known misconfigurations are detected.
819
- validations: validations2
842
+ validations: validations2,
843
+ logger
820
844
  };
821
845
  if (typeof config.store.increment !== "function" || typeof config.store.decrement !== "function" || typeof config.store.resetKey !== "function" || config.store.resetAll !== void 0 && typeof config.store.resetAll !== "function" || config.store.init !== void 0 && typeof config.store.init !== "function") {
822
846
  throw new TypeError(
@@ -837,7 +861,24 @@ var rateLimit = (passedOptions) => {
837
861
  const options = getOptionsFromConfig(config);
838
862
  config.validations.creationStack(config.store);
839
863
  config.validations.unsharedStore(config.store);
840
- if (typeof config.store.init === "function") config.store.init(options);
864
+ if (typeof config.store.init === "function") {
865
+ try {
866
+ const storeInit = config.store.init(options);
867
+ if (storeInit instanceof Promise) {
868
+ storeInit.catch(
869
+ (error) => config.logger.error(
870
+ error,
871
+ "express-rate-limit: async error during store initialization."
872
+ )
873
+ );
874
+ }
875
+ } catch (error) {
876
+ config.logger.error(
877
+ error,
878
+ "express-rate-limit: error during store initialization."
879
+ );
880
+ }
881
+ }
841
882
  const middleware = handleAsyncErrors(
842
883
  async (request, response, next) => {
843
884
  const closePromise = config.skipFailedRequests && new Promise((resolve) => response.once("close", resolve));
@@ -858,9 +899,9 @@ var rateLimit = (passedOptions) => {
858
899
  resetTime = incrementResult.resetTime;
859
900
  } catch (error) {
860
901
  if (config.passOnStoreError) {
861
- console.error(
862
- "express-rate-limit: error from store, allowing request without rate-limiting.",
863
- error
902
+ config.logger.error(
903
+ error,
904
+ "express-rate-limit: error from store, allowing request without rate-limiting."
864
905
  );
865
906
  next();
866
907
  return;
@@ -159,6 +159,26 @@ declare const validations: {
159
159
  windowMs(windowMs: number): void;
160
160
  };
161
161
  export type Validations = typeof validations;
162
+ /**
163
+ * Basic logging function
164
+ *
165
+ * @param error {unknown} - The error to log
166
+ * @param message {string | undefined} - Additional details about the error
167
+ */
168
+ export type LoggerFn = (error: unknown, message?: string) => void;
169
+ /**
170
+ * Minimal interface for logging warnings and errors
171
+ */
172
+ export type Logger = {
173
+ /**
174
+ * Function to log an error
175
+ */
176
+ error: LoggerFn;
177
+ /**
178
+ * Function to log a warning
179
+ */
180
+ warn: LoggerFn;
181
+ };
162
182
  /**
163
183
  * Callback that fires when a client's hit counter is incremented.
164
184
  *
@@ -265,9 +285,15 @@ export type Store = {
265
285
  * Method that initializes the store, and has access to the options passed to
266
286
  * the middleware too.
267
287
  *
288
+ * Called once during initialization.
289
+ *
290
+ * Errors / promise rejections will be caught and logged.
291
+ *
292
+ * Note that the result is not awaited - other store methods (such as increment) may be called before init returns and/or after it throws/rejects.
293
+ *
268
294
  * @param options {Options} - The options used to setup the middleware.
269
295
  */
270
- init?: (options: Options) => void;
296
+ init?: (options: Options) => void | Promise<void>;
271
297
  /**
272
298
  * Method to fetch a client's hit count and reset time.
273
299
  *
@@ -477,6 +503,10 @@ export type Options = {
477
503
  * If the Store generates an error, allow the request to pass.
478
504
  */
479
505
  passOnStoreError: boolean;
506
+ /**
507
+ * The logger to use to log errors. If absent, logs to the console.
508
+ */
509
+ logger: Logger;
480
510
  };
481
511
  /**
482
512
  * The extended request object that includes information about the client's
@@ -159,6 +159,26 @@ declare const validations: {
159
159
  windowMs(windowMs: number): void;
160
160
  };
161
161
  export type Validations = typeof validations;
162
+ /**
163
+ * Basic logging function
164
+ *
165
+ * @param error {unknown} - The error to log
166
+ * @param message {string | undefined} - Additional details about the error
167
+ */
168
+ export type LoggerFn = (error: unknown, message?: string) => void;
169
+ /**
170
+ * Minimal interface for logging warnings and errors
171
+ */
172
+ export type Logger = {
173
+ /**
174
+ * Function to log an error
175
+ */
176
+ error: LoggerFn;
177
+ /**
178
+ * Function to log a warning
179
+ */
180
+ warn: LoggerFn;
181
+ };
162
182
  /**
163
183
  * Callback that fires when a client's hit counter is incremented.
164
184
  *
@@ -265,9 +285,15 @@ export type Store = {
265
285
  * Method that initializes the store, and has access to the options passed to
266
286
  * the middleware too.
267
287
  *
288
+ * Called once during initialization.
289
+ *
290
+ * Errors / promise rejections will be caught and logged.
291
+ *
292
+ * Note that the result is not awaited - other store methods (such as increment) may be called before init returns and/or after it throws/rejects.
293
+ *
268
294
  * @param options {Options} - The options used to setup the middleware.
269
295
  */
270
- init?: (options: Options) => void;
296
+ init?: (options: Options) => void | Promise<void>;
271
297
  /**
272
298
  * Method to fetch a client's hit count and reset time.
273
299
  *
@@ -477,6 +503,10 @@ export type Options = {
477
503
  * If the Store generates an error, allow the request to pass.
478
504
  */
479
505
  passOnStoreError: boolean;
506
+ /**
507
+ * The logger to use to log errors. If absent, logs to the console.
508
+ */
509
+ logger: Logger;
480
510
  };
481
511
  /**
482
512
  * The extended request object that includes information about the client's
@@ -159,6 +159,26 @@ declare const validations: {
159
159
  windowMs(windowMs: number): void;
160
160
  };
161
161
  export type Validations = typeof validations;
162
+ /**
163
+ * Basic logging function
164
+ *
165
+ * @param error {unknown} - The error to log
166
+ * @param message {string | undefined} - Additional details about the error
167
+ */
168
+ export type LoggerFn = (error: unknown, message?: string) => void;
169
+ /**
170
+ * Minimal interface for logging warnings and errors
171
+ */
172
+ export type Logger = {
173
+ /**
174
+ * Function to log an error
175
+ */
176
+ error: LoggerFn;
177
+ /**
178
+ * Function to log a warning
179
+ */
180
+ warn: LoggerFn;
181
+ };
162
182
  /**
163
183
  * Callback that fires when a client's hit counter is incremented.
164
184
  *
@@ -265,9 +285,15 @@ export type Store = {
265
285
  * Method that initializes the store, and has access to the options passed to
266
286
  * the middleware too.
267
287
  *
288
+ * Called once during initialization.
289
+ *
290
+ * Errors / promise rejections will be caught and logged.
291
+ *
292
+ * Note that the result is not awaited - other store methods (such as increment) may be called before init returns and/or after it throws/rejects.
293
+ *
268
294
  * @param options {Options} - The options used to setup the middleware.
269
295
  */
270
- init?: (options: Options) => void;
296
+ init?: (options: Options) => void | Promise<void>;
271
297
  /**
272
298
  * Method to fetch a client's hit count and reset time.
273
299
  *
@@ -477,6 +503,10 @@ export type Options = {
477
503
  * If the Store generates an error, allow the request to pass.
478
504
  */
479
505
  passOnStoreError: boolean;
506
+ /**
507
+ * The logger to use to log errors. If absent, logs to the console.
508
+ */
509
+ logger: Logger;
480
510
  };
481
511
  /**
482
512
  * The extended request object that includes information about the client's
@@ -172,6 +172,16 @@ var MemoryStore = class {
172
172
  // source/rate-limit.ts
173
173
  import { isIPv6 as isIPv62 } from "node:net";
174
174
 
175
+ // source/console-logger.ts
176
+ var ConsoleLogger = {
177
+ warn(...args) {
178
+ console.warn(...args.reverse());
179
+ },
180
+ error(...args) {
181
+ console.error(...args.reverse());
182
+ }
183
+ };
184
+
175
185
  // source/headers.ts
176
186
  import { Buffer } from "node:buffer";
177
187
  import { createHash } from "node:crypto";
@@ -519,7 +529,8 @@ var validations = {
519
529
  validate: true,
520
530
  headers: true,
521
531
  max: true,
522
- passOnStoreError: true
532
+ passOnStoreError: true,
533
+ logger: true
523
534
  };
524
535
  const validOptions = Object.keys(optionsMap).concat(
525
536
  "draft_polli_ratelimit_headers",
@@ -632,7 +643,15 @@ var validations = {
632
643
  }
633
644
  }
634
645
  };
635
- var getValidations = (_enabled) => {
646
+ function validateLogger(logger) {
647
+ if (typeof logger !== "object" || typeof logger.error !== "function" || typeof logger.warn !== "function") {
648
+ throw new TypeError(
649
+ "Provided logger does not implement the Logger interface"
650
+ );
651
+ }
652
+ }
653
+ var getValidations = (_enabled, logger) => {
654
+ validateLogger(logger);
636
655
  let enabled;
637
656
  if (typeof _enabled === "boolean") {
638
657
  enabled = {
@@ -658,8 +677,8 @@ var getValidations = (_enabled) => {
658
677
  args
659
678
  );
660
679
  } catch (error) {
661
- if (error instanceof ChangeWarning) console.warn(error);
662
- else console.error(error);
680
+ if (error instanceof ChangeWarning) logger.warn(error);
681
+ else logger.error(error);
663
682
  }
664
683
  };
665
684
  }
@@ -712,7 +731,11 @@ var getOptionsFromConfig = (config) => {
712
731
  };
713
732
  var parseOptions = (passedOptions) => {
714
733
  const notUndefinedOptions = omitUndefinedProperties(passedOptions);
715
- const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
734
+ const logger = passedOptions.logger ?? ConsoleLogger;
735
+ const validations2 = getValidations(
736
+ notUndefinedOptions?.validate ?? true,
737
+ logger
738
+ );
716
739
  validations2.validationsConfig();
717
740
  validations2.knownOptions(passedOptions);
718
741
  validations2.draftPolliHeaders(
@@ -787,7 +810,8 @@ var parseOptions = (passedOptions) => {
787
810
  notUndefinedOptions.store ?? new MemoryStore(validations2)
788
811
  ),
789
812
  // Print an error to the console if a few known misconfigurations are detected.
790
- validations: validations2
813
+ validations: validations2,
814
+ logger
791
815
  };
792
816
  if (typeof config.store.increment !== "function" || typeof config.store.decrement !== "function" || typeof config.store.resetKey !== "function" || config.store.resetAll !== void 0 && typeof config.store.resetAll !== "function" || config.store.init !== void 0 && typeof config.store.init !== "function") {
793
817
  throw new TypeError(
@@ -808,7 +832,24 @@ var rateLimit = (passedOptions) => {
808
832
  const options = getOptionsFromConfig(config);
809
833
  config.validations.creationStack(config.store);
810
834
  config.validations.unsharedStore(config.store);
811
- if (typeof config.store.init === "function") config.store.init(options);
835
+ if (typeof config.store.init === "function") {
836
+ try {
837
+ const storeInit = config.store.init(options);
838
+ if (storeInit instanceof Promise) {
839
+ storeInit.catch(
840
+ (error) => config.logger.error(
841
+ error,
842
+ "express-rate-limit: async error during store initialization."
843
+ )
844
+ );
845
+ }
846
+ } catch (error) {
847
+ config.logger.error(
848
+ error,
849
+ "express-rate-limit: error during store initialization."
850
+ );
851
+ }
852
+ }
812
853
  const middleware = handleAsyncErrors(
813
854
  async (request, response, next) => {
814
855
  const closePromise = config.skipFailedRequests && new Promise((resolve) => response.once("close", resolve));
@@ -829,9 +870,9 @@ var rateLimit = (passedOptions) => {
829
870
  resetTime = incrementResult.resetTime;
830
871
  } catch (error) {
831
872
  if (config.passOnStoreError) {
832
- console.error(
833
- "express-rate-limit: error from store, allowing request without rate-limiting.",
834
- error
873
+ config.logger.error(
874
+ error,
875
+ "express-rate-limit: error from store, allowing request without rate-limiting."
835
876
  );
836
877
  next();
837
878
  return;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-rate-limit",
3
- "version": "8.3.2",
3
+ "version": "8.5.1",
4
4
  "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
5
5
  "author": {
6
6
  "name": "Nathan Friedly",
@@ -70,11 +70,12 @@
70
70
  "test:lib": "jest",
71
71
  "test:ext": "cd test/external/ && bash run-all-tests",
72
72
  "test": "run-s lint test:lib",
73
+ "format-test": "run-s format test:lib",
73
74
  "pre-commit": "lint-staged",
74
75
  "prepare": "run-s compile && husky"
75
76
  },
76
77
  "dependencies": {
77
- "ip-address": "10.1.0"
78
+ "ip-address": "^10.2.0"
78
79
  },
79
80
  "peerDependencies": {
80
81
  "express": ">= 4.11"
@@ -66,6 +66,7 @@ default values.
66
66
  | [`skipFailedRequests`] | `boolean` | Uncount 4xx/5xx responses. |
67
67
  | [`requestWasSuccessful`] | `function` | Used by `skipSuccessfulRequests` and `skipFailedRequests`. |
68
68
  | [`validate`] | `boolean` \| `object` | Enable or disable built-in validation checks. |
69
+ | [`logger`] | `Logger` | Custom logger |
69
70
 
70
71
  ## Thank You
71
72
 
@@ -134,3 +135,5 @@ MIT © [Nathan Friedly](http://nfriedly.com/),
134
135
  https://express-rate-limit.mintlify.app/reference/configuration#requestwassuccessful
135
136
  [`validate`]:
136
137
  https://express-rate-limit.mintlify.app/reference/configuration#validate
138
+ [`logger`]:
139
+ https://express-rate-limit.mintlify.app/reference/configuration#logger
@@ -1,28 +1,35 @@
1
1
  /* IMPORT */
2
- import { isAmbiguous, isFullWidth, isWide } from './utils.js';
2
+ import { getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji } from './utils.js';
3
3
  /* HELPERS */
4
- const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
4
+ const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
5
5
  const CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
6
+ const CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
6
7
  const TAB_RE = /\t{1,1000}/y;
7
8
  const EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
8
9
  const LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
9
10
  const MODIFIER_RE = /\p{M}+/gu;
10
11
  const NO_TRUNCATION = { limit: Infinity, ellipsis: '' };
11
12
  /* MAIN */
12
- //TODO: Optimize matching non-latin letters
13
13
  const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
14
14
  /* CONSTANTS */
15
15
  const LIMIT = truncationOptions.limit ?? Infinity;
16
16
  const ELLIPSIS = truncationOptions.ellipsis ?? '';
17
17
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
18
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
18
+ const ANSI_WIDTH = 0;
19
19
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
20
20
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
21
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
22
21
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
23
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
22
+ const FULL_WIDTH_WIDTH = 2;
24
23
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
25
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
24
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
25
+ const PARSE_BLOCKS = [
26
+ [LATIN_RE, REGULAR_WIDTH],
27
+ [ANSI_RE, ANSI_WIDTH],
28
+ [CONTROL_RE, CONTROL_WIDTH],
29
+ [TAB_RE, TAB_WIDTH],
30
+ [EMOJI_RE, EMOJI_WIDTH],
31
+ [CJKT_WIDE_RE, WIDE_WIDTH],
32
+ ];
26
33
  /* STATE */
27
34
  let indexPrev = 0;
28
35
  let index = 0;
@@ -46,12 +53,9 @@ const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {
46
53
  if (isFullWidth(codePoint)) {
47
54
  widthExtra = FULL_WIDTH_WIDTH;
48
55
  }
49
- else if (isWide(codePoint)) {
56
+ else if (isWideNotCJKTNotEmoji(codePoint)) {
50
57
  widthExtra = WIDE_WIDTH;
51
58
  }
52
- else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
53
- widthExtra = AMBIGUOUS_WIDTH;
54
- }
55
59
  else {
56
60
  widthExtra = REGULAR_WIDTH;
57
61
  }
@@ -68,93 +72,29 @@ const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {
68
72
  unmatchedStart = unmatchedEnd = 0;
69
73
  }
70
74
  /* EXITING */
71
- if (index >= length)
72
- break;
73
- /* LATIN */
74
- LATIN_RE.lastIndex = index;
75
- if (LATIN_RE.test(input)) {
76
- lengthExtra = LATIN_RE.lastIndex - index;
77
- widthExtra = lengthExtra * REGULAR_WIDTH;
78
- if ((width + widthExtra) > truncationLimit) {
79
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
80
- }
81
- if ((width + widthExtra) > LIMIT) {
82
- truncationEnabled = true;
83
- break;
84
- }
85
- width += widthExtra;
86
- unmatchedStart = indexPrev;
87
- unmatchedEnd = index;
88
- index = indexPrev = LATIN_RE.lastIndex;
89
- continue;
90
- }
91
- /* ANSI */
92
- ANSI_RE.lastIndex = index;
93
- if (ANSI_RE.test(input)) {
94
- if ((width + ANSI_WIDTH) > truncationLimit) {
95
- truncationIndex = Math.min(truncationIndex, index);
96
- }
97
- if ((width + ANSI_WIDTH) > LIMIT) {
98
- truncationEnabled = true;
99
- break;
100
- }
101
- width += ANSI_WIDTH;
102
- unmatchedStart = indexPrev;
103
- unmatchedEnd = index;
104
- index = indexPrev = ANSI_RE.lastIndex;
105
- continue;
106
- }
107
- /* CONTROL */
108
- CONTROL_RE.lastIndex = index;
109
- if (CONTROL_RE.test(input)) {
110
- lengthExtra = CONTROL_RE.lastIndex - index;
111
- widthExtra = lengthExtra * CONTROL_WIDTH;
112
- if ((width + widthExtra) > truncationLimit) {
113
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
114
- }
115
- if ((width + widthExtra) > LIMIT) {
116
- truncationEnabled = true;
117
- break;
118
- }
119
- width += widthExtra;
120
- unmatchedStart = indexPrev;
121
- unmatchedEnd = index;
122
- index = indexPrev = CONTROL_RE.lastIndex;
123
- continue;
124
- }
125
- /* TAB */
126
- TAB_RE.lastIndex = index;
127
- if (TAB_RE.test(input)) {
128
- lengthExtra = TAB_RE.lastIndex - index;
129
- widthExtra = lengthExtra * TAB_WIDTH;
130
- if ((width + widthExtra) > truncationLimit) {
131
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
132
- }
133
- if ((width + widthExtra) > LIMIT) {
134
- truncationEnabled = true;
135
- break;
136
- }
137
- width += widthExtra;
138
- unmatchedStart = indexPrev;
139
- unmatchedEnd = index;
140
- index = indexPrev = TAB_RE.lastIndex;
141
- continue;
75
+ if (index >= length) {
76
+ break outer;
142
77
  }
143
- /* EMOJI */
144
- EMOJI_RE.lastIndex = index;
145
- if (EMOJI_RE.test(input)) {
146
- if ((width + EMOJI_WIDTH) > truncationLimit) {
147
- truncationIndex = Math.min(truncationIndex, index);
148
- }
149
- if ((width + EMOJI_WIDTH) > LIMIT) {
150
- truncationEnabled = true;
151
- break;
78
+ /* PARSE BLOCKS */
79
+ for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
80
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
81
+ BLOCK_RE.lastIndex = index;
82
+ if (BLOCK_RE.test(input)) {
83
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
84
+ widthExtra = lengthExtra * BLOCK_WIDTH;
85
+ if ((width + widthExtra) > truncationLimit) {
86
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
87
+ }
88
+ if ((width + widthExtra) > LIMIT) {
89
+ truncationEnabled = true;
90
+ break outer;
91
+ }
92
+ width += widthExtra;
93
+ unmatchedStart = indexPrev;
94
+ unmatchedEnd = index;
95
+ index = indexPrev = BLOCK_RE.lastIndex;
96
+ continue outer;
152
97
  }
153
- width += EMOJI_WIDTH;
154
- unmatchedStart = indexPrev;
155
- unmatchedEnd = index;
156
- index = indexPrev = EMOJI_RE.lastIndex;
157
- continue;
158
98
  }
159
99
  /* UNMATCHED INDEX */
160
100
  index += 1;
@@ -4,12 +4,9 @@ type TruncationOptions = {
4
4
  ellipsisWidth?: number;
5
5
  };
6
6
  type WidthOptions = {
7
- ansiWidth?: number;
8
7
  controlWidth?: number;
9
8
  tabWidth?: number;
10
- ambiguousWidth?: number;
11
9
  emojiWidth?: number;
12
- fullWidthWidth?: number;
13
10
  regularWidth?: number;
14
11
  wideWidth?: number;
15
12
  };
@@ -1,4 +1,4 @@
1
- declare const isAmbiguous: (x: number) => boolean;
1
+ declare const getCodePointsLength: (input: string) => number;
2
2
  declare const isFullWidth: (x: number) => boolean;
3
- declare const isWide: (x: number) => boolean;
4
- export { isAmbiguous, isFullWidth, isWide };
3
+ declare const isWideNotCJKTNotEmoji: (x: number) => boolean;
4
+ export { getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji };