lakutata 2.0.96 → 2.0.97

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 (1189) hide show
  1. package/com/cacher.cjs +31 -135
  2. package/com/cacher.mjs +23 -127
  3. package/com/database.cjs +24 -166
  4. package/com/database.mjs +24 -166
  5. package/com/docker.cjs +94 -276
  6. package/com/docker.mjs +39 -221
  7. package/com/entrypoint.cjs +33 -119
  8. package/com/entrypoint.mjs +20 -106
  9. package/com/logger.cjs +19 -123
  10. package/com/logger.mjs +19 -123
  11. package/com/monitor.cjs +24 -88
  12. package/com/monitor.mjs +20 -84
  13. package/decorator/asst.cjs +5 -7
  14. package/decorator/asst.mjs +5 -7
  15. package/decorator/ctrl.cjs +22 -58
  16. package/decorator/ctrl.mjs +10 -46
  17. package/decorator/di.cjs +12 -42
  18. package/decorator/di.mjs +8 -38
  19. package/decorator/dto.cjs +13 -43
  20. package/decorator/dto.mjs +9 -39
  21. package/decorator/orm.cjs +117 -113
  22. package/decorator/orm.mjs +71 -67
  23. package/dtos.cjs +8 -38
  24. package/dtos.mjs +8 -38
  25. package/helper.cjs +73 -127
  26. package/helper.mjs +12 -66
  27. package/lakutata.cjs +116 -328
  28. package/lakutata.mjs +60 -272
  29. package/orm.cjs +854 -173
  30. package/orm.mjs +866 -65
  31. package/package.json +1 -1
  32. package/provider/database.cjs +26 -166
  33. package/provider/database.mjs +26 -166
  34. package/provider/passwordHash.cjs +18 -82
  35. package/provider/passwordHash.mjs +18 -82
  36. package/src/components/Database.cjs +36 -178
  37. package/src/components/Database.mjs +68 -210
  38. package/src/components/Logger.cjs +50 -191
  39. package/src/components/Logger.mjs +46 -194
  40. package/src/components/cacher/Cacher.cjs +511 -174
  41. package/src/components/cacher/Cacher.mjs +502 -171
  42. package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +547 -35
  43. package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +530 -34
  44. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +17 -61
  45. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +19 -63
  46. package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +21 -65
  47. package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +22 -66
  48. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +7 -45
  49. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +18 -56
  50. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +23 -67
  51. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +23 -67
  52. package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +6 -44
  53. package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +27 -65
  54. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +11 -55
  55. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +18 -62
  56. package/src/components/cacher/exceptions/CacheDriverNotFoundException.cjs +4 -6
  57. package/src/components/cacher/exceptions/CacheDriverNotFoundException.mjs +4 -6
  58. package/src/components/cacher/interfaces/CacherOptions.cjs +1 -1
  59. package/src/components/cacher/interfaces/CacherOptions.mjs +1 -1
  60. package/src/components/cacher/lib/IsDriverPackageInstalled.cjs +4 -6
  61. package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +4 -6
  62. package/src/components/cacher/options/FileCacheOptions.cjs +15 -45
  63. package/src/components/cacher/options/FileCacheOptions.mjs +15 -45
  64. package/src/components/cacher/options/MemcacheCacheOptions.cjs +16 -46
  65. package/src/components/cacher/options/MemcacheCacheOptions.mjs +17 -47
  66. package/src/components/cacher/options/MongoCacheOptions.cjs +9 -39
  67. package/src/components/cacher/options/MongoCacheOptions.mjs +18 -48
  68. package/src/components/cacher/options/MysqlCacheOptions.cjs +9 -39
  69. package/src/components/cacher/options/MysqlCacheOptions.mjs +19 -49
  70. package/src/components/cacher/options/PostgresCacheOptions.cjs +21 -51
  71. package/src/components/cacher/options/PostgresCacheOptions.mjs +20 -50
  72. package/src/components/cacher/options/RedisCacheOptions.cjs +26 -56
  73. package/src/components/cacher/options/RedisCacheOptions.mjs +9 -39
  74. package/src/components/cacher/options/SqliteCacheOptions.cjs +15 -45
  75. package/src/components/cacher/options/SqliteCacheOptions.mjs +14 -44
  76. package/src/components/cacher/types/CacheStoreOptions.cjs +1 -1
  77. package/src/components/cacher/types/CacheStoreOptions.mjs +1 -1
  78. package/src/components/docker/ConnectionOptionsBuilder.cjs +32 -214
  79. package/src/components/docker/ConnectionOptionsBuilder.mjs +37 -219
  80. package/src/components/docker/Docker.cjs +8727 -408
  81. package/src/components/docker/Docker.mjs +8903 -578
  82. package/src/components/docker/exceptions/DockerConnectionException.cjs +4 -6
  83. package/src/components/docker/exceptions/DockerConnectionException.mjs +4 -6
  84. package/src/components/docker/exceptions/DockerImageBuildException.cjs +4 -6
  85. package/src/components/docker/exceptions/DockerImageBuildException.mjs +4 -6
  86. package/src/components/docker/exceptions/DockerImageImportException.cjs +4 -6
  87. package/src/components/docker/exceptions/DockerImageImportException.mjs +4 -6
  88. package/src/components/docker/exceptions/DockerImageNotFoundException.cjs +4 -6
  89. package/src/components/docker/exceptions/DockerImageNotFoundException.mjs +4 -6
  90. package/src/components/docker/exceptions/DockerImagePullException.cjs +4 -6
  91. package/src/components/docker/exceptions/DockerImagePullException.mjs +4 -6
  92. package/src/components/docker/exceptions/DockerImagePushException.cjs +4 -6
  93. package/src/components/docker/exceptions/DockerImagePushException.mjs +4 -6
  94. package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.cjs +4 -6
  95. package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.mjs +4 -6
  96. package/src/components/docker/exceptions/DockerNetworkNotFoundException.cjs +4 -6
  97. package/src/components/docker/exceptions/DockerNetworkNotFoundException.mjs +4 -6
  98. package/src/components/docker/interfaces/IDockerConnectionOptions.cjs +1 -1
  99. package/src/components/docker/interfaces/IDockerConnectionOptions.mjs +1 -1
  100. package/src/components/docker/interfaces/IDockerHttpConnectionOptions.cjs +1 -1
  101. package/src/components/docker/interfaces/IDockerHttpConnectionOptions.mjs +1 -1
  102. package/src/components/docker/interfaces/IDockerHttpsConnectionOptions.cjs +1 -1
  103. package/src/components/docker/interfaces/IDockerHttpsConnectionOptions.mjs +1 -1
  104. package/src/components/docker/interfaces/IDockerKeyObject.cjs +1 -1
  105. package/src/components/docker/interfaces/IDockerKeyObject.mjs +1 -1
  106. package/src/components/docker/interfaces/IDockerSSHConnectionOptions.cjs +1 -1
  107. package/src/components/docker/interfaces/IDockerSSHConnectionOptions.mjs +1 -1
  108. package/src/components/docker/interfaces/IDockerSocketConnectionOptions.cjs +1 -1
  109. package/src/components/docker/interfaces/IDockerSocketConnectionOptions.mjs +1 -1
  110. package/src/components/docker/lib/DockerContainer.cjs +174 -330
  111. package/src/components/docker/lib/DockerContainer.mjs +184 -340
  112. package/src/components/docker/lib/DockerContainerTTY.cjs +52 -260
  113. package/src/components/docker/lib/DockerContainerTTY.mjs +48 -263
  114. package/src/components/docker/lib/DockerImage.cjs +69 -131
  115. package/src/components/docker/lib/DockerImage.mjs +54 -116
  116. package/src/components/docker/lib/ParseEnvToRecord.cjs +1 -1
  117. package/src/components/docker/lib/ParseEnvToRecord.mjs +1 -1
  118. package/src/components/docker/lib/ParseRepositoryTag.cjs +1 -1
  119. package/src/components/docker/lib/ParseRepositoryTag.mjs +1 -1
  120. package/src/components/docker/options/DockerPruneOptions.cjs +14 -44
  121. package/src/components/docker/options/DockerPruneOptions.mjs +15 -45
  122. package/src/components/docker/options/auth/DockerAuthOptions.cjs +9 -39
  123. package/src/components/docker/options/auth/DockerAuthOptions.mjs +15 -45
  124. package/src/components/docker/options/container/ContainerCommitOptions.cjs +12 -42
  125. package/src/components/docker/options/container/ContainerCommitOptions.mjs +12 -42
  126. package/src/components/docker/options/container/ContainerCreateTTYOptions.cjs +13 -43
  127. package/src/components/docker/options/container/ContainerCreateTTYOptions.mjs +12 -42
  128. package/src/components/docker/options/container/ContainerExecOptions.cjs +9 -39
  129. package/src/components/docker/options/container/ContainerExecOptions.mjs +11 -41
  130. package/src/components/docker/options/container/ContainerExportDirectoryOptions.cjs +13 -43
  131. package/src/components/docker/options/container/ContainerExportDirectoryOptions.mjs +12 -42
  132. package/src/components/docker/options/container/ContainerKillOptions.cjs +9 -39
  133. package/src/components/docker/options/container/ContainerKillOptions.mjs +12 -42
  134. package/src/components/docker/options/container/ContainerLogsOptions.cjs +15 -45
  135. package/src/components/docker/options/container/ContainerLogsOptions.mjs +15 -45
  136. package/src/components/docker/options/container/ContainerRemoveOptions.cjs +9 -39
  137. package/src/components/docker/options/container/ContainerRemoveOptions.mjs +12 -42
  138. package/src/components/docker/options/container/ContainerSettingOptions.cjs +9 -39
  139. package/src/components/docker/options/container/ContainerSettingOptions.mjs +43 -73
  140. package/src/components/docker/options/container/ContainerStopOptions.cjs +12 -42
  141. package/src/components/docker/options/container/ContainerStopOptions.mjs +9 -39
  142. package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.cjs +9 -39
  143. package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.mjs +12 -42
  144. package/src/components/docker/options/image/ImageBuildOptions.cjs +26 -56
  145. package/src/components/docker/options/image/ImageBuildOptions.mjs +25 -55
  146. package/src/components/docker/options/image/ImageExportOptions.cjs +14 -44
  147. package/src/components/docker/options/image/ImageExportOptions.mjs +14 -44
  148. package/src/components/docker/options/image/ImageImportOptions.cjs +13 -43
  149. package/src/components/docker/options/image/ImageImportOptions.mjs +12 -42
  150. package/src/components/docker/options/image/ImagePullOptions.cjs +9 -39
  151. package/src/components/docker/options/image/ImagePullOptions.mjs +16 -46
  152. package/src/components/docker/options/image/ImagePushOptions.cjs +15 -45
  153. package/src/components/docker/options/image/ImagePushOptions.mjs +15 -45
  154. package/src/components/docker/options/image/ImageRemoveOptions.cjs +12 -42
  155. package/src/components/docker/options/image/ImageRemoveOptions.mjs +13 -43
  156. package/src/components/docker/options/image/ImageTagOptions.cjs +9 -39
  157. package/src/components/docker/options/image/ImageTagOptions.mjs +12 -42
  158. package/src/components/docker/options/network/NetworkCreateOptions.cjs +9 -39
  159. package/src/components/docker/options/network/NetworkCreateOptions.mjs +20 -50
  160. package/src/components/docker/types/ContainerBind.cjs +1 -1
  161. package/src/components/docker/types/ContainerBind.mjs +1 -1
  162. package/src/components/docker/types/ContainerCapability.cjs +1 -1
  163. package/src/components/docker/types/ContainerCapability.mjs +1 -1
  164. package/src/components/docker/types/ContainerConfig.cjs +1 -1
  165. package/src/components/docker/types/ContainerConfig.mjs +1 -1
  166. package/src/components/docker/types/ContainerDevice.cjs +1 -1
  167. package/src/components/docker/types/ContainerDevice.mjs +1 -1
  168. package/src/components/docker/types/ContainerNetwork.cjs +1 -1
  169. package/src/components/docker/types/ContainerNetwork.mjs +1 -1
  170. package/src/components/docker/types/ContainerPort.cjs +1 -1
  171. package/src/components/docker/types/ContainerPort.mjs +1 -1
  172. package/src/components/docker/types/ContainerRestartPolicy.cjs +1 -1
  173. package/src/components/docker/types/ContainerRestartPolicy.mjs +1 -1
  174. package/src/components/docker/types/ContainerState.cjs +1 -1
  175. package/src/components/docker/types/ContainerState.mjs +1 -1
  176. package/src/components/docker/types/ContainerStats.cjs +1 -1
  177. package/src/components/docker/types/ContainerStats.mjs +1 -1
  178. package/src/components/docker/types/DockerOutputCallback.cjs +1 -1
  179. package/src/components/docker/types/DockerOutputCallback.mjs +1 -1
  180. package/src/components/docker/types/ImageConfig.cjs +1 -1
  181. package/src/components/docker/types/ImageConfig.mjs +1 -1
  182. package/src/components/docker/types/ImageExposePort.cjs +1 -1
  183. package/src/components/docker/types/ImageExposePort.mjs +1 -1
  184. package/src/components/docker/types/NetworkInfo.cjs +1 -1
  185. package/src/components/docker/types/NetworkInfo.mjs +1 -1
  186. package/src/components/entrypoint/Entrypoint.cjs +1961 -322
  187. package/src/components/entrypoint/Entrypoint.mjs +1928 -281
  188. package/src/components/entrypoint/exceptions/AccessDenyException.cjs +4 -6
  189. package/src/components/entrypoint/exceptions/AccessDenyException.mjs +4 -6
  190. package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +4 -6
  191. package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +4 -6
  192. package/src/components/entrypoint/exceptions/DuplicateActionNameException.cjs +4 -6
  193. package/src/components/entrypoint/exceptions/DuplicateActionNameException.mjs +4 -6
  194. package/src/components/entrypoint/exceptions/InvalidActionGroupException.cjs +4 -6
  195. package/src/components/entrypoint/exceptions/InvalidActionGroupException.mjs +4 -6
  196. package/src/components/entrypoint/lib/AccessControl.cjs +71 -133
  197. package/src/components/entrypoint/lib/AccessControl.mjs +75 -137
  198. package/src/components/entrypoint/lib/AccessControlRule.cjs +19 -81
  199. package/src/components/entrypoint/lib/AccessControlRule.mjs +23 -85
  200. package/src/components/entrypoint/lib/Controller.cjs +42 -104
  201. package/src/components/entrypoint/lib/Controller.mjs +43 -105
  202. package/src/components/monitor/AliveMonitor.cjs +40 -104
  203. package/src/components/monitor/AliveMonitor.mjs +50 -114
  204. package/src/components/monitor/CpuMonitor.cjs +40 -104
  205. package/src/components/monitor/CpuMonitor.mjs +48 -112
  206. package/src/components/monitor/EventLoopMonitor.cjs +19 -83
  207. package/src/components/monitor/EventLoopMonitor.mjs +24 -88
  208. package/src/components/monitor/HttpRequestMonitor.cjs +41 -105
  209. package/src/components/monitor/HttpRequestMonitor.mjs +45 -109
  210. package/src/components/monitor/MemoryMonitor.cjs +87 -151
  211. package/src/components/monitor/MemoryMonitor.mjs +71 -135
  212. package/src/components/monitor/interfaces/ICpuMonitorStatistics.cjs +1 -1
  213. package/src/components/monitor/interfaces/ICpuMonitorStatistics.mjs +1 -1
  214. package/src/components/monitor/interfaces/IEventLoopMonitorStatistics.cjs +1 -1
  215. package/src/components/monitor/interfaces/IEventLoopMonitorStatistics.mjs +1 -1
  216. package/src/components/monitor/interfaces/IHttpRequestMonitorStatistics.cjs +1 -1
  217. package/src/components/monitor/interfaces/IHttpRequestMonitorStatistics.mjs +1 -1
  218. package/src/components/monitor/interfaces/IMemoryMonitorStatistics.cjs +1 -1
  219. package/src/components/monitor/interfaces/IMemoryMonitorStatistics.mjs +1 -1
  220. package/src/components/monitor/interfaces/IMonitor.cjs +1 -1
  221. package/src/components/monitor/interfaces/IMonitor.mjs +1 -1
  222. package/src/constants/DIMetadataKey.cjs +3 -3
  223. package/src/constants/DIMetadataKey.mjs +3 -3
  224. package/src/constants/DTOMetadataKey.cjs +3 -3
  225. package/src/constants/DTOMetadataKey.mjs +3 -3
  226. package/src/decorators/asst/After.cjs +4 -6
  227. package/src/decorators/asst/After.mjs +5 -7
  228. package/src/decorators/asst/Before.cjs +4 -6
  229. package/src/decorators/asst/Before.mjs +5 -7
  230. package/src/decorators/ctrl/CLIAction.cjs +15 -51
  231. package/src/decorators/ctrl/CLIAction.mjs +19 -55
  232. package/src/decorators/ctrl/HTTPAction.cjs +15 -51
  233. package/src/decorators/ctrl/HTTPAction.mjs +19 -55
  234. package/src/decorators/ctrl/ServiceAction.cjs +15 -51
  235. package/src/decorators/ctrl/ServiceAction.mjs +18 -54
  236. package/src/decorators/ctrl/http/DELETE.cjs +12 -48
  237. package/src/decorators/ctrl/http/DELETE.mjs +14 -50
  238. package/src/decorators/ctrl/http/GET.cjs +12 -48
  239. package/src/decorators/ctrl/http/GET.mjs +14 -50
  240. package/src/decorators/ctrl/http/HEAD.cjs +12 -48
  241. package/src/decorators/ctrl/http/HEAD.mjs +14 -50
  242. package/src/decorators/ctrl/http/OPTIONS.cjs +12 -48
  243. package/src/decorators/ctrl/http/OPTIONS.mjs +14 -50
  244. package/src/decorators/ctrl/http/PATCH.cjs +12 -48
  245. package/src/decorators/ctrl/http/PATCH.mjs +14 -50
  246. package/src/decorators/ctrl/http/POST.cjs +12 -48
  247. package/src/decorators/ctrl/http/POST.mjs +14 -50
  248. package/src/decorators/ctrl/http/PUT.cjs +12 -48
  249. package/src/decorators/ctrl/http/PUT.mjs +14 -50
  250. package/src/decorators/di/Autoload.cjs +3 -3
  251. package/src/decorators/di/Autoload.mjs +3 -3
  252. package/src/decorators/di/Configurable.cjs +10 -40
  253. package/src/decorators/di/Configurable.mjs +12 -42
  254. package/src/decorators/di/Inject.cjs +20 -50
  255. package/src/decorators/di/Inject.mjs +25 -55
  256. package/src/decorators/di/Lifetime.cjs +5 -7
  257. package/src/decorators/di/Lifetime.mjs +15 -17
  258. package/src/decorators/dto/Accept.cjs +10 -40
  259. package/src/decorators/dto/Accept.mjs +13 -43
  260. package/src/decorators/dto/Expect.cjs +11 -41
  261. package/src/decorators/dto/Expect.mjs +13 -43
  262. package/src/decorators/dto/IndexSignature.cjs +10 -40
  263. package/src/decorators/dto/IndexSignature.mjs +13 -43
  264. package/src/decorators/dto/Return.cjs +10 -40
  265. package/src/decorators/dto/Return.mjs +13 -43
  266. package/src/decorators/orm/AfterInsert.cjs +17 -95
  267. package/src/decorators/orm/AfterInsert.mjs +17 -95
  268. package/src/decorators/orm/AfterLoad.cjs +17 -95
  269. package/src/decorators/orm/AfterLoad.mjs +17 -95
  270. package/src/decorators/orm/AfterRecover.cjs +17 -95
  271. package/src/decorators/orm/AfterRecover.mjs +17 -95
  272. package/src/decorators/orm/AfterRemove.cjs +17 -95
  273. package/src/decorators/orm/AfterRemove.mjs +17 -95
  274. package/src/decorators/orm/AfterSoftRemove.cjs +17 -95
  275. package/src/decorators/orm/AfterSoftRemove.mjs +17 -95
  276. package/src/decorators/orm/AfterUpdate.cjs +17 -95
  277. package/src/decorators/orm/AfterUpdate.mjs +17 -95
  278. package/src/decorators/orm/BeforeInsert.cjs +17 -95
  279. package/src/decorators/orm/BeforeInsert.mjs +17 -95
  280. package/src/decorators/orm/BeforeRecover.cjs +17 -95
  281. package/src/decorators/orm/BeforeRecover.mjs +17 -95
  282. package/src/decorators/orm/BeforeRemove.cjs +17 -95
  283. package/src/decorators/orm/BeforeRemove.mjs +17 -95
  284. package/src/decorators/orm/BeforeSoftRemove.cjs +17 -95
  285. package/src/decorators/orm/BeforeSoftRemove.mjs +17 -95
  286. package/src/decorators/orm/BeforeUpdate.cjs +17 -95
  287. package/src/decorators/orm/BeforeUpdate.mjs +17 -95
  288. package/src/decorators/orm/Check.cjs +17 -95
  289. package/src/decorators/orm/Check.mjs +17 -95
  290. package/src/decorators/orm/ChildEntity.cjs +17 -95
  291. package/src/decorators/orm/ChildEntity.mjs +17 -95
  292. package/src/decorators/orm/Column.cjs +17 -95
  293. package/src/decorators/orm/Column.mjs +17 -95
  294. package/src/decorators/orm/CreateDateColumn.cjs +17 -95
  295. package/src/decorators/orm/CreateDateColumn.mjs +17 -95
  296. package/src/decorators/orm/DeleteDateColumn.cjs +17 -95
  297. package/src/decorators/orm/DeleteDateColumn.mjs +17 -95
  298. package/src/decorators/orm/Entity.cjs +17 -95
  299. package/src/decorators/orm/Entity.mjs +17 -95
  300. package/src/decorators/orm/EventSubscriber.cjs +17 -95
  301. package/src/decorators/orm/EventSubscriber.mjs +17 -95
  302. package/src/decorators/orm/Exclusion.cjs +17 -95
  303. package/src/decorators/orm/Exclusion.mjs +17 -95
  304. package/src/decorators/orm/Generated.cjs +17 -95
  305. package/src/decorators/orm/Generated.mjs +17 -95
  306. package/src/decorators/orm/Index.cjs +17 -95
  307. package/src/decorators/orm/Index.mjs +17 -95
  308. package/src/decorators/orm/JoinColumn.cjs +17 -95
  309. package/src/decorators/orm/JoinColumn.mjs +17 -95
  310. package/src/decorators/orm/JoinTable.cjs +17 -95
  311. package/src/decorators/orm/JoinTable.mjs +17 -95
  312. package/src/decorators/orm/ManyToMany.cjs +17 -95
  313. package/src/decorators/orm/ManyToMany.mjs +17 -95
  314. package/src/decorators/orm/ManyToOne.cjs +17 -95
  315. package/src/decorators/orm/ManyToOne.mjs +17 -95
  316. package/src/decorators/orm/ObjectIdColumn.cjs +17 -95
  317. package/src/decorators/orm/ObjectIdColumn.mjs +17 -95
  318. package/src/decorators/orm/OneToMany.cjs +17 -95
  319. package/src/decorators/orm/OneToMany.mjs +17 -95
  320. package/src/decorators/orm/OneToOne.cjs +17 -95
  321. package/src/decorators/orm/OneToOne.mjs +17 -95
  322. package/src/decorators/orm/PrimaryColumn.cjs +17 -95
  323. package/src/decorators/orm/PrimaryColumn.mjs +17 -95
  324. package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -95
  325. package/src/decorators/orm/PrimaryGeneratedColumn.mjs +17 -95
  326. package/src/decorators/orm/RelationId.cjs +17 -95
  327. package/src/decorators/orm/RelationId.mjs +17 -95
  328. package/src/decorators/orm/TableInheritance.cjs +17 -95
  329. package/src/decorators/orm/TableInheritance.mjs +17 -95
  330. package/src/decorators/orm/Tree.cjs +17 -95
  331. package/src/decorators/orm/Tree.mjs +17 -95
  332. package/src/decorators/orm/TreeChildren.cjs +17 -95
  333. package/src/decorators/orm/TreeChildren.mjs +17 -95
  334. package/src/decorators/orm/TreeLevelColumn.cjs +17 -95
  335. package/src/decorators/orm/TreeLevelColumn.mjs +17 -95
  336. package/src/decorators/orm/TreeParent.cjs +17 -95
  337. package/src/decorators/orm/TreeParent.mjs +17 -95
  338. package/src/decorators/orm/Unique.cjs +17 -95
  339. package/src/decorators/orm/Unique.mjs +17 -95
  340. package/src/decorators/orm/UpdateDateColumn.cjs +17 -95
  341. package/src/decorators/orm/UpdateDateColumn.mjs +17 -95
  342. package/src/decorators/orm/VersionColumn.cjs +17 -95
  343. package/src/decorators/orm/VersionColumn.mjs +17 -95
  344. package/src/decorators/orm/ViewColumn.cjs +17 -95
  345. package/src/decorators/orm/ViewColumn.mjs +17 -95
  346. package/src/decorators/orm/ViewEntity.cjs +17 -95
  347. package/src/decorators/orm/ViewEntity.mjs +17 -95
  348. package/src/decorators/orm/VirtualColumn.cjs +17 -95
  349. package/src/decorators/orm/VirtualColumn.mjs +17 -95
  350. package/src/dto/PaginationResultDTO.cjs +9 -39
  351. package/src/dto/PaginationResultDTO.mjs +18 -48
  352. package/src/dto/PaginationSearchDTO.cjs +9 -39
  353. package/src/dto/PaginationSearchDTO.mjs +13 -43
  354. package/src/exceptions/DestroyRuntimeContainerException.cjs +4 -6
  355. package/src/exceptions/DestroyRuntimeContainerException.mjs +4 -6
  356. package/src/exceptions/InvalidActionPatternDepthException.cjs +4 -6
  357. package/src/exceptions/InvalidActionPatternDepthException.mjs +4 -6
  358. package/src/exceptions/InvalidAssistantFunctionTypeException.cjs +4 -6
  359. package/src/exceptions/InvalidAssistantFunctionTypeException.mjs +4 -6
  360. package/src/exceptions/InvalidObjectTypeException.cjs +4 -6
  361. package/src/exceptions/InvalidObjectTypeException.mjs +4 -6
  362. package/src/exceptions/MethodNotFoundException.cjs +4 -6
  363. package/src/exceptions/MethodNotFoundException.mjs +4 -6
  364. package/src/exceptions/alias/AliasExistsException.cjs +4 -6
  365. package/src/exceptions/alias/AliasExistsException.mjs +6 -8
  366. package/src/exceptions/alias/AliasNotFoundException.cjs +4 -6
  367. package/src/exceptions/alias/AliasNotFoundException.mjs +4 -6
  368. package/src/exceptions/alias/InvalidAliasNameException.cjs +4 -6
  369. package/src/exceptions/alias/InvalidAliasNameException.mjs +4 -6
  370. package/src/exceptions/di/DependencyInjectionException.cjs +4 -6
  371. package/src/exceptions/di/DependencyInjectionException.mjs +4 -6
  372. package/src/exceptions/di/LifetimeLockedException.cjs +4 -6
  373. package/src/exceptions/di/LifetimeLockedException.mjs +4 -6
  374. package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.cjs +4 -6
  375. package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.mjs +4 -6
  376. package/src/exceptions/dto/InvalidMethodAcceptException.cjs +4 -6
  377. package/src/exceptions/dto/InvalidMethodAcceptException.mjs +4 -6
  378. package/src/exceptions/dto/InvalidMethodReturnException.cjs +4 -6
  379. package/src/exceptions/dto/InvalidMethodReturnException.mjs +4 -6
  380. package/src/exceptions/dto/InvalidValueException.cjs +4 -6
  381. package/src/exceptions/dto/InvalidValueException.mjs +4 -6
  382. package/src/interfaces/IBaseObjectConstructor.cjs +1 -1
  383. package/src/interfaces/IBaseObjectConstructor.mjs +1 -1
  384. package/src/interfaces/IConstructor.cjs +1 -1
  385. package/src/interfaces/IConstructor.mjs +1 -1
  386. package/src/interfaces/IPatRun.cjs +1 -1
  387. package/src/interfaces/IPatRun.mjs +1 -1
  388. package/src/lib/base/BaseObject.cjs +51 -259
  389. package/src/lib/base/BaseObject.mjs +41 -256
  390. package/src/lib/base/Context.cjs +11 -41
  391. package/src/lib/base/Context.mjs +23 -53
  392. package/src/lib/base/EventEmitter.cjs +1398 -47
  393. package/src/lib/base/EventEmitter.mjs +1397 -46
  394. package/src/lib/base/abstracts/Exception.cjs +12 -14
  395. package/src/lib/base/abstracts/Exception.mjs +4 -6
  396. package/src/lib/base/async-constructor/Append.cjs +1 -1
  397. package/src/lib/base/async-constructor/Append.mjs +1 -1
  398. package/src/lib/base/async-constructor/AsyncConstructor.cjs +1 -1
  399. package/src/lib/base/async-constructor/AsyncConstructor.mjs +1 -1
  400. package/src/lib/base/internal/ActionOptions.cjs +9 -39
  401. package/src/lib/base/internal/ActionOptions.mjs +9 -39
  402. package/src/lib/base/internal/ApplicationConfigLoader.cjs +54 -116
  403. package/src/lib/base/internal/ApplicationConfigLoader.mjs +54 -116
  404. package/src/lib/base/internal/BasicInfo.cjs +13 -15
  405. package/src/lib/base/internal/BasicInfo.mjs +15 -17
  406. package/src/lib/base/internal/CamelCase.cjs +1 -1
  407. package/src/lib/base/internal/CamelCase.mjs +1 -1
  408. package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +3 -3
  409. package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +3 -3
  410. package/src/lib/base/internal/ConstructorSymbol.cjs +3 -3
  411. package/src/lib/base/internal/ConstructorSymbol.mjs +3 -3
  412. package/src/lib/base/internal/ControllerEntrypoint.cjs +16 -24
  413. package/src/lib/base/internal/ControllerEntrypoint.mjs +39 -47
  414. package/src/lib/base/internal/DataValidator.cjs +203 -27
  415. package/src/lib/base/internal/DataValidator.mjs +203 -27
  416. package/src/lib/base/internal/DatabaseSymbol.cjs +1 -1
  417. package/src/lib/base/internal/DatabaseSymbol.mjs +1 -1
  418. package/src/lib/base/internal/FlexibleDTO.cjs +11 -41
  419. package/src/lib/base/internal/FlexibleDTO.mjs +13 -43
  420. package/src/lib/base/internal/GetActionDTOAndOptions.cjs +21 -51
  421. package/src/lib/base/internal/GetActionDTOAndOptions.mjs +23 -53
  422. package/src/lib/base/internal/IEEE754.cjs +1 -1
  423. package/src/lib/base/internal/IEEE754.mjs +1 -1
  424. package/src/lib/base/internal/MethodAssistantFunction.cjs +15 -17
  425. package/src/lib/base/internal/MethodAssistantFunction.mjs +8 -10
  426. package/src/lib/base/internal/MethodValidation.cjs +55 -85
  427. package/src/lib/base/internal/MethodValidation.mjs +42 -72
  428. package/src/lib/base/internal/ModuleConfigLoader.cjs +81 -143
  429. package/src/lib/base/internal/ModuleConfigLoader.mjs +76 -138
  430. package/src/lib/base/internal/ObjectConfiguration.cjs +26 -56
  431. package/src/lib/base/internal/ObjectConfiguration.mjs +25 -55
  432. package/src/lib/base/internal/ObjectContainer.cjs +3 -3
  433. package/src/lib/base/internal/ObjectContainer.mjs +3 -3
  434. package/src/lib/base/internal/ObjectInjection.cjs +3 -3
  435. package/src/lib/base/internal/ObjectInjection.mjs +3 -3
  436. package/src/lib/base/internal/ObjectLifetime.cjs +5 -7
  437. package/src/lib/base/internal/ObjectLifetime.mjs +12 -14
  438. package/src/lib/base/internal/ObjectSchemaValidation.cjs +23 -121
  439. package/src/lib/base/internal/ObjectSchemaValidation.mjs +14 -114
  440. package/src/lib/base/internal/ObjectType.cjs +27 -119
  441. package/src/lib/base/internal/ObjectType.mjs +20 -119
  442. package/src/lib/base/internal/ObjectWeakRefs.cjs +1 -1
  443. package/src/lib/base/internal/ObjectWeakRefs.mjs +1 -1
  444. package/src/lib/base/internal/PatternManager.cjs +831 -7
  445. package/src/lib/base/internal/PatternManager.mjs +835 -11
  446. package/src/lib/base/internal/StringifyPattern.cjs +5 -9
  447. package/src/lib/base/internal/StringifyPattern.mjs +5 -9
  448. package/src/lib/base/internal/ThrowWarning.cjs +1 -1
  449. package/src/lib/base/internal/ThrowWarning.mjs +1 -1
  450. package/src/lib/context/CLIContext.cjs +12 -42
  451. package/src/lib/context/CLIContext.mjs +15 -45
  452. package/src/lib/context/HTTPContext.cjs +15 -45
  453. package/src/lib/context/HTTPContext.mjs +14 -44
  454. package/src/lib/context/ServiceContext.cjs +12 -42
  455. package/src/lib/context/ServiceContext.mjs +18 -48
  456. package/src/lib/core/Alias.cjs +46 -48
  457. package/src/lib/core/Alias.mjs +24 -26
  458. package/src/lib/core/Application.cjs +486 -351
  459. package/src/lib/core/Application.mjs +531 -400
  460. package/src/lib/core/Component.cjs +24 -88
  461. package/src/lib/core/Component.mjs +28 -92
  462. package/src/lib/core/Container.cjs +50 -326
  463. package/src/lib/core/Container.mjs +45 -323
  464. package/src/lib/core/DTO.cjs +16 -194
  465. package/src/lib/core/DTO.mjs +12 -197
  466. package/src/lib/core/Module.cjs +39 -107
  467. package/src/lib/core/Module.mjs +53 -121
  468. package/src/lib/core/Provider.cjs +19 -81
  469. package/src/lib/core/Provider.mjs +25 -87
  470. package/src/lib/core/Time.cjs +5 -7
  471. package/src/lib/core/Time.mjs +5 -7
  472. package/src/lib/helpers/ArrayToSet.cjs +1 -1
  473. package/src/lib/helpers/ArrayToSet.mjs +1 -1
  474. package/src/lib/helpers/As.cjs +1 -1
  475. package/src/lib/helpers/As.mjs +1 -1
  476. package/src/lib/helpers/ConvertArrayLikeToIterable.cjs +1 -1
  477. package/src/lib/helpers/ConvertArrayLikeToIterable.mjs +1 -1
  478. package/src/lib/helpers/ConvertArrayLikeToStream.cjs +1 -1
  479. package/src/lib/helpers/ConvertArrayLikeToStream.mjs +1 -1
  480. package/src/lib/helpers/Delay.cjs +1 -1
  481. package/src/lib/helpers/Delay.mjs +1 -1
  482. package/src/lib/helpers/DevNull.cjs +1 -1
  483. package/src/lib/helpers/DevNull.mjs +1 -1
  484. package/src/lib/helpers/GetObjectNestingDepth.cjs +1 -1
  485. package/src/lib/helpers/GetObjectNestingDepth.mjs +1 -1
  486. package/src/lib/helpers/GetObjectPropertyPaths.cjs +1 -1
  487. package/src/lib/helpers/GetObjectPropertyPaths.mjs +1 -1
  488. package/src/lib/helpers/Glob.cjs +5502 -17
  489. package/src/lib/helpers/Glob.mjs +5472 -17
  490. package/src/lib/helpers/GraceExit.cjs +1 -1
  491. package/src/lib/helpers/GraceExit.mjs +1 -1
  492. package/src/lib/helpers/HexToIEEE754.cjs +1 -1
  493. package/src/lib/helpers/HexToIEEE754.mjs +1 -1
  494. package/src/lib/helpers/HexToSigned.cjs +1 -1
  495. package/src/lib/helpers/HexToSigned.mjs +1 -1
  496. package/src/lib/helpers/HexToUnsigned.cjs +1 -1
  497. package/src/lib/helpers/HexToUnsigned.mjs +1 -1
  498. package/src/lib/helpers/IEEE754ToHex.cjs +1 -1
  499. package/src/lib/helpers/IEEE754ToHex.mjs +1 -1
  500. package/src/lib/helpers/IPToolkit.cjs +1 -1
  501. package/src/lib/helpers/IPToolkit.mjs +1 -1
  502. package/src/lib/helpers/IsAbortError.cjs +1 -1
  503. package/src/lib/helpers/IsAbortError.mjs +1 -1
  504. package/src/lib/helpers/IsEmptyObject.cjs +1 -1
  505. package/src/lib/helpers/IsEmptyObject.mjs +1 -1
  506. package/src/lib/helpers/IsExists.cjs +1 -1
  507. package/src/lib/helpers/IsExists.mjs +1 -1
  508. package/src/lib/helpers/IsGlobString.cjs +4 -10
  509. package/src/lib/helpers/IsGlobString.mjs +3 -11
  510. package/src/lib/helpers/IsHtml.cjs +5 -5
  511. package/src/lib/helpers/IsHtml.mjs +6 -6
  512. package/src/lib/helpers/IsNativeFunction.cjs +1 -1
  513. package/src/lib/helpers/IsNativeFunction.mjs +1 -1
  514. package/src/lib/helpers/IsPath.cjs +1 -1
  515. package/src/lib/helpers/IsPath.mjs +1 -1
  516. package/src/lib/helpers/IsPromise.cjs +1 -1
  517. package/src/lib/helpers/IsPromise.mjs +1 -1
  518. package/src/lib/helpers/IsPromiseLike.cjs +1 -1
  519. package/src/lib/helpers/IsPromiseLike.mjs +1 -1
  520. package/src/lib/helpers/IsSymbol.cjs +10 -44
  521. package/src/lib/helpers/IsSymbol.mjs +9 -45
  522. package/src/lib/helpers/IsXML.cjs +1711 -6
  523. package/src/lib/helpers/IsXML.mjs +1712 -7
  524. package/src/lib/helpers/MD5.cjs +4 -4
  525. package/src/lib/helpers/MD5.mjs +4 -4
  526. package/src/lib/helpers/MergeArray.cjs +1 -1
  527. package/src/lib/helpers/MergeArray.mjs +1 -1
  528. package/src/lib/helpers/MergeMap.cjs +1 -1
  529. package/src/lib/helpers/MergeMap.mjs +1 -1
  530. package/src/lib/helpers/MergeSet.cjs +1 -1
  531. package/src/lib/helpers/MergeSet.mjs +1 -1
  532. package/src/lib/helpers/NoCase.cjs +1 -1
  533. package/src/lib/helpers/NoCase.mjs +1 -1
  534. package/src/lib/helpers/NonceStr.cjs +2 -6
  535. package/src/lib/helpers/NonceStr.mjs +4 -8
  536. package/src/lib/helpers/ObjectConstructor.cjs +1 -1
  537. package/src/lib/helpers/ObjectConstructor.mjs +1 -1
  538. package/src/lib/helpers/ObjectHash.cjs +405 -7
  539. package/src/lib/helpers/ObjectHash.mjs +399 -7
  540. package/src/lib/helpers/ObjectParentConstructor.cjs +1 -1
  541. package/src/lib/helpers/ObjectParentConstructor.mjs +1 -1
  542. package/src/lib/helpers/ObjectParentConstructors.cjs +1 -1
  543. package/src/lib/helpers/ObjectParentConstructors.mjs +1 -1
  544. package/src/lib/helpers/ObjectPath.cjs +1 -1
  545. package/src/lib/helpers/ObjectPath.mjs +1 -1
  546. package/src/lib/helpers/ObjectPrototype.cjs +1 -1
  547. package/src/lib/helpers/ObjectPrototype.mjs +1 -1
  548. package/src/lib/helpers/ObjectToMap.cjs +1 -1
  549. package/src/lib/helpers/ObjectToMap.mjs +1 -1
  550. package/src/lib/helpers/Paginator.cjs +1 -1
  551. package/src/lib/helpers/Paginator.mjs +1 -1
  552. package/src/lib/helpers/RandomString.cjs +172 -11
  553. package/src/lib/helpers/RandomString.mjs +166 -11
  554. package/src/lib/helpers/SHA1.cjs +4 -4
  555. package/src/lib/helpers/SHA1.mjs +4 -4
  556. package/src/lib/helpers/SHA256.cjs +4 -4
  557. package/src/lib/helpers/SHA256.mjs +4 -4
  558. package/src/lib/helpers/SetToArray.cjs +1 -1
  559. package/src/lib/helpers/SetToArray.mjs +1 -1
  560. package/src/lib/helpers/SignedToHex.cjs +1 -1
  561. package/src/lib/helpers/SignedToHex.mjs +1 -1
  562. package/src/lib/helpers/SortArray.cjs +2 -6
  563. package/src/lib/helpers/SortArray.mjs +7 -11
  564. package/src/lib/helpers/SortKeys.cjs +1 -1
  565. package/src/lib/helpers/SortKeys.mjs +1 -1
  566. package/src/lib/helpers/SortObject.cjs +1 -1
  567. package/src/lib/helpers/SortObject.mjs +1 -1
  568. package/src/lib/helpers/Statistics.cjs +2 -2
  569. package/src/lib/helpers/Statistics.mjs +2 -2
  570. package/src/lib/helpers/Templating.cjs +1 -1
  571. package/src/lib/helpers/Templating.mjs +1 -1
  572. package/src/lib/helpers/URLBuilder.cjs +417 -38
  573. package/src/lib/helpers/URLBuilder.mjs +417 -38
  574. package/src/lib/helpers/UUID.cjs +340 -22
  575. package/src/lib/helpers/UUID.mjs +340 -22
  576. package/src/lib/helpers/UniqueArray.cjs +1 -1
  577. package/src/lib/helpers/UniqueArray.mjs +1 -1
  578. package/src/lib/helpers/UnsignedToHex.cjs +1 -1
  579. package/src/lib/helpers/UnsignedToHex.mjs +1 -1
  580. package/src/lib/ioc/DependencyInjectionContainer.cjs +145 -197
  581. package/src/lib/ioc/DependencyInjectionContainer.mjs +102 -154
  582. package/src/lib/ioc/Errors.cjs +27 -57
  583. package/src/lib/ioc/Errors.mjs +25 -55
  584. package/src/lib/ioc/FunctionTokenizer.cjs +1 -1
  585. package/src/lib/ioc/FunctionTokenizer.mjs +1 -1
  586. package/src/lib/ioc/InjectionMode.cjs +1 -1
  587. package/src/lib/ioc/InjectionMode.mjs +1 -1
  588. package/src/lib/ioc/Lifetime.cjs +1 -1
  589. package/src/lib/ioc/Lifetime.mjs +1 -1
  590. package/src/lib/ioc/ListModules.cjs +5811 -99
  591. package/src/lib/ioc/ListModules.mjs +5779 -79
  592. package/src/lib/ioc/LoadModules.cjs +63 -93
  593. package/src/lib/ioc/LoadModules.mjs +65 -95
  594. package/src/lib/ioc/ParamParser.cjs +1 -1
  595. package/src/lib/ioc/ParamParser.mjs +1 -1
  596. package/src/lib/ioc/Resolvers.cjs +42 -72
  597. package/src/lib/ioc/Resolvers.mjs +44 -74
  598. package/src/lib/ioc/Utils.cjs +28 -58
  599. package/src/lib/ioc/Utils.mjs +34 -64
  600. package/src/lib/validation/VLD.cjs +11342 -98
  601. package/src/lib/validation/VLD.mjs +11298 -80
  602. package/src/lib/validation/interfaces/AlternativesSchema.cjs +1 -1
  603. package/src/lib/validation/interfaces/AlternativesSchema.mjs +1 -1
  604. package/src/lib/validation/interfaces/AnySchema.cjs +1 -1
  605. package/src/lib/validation/interfaces/AnySchema.mjs +1 -1
  606. package/src/lib/validation/interfaces/ArraySchema.cjs +1 -1
  607. package/src/lib/validation/interfaces/ArraySchema.mjs +1 -1
  608. package/src/lib/validation/interfaces/Base64Options.cjs +1 -1
  609. package/src/lib/validation/interfaces/Base64Options.mjs +1 -1
  610. package/src/lib/validation/interfaces/BaseValidationOptions.cjs +1 -1
  611. package/src/lib/validation/interfaces/BaseValidationOptions.mjs +1 -1
  612. package/src/lib/validation/interfaces/BigIntSchema.cjs +1 -1
  613. package/src/lib/validation/interfaces/BigIntSchema.mjs +1 -1
  614. package/src/lib/validation/interfaces/BinarySchema.cjs +1 -1
  615. package/src/lib/validation/interfaces/BinarySchema.mjs +1 -1
  616. package/src/lib/validation/interfaces/BooleanSchema.cjs +1 -1
  617. package/src/lib/validation/interfaces/BooleanSchema.mjs +1 -1
  618. package/src/lib/validation/interfaces/CustomHelpers.cjs +1 -1
  619. package/src/lib/validation/interfaces/CustomHelpers.mjs +1 -1
  620. package/src/lib/validation/interfaces/DataUriOptions.cjs +1 -1
  621. package/src/lib/validation/interfaces/DataUriOptions.mjs +1 -1
  622. package/src/lib/validation/interfaces/DateSchema.cjs +1 -1
  623. package/src/lib/validation/interfaces/DateSchema.mjs +1 -1
  624. package/src/lib/validation/interfaces/DependencyOptions.cjs +1 -1
  625. package/src/lib/validation/interfaces/DependencyOptions.mjs +1 -1
  626. package/src/lib/validation/interfaces/DomainOptions.cjs +1 -1
  627. package/src/lib/validation/interfaces/DomainOptions.mjs +1 -1
  628. package/src/lib/validation/interfaces/EmailOptions.cjs +1 -1
  629. package/src/lib/validation/interfaces/EmailOptions.mjs +1 -1
  630. package/src/lib/validation/interfaces/ErrorFormattingOptions.cjs +1 -1
  631. package/src/lib/validation/interfaces/ErrorFormattingOptions.mjs +1 -1
  632. package/src/lib/validation/interfaces/ErrorReport.cjs +1 -1
  633. package/src/lib/validation/interfaces/ErrorReport.mjs +1 -1
  634. package/src/lib/validation/interfaces/ErrorValidationOptions.cjs +1 -1
  635. package/src/lib/validation/interfaces/ErrorValidationOptions.mjs +1 -1
  636. package/src/lib/validation/interfaces/ExtensionFlag.cjs +1 -1
  637. package/src/lib/validation/interfaces/ExtensionFlag.mjs +1 -1
  638. package/src/lib/validation/interfaces/ExternalHelpers.cjs +1 -1
  639. package/src/lib/validation/interfaces/ExternalHelpers.mjs +1 -1
  640. package/src/lib/validation/interfaces/FunctionSchema.cjs +1 -1
  641. package/src/lib/validation/interfaces/FunctionSchema.mjs +1 -1
  642. package/src/lib/validation/interfaces/GuidOptions.cjs +1 -1
  643. package/src/lib/validation/interfaces/GuidOptions.mjs +1 -1
  644. package/src/lib/validation/interfaces/HexOptions.cjs +1 -1
  645. package/src/lib/validation/interfaces/HexOptions.mjs +1 -1
  646. package/src/lib/validation/interfaces/HierarchySeparatorOptions.cjs +1 -1
  647. package/src/lib/validation/interfaces/HierarchySeparatorOptions.mjs +1 -1
  648. package/src/lib/validation/interfaces/IpOptions.cjs +1 -1
  649. package/src/lib/validation/interfaces/IpOptions.mjs +1 -1
  650. package/src/lib/validation/interfaces/LanguageMessageTemplate.cjs +1 -1
  651. package/src/lib/validation/interfaces/LanguageMessageTemplate.mjs +1 -1
  652. package/src/lib/validation/interfaces/LinkSchema.cjs +1 -1
  653. package/src/lib/validation/interfaces/LinkSchema.mjs +1 -1
  654. package/src/lib/validation/interfaces/NumberSchema.cjs +1 -1
  655. package/src/lib/validation/interfaces/NumberSchema.mjs +1 -1
  656. package/src/lib/validation/interfaces/ObjectPatternOptions.cjs +1 -1
  657. package/src/lib/validation/interfaces/ObjectPatternOptions.mjs +1 -1
  658. package/src/lib/validation/interfaces/ObjectSchema.cjs +1 -1
  659. package/src/lib/validation/interfaces/ObjectSchema.mjs +1 -1
  660. package/src/lib/validation/interfaces/Reference.cjs +1 -1
  661. package/src/lib/validation/interfaces/Reference.mjs +1 -1
  662. package/src/lib/validation/interfaces/ReferenceOptions.cjs +1 -1
  663. package/src/lib/validation/interfaces/ReferenceOptions.mjs +1 -1
  664. package/src/lib/validation/interfaces/RenameOptions.cjs +1 -1
  665. package/src/lib/validation/interfaces/RenameOptions.mjs +1 -1
  666. package/src/lib/validation/interfaces/State.cjs +1 -1
  667. package/src/lib/validation/interfaces/State.mjs +1 -1
  668. package/src/lib/validation/interfaces/StringRegexOptions.cjs +1 -1
  669. package/src/lib/validation/interfaces/StringRegexOptions.mjs +1 -1
  670. package/src/lib/validation/interfaces/StringSchema.cjs +1 -1
  671. package/src/lib/validation/interfaces/StringSchema.mjs +1 -1
  672. package/src/lib/validation/interfaces/SwitchCases.cjs +1 -1
  673. package/src/lib/validation/interfaces/SwitchCases.mjs +1 -1
  674. package/src/lib/validation/interfaces/SwitchDefault.cjs +1 -1
  675. package/src/lib/validation/interfaces/SwitchDefault.mjs +1 -1
  676. package/src/lib/validation/interfaces/SymbolSchema.cjs +1 -1
  677. package/src/lib/validation/interfaces/SymbolSchema.mjs +1 -1
  678. package/src/lib/validation/interfaces/TopLevelDomainOptions.cjs +1 -1
  679. package/src/lib/validation/interfaces/TopLevelDomainOptions.mjs +1 -1
  680. package/src/lib/validation/interfaces/UriOptions.cjs +1 -1
  681. package/src/lib/validation/interfaces/UriOptions.mjs +1 -1
  682. package/src/lib/validation/interfaces/ValidationOptions.cjs +1 -1
  683. package/src/lib/validation/interfaces/ValidationOptions.mjs +1 -1
  684. package/src/lib/validation/interfaces/WhenOptions.cjs +1 -1
  685. package/src/lib/validation/interfaces/WhenOptions.mjs +1 -1
  686. package/src/lib/validation/interfaces/WhenSchemaOptions.cjs +1 -1
  687. package/src/lib/validation/interfaces/WhenSchemaOptions.mjs +1 -1
  688. package/src/lib/validation/types/CustomValidator.cjs +1 -1
  689. package/src/lib/validation/types/CustomValidator.mjs +1 -1
  690. package/src/lib/validation/types/ExtensionBoundSchema.cjs +1 -1
  691. package/src/lib/validation/types/ExtensionBoundSchema.mjs +1 -1
  692. package/src/lib/validation/types/ExternalValidationFunction.cjs +1 -1
  693. package/src/lib/validation/types/ExternalValidationFunction.mjs +1 -1
  694. package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.cjs +1 -1
  695. package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.mjs +1 -1
  696. package/src/lib/validation/types/IsPrimitiveSubset.cjs +1 -1
  697. package/src/lib/validation/types/IsPrimitiveSubset.mjs +1 -1
  698. package/src/lib/validation/types/IsUnion.cjs +1 -1
  699. package/src/lib/validation/types/IsUnion.mjs +1 -1
  700. package/src/lib/validation/types/LanguageMessages.cjs +1 -1
  701. package/src/lib/validation/types/LanguageMessages.mjs +1 -1
  702. package/src/lib/validation/types/NoNestedArrays.cjs +1 -1
  703. package/src/lib/validation/types/NoNestedArrays.mjs +1 -1
  704. package/src/lib/validation/types/NullableType.cjs +1 -1
  705. package/src/lib/validation/types/NullableType.mjs +1 -1
  706. package/src/lib/validation/types/ObjectPropertiesSchema.cjs +1 -1
  707. package/src/lib/validation/types/ObjectPropertiesSchema.mjs +1 -1
  708. package/src/lib/validation/types/PartialSchemaMap.cjs +1 -1
  709. package/src/lib/validation/types/PartialSchemaMap.mjs +1 -1
  710. package/src/lib/validation/types/PresenceMode.cjs +1 -1
  711. package/src/lib/validation/types/PresenceMode.mjs +1 -1
  712. package/src/lib/validation/types/Primitives.cjs +1 -1
  713. package/src/lib/validation/types/Primitives.mjs +1 -1
  714. package/src/lib/validation/types/Schema.cjs +1 -1
  715. package/src/lib/validation/types/Schema.mjs +1 -1
  716. package/src/lib/validation/types/SchemaFunction.cjs +1 -1
  717. package/src/lib/validation/types/SchemaFunction.mjs +1 -1
  718. package/src/lib/validation/types/SchemaLike.cjs +1 -1
  719. package/src/lib/validation/types/SchemaLike.mjs +1 -1
  720. package/src/lib/validation/types/SchemaLikeWithoutArray.cjs +1 -1
  721. package/src/lib/validation/types/SchemaLikeWithoutArray.mjs +1 -1
  722. package/src/lib/validation/types/SchemaMap.cjs +1 -1
  723. package/src/lib/validation/types/SchemaMap.mjs +1 -1
  724. package/src/lib/validation/types/StrictSchemaMap.cjs +1 -1
  725. package/src/lib/validation/types/StrictSchemaMap.mjs +1 -1
  726. package/src/lib/validation/types/Types.cjs +1 -1
  727. package/src/lib/validation/types/Types.mjs +1 -1
  728. package/src/lib/validation/types/UnwrapSchemaLikeWithoutArray.cjs +1 -1
  729. package/src/lib/validation/types/UnwrapSchemaLikeWithoutArray.mjs +1 -1
  730. package/src/options/ApplicationOptions.cjs +22 -84
  731. package/src/options/ApplicationOptions.mjs +25 -87
  732. package/src/options/LoadAnonymousObjectOptions.cjs +20 -82
  733. package/src/options/LoadAnonymousObjectOptions.mjs +22 -84
  734. package/src/options/LoadNamedObjectOptions.cjs +20 -82
  735. package/src/options/LoadNamedObjectOptions.mjs +22 -84
  736. package/src/options/LoadObjectOptions.cjs +23 -96
  737. package/src/options/LoadObjectOptions.mjs +18 -98
  738. package/src/options/ModuleLoadObjectsOptions.cjs +20 -82
  739. package/src/options/ModuleLoadObjectsOptions.mjs +20 -82
  740. package/src/options/ModuleOptions.cjs +26 -88
  741. package/src/options/ModuleOptions.mjs +25 -87
  742. package/src/options/OverridableNamedObjectOptions.cjs +20 -82
  743. package/src/options/OverridableNamedObjectOptions.mjs +23 -85
  744. package/src/options/OverridableObjectOptions.cjs +20 -82
  745. package/src/options/OverridableObjectOptions.mjs +22 -84
  746. package/src/providers/Database.cjs +41 -181
  747. package/src/providers/Database.mjs +74 -214
  748. package/src/providers/PasswordHash.cjs +541 -89
  749. package/src/providers/PasswordHash.mjs +535 -89
  750. package/src/providers/migration/GenerateMigration.cjs +37 -389
  751. package/src/providers/migration/GenerateMigration.mjs +33 -386
  752. package/src/types/ActionPattern.cjs +1 -1
  753. package/src/types/ActionPattern.mjs +1 -1
  754. package/src/types/ClassDecorator.cjs +1 -1
  755. package/src/types/ClassDecorator.mjs +1 -1
  756. package/src/types/ComponentOptions.cjs +1 -1
  757. package/src/types/ComponentOptions.mjs +1 -1
  758. package/src/types/JSONSchema.cjs +1 -1
  759. package/src/types/JSONSchema.mjs +1 -1
  760. package/src/types/MethodDecorator.cjs +1 -1
  761. package/src/types/MethodDecorator.mjs +1 -1
  762. package/src/types/ModuleOptions.cjs +1 -1
  763. package/src/types/ModuleOptions.mjs +1 -1
  764. package/src/types/ObjectOptions.cjs +1 -1
  765. package/src/types/ObjectOptions.mjs +1 -1
  766. package/src/types/ParameterDecorator.cjs +1 -1
  767. package/src/types/ParameterDecorator.mjs +1 -1
  768. package/src/types/PropertyDecorator.cjs +1 -1
  769. package/src/types/PropertyDecorator.mjs +1 -1
  770. package/src/types/ProviderOptions.cjs +1 -1
  771. package/src/types/ProviderOptions.mjs +1 -1
  772. package/vendor/Package.internal.1.cjs +938 -206
  773. package/vendor/Package.internal.1.mjs +938 -202
  774. package/vendor/Package.internal.10.cjs +17 -227
  775. package/vendor/Package.internal.10.mjs +18 -226
  776. package/vendor/Package.internal.11.cjs +15 -1608
  777. package/vendor/Package.internal.11.mjs +16 -1579
  778. package/vendor/Package.internal.12.cjs +13 -12547
  779. package/vendor/Package.internal.12.mjs +14 -12530
  780. package/vendor/Package.internal.13.cjs +22 -357
  781. package/vendor/Package.internal.13.mjs +23 -358
  782. package/vendor/Package.internal.14.cjs +17 -786
  783. package/vendor/Package.internal.14.mjs +18 -787
  784. package/vendor/Package.internal.15.cjs +18 -72
  785. package/vendor/Package.internal.15.mjs +19 -71
  786. package/vendor/Package.internal.16.cjs +13 -977
  787. package/vendor/Package.internal.16.mjs +14 -966
  788. package/vendor/Package.internal.17.cjs +19 -43
  789. package/vendor/Package.internal.17.mjs +20 -44
  790. package/vendor/Package.internal.18.cjs +16 -262
  791. package/vendor/Package.internal.18.mjs +17 -263
  792. package/vendor/Package.internal.19.cjs +16 -428
  793. package/vendor/Package.internal.19.mjs +17 -429
  794. package/vendor/Package.internal.2.cjs +29 -86
  795. package/vendor/Package.internal.2.mjs +30 -83
  796. package/vendor/Package.internal.20.cjs +18 -556
  797. package/vendor/Package.internal.20.mjs +19 -551
  798. package/vendor/Package.internal.21.cjs +19 -400
  799. package/vendor/Package.internal.21.mjs +20 -401
  800. package/vendor/Package.internal.22.cjs +56 -913
  801. package/vendor/Package.internal.22.mjs +57 -908
  802. package/vendor/Package.internal.23.cjs +15 -218
  803. package/vendor/Package.internal.23.mjs +17 -220
  804. package/vendor/Package.internal.24.cjs +16 -990
  805. package/vendor/Package.internal.24.mjs +17 -991
  806. package/vendor/Package.internal.25.cjs +32 -9
  807. package/vendor/Package.internal.25.mjs +33 -8
  808. package/vendor/Package.internal.26.cjs +15 -121
  809. package/vendor/Package.internal.26.mjs +16 -120
  810. package/vendor/Package.internal.27.cjs +18 -139
  811. package/vendor/Package.internal.27.mjs +19 -138
  812. package/vendor/Package.internal.28.cjs +21 -5
  813. package/vendor/Package.internal.28.mjs +22 -4
  814. package/vendor/Package.internal.29.cjs +36 -19
  815. package/vendor/Package.internal.29.mjs +37 -18
  816. package/vendor/Package.internal.3.cjs +532 -14232
  817. package/vendor/Package.internal.3.mjs +529 -14211
  818. package/vendor/Package.internal.30.cjs +22 -474
  819. package/vendor/Package.internal.30.mjs +23 -469
  820. package/vendor/Package.internal.31.cjs +21 -74
  821. package/vendor/Package.internal.31.mjs +24 -71
  822. package/vendor/Package.internal.310.cjs +10 -0
  823. package/vendor/Package.internal.310.mjs +8 -0
  824. package/vendor/Package.internal.32.cjs +40 -2
  825. package/vendor/Package.internal.32.mjs +42 -2
  826. package/vendor/Package.internal.33.cjs +34 -35
  827. package/vendor/Package.internal.33.mjs +35 -34
  828. package/vendor/Package.internal.34.cjs +20 -21
  829. package/vendor/Package.internal.34.mjs +21 -20
  830. package/vendor/Package.internal.35.cjs +29 -10
  831. package/vendor/Package.internal.35.mjs +30 -9
  832. package/vendor/Package.internal.36.cjs +39 -188
  833. package/vendor/Package.internal.36.mjs +42 -191
  834. package/vendor/Package.internal.37.cjs +43 -59
  835. package/vendor/Package.internal.37.mjs +46 -60
  836. package/vendor/Package.internal.38.cjs +43 -158
  837. package/vendor/Package.internal.38.mjs +44 -159
  838. package/vendor/Package.internal.39.cjs +19 -2070
  839. package/vendor/Package.internal.39.mjs +20 -2065
  840. package/vendor/Package.internal.4.cjs +463 -961
  841. package/vendor/Package.internal.4.mjs +444 -960
  842. package/vendor/Package.internal.40.cjs +16 -512
  843. package/vendor/Package.internal.40.mjs +17 -505
  844. package/vendor/Package.internal.41.cjs +15 -412
  845. package/vendor/Package.internal.41.mjs +16 -407
  846. package/vendor/Package.internal.42.cjs +21 -2356
  847. package/vendor/Package.internal.42.mjs +22 -2345
  848. package/vendor/Package.internal.43.cjs +17 -56
  849. package/vendor/Package.internal.43.mjs +18 -63
  850. package/vendor/Package.internal.44.cjs +25 -146
  851. package/vendor/Package.internal.44.mjs +26 -145
  852. package/vendor/Package.internal.45.cjs +31 -626
  853. package/vendor/Package.internal.45.mjs +33 -628
  854. package/vendor/Package.internal.46.cjs +16 -238
  855. package/vendor/Package.internal.46.mjs +17 -239
  856. package/vendor/Package.internal.47.cjs +16 -220
  857. package/vendor/Package.internal.47.mjs +17 -215
  858. package/vendor/Package.internal.48.cjs +23 -2
  859. package/vendor/Package.internal.48.mjs +25 -2
  860. package/vendor/Package.internal.49.cjs +24 -355
  861. package/vendor/Package.internal.49.mjs +27 -352
  862. package/vendor/Package.internal.5.cjs +4275 -340
  863. package/vendor/Package.internal.5.mjs +4274 -341
  864. package/vendor/Package.internal.50.cjs +30 -30
  865. package/vendor/Package.internal.50.mjs +32 -30
  866. package/vendor/Package.internal.51.cjs +48322 -38
  867. package/vendor/Package.internal.51.mjs +48282 -38
  868. package/vendor/Package.internal.510.cjs +154 -0
  869. package/vendor/Package.internal.510.mjs +142 -0
  870. package/vendor/Package.internal.511.cjs +168 -0
  871. package/vendor/Package.internal.511.mjs +156 -0
  872. package/vendor/Package.internal.512.cjs +6 -0
  873. package/vendor/Package.internal.512.mjs +6 -0
  874. package/vendor/Package.internal.513.cjs +192 -0
  875. package/vendor/Package.internal.513.mjs +180 -0
  876. package/vendor/Package.internal.52.cjs +676 -16
  877. package/vendor/Package.internal.52.mjs +672 -16
  878. package/vendor/{Package.internal.180.cjs → Package.internal.522.cjs} +1 -1
  879. package/vendor/{Package.internal.180.mjs → Package.internal.522.mjs} +2 -2
  880. package/vendor/Package.internal.53.cjs +7094 -63
  881. package/vendor/Package.internal.53.mjs +7067 -60
  882. package/vendor/Package.internal.54.cjs +183 -77
  883. package/vendor/Package.internal.54.mjs +184 -78
  884. package/vendor/Package.internal.542.cjs +171 -0
  885. package/vendor/Package.internal.542.mjs +153 -0
  886. package/vendor/Package.internal.55.cjs +3982 -56
  887. package/vendor/Package.internal.55.mjs +3995 -47
  888. package/vendor/Package.internal.552.cjs +49615 -0
  889. package/vendor/Package.internal.552.mjs +49572 -0
  890. package/vendor/Package.internal.56.cjs +838 -20
  891. package/vendor/Package.internal.56.mjs +839 -19
  892. package/vendor/Package.internal.57.cjs +14762 -322
  893. package/vendor/Package.internal.57.mjs +14740 -325
  894. package/vendor/Package.internal.58.cjs +136 -2
  895. package/vendor/Package.internal.58.mjs +126 -2
  896. package/vendor/Package.internal.59.cjs +323 -188
  897. package/vendor/Package.internal.59.mjs +319 -188
  898. package/vendor/Package.internal.6.cjs +4 -6109
  899. package/vendor/Package.internal.6.mjs +4 -6103
  900. package/vendor/Package.internal.7.cjs +6543 -494
  901. package/vendor/Package.internal.7.mjs +6531 -494
  902. package/vendor/Package.internal.8.cjs +152 -33
  903. package/vendor/Package.internal.8.mjs +152 -31
  904. package/vendor/Package.internal.9.cjs +16 -2160
  905. package/vendor/Package.internal.9.mjs +17 -2133
  906. package/vendor/Package.internal.100.cjs +0 -69
  907. package/vendor/Package.internal.100.mjs +0 -67
  908. package/vendor/Package.internal.101.cjs +0 -123
  909. package/vendor/Package.internal.101.mjs +0 -121
  910. package/vendor/Package.internal.102.cjs +0 -16
  911. package/vendor/Package.internal.102.mjs +0 -8
  912. package/vendor/Package.internal.103.cjs +0 -4
  913. package/vendor/Package.internal.103.mjs +0 -2
  914. package/vendor/Package.internal.104.cjs +0 -4
  915. package/vendor/Package.internal.104.mjs +0 -2
  916. package/vendor/Package.internal.105.cjs +0 -112
  917. package/vendor/Package.internal.105.mjs +0 -98
  918. package/vendor/Package.internal.106.cjs +0 -88
  919. package/vendor/Package.internal.106.mjs +0 -84
  920. package/vendor/Package.internal.107.cjs +0 -58
  921. package/vendor/Package.internal.107.mjs +0 -52
  922. package/vendor/Package.internal.108.cjs +0 -20
  923. package/vendor/Package.internal.108.mjs +0 -18
  924. package/vendor/Package.internal.109.cjs +0 -96
  925. package/vendor/Package.internal.109.mjs +0 -96
  926. package/vendor/Package.internal.110.cjs +0 -113
  927. package/vendor/Package.internal.110.mjs +0 -113
  928. package/vendor/Package.internal.111.cjs +0 -2176
  929. package/vendor/Package.internal.111.mjs +0 -2174
  930. package/vendor/Package.internal.112.cjs +0 -2466
  931. package/vendor/Package.internal.112.mjs +0 -2434
  932. package/vendor/Package.internal.113.cjs +0 -1306
  933. package/vendor/Package.internal.113.mjs +0 -1292
  934. package/vendor/Package.internal.114.cjs +0 -33
  935. package/vendor/Package.internal.114.mjs +0 -31
  936. package/vendor/Package.internal.115.cjs +0 -20
  937. package/vendor/Package.internal.115.mjs +0 -18
  938. package/vendor/Package.internal.116.cjs +0 -21
  939. package/vendor/Package.internal.116.mjs +0 -21
  940. package/vendor/Package.internal.117.cjs +0 -52
  941. package/vendor/Package.internal.117.mjs +0 -52
  942. package/vendor/Package.internal.118.cjs +0 -141
  943. package/vendor/Package.internal.118.mjs +0 -141
  944. package/vendor/Package.internal.119.cjs +0 -2
  945. package/vendor/Package.internal.119.mjs +0 -1
  946. package/vendor/Package.internal.120.cjs +0 -6
  947. package/vendor/Package.internal.120.mjs +0 -4
  948. package/vendor/Package.internal.121.cjs +0 -4
  949. package/vendor/Package.internal.121.mjs +0 -2
  950. package/vendor/Package.internal.122.cjs +0 -4
  951. package/vendor/Package.internal.122.mjs +0 -2
  952. package/vendor/Package.internal.123.cjs +0 -4
  953. package/vendor/Package.internal.123.mjs +0 -2
  954. package/vendor/Package.internal.124.cjs +0 -49
  955. package/vendor/Package.internal.124.mjs +0 -47
  956. package/vendor/Package.internal.125.cjs +0 -14
  957. package/vendor/Package.internal.125.mjs +0 -14
  958. package/vendor/Package.internal.126.cjs +0 -12
  959. package/vendor/Package.internal.126.mjs +0 -12
  960. package/vendor/Package.internal.127.cjs +0 -20
  961. package/vendor/Package.internal.127.mjs +0 -18
  962. package/vendor/Package.internal.128.cjs +0 -118
  963. package/vendor/Package.internal.128.mjs +0 -116
  964. package/vendor/Package.internal.129.cjs +0 -18
  965. package/vendor/Package.internal.129.mjs +0 -16
  966. package/vendor/Package.internal.130.cjs +0 -19
  967. package/vendor/Package.internal.130.mjs +0 -17
  968. package/vendor/Package.internal.131.cjs +0 -8876
  969. package/vendor/Package.internal.131.mjs +0 -8874
  970. package/vendor/Package.internal.132.cjs +0 -899
  971. package/vendor/Package.internal.132.mjs +0 -897
  972. package/vendor/Package.internal.133.cjs +0 -6769
  973. package/vendor/Package.internal.133.mjs +0 -6775
  974. package/vendor/Package.internal.134.cjs +0 -473
  975. package/vendor/Package.internal.134.mjs +0 -459
  976. package/vendor/Package.internal.135.cjs +0 -617
  977. package/vendor/Package.internal.135.mjs +0 -611
  978. package/vendor/Package.internal.136.cjs +0 -97
  979. package/vendor/Package.internal.136.mjs +0 -89
  980. package/vendor/Package.internal.137.cjs +0 -4
  981. package/vendor/Package.internal.137.mjs +0 -2
  982. package/vendor/Package.internal.138.cjs +0 -3753
  983. package/vendor/Package.internal.138.mjs +0 -3751
  984. package/vendor/Package.internal.139.cjs +0 -561
  985. package/vendor/Package.internal.139.mjs +0 -559
  986. package/vendor/Package.internal.140.cjs +0 -4
  987. package/vendor/Package.internal.140.mjs +0 -2
  988. package/vendor/Package.internal.141.cjs +0 -4
  989. package/vendor/Package.internal.141.mjs +0 -2
  990. package/vendor/Package.internal.142.cjs +0 -4
  991. package/vendor/Package.internal.142.mjs +0 -2
  992. package/vendor/Package.internal.143.cjs +0 -4
  993. package/vendor/Package.internal.143.mjs +0 -2
  994. package/vendor/Package.internal.144.cjs +0 -4
  995. package/vendor/Package.internal.144.mjs +0 -2
  996. package/vendor/Package.internal.145.cjs +0 -4
  997. package/vendor/Package.internal.145.mjs +0 -2
  998. package/vendor/Package.internal.146.cjs +0 -4
  999. package/vendor/Package.internal.146.mjs +0 -2
  1000. package/vendor/Package.internal.147.cjs +0 -4
  1001. package/vendor/Package.internal.147.mjs +0 -2
  1002. package/vendor/Package.internal.148.cjs +0 -4
  1003. package/vendor/Package.internal.148.mjs +0 -2
  1004. package/vendor/Package.internal.149.cjs +0 -4
  1005. package/vendor/Package.internal.149.mjs +0 -2
  1006. package/vendor/Package.internal.150.cjs +0 -4
  1007. package/vendor/Package.internal.150.mjs +0 -2
  1008. package/vendor/Package.internal.151.cjs +0 -408
  1009. package/vendor/Package.internal.151.mjs +0 -400
  1010. package/vendor/Package.internal.152.cjs +0 -104
  1011. package/vendor/Package.internal.152.mjs +0 -104
  1012. package/vendor/Package.internal.153.cjs +0 -27
  1013. package/vendor/Package.internal.153.mjs +0 -27
  1014. package/vendor/Package.internal.154.cjs +0 -4
  1015. package/vendor/Package.internal.154.mjs +0 -2
  1016. package/vendor/Package.internal.155.cjs +0 -4
  1017. package/vendor/Package.internal.155.mjs +0 -2
  1018. package/vendor/Package.internal.156.cjs +0 -723
  1019. package/vendor/Package.internal.156.mjs +0 -723
  1020. package/vendor/Package.internal.157.cjs +0 -1548
  1021. package/vendor/Package.internal.157.mjs +0 -1540
  1022. package/vendor/Package.internal.158.cjs +0 -364
  1023. package/vendor/Package.internal.158.mjs +0 -364
  1024. package/vendor/Package.internal.159.cjs +0 -107
  1025. package/vendor/Package.internal.159.mjs +0 -107
  1026. package/vendor/Package.internal.160.cjs +0 -636
  1027. package/vendor/Package.internal.160.mjs +0 -622
  1028. package/vendor/Package.internal.161.cjs +0 -543
  1029. package/vendor/Package.internal.161.mjs +0 -533
  1030. package/vendor/Package.internal.162.cjs +0 -605
  1031. package/vendor/Package.internal.162.mjs +0 -605
  1032. package/vendor/Package.internal.163.cjs +0 -139
  1033. package/vendor/Package.internal.163.mjs +0 -131
  1034. package/vendor/Package.internal.164.cjs +0 -119
  1035. package/vendor/Package.internal.164.mjs +0 -111
  1036. package/vendor/Package.internal.165.cjs +0 -1224
  1037. package/vendor/Package.internal.165.mjs +0 -1214
  1038. package/vendor/Package.internal.166.cjs +0 -90
  1039. package/vendor/Package.internal.166.mjs +0 -98
  1040. package/vendor/Package.internal.167.cjs +0 -4
  1041. package/vendor/Package.internal.167.mjs +0 -2
  1042. package/vendor/Package.internal.168.cjs +0 -4
  1043. package/vendor/Package.internal.168.mjs +0 -2
  1044. package/vendor/Package.internal.169.cjs +0 -55
  1045. package/vendor/Package.internal.169.mjs +0 -55
  1046. package/vendor/Package.internal.170.cjs +0 -10
  1047. package/vendor/Package.internal.170.mjs +0 -10
  1048. package/vendor/Package.internal.171.cjs +0 -12
  1049. package/vendor/Package.internal.171.mjs +0 -6
  1050. package/vendor/Package.internal.172.cjs +0 -165
  1051. package/vendor/Package.internal.172.mjs +0 -163
  1052. package/vendor/Package.internal.173.cjs +0 -23
  1053. package/vendor/Package.internal.173.mjs +0 -15
  1054. package/vendor/Package.internal.174.cjs +0 -251
  1055. package/vendor/Package.internal.174.mjs +0 -249
  1056. package/vendor/Package.internal.175.cjs +0 -949
  1057. package/vendor/Package.internal.175.mjs +0 -947
  1058. package/vendor/Package.internal.176.cjs +0 -27
  1059. package/vendor/Package.internal.176.mjs +0 -27
  1060. package/vendor/Package.internal.177.cjs +0 -80
  1061. package/vendor/Package.internal.177.mjs +0 -72
  1062. package/vendor/Package.internal.178.cjs +0 -655
  1063. package/vendor/Package.internal.178.mjs +0 -653
  1064. package/vendor/Package.internal.179.cjs +0 -77
  1065. package/vendor/Package.internal.179.mjs +0 -75
  1066. package/vendor/Package.internal.181.cjs +0 -70
  1067. package/vendor/Package.internal.181.mjs +0 -68
  1068. package/vendor/Package.internal.182.cjs +0 -112
  1069. package/vendor/Package.internal.182.mjs +0 -110
  1070. package/vendor/Package.internal.183.cjs +0 -102
  1071. package/vendor/Package.internal.183.mjs +0 -100
  1072. package/vendor/Package.internal.184.cjs +0 -45450
  1073. package/vendor/Package.internal.184.mjs +0 -45432
  1074. package/vendor/Package.internal.185.cjs +0 -8
  1075. package/vendor/Package.internal.185.mjs +0 -6
  1076. package/vendor/Package.internal.186.cjs +0 -30
  1077. package/vendor/Package.internal.186.mjs +0 -28
  1078. package/vendor/Package.internal.187.cjs +0 -317
  1079. package/vendor/Package.internal.187.mjs +0 -315
  1080. package/vendor/Package.internal.188.cjs +0 -943
  1081. package/vendor/Package.internal.188.mjs +0 -951
  1082. package/vendor/Package.internal.189.cjs +0 -1090
  1083. package/vendor/Package.internal.189.mjs +0 -1090
  1084. package/vendor/Package.internal.190.cjs +0 -165
  1085. package/vendor/Package.internal.190.mjs +0 -165
  1086. package/vendor/Package.internal.191.cjs +0 -15
  1087. package/vendor/Package.internal.191.mjs +0 -13
  1088. package/vendor/Package.internal.192.cjs +0 -14
  1089. package/vendor/Package.internal.192.mjs +0 -12
  1090. package/vendor/Package.internal.193.cjs +0 -49
  1091. package/vendor/Package.internal.193.mjs +0 -47
  1092. package/vendor/Package.internal.194.cjs +0 -493
  1093. package/vendor/Package.internal.194.mjs +0 -471
  1094. package/vendor/Package.internal.195.cjs +0 -4
  1095. package/vendor/Package.internal.195.mjs +0 -2
  1096. package/vendor/Package.internal.196.cjs +0 -4
  1097. package/vendor/Package.internal.196.mjs +0 -2
  1098. package/vendor/Package.internal.197.cjs +0 -4
  1099. package/vendor/Package.internal.197.mjs +0 -2
  1100. package/vendor/Package.internal.198.cjs +0 -4
  1101. package/vendor/Package.internal.198.mjs +0 -2
  1102. package/vendor/Package.internal.199.cjs +0 -4
  1103. package/vendor/Package.internal.199.mjs +0 -2
  1104. package/vendor/Package.internal.200.cjs +0 -4
  1105. package/vendor/Package.internal.200.mjs +0 -2
  1106. package/vendor/Package.internal.201.cjs +0 -4
  1107. package/vendor/Package.internal.201.mjs +0 -2
  1108. package/vendor/Package.internal.202.cjs +0 -4
  1109. package/vendor/Package.internal.202.mjs +0 -2
  1110. package/vendor/Package.internal.60.cjs +0 -27
  1111. package/vendor/Package.internal.60.mjs +0 -27
  1112. package/vendor/Package.internal.61.cjs +0 -4
  1113. package/vendor/Package.internal.61.mjs +0 -2
  1114. package/vendor/Package.internal.62.cjs +0 -200
  1115. package/vendor/Package.internal.62.mjs +0 -200
  1116. package/vendor/Package.internal.63.cjs +0 -4019
  1117. package/vendor/Package.internal.63.mjs +0 -4027
  1118. package/vendor/Package.internal.64.cjs +0 -4
  1119. package/vendor/Package.internal.64.mjs +0 -2
  1120. package/vendor/Package.internal.65.cjs +0 -321
  1121. package/vendor/Package.internal.65.mjs +0 -321
  1122. package/vendor/Package.internal.66.cjs +0 -365
  1123. package/vendor/Package.internal.66.mjs +0 -363
  1124. package/vendor/Package.internal.67.cjs +0 -403
  1125. package/vendor/Package.internal.67.mjs +0 -395
  1126. package/vendor/Package.internal.68.cjs +0 -127
  1127. package/vendor/Package.internal.68.mjs +0 -125
  1128. package/vendor/Package.internal.69.cjs +0 -31
  1129. package/vendor/Package.internal.69.mjs +0 -29
  1130. package/vendor/Package.internal.70.cjs +0 -87
  1131. package/vendor/Package.internal.70.mjs +0 -85
  1132. package/vendor/Package.internal.71.cjs +0 -61
  1133. package/vendor/Package.internal.71.mjs +0 -59
  1134. package/vendor/Package.internal.72.cjs +0 -34
  1135. package/vendor/Package.internal.72.mjs +0 -32
  1136. package/vendor/Package.internal.73.cjs +0 -4
  1137. package/vendor/Package.internal.73.mjs +0 -2
  1138. package/vendor/Package.internal.74.cjs +0 -684
  1139. package/vendor/Package.internal.74.mjs +0 -662
  1140. package/vendor/Package.internal.75.cjs +0 -13896
  1141. package/vendor/Package.internal.75.mjs +0 -13870
  1142. package/vendor/Package.internal.76.cjs +0 -37
  1143. package/vendor/Package.internal.76.mjs +0 -31
  1144. package/vendor/Package.internal.77.cjs +0 -4077
  1145. package/vendor/Package.internal.77.mjs +0 -4077
  1146. package/vendor/Package.internal.78.cjs +0 -1664
  1147. package/vendor/Package.internal.78.mjs +0 -1664
  1148. package/vendor/Package.internal.79.cjs +0 -259
  1149. package/vendor/Package.internal.79.mjs +0 -257
  1150. package/vendor/Package.internal.80.cjs +0 -4964
  1151. package/vendor/Package.internal.80.mjs +0 -4948
  1152. package/vendor/Package.internal.81.cjs +0 -1239
  1153. package/vendor/Package.internal.81.mjs +0 -1225
  1154. package/vendor/Package.internal.82.cjs +0 -340
  1155. package/vendor/Package.internal.82.mjs +0 -326
  1156. package/vendor/Package.internal.83.cjs +0 -34
  1157. package/vendor/Package.internal.83.mjs +0 -32
  1158. package/vendor/Package.internal.84.cjs +0 -88
  1159. package/vendor/Package.internal.84.mjs +0 -88
  1160. package/vendor/Package.internal.85.cjs +0 -55
  1161. package/vendor/Package.internal.85.mjs +0 -55
  1162. package/vendor/Package.internal.86.cjs +0 -15
  1163. package/vendor/Package.internal.86.mjs +0 -13
  1164. package/vendor/Package.internal.87.cjs +0 -1355
  1165. package/vendor/Package.internal.87.mjs +0 -1355
  1166. package/vendor/Package.internal.88.cjs +0 -12
  1167. package/vendor/Package.internal.88.mjs +0 -6
  1168. package/vendor/Package.internal.89.cjs +0 -4
  1169. package/vendor/Package.internal.89.mjs +0 -2
  1170. package/vendor/Package.internal.90.cjs +0 -351
  1171. package/vendor/Package.internal.90.mjs +0 -351
  1172. package/vendor/Package.internal.91.cjs +0 -80
  1173. package/vendor/Package.internal.91.mjs +0 -80
  1174. package/vendor/Package.internal.92.cjs +0 -1445
  1175. package/vendor/Package.internal.92.mjs +0 -1433
  1176. package/vendor/Package.internal.93.cjs +0 -144
  1177. package/vendor/Package.internal.93.mjs +0 -142
  1178. package/vendor/Package.internal.94.cjs +0 -1822
  1179. package/vendor/Package.internal.94.mjs +0 -1814
  1180. package/vendor/Package.internal.95.cjs +0 -130
  1181. package/vendor/Package.internal.95.mjs +0 -124
  1182. package/vendor/Package.internal.96.cjs +0 -208
  1183. package/vendor/Package.internal.96.mjs +0 -208
  1184. package/vendor/Package.internal.97.cjs +0 -1641
  1185. package/vendor/Package.internal.97.mjs +0 -1641
  1186. package/vendor/Package.internal.98.cjs +0 -74
  1187. package/vendor/Package.internal.98.mjs +0 -74
  1188. package/vendor/Package.internal.99.cjs +0 -28
  1189. package/vendor/Package.internal.99.mjs +0 -28
