commandkit 1.2.0-rc.13 → 1.2.0-rc.15

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 (350) hide show
  1. package/README.md +42 -23
  2. package/dist/{ActionRow-B-CGmjDp.d.ts → ActionRow-Bt9qi0Mb.d.ts} +2 -2
  3. package/dist/{Button-C-GPeFA3.d.ts → Button-DxJLcZIU.d.ts} +5 -5
  4. package/dist/{ButtonKit-DKu0VAe4.d.ts → ButtonKit-BfcyvWfj.d.ts} +35 -35
  5. package/dist/{ChannelSelectMenuKit-HQZ4hH5s.d.ts → ChannelSelectMenuKit-DYkudikb.d.ts} +33 -33
  6. package/dist/{CommandsRouter-C7dZEepB.d.ts → CommandsRouter-DiNoF0dq.d.ts} +48 -48
  7. package/dist/{EventInterceptor-CZmWpS08.d.ts → EventInterceptor-D9JKMcfi.d.ts} +39 -39
  8. package/dist/{EventsRouter-DZ37r54v.d.ts → EventsRouter-EuuSu6NH.d.ts} +34 -34
  9. package/dist/{MentionableSelectMenuKit-7URDUM3-.d.ts → MentionableSelectMenuKit-Mu4xqP6B.d.ts} +33 -33
  10. package/dist/MessageCommandParser-DPCbHXCS.d.ts +194 -0
  11. package/dist/{Modal-CZT9MZsy.d.ts → Modal-v9rrcMl-.d.ts} +7 -7
  12. package/dist/{ModalKit-BWXI3Z26.d.ts → ModalKit-XJSM65SV.d.ts} +32 -32
  13. package/dist/{RoleSelectMenuKit-BY-JJ18w.d.ts → RoleSelectMenuKit-CCjcp3HY.d.ts} +33 -33
  14. package/dist/{SelectMenu-q_b3Mjv9.d.ts → SelectMenu-CY0vvoSu.d.ts} +15 -11
  15. package/dist/{StringSelectMenuKit-lVhUMc3g.d.ts → StringSelectMenuKit-G5nBTicX.d.ts} +33 -33
  16. package/dist/{UserSelectMenuKit-CCj4Fpkr.d.ts → UserSelectMenuKit-D3SO_fXA.d.ts} +33 -33
  17. package/dist/analytics/analytics-engine.d.ts +1 -1
  18. package/dist/analytics/analytics-engine.js +2 -24
  19. package/dist/analytics/analytics-provider.d.ts +1 -1
  20. package/dist/analytics/analytics-provider.js +1 -0
  21. package/dist/analytics/constants.js +26 -3
  22. package/dist/analytics/constants.js.map +1 -0
  23. package/dist/analytics/utils.js +2 -24
  24. package/dist/{analytics-engine-WQhXmx3H.d.ts → analytics-engine-DnRsHBId.d.ts} +846 -841
  25. package/dist/app/commands/AppCommandRunner.d.ts +1 -1
  26. package/dist/app/commands/AppCommandRunner.js +2 -24
  27. package/dist/app/commands/Context.d.ts +1 -1
  28. package/dist/app/commands/Context.js +2 -24
  29. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  30. package/dist/app/commands/MessageCommandParser.js +261 -3
  31. package/dist/app/commands/MessageCommandParser.js.map +1 -0
  32. package/dist/app/commands/helpers.d.ts +1 -1
  33. package/dist/app/commands/helpers.js +25 -3
  34. package/dist/app/commands/helpers.js.map +1 -0
  35. package/dist/app/events/EventWorkerContext.d.ts +2 -2
  36. package/dist/app/events/EventWorkerContext.js +48 -5
  37. package/dist/app/events/EventWorkerContext.js.map +1 -0
  38. package/dist/app/handlers/AppCommandHandler.d.ts +1 -1
  39. package/dist/app/handlers/AppCommandHandler.js +2 -24
  40. package/dist/app/handlers/AppEventsHandler.d.ts +1 -1
  41. package/dist/app/handlers/AppEventsHandler.js +2 -24
  42. package/dist/app/index.d.ts +4 -4
  43. package/dist/app/index.js +13 -32
  44. package/dist/app/interrupt/signals.d.ts +1 -1
  45. package/dist/app/interrupt/signals.js +54 -6
  46. package/dist/app/interrupt/signals.js.map +1 -0
  47. package/dist/app/middlewares/permissions.d.ts +1 -1
  48. package/dist/app/middlewares/permissions.js +2 -24
  49. package/dist/app/register/CommandRegistrar.d.ts +1 -1
  50. package/dist/app/register/CommandRegistrar.js +2 -24
  51. package/dist/app/router/CommandsRouter.d.ts +1 -1
  52. package/dist/app/router/CommandsRouter.js +210 -2
  53. package/dist/app/router/CommandsRouter.js.map +1 -0
  54. package/dist/app/router/EventsRouter.d.ts +1 -1
  55. package/dist/app/router/EventsRouter.js +128 -2
  56. package/dist/app/router/EventsRouter.js.map +1 -0
  57. package/dist/app/router/index.d.ts +2 -2
  58. package/dist/app/router/index.js +5 -5
  59. package/dist/{chunk-kSYXY2_d.js → chunk-BE-pF4vm.js} +1 -1
  60. package/dist/cli/app-process.d.ts +2 -2
  61. package/dist/cli/app-process.js +6 -8
  62. package/dist/cli/app-process.js.map +1 -1
  63. package/dist/cli/build.d.ts +2 -2
  64. package/dist/cli/build.js +15 -35
  65. package/dist/cli/build.js.map +1 -1
  66. package/dist/cli/common.d.ts +5 -5
  67. package/dist/cli/common.js +182 -12
  68. package/dist/cli/common.js.map +1 -0
  69. package/dist/cli/development.d.ts +3 -3
  70. package/dist/cli/development.js +38 -59
  71. package/dist/cli/development.js.map +1 -1
  72. package/dist/cli/env.js +73 -9
  73. package/dist/cli/env.js.map +1 -0
  74. package/dist/cli/generators.js +10 -10
  75. package/dist/cli/generators.js.map +1 -1
  76. package/dist/cli/information.js +8 -7
  77. package/dist/cli/information.js.map +1 -1
  78. package/dist/cli/init.d.ts +2 -2
  79. package/dist/cli/init.js +14 -33
  80. package/dist/cli/init.js.map +1 -1
  81. package/dist/cli/production.d.ts +2 -2
  82. package/dist/cli/production.js +11 -33
  83. package/dist/cli/production.js.map +1 -1
  84. package/dist/cli/type-checker.js +83 -6
  85. package/dist/cli/type-checker.js.map +1 -0
  86. package/dist/cli/utils.js +1 -0
  87. package/dist/cli/utils.js.map +1 -1
  88. package/dist/{commandkit-SIjTLD2R.js → commandkit--k6yDJEr.js} +3157 -2699
  89. package/dist/commandkit--k6yDJEr.js.map +1 -0
  90. package/dist/commandkit.d.ts +1 -1
  91. package/dist/commandkit.js +2 -24
  92. package/dist/{common-DnwCYit8.d.ts → common-CCvvgnxi.d.ts} +2 -2
  93. package/dist/components/common/EventInterceptor.d.ts +1 -1
  94. package/dist/components/common/EventInterceptor.js +137 -2
  95. package/dist/components/common/EventInterceptor.js.map +1 -0
  96. package/dist/components/common/element.d.ts +2 -2
  97. package/dist/components/common/element.js +10 -8
  98. package/dist/components/common/types.d.ts +1 -1
  99. package/dist/components/common/types.js +1 -0
  100. package/dist/components/display/common.js +3 -2
  101. package/dist/components/display/container.d.ts +1 -1
  102. package/dist/components/display/container.js +3 -2
  103. package/dist/components/display/file.d.ts +1 -1
  104. package/dist/components/display/file.js +23 -2
  105. package/dist/components/display/file.js.map +1 -0
  106. package/dist/components/display/index.d.ts +8 -8
  107. package/dist/components/display/index.js +18 -21
  108. package/dist/components/display/label.d.ts +1 -1
  109. package/dist/components/display/label.js +3 -2
  110. package/dist/components/display/media-gallery.d.ts +1 -1
  111. package/dist/components/display/media-gallery.js +4 -3
  112. package/dist/components/display/poll.d.ts +1 -1
  113. package/dist/components/display/poll.js +85 -4
  114. package/dist/{poll-CFe8yvoJ.js.map → components/display/poll.js.map} +1 -1
  115. package/dist/components/display/section.d.ts +1 -1
  116. package/dist/components/display/section.js +4 -3
  117. package/dist/components/display/separator.d.ts +1 -1
  118. package/dist/components/display/separator.js +21 -2
  119. package/dist/components/display/separator.js.map +1 -0
  120. package/dist/components/display/text-display.d.ts +1 -1
  121. package/dist/components/display/text-display.js +26 -2
  122. package/dist/components/display/text-display.js.map +1 -0
  123. package/dist/components/index.d.ts +23 -23
  124. package/dist/components/index.js +28 -45
  125. package/dist/components/interactive/action-row/ActionRow.d.ts +1 -1
  126. package/dist/components/interactive/action-row/ActionRow.js +20 -2
  127. package/dist/{ActionRow-CSN_UKmM.js.map → components/interactive/action-row/ActionRow.js.map} +1 -1
  128. package/dist/components/interactive/button/Button.d.ts +1 -1
  129. package/dist/components/interactive/button/Button.js +2 -24
  130. package/dist/components/interactive/button/ButtonKit.d.ts +1 -1
  131. package/dist/components/interactive/button/ButtonKit.js +2 -24
  132. package/dist/components/interactive/modal/Modal.d.ts +1 -1
  133. package/dist/components/interactive/modal/Modal.js +2 -24
  134. package/dist/components/interactive/modal/ModalKit.d.ts +1 -1
  135. package/dist/components/interactive/modal/ModalKit.js +2 -24
  136. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -1
  137. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +2 -24
  138. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -1
  139. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +2 -24
  140. package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -1
  141. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +2 -24
  142. package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -1
  143. package/dist/components/interactive/select-menu/SelectMenu.js +2 -24
  144. package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -1
  145. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +2 -24
  146. package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -1
  147. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +2 -24
  148. package/dist/components/interactive/select-menu/common.d.ts +1 -1
  149. package/dist/components/interactive/select-menu/common.js +1 -0
  150. package/dist/config/config.d.ts +1 -1
  151. package/dist/config/config.js +2 -24
  152. package/dist/config/default.d.ts +1 -1
  153. package/dist/config/default.js +2 -24
  154. package/dist/config/loader.d.ts +1 -1
  155. package/dist/config/loader.js +2 -24
  156. package/dist/config/types.d.ts +1 -1
  157. package/dist/config/types.js +1 -0
  158. package/dist/config/utils.d.ts +1 -1
  159. package/dist/config/utils.js +29 -2
  160. package/dist/config/utils.js.map +1 -0
  161. package/dist/{constants-EpKcj0dH.d.ts → constants-DqtJY0t-.d.ts} +2 -2
  162. package/dist/{constants-CuYW0K10.d.ts → constants-DwxpkIeH.d.ts} +7 -7
  163. package/dist/{container-DYcb7zGw.d.ts → container-CYojOA9d.d.ts} +1 -1
  164. package/dist/context/async-context.d.ts +1 -1
  165. package/dist/context/async-context.js +2 -24
  166. package/dist/context/environment.d.ts +1 -1
  167. package/dist/context/environment.js +2 -24
  168. package/dist/{element-wQo0heGj.d.ts → element-DeLvTMfZ.d.ts} +5 -4
  169. package/dist/events/CommandKitEventsChannel.d.ts +1 -1
  170. package/dist/events/CommandKitEventsChannel.js +83 -2
  171. package/dist/events/CommandKitEventsChannel.js.map +1 -0
  172. package/dist/{file-CrV4lSnl.d.ts → file-DLO1zEcH.d.ts} +1 -1
  173. package/dist/flags/FlagProvider.d.ts +1 -1
  174. package/dist/flags/FlagProvider.js +1 -0
  175. package/dist/flags/FlagProvider.js.map +1 -1
  176. package/dist/flags/feature-flags.d.ts +1 -1
  177. package/dist/flags/feature-flags.js +5 -165
  178. package/dist/flags/store.d.ts +1 -1
  179. package/dist/flags/store.js +13 -2
  180. package/dist/flags/store.js.map +1 -0
  181. package/dist/{helpers-AQPLVY35.d.ts → helpers-zmC44Mcu.d.ts} +1 -1
  182. package/dist/index.d.ts +31 -31
  183. package/dist/index.js +78 -97
  184. package/dist/kv/constants.d.ts +1 -1
  185. package/dist/kv/constants.js +22 -2
  186. package/dist/kv/constants.js.map +1 -0
  187. package/dist/kv/dotprops.js +1 -0
  188. package/dist/kv/dotprops.js.map +1 -1
  189. package/dist/kv/kv.d.ts +288 -288
  190. package/dist/kv/kv.js +2 -1
  191. package/dist/kv/kv.js.map +1 -1
  192. package/dist/kv/serde.d.ts +1 -1
  193. package/dist/kv/serde.js +29 -28
  194. package/dist/kv/serde.js.map +1 -1
  195. package/dist/{label-37kaNWMH.d.ts → label-DqGRqodo.d.ts} +3 -3
  196. package/dist/logger/DefaultLogger.d.ts +19 -19
  197. package/dist/logger/DefaultLogger.js +2 -24
  198. package/dist/logger/ILogger.d.ts +35 -35
  199. package/dist/logger/ILogger.js +1 -0
  200. package/dist/logger/Logger.d.ts +5 -5
  201. package/dist/logger/Logger.js +2 -24
  202. package/dist/logger/NoopLogger.d.ts +35 -35
  203. package/dist/logger/NoopLogger.js +1 -0
  204. package/dist/logger/NoopLogger.js.map +1 -1
  205. package/dist/{media-gallery-Ci3I4ElH.d.ts → media-gallery-Ca8es-eB.d.ts} +1 -1
  206. package/dist/plugins/CompilerPlugin.d.ts +1 -1
  207. package/dist/plugins/CompilerPlugin.js +33 -3
  208. package/dist/plugins/CompilerPlugin.js.map +1 -0
  209. package/dist/plugins/PluginCommon.d.ts +1 -1
  210. package/dist/plugins/PluginCommon.js +55 -4
  211. package/dist/plugins/PluginCommon.js.map +1 -0
  212. package/dist/plugins/RuntimePlugin.d.ts +1 -1
  213. package/dist/plugins/RuntimePlugin.js +124 -3
  214. package/dist/plugins/RuntimePlugin.js.map +1 -0
  215. package/dist/plugins/index.d.ts +1 -1
  216. package/dist/plugins/index.js +8 -30
  217. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -1
  218. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +2 -24
  219. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -1
  220. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +2 -24
  221. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -1
  222. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +2 -24
  223. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -1
  224. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +2 -24
  225. package/dist/plugins/plugin-runtime/runtime.d.ts +1 -1
  226. package/dist/plugins/plugin-runtime/runtime.js +1 -0
  227. package/dist/plugins/types.d.ts +1 -1
  228. package/dist/plugins/types.js +1 -0
  229. package/dist/{poll-Ddtapd6n.d.ts → poll-DQ6DX_Tt.d.ts} +8 -8
  230. package/dist/{section-DkUKULnB.d.ts → section-Q8nwx_-q.d.ts} +1 -1
  231. package/dist/{separator-CbXsIFCa.d.ts → separator-B8P-kdIK.d.ts} +1 -1
  232. package/dist/{signals-BbTgTc0i.d.ts → signals-CBXwugBW.d.ts} +1 -1
  233. package/dist/{text-display-D7j39VC-.d.ts → text-display-CL9C2yMc.d.ts} +1 -1
  234. package/dist/{types-BywA9d2Z.d.ts → types-DZy7U-Ld.d.ts} +1 -1
  235. package/dist/types.d.ts +1 -1
  236. package/dist/types.js +1 -0
  237. package/dist/utils/colors.js +9 -3
  238. package/dist/utils/colors.js.map +1 -0
  239. package/dist/utils/constants.d.ts +1 -1
  240. package/dist/utils/constants.js +50 -8
  241. package/dist/utils/constants.js.map +1 -0
  242. package/dist/utils/dev-hooks.d.ts +1 -1
  243. package/dist/utils/dev-hooks.js +2 -24
  244. package/dist/utils/error-codes.d.ts +10 -10
  245. package/dist/utils/error-codes.js +53 -5
  246. package/dist/utils/error-codes.js.map +1 -0
  247. package/dist/utils/resolve-file-url.js +18 -2
  248. package/dist/utils/resolve-file-url.js.map +1 -0
  249. package/dist/utils/types-package.js +61 -4
  250. package/dist/utils/types-package.js.map +1 -0
  251. package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
  252. package/dist/utils/useful-stuff/async-queue.js +1 -0
  253. package/dist/utils/useful-stuff/async-queue.js.map +1 -1
  254. package/dist/utils/useful-stuff/mutex.d.ts +62 -62
  255. package/dist/utils/useful-stuff/mutex.js +1 -0
  256. package/dist/utils/useful-stuff/mutex.js.map +1 -1
  257. package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
  258. package/dist/utils/useful-stuff/ratelimiter.js +1 -0
  259. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  260. package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
  261. package/dist/utils/useful-stuff/semaphore.js +1 -0
  262. package/dist/utils/useful-stuff/semaphore.js.map +1 -1
  263. package/dist/utils/utilities.d.ts +5 -5
  264. package/dist/utils/utilities.js +2 -24
  265. package/dist/utils/warning.js +38 -4
  266. package/dist/utils/warning.js.map +1 -0
  267. package/dist/version.js +2 -1
  268. package/dist/version.js.map +1 -1
  269. package/package.json +12 -15
  270. package/dist/ActionRow-CSN_UKmM.js +0 -25
  271. package/dist/CommandKitEventsChannel-CnT5ymYe.js +0 -88
  272. package/dist/CommandKitEventsChannel-CnT5ymYe.js.map +0 -1
  273. package/dist/CommandsRouter-C_HLsrGX.js +0 -215
  274. package/dist/CommandsRouter-C_HLsrGX.js.map +0 -1
  275. package/dist/CompilerPlugin-CUsGAfgl.js +0 -43
  276. package/dist/CompilerPlugin-CUsGAfgl.js.map +0 -1
  277. package/dist/EventInterceptor-BWoEJMHZ.js +0 -142
  278. package/dist/EventInterceptor-BWoEJMHZ.js.map +0 -1
  279. package/dist/EventWorkerContext-Dfhgv329.js +0 -68
  280. package/dist/EventWorkerContext-Dfhgv329.js.map +0 -1
  281. package/dist/EventsRouter-DZYIha6m.js +0 -133
  282. package/dist/EventsRouter-DZYIha6m.js.map +0 -1
  283. package/dist/MessageCommandParser-Bs9fimmd.js +0 -271
  284. package/dist/MessageCommandParser-Bs9fimmd.js.map +0 -1
  285. package/dist/MessageCommandParser-q3dQcE5N.d.ts +0 -194
  286. package/dist/PluginCommon-BLxWww5u.js +0 -70
  287. package/dist/PluginCommon-BLxWww5u.js.map +0 -1
  288. package/dist/RuntimePlugin-CtobluSU.js +0 -134
  289. package/dist/RuntimePlugin-CtobluSU.js.map +0 -1
  290. package/dist/colors-Csc0X4QJ.js +0 -14
  291. package/dist/colors-Csc0X4QJ.js.map +0 -1
  292. package/dist/commandkit-SIjTLD2R.js.map +0 -1
  293. package/dist/common-C2jAjX4U.js +0 -0
  294. package/dist/common-CEordwf3.js +0 -17
  295. package/dist/common-CEordwf3.js.map +0 -1
  296. package/dist/common-DSRs_mfw.js +0 -222
  297. package/dist/common-DSRs_mfw.js.map +0 -1
  298. package/dist/constants-BFFK-hfP.js +0 -27
  299. package/dist/constants-BFFK-hfP.js.map +0 -1
  300. package/dist/constants-Cw8VjCVz.js +0 -36
  301. package/dist/constants-Cw8VjCVz.js.map +0 -1
  302. package/dist/constants-CxkFFZ7p.js +0 -85
  303. package/dist/constants-CxkFFZ7p.js.map +0 -1
  304. package/dist/container-DCPljKVH.js +0 -43
  305. package/dist/container-DCPljKVH.js.map +0 -1
  306. package/dist/display-WDb9wMCv.js +0 -0
  307. package/dist/element-DibzzA5L.js +0 -84
  308. package/dist/element-DibzzA5L.js.map +0 -1
  309. package/dist/env-CmspDhHy.js +0 -113
  310. package/dist/env-CmspDhHy.js.map +0 -1
  311. package/dist/error-codes-Ds0bnPvT.js +0 -73
  312. package/dist/error-codes-Ds0bnPvT.js.map +0 -1
  313. package/dist/file-Ca1kpEtE.js +0 -28
  314. package/dist/file-Ca1kpEtE.js.map +0 -1
  315. package/dist/flags/feature-flags.js.map +0 -1
  316. package/dist/helpers-Btx1FSZx.js +0 -35
  317. package/dist/helpers-Btx1FSZx.js.map +0 -1
  318. package/dist/index.js.map +0 -1
  319. package/dist/label-B6vXvwLM.js +0 -35
  320. package/dist/label-B6vXvwLM.js.map +0 -1
  321. package/dist/media-gallery-u3gjX7yD.js +0 -61
  322. package/dist/media-gallery-u3gjX7yD.js.map +0 -1
  323. package/dist/poll-CFe8yvoJ.js +0 -100
  324. package/dist/resolve-file-url-CdHqwWs3.js +0 -23
  325. package/dist/resolve-file-url-CdHqwWs3.js.map +0 -1
  326. package/dist/router-BvamdzoF.js +0 -0
  327. package/dist/runtime-Skt5NiOc.js +0 -0
  328. package/dist/section-BC8LF-B2.js +0 -59
  329. package/dist/section-BC8LF-B2.js.map +0 -1
  330. package/dist/separator-BUTiW7uz.js +0 -26
  331. package/dist/separator-BUTiW7uz.js.map +0 -1
  332. package/dist/signals-B8z1wJ6W.js +0 -74
  333. package/dist/signals-B8z1wJ6W.js.map +0 -1
  334. package/dist/store-D8r_hryO.js +0 -18
  335. package/dist/store-D8r_hryO.js.map +0 -1
  336. package/dist/text-display-DANahMN3.js +0 -31
  337. package/dist/text-display-DANahMN3.js.map +0 -1
  338. package/dist/type-checker-cVd3Hpnh.js +0 -88
  339. package/dist/type-checker-cVd3Hpnh.js.map +0 -1
  340. package/dist/types-Cdh4uaFR.js +0 -0
  341. package/dist/types-TC4g3w91.js +0 -0
  342. package/dist/types-package-CsTNfvv2.js +0 -71
  343. package/dist/types-package-CsTNfvv2.js.map +0 -1
  344. package/dist/utils-Br3eenD1.js +0 -34
  345. package/dist/utils-Br3eenD1.js.map +0 -1
  346. package/dist/warning-CszH8HeS.js +0 -53
  347. package/dist/warning-CszH8HeS.js.map +0 -1
  348. /package/dist/{index-BJfko-dP.d.ts → index-BIsCUWAs.d.ts} +0 -0
  349. /package/dist/{index-CCggO_hw.d.ts → index-CwHYpK-f.d.ts} +0 -0
  350. /package/dist/{index-CLjpoGi1.d.ts → index-DHrsNvX1.d.ts} +0 -0
