@zintrust/core 0.1.40 → 0.1.42

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 (590) hide show
  1. package/bin/zintrust-main.d.ts.map +1 -1
  2. package/bin/zintrust-main.js +22 -1
  3. package/package.json +24 -4
  4. package/public/error-pages/404.html +2 -2
  5. package/src/auth/Auth.js +1 -1
  6. package/src/boot/Application.d.ts +1 -16
  7. package/src/boot/Application.d.ts.map +1 -1
  8. package/src/boot/Application.js +2 -290
  9. package/src/boot/Server.d.ts +1 -1
  10. package/src/boot/Server.d.ts.map +1 -1
  11. package/src/boot/bootstrap.js +50 -16
  12. package/src/boot/registry/registerRoute.d.ts +6 -0
  13. package/src/boot/registry/registerRoute.d.ts.map +1 -0
  14. package/src/boot/registry/registerRoute.js +96 -0
  15. package/src/boot/registry/runtime.d.ts +15 -0
  16. package/src/boot/registry/runtime.d.ts.map +1 -0
  17. package/src/boot/registry/runtime.js +364 -0
  18. package/src/boot/registry/type.d.ts +25 -0
  19. package/src/boot/registry/type.d.ts.map +1 -0
  20. package/src/boot/registry/type.js +1 -0
  21. package/src/boot/registry/worker.d.ts +6 -0
  22. package/src/boot/registry/worker.d.ts.map +1 -0
  23. package/src/boot/registry/worker.js +35 -0
  24. package/src/cache/drivers/KVRemoteDriver.d.ts.map +1 -1
  25. package/src/cache/drivers/KVRemoteDriver.js +14 -1
  26. package/src/cli/CLI.d.ts.map +1 -1
  27. package/src/cli/CLI.js +94 -34
  28. package/src/cli/ErrorHandler.js +1 -1
  29. package/src/cli/commands/ConfigCommand.d.ts.map +1 -1
  30. package/src/cli/commands/ConfigCommand.js +3 -5
  31. package/src/cli/commands/ContainerProxiesCommand.d.ts +5 -0
  32. package/src/cli/commands/ContainerProxiesCommand.d.ts.map +1 -0
  33. package/src/cli/commands/ContainerProxiesCommand.js +77 -0
  34. package/src/cli/commands/ContainerWorkersCommand.d.ts +5 -0
  35. package/src/cli/commands/ContainerWorkersCommand.d.ts.map +1 -0
  36. package/src/cli/commands/ContainerWorkersCommand.js +57 -0
  37. package/src/cli/commands/D1LearnCommand.d.ts +9 -0
  38. package/src/cli/commands/D1LearnCommand.d.ts.map +1 -0
  39. package/src/cli/commands/D1LearnCommand.js +143 -0
  40. package/src/cli/commands/D1MigrateCommand.d.ts.map +1 -1
  41. package/src/cli/commands/D1MigrateCommand.js +55 -16
  42. package/src/cli/commands/DeployCommand.d.ts +16 -0
  43. package/src/cli/commands/DeployCommand.d.ts.map +1 -0
  44. package/src/cli/commands/DeployCommand.js +110 -0
  45. package/src/cli/commands/DeployContainerProxiesCommand.d.ts +5 -0
  46. package/src/cli/commands/DeployContainerProxiesCommand.d.ts.map +1 -0
  47. package/src/cli/commands/DeployContainerProxiesCommand.js +27 -0
  48. package/src/cli/commands/DeployContainerWorkersCommand.d.ts +5 -0
  49. package/src/cli/commands/DeployContainerWorkersCommand.d.ts.map +1 -0
  50. package/src/cli/commands/DeployContainerWorkersCommand.js +27 -0
  51. package/src/cli/commands/DockerComposeCommandUtils.d.ts +3 -0
  52. package/src/cli/commands/DockerComposeCommandUtils.d.ts.map +1 -0
  53. package/src/cli/commands/DockerComposeCommandUtils.js +34 -0
  54. package/src/cli/commands/DoctorArchitectureCommand.d.ts +5 -0
  55. package/src/cli/commands/DoctorArchitectureCommand.d.ts.map +1 -0
  56. package/src/cli/commands/DoctorArchitectureCommand.js +54 -0
  57. package/src/cli/commands/InitContainerCommand.d.ts +5 -0
  58. package/src/cli/commands/InitContainerCommand.d.ts.map +1 -0
  59. package/src/cli/commands/InitContainerCommand.js +231 -0
  60. package/src/cli/commands/InitEcosystemCommand.d.ts +6 -0
  61. package/src/cli/commands/InitEcosystemCommand.d.ts.map +1 -0
  62. package/src/cli/commands/InitEcosystemCommand.js +51 -0
  63. package/src/cli/commands/InitProducerCommand.d.ts +5 -0
  64. package/src/cli/commands/InitProducerCommand.d.ts.map +1 -0
  65. package/src/cli/commands/InitProducerCommand.js +47 -0
  66. package/src/cli/commands/InitProxyCommand.d.ts +5 -0
  67. package/src/cli/commands/InitProxyCommand.d.ts.map +1 -0
  68. package/src/cli/commands/InitProxyCommand.js +442 -0
  69. package/src/cli/commands/MigrateCommand.d.ts.map +1 -1
  70. package/src/cli/commands/MigrateCommand.js +78 -36
  71. package/src/cli/commands/MigrateWorkerCommand.d.ts.map +1 -1
  72. package/src/cli/commands/MigrateWorkerCommand.js +36 -2
  73. package/src/cli/commands/MongoDBProxyCommand.d.ts +5 -0
  74. package/src/cli/commands/MongoDBProxyCommand.d.ts.map +1 -0
  75. package/src/cli/commands/MongoDBProxyCommand.js +98 -0
  76. package/src/cli/commands/MySqlProxyCommand.d.ts +6 -0
  77. package/src/cli/commands/MySqlProxyCommand.d.ts.map +1 -0
  78. package/src/cli/commands/MySqlProxyCommand.js +32 -0
  79. package/src/cli/commands/PostgresProxyCommand.d.ts +6 -0
  80. package/src/cli/commands/PostgresProxyCommand.d.ts.map +1 -0
  81. package/src/cli/commands/PostgresProxyCommand.js +32 -0
  82. package/src/cli/commands/ProxyCommand.d.ts +12 -0
  83. package/src/cli/commands/ProxyCommand.d.ts.map +1 -0
  84. package/src/cli/commands/ProxyCommand.js +80 -0
  85. package/src/cli/commands/ProxyCommandUtils.d.ts +6 -0
  86. package/src/cli/commands/ProxyCommandUtils.d.ts.map +1 -0
  87. package/src/cli/commands/ProxyCommandUtils.js +38 -0
  88. package/src/cli/commands/PutCommand.d.ts +6 -0
  89. package/src/cli/commands/PutCommand.d.ts.map +1 -0
  90. package/src/cli/commands/PutCommand.js +173 -0
  91. package/src/cli/commands/QueueRecoveryCommand.d.ts +6 -0
  92. package/src/cli/commands/QueueRecoveryCommand.d.ts.map +1 -0
  93. package/src/cli/commands/QueueRecoveryCommand.js +612 -0
  94. package/src/cli/commands/RedisProxyCommand.d.ts +6 -0
  95. package/src/cli/commands/RedisProxyCommand.d.ts.map +1 -0
  96. package/src/cli/commands/RedisProxyCommand.js +53 -0
  97. package/src/cli/commands/ScheduleListCommand.d.ts +6 -0
  98. package/src/cli/commands/ScheduleListCommand.d.ts.map +1 -0
  99. package/src/cli/commands/ScheduleListCommand.js +62 -0
  100. package/src/cli/commands/ScheduleRunCommand.d.ts +6 -0
  101. package/src/cli/commands/ScheduleRunCommand.d.ts.map +1 -0
  102. package/src/cli/commands/ScheduleRunCommand.js +32 -0
  103. package/src/cli/commands/ScheduleStartCommand.d.ts +6 -0
  104. package/src/cli/commands/ScheduleStartCommand.d.ts.map +1 -0
  105. package/src/cli/commands/ScheduleStartCommand.js +40 -0
  106. package/src/cli/commands/SecretsCommand.d.ts.map +1 -1
  107. package/src/cli/commands/SecretsCommand.js +2 -2
  108. package/src/cli/commands/SmtpProxyCommand.d.ts +6 -0
  109. package/src/cli/commands/SmtpProxyCommand.d.ts.map +1 -0
  110. package/src/cli/commands/SmtpProxyCommand.js +56 -0
  111. package/src/cli/commands/SqlProxyCommandUtils.d.ts +46 -0
  112. package/src/cli/commands/SqlProxyCommandUtils.d.ts.map +1 -0
  113. package/src/cli/commands/SqlProxyCommandUtils.js +48 -0
  114. package/src/cli/commands/SqlServerProxyCommand.d.ts +5 -0
  115. package/src/cli/commands/SqlServerProxyCommand.d.ts.map +1 -0
  116. package/src/cli/commands/SqlServerProxyCommand.js +85 -0
  117. package/src/cli/commands/StartCommand.d.ts.map +1 -1
  118. package/src/cli/commands/StartCommand.js +132 -17
  119. package/src/cli/commands/WorkerCommands.d.ts +1 -0
  120. package/src/cli/commands/WorkerCommands.d.ts.map +1 -1
  121. package/src/cli/commands/WorkerCommands.js +140 -6
  122. package/src/cli/commands/index.d.ts +2 -0
  123. package/src/cli/commands/index.d.ts.map +1 -1
  124. package/src/cli/commands/index.js +2 -0
  125. package/src/cli/commands/runner/index.d.ts +2 -2
  126. package/src/cli/commands/runner/index.d.ts.map +1 -1
  127. package/src/cli/commands/runner/index.js +15 -4
  128. package/src/cli/commands/schedule/ScheduleCliSupport.d.ts +6 -0
  129. package/src/cli/commands/schedule/ScheduleCliSupport.d.ts.map +1 -0
  130. package/src/cli/commands/schedule/ScheduleCliSupport.js +55 -0
  131. package/src/cli/config/ConfigManager.d.ts.map +1 -1
  132. package/src/cli/config/ConfigManager.js +8 -1
  133. package/src/cli/d1/D1SqlMigrations.d.ts.map +1 -1
  134. package/src/cli/d1/D1SqlMigrations.js +14 -1
  135. package/src/cli/d1/WranglerConfig.d.ts.map +1 -1
  136. package/src/cli/d1/WranglerConfig.js +34 -2
  137. package/src/cli/index.d.ts +4 -0
  138. package/src/cli/index.d.ts.map +1 -1
  139. package/src/cli/index.js +4 -0
  140. package/src/cli/scaffolding/ProjectScaffolder.d.ts.map +1 -1
  141. package/src/cli/scaffolding/ProjectScaffolder.js +2 -0
  142. package/src/cli/scaffolding/ServiceScaffolder.d.ts.map +1 -1
  143. package/src/cli/scaffolding/ServiceScaffolder.js +1 -0
  144. package/src/cli/services/VersionChecker.d.ts.map +1 -1
  145. package/src/cli/services/VersionChecker.js +5 -1
  146. package/src/cli/utils/DatabaseCliUtils.d.ts.map +1 -1
  147. package/src/cli/utils/DatabaseCliUtils.js +6 -1
  148. package/src/cli/utils/EnvFileLoader.d.ts.map +1 -1
  149. package/src/cli/utils/EnvFileLoader.js +35 -15
  150. package/src/cli/workers/QueueWorkRunner.js +1 -1
  151. package/src/cli.d.ts +5 -0
  152. package/src/cli.d.ts.map +1 -0
  153. package/src/cli.js +4 -0
  154. package/src/collections/index.d.ts +2 -2
  155. package/src/collections/index.d.ts.map +1 -1
  156. package/src/collections/index.js +1 -1
  157. package/src/common/HealthRoutes.d.ts.map +1 -1
  158. package/src/common/HealthRoutes.js +50 -2
  159. package/src/common/RemoteSignedJson.d.ts +1 -0
  160. package/src/common/RemoteSignedJson.d.ts.map +1 -1
  161. package/src/common/RemoteSignedJson.js +81 -29
  162. package/src/common/index.d.ts +1 -0
  163. package/src/common/index.d.ts.map +1 -1
  164. package/src/common/index.js +12 -1
  165. package/src/common/utility.d.ts.map +1 -1
  166. package/src/common/utility.js +2 -6
  167. package/src/config/FileLogWriter.d.ts.map +1 -1
  168. package/src/config/FileLogWriter.js +21 -6
  169. package/src/config/app.d.ts +4 -0
  170. package/src/config/app.d.ts.map +1 -1
  171. package/src/config/app.js +4 -0
  172. package/src/config/cache.d.ts.map +1 -1
  173. package/src/config/cache.js +22 -2
  174. package/src/config/cloudflare.d.ts +5 -1
  175. package/src/config/cloudflare.d.ts.map +1 -1
  176. package/src/config/cloudflare.js +67 -8
  177. package/src/config/database.d.ts.map +1 -1
  178. package/src/config/database.js +48 -13
  179. package/src/config/env.d.ts +87 -2
  180. package/src/config/env.d.ts.map +1 -1
  181. package/src/config/env.js +158 -19
  182. package/src/config/index.d.ts +1 -0
  183. package/src/config/index.d.ts.map +1 -1
  184. package/src/config/mail.d.ts.map +1 -1
  185. package/src/config/mail.js +16 -10
  186. package/src/config/middleware.d.ts +5 -0
  187. package/src/config/middleware.d.ts.map +1 -1
  188. package/src/config/middleware.js +19 -1
  189. package/src/config/queue.d.ts.map +1 -1
  190. package/src/config/queue.js +70 -9
  191. package/src/config/redis.d.ts.map +1 -1
  192. package/src/config/redis.js +48 -13
  193. package/src/config/storage.d.ts.map +1 -1
  194. package/src/config/storage.js +1 -0
  195. package/src/config/type.d.ts +18 -0
  196. package/src/config/type.d.ts.map +1 -1
  197. package/src/config/workers.d.ts.map +1 -1
  198. package/src/config/workers.js +122 -16
  199. package/src/functions/cloudflare.d.ts.map +1 -1
  200. package/src/functions/cloudflare.js +55 -1
  201. package/src/health/StartupHealthChecks.js +1 -1
  202. package/src/helper/index.d.ts +225 -0
  203. package/src/helper/index.d.ts.map +1 -0
  204. package/src/helper/index.js +347 -0
  205. package/src/http/FileUpload.d.ts +3 -2
  206. package/src/http/FileUpload.d.ts.map +1 -1
  207. package/src/http/Kernel.d.ts.map +1 -1
  208. package/src/http/Kernel.js +2 -1
  209. package/src/http/error-pages/ErrorPageRenderer.d.ts +4 -0
  210. package/src/http/error-pages/ErrorPageRenderer.d.ts.map +1 -1
  211. package/src/http/error-pages/ErrorPageRenderer.js +141 -1
  212. package/src/http/middleware/BodyParsingMiddleware.d.ts.map +1 -1
  213. package/src/http/middleware/BodyParsingMiddleware.js +33 -6
  214. package/src/index.d.ts +26 -57
  215. package/src/index.d.ts.map +1 -1
  216. package/src/index.js +32 -18
  217. package/src/microservices/ServiceAuthMiddleware.d.ts.map +1 -1
  218. package/src/microservices/ServiceAuthMiddleware.js +12 -4
  219. package/src/middleware/CsrfMiddleware.d.ts.map +1 -1
  220. package/src/middleware/CsrfMiddleware.js +30 -16
  221. package/src/middleware/ErrorHandlerMiddleware.d.ts.map +1 -1
  222. package/src/middleware/ErrorHandlerMiddleware.js +2 -1
  223. package/src/migrations/MigrationDiscovery.d.ts.map +1 -1
  224. package/src/migrations/MigrationDiscovery.js +2 -1
  225. package/src/migrations/MigrationLoader.js +1 -1
  226. package/src/migrations/schema/SchemaCompiler.d.ts.map +1 -1
  227. package/src/migrations/schema/SchemaCompiler.js +6 -3
  228. package/src/node-singletons/crypto.d.ts +1 -1
  229. package/src/node-singletons/crypto.d.ts.map +1 -1
  230. package/src/node-singletons/crypto.js +1 -1
  231. package/src/node-singletons/fs.d.ts +1 -1
  232. package/src/node-singletons/fs.d.ts.map +1 -1
  233. package/src/node-singletons/path.d.ts +1 -1
  234. package/src/node-singletons/path.d.ts.map +1 -1
  235. package/src/node-singletons/path.js +1 -1
  236. package/src/node-singletons/stream.d.ts +11 -0
  237. package/src/node-singletons/stream.d.ts.map +1 -0
  238. package/src/node-singletons/stream.js +8 -0
  239. package/src/observability/OpenTelemetry.d.ts +7 -0
  240. package/src/observability/OpenTelemetry.d.ts.map +1 -1
  241. package/src/observability/OpenTelemetry.js +49 -2
  242. package/src/orm/Database.d.ts +4 -0
  243. package/src/orm/Database.d.ts.map +1 -1
  244. package/src/orm/Database.js +80 -9
  245. package/src/orm/DatabaseAdapter.d.ts +1 -0
  246. package/src/orm/DatabaseAdapter.d.ts.map +1 -1
  247. package/src/orm/DatabaseRuntimeRegistration.d.ts.map +1 -1
  248. package/src/orm/DatabaseRuntimeRegistration.js +2 -0
  249. package/src/orm/QueryBuilder.d.ts +1 -0
  250. package/src/orm/QueryBuilder.d.ts.map +1 -1
  251. package/src/orm/QueryBuilder.js +33 -3
  252. package/src/orm/SchemaCompiler.d.ts.map +1 -1
  253. package/src/orm/SchemaCompiler.js +6 -3
  254. package/src/orm/SchemaStatemenWriter.d.ts +15 -0
  255. package/src/orm/SchemaStatemenWriter.d.ts.map +1 -0
  256. package/src/orm/SchemaStatemenWriter.js +78 -0
  257. package/src/orm/adapters/D1Adapter.d.ts.map +1 -1
  258. package/src/orm/adapters/D1Adapter.js +52 -2
  259. package/src/orm/adapters/D1RemoteAdapter.d.ts.map +1 -1
  260. package/src/orm/adapters/D1RemoteAdapter.js +150 -89
  261. package/src/orm/adapters/MongoDBProxyAdapter.d.ts +3 -0
  262. package/src/orm/adapters/MongoDBProxyAdapter.d.ts.map +1 -0
  263. package/src/orm/adapters/MongoDBProxyAdapter.js +128 -0
  264. package/src/orm/adapters/MySQLProxyAdapter.d.ts +11 -0
  265. package/src/orm/adapters/MySQLProxyAdapter.d.ts.map +1 -0
  266. package/src/orm/adapters/MySQLProxyAdapter.js +162 -0
  267. package/src/orm/adapters/PostgreSQLProxyAdapter.d.ts +11 -0
  268. package/src/orm/adapters/PostgreSQLProxyAdapter.d.ts.map +1 -0
  269. package/src/orm/adapters/PostgreSQLProxyAdapter.js +163 -0
  270. package/src/orm/adapters/ProxyCache.d.ts +9 -0
  271. package/src/orm/adapters/ProxyCache.d.ts.map +1 -0
  272. package/src/orm/adapters/ProxyCache.js +24 -0
  273. package/src/orm/adapters/ProxySignedRequest.d.ts +11 -0
  274. package/src/orm/adapters/ProxySignedRequest.d.ts.map +1 -0
  275. package/src/orm/adapters/ProxySignedRequest.js +30 -0
  276. package/src/orm/adapters/ProxySigningPath.d.ts +3 -0
  277. package/src/orm/adapters/ProxySigningPath.d.ts.map +1 -0
  278. package/src/orm/adapters/ProxySigningPath.js +25 -0
  279. package/src/orm/adapters/SqlProxyAdapterUtils.d.ts +19 -0
  280. package/src/orm/adapters/SqlProxyAdapterUtils.d.ts.map +1 -0
  281. package/src/orm/adapters/SqlProxyAdapterUtils.js +36 -0
  282. package/src/orm/adapters/SqlProxyRegistryMode.d.ts +12 -0
  283. package/src/orm/adapters/SqlProxyRegistryMode.d.ts.map +1 -0
  284. package/src/orm/adapters/SqlProxyRegistryMode.js +24 -0
  285. package/src/orm/adapters/SqlServerProxyAdapter.d.ts +6 -0
  286. package/src/orm/adapters/SqlServerProxyAdapter.d.ts.map +1 -0
  287. package/src/orm/adapters/SqlServerProxyAdapter.js +154 -0
  288. package/src/orm/migrations/MigrationStore.js +1 -1
  289. package/src/performance/Optimizer.d.ts +1 -0
  290. package/src/performance/Optimizer.d.ts.map +1 -1
  291. package/src/performance/Optimizer.js +21 -8
  292. package/src/proxy/ErrorHandler.d.ts +11 -0
  293. package/src/proxy/ErrorHandler.d.ts.map +1 -0
  294. package/src/proxy/ErrorHandler.js +7 -0
  295. package/src/proxy/PoolManager.d.ts +8 -0
  296. package/src/proxy/PoolManager.d.ts.map +1 -0
  297. package/src/proxy/PoolManager.js +18 -0
  298. package/src/proxy/ProxyBackend.d.ts +18 -0
  299. package/src/proxy/ProxyBackend.d.ts.map +1 -0
  300. package/src/proxy/ProxyBackend.js +1 -0
  301. package/src/proxy/ProxyConfig.d.ts +12 -0
  302. package/src/proxy/ProxyConfig.d.ts.map +1 -0
  303. package/src/proxy/ProxyConfig.js +1 -0
  304. package/src/proxy/ProxyRegistry.d.ts +10 -0
  305. package/src/proxy/ProxyRegistry.d.ts.map +1 -0
  306. package/src/proxy/ProxyRegistry.js +11 -0
  307. package/src/proxy/ProxyRequestParsing.d.ts +9 -0
  308. package/src/proxy/ProxyRequestParsing.d.ts.map +1 -0
  309. package/src/proxy/ProxyRequestParsing.js +16 -0
  310. package/src/proxy/ProxyServer.d.ts +21 -0
  311. package/src/proxy/ProxyServer.d.ts.map +1 -0
  312. package/src/proxy/ProxyServer.js +84 -0
  313. package/src/proxy/ProxyServerUtils.d.ts +37 -0
  314. package/src/proxy/ProxyServerUtils.d.ts.map +1 -0
  315. package/src/proxy/ProxyServerUtils.js +42 -0
  316. package/src/proxy/ProxySigningConfigResolver.d.ts +22 -0
  317. package/src/proxy/ProxySigningConfigResolver.d.ts.map +1 -0
  318. package/src/proxy/ProxySigningConfigResolver.js +24 -0
  319. package/src/proxy/ProxySigningRequest.d.ts +12 -0
  320. package/src/proxy/ProxySigningRequest.d.ts.map +1 -0
  321. package/src/proxy/ProxySigningRequest.js +31 -0
  322. package/src/proxy/RequestValidator.d.ts +15 -0
  323. package/src/proxy/RequestValidator.d.ts.map +1 -0
  324. package/src/proxy/RequestValidator.js +26 -0
  325. package/src/proxy/SigningService.d.ts +39 -0
  326. package/src/proxy/SigningService.d.ts.map +1 -0
  327. package/src/proxy/SigningService.js +107 -0
  328. package/src/proxy/SqlPayloadValidator.d.ts +13 -0
  329. package/src/proxy/SqlPayloadValidator.d.ts.map +1 -0
  330. package/src/proxy/SqlPayloadValidator.js +14 -0
  331. package/src/proxy/SqlProxyDbOverrides.d.ts +17 -0
  332. package/src/proxy/SqlProxyDbOverrides.d.ts.map +1 -0
  333. package/src/proxy/SqlProxyDbOverrides.js +1 -0
  334. package/src/proxy/SqlProxyServerDeps.d.ts +12 -0
  335. package/src/proxy/SqlProxyServerDeps.d.ts.map +1 -0
  336. package/src/proxy/SqlProxyServerDeps.js +9 -0
  337. package/src/proxy/StatementPayloadValidator.d.ts +13 -0
  338. package/src/proxy/StatementPayloadValidator.d.ts.map +1 -0
  339. package/src/proxy/StatementPayloadValidator.js +18 -0
  340. package/src/proxy/StatementRegistryLoader.d.ts +2 -0
  341. package/src/proxy/StatementRegistryLoader.d.ts.map +1 -0
  342. package/src/proxy/StatementRegistryLoader.js +36 -0
  343. package/src/proxy/StatementRegistryResolver.d.ts +15 -0
  344. package/src/proxy/StatementRegistryResolver.d.ts.map +1 -0
  345. package/src/proxy/StatementRegistryResolver.js +34 -0
  346. package/src/proxy/d1/ZintrustD1Proxy.d.ts +3 -0
  347. package/src/proxy/d1/ZintrustD1Proxy.d.ts.map +1 -0
  348. package/src/proxy/d1/ZintrustD1Proxy.js +2 -0
  349. package/src/proxy/d1/register.d.ts +2 -0
  350. package/src/proxy/d1/register.d.ts.map +1 -0
  351. package/src/proxy/d1/register.js +5 -0
  352. package/src/proxy/isMutatingSql.d.ts +2 -0
  353. package/src/proxy/isMutatingSql.d.ts.map +1 -0
  354. package/src/proxy/isMutatingSql.js +12 -0
  355. package/src/proxy/kv/ZintrustKvProxy.d.ts +3 -0
  356. package/src/proxy/kv/ZintrustKvProxy.d.ts.map +1 -0
  357. package/src/proxy/kv/ZintrustKvProxy.js +2 -0
  358. package/src/proxy/kv/register.d.ts +2 -0
  359. package/src/proxy/kv/register.d.ts.map +1 -0
  360. package/src/proxy/kv/register.js +5 -0
  361. package/src/proxy/mongodb/MongoDBProxyServer.d.ts +33 -0
  362. package/src/proxy/mongodb/MongoDBProxyServer.d.ts.map +1 -0
  363. package/src/proxy/mongodb/MongoDBProxyServer.js +202 -0
  364. package/src/proxy/mongodb/register.d.ts +2 -0
  365. package/src/proxy/mongodb/register.d.ts.map +1 -0
  366. package/src/proxy/mongodb/register.js +5 -0
  367. package/src/proxy/mysql/MySqlProxyServer.d.ts +8 -0
  368. package/src/proxy/mysql/MySqlProxyServer.d.ts.map +1 -0
  369. package/src/proxy/mysql/MySqlProxyServer.js +202 -0
  370. package/src/proxy/mysql/register.d.ts +2 -0
  371. package/src/proxy/mysql/register.d.ts.map +1 -0
  372. package/src/proxy/mysql/register.js +5 -0
  373. package/src/proxy/postgres/PostgresProxyServer.d.ts +8 -0
  374. package/src/proxy/postgres/PostgresProxyServer.d.ts.map +1 -0
  375. package/src/proxy/postgres/PostgresProxyServer.js +178 -0
  376. package/src/proxy/postgres/register.d.ts +2 -0
  377. package/src/proxy/postgres/register.d.ts.map +1 -0
  378. package/src/proxy/postgres/register.js +5 -0
  379. package/src/proxy/redis/RedisProxyServer.d.ts +12 -0
  380. package/src/proxy/redis/RedisProxyServer.d.ts.map +1 -0
  381. package/src/proxy/redis/RedisProxyServer.js +192 -0
  382. package/src/proxy/redis/register.d.ts +2 -0
  383. package/src/proxy/redis/register.d.ts.map +1 -0
  384. package/src/proxy/redis/register.js +5 -0
  385. package/src/proxy/smtp/SmtpProxyServer.d.ts +19 -0
  386. package/src/proxy/smtp/SmtpProxyServer.d.ts.map +1 -0
  387. package/src/proxy/smtp/SmtpProxyServer.js +290 -0
  388. package/src/proxy/smtp/register.d.ts +2 -0
  389. package/src/proxy/smtp/register.d.ts.map +1 -0
  390. package/src/proxy/smtp/register.js +5 -0
  391. package/src/proxy/sqlserver/SqlServerProxyServer.d.ts +8 -0
  392. package/src/proxy/sqlserver/SqlServerProxyServer.d.ts.map +1 -0
  393. package/src/proxy/sqlserver/SqlServerProxyServer.js +203 -0
  394. package/src/proxy/sqlserver/register.d.ts +2 -0
  395. package/src/proxy/sqlserver/register.d.ts.map +1 -0
  396. package/src/proxy/sqlserver/register.js +5 -0
  397. package/src/proxy.d.ts +4 -0
  398. package/src/proxy.d.ts.map +1 -0
  399. package/src/proxy.js +3 -0
  400. package/src/routes/doc.d.ts.map +1 -1
  401. package/src/routes/doc.js +16 -2
  402. package/src/routes/error.d.ts +5 -4
  403. package/src/routes/error.d.ts.map +1 -1
  404. package/src/routes/error.js +15 -13
  405. package/src/routes/errorPages.d.ts +2 -0
  406. package/src/routes/errorPages.d.ts.map +1 -1
  407. package/src/routes/errorPages.js +144 -4
  408. package/src/runtime/PluginAutoImports.d.ts +1 -0
  409. package/src/runtime/PluginAutoImports.d.ts.map +1 -1
  410. package/src/runtime/PluginAutoImports.js +94 -9
  411. package/src/runtime/RuntimeAdapter.d.ts +8 -9
  412. package/src/runtime/RuntimeAdapter.d.ts.map +1 -1
  413. package/src/runtime/RuntimeAdapter.js +120 -34
  414. package/src/runtime/RuntimeServices.d.ts +47 -0
  415. package/src/runtime/RuntimeServices.d.ts.map +1 -0
  416. package/src/runtime/RuntimeServices.js +164 -0
  417. package/src/runtime/StartupConfigFileRegistry.d.ts +4 -4
  418. package/src/runtime/StartupConfigFileRegistry.d.ts.map +1 -1
  419. package/src/runtime/StartupConfigFileRegistry.js +12 -0
  420. package/src/runtime/WorkerAdapterImports.d.ts +5 -0
  421. package/src/runtime/WorkerAdapterImports.d.ts.map +1 -0
  422. package/src/runtime/WorkerAdapterImports.js +17 -0
  423. package/src/runtime/WorkersModule.d.ts +6 -0
  424. package/src/runtime/WorkersModule.d.ts.map +1 -0
  425. package/src/runtime/WorkersModule.js +278 -0
  426. package/src/runtime/adapters/CloudflareAdapter.d.ts.map +1 -1
  427. package/src/runtime/adapters/CloudflareAdapter.js +19 -2
  428. package/src/runtime/adapters/DenoAdapter.js +1 -0
  429. package/src/runtime/adapters/FargateAdapter.js +1 -1
  430. package/src/runtime/adapters/LambdaAdapter.js +1 -1
  431. package/src/runtime/adapters/NodeServerAdapter.js +1 -1
  432. package/src/runtime/detectRuntime.d.ts +10 -0
  433. package/src/runtime/detectRuntime.d.ts.map +1 -0
  434. package/src/runtime/detectRuntime.js +57 -0
  435. package/src/runtime/useFileLoader.d.ts.map +1 -1
  436. package/src/runtime/useFileLoader.js +16 -0
  437. package/src/scheduler/Schedule.d.ts +36 -0
  438. package/src/scheduler/Schedule.d.ts.map +1 -0
  439. package/src/scheduler/Schedule.js +197 -0
  440. package/src/scheduler/ScheduleHttpGateway.d.ts +8 -0
  441. package/src/scheduler/ScheduleHttpGateway.d.ts.map +1 -0
  442. package/src/scheduler/ScheduleHttpGateway.js +196 -0
  443. package/src/scheduler/ScheduleRunner.d.ts +6 -0
  444. package/src/scheduler/ScheduleRunner.d.ts.map +1 -1
  445. package/src/scheduler/ScheduleRunner.js +166 -29
  446. package/src/scheduler/SchedulerRuntime.d.ts +15 -0
  447. package/src/scheduler/SchedulerRuntime.d.ts.map +1 -0
  448. package/src/scheduler/SchedulerRuntime.js +79 -0
  449. package/src/scheduler/cron/Cron.d.ts +19 -0
  450. package/src/scheduler/cron/Cron.d.ts.map +1 -0
  451. package/src/scheduler/cron/Cron.js +200 -0
  452. package/src/scheduler/leader/SchedulerLeader.d.ts +14 -0
  453. package/src/scheduler/leader/SchedulerLeader.d.ts.map +1 -0
  454. package/src/scheduler/leader/SchedulerLeader.js +187 -0
  455. package/src/scheduler/state/ScheduleStateStore.d.ts +27 -0
  456. package/src/scheduler/state/ScheduleStateStore.d.ts.map +1 -0
  457. package/src/scheduler/state/ScheduleStateStore.js +27 -0
  458. package/src/scheduler/types.d.ts +10 -0
  459. package/src/scheduler/types.d.ts.map +1 -1
  460. package/src/schedules/index.d.ts +1 -0
  461. package/src/schedules/index.d.ts.map +1 -1
  462. package/src/schedules/index.js +1 -0
  463. package/src/schedules/job-tracking-cleanup.d.ts +4 -0
  464. package/src/schedules/job-tracking-cleanup.d.ts.map +1 -0
  465. package/src/schedules/job-tracking-cleanup.js +116 -0
  466. package/src/schedules/log-cleanup.d.ts +1 -2
  467. package/src/schedules/log-cleanup.d.ts.map +1 -1
  468. package/src/schedules/log-cleanup.js +12 -15
  469. package/src/scripts/TemplateImportsCheck.js +2 -2
  470. package/src/scripts/TemplateSync.js +3 -4
  471. package/src/security/CsrfTokenManager.d.ts.map +1 -1
  472. package/src/security/CsrfTokenManager.js +12 -0
  473. package/src/security/Hash.d.ts +1 -1
  474. package/src/security/Hash.d.ts.map +1 -1
  475. package/src/security/Hash.js +31 -36
  476. package/src/security/Sanitizer.d.ts.map +1 -1
  477. package/src/security/Sanitizer.js +1 -9
  478. package/src/security/SignedRequest.d.ts.map +1 -1
  479. package/src/security/SignedRequest.js +2 -2
  480. package/src/seeders/SeederLoader.js +1 -1
  481. package/src/session/SessionManager.d.ts +3 -0
  482. package/src/session/SessionManager.d.ts.map +1 -1
  483. package/src/session/SessionManager.js +49 -10
  484. package/src/sockets/CloudflareSocket.d.ts +24 -0
  485. package/src/sockets/CloudflareSocket.d.ts.map +1 -0
  486. package/src/sockets/CloudflareSocket.js +259 -0
  487. package/src/start.d.ts.map +1 -1
  488. package/src/start.js +1 -8
  489. package/src/templates/docker/docker-compose.ecosystem.yml.tpl +301 -0
  490. package/src/templates/docker/docker-compose.schedules.yml.tpl +84 -0
  491. package/src/templates/project/basic/app/Schedules/index.ts.tpl +0 -0
  492. package/src/templates/project/basic/config/database.ts.tpl +1 -1
  493. package/src/templates/project/basic/src/zintrust.plugins.wg.ts.tpl +8 -0
  494. package/src/toolkit/Secrets/Manifest.d.ts.map +1 -1
  495. package/src/toolkit/Secrets/Manifest.js +5 -7
  496. package/src/tools/mail/drivers/Smtp.d.ts.map +1 -1
  497. package/src/tools/mail/drivers/Smtp.js +229 -18
  498. package/src/tools/mail/index.d.ts.map +1 -1
  499. package/src/tools/mail/index.js +5 -4
  500. package/src/tools/mail/template-loader.d.ts.map +1 -1
  501. package/src/tools/mail/template-loader.js +197 -29
  502. package/src/tools/mail/templates/auth-password-reset.d.ts +3 -0
  503. package/src/tools/mail/templates/auth-password-reset.d.ts.map +1 -0
  504. package/src/tools/mail/templates/auth-password-reset.js +231 -0
  505. package/src/tools/mail/templates/auth-welcome.d.ts +3 -0
  506. package/src/tools/mail/templates/auth-welcome.d.ts.map +1 -0
  507. package/src/tools/mail/templates/auth-welcome.js +236 -0
  508. package/src/tools/mail/templates/general.d.ts +3 -0
  509. package/src/tools/mail/templates/general.d.ts.map +1 -0
  510. package/src/tools/mail/templates/general.js +109 -0
  511. package/src/tools/mail/templates/index.js +2 -2
  512. package/src/tools/mail/templates/job-completed.d.ts +3 -0
  513. package/src/tools/mail/templates/job-completed.d.ts.map +1 -0
  514. package/src/tools/mail/templates/job-completed.js +188 -0
  515. package/src/tools/mail/templates/notifications-new-comment.d.ts +3 -0
  516. package/src/tools/mail/templates/notifications-new-comment.d.ts.map +1 -0
  517. package/src/tools/mail/templates/notifications-new-comment.js +228 -0
  518. package/src/tools/mail/templates/password-reset.d.ts +3 -0
  519. package/src/tools/mail/templates/password-reset.d.ts.map +1 -0
  520. package/src/tools/mail/templates/password-reset.js +221 -0
  521. package/src/tools/mail/templates/performance-report.d.ts +3 -0
  522. package/src/tools/mail/templates/performance-report.d.ts.map +1 -0
  523. package/src/tools/mail/templates/performance-report.js +258 -0
  524. package/src/tools/mail/templates/welcome.d.ts +3 -0
  525. package/src/tools/mail/templates/welcome.d.ts.map +1 -0
  526. package/src/tools/mail/templates/welcome.js +187 -0
  527. package/src/tools/mail/templates/worker-alert.d.ts +3 -0
  528. package/src/tools/mail/templates/worker-alert.d.ts.map +1 -0
  529. package/src/tools/mail/templates/worker-alert.js +229 -0
  530. package/src/tools/notification/Notification.js +1 -1
  531. package/src/tools/notification/testingHelpers.js +6 -5
  532. package/src/tools/queue/AdvancedQueue.js +2 -6
  533. package/src/tools/queue/IdempotencyManager.d.ts +6 -0
  534. package/src/tools/queue/IdempotencyManager.d.ts.map +1 -0
  535. package/src/tools/queue/IdempotencyManager.js +36 -0
  536. package/src/tools/queue/JobHeartbeatStore.d.ts +16 -0
  537. package/src/tools/queue/JobHeartbeatStore.d.ts.map +1 -0
  538. package/src/tools/queue/JobHeartbeatStore.js +67 -0
  539. package/src/tools/queue/JobReconciliationRunner.d.ts +16 -0
  540. package/src/tools/queue/JobReconciliationRunner.d.ts.map +1 -0
  541. package/src/tools/queue/JobReconciliationRunner.js +56 -0
  542. package/src/tools/queue/JobRecoveryDaemon.d.ts +27 -0
  543. package/src/tools/queue/JobRecoveryDaemon.d.ts.map +1 -0
  544. package/src/tools/queue/JobRecoveryDaemon.js +303 -0
  545. package/src/tools/queue/JobStateTracker.d.ts +140 -0
  546. package/src/tools/queue/JobStateTracker.d.ts.map +1 -0
  547. package/src/tools/queue/JobStateTracker.js +409 -0
  548. package/src/tools/queue/JobStateTrackerDbPersistence.d.ts +12 -0
  549. package/src/tools/queue/JobStateTrackerDbPersistence.d.ts.map +1 -0
  550. package/src/tools/queue/JobStateTrackerDbPersistence.js +239 -0
  551. package/src/tools/queue/Queue.d.ts.map +1 -1
  552. package/src/tools/queue/Queue.js +160 -16
  553. package/src/tools/queue/QueueDataRedactor.d.ts +6 -0
  554. package/src/tools/queue/QueueDataRedactor.d.ts.map +1 -0
  555. package/src/tools/queue/QueueDataRedactor.js +45 -0
  556. package/src/tools/queue/QueueExtensions.d.ts.map +1 -1
  557. package/src/tools/queue/QueueExtensions.js +2 -1
  558. package/src/tools/queue/QueueReliabilityMetrics.d.ts +38 -0
  559. package/src/tools/queue/QueueReliabilityMetrics.d.ts.map +1 -0
  560. package/src/tools/queue/QueueReliabilityMetrics.js +131 -0
  561. package/src/tools/queue/QueueReliabilityOrchestrator.d.ts +7 -0
  562. package/src/tools/queue/QueueReliabilityOrchestrator.d.ts.map +1 -0
  563. package/src/tools/queue/QueueReliabilityOrchestrator.js +59 -0
  564. package/src/tools/queue/QueueRuntimeRegistration.d.ts +1 -9
  565. package/src/tools/queue/QueueRuntimeRegistration.d.ts.map +1 -1
  566. package/src/tools/queue/QueueRuntimeRegistration.js +75 -4
  567. package/src/tools/queue/QueueTracing.d.ts +32 -0
  568. package/src/tools/queue/QueueTracing.d.ts.map +1 -0
  569. package/src/tools/queue/QueueTracing.js +151 -0
  570. package/src/tools/queue/StalledJobMonitor.d.ts +5 -0
  571. package/src/tools/queue/StalledJobMonitor.d.ts.map +1 -0
  572. package/src/tools/queue/StalledJobMonitor.js +21 -0
  573. package/src/tools/queue/TimeoutManager.d.ts +14 -0
  574. package/src/tools/queue/TimeoutManager.d.ts.map +1 -0
  575. package/src/tools/queue/TimeoutManager.js +77 -0
  576. package/src/tools/queue/drivers/Redis.d.ts +1 -0
  577. package/src/tools/queue/drivers/Redis.d.ts.map +1 -1
  578. package/src/tools/queue/drivers/Redis.js +1 -0
  579. package/src/tools/queue/index.d.ts +10 -0
  580. package/src/tools/queue/index.d.ts.map +1 -1
  581. package/src/tools/queue/index.js +10 -0
  582. package/src/tools/storage/drivers/R2.d.ts +13 -0
  583. package/src/tools/storage/drivers/R2.d.ts.map +1 -1
  584. package/src/tools/storage/drivers/R2.js +29 -0
  585. package/src/zintrust.plugins.d.ts +9 -0
  586. package/src/zintrust.plugins.d.ts.map +1 -0
  587. package/src/zintrust.plugins.js +7 -0
  588. package/src/zintrust.plugins.wg.d.ts +9 -0
  589. package/src/zintrust.plugins.wg.d.ts.map +1 -0
  590. package/src/zintrust.plugins.wg.js +7 -0
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { appConfig } from '../config/app.js';
6
6
  import { HTTP_HEADERS, MIME_TYPES } from '../config/constants.js';