@@ -1,2434 +0,0 @@
1
- /* Build Date: Mon Nov 24 2025 18:02:01 GMT+0800 (China Standard Time) */
2
- import { win32 as t, posix as e } from "node:path";
3
-
4
- import { fileURLToPath as i } from "node:url";
5
-
6
- import { realpathSync as s, readlinkSync as n, readdirSync as r, readdir as h, lstatSync as a } from "fs";
7
-
8
- import * as o from "node:fs";
9
-
10
- import { realpath as l, readlink as c, readdir as d, lstat as f } from "node:fs/promises";
11
-
12
- import { M as u } from "./Package.internal.113.mjs";
13
-
14
- const p = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
15
-
16
- const y = new Set;
17
-
18
- const m = typeof process === "object" && !!process ? process : {};
19
-
20
- const g = (t, e, i, s) => {
21
- typeof m.emitWarning === "function" ? m.emitWarning(t, e, i, s) : console.error(`[${i}] ${e}: ${t}`);
22
- };
23
-
24
- let w = globalThis.AbortController;
25
-
26
- let S = globalThis.AbortSignal;
27
-
28
- if (typeof w === "undefined") {
29
- S = class AbortSignal {
30
- onabort;
31
- _onabort=[];
32
- reason;
33
- aborted=false;
34
- addEventListener(t, e) {
35
- this._onabort.push(e);
36
- }
37
- };
38
- w = class AbortController {
39
- constructor() {
40
- e();
41
- }
42
- signal=new S;
43
- abort(t) {
44
- if (this.signal.aborted) return;
45
- this.signal.reason = t;
46
- this.signal.aborted = true;
47
- for (const e of this.signal._onabort) {
48
- e(t);
49
- }
50
- this.signal.onabort?.(t);
51
- }
52
- };
53
- let t = m.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
54
- const e = () => {
55
- if (!t) return;
56
- t = false;
57
- g("AbortController is not defined. If using lru-cache in " + "node 14, load an AbortController polyfill from the " + "`node-abort-controller` package. A minimal polyfill is " + "provided for use by LRUCache.fetch(), but it should not be " + "relied upon in other contexts (eg, passing it to other APIs that " + "use AbortController/AbortSignal might have undesirable effects). " + "You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", e);
58
- };
59
- }
60
-
61
- const v = t => !y.has(t);
62
-
63
- const k = t => t && t === Math.floor(t) && t > 0 && isFinite(t);
64
-
65
- const F = t => !k(t) ? null : t <= Math.pow(2, 8) ? Uint8Array : t <= Math.pow(2, 16) ? Uint16Array : t <= Math.pow(2, 32) ? Uint32Array : t <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
66
-
67
- class ZeroArray extends Array {
68
- constructor(t) {
69
- super(t);
70
- this.fill(0);
71
- }
72
- }
73
-
74
- class Stack {
75
- heap;
76
- length;
77
- static #t=false;
78
- static create(t) {
79
- const e = F(t);
80
- if (!e) return [];
81
- Stack.#t = true;
82
- const i = new Stack(t, e);
83
- Stack.#t = false;
84
- return i;
85
- }
86
- constructor(t, e) {
87
- if (!Stack.#t) {
88
- throw new TypeError("instantiate Stack using Stack.create(n)");
89
- }
90
- this.heap = new e(t);
91
- this.length = 0;
92
- }
93
- push(t) {
94
- this.heap[this.length++] = t;
95
- }
96
- pop() {
97
- return this.heap[--this.length];
98
- }
99
- }
100
-
101
- class LRUCache {
102
- #e;
103
- #i;
104
- #s;
105
- #n;
106
- #r;
107
- #h;
108
- #a;
109
- #o;
110
- get perf() {
111
- return this.#o;
112
- }
113
- ttl;
114
- ttlResolution;
115
- ttlAutopurge;
116
- updateAgeOnGet;
117
- updateAgeOnHas;
118
- allowStale;
119
- noDisposeOnSet;
120
- noUpdateTTL;
121
- maxEntrySize;
122
- sizeCalculation;
123
- noDeleteOnFetchRejection;
124
- noDeleteOnStaleGet;
125
- allowStaleOnFetchAbort;
126
- allowStaleOnFetchRejection;
127
- ignoreFetchAbort;
128
- #l;
129
- #c;
130
- #d;
131
- #f;
132
- #u;
133
- #p;
134
- #y;
135
- #m;
136
- #g;
137
- #w;
138
- #S;
139
- #v;
140
- #k;
141
- #F;
142
- #T;
143
- #x;
144
- #b;
145
- #z;
146
- static unsafeExposeInternals(t) {
147
- return {
148
- starts: t.#k,
149
- ttls: t.#F,
150
- sizes: t.#v,
151
- keyMap: t.#d,
152
- keyList: t.#f,
153
- valList: t.#u,
154
- next: t.#p,
155
- prev: t.#y,
156
- get head() {
157
- return t.#m;
158
- },
159
- get tail() {
160
- return t.#g;
161
- },
162
- free: t.#w,
163
- isBackgroundFetch: e => t.#L(e),
164
- backgroundFetch: (e, i, s, n) => t.#A(e, i, s, n),
165
- moveToTail: e => t.#C(e),
166
- indexes: e => t.#P(e),
167
- rindexes: e => t.#O(e),
168
- isStale: e => t.#R(e)
169
- };
170
- }
171
- get max() {
172
- return this.#e;
173
- }
174
- get maxSize() {
175
- return this.#i;
176
- }
177
- get calculatedSize() {
178
- return this.#c;
179
- }
180
- get size() {
181
- return this.#l;
182
- }
183
- get fetchMethod() {
184
- return this.#h;
185
- }
186
- get memoMethod() {
187
- return this.#a;
188
- }
189
- get dispose() {
190
- return this.#s;
191
- }
192
- get onInsert() {
193
- return this.#n;
194
- }
195
- get disposeAfter() {
196
- return this.#r;
197
- }
198
- constructor(t) {
199
- const {max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: r, updateAgeOnHas: h, allowStale: a, dispose: o, onInsert: l, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: f, maxSize: u = 0, maxEntrySize: m = 0, sizeCalculation: w, fetchMethod: S, memoMethod: T, noDeleteOnFetchRejection: x, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: z, allowStaleOnFetchAbort: L, ignoreFetchAbort: A, perf: C} = t;
200
- if (C !== undefined) {
201
- if (typeof C?.now !== "function") {
202
- throw new TypeError("perf option must have a now() method if specified");
203
- }
204
- }
205
- this.#o = C ?? p;
206
- if (e !== 0 && !k(e)) {
207
- throw new TypeError("max option must be a nonnegative integer");
208
- }
209
- const P = e ? F(e) : Array;
210
- if (!P) {
211
- throw new Error("invalid max value: " + e);
212
- }
213
- this.#e = e;
214
- this.#i = u;
215
- this.maxEntrySize = m || this.#i;
216
- this.sizeCalculation = w;
217
- if (this.sizeCalculation) {
218
- if (!this.#i && !this.maxEntrySize) {
219
- throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
220
- }
221
- if (typeof this.sizeCalculation !== "function") {
222
- throw new TypeError("sizeCalculation set to non-function");
223
- }
224
- }
225
- if (T !== undefined && typeof T !== "function") {
226
- throw new TypeError("memoMethod must be a function if defined");
227
- }
228
- this.#a = T;
229
- if (S !== undefined && typeof S !== "function") {
230
- throw new TypeError("fetchMethod must be a function if specified");
231
- }
232
- this.#h = S;
233
- this.#x = !!S;
234
- this.#d = new Map;
235
- this.#f = new Array(e).fill(undefined);
236
- this.#u = new Array(e).fill(undefined);
237
- this.#p = new P(e);
238
- this.#y = new P(e);
239
- this.#m = 0;
240
- this.#g = 0;
241
- this.#w = Stack.create(e);
242
- this.#l = 0;
243
- this.#c = 0;
244
- if (typeof o === "function") {
245
- this.#s = o;
246
- }
247
- if (typeof l === "function") {
248
- this.#n = l;
249
- }
250
- if (typeof c === "function") {
251
- this.#r = c;
252
- this.#S = [];
253
- } else {
254
- this.#r = undefined;
255
- this.#S = undefined;
256
- }
257
- this.#T = !!this.#s;
258
- this.#z = !!this.#n;
259
- this.#b = !!this.#r;
260
- this.noDisposeOnSet = !!d;
261
- this.noUpdateTTL = !!f;
262
- this.noDeleteOnFetchRejection = !!x;
263
- this.allowStaleOnFetchRejection = !!z;
264
- this.allowStaleOnFetchAbort = !!L;
265
- this.ignoreFetchAbort = !!A;
266
- if (this.maxEntrySize !== 0) {
267
- if (this.#i !== 0) {
268
- if (!k(this.#i)) {
269
- throw new TypeError("maxSize must be a positive integer if specified");
270
- }
271
- }
272
- if (!k(this.maxEntrySize)) {
273
- throw new TypeError("maxEntrySize must be a positive integer if specified");
274
- }
275
- this.#E();
276
- }
277
- this.allowStale = !!a;
278
- this.noDeleteOnStaleGet = !!b;
279
- this.updateAgeOnGet = !!r;
280
- this.updateAgeOnHas = !!h;
281
- this.ttlResolution = k(s) || s === 0 ? s : 1;
282
- this.ttlAutopurge = !!n;
283
- this.ttl = i || 0;
284
- if (this.ttl) {
285
- if (!k(this.ttl)) {
286
- throw new TypeError("ttl must be a positive integer if specified");
287
- }
288
- this.#_();
289
- }
290
- if (this.#e === 0 && this.ttl === 0 && this.#i === 0) {
291
- throw new TypeError("At least one of max, maxSize, or ttl is required");
292
- }
293
- if (!this.ttlAutopurge && !this.#e && !this.#i) {
294
- const t = "LRU_CACHE_UNBOUNDED";
295
- if (v(t)) {
296
- y.add(t);
297
- const e = "TTL caching without ttlAutopurge, max, or maxSize can " + "result in unbounded memory consumption.";
298
- g(e, "UnboundedCacheWarning", t, LRUCache);
299
- }
300
- }
301
- }
302
- getRemainingTTL(t) {
303
- return this.#d.has(t) ? Infinity : 0;
304
- }
305
- #_() {
306
- const t = new ZeroArray(this.#e);
307
- const e = new ZeroArray(this.#e);
308
- this.#F = t;
309
- this.#k = e;
310
- this.#D = (i, s, n = this.#o.now()) => {
311
- e[i] = s !== 0 ? n : 0;
312
- t[i] = s;
313
- if (s !== 0 && this.ttlAutopurge) {
314
- const t = setTimeout(() => {
315
- if (this.#R(i)) {
316
- this.#M(this.#f[i], "expire");
317
- }
318
- }, s + 1);
319
- if (t.unref) {
320
- t.unref();
321
- }
322
- }
323
- };
324
- this.#I = i => {
325
- e[i] = t[i] !== 0 ? this.#o.now() : 0;
326
- };
327
- this.#B = (n, r) => {
328
- if (t[r]) {
329
- const h = t[r];
330
- const a = e[r];
331
- if (!h || !a) return;
332
- n.ttl = h;
333
- n.start = a;
334
- n.now = i || s();
335
- const o = n.now - a;
336
- n.remainingTTL = h - o;
337
- }
338
- };
339
- let i = 0;
340
- const s = () => {
341
- const t = this.#o.now();
342
- if (this.ttlResolution > 0) {
343
- i = t;
344
- const e = setTimeout(() => i = 0, this.ttlResolution);
345
- if (e.unref) {
346
- e.unref();
347
- }
348
- }
349
- return t;
350
- };
351
- this.getRemainingTTL = n => {
352
- const r = this.#d.get(n);
353
- if (r === undefined) {
354
- return 0;
355
- }
356
- const h = t[r];
357
- const a = e[r];
358
- if (!h || !a) {
359
- return Infinity;
360
- }
361
- const o = (i || s()) - a;
362
- return h - o;
363
- };
364
- this.#R = n => {
365
- const r = e[n];
366
- const h = t[n];
367
- return !!h && !!r && (i || s()) - r > h;
368
- };
369
- }
370
- #I=() => {};
371
- #B=() => {};
372
- #D=() => {};
373
- #R=() => false;
374
- #E() {
375
- const t = new ZeroArray(this.#e);
376
- this.#c = 0;
377
- this.#v = t;
378
- this.#N = e => {
379
- this.#c -= t[e];
380
- t[e] = 0;
381
- };
382
- this.#W = (t, e, i, s) => {
383
- if (this.#L(e)) {
384
- return 0;
385
- }
386
- if (!k(i)) {
387
- if (s) {
388
- if (typeof s !== "function") {
389
- throw new TypeError("sizeCalculation must be a function");
390
- }
391
- i = s(e, t);
392
- if (!k(i)) {
393
- throw new TypeError("sizeCalculation return invalid (expect positive integer)");
394
- }
395
- } else {
396
- throw new TypeError("invalid size value (must be positive integer). " + "When maxSize or maxEntrySize is used, sizeCalculation " + "or size must be set.");
397
- }
398
- }
399
- return i;
400
- };
401
- this.#U = (e, i, s) => {
402
- t[e] = i;
403
- if (this.#i) {
404
- const i = this.#i - t[e];
405
- while (this.#c > i) {
406
- this.#j(true);
407
- }
408
- }
409
- this.#c += t[e];
410
- if (s) {
411
- s.entrySize = i;
412
- s.totalCalculatedSize = this.#c;
413
- }
414
- };
415
- }
416
- #N=t => {};
417
- #U=(t, e, i) => {};
418
- #W=(t, e, i, s) => {
419
- if (i || s) {
420
- throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
421
- }
422
- return 0;
423
- };
424
- * #P({allowStale: t = this.allowStale} = {}) {
425
- if (this.#l) {
426
- for (let e = this.#g; true; ) {
427
- if (!this.#G(e)) {
428
- break;
429
- }
430
- if (t || !this.#R(e)) {
431
- yield e;
432
- }
433
- if (e === this.#m) {
434
- break;
435
- } else {
436
- e = this.#y[e];
437
- }
438
- }
439
- }
440
- }
441
- * #O({allowStale: t = this.allowStale} = {}) {
442
- if (this.#l) {
443
- for (let e = this.#m; true; ) {
444
- if (!this.#G(e)) {
445
- break;
446
- }
447
- if (t || !this.#R(e)) {
448
- yield e;
449
- }
450
- if (e === this.#g) {
451
- break;
452
- } else {
453
- e = this.#p[e];
454
- }
455
- }
456
- }
457
- }
458
- #G(t) {
459
- return t !== undefined && this.#d.get(this.#f[t]) === t;
460
- }
461
- * entries() {
462
- for (const t of this.#P()) {
463
- if (this.#u[t] !== undefined && this.#f[t] !== undefined && !this.#L(this.#u[t])) {
464
- yield [ this.#f[t], this.#u[t] ];
465
- }
466
- }
467
- }
468
- * rentries() {
469
- for (const t of this.#O()) {
470
- if (this.#u[t] !== undefined && this.#f[t] !== undefined && !this.#L(this.#u[t])) {
471
- yield [ this.#f[t], this.#u[t] ];
472
- }
473
- }
474
- }
475
- * keys() {
476
- for (const t of this.#P()) {
477
- const e = this.#f[t];
478
- if (e !== undefined && !this.#L(this.#u[t])) {
479
- yield e;
480
- }
481
- }
482
- }
483
- * rkeys() {
484
- for (const t of this.#O()) {
485
- const e = this.#f[t];
486
- if (e !== undefined && !this.#L(this.#u[t])) {
487
- yield e;
488
- }
489
- }
490
- }
491
- * values() {
492
- for (const t of this.#P()) {
493
- const e = this.#u[t];
494
- if (e !== undefined && !this.#L(this.#u[t])) {
495
- yield this.#u[t];
496
- }
497
- }
498
- }
499
- * rvalues() {
500
- for (const t of this.#O()) {
501
- const e = this.#u[t];
502
- if (e !== undefined && !this.#L(this.#u[t])) {
503
- yield this.#u[t];
504
- }
505
- }
506
- }
507
- [Symbol.iterator]() {
508
- return this.entries();
509
- }
510
- [Symbol.toStringTag]="LRUCache";
511
- find(t, e = {}) {
512
- for (const i of this.#P()) {
513
- const s = this.#u[i];
514
- const n = this.#L(s) ? s.__staleWhileFetching : s;
515
- if (n === undefined) continue;
516
- if (t(n, this.#f[i], this)) {
517
- return this.get(this.#f[i], e);
518
- }
519
- }
520
- }
521
- forEach(t, e = this) {
522
- for (const i of this.#P()) {
523
- const s = this.#u[i];
524
- const n = this.#L(s) ? s.__staleWhileFetching : s;
525
- if (n === undefined) continue;
526
- t.call(e, n, this.#f[i], this);
527
- }
528
- }
529
- rforEach(t, e = this) {
530
- for (const i of this.#O()) {
531
- const s = this.#u[i];
532
- const n = this.#L(s) ? s.__staleWhileFetching : s;
533
- if (n === undefined) continue;
534
- t.call(e, n, this.#f[i], this);
535
- }
536
- }
537
- purgeStale() {
538
- let t = false;
539
- for (const e of this.#O({
540
- allowStale: true
541
- })) {
542
- if (this.#R(e)) {
543
- this.#M(this.#f[e], "expire");
544
- t = true;
545
- }
546
- }
547
- return t;
548
- }
549
- info(t) {
550
- const e = this.#d.get(t);
551
- if (e === undefined) return undefined;
552
- const i = this.#u[e];
553
- const s = this.#L(i) ? i.__staleWhileFetching : i;
554
- if (s === undefined) return undefined;
555
- const n = {
556
- value: s
557
- };
558
- if (this.#F && this.#k) {
559
- const t = this.#F[e];
560
- const i = this.#k[e];
561
- if (t && i) {
562
- const e = t - (this.#o.now() - i);
563
- n.ttl = e;
564
- n.start = Date.now();
565
- }
566
- }
567
- if (this.#v) {
568
- n.size = this.#v[e];
569
- }
570
- return n;
571
- }
572
- dump() {
573
- const t = [];
574
- for (const e of this.#P({
575
- allowStale: true
576
- })) {
577
- const i = this.#f[e];
578
- const s = this.#u[e];
579
- const n = this.#L(s) ? s.__staleWhileFetching : s;
580
- if (n === undefined || i === undefined) continue;
581
- const r = {
582
- value: n
583
- };
584
- if (this.#F && this.#k) {
585
- r.ttl = this.#F[e];
586
- const t = this.#o.now() - this.#k[e];
587
- r.start = Math.floor(Date.now() - t);
588
- }
589
- if (this.#v) {
590
- r.size = this.#v[e];
591
- }
592
- t.unshift([ i, r ]);
593
- }
594
- return t;
595
- }
596
- load(t) {
597
- this.clear();
598
- for (const [e, i] of t) {
599
- if (i.start) {
600
- const t = Date.now() - i.start;
601
- i.start = this.#o.now() - t;
602
- }
603
- this.set(e, i.value, i);
604
- }
605
- }
606
- set(t, e, i = {}) {
607
- if (e === undefined) {
608
- this.delete(t);
609
- return this;
610
- }
611
- const {ttl: s = this.ttl, start: n, noDisposeOnSet: r = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a} = i;
612
- let {noUpdateTTL: o = this.noUpdateTTL} = i;
613
- const l = this.#W(t, e, i.size || 0, h);
614
- if (this.maxEntrySize && l > this.maxEntrySize) {
615
- if (a) {
616
- a.set = "miss";
617
- a.maxEntrySizeExceeded = true;
618
- }
619
- this.#M(t, "set");
620
- return this;
621
- }
622
- let c = this.#l === 0 ? undefined : this.#d.get(t);
623
- if (c === undefined) {
624
- c = this.#l === 0 ? this.#g : this.#w.length !== 0 ? this.#w.pop() : this.#l === this.#e ? this.#j(false) : this.#l;
625
- this.#f[c] = t;
626
- this.#u[c] = e;
627
- this.#d.set(t, c);
628
- this.#p[this.#g] = c;
629
- this.#y[c] = this.#g;
630
- this.#g = c;
631
- this.#l++;
632
- this.#U(c, l, a);
633
- if (a) a.set = "add";
634
- o = false;
635
- if (this.#z) {
636
- this.#n?.(e, t, "add");
637
- }
638
- } else {
639
- this.#C(c);
640
- const i = this.#u[c];
641
- if (e !== i) {
642
- if (this.#x && this.#L(i)) {
643
- i.__abortController.abort(new Error("replaced"));
644
- const {__staleWhileFetching: e} = i;
645
- if (e !== undefined && !r) {
646
- if (this.#T) {
647
- this.#s?.(e, t, "set");
648
- }
649
- if (this.#b) {
650
- this.#S?.push([ e, t, "set" ]);
651
- }
652
- }
653
- } else if (!r) {
654
- if (this.#T) {
655
- this.#s?.(i, t, "set");
656
- }
657
- if (this.#b) {
658
- this.#S?.push([ i, t, "set" ]);
659
- }
660
- }
661
- this.#N(c);
662
- this.#U(c, l, a);
663
- this.#u[c] = e;
664
- if (a) {
665
- a.set = "replace";
666
- const t = i && this.#L(i) ? i.__staleWhileFetching : i;
667
- if (t !== undefined) a.oldValue = t;
668
- }
669
- } else if (a) {
670
- a.set = "update";
671
- }
672
- if (this.#z) {
673
- this.onInsert?.(e, t, e === i ? "update" : "replace");
674
- }
675
- }
676
- if (s !== 0 && !this.#F) {
677
- this.#_();
678
- }
679
- if (this.#F) {
680
- if (!o) {
681
- this.#D(c, s, n);
682
- }
683
- if (a) this.#B(a, c);
684
- }
685
- if (!r && this.#b && this.#S) {
686
- const t = this.#S;
687
- let e;
688
- while (e = t?.shift()) {
689
- this.#r?.(...e);
690
- }
691
- }
692
- return this;
693
- }
694
- pop() {
695
- try {
696
- while (this.#l) {
697
- const t = this.#u[this.#m];
698
- this.#j(true);
699
- if (this.#L(t)) {
700
- if (t.__staleWhileFetching) {
701
- return t.__staleWhileFetching;
702
- }
703
- } else if (t !== undefined) {
704
- return t;
705
- }
706
- }
707
- } finally {
708
- if (this.#b && this.#S) {
709
- const t = this.#S;
710
- let e;
711
- while (e = t?.shift()) {
712
- this.#r?.(...e);
713
- }
714
- }
715
- }
716
- }
717
- #j(t) {
718
- const e = this.#m;
719
- const i = this.#f[e];
720
- const s = this.#u[e];
721
- if (this.#x && this.#L(s)) {
722
- s.__abortController.abort(new Error("evicted"));
723
- } else if (this.#T || this.#b) {
724
- if (this.#T) {
725
- this.#s?.(s, i, "evict");
726
- }
727
- if (this.#b) {
728
- this.#S?.push([ s, i, "evict" ]);
729
- }
730
- }
731
- this.#N(e);
732
- if (t) {
733
- this.#f[e] = undefined;
734
- this.#u[e] = undefined;
735
- this.#w.push(e);
736
- }
737
- if (this.#l === 1) {
738
- this.#m = this.#g = 0;
739
- this.#w.length = 0;
740
- } else {
741
- this.#m = this.#p[e];
742
- }
743
- this.#d.delete(i);
744
- this.#l--;
745
- return e;
746
- }
747
- has(t, e = {}) {
748
- const {updateAgeOnHas: i = this.updateAgeOnHas, status: s} = e;
749
- const n = this.#d.get(t);
750
- if (n !== undefined) {
751
- const t = this.#u[n];
752
- if (this.#L(t) && t.__staleWhileFetching === undefined) {
753
- return false;
754
- }
755
- if (!this.#R(n)) {
756
- if (i) {
757
- this.#I(n);
758
- }
759
- if (s) {
760
- s.has = "hit";
761
- this.#B(s, n);
762
- }
763
- return true;
764
- } else if (s) {
765
- s.has = "stale";
766
- this.#B(s, n);
767
- }
768
- } else if (s) {
769
- s.has = "miss";
770
- }
771
- return false;
772
- }
773
- peek(t, e = {}) {
774
- const {allowStale: i = this.allowStale} = e;
775
- const s = this.#d.get(t);
776
- if (s === undefined || !i && this.#R(s)) {
777
- return;
778
- }
779
- const n = this.#u[s];
780
- return this.#L(n) ? n.__staleWhileFetching : n;
781
- }
782
- #A(t, e, i, s) {
783
- const n = e === undefined ? undefined : this.#u[e];
784
- if (this.#L(n)) {
785
- return n;
786
- }
787
- const r = new w;
788
- const {signal: h} = i;
789
- h?.addEventListener("abort", () => r.abort(h.reason), {
790
- signal: r.signal
791
- });
792
- const a = {
793
- signal: r.signal,
794
- options: i,
795
- context: s
796
- };
797
- const o = (s, n = false) => {
798
- const {aborted: h} = r.signal;
799
- const o = i.ignoreFetchAbort && s !== undefined;
800
- if (i.status) {
801
- if (h && !n) {
802
- i.status.fetchAborted = true;
803
- i.status.fetchError = r.signal.reason;
804
- if (o) i.status.fetchAbortIgnored = true;
805
- } else {
806
- i.status.fetchResolved = true;
807
- }
808
- }
809
- if (h && !o && !n) {
810
- return c(r.signal.reason);
811
- }
812
- const l = f;
813
- const d = this.#u[e];
814
- if (d === f || o && n && d === undefined) {
815
- if (s === undefined) {
816
- if (l.__staleWhileFetching !== undefined) {
817
- this.#u[e] = l.__staleWhileFetching;
818
- } else {
819
- this.#M(t, "fetch");
820
- }
821
- } else {
822
- if (i.status) i.status.fetchUpdated = true;
823
- this.set(t, s, a.options);
824
- }
825
- }
826
- return s;
827
- };
828
- const l = t => {
829
- if (i.status) {
830
- i.status.fetchRejected = true;
831
- i.status.fetchError = t;
832
- }
833
- return c(t);
834
- };
835
- const c = s => {
836
- const {aborted: n} = r.signal;
837
- const h = n && i.allowStaleOnFetchAbort;
838
- const a = h || i.allowStaleOnFetchRejection;
839
- const o = a || i.noDeleteOnFetchRejection;
840
- const l = f;
841
- if (this.#u[e] === f) {
842
- const i = !o || l.__staleWhileFetching === undefined;
843
- if (i) {
844
- this.#M(t, "fetch");
845
- } else if (!h) {
846
- this.#u[e] = l.__staleWhileFetching;
847
- }
848
- }
849
- if (a) {
850
- if (i.status && l.__staleWhileFetching !== undefined) {
851
- i.status.returnedStale = true;
852
- }
853
- return l.__staleWhileFetching;
854
- } else if (l.__returned === l) {
855
- throw s;
856
- }
857
- };
858
- const d = (e, s) => {
859
- const h = this.#h?.(t, n, a);
860
- if (h && h instanceof Promise) {
861
- h.then(t => e(t === undefined ? undefined : t), s);
862
- }
863
- r.signal.addEventListener("abort", () => {
864
- if (!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) {
865
- e(undefined);
866
- if (i.allowStaleOnFetchAbort) {
867
- e = t => o(t, true);
868
- }
869
- }
870
- });
871
- };
872
- if (i.status) i.status.fetchDispatched = true;
873
- const f = new Promise(d).then(o, l);
874
- const u = Object.assign(f, {
875
- __abortController: r,
876
- __staleWhileFetching: n,
877
- __returned: undefined
878
- });
879
- if (e === undefined) {
880
- this.set(t, u, {
881
- ...a.options,
882
- status: undefined
883
- });
884
- e = this.#d.get(t);
885
- } else {
886
- this.#u[e] = u;
887
- }
888
- return u;
889
- }
890
- #L(t) {
891
- if (!this.#x) return false;
892
- const e = t;
893
- return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof w;
894
- }
895
- async fetch(t, e = {}) {
896
- const {allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: r = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a = 0, sizeCalculation: o = this.sizeCalculation, noUpdateTTL: l = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: u = this.allowStaleOnFetchAbort, context: p, forceRefresh: y = false, status: m, signal: g} = e;
897
- if (!this.#x) {
898
- if (m) m.fetch = "get";
899
- return this.get(t, {
900
- allowStale: i,
901
- updateAgeOnGet: s,
902
- noDeleteOnStaleGet: n,
903
- status: m
904
- });
905
- }
906
- const w = {
907
- allowStale: i,
908
- updateAgeOnGet: s,
909
- noDeleteOnStaleGet: n,
910
- ttl: r,
911
- noDisposeOnSet: h,
912
- size: a,
913
- sizeCalculation: o,
914
- noUpdateTTL: l,
915
- noDeleteOnFetchRejection: c,
916
- allowStaleOnFetchRejection: d,
917
- allowStaleOnFetchAbort: u,
918
- ignoreFetchAbort: f,
919
- status: m,
920
- signal: g
921
- };
922
- let S = this.#d.get(t);
923
- if (S === undefined) {
924
- if (m) m.fetch = "miss";
925
- const e = this.#A(t, S, w, p);
926
- return e.__returned = e;
927
- } else {
928
- const e = this.#u[S];
929
- if (this.#L(e)) {
930
- const t = i && e.__staleWhileFetching !== undefined;
931
- if (m) {
932
- m.fetch = "inflight";
933
- if (t) m.returnedStale = true;
934
- }
935
- return t ? e.__staleWhileFetching : e.__returned = e;
936
- }
937
- const n = this.#R(S);
938
- if (!y && !n) {
939
- if (m) m.fetch = "hit";
940
- this.#C(S);
941
- if (s) {
942
- this.#I(S);
943
- }
944
- if (m) this.#B(m, S);
945
- return e;
946
- }
947
- const r = this.#A(t, S, w, p);
948
- const h = r.__staleWhileFetching !== undefined;
949
- const a = h && i;
950
- if (m) {
951
- m.fetch = n ? "stale" : "refresh";
952
- if (a && n) m.returnedStale = true;
953
- }
954
- return a ? r.__staleWhileFetching : r.__returned = r;
955
- }
956
- }
957
- async forceFetch(t, e = {}) {
958
- const i = await this.fetch(t, e);
959
- if (i === undefined) throw new Error("fetch() returned undefined");
960
- return i;
961
- }
962
- memo(t, e = {}) {
963
- const i = this.#a;
964
- if (!i) {
965
- throw new Error("no memoMethod provided to constructor");
966
- }
967
- const {context: s, forceRefresh: n, ...r} = e;
968
- const h = this.get(t, r);
969
- if (!n && h !== undefined) return h;
970
- const a = i(t, h, {
971
- options: r,
972
- context: s
973
- });
974
- this.set(t, a, r);
975
- return a;
976
- }
977
- get(t, e = {}) {
978
- const {allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: r} = e;
979
- const h = this.#d.get(t);
980
- if (h !== undefined) {
981
- const e = this.#u[h];
982
- const a = this.#L(e);
983
- if (r) this.#B(r, h);
984
- if (this.#R(h)) {
985
- if (r) r.get = "stale";
986
- if (!a) {
987
- if (!n) {
988
- this.#M(t, "expire");
989
- }
990
- if (r && i) r.returnedStale = true;
991
- return i ? e : undefined;
992
- } else {
993
- if (r && i && e.__staleWhileFetching !== undefined) {
994
- r.returnedStale = true;
995
- }
996
- return i ? e.__staleWhileFetching : undefined;
997
- }
998
- } else {
999
- if (r) r.get = "hit";
1000
- if (a) {
1001
- return e.__staleWhileFetching;
1002
- }
1003
- this.#C(h);
1004
- if (s) {
1005
- this.#I(h);
1006
- }
1007
- return e;
1008
- }
1009
- } else if (r) {
1010
- r.get = "miss";
1011
- }
1012
- }
1013
- #$(t, e) {
1014
- this.#y[e] = t;
1015
- this.#p[t] = e;
1016
- }
1017
- #C(t) {
1018
- if (t !== this.#g) {
1019
- if (t === this.#m) {
1020
- this.#m = this.#p[t];
1021
- } else {
1022
- this.#$(this.#y[t], this.#p[t]);
1023
- }
1024
- this.#$(this.#g, t);
1025
- this.#g = t;
1026
- }
1027
- }
1028
- delete(t) {
1029
- return this.#M(t, "delete");
1030
- }
1031
- #M(t, e) {
1032
- let i = false;
1033
- if (this.#l !== 0) {
1034
- const s = this.#d.get(t);
1035
- if (s !== undefined) {
1036
- i = true;
1037
- if (this.#l === 1) {
1038
- this.#H(e);
1039
- } else {
1040
- this.#N(s);
1041
- const i = this.#u[s];
1042
- if (this.#L(i)) {
1043
- i.__abortController.abort(new Error("deleted"));
1044
- } else if (this.#T || this.#b) {
1045
- if (this.#T) {
1046
- this.#s?.(i, t, e);
1047
- }
1048
- if (this.#b) {
1049
- this.#S?.push([ i, t, e ]);
1050
- }
1051
- }
1052
- this.#d.delete(t);
1053
- this.#f[s] = undefined;
1054
- this.#u[s] = undefined;
1055
- if (s === this.#g) {
1056
- this.#g = this.#y[s];
1057
- } else if (s === this.#m) {
1058
- this.#m = this.#p[s];
1059
- } else {
1060
- const t = this.#y[s];
1061
- this.#p[t] = this.#p[s];
1062
- const e = this.#p[s];
1063
- this.#y[e] = this.#y[s];
1064
- }
1065
- this.#l--;
1066
- this.#w.push(s);
1067
- }
1068
- }
1069
- }
1070
- if (this.#b && this.#S?.length) {
1071
- const t = this.#S;
1072
- let e;
1073
- while (e = t?.shift()) {
1074
- this.#r?.(...e);
1075
- }
1076
- }
1077
- return i;
1078
- }
1079
- clear() {
1080
- return this.#H("delete");
1081
- }
1082
- #H(t) {
1083
- for (const e of this.#O({
1084
- allowStale: true
1085
- })) {
1086
- const i = this.#u[e];
1087
- if (this.#L(i)) {
1088
- i.__abortController.abort(new Error("deleted"));
1089
- } else {
1090
- const s = this.#f[e];
1091
- if (this.#T) {
1092
- this.#s?.(i, s, t);
1093
- }
1094
- if (this.#b) {
1095
- this.#S?.push([ i, s, t ]);
1096
- }
1097
- }
1098
- }
1099
- this.#d.clear();
1100
- this.#u.fill(undefined);
1101
- this.#f.fill(undefined);
1102
- if (this.#F && this.#k) {
1103
- this.#F.fill(0);
1104
- this.#k.fill(0);
1105
- }
1106
- if (this.#v) {
1107
- this.#v.fill(0);
1108
- }
1109
- this.#m = 0;
1110
- this.#g = 0;
1111
- this.#w.length = 0;
1112
- this.#c = 0;
1113
- this.#l = 0;
1114
- if (this.#b && this.#S) {
1115
- const t = this.#S;
1116
- let e;
1117
- while (e = t?.shift()) {
1118
- this.#r?.(...e);
1119
- }
1120
- }
1121
- }
1122
- }
1123
-
1124
- const T = s.native;
1125
-
1126
- const x = {
1127
- lstatSync: a,
1128
- readdir: h,
1129
- readdirSync: r,
1130
- readlinkSync: n,
1131
- realpathSync: T,
1132
- promises: {
1133
- lstat: f,
1134
- readdir: d,
1135
- readlink: c,
1136
- realpath: l
1137
- }
1138
- };
1139
-
1140
- const b = t => !t || t === x || t === o ? x : {
1141
- ...x,
1142
- ...t,
1143
- promises: {
1144
- ...x.promises,
1145
- ...t.promises || {}
1146
- }
1147
- };
1148
-
1149
- const z = /^\\\\\?\\([a-z]:)\\?$/i;
1150
-
1151
- const L = t => t.replace(/\//g, "\\").replace(z, "$1\\");
1152
-
1153
- const A = /[\\\/]/;
1154
-
1155
- const C = 0;
1156
-
1157
- const P = 1;
1158
-
1159
- const O = 2;
1160
-
1161
- const R = 4;
1162
-
1163
- const E = 6;
1164
-
1165
- const _ = 8;
1166
-
1167
- const D = 10;
1168
-
1169
- const M = 12;
1170
-
1171
- const I = 15;
1172
-
1173
- const B = ~I;
1174
-
1175
- const N = 16;
1176
-
1177
- const W = 32;
1178
-
1179
- const U = 64;
1180
-
1181
- const j = 128;
1182
-
1183
- const G = 256;
1184
-
1185
- const $ = 512;
1186
-
1187
- const H = U | j | $;
1188
-
1189
- const q = 1023;
1190
-
1191
- const V = t => t.isFile() ? _ : t.isDirectory() ? R : t.isSymbolicLink() ? D : t.isCharacterDevice() ? O : t.isBlockDevice() ? E : t.isSocket() ? M : t.isFIFO() ? P : C;
1192
-
1193
- const Z = new LRUCache({
1194
- max: 2 ** 12
1195
- });
1196
-
1197
- const K = t => {
1198
- const e = Z.get(t);
1199
- if (e) return e;
1200
- const i = t.normalize("NFKD");
1201
- Z.set(t, i);
1202
- return i;
1203
- };
1204
-
1205
- const X = new LRUCache({
1206
- max: 2 ** 12
1207
- });
1208
-
1209
- const Y = t => {
1210
- const e = X.get(t);
1211
- if (e) return e;
1212
- const i = K(t.toLowerCase());
1213
- X.set(t, i);
1214
- return i;
1215
- };
1216
-
1217
- class ResolveCache extends LRUCache {
1218
- constructor() {
1219
- super({
1220
- max: 256
1221
- });
1222
- }
1223
- }
1224
-
1225
- class ChildrenCache extends LRUCache {
1226
- constructor(t = 16 * 1024) {
1227
- super({
1228
- maxSize: t,
1229
- sizeCalculation: t => t.length + 1
1230
- });
1231
- }
1232
- }
1233
-
1234
- const J = Symbol("PathScurry setAsCwd");
1235
-
1236
- class PathBase {
1237
- name;
1238
- root;
1239
- roots;
1240
- parent;
1241
- nocase;
1242
- isCWD=false;
1243
- #q;
1244
- #V;
1245
- get dev() {
1246
- return this.#V;
1247
- }
1248
- #Z;
1249
- get mode() {
1250
- return this.#Z;
1251
- }
1252
- #K;
1253
- get nlink() {
1254
- return this.#K;
1255
- }
1256
- #X;
1257
- get uid() {
1258
- return this.#X;
1259
- }
1260
- #Y;
1261
- get gid() {
1262
- return this.#Y;
1263
- }
1264
- #J;
1265
- get rdev() {
1266
- return this.#J;
1267
- }
1268
- #Q;
1269
- get blksize() {
1270
- return this.#Q;
1271
- }
1272
- #tt;
1273
- get ino() {
1274
- return this.#tt;
1275
- }
1276
- #l;
1277
- get size() {
1278
- return this.#l;
1279
- }
1280
- #et;
1281
- get blocks() {
1282
- return this.#et;
1283
- }
1284
- #it;
1285
- get atimeMs() {
1286
- return this.#it;
1287
- }
1288
- #st;
1289
- get mtimeMs() {
1290
- return this.#st;
1291
- }
1292
- #nt;
1293
- get ctimeMs() {
1294
- return this.#nt;
1295
- }
1296
- #rt;
1297
- get birthtimeMs() {
1298
- return this.#rt;
1299
- }
1300
- #ht;
1301
- get atime() {
1302
- return this.#ht;
1303
- }
1304
- #at;
1305
- get mtime() {
1306
- return this.#at;
1307
- }
1308
- #ot;
1309
- get ctime() {
1310
- return this.#ot;
1311
- }
1312
- #lt;
1313
- get birthtime() {
1314
- return this.#lt;
1315
- }
1316
- #ct;
1317
- #dt;
1318
- #ft;
1319
- #ut;
1320
- #pt;
1321
- #yt;
1322
- #mt;
1323
- #gt;
1324
- #wt;
1325
- #St;
1326
- get parentPath() {
1327
- return (this.parent || this).fullpath();
1328
- }
1329
- get path() {
1330
- return this.parentPath;
1331
- }
1332
- constructor(t, e = C, i, s, n, r, h) {
1333
- this.name = t;
1334
- this.#ct = n ? Y(t) : K(t);
1335
- this.#mt = e & q;
1336
- this.nocase = n;
1337
- this.roots = s;
1338
- this.root = i || this;
1339
- this.#gt = r;
1340
- this.#ft = h.fullpath;
1341
- this.#pt = h.relative;
1342
- this.#yt = h.relativePosix;
1343
- this.parent = h.parent;
1344
- if (this.parent) {
1345
- this.#q = this.parent.#q;
1346
- } else {
1347
- this.#q = b(h.fs);
1348
- }
1349
- }
1350
- depth() {
1351
- if (this.#dt !== undefined) return this.#dt;
1352
- if (!this.parent) return this.#dt = 0;
1353
- return this.#dt = this.parent.depth() + 1;
1354
- }
1355
- childrenCache() {
1356
- return this.#gt;
1357
- }
1358
- resolve(t) {
1359
- if (!t) {
1360
- return this;
1361
- }
1362
- const e = this.getRootString(t);
1363
- const i = t.substring(e.length);
1364
- const s = i.split(this.splitSep);
1365
- const n = e ? this.getRoot(e).#vt(s) : this.#vt(s);
1366
- return n;
1367
- }
1368
- #vt(t) {
1369
- let e = this;
1370
- for (const i of t) {
1371
- e = e.child(i);
1372
- }
1373
- return e;
1374
- }
1375
- children() {
1376
- const t = this.#gt.get(this);
1377
- if (t) {
1378
- return t;
1379
- }
1380
- const e = Object.assign([], {
1381
- provisional: 0
1382
- });
1383
- this.#gt.set(this, e);
1384
- this.#mt &= ~N;
1385
- return e;
1386
- }
1387
- child(t, e) {
1388
- if (t === "" || t === ".") {
1389
- return this;
1390
- }
1391
- if (t === "..") {
1392
- return this.parent || this;
1393
- }
1394
- const i = this.children();
1395
- const s = this.nocase ? Y(t) : K(t);
1396
- for (const t of i) {
1397
- if (t.#ct === s) {
1398
- return t;
1399
- }
1400
- }
1401
- const n = this.parent ? this.sep : "";
1402
- const r = this.#ft ? this.#ft + n + t : undefined;
1403
- const h = this.newChild(t, C, {
1404
- ...e,
1405
- parent: this,
1406
- fullpath: r
1407
- });
1408
- if (!this.canReaddir()) {
1409
- h.#mt |= j;
1410
- }
1411
- i.push(h);
1412
- return h;
1413
- }
1414
- relative() {
1415
- if (this.isCWD) return "";
1416
- if (this.#pt !== undefined) {
1417
- return this.#pt;
1418
- }
1419
- const t = this.name;
1420
- const e = this.parent;
1421
- if (!e) {
1422
- return this.#pt = this.name;
1423
- }
1424
- const i = e.relative();
1425
- return i + (!i || !e.parent ? "" : this.sep) + t;
1426
- }
1427
- relativePosix() {
1428
- if (this.sep === "/") return this.relative();
1429
- if (this.isCWD) return "";
1430
- if (this.#yt !== undefined) return this.#yt;
1431
- const t = this.name;
1432
- const e = this.parent;
1433
- if (!e) {
1434
- return this.#yt = this.fullpathPosix();
1435
- }
1436
- const i = e.relativePosix();
1437
- return i + (!i || !e.parent ? "" : "/") + t;
1438
- }
1439
- fullpath() {
1440
- if (this.#ft !== undefined) {
1441
- return this.#ft;
1442
- }
1443
- const t = this.name;
1444
- const e = this.parent;
1445
- if (!e) {
1446
- return this.#ft = this.name;
1447
- }
1448
- const i = e.fullpath();
1449
- const s = i + (!e.parent ? "" : this.sep) + t;
1450
- return this.#ft = s;
1451
- }
1452
- fullpathPosix() {
1453
- if (this.#ut !== undefined) return this.#ut;
1454
- if (this.sep === "/") return this.#ut = this.fullpath();
1455
- if (!this.parent) {
1456
- const t = this.fullpath().replace(/\\/g, "/");
1457
- if (/^[a-z]:\//i.test(t)) {
1458
- return this.#ut = `//?/${t}`;
1459
- } else {
1460
- return this.#ut = t;
1461
- }
1462
- }
1463
- const t = this.parent;
1464
- const e = t.fullpathPosix();
1465
- const i = e + (!e || !t.parent ? "" : "/") + this.name;
1466
- return this.#ut = i;
1467
- }
1468
- isUnknown() {
1469
- return (this.#mt & I) === C;
1470
- }
1471
- isType(t) {
1472
- return this[`is${t}`]();
1473
- }
1474
- getType() {
1475
- return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
1476
- }
1477
- isFile() {
1478
- return (this.#mt & I) === _;
1479
- }
1480
- isDirectory() {
1481
- return (this.#mt & I) === R;
1482
- }
1483
- isCharacterDevice() {
1484
- return (this.#mt & I) === O;
1485
- }
1486
- isBlockDevice() {
1487
- return (this.#mt & I) === E;
1488
- }
1489
- isFIFO() {
1490
- return (this.#mt & I) === P;
1491
- }
1492
- isSocket() {
1493
- return (this.#mt & I) === M;
1494
- }
1495
- isSymbolicLink() {
1496
- return (this.#mt & D) === D;
1497
- }
1498
- lstatCached() {
1499
- return this.#mt & W ? this : undefined;
1500
- }
1501
- readlinkCached() {
1502
- return this.#wt;
1503
- }
1504
- realpathCached() {
1505
- return this.#St;
1506
- }
1507
- readdirCached() {
1508
- const t = this.children();
1509
- return t.slice(0, t.provisional);
1510
- }
1511
- canReadlink() {
1512
- if (this.#wt) return true;
1513
- if (!this.parent) return false;
1514
- const t = this.#mt & I;
1515
- return !(t !== C && t !== D || this.#mt & G || this.#mt & j);
1516
- }
1517
- calledReaddir() {
1518
- return !!(this.#mt & N);
1519
- }
1520
- isENOENT() {
1521
- return !!(this.#mt & j);
1522
- }
1523
- isNamed(t) {
1524
- return !this.nocase ? this.#ct === K(t) : this.#ct === Y(t);
1525
- }
1526
- async readlink() {
1527
- const t = this.#wt;
1528
- if (t) {
1529
- return t;
1530
- }
1531
- if (!this.canReadlink()) {
1532
- return undefined;
1533
- }
1534
- if (!this.parent) {
1535
- return undefined;
1536
- }
1537
- try {
1538
- const t = await this.#q.promises.readlink(this.fullpath());
1539
- const e = (await this.parent.realpath())?.resolve(t);
1540
- if (e) {
1541
- return this.#wt = e;
1542
- }
1543
- } catch (t) {
1544
- this.#kt(t.code);
1545
- return undefined;
1546
- }
1547
- }
1548
- readlinkSync() {
1549
- const t = this.#wt;
1550
- if (t) {
1551
- return t;
1552
- }
1553
- if (!this.canReadlink()) {
1554
- return undefined;
1555
- }
1556
- if (!this.parent) {
1557
- return undefined;
1558
- }
1559
- try {
1560
- const t = this.#q.readlinkSync(this.fullpath());
1561
- const e = this.parent.realpathSync()?.resolve(t);
1562
- if (e) {
1563
- return this.#wt = e;
1564
- }
1565
- } catch (t) {
1566
- this.#kt(t.code);
1567
- return undefined;
1568
- }
1569
- }
1570
- #Ft(t) {
1571
- this.#mt |= N;
1572
- for (let e = t.provisional; e < t.length; e++) {
1573
- const i = t[e];
1574
- if (i) i.#Tt();
1575
- }
1576
- }
1577
- #Tt() {
1578
- if (this.#mt & j) return;
1579
- this.#mt = (this.#mt | j) & B;
1580
- this.#xt();
1581
- }
1582
- #xt() {
1583
- const t = this.children();
1584
- t.provisional = 0;
1585
- for (const e of t) {
1586
- e.#Tt();
1587
- }
1588
- }
1589
- #bt() {
1590
- this.#mt |= $;
1591
- this.#zt();
1592
- }
1593
- #zt() {
1594
- if (this.#mt & U) return;
1595
- let t = this.#mt;
1596
- if ((t & I) === R) t &= B;
1597
- this.#mt = t | U;
1598
- this.#xt();
1599
- }
1600
- #Lt(t = "") {
1601
- if (t === "ENOTDIR" || t === "EPERM") {
1602
- this.#zt();
1603
- } else if (t === "ENOENT") {
1604
- this.#Tt();
1605
- } else {
1606
- this.children().provisional = 0;
1607
- }
1608
- }
1609
- #At(t = "") {
1610
- if (t === "ENOTDIR") {
1611
- const t = this.parent;
1612
- t.#zt();
1613
- } else if (t === "ENOENT") {
1614
- this.#Tt();
1615
- }
1616
- }
1617
- #kt(t = "") {
1618
- let e = this.#mt;
1619
- e |= G;
1620
- if (t === "ENOENT") e |= j;
1621
- if (t === "EINVAL" || t === "UNKNOWN") {
1622
- e &= B;
1623
- }
1624
- this.#mt = e;
1625
- if (t === "ENOTDIR" && this.parent) {
1626
- this.parent.#zt();
1627
- }
1628
- }
1629
- #Ct(t, e) {
1630
- return this.#Pt(t, e) || this.#Ot(t, e);
1631
- }
1632
- #Ot(t, e) {
1633
- const i = V(t);
1634
- const s = this.newChild(t.name, i, {
1635
- parent: this
1636
- });
1637
- const n = s.#mt & I;
1638
- if (n !== R && n !== D && n !== C) {
1639
- s.#mt |= U;
1640
- }
1641
- e.unshift(s);
1642
- e.provisional++;
1643
- return s;
1644
- }
1645
- #Pt(t, e) {
1646
- for (let i = e.provisional; i < e.length; i++) {
1647
- const s = e[i];
1648
- const n = this.nocase ? Y(t.name) : K(t.name);
1649
- if (n !== s.#ct) {
1650
- continue;
1651
- }
1652
- return this.#Rt(t, s, i, e);
1653
- }
1654
- }
1655
- #Rt(t, e, i, s) {
1656
- const n = e.name;
1657
- e.#mt = e.#mt & B | V(t);
1658
- if (n !== t.name) e.name = t.name;
1659
- if (i !== s.provisional) {
1660
- if (i === s.length - 1) s.pop(); else s.splice(i, 1);
1661
- s.unshift(e);
1662
- }
1663
- s.provisional++;
1664
- return e;
1665
- }
1666
- async lstat() {
1667
- if ((this.#mt & j) === 0) {
1668
- try {
1669
- this.#Et(await this.#q.promises.lstat(this.fullpath()));
1670
- return this;
1671
- } catch (t) {
1672
- this.#At(t.code);
1673
- }
1674
- }
1675
- }
1676
- lstatSync() {
1677
- if ((this.#mt & j) === 0) {
1678
- try {
1679
- this.#Et(this.#q.lstatSync(this.fullpath()));
1680
- return this;
1681
- } catch (t) {
1682
- this.#At(t.code);
1683
- }
1684
- }
1685
- }
1686
- #Et(t) {
1687
- const {atime: e, atimeMs: i, birthtime: s, birthtimeMs: n, blksize: r, blocks: h, ctime: a, ctimeMs: o, dev: l, gid: c, ino: d, mode: f, mtime: u, mtimeMs: p, nlink: y, rdev: m, size: g, uid: w} = t;
1688
- this.#ht = e;
1689
- this.#it = i;
1690
- this.#lt = s;
1691
- this.#rt = n;
1692
- this.#Q = r;
1693
- this.#et = h;
1694
- this.#ot = a;
1695
- this.#nt = o;
1696
- this.#V = l;
1697
- this.#Y = c;
1698
- this.#tt = d;
1699
- this.#Z = f;
1700
- this.#at = u;
1701
- this.#st = p;
1702
- this.#K = y;
1703
- this.#J = m;
1704
- this.#l = g;
1705
- this.#X = w;
1706
- const S = V(t);
1707
- this.#mt = this.#mt & B | S | W;
1708
- if (S !== C && S !== R && S !== D) {
1709
- this.#mt |= U;
1710
- }
1711
- }
1712
- #_t=[];
1713
- #Dt=false;
1714
- #Mt(t) {
1715
- this.#Dt = false;
1716
- const e = this.#_t.slice();
1717
- this.#_t.length = 0;
1718
- e.forEach(e => e(null, t));
1719
- }
1720
- readdirCB(t, e = false) {
1721
- if (!this.canReaddir()) {
1722
- if (e) t(null, []); else queueMicrotask(() => t(null, []));
1723
- return;
1724
- }
1725
- const i = this.children();
1726
- if (this.calledReaddir()) {
1727
- const s = i.slice(0, i.provisional);
1728
- if (e) t(null, s); else queueMicrotask(() => t(null, s));
1729
- return;
1730
- }
1731
- this.#_t.push(t);
1732
- if (this.#Dt) {
1733
- return;
1734
- }
1735
- this.#Dt = true;
1736
- const s = this.fullpath();
1737
- this.#q.readdir(s, {
1738
- withFileTypes: true
1739
- }, (t, e) => {
1740
- if (t) {
1741
- this.#Lt(t.code);
1742
- i.provisional = 0;
1743
- } else {
1744
- for (const t of e) {
1745
- this.#Ct(t, i);
1746
- }
1747
- this.#Ft(i);
1748
- }
1749
- this.#Mt(i.slice(0, i.provisional));
1750
- return;
1751
- });
1752
- }
1753
- #It;
1754
- async readdir() {
1755
- if (!this.canReaddir()) {
1756
- return [];
1757
- }
1758
- const t = this.children();
1759
- if (this.calledReaddir()) {
1760
- return t.slice(0, t.provisional);
1761
- }
1762
- const e = this.fullpath();
1763
- if (this.#It) {
1764
- await this.#It;
1765
- } else {
1766
- let i = () => {};
1767
- this.#It = new Promise(t => i = t);
1768
- try {
1769
- for (const i of await this.#q.promises.readdir(e, {
1770
- withFileTypes: true
1771
- })) {
1772
- this.#Ct(i, t);
1773
- }
1774
- this.#Ft(t);
1775
- } catch (e) {
1776
- this.#Lt(e.code);
1777
- t.provisional = 0;
1778
- }
1779
- this.#It = undefined;
1780
- i();
1781
- }
1782
- return t.slice(0, t.provisional);
1783
- }
1784
- readdirSync() {
1785
- if (!this.canReaddir()) {
1786
- return [];
1787
- }
1788
- const t = this.children();
1789
- if (this.calledReaddir()) {
1790
- return t.slice(0, t.provisional);
1791
- }
1792
- const e = this.fullpath();
1793
- try {
1794
- for (const i of this.#q.readdirSync(e, {
1795
- withFileTypes: true
1796
- })) {
1797
- this.#Ct(i, t);
1798
- }
1799
- this.#Ft(t);
1800
- } catch (e) {
1801
- this.#Lt(e.code);
1802
- t.provisional = 0;
1803
- }
1804
- return t.slice(0, t.provisional);
1805
- }
1806
- canReaddir() {
1807
- if (this.#mt & H) return false;
1808
- const t = I & this.#mt;
1809
- if (!(t === C || t === R || t === D)) {
1810
- return false;
1811
- }
1812
- return true;
1813
- }
1814
- shouldWalk(t, e) {
1815
- return (this.#mt & R) === R && !(this.#mt & H) && !t.has(this) && (!e || e(this));
1816
- }
1817
- async realpath() {
1818
- if (this.#St) return this.#St;
1819
- if (($ | G | j) & this.#mt) return undefined;
1820
- try {
1821
- const t = await this.#q.promises.realpath(this.fullpath());
1822
- return this.#St = this.resolve(t);
1823
- } catch (t) {
1824
- this.#bt();
1825
- }
1826
- }
1827
- realpathSync() {
1828
- if (this.#St) return this.#St;
1829
- if (($ | G | j) & this.#mt) return undefined;
1830
- try {
1831
- const t = this.#q.realpathSync(this.fullpath());
1832
- return this.#St = this.resolve(t);
1833
- } catch (t) {
1834
- this.#bt();
1835
- }
1836
- }
1837
- [J](t) {
1838
- if (t === this) return;
1839
- t.isCWD = false;
1840
- this.isCWD = true;
1841
- const e = new Set([]);
1842
- let i = [];
1843
- let s = this;
1844
- while (s && s.parent) {
1845
- e.add(s);
1846
- s.#pt = i.join(this.sep);
1847
- s.#yt = i.join("/");
1848
- s = s.parent;
1849
- i.push("..");
1850
- }
1851
- s = t;
1852
- while (s && s.parent && !e.has(s)) {
1853
- s.#pt = undefined;
1854
- s.#yt = undefined;
1855
- s = s.parent;
1856
- }
1857
- }
1858
- }
1859
-
1860
- class PathWin32 extends PathBase {
1861
- sep="\\";
1862
- splitSep=A;
1863
- constructor(t, e = C, i, s, n, r, h) {
1864
- super(t, e, i, s, n, r, h);
1865
- }
1866
- newChild(t, e = C, i = {}) {
1867
- return new PathWin32(t, e, this.root, this.roots, this.nocase, this.childrenCache(), i);
1868
- }
1869
- getRootString(e) {
1870
- return t.parse(e).root;
1871
- }
1872
- getRoot(t) {
1873
- t = L(t.toUpperCase());
1874
- if (t === this.root.name) {
1875
- return this.root;
1876
- }
1877
- for (const [e, i] of Object.entries(this.roots)) {
1878
- if (this.sameRoot(t, e)) {
1879
- return this.roots[t] = i;
1880
- }
1881
- }
1882
- return this.roots[t] = new PathScurryWin32(t, this).root;
1883
- }
1884
- sameRoot(t, e = this.root.name) {
1885
- t = t.toUpperCase().replace(/\//g, "\\").replace(z, "$1\\");
1886
- return t === e;
1887
- }
1888
- }
1889
-
1890
- class PathPosix extends PathBase {
1891
- splitSep="/";
1892
- sep="/";
1893
- constructor(t, e = C, i, s, n, r, h) {
1894
- super(t, e, i, s, n, r, h);
1895
- }
1896
- getRootString(t) {
1897
- return t.startsWith("/") ? "/" : "";
1898
- }
1899
- getRoot(t) {
1900
- return this.root;
1901
- }
1902
- newChild(t, e = C, i = {}) {
1903
- return new PathPosix(t, e, this.root, this.roots, this.nocase, this.childrenCache(), i);
1904
- }
1905
- }
1906
-
1907
- class PathScurryBase {
1908
- root;
1909
- rootPath;
1910
- roots;
1911
- cwd;
1912
- #Bt;
1913
- #Nt;
1914
- #gt;
1915
- nocase;
1916
- #q;
1917
- constructor(t = process.cwd(), e, s, {nocase: n, childrenCacheSize: r = 16 * 1024, fs: h = x} = {}) {
1918
- this.#q = b(h);
1919
- if (t instanceof URL || t.startsWith("file://")) {
1920
- t = i(t);
1921
- }
1922
- const a = e.resolve(t);
1923
- this.roots = Object.create(null);
1924
- this.rootPath = this.parseRootPath(a);
1925
- this.#Bt = new ResolveCache;
1926
- this.#Nt = new ResolveCache;
1927
- this.#gt = new ChildrenCache(r);
1928
- const o = a.substring(this.rootPath.length).split(s);
1929
- if (o.length === 1 && !o[0]) {
1930
- o.pop();
1931
- }
1932
- if (n === undefined) {
1933
- throw new TypeError("must provide nocase setting to PathScurryBase ctor");
1934
- }
1935
- this.nocase = n;
1936
- this.root = this.newRoot(this.#q);
1937
- this.roots[this.rootPath] = this.root;
1938
- let l = this.root;
1939
- let c = o.length - 1;
1940
- const d = e.sep;
1941
- let f = this.rootPath;
1942
- let u = false;
1943
- for (const t of o) {
1944
- const e = c--;
1945
- l = l.child(t, {
1946
- relative: new Array(e).fill("..").join(d),
1947
- relativePosix: new Array(e).fill("..").join("/"),
1948
- fullpath: f += (u ? "" : d) + t
1949
- });
1950
- u = true;
1951
- }
1952
- this.cwd = l;
1953
- }
1954
- depth(t = this.cwd) {
1955
- if (typeof t === "string") {
1956
- t = this.cwd.resolve(t);
1957
- }
1958
- return t.depth();
1959
- }
1960
- childrenCache() {
1961
- return this.#gt;
1962
- }
1963
- resolve(...t) {
1964
- let e = "";
1965
- for (let i = t.length - 1; i >= 0; i--) {
1966
- const s = t[i];
1967
- if (!s || s === ".") continue;
1968
- e = e ? `${s}/${e}` : s;
1969
- if (this.isAbsolute(s)) {
1970
- break;
1971
- }
1972
- }
1973
- const i = this.#Bt.get(e);
1974
- if (i !== undefined) {
1975
- return i;
1976
- }
1977
- const s = this.cwd.resolve(e).fullpath();
1978
- this.#Bt.set(e, s);
1979
- return s;
1980
- }
1981
- resolvePosix(...t) {
1982
- let e = "";
1983
- for (let i = t.length - 1; i >= 0; i--) {
1984
- const s = t[i];
1985
- if (!s || s === ".") continue;
1986
- e = e ? `${s}/${e}` : s;
1987
- if (this.isAbsolute(s)) {
1988
- break;
1989
- }
1990
- }
1991
- const i = this.#Nt.get(e);
1992
- if (i !== undefined) {
1993
- return i;
1994
- }
1995
- const s = this.cwd.resolve(e).fullpathPosix();
1996
- this.#Nt.set(e, s);
1997
- return s;
1998
- }
1999
- relative(t = this.cwd) {
2000
- if (typeof t === "string") {
2001
- t = this.cwd.resolve(t);
2002
- }
2003
- return t.relative();
2004
- }
2005
- relativePosix(t = this.cwd) {
2006
- if (typeof t === "string") {
2007
- t = this.cwd.resolve(t);
2008
- }
2009
- return t.relativePosix();
2010
- }
2011
- basename(t = this.cwd) {
2012
- if (typeof t === "string") {
2013
- t = this.cwd.resolve(t);
2014
- }
2015
- return t.name;
2016
- }
2017
- dirname(t = this.cwd) {
2018
- if (typeof t === "string") {
2019
- t = this.cwd.resolve(t);
2020
- }
2021
- return (t.parent || t).fullpath();
2022
- }
2023
- async readdir(t = this.cwd, e = {
2024
- withFileTypes: true
2025
- }) {
2026
- if (typeof t === "string") {
2027
- t = this.cwd.resolve(t);
2028
- } else if (!(t instanceof PathBase)) {
2029
- e = t;
2030
- t = this.cwd;
2031
- }
2032
- const {withFileTypes: i} = e;
2033
- if (!t.canReaddir()) {
2034
- return [];
2035
- } else {
2036
- const e = await t.readdir();
2037
- return i ? e : e.map(t => t.name);
2038
- }
2039
- }
2040
- readdirSync(t = this.cwd, e = {
2041
- withFileTypes: true
2042
- }) {
2043
- if (typeof t === "string") {
2044
- t = this.cwd.resolve(t);
2045
- } else if (!(t instanceof PathBase)) {
2046
- e = t;
2047
- t = this.cwd;
2048
- }
2049
- const {withFileTypes: i = true} = e;
2050
- if (!t.canReaddir()) {
2051
- return [];
2052
- } else if (i) {
2053
- return t.readdirSync();
2054
- } else {
2055
- return t.readdirSync().map(t => t.name);
2056
- }
2057
- }
2058
- async lstat(t = this.cwd) {
2059
- if (typeof t === "string") {
2060
- t = this.cwd.resolve(t);
2061
- }
2062
- return t.lstat();
2063
- }
2064
- lstatSync(t = this.cwd) {
2065
- if (typeof t === "string") {
2066
- t = this.cwd.resolve(t);
2067
- }
2068
- return t.lstatSync();
2069
- }
2070
- async readlink(t = this.cwd, {withFileTypes: e} = {
2071
- withFileTypes: false
2072
- }) {
2073
- if (typeof t === "string") {
2074
- t = this.cwd.resolve(t);
2075
- } else if (!(t instanceof PathBase)) {
2076
- e = t.withFileTypes;
2077
- t = this.cwd;
2078
- }
2079
- const i = await t.readlink();
2080
- return e ? i : i?.fullpath();
2081
- }
2082
- readlinkSync(t = this.cwd, {withFileTypes: e} = {
2083
- withFileTypes: false
2084
- }) {
2085
- if (typeof t === "string") {
2086
- t = this.cwd.resolve(t);
2087
- } else if (!(t instanceof PathBase)) {
2088
- e = t.withFileTypes;
2089
- t = this.cwd;
2090
- }
2091
- const i = t.readlinkSync();
2092
- return e ? i : i?.fullpath();
2093
- }
2094
- async realpath(t = this.cwd, {withFileTypes: e} = {
2095
- withFileTypes: false
2096
- }) {
2097
- if (typeof t === "string") {
2098
- t = this.cwd.resolve(t);
2099
- } else if (!(t instanceof PathBase)) {
2100
- e = t.withFileTypes;
2101
- t = this.cwd;
2102
- }
2103
- const i = await t.realpath();
2104
- return e ? i : i?.fullpath();
2105
- }
2106
- realpathSync(t = this.cwd, {withFileTypes: e} = {
2107
- withFileTypes: false
2108
- }) {
2109
- if (typeof t === "string") {
2110
- t = this.cwd.resolve(t);
2111
- } else if (!(t instanceof PathBase)) {
2112
- e = t.withFileTypes;
2113
- t = this.cwd;
2114
- }
2115
- const i = t.realpathSync();
2116
- return e ? i : i?.fullpath();
2117
- }
2118
- async walk(t = this.cwd, e = {}) {
2119
- if (typeof t === "string") {
2120
- t = this.cwd.resolve(t);
2121
- } else if (!(t instanceof PathBase)) {
2122
- e = t;
2123
- t = this.cwd;
2124
- }
2125
- const {withFileTypes: i = true, follow: s = false, filter: n, walkFilter: r} = e;
2126
- const h = [];
2127
- if (!n || n(t)) {
2128
- h.push(i ? t : t.fullpath());
2129
- }
2130
- const a = new Set;
2131
- const o = (t, e) => {
2132
- a.add(t);
2133
- t.readdirCB((t, l) => {
2134
- if (t) {
2135
- return e(t);
2136
- }
2137
- let c = l.length;
2138
- if (!c) return e();
2139
- const d = () => {
2140
- if (--c === 0) {
2141
- e();
2142
- }
2143
- };
2144
- for (const t of l) {
2145
- if (!n || n(t)) {
2146
- h.push(i ? t : t.fullpath());
2147
- }
2148
- if (s && t.isSymbolicLink()) {
2149
- t.realpath().then(t => t?.isUnknown() ? t.lstat() : t).then(t => t?.shouldWalk(a, r) ? o(t, d) : d());
2150
- } else {
2151
- if (t.shouldWalk(a, r)) {
2152
- o(t, d);
2153
- } else {
2154
- d();
2155
- }
2156
- }
2157
- }
2158
- }, true);
2159
- };
2160
- const l = t;
2161
- return new Promise((t, e) => {
2162
- o(l, i => {
2163
- if (i) return e(i);
2164
- t(h);
2165
- });
2166
- });
2167
- }
2168
- walkSync(t = this.cwd, e = {}) {
2169
- if (typeof t === "string") {
2170
- t = this.cwd.resolve(t);
2171
- } else if (!(t instanceof PathBase)) {
2172
- e = t;
2173
- t = this.cwd;
2174
- }
2175
- const {withFileTypes: i = true, follow: s = false, filter: n, walkFilter: r} = e;
2176
- const h = [];
2177
- if (!n || n(t)) {
2178
- h.push(i ? t : t.fullpath());
2179
- }
2180
- const a = new Set([ t ]);
2181
- for (const t of a) {
2182
- const e = t.readdirSync();
2183
- for (const t of e) {
2184
- if (!n || n(t)) {
2185
- h.push(i ? t : t.fullpath());
2186
- }
2187
- let e = t;
2188
- if (t.isSymbolicLink()) {
2189
- if (!(s && (e = t.realpathSync()))) continue;
2190
- if (e.isUnknown()) e.lstatSync();
2191
- }
2192
- if (e.shouldWalk(a, r)) {
2193
- a.add(e);
2194
- }
2195
- }
2196
- }
2197
- return h;
2198
- }
2199
- [Symbol.asyncIterator]() {
2200
- return this.iterate();
2201
- }
2202
- iterate(t = this.cwd, e = {}) {
2203
- if (typeof t === "string") {
2204
- t = this.cwd.resolve(t);
2205
- } else if (!(t instanceof PathBase)) {
2206
- e = t;
2207
- t = this.cwd;
2208
- }
2209
- return this.stream(t, e)[Symbol.asyncIterator]();
2210
- }
2211
- [Symbol.iterator]() {
2212
- return this.iterateSync();
2213
- }
2214
- * iterateSync(t = this.cwd, e = {}) {
2215
- if (typeof t === "string") {
2216
- t = this.cwd.resolve(t);
2217
- } else if (!(t instanceof PathBase)) {
2218
- e = t;
2219
- t = this.cwd;
2220
- }
2221
- const {withFileTypes: i = true, follow: s = false, filter: n, walkFilter: r} = e;
2222
- if (!n || n(t)) {
2223
- yield i ? t : t.fullpath();
2224
- }
2225
- const h = new Set([ t ]);
2226
- for (const t of h) {
2227
- const e = t.readdirSync();
2228
- for (const t of e) {
2229
- if (!n || n(t)) {
2230
- yield i ? t : t.fullpath();
2231
- }
2232
- let e = t;
2233
- if (t.isSymbolicLink()) {
2234
- if (!(s && (e = t.realpathSync()))) continue;
2235
- if (e.isUnknown()) e.lstatSync();
2236
- }
2237
- if (e.shouldWalk(h, r)) {
2238
- h.add(e);
2239
- }
2240
- }
2241
- }
2242
- }
2243
- stream(t = this.cwd, e = {}) {
2244
- if (typeof t === "string") {
2245
- t = this.cwd.resolve(t);
2246
- } else if (!(t instanceof PathBase)) {
2247
- e = t;
2248
- t = this.cwd;
2249
- }
2250
- const {withFileTypes: i = true, follow: s = false, filter: n, walkFilter: r} = e;
2251
- const h = new u({
2252
- objectMode: true
2253
- });
2254
- if (!n || n(t)) {
2255
- h.write(i ? t : t.fullpath());
2256
- }
2257
- const a = new Set;
2258
- const o = [ t ];
2259
- let l = 0;
2260
- const c = () => {
2261
- let t = false;
2262
- while (!t) {
2263
- const e = o.shift();
2264
- if (!e) {
2265
- if (l === 0) h.end();
2266
- return;
2267
- }
2268
- l++;
2269
- a.add(e);
2270
- const d = (e, u, p = false) => {
2271
- if (e) return h.emit("error", e);
2272
- if (s && !p) {
2273
- const t = [];
2274
- for (const e of u) {
2275
- if (e.isSymbolicLink()) {
2276
- t.push(e.realpath().then(t => t?.isUnknown() ? t.lstat() : t));
2277
- }
2278
- }
2279
- if (t.length) {
2280
- Promise.all(t).then(() => d(null, u, true));
2281
- return;
2282
- }
2283
- }
2284
- for (const e of u) {
2285
- if (e && (!n || n(e))) {
2286
- if (!h.write(i ? e : e.fullpath())) {
2287
- t = true;
2288
- }
2289
- }
2290
- }
2291
- l--;
2292
- for (const t of u) {
2293
- const e = t.realpathCached() || t;
2294
- if (e.shouldWalk(a, r)) {
2295
- o.push(e);
2296
- }
2297
- }
2298
- if (t && !h.flowing) {
2299
- h.once("drain", c);
2300
- } else if (!f) {
2301
- c();
2302
- }
2303
- };
2304
- let f = true;
2305
- e.readdirCB(d, true);
2306
- f = false;
2307
- }
2308
- };
2309
- c();
2310
- return h;
2311
- }
2312
- streamSync(t = this.cwd, e = {}) {
2313
- if (typeof t === "string") {
2314
- t = this.cwd.resolve(t);
2315
- } else if (!(t instanceof PathBase)) {
2316
- e = t;
2317
- t = this.cwd;
2318
- }
2319
- const {withFileTypes: i = true, follow: s = false, filter: n, walkFilter: r} = e;
2320
- const h = new u({
2321
- objectMode: true
2322
- });
2323
- const a = new Set;
2324
- if (!n || n(t)) {
2325
- h.write(i ? t : t.fullpath());
2326
- }
2327
- const o = [ t ];
2328
- let l = 0;
2329
- const c = () => {
2330
- let t = false;
2331
- while (!t) {
2332
- const e = o.shift();
2333
- if (!e) {
2334
- if (l === 0) h.end();
2335
- return;
2336
- }
2337
- l++;
2338
- a.add(e);
2339
- const c = e.readdirSync();
2340
- for (const e of c) {
2341
- if (!n || n(e)) {
2342
- if (!h.write(i ? e : e.fullpath())) {
2343
- t = true;
2344
- }
2345
- }
2346
- }
2347
- l--;
2348
- for (const t of c) {
2349
- let e = t;
2350
- if (t.isSymbolicLink()) {
2351
- if (!(s && (e = t.realpathSync()))) continue;
2352
- if (e.isUnknown()) e.lstatSync();
2353
- }
2354
- if (e.shouldWalk(a, r)) {
2355
- o.push(e);
2356
- }
2357
- }
2358
- }
2359
- if (t && !h.flowing) h.once("drain", c);
2360
- };
2361
- c();
2362
- return h;
2363
- }
2364
- chdir(t = this.cwd) {
2365
- const e = this.cwd;
2366
- this.cwd = typeof t === "string" ? this.cwd.resolve(t) : t;
2367
- this.cwd[J](e);
2368
- }
2369
- }
2370
-
2371
- class PathScurryWin32 extends PathScurryBase {
2372
- sep="\\";
2373
- constructor(e = process.cwd(), i = {}) {
2374
- const {nocase: s = true} = i;
2375
- super(e, t, "\\", {
2376
- ...i,
2377
- nocase: s
2378
- });
2379
- this.nocase = s;
2380
- for (let t = this.cwd; t; t = t.parent) {
2381
- t.nocase = this.nocase;
2382
- }
2383
- }
2384
- parseRootPath(e) {
2385
- return t.parse(e).root.toUpperCase();
2386
- }
2387
- newRoot(t) {
2388
- return new PathWin32(this.rootPath, R, undefined, this.roots, this.nocase, this.childrenCache(), {
2389
- fs: t
2390
- });
2391
- }
2392
- isAbsolute(t) {
2393
- return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
2394
- }
2395
- }
2396
-
2397
- class PathScurryPosix extends PathScurryBase {
2398
- sep="/";
2399
- constructor(t = process.cwd(), i = {}) {
2400
- const {nocase: s = false} = i;
2401
- super(t, e, "/", {
2402
- ...i,
2403
- nocase: s
2404
- });
2405
- this.nocase = s;
2406
- }
2407
- parseRootPath(t) {
2408
- return "/";
2409
- }
2410
- newRoot(t) {
2411
- return new PathPosix(this.rootPath, R, undefined, this.roots, this.nocase, this.childrenCache(), {
2412
- fs: t
2413
- });
2414
- }
2415
- isAbsolute(t) {
2416
- return t.startsWith("/");
2417
- }
2418
- }
2419
-
2420
- class PathScurryDarwin extends PathScurryPosix {
2421
- constructor(t = process.cwd(), e = {}) {
2422
- const {nocase: i = true} = e;
2423
- super(t, {
2424
- ...e,
2425
- nocase: i
2426
- });
2427
- }
2428
- }
2429
-
2430
- process.platform === "win32" ? PathWin32 : PathPosix;
2431
-
2432
- const Q = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
2433
-
2434
- export { PathScurryWin32 as P, PathScurryDarwin as a, PathScurryPosix as b, Q as c };