package/dist/kv/kv.d.ts CHANGED
@@ -45,342 +45,342 @@ declare class KV implements Disposable, AsyncDisposable {
45
45
  private db;
46
46
  private statements;
47
47
  /**
48
- * Creates a new KV store instance
49
- *
50
- * @param path - Database file path, buffer, URL, or existing DatabaseSync instance
51
- * @param options - Configuration options for the KV store
52
- */
48
+ * Creates a new KV store instance
49
+ *
50
+ * @param path - Database file path, buffer, URL, or existing DatabaseSync instance
51
+ * @param options - Configuration options for the KV store
52
+ */
53
53
  constructor(path: string | Buffer | URL | DatabaseSync, options?: KvOptions);
54
54
  /**
55
- * Gets the current timestamp in milliseconds
56
- */
55
+ * Gets the current timestamp in milliseconds
56
+ */
57
57
  private getCurrentTime;
58
58
  /**
59
- * Checks if the database connection is open
60
- *
61
- * @returns `true` if the database is open, `false` otherwise
62
- */
59
+ * Checks if the database connection is open
60
+ *
61
+ * @returns `true` if the database is open, `false` otherwise
62
+ */
63
63
  isOpen(): boolean;
64
64
  /**
65
- * Gets the underlying SQLite database instance
66
- *
67
- * @returns The DatabaseSync instance
68
- */
65
+ * Gets the underlying SQLite database instance
66
+ *
67
+ * @returns The DatabaseSync instance
68
+ */
69
69
  getDatabase(): DatabaseSync;
70
70
  /**
71
- * Closes the database connection
72
- */
71
+ * Closes the database connection
72
+ */
73
73
  close(): void;
74
74
  /**
75
- * Disposable implementation - closes the database when disposed
76
- */
75
+ * Disposable implementation - closes the database when disposed
76
+ */
77
77
  [Symbol.dispose](): void;
78
78
  /**
79
- * AsyncDisposable implementation - closes the database when disposed
80
- */
79
+ * AsyncDisposable implementation - closes the database when disposed
80
+ */
81
81
  [Symbol.asyncDispose](): Promise<void>;
82
82
  /**
83
- * Retrieves a value by key
84
- *
85
- * @param key - The key to retrieve (supports dot notation for nested properties)
86
- * @returns The value associated with the key, or `undefined` if not found or expired
87
- *
88
- * @example
89
- * ```typescript
90
- * // Store an object
91
- * kv.set('user:123', { name: 'John', age: 30, settings: { theme: 'dark' } });
92
- *
93
- * // Get the entire object
94
- * const user = kv.get('user:123');
95
- * // { name: 'John', age: 30, settings: { theme: 'dark' } }
96
- *
97
- * // Get nested properties using dot notation
98
- * const name = kv.get('user:123.name'); // 'John'
99
- * const theme = kv.get('user:123.settings.theme'); // 'dark'
100
- * ```
101
- */
83
+ * Retrieves a value by key
84
+ *
85
+ * @param key - The key to retrieve (supports dot notation for nested properties)
86
+ * @returns The value associated with the key, or `undefined` if not found or expired
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * // Store an object
91
+ * kv.set('user:123', { name: 'John', age: 30, settings: { theme: 'dark' } });
92
+ *
93
+ * // Get the entire object
94
+ * const user = kv.get('user:123');
95
+ * // { name: 'John', age: 30, settings: { theme: 'dark' } }
96
+ *
97
+ * // Get nested properties using dot notation
98
+ * const name = kv.get('user:123.name'); // 'John'
99
+ * const theme = kv.get('user:123.settings.theme'); // 'dark'
100
+ * ```
101
+ */
102
102
  get<T = any>(key: string): T | undefined;
103
103
  /**
104
- * Sets a key-value pair
105
- *
106
- * @param key - The key to set (supports dot notation for nested properties)
107
- * @param value - The value to associate with the key (any JSON-serializable type)
108
- *
109
- * @example
110
- * ```typescript
111
- * // Store primitive values
112
- * kv.set('counter', 42);
113
- * kv.set('active', true);
114
- * kv.set('name', 'John');
115
- *
116
- * // Store objects
117
- * kv.set('user:123', { name: 'John', age: 30 });
118
- *
119
- * // Store arrays
120
- * kv.set('tags', ['javascript', 'typescript', 'sqlite']);
121
- *
122
- * // Store dates
123
- * kv.set('created', new Date());
124
- *
125
- * // Store maps and sets
126
- * kv.set('permissions', new Map([['admin', true], ['user', false]]));
127
- * kv.set('unique_ids', new Set([1, 2, 3, 4, 5]));
128
- *
129
- * // Use dot notation for nested properties
130
- * kv.set('user:123.settings.theme', 'dark');
131
- * kv.set('user:123.settings.notifications', true);
132
- * ```
133
- */
104
+ * Sets a key-value pair
105
+ *
106
+ * @param key - The key to set (supports dot notation for nested properties)
107
+ * @param value - The value to associate with the key (any JSON-serializable type)
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * // Store primitive values
112
+ * kv.set('counter', 42);
113
+ * kv.set('active', true);
114
+ * kv.set('name', 'John');
115
+ *
116
+ * // Store objects
117
+ * kv.set('user:123', { name: 'John', age: 30 });
118
+ *
119
+ * // Store arrays
120
+ * kv.set('tags', ['javascript', 'typescript', 'sqlite']);
121
+ *
122
+ * // Store dates
123
+ * kv.set('created', new Date());
124
+ *
125
+ * // Store maps and sets
126
+ * kv.set('permissions', new Map([['admin', true], ['user', false]]));
127
+ * kv.set('unique_ids', new Set([1, 2, 3, 4, 5]));
128
+ *
129
+ * // Use dot notation for nested properties
130
+ * kv.set('user:123.settings.theme', 'dark');
131
+ * kv.set('user:123.settings.notifications', true);
132
+ * ```
133
+ */
134
134
  set(key: string, value: any): void;
135
135
  /**
136
- * Sets a key-value pair with expiration
137
- *
138
- * @param key - The key to set (supports dot notation for nested properties)
139
- * @param value - The value to associate with the key (any JSON-serializable type)
140
- * @param ttl - Time to live in milliseconds
141
- *
142
- * @example
143
- * ```typescript
144
- * // Set with 1 hour expiration
145
- * kv.setex('session:123', { userId: 123, token: 'abc123' }, 60 * 60 * 1000);
146
- *
147
- * // Set with 5 minutes expiration
148
- * kv.setex('temp:data', { cached: true, timestamp: Date.now() }, 5 * 60 * 1000);
149
- *
150
- * // Use dot notation with expiration
151
- * kv.setex('user:123.temp_settings', { theme: 'light' }, 30 * 60 * 1000);
152
- * ```
153
- */
136
+ * Sets a key-value pair with expiration
137
+ *
138
+ * @param key - The key to set (supports dot notation for nested properties)
139
+ * @param value - The value to associate with the key (any JSON-serializable type)
140
+ * @param ttl - Time to live in milliseconds
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * // Set with 1 hour expiration
145
+ * kv.setex('session:123', { userId: 123, token: 'abc123' }, 60 * 60 * 1000);
146
+ *
147
+ * // Set with 5 minutes expiration
148
+ * kv.setex('temp:data', { cached: true, timestamp: Date.now() }, 5 * 60 * 1000);
149
+ *
150
+ * // Use dot notation with expiration
151
+ * kv.setex('user:123.temp_settings', { theme: 'light' }, 30 * 60 * 1000);
152
+ * ```
153
+ */
154
154
  setex(key: string, value: any, ttl: number): void;
155
155
  /**
156
- * Performs mathematical operations on numeric values in the KV store
157
- *
158
- * @param key - The key to perform math operation on (supports dot notation for nested properties)
159
- * @param operator - The mathematical operator to apply
160
- * @param value - The value to use in the operation
161
- * @returns The updated value after the mathematical operation
162
- * @throws Error if the existing value is not numeric or if the operation is invalid
163
- *
164
- * @example
165
- * ```typescript
166
- * // Initialize a counter
167
- * kv.set('counter', 10);
168
- *
169
- * // Increment by 5
170
- * const result1 = kv.math('counter', '+', 5); // 15
171
- *
172
- * // Multiply by 2
173
- * const result2 = kv.math('counter', '*', 2); // 30
174
- *
175
- * // Use with bigint
176
- * kv.set('big_counter', BigInt(1000));
177
- * const result3 = kv.math('big_counter', '+', BigInt(500)); // 1500n
178
- *
179
- * // Use with dot notation
180
- * kv.set('user:123', { score: 100, level: 5 });
181
- * const result4 = kv.math('user:123.score', '+', 50); // 150
182
- * ```
183
- */
156
+ * Performs mathematical operations on numeric values in the KV store
157
+ *
158
+ * @param key - The key to perform math operation on (supports dot notation for nested properties)
159
+ * @param operator - The mathematical operator to apply
160
+ * @param value - The value to use in the operation
161
+ * @returns The updated value after the mathematical operation
162
+ * @throws Error if the existing value is not numeric or if the operation is invalid
163
+ *
164
+ * @example
165
+ * ```typescript
166
+ * // Initialize a counter
167
+ * kv.set('counter', 10);
168
+ *
169
+ * // Increment by 5
170
+ * const result1 = kv.math('counter', '+', 5); // 15
171
+ *
172
+ * // Multiply by 2
173
+ * const result2 = kv.math('counter', '*', 2); // 30
174
+ *
175
+ * // Use with bigint
176
+ * kv.set('big_counter', BigInt(1000));
177
+ * const result3 = kv.math('big_counter', '+', BigInt(500)); // 1500n
178
+ *
179
+ * // Use with dot notation
180
+ * kv.set('user:123', { score: 100, level: 5 });
181
+ * const result4 = kv.math('user:123.score', '+', 50); // 150
182
+ * ```
183
+ */
184
184
  math(key: string, operator: KvMathOperator, value: number | bigint): number | bigint;
185
185
  /**
186
- * Sets expiration for an existing key
187
- *
188
- * @param key - The key to set expiration for
189
- * @param ttl - Time to live in milliseconds
190
- * @returns `true` if the key exists and expiration was set, `false` otherwise
191
- *
192
- * @example
193
- * ```typescript
194
- * kv.set('user:123', { name: 'John', age: 30 });
195
- *
196
- * // Set 30 minute expiration
197
- * if (kv.expire('user:123', 30 * 60 * 1000)) {
198
- * console.log('Expiration set successfully');
199
- * }
200
- * ```
201
- */
186
+ * Sets expiration for an existing key
187
+ *
188
+ * @param key - The key to set expiration for
189
+ * @param ttl - Time to live in milliseconds
190
+ * @returns `true` if the key exists and expiration was set, `false` otherwise
191
+ *
192
+ * @example
193
+ * ```typescript
194
+ * kv.set('user:123', { name: 'John', age: 30 });
195
+ *
196
+ * // Set 30 minute expiration
197
+ * if (kv.expire('user:123', 30 * 60 * 1000)) {
198
+ * console.log('Expiration set successfully');
199
+ * }
200
+ * ```
201
+ */
202
202
  expire(key: string, ttl: number): boolean;
203
203
  /**
204
- * Gets the time to live for a key
205
- *
206
- * @param key - The key to check
207
- * @returns Time to live in milliseconds, or `-1` if the key doesn't exist, or `-2` if the key has no expiration
208
- *
209
- * @example
210
- * ```typescript
211
- * const ttl = kv.ttl('user:123');
212
- * if (ttl > 0) {
213
- * console.log(`Key expires in ${ttl}ms`);
214
- * } else if (ttl === -2) {
215
- * console.log('Key has no expiration');
216
- * } else {
217
- * console.log('Key does not exist');
218
- * }
219
- * ```
220
- */
204
+ * Gets the time to live for a key
205
+ *
206
+ * @param key - The key to check
207
+ * @returns Time to live in milliseconds, or `-1` if the key doesn't exist, or `-2` if the key has no expiration
208
+ *
209
+ * @example
210
+ * ```typescript
211
+ * const ttl = kv.ttl('user:123');
212
+ * if (ttl > 0) {
213
+ * console.log(`Key expires in ${ttl}ms`);
214
+ * } else if (ttl === -2) {
215
+ * console.log('Key has no expiration');
216
+ * } else {
217
+ * console.log('Key does not exist');
218
+ * }
219
+ * ```
220
+ */
221
221
  ttl(key: string): number;
222
222
  /**
223
- * Deletes a key-value pair
224
- *
225
- * @param key - The key to delete
226
- *
227
- * @example
228
- * ```typescript
229
- * kv.delete('user:123');
230
- * kv.delete('user:123.settings.theme'); // Delete nested property
231
- * ```
232
- */
223
+ * Deletes a key-value pair
224
+ *
225
+ * @param key - The key to delete
226
+ *
227
+ * @example
228
+ * ```typescript
229
+ * kv.delete('user:123');
230
+ * kv.delete('user:123.settings.theme'); // Delete nested property
231
+ * ```
232
+ */
233
233
  delete(key: string): void;
234
234
  /**
235
- * Checks if a key exists and is not expired
236
- *
237
- * @param key - The key to check
238
- * @returns `true` if the key exists and is not expired, `false` otherwise
239
- *
240
- * @example
241
- * ```typescript
242
- * if (kv.has('user:123')) {
243
- * console.log('User exists and is not expired');
244
- * }
245
- *
246
- * if (kv.has('user:123.settings.theme')) {
247
- * console.log('Theme setting exists');
248
- * }
249
- * ```
250
- */
235
+ * Checks if a key exists and is not expired
236
+ *
237
+ * @param key - The key to check
238
+ * @returns `true` if the key exists and is not expired, `false` otherwise
239
+ *
240
+ * @example
241
+ * ```typescript
242
+ * if (kv.has('user:123')) {
243
+ * console.log('User exists and is not expired');
244
+ * }
245
+ *
246
+ * if (kv.has('user:123.settings.theme')) {
247
+ * console.log('Theme setting exists');
248
+ * }
249
+ * ```
250
+ */
251
251
  has(key: string): boolean;
252
252
  /**
253
- * Gets all keys in the current namespace (excluding expired keys)
254
- *
255
- * @returns Array of all non-expired keys
256
- *
257
- * @example
258
- * ```typescript
259
- * const keys = kv.keys();
260
- * console.log('All keys:', keys);
261
- * ```
262
- */
253
+ * Gets all keys in the current namespace (excluding expired keys)
254
+ *
255
+ * @returns Array of all non-expired keys
256
+ *
257
+ * @example
258
+ * ```typescript
259
+ * const keys = kv.keys();
260
+ * console.log('All keys:', keys);
261
+ * ```
262
+ */
263
263
  keys(): string[];
264
264
  /**
265
- * Gets all values in the current namespace (excluding expired keys)
266
- *
267
- * @returns Array of all non-expired values
268
- *
269
- * @example
270
- * ```typescript
271
- * const values = kv.values();
272
- * console.log('All values:', values);
273
- * ```
274
- */
265
+ * Gets all values in the current namespace (excluding expired keys)
266
+ *
267
+ * @returns Array of all non-expired values
268
+ *
269
+ * @example
270
+ * ```typescript
271
+ * const values = kv.values();
272
+ * console.log('All values:', values);
273
+ * ```
274
+ */
275
275
  values(): any[];
276
276
  /**
277
- * Gets the total number of key-value pairs in the current namespace (excluding expired keys)
278
- *
279
- * @returns The count of non-expired key-value pairs
280
- *
281
- * @example
282
- * ```typescript
283
- * const count = kv.count();
284
- * console.log(`Total entries: ${count}`);
285
- * ```
286
- */
277
+ * Gets the total number of key-value pairs in the current namespace (excluding expired keys)
278
+ *
279
+ * @returns The count of non-expired key-value pairs
280
+ *
281
+ * @example
282
+ * ```typescript
283
+ * const count = kv.count();
284
+ * console.log(`Total entries: ${count}`);
285
+ * ```
286
+ */
287
287
  count(): number;
288
288
  /**
289
- * Removes all key-value pairs from the current namespace
290
- *
291
- * @example
292
- * ```typescript
293
- * kv.clear(); // Removes all entries in current namespace
294
- * ```
295
- */
289
+ * Removes all key-value pairs from the current namespace
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * kv.clear(); // Removes all entries in current namespace
294
+ * ```
295
+ */
296
296
  clear(): void;
297
297
  /**
298
- * Gets all key-value pairs as an object (excluding expired keys)
299
- *
300
- * @returns Object with all non-expired key-value pairs
301
- *
302
- * @example
303
- * ```typescript
304
- * const all = kv.all();
305
- * console.log('All entries:', all);
306
- * // Output: { 'key1': value1, 'key2': value2 }
307
- * ```
308
- */
298
+ * Gets all key-value pairs as an object (excluding expired keys)
299
+ *
300
+ * @returns Object with all non-expired key-value pairs
301
+ *
302
+ * @example
303
+ * ```typescript
304
+ * const all = kv.all();
305
+ * console.log('All entries:', all);
306
+ * // Output: { 'key1': value1, 'key2': value2 }
307
+ * ```
308
+ */
309
309
  all(): Record<string, any>;
310
310
  /**
311
- * Gets all available namespaces (tables) in the database
312
- *
313
- * @returns Array of namespace names
314
- *
315
- * @example
316
- * ```typescript
317
- * const namespaces = kv.namespaces();
318
- * console.log('Available namespaces:', namespaces);
319
- * ```
320
- */
311
+ * Gets all available namespaces (tables) in the database
312
+ *
313
+ * @returns Array of namespace names
314
+ *
315
+ * @example
316
+ * ```typescript
317
+ * const namespaces = kv.namespaces();
318
+ * console.log('Available namespaces:', namespaces);
319
+ * ```
320
+ */
321
321
  namespaces(): string[];
322
322
  /**
323
- * Gets the current namespace name
324
- *
325
- * @returns The current namespace string
326
- */
323
+ * Gets the current namespace name
324
+ *
325
+ * @returns The current namespace string
326
+ */
327
327
  getCurrentNamespace(): string;
328
328
  /**
329
- * Creates a new KV instance with a different namespace
330
- *
331
- * @param namespace - The namespace to use for the new instance
332
- * @returns A new KV instance with the specified namespace
333
- *
334
- * @example
335
- * ```typescript
336
- * const userKv = kv.namespace('users');
337
- * const configKv = kv.namespace('config');
338
- *
339
- * userKv.set('123', { name: 'John', age: 30 });
340
- * configKv.set('theme', 'dark');
341
- * ```
342
- */
329
+ * Creates a new KV instance with a different namespace
330
+ *
331
+ * @param namespace - The namespace to use for the new instance
332
+ * @returns A new KV instance with the specified namespace
333
+ *
334
+ * @example
335
+ * ```typescript
336
+ * const userKv = kv.namespace('users');
337
+ * const configKv = kv.namespace('config');
338
+ *
339
+ * userKv.set('123', { name: 'John', age: 30 });
340
+ * configKv.set('theme', 'dark');
341
+ * ```
342
+ */
343
343
  namespace(namespace: string): KV;
344
344
  /**
345
- * Iterator implementation for iterating over all non-expired key-value pairs
346
- *
347
- * @returns Iterator yielding [key, value] tuples
348
- *
349
- * @example
350
- * ```typescript
351
- * for (const [key, value] of kv) {
352
- * console.log(`${key}:`, value);
353
- * }
354
- *
355
- * // Or using spread operator
356
- * const entries = [...kv];
357
- * ```
358
- */
345
+ * Iterator implementation for iterating over all non-expired key-value pairs
346
+ *
347
+ * @returns Iterator yielding [key, value] tuples
348
+ *
349
+ * @example
350
+ * ```typescript
351
+ * for (const [key, value] of kv) {
352
+ * console.log(`${key}:`, value);
353
+ * }
354
+ *
355
+ * // Or using spread operator
356
+ * const entries = [...kv];
357
+ * ```
358
+ */
359
359
  [Symbol.iterator](): Iterator<[string, any]>;
360
360
  /**
361
- * Executes a function within a transaction
362
- *
363
- * @param fn - Function to execute within the transaction (can be async)
364
- * @returns The result of the function
365
- *
366
- * @example
367
- * ```typescript
368
- * // Synchronous transaction
369
- * kv.transaction(() => {
370
- * kv.set('user:123', { name: 'John', age: 30 });
371
- * kv.set('user:456', { name: 'Jane', age: 25 });
372
- * // If any operation fails, all changes are rolled back
373
- * });
374
- *
375
- * // Async transaction
376
- * await kv.transaction(async () => {
377
- * kv.set('user:123', { name: 'John', age: 30 });
378
- * await someAsyncOperation();
379
- * kv.set('user:456', { name: 'Jane', age: 25 });
380
- * // If any operation fails, all changes are rolled back
381
- * });
382
- * ```
383
- */
361
+ * Executes a function within a transaction
362
+ *
363
+ * @param fn - Function to execute within the transaction (can be async)
364
+ * @returns The result of the function
365
+ *
366
+ * @example
367
+ * ```typescript
368
+ * // Synchronous transaction
369
+ * kv.transaction(() => {
370
+ * kv.set('user:123', { name: 'John', age: 30 });
371
+ * kv.set('user:456', { name: 'Jane', age: 25 });
372
+ * // If any operation fails, all changes are rolled back
373
+ * });
374
+ *
375
+ * // Async transaction
376
+ * await kv.transaction(async () => {
377
+ * kv.set('user:123', { name: 'John', age: 30 });
378
+ * await someAsyncOperation();
379
+ * kv.set('user:456', { name: 'Jane', age: 25 });
380
+ * // If any operation fails, all changes are rolled back
381
+ * });
382
+ * ```
383
+ */
384
384
  transaction<T>(fn: () => T | Promise<T>): Promise<T>;
385
385
  }
386
386
  /**
package/dist/kv/kv.js CHANGED
@@ -1,4 +1,5 @@
1
- const require_chunk = require('../chunk-kSYXY2_d.js');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-BE-pF4vm.js');
2
3
  const require_kv_dotprops = require('./dotprops.js');
3
4
  const require_kv_serde = require('./serde.js');
4
5
  let node_sqlite = require("node:sqlite");