7
- import { serveErrorPagesFile, serveZintrustSvgFile } from './errorPages.js';
7
+ import { serveErrorPagesFileAsync, serveZintrustSvgFile, serveZintrustSvgFileAsync, } from './errorPages.js';
8
8
  import { getPublicRoot } from './publicRoot.js';
9
9
  import { Router } from './Router.js';
10
10
  import { ErrorFactory } from '../exceptions/ZintrustError.js';
@@ -31,11 +31,11 @@ const safeJsonStringify = (value) => {
31
31
  return '';
32
32
  }
33
33
  };
34
- const trySendHtmlErrorPage = (request, response, input) => {
34
+ const trySendHtmlErrorPage = async (request, response, input) => {
35
35
  if (!ErrorPageRenderer.shouldSendHtml(request))
36
36
  return false;
37
37
  const publicRoot = getPublicRoot();
38
- const html = ErrorPageRenderer.renderHtml(publicRoot, {
38
+ const html = await ErrorPageRenderer.renderHtmlAsync(publicRoot, {
39
39
  statusCode: input.statusCode,
40
40
  errorName: input.errorName,
41
41
  errorMessage: input.errorMessage,
@@ -50,18 +50,20 @@ const trySendHtmlErrorPage = (request, response, input) => {
50
50
  response.html(html);
51
51
  return true;
52
52
  };
53
- const handleNotFound = (request, response, requestId) => {
53
+ const handleNotFound = async (request, response, requestId) => {
54
54
  const path = request.getPath();
55
55
  if (path.startsWith('/error-pages/')) {
56
- serveErrorPagesFile(path, response);
56
+ await serveErrorPagesFileAsync(path, response);
57
57
  return;
58
58
  }
59
59
  if (path === '/zintrust.svg') {
60
- serveZintrustSvgFile(response);
60
+ if (!(await serveZintrustSvgFileAsync(response))) {
61
+ serveZintrustSvgFile(response);
62
+ }
61
63
  return;
62
64
  }
63
65
  response.setStatus(404);
64
- if (trySendHtmlErrorPage(request, response, {
66
+ if (await trySendHtmlErrorPage(request, response, {
65
67
  statusCode: 404,
66
68
  errorName: 'Not Found',
67
69
  errorMessage: 'The page you requested could not be found.',
@@ -70,7 +72,7 @@ const handleNotFound = (request, response, requestId) => {
70
72
  }
71
73
  response.json(ErrorResponse.notFound('Route', requestId));
72
74
  };
73
- const handleInternalServerErrorWithWrappers = (request, response, error, requestId) => {
75
+ const handleInternalServerErrorWithWrappers = async (request, response, error, requestId) => {
74
76
  response.setStatus(500);
75
77
  const isDev = appConfig.isDevelopment();
76
78
  const err = error instanceof Error ? error : ErrorFactory.createGeneralError('Unknown error', error);
@@ -94,7 +96,7 @@ const handleInternalServerErrorWithWrappers = (request, response, error, request
94
96
  const stackRaw = isDev
95
97
  ? safeJsonStringify({ name: err.name, message: err.message, stack: err.stack })
96
98
  : undefined;
97
- if (trySendHtmlErrorPage(request, response, {
99
+ if (await trySendHtmlErrorPage(request, response, {
98
100
  statusCode: 500,
99
101
  errorName,
100
102
  errorMessage,
@@ -111,14 +113,14 @@ const handleInternalServerErrorRaw = (res) => {
111
113
  res.writeHead(500, { [HTTP_HEADERS.CONTENT_TYPE]: MIME_TYPES.JSON });
112
114
  res.end(JSON.stringify(ErrorResponse.internalServerError('Internal server error')));
113
115
  };
114
- const handleForced404 = (req, res) => {
115
- handleNotFound(req, res);
116
+ const handleForced404 = async (req, res) => {
117
+ await handleNotFound(req, res);
116
118
  };
117
- const handleForced500 = (req, res) => {
119
+ const handleForced500 = async (req, res) => {
118
120
  const forced = ErrorFactory.createGeneralError('Forced 500 route', {
119
121
  route: '/500',
120
122
  });
121
- handleInternalServerErrorWithWrappers(req, res, forced);
123
+ await handleInternalServerErrorWithWrappers(req, res, forced);
122
124
  };
123
125
  /**
124
126
  * Debug routes to always render 404/500 responses.
@@ -5,7 +5,9 @@
5
5
  import type { IRouter } from './Router';
6
6
  import type { IResponse } from '../http/Response';
7
7
  export declare const serveErrorPagesFile: (urlPath: string, response: IResponse) => boolean;
8
+ export declare const serveErrorPagesFileAsync: (urlPath: string, response: IResponse) => Promise<boolean>;
8
9
  export declare const serveZintrustSvgFile: (response: IResponse) => boolean;
10
+ export declare const serveZintrustSvgFileAsync: (response: IResponse) => Promise<boolean>;
9
11
  export declare const registerErrorPagesRoutes: (router: IRouter) => void;
10
12
  declare const _default: {
11
13
  registerErrorPagesRoutes: (router: IRouter) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"errorPages.d.ts","sourceRoot":"","sources":["../../../src/routes/errorPages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAInD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoDhD,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,EAAE,UAAU,SAAS,KAAG,OAkD1E,CAAC;AAeF,eAAO,MAAM,oBAAoB,GAAI,UAAU,SAAS,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,OAAO,KAAG,IAO1D,CAAC;;uCAP+C,OAAO,KAAG,IAAI;mCArElB,MAAM,YAAY,SAAS,KAAG,OAAO;;AA8ElF,wBAAiE"}
1
+ {"version":3,"file":"errorPages.d.ts","sourceRoot":"","sources":["../../../src/routes/errorPages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAInD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA8JhD,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,EAAE,UAAU,SAAS,KAAG,OAkD1E,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,SAAS,MAAM,EACf,UAAU,SAAS,KAClB,OAAO,CAAC,OAAO,CA4CjB,CAAC;AAmBF,eAAO,MAAM,oBAAoB,GAAI,UAAU,SAAS,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAU,UAAU,SAAS,KAAG,OAAO,CAAC,OAAO,CAKpF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,OAAO,KAAG,IAO1D,CAAC;;uCAP+C,OAAO,KAAG,IAAI;mCAjIlB,MAAM,YAAY,SAAS,KAAG,OAAO;;AA0IlF,wBAAiE"}
@@ -2,6 +2,7 @@
2
2
  * Error Pages Static Assets
3
3
  * Serves /error-pages/* assets (CSS/JS/SVG/etc) used by HTML error templates.
4
4
  */
5
+ import { Cloudflare } from '../config/cloudflare.js';
5
6
  import { HTTP_HEADERS, MIME_TYPES } from '../config/constants.js';
6
7
  import { MIME_TYPES_MAP, resolveSafePath, tryDecodeURIComponent } from './common.js';
7
8
  import { getFrameworkPublicRoots } from './publicRoot.js';
@@ -14,6 +15,74 @@ const getCandidatePublicRoots = () => {
14
15
  const unique = new Set(roots.map((root) => root.trim()).filter((root) => root !== ''));
15
16
  return [...unique];
16
17
  };
18
+ const pathExistsAsync = async (candidate) => {
19
+ try {
20
+ await fs.fsPromises.access(candidate);
21
+ return true;
22
+ }
23
+ catch {
24
+ return false;
25
+ }
26
+ };
27
+ const isFileAsync = async (candidate) => {
28
+ try {
29
+ const stats = await fs.fsPromises.stat(candidate);
30
+ return stats.isFile();
31
+ }
32
+ catch {
33
+ return false;
34
+ }
35
+ };
36
+ const findFirstExistingFileAsync = async (candidates) => {
37
+ const results = await Promise.all(candidates.map(async (candidate) => ({
38
+ candidate,
39
+ isFile: await isFileAsync(candidate),
40
+ })));
41
+ return results.find((result) => result.isFile)?.candidate;
42
+ };
43
+ const resolveErrorPageFilePathAsync = async (candidateRoots, normalizedRelative) => {
44
+ const checks = await Promise.all(candidateRoots.map(async (root) => {
45
+ const baseDir = path.join(root, 'error-pages');
46
+ const filePath = resolveSafePath(baseDir, normalizedRelative);
47
+ if (filePath === undefined)
48
+ return undefined;
49
+ try {
50
+ const stats = await fs.fsPromises.stat(filePath);
51
+ if (stats.isDirectory())
52
+ return undefined;
53
+ return filePath;
54
+ }
55
+ catch {
56
+ return undefined;
57
+ }
58
+ }));
59
+ return checks.find((filePath) => typeof filePath === 'string');
60
+ };
61
+ const servePublicRootFileAsync = async (relativePath, response, contentType) => {
62
+ const candidateRoots = getCandidatePublicRoots();
63
+ const candidates = candidateRoots.map((root) => path.join(root, relativePath));
64
+ const filePath = await findFirstExistingFileAsync(candidates);
65
+ try {
66
+ if (filePath === undefined || filePath === null) {
67
+ response.setStatus(404);
68
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
69
+ response.send('Not Found');
70
+ return false;
71
+ }
72
+ const content = await fs.fsPromises.readFile(filePath);
73
+ response.setStatus(200);
74
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, contentType);
75
+ response.send(content);
76
+ return true;
77
+ }
78
+ catch (error) {
79
+ ErrorFactory.createTryCatchError(`Error serving public file ${filePath}`, error);
80
+ response.setStatus(500);
81
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
82
+ response.send('Internal Server Error');
83
+ return false;
84
+ }
85
+ };
17
86
  const findFirstExistingFile = (candidates) => {
18
87
  for (const candidate of candidates) {
19
88
  try {
@@ -51,6 +120,28 @@ const servePublicRootFile = (relativePath, response, contentType) => {
51
120
  return false;
52
121
  }
53
122
  };
123
+ const serveAssetsFileAsync = async (urlPath, response) => {
124
+ const assets = Cloudflare.getAssetsBinding();
125
+ if (!assets)
126
+ return false;
127
+ try {
128
+ const url = new URL(urlPath, 'https://assets.local');
129
+ const res = await assets.fetch(url.toString());
130
+ const contentType = res.headers.get(HTTP_HEADERS.CONTENT_TYPE) ?? MIME_TYPES.TEXT;
131
+ const body = Buffer.from(await res.arrayBuffer());
132
+ response.setStatus(res.status);
133
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, contentType);
134
+ response.send(body);
135
+ return true;
136
+ }
137
+ catch (error) {
138
+ ErrorFactory.createTryCatchError(`Error serving asset ${urlPath}`, error);
139
+ response.setStatus(500);
140
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
141
+ response.send('Internal Server Error');
142
+ return true;
143
+ }
144
+ };
54
145
  export const serveErrorPagesFile = (urlPath, response) => {
55
146
  if (urlPath === '/error-pages' || urlPath === '/error-pages/') {
56
147
  response.setStatus(404);
@@ -96,20 +187,69 @@ export const serveErrorPagesFile = (urlPath, response) => {
96
187
  response.send('Not Found');
97
188
  return true;
98
189
  };
99
- const handleErrorPagesRequest = (req, res) => {
190
+ export const serveErrorPagesFileAsync = async (urlPath, response) => {
191
+ if (urlPath === '/error-pages' || urlPath === '/error-pages/') {
192
+ response.setStatus(404);
193
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
194
+ response.send('Not Found');
195
+ return true;
196
+ }
197
+ if (!urlPath.startsWith('/error-pages/'))
198
+ return false;
199
+ if (Cloudflare.getWorkersEnv() !== null) {
200
+ return serveAssetsFileAsync(urlPath, response);
201
+ }
202
+ const candidateRoots = getCandidatePublicRoots();
203
+ const rawRelative = urlPath.slice('/error-pages/'.length);
204
+ const normalizedRelative = tryDecodeURIComponent(rawRelative).replaceAll('\\', '/');
205
+ const filePath = await resolveErrorPageFilePathAsync(candidateRoots, normalizedRelative);
206
+ try {
207
+ if (filePath !== undefined && (await pathExistsAsync(filePath))) {
208
+ const ext = path.extname(filePath).toLowerCase();
209
+ const contentType = MIME_TYPES_MAP[ext] || 'application/octet-stream';
210
+ const content = await fs.fsPromises.readFile(filePath);
211
+ response.setStatus(200);
212
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, contentType);
213
+ response.send(content);
214
+ return true;
215
+ }
216
+ }
217
+ catch (error) {
218
+ ErrorFactory.createTryCatchError(`Error serving error-pages file ${filePath}`, error);
219
+ response.setStatus(500);
220
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
221
+ response.send('Internal Server Error');
222
+ return true;
223
+ }
224
+ response.setStatus(404);
225
+ response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
226
+ response.send('Not Found');
227
+ return true;
228
+ };
229
+ const handleErrorPagesRequest = async (req, res) => {
100
230
  const urlPath = req.getPath();
101
- if (serveErrorPagesFile(urlPath, res))
231
+ if (await serveErrorPagesFileAsync(urlPath, res))
102
232
  return;
103
233
  res.setStatus(404);
104
234
  res.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
105
235
  res.send('Not Found');
106
236
  };
107
- const handleZintrustSvgRequest = (_req, res) => {
108
- servePublicRootFile('zintrust.svg', res, MIME_TYPES.SVG);
237
+ const handleZintrustSvgRequest = async (_req, res) => {
238
+ if (Cloudflare.getWorkersEnv() !== null) {
239
+ await serveAssetsFileAsync('/zintrust.svg', res);
240
+ return;
241
+ }
242
+ await servePublicRootFileAsync('zintrust.svg', res, MIME_TYPES.SVG);
109
243
  };
110
244
  export const serveZintrustSvgFile = (response) => {
111
245
  return servePublicRootFile('zintrust.svg', response, MIME_TYPES.SVG);
112
246
  };
247
+ export const serveZintrustSvgFileAsync = async (response) => {
248
+ if (Cloudflare.getWorkersEnv() !== null) {
249
+ return serveAssetsFileAsync('/zintrust.svg', response);
250
+ }
251
+ return servePublicRootFileAsync('zintrust.svg', response, MIME_TYPES.SVG);
252
+ };
113
253
  export const registerErrorPagesRoutes = (router) => {
114
254
  Router.get(router, '/error-pages', handleErrorPagesRequest);
115
255
  Router.get(router, '/error-pages/', handleErrorPagesRequest);
@@ -16,6 +16,7 @@ export declare const PluginAutoImports: Readonly<{
16
16
  * adapters/drivers into core registries.
17
17
  */
18
18
  tryImportProjectAutoImports(): Promise<ImportResult>;
19
+ tryImportFromFileContents(files: string[]): Promise<ImportResult>;
19
20
  }>;
20
21
  export {};
21
22
  //# sourceMappingURL=PluginAutoImports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginAutoImports.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginAutoImports.ts"],"names":[],"mappings":"AAMA,KAAK,YAAY,GACb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAChC;IACE,EAAE,EAAE,KAAK,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,eAAe,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAwBN,eAAO,MAAM,iBAAiB;IAC5B;;;;;;OAMG;mCACkC,OAAO,CAAC,YAAY,CAAC;EA2D1D,CAAC"}
1
+ {"version":3,"file":"PluginAutoImports.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginAutoImports.ts"],"names":[],"mappings":"AAMA,KAAK,YAAY,GACb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAChC;IACE,EAAE,EAAE,KAAK,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,eAAe,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AA0GN,eAAO,MAAM,iBAAiB;IAC5B;;;;;;OAMG;mCACkC,OAAO,CAAC,YAAY,CAAC;qCAmEnB,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;EAavE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { pathToFileURL } from '../node-singletons/url.js';
2
2
  import { readEnvString } from '../common/ExternalServiceUtils.js';
3
3
  import { Logger } from '../config/logger.js';
4
- import { existsSync } from '../node-singletons/fs.js';
4
+ import { existsSync, readFile } from '../node-singletons/fs.js';
5
5
  import * as path from '../node-singletons/path.js';
6
6
  const getProjectCwd = () => process.cwd();
7
7
  const getProjectRootEnv = () => readEnvString('ZINTRUST_PROJECT_ROOT');
@@ -22,6 +22,77 @@ const getCandidates = (projectRoot) => {
22
22
  path.join(projectRoot, 'src', 'zintrust.plugins.js'),
23
23
  ];
24
24
  };
25
+ const extractImportSpecifiers = (raw) => {
26
+ const specifiers = [];
27
+ for (const line of raw.split(/\r?\n/)) {
28
+ const match = /^\s*import\s+['"]([^'"]+)['"];?\s*$/.exec(line);
29
+ if (match?.[1] !== null && match?.[1] !== undefined) {
30
+ specifiers.push(match[1]);
31
+ }
32
+ }
33
+ return specifiers;
34
+ };
35
+ const readImportSpecifiersFromFiles = async (files) => {
36
+ const importSpecifiers = [];
37
+ // Read all files in parallel
38
+ const fileReadPromises = files.map(async (filePath) => {
39
+ try {
40
+ const raw = await readFile(filePath, 'utf-8');
41
+ return { filePath, specifiers: extractImportSpecifiers(raw), success: true };
42
+ }
43
+ catch (error) {
44
+ Logger.debug('[plugins] Failed to read auto-import file for fallback', {
45
+ filePath,
46
+ error: error instanceof Error ? error.message : String(error),
47
+ });
48
+ return { filePath, specifiers: [], success: false };
49
+ }
50
+ });
51
+ const results = await Promise.all(fileReadPromises);
52
+ // Collect all successful specifiers
53
+ for (const { filePath, specifiers } of results) {
54
+ for (const specifier of specifiers) {
55
+ importSpecifiers.push({ specifier, filePath });
56
+ }
57
+ }
58
+ return importSpecifiers;
59
+ };
60
+ const resolveRelativeSpecifier = (entry) => {
61
+ const baseDir = path.dirname(entry.filePath);
62
+ const basePath = path.resolve(baseDir, entry.specifier);
63
+ const candidates = [
64
+ basePath,
65
+ `${basePath}.js`,
66
+ `${basePath}.ts`,
67
+ path.join(basePath, 'index.js'),
68
+ path.join(basePath, 'index.ts'),
69
+ ];
70
+ const resolved = candidates.find((candidate) => existsSync(candidate)) ?? basePath;
71
+ return pathToFileURL(resolved).href;
72
+ };
73
+ const importSpecifiers = async (specifiers) => {
74
+ // Import all specifiers in parallel
75
+ const importPromises = Array.from(specifiers).map(async (entry) => {
76
+ const target = entry.specifier.startsWith('.')
77
+ ? resolveRelativeSpecifier(entry)
78
+ : entry.specifier;
79
+ try {
80
+ await import(target);
81
+ Logger.debug('[plugins] Loaded auto-import specifier', { specifier: entry.specifier });
82
+ return { specifier: entry.specifier, success: true };
83
+ }
84
+ catch (error) {
85
+ Logger.debug('[plugins] Failed auto-import specifier', {
86
+ specifier: entry.specifier,
87
+ error: error instanceof Error ? error.message : String(error),
88
+ });
89
+ return { specifier: entry.specifier, success: false };
90
+ }
91
+ });
92
+ const results = await Promise.allSettled(importPromises);
93
+ // Count successful imports
94
+ return results.filter((result) => result.status === 'fulfilled' && result.value.success).length;
95
+ };
25
96
  export const PluginAutoImports = Object.freeze({
26
97
  /**
27
98
  * Best-effort import of a project's `src/zintrust.plugins.ts` file.
@@ -39,8 +110,7 @@ export const PluginAutoImports = Object.freeze({
39
110
  Logger.debug('[plugins] No plugin auto-imports file found', { projectRoot, candidates });
40
111
  return { ok: false, reason: 'not-found' };
41
112
  }
42
- // Try all existing candidates in parallel
43
- const importPromises = existingCandidates.map(async (candidate) => {
113
+ const tryImportCandidate = async (candidate) => {
44
114
  try {
45
115
  const url = pathToFileURL(candidate).href;
46
116
  await import(url);
@@ -55,7 +125,9 @@ export const PluginAutoImports = Object.freeze({
55
125
  errorMessage,
56
126
  };
57
127
  }
58
- });
128
+ };
129
+ // Try all existing candidates in parallel
130
+ const importPromises = existingCandidates.map(async (candidate) => tryImportCandidate(candidate));
59
131
  // Return the first successful import, or the first failure if none succeed
60
132
  try {
61
133
  const results = await Promise.allSettled(importPromises);
@@ -65,15 +137,28 @@ export const PluginAutoImports = Object.freeze({
65
137
  }
66
138
  // Return the first failed result if no success
67
139
  const firstFailedResult = results.find((result) => result.status === 'fulfilled' && !result.value.ok);
68
- return (firstFailedResult?.value ?? {
69
- ok: false,
70
- reason: 'import-failed',
71
- errorMessage: 'All candidates failed',
72
- });
140
+ const failed = firstFailedResult?.value ??
141
+ { ok: false, reason: 'import-failed', errorMessage: 'All candidates failed' };
142
+ Logger.debug('[plugins] Auto-import file failed, attempting per-import fallback', failed);
143
+ const fallbackResult = await this.tryImportFromFileContents(existingCandidates);
144
+ if (fallbackResult.ok)
145
+ return fallbackResult;
146
+ return failed;
73
147
  }
74
148
  catch (error) {
75
149
  const errorMessage = error instanceof Error ? error.message : String(error);
76
150
  return { ok: false, reason: 'import-failed', errorMessage };
77
151
  }
78
152
  },
153
+ async tryImportFromFileContents(files) {
154
+ const specifiers = await readImportSpecifiersFromFiles(files);
155
+ if (specifiers.length === 0) {
156
+ return { ok: false, reason: 'import-failed', errorMessage: 'No import specifiers found' };
157
+ }
158
+ const loaded = await importSpecifiers(specifiers);
159
+ if (loaded > 0) {
160
+ return { ok: true, loadedPath: 'manual-imports' };
161
+ }
162
+ return { ok: false, reason: 'import-failed', errorMessage: 'All specifier imports failed' };
163
+ },
79
164
  });
@@ -1,5 +1,5 @@
1
1
  import type { IncomingMessage, ServerResponse } from '../node-singletons/http';
2
- type Tbody = string | Buffer | null;
2
+ type Tbody = string | Buffer | ReadableStream<Uint8Array> | null;
3
3
  /**
4
4
  * Request body type for handlers
5
5
  */
@@ -14,6 +14,7 @@ export interface PlatformRequest {
14
14
  body?: Tbody;
15
15
  query?: Record<string, string | string[]>;
16
16
  remoteAddr?: string;
17
+ signal?: AbortSignal;
17
18
  }
18
19
  export interface PlatformResponse {
19
20
  statusCode: number;
@@ -110,17 +111,15 @@ export declare const HttpResponse: Readonly<{
110
111
  export declare const ErrorResponse: Readonly<{
111
112
  create(statusCode: number, message: string, details?: unknown): IHttpResponse;
112
113
  }>;
113
- /**
114
- * Create mock Node.js request/response objects for platform compatibility
115
- */
114
+ type ResData = {
115
+ statusCode: number;
116
+ headers: Record<string, string | string[]>;
117
+ body: Tbody;
118
+ };
116
119
  export declare function createMockHttpObjects(request: PlatformRequest): {
117
120
  req: Record<string, unknown>;
118
121
  res: Record<string, unknown>;
119
- responseData: {
120
- statusCode: number;
121
- headers: Record<string, string | string[]>;
122
- body: Tbody;
123
- };
122
+ responseData: ResData;
124
123
  };
125
124
  export {};
126
125
  //# sourceMappingURL=RuntimeAdapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RuntimeAdapter.d.ts","sourceRoot":"","sources":["../../../src/runtime/RuntimeAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE7E,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;IAElE;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAErE;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAAC;IAE9C;;O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