stacks 0.58.72 → 0.59.1

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 (1109) hide show
  1. package/buddy/bin/cli.ts +90 -0
  2. package/buddy/build.ts +38 -0
  3. package/buddy/compile.ts +9 -0
  4. package/{core/buddy/dist/chunk-94f0ae38d2d27d78.js → buddy/dist/chunk-32440b2561f1e29c.js} +568 -485
  5. package/buddy/dist/cli.d.ts +1 -0
  6. package/buddy/dist/cli.js +107 -0
  7. package/buddy/dist/commands/build.d.ts +2 -0
  8. package/buddy/dist/commands/changelog.d.ts +2 -0
  9. package/buddy/dist/commands/clean.d.ts +2 -0
  10. package/buddy/dist/commands/cloud.d.ts +2 -0
  11. package/buddy/dist/commands/commit.d.ts +2 -0
  12. package/buddy/dist/commands/configure.d.ts +2 -0
  13. package/buddy/dist/commands/create.d.ts +2 -0
  14. package/buddy/dist/commands/deploy.d.ts +2 -0
  15. package/buddy/dist/commands/dev.d.ts +3 -0
  16. package/buddy/dist/commands/dns.d.ts +2 -0
  17. package/buddy/dist/commands/domains.d.ts +2 -0
  18. package/buddy/dist/commands/fresh.d.ts +2 -0
  19. package/buddy/dist/commands/generate.d.ts +2 -0
  20. package/buddy/dist/commands/http.d.ts +2 -0
  21. package/buddy/dist/commands/index.d.ts +31 -0
  22. package/buddy/dist/commands/install.d.ts +2 -0
  23. package/buddy/dist/commands/key.d.ts +2 -0
  24. package/buddy/dist/commands/lint.d.ts +2 -0
  25. package/buddy/dist/commands/list.d.ts +2 -0
  26. package/buddy/dist/commands/make.d.ts +2 -0
  27. package/buddy/dist/commands/migrate.d.ts +2 -0
  28. package/buddy/dist/commands/ports.d.ts +2 -0
  29. package/buddy/dist/commands/prepublish.d.ts +2 -0
  30. package/buddy/dist/commands/projects.d.ts +2 -0
  31. package/buddy/dist/commands/release.d.ts +2 -0
  32. package/buddy/dist/commands/seed.d.ts +2 -0
  33. package/buddy/dist/commands/setup.d.ts +4 -0
  34. package/buddy/dist/commands/test.d.ts +2 -0
  35. package/buddy/dist/commands/tinker.d.ts +2 -0
  36. package/buddy/dist/commands/types.d.ts +2 -0
  37. package/buddy/dist/commands/upgrade.d.ts +2 -0
  38. package/buddy/dist/commands/version.d.ts +2 -0
  39. package/buddy/dist/index.d.ts +1 -0
  40. package/{core/buddy → buddy}/dist/index.js +6 -3
  41. package/buddy/dist/stacks +0 -0
  42. package/{core/buddy → buddy}/package.json +3 -5
  43. package/{core/buddy → buddy}/src/cli.ts +36 -31
  44. package/{core/buddy → buddy}/src/commands/add.ts +1 -1
  45. package/{core/buddy → buddy}/src/commands/commit.ts +1 -1
  46. package/{core/buddy → buddy}/src/commands/create.ts +6 -0
  47. package/{core/buddy → buddy}/src/commands/deploy.ts +1 -1
  48. package/{core/buddy → buddy}/src/commands/dev.ts +1 -3
  49. package/{core/buddy → buddy}/src/commands/generate.ts +10 -0
  50. package/{core/buddy → buddy}/src/commands/index.ts +2 -0
  51. package/{core/buddy → buddy}/src/commands/list.ts +1 -1
  52. package/{core/buddy → buddy}/src/commands/make.ts +28 -2
  53. package/buddy/src/commands/ports.ts +180 -0
  54. package/{core/buddy → buddy}/src/commands/prepublish.ts +1 -1
  55. package/buddy/src/commands/projects.ts +58 -0
  56. package/{core/buddy → buddy}/src/commands/setup.ts +8 -54
  57. package/{core/buddy → buddy}/src/commands/types.ts +1 -1
  58. package/{core/buddy → buddy}/src/commands/upgrade.ts +51 -4
  59. package/buddy/tsconfig.tsbuildinfo +1 -0
  60. package/package.json +285 -285
  61. package/core/.simple-git-hooks.js +0 -3
  62. package/core/Caddyfile +0 -23
  63. package/core/actions/README.md +0 -58
  64. package/core/actions/build.ts +0 -5
  65. package/core/actions/dist/src/add.js +0 -29
  66. package/core/actions/dist/src/build/component-libs.js +0 -6
  67. package/core/actions/dist/src/build/core.js +0 -21
  68. package/core/actions/dist/src/build/stacks.js +0 -8
  69. package/core/actions/dist/src/build.js +0 -213
  70. package/core/actions/dist/src/bump.js +0 -14
  71. package/core/actions/dist/src/changelog.js +0 -17
  72. package/core/actions/dist/src/clean.js +0 -6
  73. package/core/actions/dist/src/commit.js +0 -17
  74. package/core/actions/dist/src/copy-types.js +0 -14
  75. package/core/actions/dist/src/database/seed.js +0 -1
  76. package/core/actions/dist/src/deploy/index.js +0 -31
  77. package/core/actions/dist/src/dev/components.js +0 -11
  78. package/core/actions/dist/src/dev/docs.js +0 -7
  79. package/core/actions/dist/src/dev/index.js +0 -92
  80. package/core/actions/dist/src/examples.js +0 -43
  81. package/core/actions/dist/src/fresh.js +0 -18
  82. package/core/actions/dist/src/generate/component-meta.js +0 -59
  83. package/core/actions/dist/src/generate/ide-helpers.js +0 -91
  84. package/core/actions/dist/src/generate/index.js +0 -147
  85. package/core/actions/dist/src/generate/lib-entries.js +0 -170
  86. package/core/actions/dist/src/generate/vscode-custom-data.js +0 -91
  87. package/core/actions/dist/src/helpers/component-meta.js +0 -50
  88. package/core/actions/dist/src/helpers/index.js +0 -48
  89. package/core/actions/dist/src/helpers/lib-entries.js +0 -161
  90. package/core/actions/dist/src/helpers/package-json.js +0 -136
  91. package/core/actions/dist/src/helpers/utils.js +0 -48
  92. package/core/actions/dist/src/helpers/vscode-custom-data.js +0 -83
  93. package/core/actions/dist/src/index.js +0 -583
  94. package/core/actions/dist/src/key-generate.js +0 -10
  95. package/core/actions/dist/src/lint/fix.js +0 -12
  96. package/core/actions/dist/src/lint/index.js +0 -17
  97. package/core/actions/dist/src/make.js +0 -291
  98. package/core/actions/dist/src/prepublish.js +0 -14
  99. package/core/actions/dist/src/release.js +0 -553
  100. package/core/actions/dist/src/test/coverage.js +0 -6
  101. package/core/actions/dist/src/test/feature.js +0 -6
  102. package/core/actions/dist/src/test/ui.js +0 -6
  103. package/core/actions/dist/src/test/unit.js +0 -6
  104. package/core/actions/dist/src/test.js +0 -6
  105. package/core/actions/dist/src/tinker.js +0 -5
  106. package/core/actions/dist/src/typecheck.js +0 -6
  107. package/core/actions/dist/src/types.js +0 -21
  108. package/core/actions/dist/src/upgrade/dependencies.js +0 -6
  109. package/core/actions/dist/src/upgrade/framework.js +0 -1
  110. package/core/actions/dist/src/upgrade/index.js +0 -54
  111. package/core/actions/dist/src/upgrade.js +0 -47
  112. package/core/actions/package.json +0 -92
  113. package/core/actions/src/action.ts +0 -52
  114. package/core/actions/src/actions.ts +0 -2
  115. package/core/actions/src/add.ts +0 -27
  116. package/core/actions/src/ai/request-model-access.ts +0 -74
  117. package/core/actions/src/build/cli.ts +0 -7
  118. package/core/actions/src/build/component-libs.ts +0 -5
  119. package/core/actions/src/build/core.ts +0 -34
  120. package/core/actions/src/build/desktop.ts +0 -7
  121. package/core/actions/src/build/docs.ts +0 -7
  122. package/core/actions/src/build/server.ts +0 -9
  123. package/core/actions/src/build/stacks.ts +0 -7
  124. package/core/actions/src/build.ts +0 -89
  125. package/core/actions/src/bump.ts +0 -18
  126. package/core/actions/src/cdn/invalidate-cache.ts +0 -27
  127. package/core/actions/src/changelog.ts +0 -21
  128. package/core/actions/src/clean.ts +0 -6
  129. package/core/actions/src/commit.ts +0 -14
  130. package/core/actions/src/copy-types.ts +0 -22
  131. package/core/actions/src/database/fields.ts +0 -111
  132. package/core/actions/src/database/migration-mysql.ts +0 -72
  133. package/core/actions/src/database/migration-sqlite.ts +0 -67
  134. package/core/actions/src/database/migration.ts +0 -10
  135. package/core/actions/src/database/seed.ts +0 -4
  136. package/core/actions/src/database/user-migration.ts +0 -20
  137. package/core/actions/src/deploy/create-receipt-rule.ts +0 -55
  138. package/core/actions/src/deploy/index.ts +0 -46
  139. package/core/actions/src/dev/api.ts +0 -18
  140. package/core/actions/src/dev/components.ts +0 -14
  141. package/core/actions/src/dev/dashboard.ts +0 -7
  142. package/core/actions/src/dev/desktop.ts +0 -7
  143. package/core/actions/src/dev/docs.ts +0 -7
  144. package/core/actions/src/dev/index.ts +0 -48
  145. package/core/actions/src/dev/system-tray.ts +0 -6
  146. package/core/actions/src/dev/views.ts +0 -7
  147. package/core/actions/src/domains/add.ts +0 -67
  148. package/core/actions/src/domains/purchase.ts +0 -76
  149. package/core/actions/src/domains/remove.ts +0 -38
  150. package/core/actions/src/examples.ts +0 -46
  151. package/core/actions/src/fresh.ts +0 -20
  152. package/core/actions/src/generate/action-types.ts +0 -89
  153. package/core/actions/src/generate/caddyfile.ts +0 -1
  154. package/core/actions/src/generate/component-meta.ts +0 -19
  155. package/core/actions/src/generate/custom-cli-file.ts +0 -24
  156. package/core/actions/src/generate/env-files.ts +0 -89
  157. package/core/actions/src/generate/ide-helpers.ts +0 -18
  158. package/core/actions/src/generate/index.ts +0 -132
  159. package/core/actions/src/generate/lib-entries.ts +0 -18
  160. package/core/actions/src/generate/model-classes.ts +0 -299
  161. package/core/actions/src/generate/model-generate.ts +0 -12
  162. package/core/actions/src/generate/pkgx-file.ts +0 -72
  163. package/core/actions/src/generate/types.ts +0 -6
  164. package/core/actions/src/generate/vscode-custom-data.ts +0 -19
  165. package/core/actions/src/generate/web-types.ts +0 -2
  166. package/core/actions/src/helpers/component-meta.ts +0 -93
  167. package/core/actions/src/helpers/index.ts +0 -1
  168. package/core/actions/src/helpers/lib-entries.ts +0 -139
  169. package/core/actions/src/helpers/package-json.ts +0 -96
  170. package/core/actions/src/helpers/utils.ts +0 -70
  171. package/core/actions/src/helpers/vscode-custom-data.ts +0 -35
  172. package/core/actions/src/index.ts +0 -29
  173. package/core/actions/src/key-generate.ts +0 -10
  174. package/core/actions/src/lint/fix.ts +0 -13
  175. package/core/actions/src/lint/index.ts +0 -27
  176. package/core/actions/src/make.ts +0 -322
  177. package/core/actions/src/migrate/database.ts +0 -1
  178. package/core/actions/src/migrate/dns.ts +0 -3
  179. package/core/actions/src/prepublish.ts +0 -17
  180. package/core/actions/src/release.ts +0 -18
  181. package/core/actions/src/start-caddy.ts +0 -13
  182. package/core/actions/src/test/coverage.ts +0 -5
  183. package/core/actions/src/test/feature.ts +0 -5
  184. package/core/actions/src/test/ui.ts +0 -5
  185. package/core/actions/src/test/unit.ts +0 -5
  186. package/core/actions/src/test.ts +0 -5
  187. package/core/actions/src/tinker.ts +0 -10
  188. package/core/actions/src/typecheck.ts +0 -5
  189. package/core/actions/src/types.ts +0 -20
  190. package/core/actions/src/upgrade/bun.ts +0 -4
  191. package/core/actions/src/upgrade/dependencies.ts +0 -0
  192. package/core/actions/src/upgrade/framework.ts +0 -30
  193. package/core/actions/src/upgrade/index.ts +0 -22
  194. package/core/actions/src/upgrade.ts +0 -68
  195. package/core/actions/tests/example.test.ts +0 -5
  196. package/core/ai/README.md +0 -67
  197. package/core/ai/build.ts +0 -9
  198. package/core/ai/dist/index.js +0 -10624
  199. package/core/ai/package.json +0 -60
  200. package/core/ai/src/chatbots.ts +0 -0
  201. package/core/ai/src/image-generation.ts +0 -0
  202. package/core/ai/src/index.ts +0 -8
  203. package/core/ai/src/personalization.ts +0 -0
  204. package/core/ai/src/search.ts +0 -0
  205. package/core/ai/src/text-generation.ts +0 -0
  206. package/core/ai/src/text-summary.ts +0 -0
  207. package/core/ai/src/utils/client-bedrock-runtime.ts +0 -38
  208. package/core/ai/src/utils/client-bedrock.ts +0 -53
  209. package/core/ai/tests/example.test.ts +0 -5
  210. package/core/ai/tsconfig.json +0 -3
  211. package/core/alias/README.md +0 -53
  212. package/core/alias/build.ts +0 -8
  213. package/core/alias/dist/index.js +0 -218
  214. package/core/alias/package.json +0 -52
  215. package/core/alias/src/index.ts +0 -220
  216. package/core/alias/tests/example.test.ts +0 -5
  217. package/core/alias/tsconfig.json +0 -3
  218. package/core/analytics/README.md +0 -55
  219. package/core/analytics/build.ts +0 -8
  220. package/core/analytics/dist/index.js +0 -5
  221. package/core/analytics/package.json +0 -55
  222. package/core/analytics/src/drivers/fathom.ts +0 -1
  223. package/core/analytics/src/drivers/index.ts +0 -1
  224. package/core/analytics/src/index.ts +0 -1
  225. package/core/analytics/tests/example.test.ts +0 -5
  226. package/core/analytics/tsconfig.json +0 -3
  227. package/core/api/build.ts +0 -7
  228. package/core/api/dist/index.js +0 -639
  229. package/core/api/package.json +0 -61
  230. package/core/api/src/index.ts +0 -115
  231. package/core/api/tsconfig.json +0 -3
  232. package/core/arrays/README.md +0 -59
  233. package/core/arrays/build.ts +0 -8
  234. package/core/arrays/dist/index.js +0 -469
  235. package/core/arrays/package.json +0 -60
  236. package/core/arrays/src/arr.ts +0 -3
  237. package/core/arrays/src/contains.ts +0 -87
  238. package/core/arrays/src/helpers.ts +0 -272
  239. package/core/arrays/src/index.ts +0 -3
  240. package/core/arrays/src/macro.ts +0 -131
  241. package/core/arrays/src/math.ts +0 -220
  242. package/core/arrays/tests/example.test.ts +0 -5
  243. package/core/arrays/tsconfig.json +0 -3
  244. package/core/auth/README.md +0 -59
  245. package/core/auth/build.ts +0 -8
  246. package/core/auth/dist/index.js +0 -5
  247. package/core/auth/package.json +0 -51
  248. package/core/auth/src/index.ts +0 -1
  249. package/core/auth/tests/example.test.ts +0 -5
  250. package/core/auth/tsconfig.json +0 -3
  251. package/core/buddy/bin/cli.ts +0 -46
  252. package/core/buddy/build.ts +0 -8
  253. package/core/buddy/compile.ts +0 -8
  254. package/core/buddy/dist/chunk-59a9de11428ba763.js +0 -993
  255. package/core/buddy/dist/cli.js +0 -676
  256. package/core/buddy/tsconfig.json +0 -3
  257. package/core/build/README.md +0 -59
  258. package/core/build/build.ts +0 -8
  259. package/core/build/dist/index.js +0 -19
  260. package/core/build/package.json +0 -64
  261. package/core/build/src/index.ts +0 -11
  262. package/core/build/tests/example.test.ts +0 -5
  263. package/core/build/tsconfig.json +0 -3
  264. package/core/build/web-types.config.cjs +0 -5
  265. package/core/build/web-types.ts +0 -15
  266. package/core/bun-create/bud/README.md +0 -45
  267. package/core/bun-create/bud/package.json +0 -151
  268. package/core/bun-create/buddy/README.md +0 -45
  269. package/core/bun-create/buddy/package.json +0 -150
  270. package/core/bun-create/stack/README.md +0 -45
  271. package/core/bun-create/stack/package.json +0 -150
  272. package/core/bun-create/stacks/README.md +0 -45
  273. package/core/bun-create/stacks/package.json +0 -150
  274. package/core/bun-create/stx/README.md +0 -45
  275. package/core/bun-create/stx/package.json +0 -151
  276. package/core/bun-plugin-yaml/README.md +0 -56
  277. package/core/bun-plugin-yaml/build.ts +0 -8
  278. package/core/bun-plugin-yaml/dist/index.js +0 -2763
  279. package/core/bun-plugin-yaml/package.json +0 -58
  280. package/core/bun-plugin-yaml/src/index.ts +0 -22
  281. package/core/bun-plugin-yaml/tests/example.test.ts +0 -5
  282. package/core/bun-plugin-yaml/tsconfig.json +0 -3
  283. package/core/cache/README.md +0 -59
  284. package/core/cache/build.ts +0 -8
  285. package/core/cache/dist/index.js +0 -88
  286. package/core/cache/package.json +0 -66
  287. package/core/cache/src/drivers/dynamodb.ts +0 -119
  288. package/core/cache/src/drivers/index.ts +0 -2
  289. package/core/cache/src/drivers/redis.ts +0 -37
  290. package/core/cache/src/index.ts +0 -1
  291. package/core/cache/tests/DynamoDB.test.ts +0 -135
  292. package/core/cache/tests/Memcached.test.ts +0 -51
  293. package/core/cache/tests/Redis.test.ts +0 -84
  294. package/core/cache/tsconfig.json +0 -3
  295. package/core/chat/README.md +0 -83
  296. package/core/chat/build.ts +0 -8
  297. package/core/chat/dist/index.js +0 -42
  298. package/core/chat/package.json +0 -74
  299. package/core/chat/src/drivers/discord.ts +0 -15
  300. package/core/chat/src/drivers/slack.ts +0 -24
  301. package/core/chat/src/drivers/teams.ts +0 -24
  302. package/core/chat/src/index.ts +0 -3
  303. package/core/chat/tests/example.test.ts +0 -5
  304. package/core/chat/tsconfig.json +0 -3
  305. package/core/cli/README.md +0 -168
  306. package/core/cli/build.ts +0 -8
  307. package/core/cli/dist/index.js +0 -780
  308. package/core/cli/package.json +0 -92
  309. package/core/cli/src/actions/index.ts +0 -1
  310. package/core/cli/src/actions/install.ts +0 -40
  311. package/core/cli/src/cli.ts +0 -30
  312. package/core/cli/src/command.ts +0 -47
  313. package/core/cli/src/console.ts +0 -79
  314. package/core/cli/src/exec.ts +0 -114
  315. package/core/cli/src/helpers.ts +0 -80
  316. package/core/cli/src/index.ts +0 -10
  317. package/core/cli/src/parse.ts +0 -179
  318. package/core/cli/src/run.ts +0 -99
  319. package/core/cli/src/spinner.ts +0 -3
  320. package/core/cli/src/utils.ts +0 -82
  321. package/core/cli/tests/example.test.ts +0 -5
  322. package/core/cli/tsconfig.json +0 -3
  323. package/core/cloud/README.md +0 -67
  324. package/core/cloud/build.ts +0 -12
  325. package/core/cloud/dist/index.js +0 -2013
  326. package/core/cloud/dist/origin-request.js +0 -27
  327. package/core/cloud/package.json +0 -119
  328. package/core/cloud/src/cloud/ai.ts +0 -94
  329. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +0 -386
  330. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +0 -15
  331. package/core/cloud/src/cloud/cache.ts +0 -0
  332. package/core/cloud/src/cloud/cdn.ts +0 -427
  333. package/core/cloud/src/cloud/cli.ts +0 -45
  334. package/core/cloud/src/cloud/compute.ts +0 -212
  335. package/core/cloud/src/cloud/dashboard.ts +0 -86
  336. package/core/cloud/src/cloud/database.ts +0 -0
  337. package/core/cloud/src/cloud/deployment.ts +0 -41
  338. package/core/cloud/src/cloud/dns.ts +0 -42
  339. package/core/cloud/src/cloud/docs.ts +0 -51
  340. package/core/cloud/src/cloud/email.ts +0 -339
  341. package/core/cloud/src/cloud/file-system.ts +0 -35
  342. package/core/cloud/src/cloud/index.ts +0 -135
  343. package/core/cloud/src/cloud/jump-box.ts +0 -48
  344. package/core/cloud/src/cloud/lambda/ask/index.js +0 -35
  345. package/core/cloud/src/cloud/lambda/cli-setup/index.js +0 -67
  346. package/core/cloud/src/cloud/lambda/summarize/index.js +0 -35
  347. package/core/cloud/src/cloud/network.ts +0 -32
  348. package/core/cloud/src/cloud/permissions.ts +0 -33
  349. package/core/cloud/src/cloud/queue.ts +0 -142
  350. package/core/cloud/src/cloud/redirects.ts +0 -45
  351. package/core/cloud/src/cloud/router-layer/nodejs/package.json +0 -15
  352. package/core/cloud/src/cloud/search-engine.ts +0 -108
  353. package/core/cloud/src/cloud/security.ts +0 -259
  354. package/core/cloud/src/cloud/storage.ts +0 -168
  355. package/core/cloud/src/edge/origin-request.ts +0 -49
  356. package/core/cloud/src/helpers.ts +0 -609
  357. package/core/cloud/src/index.ts +0 -2
  358. package/core/cloud/src/types.ts +0 -28
  359. package/core/cloud/tests/example.test.ts +0 -5
  360. package/core/cloud/tsconfig.json +0 -3
  361. package/core/cloud/zip.ts +0 -17
  362. package/core/collections/README.md +0 -71
  363. package/core/collections/build.ts +0 -8
  364. package/core/collections/dist/index.js +0 -6
  365. package/core/collections/package.json +0 -58
  366. package/core/collections/src/index.ts +0 -1
  367. package/core/collections/tests/example.test.ts +0 -5
  368. package/core/collections/tsconfig.json +0 -3
  369. package/core/config/README.md +0 -71
  370. package/core/config/build.ts +0 -8
  371. package/core/config/dist/index.js +0 -1807
  372. package/core/config/package.json +0 -54
  373. package/core/config/src/config.ts +0 -38
  374. package/core/config/src/defaults.ts +0 -478
  375. package/core/config/src/helpers.ts +0 -256
  376. package/core/config/src/index.ts +0 -2
  377. package/core/config/src/overrides.ts +0 -49
  378. package/core/config/tests/example.test.ts +0 -5
  379. package/core/config/tsconfig.json +0 -3
  380. package/core/custom-elements.json +0 -4
  381. package/core/database/README.md +0 -59
  382. package/core/database/build.ts +0 -8
  383. package/core/database/dist/index.js +0 -200
  384. package/core/database/package.json +0 -79
  385. package/core/database/src/index.ts +0 -63
  386. package/core/database/src/kysely-bun-worker/driver.ts +0 -144
  387. package/core/database/src/kysely-bun-worker/index.ts +0 -46
  388. package/core/database/src/kysely-bun-worker/mitt.ts +0 -24
  389. package/core/database/src/kysely-bun-worker/type.ts +0 -40
  390. package/core/database/src/kysely-bun-worker/worker.ts +0 -52
  391. package/core/database/src/migrations/index.ts +0 -73
  392. package/core/database/src/seeder/index.ts +0 -79
  393. package/core/database/tests/example.test.ts +0 -5
  394. package/core/database/tsconfig.json +0 -3
  395. package/core/datetime/README.md +0 -66
  396. package/core/datetime/build.ts +0 -8
  397. package/core/datetime/dist/index.js +0 -9
  398. package/core/datetime/package.json +0 -57
  399. package/core/datetime/src/index.ts +0 -7
  400. package/core/datetime/tests/example.test.ts +0 -5
  401. package/core/datetime/tsconfig.json +0 -3
  402. package/core/desktop/README.md +0 -49
  403. package/core/desktop/build.ts +0 -8
  404. package/core/desktop/dist/index.js +0 -3081
  405. package/core/desktop/package.json +0 -83
  406. package/core/desktop/src/index.ts +0 -43
  407. package/core/desktop/src/system-tray.ts +0 -1
  408. package/core/desktop/tests/example.test.ts +0 -5
  409. package/core/desktop/tsconfig.json +0 -3
  410. package/core/development/README.md +0 -27
  411. package/core/development/build.ts +0 -8
  412. package/core/development/dist/index.js +0 -6
  413. package/core/development/package.json +0 -77
  414. package/core/development/src/index.ts +0 -0
  415. package/core/development/tests/example.test.ts +0 -5
  416. package/core/development/tsconfig.json +0 -3
  417. package/core/dns/README.md +0 -56
  418. package/core/dns/build.ts +0 -8
  419. package/core/dns/dist/index.js +0 -166
  420. package/core/dns/package.json +0 -77
  421. package/core/dns/src/drivers/aws.ts +0 -224
  422. package/core/dns/src/index.ts +0 -20
  423. package/core/dns/tests/example.test.ts +0 -5
  424. package/core/dns/tsconfig.json +0 -3
  425. package/core/docs/README.md +0 -59
  426. package/core/docs/build.ts +0 -8
  427. package/core/docs/dist/index.js +0 -205
  428. package/core/docs/package.json +0 -70
  429. package/core/docs/src/index.ts +0 -67
  430. package/core/docs/src/meta.ts +0 -32
  431. package/core/docs/src/plugins.ts +0 -4
  432. package/core/docs/src/scripts/pwa.ts +0 -116
  433. package/core/docs/tests/example.test.ts +0 -5
  434. package/core/docs/tsconfig.json +0 -3
  435. package/core/email/README.md +0 -155
  436. package/core/email/build-inbound.ts +0 -8
  437. package/core/email/build.ts +0 -8
  438. package/core/email/dist/index.js +0 -287
  439. package/core/email/email-forwarder.cjs +0 -407
  440. package/core/email/email-forwarder.zip +0 -0
  441. package/core/email/package.json +0 -96
  442. package/core/email/src/drivers/emailjs.ts +0 -23
  443. package/core/email/src/drivers/index.ts +0 -9
  444. package/core/email/src/drivers/mailgun.ts +0 -21
  445. package/core/email/src/drivers/mailjet.ts +0 -21
  446. package/core/email/src/drivers/mandrill.ts +0 -19
  447. package/core/email/src/drivers/netcore.ts +0 -19
  448. package/core/email/src/drivers/nodemailer.ts +0 -23
  449. package/core/email/src/drivers/postmark.ts +0 -19
  450. package/core/email/src/drivers/sendgrid.ts +0 -20
  451. package/core/email/src/drivers/ses.ts +0 -22
  452. package/core/email/src/index.ts +0 -1
  453. package/core/email/src/send.ts +0 -37
  454. package/core/email/src/server/converter.ts +0 -305
  455. package/core/email/src/server/inbound.ts +0 -406
  456. package/core/email/src/server/outbound.ts +0 -296
  457. package/core/email/src/tailwind.config.ts +0 -39
  458. package/core/email/src/utils/config.ts +0 -7
  459. package/core/email/src/utils/template.html +0 -8
  460. package/core/email/tests/example.test.ts +0 -5
  461. package/core/email/tsconfig.json +0 -3
  462. package/core/enums/README.md +0 -54
  463. package/core/enums/build.ts +0 -8
  464. package/core/enums/dist/index.js +0 -101
  465. package/core/enums/package.json +0 -49
  466. package/core/enums/src/index.ts +0 -98
  467. package/core/enums/tests/example.test.ts +0 -5
  468. package/core/enums/tsconfig.json +0 -3
  469. package/core/env/README.md +0 -71
  470. package/core/env/build.ts +0 -8
  471. package/core/env/dist/index.js +0 -229
  472. package/core/env/package.json +0 -55
  473. package/core/env/src/index.ts +0 -76
  474. package/core/env/src/types.ts +0 -54
  475. package/core/env/src/utils.ts +0 -1
  476. package/core/env/tests/example.test.ts +0 -5
  477. package/core/env/tsconfig.json +0 -3
  478. package/core/error-handling/README.md +0 -131
  479. package/core/error-handling/build.ts +0 -8
  480. package/core/error-handling/dist/index.js +0 -432
  481. package/core/error-handling/package.json +0 -63
  482. package/core/error-handling/src/handler.ts +0 -51
  483. package/core/error-handling/src/index.ts +0 -2
  484. package/core/error-handling/tests/example.test.ts +0 -5
  485. package/core/error-handling/tsconfig.json +0 -3
  486. package/core/eslint-config/.gitattributes +0 -2
  487. package/core/eslint-config/README.md +0 -587
  488. package/core/eslint-config/build.ts +0 -8
  489. package/core/eslint-config/package.json +0 -122
  490. package/core/eslint-config/src/configs/comments.ts +0 -19
  491. package/core/eslint-config/src/configs/formatters.ts +0 -187
  492. package/core/eslint-config/src/configs/ignores.ts +0 -10
  493. package/core/eslint-config/src/configs/imports.ts +0 -46
  494. package/core/eslint-config/src/configs/index.ts +0 -21
  495. package/core/eslint-config/src/configs/javascript.ts +0 -226
  496. package/core/eslint-config/src/configs/jsdoc.ts +0 -42
  497. package/core/eslint-config/src/configs/jsonc.ts +0 -86
  498. package/core/eslint-config/src/configs/markdown.ts +0 -110
  499. package/core/eslint-config/src/configs/node.ts +0 -23
  500. package/core/eslint-config/src/configs/perfectionist.ts +0 -18
  501. package/core/eslint-config/src/configs/react.ts +0 -111
  502. package/core/eslint-config/src/configs/sort.ts +0 -223
  503. package/core/eslint-config/src/configs/stylistic.ts +0 -57
  504. package/core/eslint-config/src/configs/svelte.ts +0 -107
  505. package/core/eslint-config/src/configs/test.ts +0 -54
  506. package/core/eslint-config/src/configs/toml.ts +0 -72
  507. package/core/eslint-config/src/configs/typescript.ts +0 -157
  508. package/core/eslint-config/src/configs/unicorn.ts +0 -41
  509. package/core/eslint-config/src/configs/unocss.ts +0 -43
  510. package/core/eslint-config/src/configs/vue.ts +0 -168
  511. package/core/eslint-config/src/configs/yaml.ts +0 -72
  512. package/core/eslint-config/src/factory.ts +0 -255
  513. package/core/eslint-config/src/globs.ts +0 -91
  514. package/core/eslint-config/src/index.ts +0 -9
  515. package/core/eslint-config/src/plugins.ts +0 -10
  516. package/core/eslint-config/src/stub.d.ts +0 -3
  517. package/core/eslint-config/src/types.ts +0 -366
  518. package/core/eslint-config/src/utils.ts +0 -72
  519. package/core/eslint-config/src/vendor/prettier-types.ts +0 -136
  520. package/core/eslint-config/test/cli.spec.ts +0 -91
  521. package/core/eslint-config/test/fixtures.test.ts +0 -125
  522. package/core/eslint-config/tsconfig.json +0 -17
  523. package/core/eslint-config/tsup.config.ts +0 -8
  524. package/core/events/README.md +0 -76
  525. package/core/events/build.ts +0 -8
  526. package/core/events/dist/index.js +0 -63
  527. package/core/events/package.json +0 -53
  528. package/core/events/src/index.ts +0 -167
  529. package/core/events/tests/example.test.ts +0 -5
  530. package/core/events/tsconfig.json +0 -3
  531. package/core/faker/README.md +0 -53
  532. package/core/faker/build.ts +0 -8
  533. package/core/faker/dist/index.js +0 -6
  534. package/core/faker/package.json +0 -62
  535. package/core/faker/src/index.ts +0 -1
  536. package/core/faker/tests/example.test.ts +0 -5
  537. package/core/faker/tsconfig.json +0 -3
  538. package/core/git/README.md +0 -65
  539. package/core/git/build.ts +0 -8
  540. package/core/git/dist/index.js +0 -46
  541. package/core/git/package.json +0 -69
  542. package/core/git/src/index.ts +0 -63
  543. package/core/git/tests/example.test.ts +0 -5
  544. package/core/git/tsconfig.json +0 -3
  545. package/core/health/README.md +0 -56
  546. package/core/health/build.ts +0 -8
  547. package/core/health/dist/index.js +0 -9
  548. package/core/health/package.json +0 -59
  549. package/core/health/src/drivers/index.ts +0 -1
  550. package/core/health/src/drivers/ohdear.ts +0 -1
  551. package/core/health/src/index.ts +0 -2
  552. package/core/health/src/notifications/index.ts +0 -1
  553. package/core/health/tests/example.test.ts +0 -5
  554. package/core/health/tsconfig.json +0 -3
  555. package/core/http/README.md +0 -59
  556. package/core/http/build.ts +0 -8
  557. package/core/http/dist/index.js +0 -65
  558. package/core/http/package.json +0 -53
  559. package/core/http/src/index.ts +0 -71
  560. package/core/http/tsconfig.json +0 -3
  561. package/core/index.ts +0 -57
  562. package/core/lint/.eslintrc.json +0 -3
  563. package/core/lint/README.md +0 -73
  564. package/core/lint/build.ts +0 -8
  565. package/core/lint/dist/index.js +0 -6
  566. package/core/lint/package.json +0 -70
  567. package/core/lint/src/index.ts +0 -3
  568. package/core/lint/tests/example.test.ts +0 -5
  569. package/core/lint/tsconfig.json +0 -3
  570. package/core/logging/README.md +0 -58
  571. package/core/logging/build.ts +0 -8
  572. package/core/logging/dist/index.js +0 -89
  573. package/core/logging/package.json +0 -62
  574. package/core/logging/src/index.ts +0 -136
  575. package/core/logging/tests/example.test.ts +0 -5
  576. package/core/logging/tsconfig.json +0 -3
  577. package/core/notifications/README.md +0 -272
  578. package/core/notifications/build.ts +0 -8
  579. package/core/notifications/dist/index.js +0 -54
  580. package/core/notifications/package.json +0 -104
  581. package/core/notifications/src/drivers/chat.ts +0 -1
  582. package/core/notifications/src/drivers/email.ts +0 -1
  583. package/core/notifications/src/drivers/index.ts +0 -4
  584. package/core/notifications/src/drivers/push.ts +0 -1
  585. package/core/notifications/src/drivers/sms.ts +0 -1
  586. package/core/notifications/src/index.ts +0 -51
  587. package/core/notifications/src/tailwind.config.ts +0 -39
  588. package/core/notifications/src/utils/config.ts +0 -5
  589. package/core/notifications/src/utils/template.html +0 -8
  590. package/core/notifications/tests/chat/Slack.test.ts +0 -34
  591. package/core/notifications/tests/email/Mailgun.test.ts +0 -40
  592. package/core/notifications/tests/email/Sendgrid.test.ts +0 -40
  593. package/core/notifications/tests/sms/Twilio.test.ts +0 -37
  594. package/core/notifications/tsconfig.json +0 -3
  595. package/core/objects/README.md +0 -71
  596. package/core/objects/build.ts +0 -8
  597. package/core/objects/dist/index.js +0 -64
  598. package/core/objects/package.json +0 -64
  599. package/core/objects/src/index.ts +0 -145
  600. package/core/objects/tests/example.test.ts +0 -5
  601. package/core/objects/tsconfig.json +0 -3
  602. package/core/orm/README.md +0 -48
  603. package/core/orm/build.ts +0 -8
  604. package/core/orm/dist/index.js +0 -6
  605. package/core/orm/package.json +0 -60
  606. package/core/orm/src/index.ts +0 -49
  607. package/core/orm/tests/example.test.ts +0 -5
  608. package/core/orm/tsconfig.json +0 -3
  609. package/core/path/README.md +0 -64
  610. package/core/path/build.ts +0 -8
  611. package/core/path/dist/index.js +0 -573
  612. package/core/path/package.json +0 -55
  613. package/core/path/src/index.ts +0 -615
  614. package/core/path/tests/example.test.ts +0 -5
  615. package/core/path/tsconfig.json +0 -3
  616. package/core/payments/README.md +0 -64
  617. package/core/payments/build.ts +0 -8
  618. package/core/payments/dist/index.js +0 -6296
  619. package/core/payments/package.json +0 -61
  620. package/core/payments/src/drivers/stripe.ts +0 -116
  621. package/core/payments/src/index.ts +0 -1
  622. package/core/payments/tests/example.test.ts +0 -5
  623. package/core/payments/tsconfig.json +0 -3
  624. package/core/playwright.config.ts +0 -109
  625. package/core/push/README.md +0 -71
  626. package/core/push/build.ts +0 -9
  627. package/core/push/dist/index.js +0 -35
  628. package/core/push/package.json +0 -65
  629. package/core/push/src/drivers/expo.ts +0 -21
  630. package/core/push/src/drivers/fcm.ts +0 -21
  631. package/core/push/src/drivers/index.ts +0 -2
  632. package/core/push/src/index.ts +0 -1
  633. package/core/push/tests/example.test.ts +0 -5
  634. package/core/push/tsconfig.json +0 -3
  635. package/core/query-builder/README.md +0 -48
  636. package/core/query-builder/build.ts +0 -8
  637. package/core/query-builder/dist/index.js +0 -18
  638. package/core/query-builder/package.json +0 -60
  639. package/core/query-builder/src/index.ts +0 -1
  640. package/core/query-builder/src/kysely.ts +0 -38
  641. package/core/query-builder/tests/example.test.ts +0 -5
  642. package/core/query-builder/tsconfig.json +0 -3
  643. package/core/queue/README.md +0 -59
  644. package/core/queue/build.ts +0 -8
  645. package/core/queue/dist/index.js +0 -25
  646. package/core/queue/package.json +0 -56
  647. package/core/queue/src/index.ts +0 -23
  648. package/core/queue/tests/example.test.ts +0 -5
  649. package/core/queue/tsconfig.json +0 -3
  650. package/core/raycast/package.json +0 -9
  651. package/core/raycast/src/index.ts +0 -0
  652. package/core/realtime/README.md +0 -59
  653. package/core/realtime/build.ts +0 -8
  654. package/core/realtime/dist/index.js +0 -6
  655. package/core/realtime/package.json +0 -53
  656. package/core/realtime/src/drivers/index.ts +0 -1
  657. package/core/realtime/src/index.ts +0 -1
  658. package/core/realtime/tests/example.test.ts +0 -5
  659. package/core/realtime/tsconfig.json +0 -3
  660. package/core/repl/README.md +0 -53
  661. package/core/repl/build.ts +0 -8
  662. package/core/repl/dist/index.js +0 -6
  663. package/core/repl/package.json +0 -60
  664. package/core/repl/src/index.ts +0 -1
  665. package/core/repl/tests/example.test.ts +0 -5
  666. package/core/repl/tsconfig.json +0 -3
  667. package/core/router/README.md +0 -59
  668. package/core/router/build.ts +0 -8
  669. package/core/router/dist/index.js +0 -1524
  670. package/core/router/package.json +0 -64
  671. package/core/router/src/index.ts +0 -4
  672. package/core/router/src/middleware.ts +0 -34
  673. package/core/router/src/request.ts +0 -44
  674. package/core/router/src/router.ts +0 -294
  675. package/core/router/src/server.ts +0 -173
  676. package/core/router/tests/example.test.ts +0 -5
  677. package/core/router/tsconfig.json +0 -3
  678. package/core/scheduler/README.md +0 -137
  679. package/core/scheduler/build.ts +0 -8
  680. package/core/scheduler/dist/index.js +0 -742
  681. package/core/scheduler/package.json +0 -62
  682. package/core/scheduler/src/constants.ts +0 -81
  683. package/core/scheduler/src/errors.ts +0 -7
  684. package/core/scheduler/src/index.ts +0 -20
  685. package/core/scheduler/src/job.ts +0 -315
  686. package/core/scheduler/src/schedule.ts +0 -116
  687. package/core/scheduler/src/time.ts +0 -823
  688. package/core/scheduler/src/types/cron.ts +0 -98
  689. package/core/scheduler/src/types/utils.ts +0 -14
  690. package/core/scheduler/src/utils.ts +0 -19
  691. package/core/scheduler/tests/cron.fuzz.ts +0 -120
  692. package/core/scheduler/tests/cron.test.ts +0 -1243
  693. package/core/scheduler/tests/crontime.test.ts +0 -780
  694. package/core/scheduler/tsconfig.json +0 -3
  695. package/core/search-engine/README.md +0 -66
  696. package/core/search-engine/build.ts +0 -8
  697. package/core/search-engine/dist/index.js +0 -87
  698. package/core/search-engine/package.json +0 -68
  699. package/core/search-engine/src/drivers/index.ts +0 -1
  700. package/core/search-engine/src/drivers/meilisearch.ts +0 -124
  701. package/core/search-engine/src/drivers/opensearch.ts +0 -59
  702. package/core/search-engine/src/helpers.ts +0 -138
  703. package/core/search-engine/src/index.ts +0 -69
  704. package/core/search-engine/tests/example.test.ts +0 -5
  705. package/core/search-engine/tsconfig.json +0 -3
  706. package/core/security/README.md +0 -66
  707. package/core/security/build.ts +0 -8
  708. package/core/security/dist/index.js +0 -3285
  709. package/core/security/package.json +0 -66
  710. package/core/security/src/crypt.ts +0 -23
  711. package/core/security/src/hash.ts +0 -54
  712. package/core/security/src/index.ts +0 -3
  713. package/core/security/src/key.ts +0 -11
  714. package/core/security/tests/example.test.ts +0 -5
  715. package/core/security/tsconfig.json +0 -3
  716. package/core/server/README.md +0 -51
  717. package/core/server/build.ts +0 -8
  718. package/core/server/dist/index.js +0 -52
  719. package/core/server/package.json +0 -68
  720. package/core/server/src/config.ts +0 -64
  721. package/core/server/src/index.ts +0 -1
  722. package/core/server/tests/example.test.ts +0 -5
  723. package/core/server/tsconfig.json +0 -3
  724. package/core/signals/README.md +0 -105
  725. package/core/signals/build.ts +0 -8
  726. package/core/signals/dist/index.js +0 -9
  727. package/core/signals/package.json +0 -64
  728. package/core/signals/src/index.ts +0 -1
  729. package/core/signals/tests/example.test.ts +0 -5
  730. package/core/signals/tsconfig.json +0 -3
  731. package/core/slug/README.md +0 -59
  732. package/core/slug/build.ts +0 -8
  733. package/core/slug/dist/index.js +0 -5
  734. package/core/slug/package.json +0 -66
  735. package/core/slug/src/index.ts +0 -56
  736. package/core/slug/tests/example.test.ts +0 -5
  737. package/core/slug/tsconfig.json +0 -3
  738. package/core/sms/README.md +0 -137
  739. package/core/sms/build.ts +0 -9
  740. package/core/sms/dist/index.js +0 -240
  741. package/core/sms/package.json +0 -83
  742. package/core/sms/src/drivers/gupshup.ts +0 -21
  743. package/core/sms/src/drivers/index.ts +0 -8
  744. package/core/sms/src/drivers/nexmo.ts +0 -23
  745. package/core/sms/src/drivers/plivo.ts +0 -23
  746. package/core/sms/src/drivers/sms77.ts +0 -22
  747. package/core/sms/src/drivers/sns.ts +0 -22
  748. package/core/sms/src/drivers/telnyx.ts +0 -23
  749. package/core/sms/src/drivers/termii.ts +0 -22
  750. package/core/sms/src/drivers/twilio.ts +0 -23
  751. package/core/sms/src/index.ts +0 -1
  752. package/core/sms/tests/example.test.ts +0 -5
  753. package/core/sms/tsconfig.json +0 -3
  754. package/core/stacks +0 -2
  755. package/core/storage/README.md +0 -74
  756. package/core/storage/build.ts +0 -8
  757. package/core/storage/dist/index.js +0 -816
  758. package/core/storage/package.json +0 -78
  759. package/core/storage/src/copy.ts +0 -42
  760. package/core/storage/src/delete.ts +0 -131
  761. package/core/storage/src/drivers/aws.ts +0 -15
  762. package/core/storage/src/drivers/index.ts +0 -1
  763. package/core/storage/src/files.ts +0 -187
  764. package/core/storage/src/folders.ts +0 -51
  765. package/core/storage/src/fs.ts +0 -9
  766. package/core/storage/src/glob.ts +0 -1
  767. package/core/storage/src/hash.ts +0 -39
  768. package/core/storage/src/helpers.ts +0 -29
  769. package/core/storage/src/index.ts +0 -11
  770. package/core/storage/src/move.ts +0 -84
  771. package/core/storage/src/storage.ts +0 -10
  772. package/core/storage/src/visibility.ts +0 -6
  773. package/core/storage/src/zip.ts +0 -55
  774. package/core/storage/tests/example.test.ts +0 -5
  775. package/core/storage/tsconfig.json +0 -3
  776. package/core/strings/README.md +0 -137
  777. package/core/strings/build.ts +0 -9
  778. package/core/strings/dist/index.js +0 -393
  779. package/core/strings/package.json +0 -82
  780. package/core/strings/src/case.ts +0 -27
  781. package/core/strings/src/helpers.ts +0 -3
  782. package/core/strings/src/index.ts +0 -2
  783. package/core/strings/src/is.ts +0 -170
  784. package/core/strings/src/macro.ts +0 -131
  785. package/core/strings/src/pluralize.ts +0 -26
  786. package/core/strings/src/string.ts +0 -5
  787. package/core/strings/src/types.ts +0 -4
  788. package/core/strings/src/utils.ts +0 -117
  789. package/core/strings/tests/example.test.ts +0 -5
  790. package/core/strings/tsconfig.json +0 -3
  791. package/core/stx +0 -2
  792. package/core/tables/README.md +0 -110
  793. package/core/tables/examples/vue/App.stx +0 -12
  794. package/core/tables/examples/vue/favicon.png +0 -0
  795. package/core/tables/examples/vue/index.html +0 -20
  796. package/core/tables/examples/web/favicon.png +0 -0
  797. package/core/tables/examples/web/index.html +0 -13
  798. package/core/tables/index.html +0 -13
  799. package/core/tables/package.json +0 -57
  800. package/core/tables/src/App.stx +0 -23
  801. package/core/tables/src/commands/index.ts +0 -1
  802. package/core/tables/src/components/Demo.stx +0 -84
  803. package/core/tables/src/components/README.md +0 -109
  804. package/core/tables/src/components/Table.stx +0 -342
  805. package/core/tables/src/components/TableBody.stx +0 -32
  806. package/core/tables/src/components/TableCellActionItems.stx +0 -9
  807. package/core/tables/src/components/TableFilters.stx +0 -704
  808. package/core/tables/src/components/TableHead.stx +0 -60
  809. package/core/tables/src/components/TablePagination.stx +0 -131
  810. package/core/tables/src/components/TableRow.stx +0 -73
  811. package/core/tables/src/components/TableSearch.stx +0 -39
  812. package/core/tables/src/components/Tooltip.stx +0 -10
  813. package/core/tables/src/components.d.ts +0 -24
  814. package/core/tables/src/config/tables.ts +0 -2
  815. package/core/tables/src/docs/index.md +0 -0
  816. package/core/tables/src/functions/README.md +0 -8
  817. package/core/tables/src/functions/dark.ts +0 -3
  818. package/core/tables/src/functions/index.ts +0 -2
  819. package/core/tables/src/functions/table.ts +0 -207
  820. package/core/tables/src/main.ts +0 -4
  821. package/core/tables/tests/example.test.ts +0 -5
  822. package/core/tables/tsconfig.json +0 -3
  823. package/core/testing/README.md +0 -59
  824. package/core/testing/build.ts +0 -8
  825. package/core/testing/dist/index.js +0 -14983
  826. package/core/testing/package.json +0 -65
  827. package/core/testing/src/index.ts +0 -13
  828. package/core/testing/tsconfig.json +0 -3
  829. package/core/tinker/package.json +0 -47
  830. package/core/tinker/src/index.ts +0 -1
  831. package/core/tinker/tsconfig.json +0 -3
  832. package/core/tmp.json +0 -0
  833. package/core/tsconfig.json +0 -70
  834. package/core/tunnel/README.md +0 -53
  835. package/core/tunnel/build.ts +0 -8
  836. package/core/tunnel/dist/index.js +0 -10
  837. package/core/tunnel/package.json +0 -58
  838. package/core/tunnel/src/index.ts +0 -6
  839. package/core/tunnel/tests/example.test.ts +0 -5
  840. package/core/tunnel/tsconfig.json +0 -3
  841. package/core/types/README.md +0 -59
  842. package/core/types/build.ts +0 -8
  843. package/core/types/dist/index.js +0 -2285
  844. package/core/types/package.json +0 -87
  845. package/core/types/src/ai.ts +0 -26
  846. package/core/types/src/analytics.ts +0 -21
  847. package/core/types/src/api.ts +0 -65
  848. package/core/types/src/app.ts +0 -172
  849. package/core/types/src/auto-imports.ts +0 -1
  850. package/core/types/src/binary.ts +0 -13
  851. package/core/types/src/build.ts +0 -2
  852. package/core/types/src/cache.ts +0 -98
  853. package/core/types/src/cdn.ts +0 -17
  854. package/core/types/src/chat.ts +0 -5
  855. package/core/types/src/cli.ts +0 -315
  856. package/core/types/src/cloud.ts +0 -105
  857. package/core/types/src/components.ts +0 -64
  858. package/core/types/src/configure.ts +0 -13
  859. package/core/types/src/cron-jobs.ts +0 -51
  860. package/core/types/src/database.ts +0 -45
  861. package/core/types/src/dependencies.ts +0 -69
  862. package/core/types/src/deploy.ts +0 -13
  863. package/core/types/src/dns.ts +0 -186
  864. package/core/types/src/docs.ts +0 -26
  865. package/core/types/src/email.ts +0 -16
  866. package/core/types/src/env.ts +0 -1
  867. package/core/types/src/errors.ts +0 -11
  868. package/core/types/src/events.ts +0 -30
  869. package/core/types/src/exit-code.ts +0 -10
  870. package/core/types/src/file-systems.ts +0 -70
  871. package/core/types/src/git.ts +0 -133
  872. package/core/types/src/hashing.ts +0 -131
  873. package/core/types/src/helpers.ts +0 -11
  874. package/core/types/src/i18n.ts +0 -19
  875. package/core/types/src/index.ts +0 -60
  876. package/core/types/src/inspect.ts +0 -10
  877. package/core/types/src/layout.ts +0 -8
  878. package/core/types/src/library.ts +0 -156
  879. package/core/types/src/logger.ts +0 -54
  880. package/core/types/src/manifest.ts +0 -9
  881. package/core/types/src/model.ts +0 -72
  882. package/core/types/src/money.ts +0 -3
  883. package/core/types/src/native.ts +0 -0
  884. package/core/types/src/notifications.ts +0 -147
  885. package/core/types/src/pages.ts +0 -10
  886. package/core/types/src/payments.ts +0 -65
  887. package/core/types/src/promise.ts +0 -1
  888. package/core/types/src/push.ts +0 -36
  889. package/core/types/src/pwa.ts +0 -8
  890. package/core/types/src/queue.ts +0 -38
  891. package/core/types/src/reactivity.ts +0 -1
  892. package/core/types/src/request.ts +0 -3
  893. package/core/types/src/router.ts +0 -73
  894. package/core/types/src/scheduler.ts +0 -1
  895. package/core/types/src/search-engine.ts +0 -136
  896. package/core/types/src/security.ts +0 -23
  897. package/core/types/src/services.ts +0 -44
  898. package/core/types/src/sms.ts +0 -5
  899. package/core/types/src/ssg.ts +0 -3
  900. package/core/types/src/stacks.ts +0 -236
  901. package/core/types/src/storage.ts +0 -13
  902. package/core/types/src/tables.ts +0 -57
  903. package/core/types/src/team.ts +0 -8
  904. package/core/types/src/ui.ts +0 -189
  905. package/core/types/src/utils.ts +0 -47
  906. package/core/types/tsconfig.json +0 -3
  907. package/core/ui/README.md +0 -66
  908. package/core/ui/build.ts +0 -8
  909. package/core/ui/dist/components.js +0 -68
  910. package/core/ui/dist/index.js +0 -121
  911. package/core/ui/package.json +0 -93
  912. package/core/ui/src/components/autocomplete.ts +0 -0
  913. package/core/ui/src/components/disclosure.ts +0 -5
  914. package/core/ui/src/components/menu.ts +0 -1
  915. package/core/ui/src/components/modal.ts +0 -6
  916. package/core/ui/src/components/popover.ts +0 -1
  917. package/core/ui/src/components/radio-group.ts +0 -5
  918. package/core/ui/src/components/select.ts +0 -6
  919. package/core/ui/src/components/tabs.ts +0 -1
  920. package/core/ui/src/components/toggle.ts +0 -1
  921. package/core/ui/src/components/transition.ts +0 -1
  922. package/core/ui/src/components.ts +0 -10
  923. package/core/ui/src/index.ts +0 -15
  924. package/core/ui/src/uno.config.ts +0 -66
  925. package/core/ui/tests/example.test.ts +0 -5
  926. package/core/ui/tsconfig.json +0 -3
  927. package/core/utils/build.ts +0 -8
  928. package/core/utils/dist/index.js +0 -1311
  929. package/core/utils/package.json +0 -111
  930. package/core/utils/scripts/export-size.ts +0 -94
  931. package/core/utils/src/base.ts +0 -12
  932. package/core/utils/src/clean.ts +0 -17
  933. package/core/utils/src/config.ts +0 -25
  934. package/core/utils/src/currency.ts +0 -29
  935. package/core/utils/src/debounce.ts +0 -1
  936. package/core/utils/src/delete.ts +0 -1
  937. package/core/utils/src/equal.ts +0 -27
  938. package/core/utils/src/export-size.ts +0 -1
  939. package/core/utils/src/function.ts +0 -32
  940. package/core/utils/src/git.ts +0 -11
  941. package/core/utils/src/glob.ts +0 -1
  942. package/core/utils/src/guards.ts +0 -39
  943. package/core/utils/src/hash.ts +0 -26
  944. package/core/utils/src/helpers.ts +0 -187
  945. package/core/utils/src/index.ts +0 -23
  946. package/core/utils/src/macroable.ts +0 -1
  947. package/core/utils/src/math.ts +0 -30
  948. package/core/utils/src/p.ts +0 -119
  949. package/core/utils/src/promise.ts +0 -117
  950. package/core/utils/src/regex.ts +0 -2
  951. package/core/utils/src/retry.ts +0 -33
  952. package/core/utils/src/sleep.ts +0 -60
  953. package/core/utils/src/throttle.ts +0 -44
  954. package/core/utils/src/vendors.ts +0 -258
  955. package/core/utils/src/versions.ts +0 -6
  956. package/core/utils/tests/example.test.ts +0 -5
  957. package/core/utils/tsconfig.json +0 -3
  958. package/core/validation/README.md +0 -53
  959. package/core/validation/build.ts +0 -5
  960. package/core/validation/dist/index.js +0 -187
  961. package/core/validation/package.json +0 -64
  962. package/core/validation/src/index.ts +0 -4
  963. package/core/validation/src/is.ts +0 -111
  964. package/core/validation/src/rules.ts +0 -126
  965. package/core/validation/src/types/index.ts +0 -7
  966. package/core/validation/src/types/money.ts +0 -17
  967. package/core/validation/src/validate.ts +0 -33
  968. package/core/validation/tests/example.test.ts +0 -5
  969. package/core/validation/tsconfig.json +0 -3
  970. package/core/vite/README.md +0 -59
  971. package/core/vite/build.ts +0 -9
  972. package/core/vite/dist/index.js +0 -644
  973. package/core/vite/package.json +0 -122
  974. package/core/vite/src/api.ts +0 -17
  975. package/core/vite/src/components.ts +0 -79
  976. package/core/vite/src/dashboard.ts +0 -100
  977. package/core/vite/src/desktop.ts +0 -3
  978. package/core/vite/src/example-vue.ts +0 -20
  979. package/core/vite/src/example-wc.ts +0 -24
  980. package/core/vite/src/functions.ts +0 -54
  981. package/core/vite/src/index.ts +0 -18
  982. package/core/vite/src/plugin/auto-imports.ts +0 -39
  983. package/core/vite/src/plugin/components.ts +0 -17
  984. package/core/vite/src/plugin/css-engine.ts +0 -18
  985. package/core/vite/src/plugin/devtools.ts +0 -1
  986. package/core/vite/src/plugin/docs.ts +0 -18
  987. package/core/vite/src/plugin/fonts.ts +0 -6
  988. package/core/vite/src/plugin/i18n.ts +0 -13
  989. package/core/vite/src/plugin/inspect.ts +0 -6
  990. package/core/vite/src/plugin/layouts.ts +0 -17
  991. package/core/vite/src/plugin/markdown.ts +0 -26
  992. package/core/vite/src/plugin/pages.ts +0 -34
  993. package/core/vite/src/plugin/presets.ts +0 -17
  994. package/core/vite/src/plugin/pwa.ts +0 -33
  995. package/core/vite/src/plugin/router.ts +0 -17
  996. package/core/vite/src/plugin/stacks.ts +0 -150
  997. package/core/vite/src/plugin/ui-engine.ts +0 -19
  998. package/core/vite/src/plugins.ts +0 -12
  999. package/core/vite/src/system-tray.ts +0 -100
  1000. package/core/vite/src/views.ts +0 -97
  1001. package/core/vite/src/web-components.ts +0 -67
  1002. package/core/vite/tests/example.test.ts +0 -5
  1003. package/core/vite/tsconfig.json +0 -3
  1004. package/core/web-types.json +0 -67
  1005. package/core/whois/README.md +0 -55
  1006. package/core/whois/build.ts +0 -8
  1007. package/core/whois/dist/index.js +0 -600
  1008. package/core/whois/package.json +0 -61
  1009. package/core/whois/src/index.ts +0 -499
  1010. package/core/whois/src/parameters.ts +0 -4
  1011. package/core/whois/src/servers.ts +0 -318
  1012. package/core/whois/src/test.ts +0 -5
  1013. package/core/whois/tests/example.test.ts +0 -5
  1014. package/core/whois/tsconfig.json +0 -3
  1015. package/core/x-ray/README.md +0 -55
  1016. package/core/x-ray/index.html +0 -13
  1017. package/core/x-ray/package.json +0 -53
  1018. package/core/x-ray/routes/index.ts +0 -19
  1019. package/core/x-ray/src/client.ts +0 -14
  1020. package/core/x-ray/src/desktop/api/nitro.config.ts +0 -19
  1021. package/core/x-ray/src/desktop/api/routes/api/logs.ts +0 -7
  1022. package/core/x-ray/src/desktop/api/routes/api/store-logs.ts +0 -22
  1023. package/core/x-ray/src/desktop/api/src/types.ts +0 -7
  1024. package/core/x-ray/src/desktop/api/storage/index.ts +0 -7
  1025. package/core/x-ray/src/desktop/app.stx +0 -377
  1026. package/core/x-ray/src/desktop/functions/http.ts +0 -26
  1027. package/core/x-ray/src/desktop/functions/types.ts +0 -7
  1028. package/core/x-ray/src/desktop/main.ts +0 -8
  1029. package/core/x-ray/src/desktop/modules/counter/mod.stx +0 -44
  1030. package/core/x-ray/src/desktop/modules/fetcher/mod.stx +0 -63
  1031. package/core/x-ray/src/desktop/plugins/unified/unified-app.ts +0 -5
  1032. package/core/x-ray/src/desktop/plugins/unified/unified-styles.scss +0 -0
  1033. package/core/x-ray/src/desktop/services/http.ts +0 -45
  1034. package/core/x-ray/src/desktop/styles/app.scss +0 -0
  1035. package/core/x-ray/src/http.ts +0 -26
  1036. package/core/x-ray/src/index.ts +0 -42
  1037. package/core/x-ray/src/ray.config.ts +0 -27
  1038. package/core/x-ray/src/types.ts +0 -8
  1039. package/core/x-ray/tests/example.test.ts +0 -5
  1040. package/core/x-ray/tsconfig.json +0 -3
  1041. package/core/zsh-buddy/README.md +0 -55
  1042. package/core/zsh-buddy/buddy.plugin.zsh +0 -113
  1043. package/core/zsh-buddy/package.json +0 -35
  1044. package/ide/dictionary.txt +0 -331
  1045. package/ide/jetbrains/.fleet/settings.json +0 -4
  1046. package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +0 -6
  1047. package/ide/jetbrains/.idea/jsLibraryMappings.xml +0 -6
  1048. package/ide/jetbrains/.idea/jsLinters/eslint.xml +0 -7
  1049. package/ide/jetbrains/.idea/modules.xml +0 -8
  1050. package/ide/jetbrains/.idea/stacks.iml +0 -68
  1051. package/ide/jetbrains/.idea/vcs.xml +0 -6
  1052. package/ide/jetbrains/.idea/webResources.xml +0 -14
  1053. package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
  1054. package/ide/jetbrains/installed.txt +0 -4
  1055. package/ide/jetbrains/options/github-copilot.xml +0 -5
  1056. package/ide/jetbrains/options/nodejs.xml +0 -7
  1057. package/ide/jetbrains/options/templates.xml +0 -124
  1058. package/ide/jetbrains/templates/JavaScript.xml +0 -6
  1059. package/ide/jetbrains/templates/Stacks.xml +0 -8
  1060. package/ide/vscode/.vscode/README.md +0 -23
  1061. package/ide/vscode/.vscode/extensions.json +0 -5
  1062. package/ide/vscode/.vscode/settings.json +0 -132
  1063. package/ide/vscode/.vscode/stacks.code-snippets +0 -182
  1064. package/ide/vscode/LICENSE.md +0 -21
  1065. package/ide/vscode/README.md +0 -37
  1066. package/ide/vscode/logo.png +0 -0
  1067. package/ide/vscode/package.json +0 -63
  1068. package/stubs/.gitkeep +0 -0
  1069. package/stubs/TODO.md +0 -18
  1070. package/vcs/github/CODE_OF_CONDUCT.md +0 -83
  1071. package/vcs/github/CONTRIBUTING.md +0 -188
  1072. package/vcs/github/EXPLANATIONS.md +0 -41
  1073. package/vcs/github/FUNDING.yml +0 -1
  1074. package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +0 -49
  1075. package/vcs/github/ISSUE_TEMPLATE/config.yml +0 -10
  1076. package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +0 -44
  1077. package/vcs/github/SECURITY.md +0 -70
  1078. package/vcs/github/renovate.json +0 -5
  1079. package/vcs/github/stale.yml +0 -14
  1080. package/vcs/github/workflows/README.md +0 -16
  1081. package/vcs/github/workflows/ci.yml +0 -174
  1082. package/vcs/github/workflows/export-size.yml +0 -23
  1083. package/vcs/github/workflows/labeler.yml +0 -13
  1084. package/vcs/github/workflows/release.yml +0 -69
  1085. package/{core/README.md → README.md} +0 -0
  1086. package/{core/buddy → buddy}/README.md +0 -0
  1087. package/{core/buddy → buddy}/art/social.jpg +0 -0
  1088. package/{core/buddy/dist/chunk-0455e53fab4244b1.js → buddy/dist/chunk-970e033f764e29fc.js} +0 -0
  1089. package/{core/buddy → buddy}/src/commands/build.ts +0 -0
  1090. package/{core/buddy → buddy}/src/commands/changelog.ts +0 -0
  1091. package/{core/buddy → buddy}/src/commands/clean.ts +0 -0
  1092. package/{core/buddy → buddy}/src/commands/cloud.ts +0 -0
  1093. package/{core/buddy → buddy}/src/commands/configure.ts +0 -0
  1094. package/{core/buddy → buddy}/src/commands/dns.ts +0 -0
  1095. package/{core/buddy → buddy}/src/commands/domains.ts +0 -0
  1096. package/{core/buddy → buddy}/src/commands/fresh.ts +0 -0
  1097. package/{core/buddy → buddy}/src/commands/http.ts +0 -0
  1098. package/{core/buddy → buddy}/src/commands/install.ts +0 -0
  1099. package/{core/buddy → buddy}/src/commands/key.ts +1 -1
  1100. /package/{core/buddy → buddy}/src/commands/lint.ts +0 -0
  1101. /package/{core/buddy → buddy}/src/commands/migrate.ts +0 -0
  1102. /package/{core/buddy → buddy}/src/commands/release.ts +0 -0
  1103. /package/{core/buddy → buddy}/src/commands/seed.ts +0 -0
  1104. /package/{core/buddy → buddy}/src/commands/test.ts +0 -0
  1105. /package/{core/buddy → buddy}/src/commands/tinker.ts +0 -0
  1106. /package/{core/buddy → buddy}/src/commands/version.ts +0 -0
  1107. /package/{core/buddy → buddy}/src/custom-cli.ts +0 -0
  1108. /package/{core/buddy → buddy}/src/index.ts +0 -0
  1109. /package/{core/actions → buddy}/tsconfig.json +0 -0
@@ -1,1243 +0,0 @@
1
- // /* eslint-disable no-new */
2
- // import { DateTime } from 'luxon'
3
- //
4
- // // @ts-expect-error types aren't there
5
- // import sinon from 'sinon'
6
- // import { CronJob, CronTime } from '../src'
7
- //
8
- // describe('cron', () => {
9
- // afterEach(() => expect.hasAssertions())
10
- //
11
- // describe('with seconds', () => {
12
- // it('should run every second (* * * * * *)', () => {
13
- // const clock = sinon.useFakeTimers()
14
- // const callback = jest.fn()
15
- // const job = new CronJob('* * * * * *', callback, null, true)
16
- //
17
- // expect(callback).not.toHaveBeenCalled()
18
- // clock.tick(1000)
19
- // job.stop()
20
- // clock.restore()
21
- // expect(callback).toHaveBeenCalledTimes(1)
22
- // })
23
- //
24
- // it('should run second with onComplete (* * * * * *)', (done: any) => {
25
- // const clock = sinon.useFakeTimers()
26
- // const callback = jest.fn()
27
- //
28
- // const job = new CronJob(
29
- // '* * * * * *',
30
- // callback,
31
- // () => {
32
- // expect(callback).toHaveBeenCalledTimes(1)
33
- // done()
34
- // },
35
- // true,
36
- // )
37
- //
38
- // clock.tick(1000)
39
- // job.stop()
40
- // clock.restore()
41
- // })
42
- //
43
- // it('should use standard cron no-seconds syntax (* * * * *)', () => {
44
- // const clock = sinon.useFakeTimers()
45
- // const callback = jest.fn()
46
- // const job = new CronJob('* * * * *', callback, null, true)
47
- //
48
- // clock.tick(1000) // tick second
49
- //
50
- // clock.tick(59 * 1000) // tick minute
51
- //
52
- // job.stop()
53
- // clock.restore()
54
- //
55
- // expect(callback).toHaveBeenCalledTimes(1)
56
- // })
57
- //
58
- // it('should run every second for 5 seconds (* * * * * *)', () => {
59
- // const clock = sinon.useFakeTimers()
60
- // const callback = jest.fn()
61
- // const job = new CronJob('* * * * * *', callback, null, true)
62
- // for (let i = 0; i < 5; i++) clock.tick(1000)
63
- // job.stop()
64
- // clock.restore()
65
- // expect(callback).toHaveBeenCalledTimes(5)
66
- // })
67
- //
68
- // it('should run every second for 5 seconds with onComplete (* * * * * *)', (done: any) => {
69
- // const callback = jest.fn()
70
- // const clock = sinon.useFakeTimers()
71
- // const job = new CronJob(
72
- // '* * * * * *',
73
- // callback,
74
- // () => {
75
- // expect(callback).toHaveBeenCalledTimes(5)
76
- // done()
77
- // },
78
- // true,
79
- // )
80
- // for (let i = 0; i < 5; i++) clock.tick(1000)
81
- // job.stop()
82
- // clock.restore()
83
- // })
84
- //
85
- // it('should run every second for 5 seconds (*/1 * * * * *)', () => {
86
- // const clock = sinon.useFakeTimers()
87
- // const callback = jest.fn()
88
- // const job = new CronJob('*/1 * * * * *', callback, null, true)
89
- // for (let i = 0; i < 5; i++) clock.tick(1000)
90
- // job.stop()
91
- // clock.restore()
92
- // expect(callback).toHaveBeenCalledTimes(5)
93
- // })
94
- //
95
- // it('should run every 2 seconds for 1 seconds (*/2 * * * * *)', () => {
96
- // const clock = sinon.useFakeTimers()
97
- // const callback = jest.fn()
98
- // const job = new CronJob('*/2 * * * * *', callback, null, true)
99
- // clock.tick(1000)
100
- // job.stop()
101
- // clock.restore()
102
- // expect(callback).toHaveBeenCalledTimes(0)
103
- // })
104
- //
105
- // it('should run every 2 seconds for 5 seconds (*/2 * * * * *)', () => {
106
- // const clock = sinon.useFakeTimers()
107
- // const callback = jest.fn()
108
- // const job = new CronJob('*/2 * * * * *', callback, null, true)
109
- // for (let i = 0; i < 5; i++) clock.tick(1000)
110
- // job.stop()
111
- // clock.restore()
112
- // expect(callback).toHaveBeenCalledTimes(2)
113
- // })
114
- //
115
- // it('should run every second for 5 seconds with onComplete (*/1 * * * * *)', (done: any) => {
116
- // const clock = sinon.useFakeTimers()
117
- // const callback = jest.fn()
118
- // const job = new CronJob(
119
- // '*/1 * * * * *',
120
- // callback,
121
- // () => {
122
- // expect(callback).toHaveBeenCalledTimes(5)
123
- // done()
124
- // },
125
- // true,
126
- // )
127
- // for (let i = 0; i < 5; i++) clock.tick(1000)
128
- // job.stop()
129
- // clock.restore()
130
- // })
131
- //
132
- // it('should run every second for a range ([start]-[end] * * * * *)', () => {
133
- // const clock = sinon.useFakeTimers()
134
- // const callback = jest.fn()
135
- // const job = new CronJob('0-8 * * * * *', callback, null, true)
136
- // clock.tick(10000)
137
- // job.stop()
138
- // clock.restore()
139
- // expect(callback).toHaveBeenCalledTimes(8)
140
- // })
141
- //
142
- // it('should run every second for a range ([start]-[end] * * * * *) with onComplete', (done: any) => {
143
- // const clock = sinon.useFakeTimers()
144
- // const callback = jest.fn()
145
- // const job = new CronJob(
146
- // '0-8 * * * * *',
147
- // callback,
148
- // () => {
149
- // expect(callback).toHaveBeenCalledTimes(8)
150
- // done()
151
- // },
152
- // true,
153
- // )
154
- // clock.tick(10000)
155
- // job.stop()
156
- // clock.restore()
157
- // })
158
- //
159
- // it('should default to full range when upper range not provided (1/2 * * * * *)', (done: any) => {
160
- // const clock = sinon.useFakeTimers()
161
- // const callback = jest.fn()
162
- // const job = new CronJob(
163
- // '1/2 * * * * *',
164
- // callback,
165
- // () => {
166
- // expect(callback).toHaveBeenCalledTimes(30)
167
- // done()
168
- // },
169
- // true,
170
- // )
171
- // clock.tick(1000 * 60)
172
- // job.stop()
173
- // clock.restore()
174
- // })
175
- //
176
- // it('should run every second (* * * * * *) using the object constructor', () => {
177
- // const clock = sinon.useFakeTimers()
178
- // const callback = jest.fn()
179
- // const job = CronJob.from({
180
- // cronTime: '* * * * * *',
181
- // onTick: callback,
182
- // start: true,
183
- // })
184
- // clock.tick(1000)
185
- // job.stop()
186
- // clock.restore()
187
- // expect(callback).toHaveBeenCalledTimes(1)
188
- // })
189
- //
190
- // it('should run every second with onComplete (* * * * * *) using the object constructor', (done: any) => {
191
- // const clock = sinon.useFakeTimers()
192
- // const callback = jest.fn()
193
- // const job = CronJob.from({
194
- // cronTime: '* * * * * *',
195
- // onTick: callback,
196
- // onComplete: () => {
197
- // expect(callback).toHaveBeenCalledTimes(1)
198
- // done()
199
- // },
200
- // start: true,
201
- // })
202
- // clock.tick(1000)
203
- // job.stop()
204
- // clock.restore()
205
- // })
206
- // })
207
- //
208
- // describe('with minutes', () => {
209
- // it('should fire every 60 min', () => {
210
- // const clock = sinon.useFakeTimers()
211
- // const m60 = 60 * 60 * 1000
212
- // const l: number[] = []
213
- // const job = new CronJob(
214
- // '00 30 * * * *',
215
- // () => {
216
- // l.push(Math.floor(Date.now() / 60000))
217
- // },
218
- // null,
219
- // true,
220
- // )
221
- //
222
- // clock.tick(m60 * 10)
223
- //
224
- // expect(l).toHaveLength(10)
225
- // expect(l.every(i => i % 30 === 0)).toBe(true)
226
- //
227
- // job.stop()
228
- // clock.restore()
229
- // })
230
- //
231
- // it('should run every 45 minutes for 2 hours (0 */45 * * * *)', () => {
232
- // const clock = sinon.useFakeTimers()
233
- // const callback = jest.fn()
234
- // const job = new CronJob('0 */45 * * * *', callback, null, true)
235
- // for (let i = 0; i < 2; i++) clock.tick(60 * 60 * 1000)
236
- // job.stop()
237
- // clock.restore()
238
- // expect(callback).toHaveBeenCalledTimes(4)
239
- // })
240
- //
241
- // it('should run every 45 minutes for 2 hours (0 */45 * * * *) with onComplete', (done: any) => {
242
- // const clock = sinon.useFakeTimers()
243
- // const callback = jest.fn()
244
- // const job = new CronJob(
245
- // '0 */45 * * * *',
246
- // callback,
247
- // () => {
248
- // expect(callback).toHaveBeenCalledTimes(4)
249
- // done()
250
- // },
251
- // true,
252
- // )
253
- // for (let i = 0; i < 2; i++) clock.tick(60 * 60 * 1000)
254
- // job.stop()
255
- // clock.restore()
256
- // })
257
- // })
258
- //
259
- // it('should start and stop job from outside', (done: any) => {
260
- // const clock = sinon.useFakeTimers()
261
- // const callback = jest.fn()
262
- // const job = new CronJob(
263
- // '* * * * * *',
264
- // () => {
265
- // callback()
266
- // },
267
- // () => {
268
- // expect(callback).toHaveBeenCalledTimes(1)
269
- // clock.restore()
270
- // done()
271
- // },
272
- // true,
273
- // )
274
- // clock.tick(1000)
275
- // job.stop()
276
- // })
277
- //
278
- // it('should start and stop job from inside (default context)', (done: any) => {
279
- // const clock = sinon.useFakeTimers()
280
- // const callback = jest.fn()
281
- // new CronJob(
282
- // '* * * * * *',
283
- // function () {
284
- // callback()
285
- // this.stop()
286
- // },
287
- // () => {
288
- // expect(callback).toHaveBeenCalledTimes(1)
289
- // clock.restore()
290
- // done()
291
- // },
292
- // true,
293
- // )
294
- // clock.tick(1000)
295
- // })
296
- //
297
- // describe('with date', () => {
298
- // it('should run on a specific date', () => {
299
- // const d = new Date()
300
- // const clock = sinon.useFakeTimers(d.getTime())
301
- // const s = d.getSeconds() + 1
302
- // d.setSeconds(s)
303
- // const callback = jest.fn()
304
- // const job = new CronJob(
305
- // d,
306
- // () => {
307
- // const t = new Date()
308
- // expect(t.getSeconds()).toBe(d.getSeconds())
309
- // callback()
310
- // },
311
- // null,
312
- // true,
313
- // )
314
- // clock.tick(1000)
315
- // clock.restore()
316
- // job.stop()
317
- // expect(callback).toHaveBeenCalledTimes(1)
318
- // })
319
- //
320
- // it('should run on a specific date and call onComplete from onTick', async () => {
321
- // const d = new Date()
322
- // const clock = sinon.useFakeTimers(d.getTime())
323
- // d.setSeconds(d.getSeconds() + 1)
324
- // const callback = jest.fn()
325
- //
326
- // await new Promise<void>((resolve) => {
327
- // const job = new CronJob(
328
- // d,
329
- // (onComplete) => {
330
- // const t = new Date()
331
- // expect(t.getSeconds()).toBe(d.getSeconds())
332
- // void onComplete()
333
- // },
334
- // () => {
335
- // callback()
336
- // resolve()
337
- // },
338
- // true,
339
- // )
340
- // clock.tick(1000)
341
- // clock.restore()
342
- // job.stop()
343
- // })
344
- //
345
- // // onComplete is called 2 times: once in onTick() & once when calling job.stop()
346
- // expect(callback).toHaveBeenCalledTimes(2)
347
- // })
348
- //
349
- // it('should run on a specific date and call onComplete from onTick using the object constructor', async () => {
350
- // const d = new Date()
351
- // const clock = sinon.useFakeTimers(d.getTime())
352
- // d.setSeconds(d.getSeconds() + 1)
353
- // const callback = jest.fn()
354
- //
355
- // await new Promise<void>((resolve) => {
356
- // const job = CronJob.from({
357
- // cronTime: d,
358
- // onTick: (onComplete) => {
359
- // const t = new Date()
360
- // expect(t.getSeconds()).toBe(d.getSeconds())
361
- // void onComplete()
362
- // },
363
- // onComplete: function () {
364
- // callback()
365
- // resolve()
366
- // } as () => void,
367
- // start: true,
368
- // })
369
- // clock.tick(1000)
370
- // clock.restore()
371
- // job.stop()
372
- // })
373
- //
374
- // // onComplete is called 2 times: once in onTick() & once when calling job.stop()
375
- // expect(callback).toHaveBeenCalledTimes(2)
376
- // })
377
- //
378
- // it('should not be able to call onComplete from onTick if if wasn\'t provided', () => {
379
- // expect.assertions(4)
380
- // const d = new Date()
381
- // const clock = sinon.useFakeTimers(d.getTime())
382
- // d.setSeconds(d.getSeconds() + 1)
383
- //
384
- // const job = new CronJob(
385
- // d,
386
- // (onComplete) => {
387
- // const t = new Date()
388
- // expect(onComplete).toBeUndefined()
389
- // try {
390
- // // @ts-expect-error should be a TS warning and throw
391
- // onComplete()
392
- // }
393
- // catch (e) {
394
- // // we make sure this isn't skipped with `expect.assertions()`
395
- // // at the beginning of the test
396
- // expect(e).toBeInstanceOf(TypeError)
397
- // }
398
- // expect(onComplete).toBeUndefined()
399
- // expect(t.getSeconds()).toBe(d.getSeconds())
400
- // },
401
- // null,
402
- // true,
403
- // )
404
- // clock.tick(1000)
405
- // job.stop()
406
- // clock.restore()
407
- // })
408
- //
409
- // it('should wait and not fire immediately', () => {
410
- // const clock = sinon.useFakeTimers()
411
- // const callback = jest.fn()
412
- //
413
- // const d = new Date().getTime() + 31 * 86400 * 1000
414
- //
415
- // const job = new CronJob(new Date(d), callback)
416
- // job.start()
417
- //
418
- // clock.tick(1000)
419
- //
420
- // clock.restore()
421
- // job.stop()
422
- // expect(callback).toHaveBeenCalledTimes(0)
423
- // })
424
- //
425
- // it('should wait but fire on init', () => {
426
- // const clock = sinon.useFakeTimers()
427
- // const callback = jest.fn()
428
- //
429
- // const d = new Date().getTime() + 31 * 86400 * 1000
430
- //
431
- // const job = CronJob.from({
432
- // cronTime: new Date(d),
433
- // onTick: callback,
434
- // runOnInit: true,
435
- // })
436
- //
437
- // expect(callback).toHaveBeenCalledTimes(1)
438
- //
439
- // job.start()
440
- //
441
- // clock.tick(1000)
442
- //
443
- // clock.restore()
444
- // job.stop()
445
- // expect(callback).toHaveBeenCalledTimes(1)
446
- // })
447
- //
448
- // it('should fire on init but not run until started', () => {
449
- // const clock = sinon.useFakeTimers()
450
- // const callback = jest.fn()
451
- //
452
- // const job = CronJob.from({
453
- // cronTime: '* * * * * *',
454
- // onTick: callback,
455
- // runOnInit: true,
456
- // })
457
- //
458
- // expect(callback).toHaveBeenCalledTimes(1)
459
- //
460
- // job.start()
461
- //
462
- // clock.tick(3500)
463
- //
464
- // clock.restore()
465
- // job.stop()
466
- // expect(callback).toHaveBeenCalledTimes(4)
467
- // })
468
- // })
469
- //
470
- // describe('with timezone', () => {
471
- // it('should run a job using cron syntax with a timezone', () => {
472
- // const clock = sinon.useFakeTimers()
473
- // const callback = jest.fn()
474
- // let zone = 'America/Chicago'
475
- // // New Orleans time
476
- // let t = DateTime.local().setZone(zone)
477
- // // Current time
478
- // const d = DateTime.local()
479
- //
480
- // // If current time is New Orleans time, switch to Los Angeles..
481
- // if (t.hour === d.hour) {
482
- // zone = 'America/Los_Angeles'
483
- // t = t.setZone(zone)
484
- // }
485
- // expect(d.hour).not.toBe(t.hour)
486
- //
487
- // // If t = 59s12m then t.setSeconds(60)
488
- // // becomes 00s13m so we're fine just doing
489
- // // this and no testRun callback.
490
- // t = t.plus({ seconds: 1 })
491
- // // Run a job designed to be executed at a given
492
- // // time in `zone`, making sure that it is a different
493
- // // hour than local time.
494
- // const job = new CronJob(
495
- // `${t.second} ${t.minute} ${t.hour} * * *`,
496
- // callback,
497
- // null,
498
- // true,
499
- // zone,
500
- // )
501
- //
502
- // clock.tick(1000)
503
- // clock.restore()
504
- // job.stop()
505
- // expect(callback).toHaveBeenCalledTimes(1)
506
- // })
507
- //
508
- // it('should run a job using cron syntax with a "UTC+HH:mm" offset as timezone', () => {
509
- // const clock = sinon.useFakeTimers()
510
- // const callback = jest.fn()
511
- //
512
- // // Current time
513
- // const d = DateTime.local()
514
- //
515
- // // Current time with zone offset
516
- // let zone = 'UTC+5:30'
517
- // let t = DateTime.local().setZone(zone)
518
- //
519
- // // If current offset is UTC+5:30, switch to UTC+6:30..
520
- // if (t.hour === d.hour && t.minute === d.minute) {
521
- // zone = 'UTC+6:30'
522
- // t = t.setZone(zone)
523
- // }
524
- // expect(`${d.hour}:${d.minute}`).not.toBe(`${t.hour}:${t.minute}`)
525
- //
526
- // // If t = 59s12m then t.setSeconds(60)
527
- // // becomes 00s13m so we're fine just doing
528
- // // this and no testRun callback.
529
- // t = t.plus({ seconds: 1 })
530
- // // Run a job designed to be executed at a given
531
- // // time in `zone`, making sure that it is a different
532
- // // hour than local time.
533
- // const job = new CronJob(
534
- // `${t.second} ${t.minute} ${t.hour} * * *`,
535
- // callback,
536
- // null,
537
- // true,
538
- // zone,
539
- // )
540
- //
541
- // clock.tick(1000)
542
- // clock.restore()
543
- // job.stop()
544
- // expect(callback).toHaveBeenCalledTimes(1)
545
- // })
546
- //
547
- // it('should run a job using a date', () => {
548
- // let zone = 'America/Chicago'
549
- // // New Orleans time
550
- // let t = DateTime.local().setZone(zone)
551
- // // Current time
552
- // let d = DateTime.local()
553
- //
554
- // // If current time is New Orleans time, switch to Los Angeles..
555
- // if (t.hour === d.hour) {
556
- // zone = 'America/Los_Angeles'
557
- // t = t.setZone(zone)
558
- // }
559
- //
560
- // expect(d.hour).not.toBe(t.hour)
561
- // d = d.plus({ seconds: 1 })
562
- // const clock = sinon.useFakeTimers(d.valueOf())
563
- // const callback = jest.fn()
564
- // const job = new CronJob(d.toJSDate(), callback, null, true, zone)
565
- // clock.tick(1000)
566
- // clock.restore()
567
- // job.stop()
568
- // expect(callback).toHaveBeenCalledTimes(1)
569
- // })
570
- //
571
- // it('should test if timezone is valid.', () => {
572
- // expect(() => {
573
- // CronJob.from({
574
- // cronTime: '* * * * * *',
575
- // onTick: () => { },
576
- // timeZone: 'fake/timezone',
577
- // })
578
- // }).toThrow()
579
- // })
580
- // })
581
- //
582
- // describe('onTick scoping', () => {
583
- // it('should scope onTick to running job', () => {
584
- // const clock = sinon.useFakeTimers()
585
- //
586
- // const job = new CronJob(
587
- // '* * * * * *',
588
- // function () {
589
- // expect(job).toBeInstanceOf(CronJob)
590
- // expect(job).toEqual(this)
591
- // },
592
- // null,
593
- // true,
594
- // )
595
- //
596
- // clock.tick(1000)
597
- //
598
- // clock.restore()
599
- // job.stop()
600
- // })
601
- //
602
- // it('should scope onTick to running job using the object constructor', () => {
603
- // const clock = sinon.useFakeTimers()
604
- //
605
- // const job = CronJob.from({
606
- // cronTime: '* * * * * *',
607
- // onTick() {
608
- // expect(job).toBeInstanceOf(CronJob)
609
- // expect(job).toEqual(this)
610
- // },
611
- // start: true,
612
- // })
613
- //
614
- // clock.tick(1000)
615
- //
616
- // clock.restore()
617
- // job.stop()
618
- // })
619
- //
620
- // it('should scope onTick to object', () => {
621
- // const clock = sinon.useFakeTimers()
622
- //
623
- // const job = new CronJob(
624
- // '* * * * * *',
625
- // function () {
626
- // expect(this.hello).toBe('world')
627
- // expect(job).not.toEqual(this)
628
- // },
629
- // null,
630
- // true,
631
- // null,
632
- // { hello: 'world' },
633
- // )
634
- //
635
- // clock.tick(1000)
636
- //
637
- // clock.restore()
638
- // job.stop()
639
- // })
640
- //
641
- // it('should scope onTick to object using the object constructor', () => {
642
- // const clock = sinon.useFakeTimers()
643
- //
644
- // const job = CronJob.from({
645
- // cronTime: '* * * * * *',
646
- // onTick() {
647
- // expect(this.hello).toBe('world')
648
- // expect(job).not.toEqual(this)
649
- // },
650
- // start: true,
651
- // context: { hello: 'world' },
652
- // })
653
- //
654
- // clock.tick(1000)
655
- //
656
- // clock.restore()
657
- // job.stop()
658
- // })
659
- // })
660
- //
661
- // it('should not get into an infinite loop on invalid times', () => {
662
- // expect(() => {
663
- // new CronJob(
664
- // '* 60 * * * *',
665
- // () => {
666
- // expect(true).toBe(true)
667
- // },
668
- // null,
669
- // true,
670
- // )
671
- // }).toThrow()
672
- //
673
- // expect(() => {
674
- // new CronJob(
675
- // '* * 24 * * *',
676
- // () => {
677
- // expect(true).toBe(true)
678
- // },
679
- // null,
680
- // true,
681
- // )
682
- // }).toThrow()
683
- // })
684
- //
685
- // it('should test start of month', () => {
686
- // const callback = jest.fn()
687
- // const d = new Date('12/31/2014')
688
- // d.setSeconds(59)
689
- // d.setMinutes(59)
690
- // d.setHours(23)
691
- // const clock = sinon.useFakeTimers(d.getTime())
692
- //
693
- // const job = new CronJob('0 0 0 1 * *', callback, null, true)
694
- //
695
- // clock.tick(1001)
696
- // expect(callback).toHaveBeenCalledTimes(1)
697
- //
698
- // clock.tick(2678399001)
699
- // expect(callback).toHaveBeenCalledTimes(1)
700
- //
701
- // clock.tick(2678400001) // jump over 2 firsts
702
- // clock.restore()
703
- // job.stop()
704
- //
705
- // expect(callback).toHaveBeenCalledTimes(3)
706
- // })
707
- //
708
- // it('should not fire if time was adjusted back', () => {
709
- // const callback = jest.fn()
710
- // const clock = sinon.useFakeTimers({
711
- // toFake: ['setTimeout'],
712
- // })
713
- //
714
- // const job = new CronJob('0 * * * * *', callback, null, true)
715
- //
716
- // clock.tick(60000)
717
- // expect(callback).toHaveBeenCalledTimes(0)
718
- //
719
- // clock.restore()
720
- // job.stop()
721
- // })
722
- //
723
- // it('should run every day', () => {
724
- // const callback = jest.fn()
725
- // const d = new Date('12/31/2014')
726
- // d.setSeconds(59)
727
- // d.setMinutes(59)
728
- // d.setHours(23)
729
- // const clock = sinon.useFakeTimers(d.getTime())
730
- //
731
- // const job = CronJob.from({
732
- // cronTime: '59 59 3 * * *',
733
- // onTick: callback,
734
- // start: true,
735
- // timeZone: 'America/Los_Angeles',
736
- // })
737
- //
738
- // const twoWeeks = 14 * 24 * 60 * 60 * 1000
739
- // clock.tick(twoWeeks)
740
- //
741
- // clock.restore()
742
- // job.stop()
743
- // expect(callback).toHaveBeenCalledTimes(14)
744
- // })
745
- //
746
- // it('should run every 2 hours between hours', () => {
747
- // const callback = jest.fn()
748
- // const d = new Date('12/31/2014')
749
- // d.setSeconds(0)
750
- // d.setMinutes(0)
751
- // d.setHours(0)
752
- // const clock = sinon.useFakeTimers(d.getTime())
753
- //
754
- // const job = CronJob.from({
755
- // cronTime: '0 2-6/2 * * * *',
756
- // onTick: callback,
757
- // start: true,
758
- // })
759
- //
760
- // clock.tick(2 * 60 * 1000)
761
- // expect(callback).toHaveBeenCalledTimes(1)
762
- // clock.tick(2 * 60 * 1000)
763
- // expect(callback).toHaveBeenCalledTimes(2)
764
- // clock.tick(2 * 60 * 1000)
765
- // expect(callback).toHaveBeenCalledTimes(3)
766
- // clock.tick(2 * 60 * 1000)
767
- //
768
- // clock.restore()
769
- // job.stop()
770
- // expect(callback).toHaveBeenCalledTimes(3)
771
- // })
772
- //
773
- // it('should run every minute', () => {
774
- // const callback = jest.fn()
775
- // const d = new Date('12/31/2014')
776
- // d.setSeconds(0)
777
- // d.setMinutes(0)
778
- // d.setHours(0)
779
- // const clock = sinon.useFakeTimers(d.getTime())
780
- //
781
- // const job = CronJob.from({
782
- // cronTime: '00 * * * * *',
783
- // onTick: callback,
784
- // start: true,
785
- // })
786
- //
787
- // clock.tick(60 * 1000)
788
- // expect(callback).toHaveBeenCalledTimes(1)
789
- // clock.tick(60 * 1000)
790
- // expect(callback).toHaveBeenCalledTimes(2)
791
- //
792
- // clock.restore()
793
- // job.stop()
794
- // expect(callback).toHaveBeenCalledTimes(2)
795
- // })
796
- //
797
- // it('should run every day at 12:30', () => {
798
- // const callback = jest.fn()
799
- // const d = new Date('12/31/2014')
800
- // d.setSeconds(0)
801
- // d.setMinutes(0)
802
- // d.setHours(0)
803
- // const clock = sinon.useFakeTimers(d.getTime())
804
- //
805
- // const job = CronJob.from({
806
- // cronTime: '00 30 00 * * *',
807
- // onTick: callback,
808
- // start: true,
809
- // })
810
- //
811
- // const day = 24 * 60 * 60 * 1000
812
- // clock.tick(day)
813
- // expect(callback).toHaveBeenCalledTimes(1)
814
- // clock.tick(day)
815
- // expect(callback).toHaveBeenCalledTimes(2)
816
- // clock.tick(day)
817
- // expect(callback).toHaveBeenCalledTimes(3)
818
- // clock.tick(5 * day)
819
- //
820
- // clock.restore()
821
- // job.stop()
822
- // expect(callback).toHaveBeenCalledTimes(8)
823
- // })
824
- //
825
- // it('should trigger onTick at midnight', () => {
826
- // const callback = jest.fn()
827
- // const d = new Date('12/31/2014')
828
- // d.setSeconds(59)
829
- // d.setMinutes(59)
830
- // d.setHours(23)
831
- // const clock = sinon.useFakeTimers(d.getTime())
832
- //
833
- // const job = CronJob.from({
834
- // cronTime: '00 * * * * *',
835
- // onTick: callback,
836
- // start: true,
837
- // timeZone: 'UTC',
838
- // })
839
- //
840
- // clock.tick(1000) // move clock 1 second
841
- // expect(callback).toHaveBeenCalledTimes(1)
842
- //
843
- // clock.restore()
844
- // job.stop()
845
- // expect(callback).toHaveBeenCalledTimes(1)
846
- // })
847
- //
848
- // it('should run every day UTC', () => {
849
- // const callback = jest.fn()
850
- // const d = new Date('12/31/2014')
851
- // d.setSeconds(0)
852
- // d.setMinutes(0)
853
- // d.setHours(0)
854
- // const clock = sinon.useFakeTimers(d.getTime())
855
- //
856
- // const job = CronJob.from({
857
- // cronTime: '00 30 00 * * *',
858
- // onTick: callback,
859
- // start: true,
860
- // timeZone: 'UTC',
861
- // })
862
- //
863
- // const day = 24 * 60 * 60 * 1000
864
- // clock.tick(day)
865
- // expect(callback).toHaveBeenCalledTimes(1)
866
- // clock.tick(day)
867
- // expect(callback).toHaveBeenCalledTimes(2)
868
- // clock.tick(day)
869
- // expect(callback).toHaveBeenCalledTimes(3)
870
- // clock.tick(5 * day)
871
- //
872
- // clock.restore()
873
- // job.stop()
874
- // expect(callback).toHaveBeenCalledTimes(8)
875
- // })
876
- //
877
- // // from https://github.com/kelektiv/node-cron/issues/180#issuecomment-154108131
878
- // it('should run once not double', () => {
879
- // const callback = jest.fn()
880
- // const d = new Date(2015, 1, 1, 1, 1, 41, 0)
881
- // const clock = sinon.useFakeTimers(d.getTime())
882
- //
883
- // const job = CronJob.from({
884
- // cronTime: '* * * * *',
885
- // onTick: callback,
886
- // start: true,
887
- // })
888
- //
889
- // const minute = 60 * 1000
890
- // clock.tick(minute)
891
- // expect(callback).toHaveBeenCalledTimes(1)
892
- // clock.restore()
893
- // job.stop()
894
- // expect(callback).toHaveBeenCalledTimes(1)
895
- // })
896
- //
897
- // /**
898
- // * maximum match interval is 8 years:
899
- // * crontab has '* * 29 2 *' and we are on 1 March 2096:
900
- // * next matching time will be 29 February 2104
901
- // * source: https://github.com/cronie-crond/cronie/blob/0d669551680f733a4bdd6bab082a0b3d6d7f089c/src/cronnext.c#L401-L403
902
- // */
903
- // it('should work correctly for max match interval', () => {
904
- // const callback = jest.fn()
905
- // const d = new Date(2096, 2, 1)
906
- // const clock = sinon.useFakeTimers(d.getTime())
907
- //
908
- // const job = CronJob.from({
909
- // cronTime: ' * * 29 2 *',
910
- // onTick: callback,
911
- // start: true,
912
- // })
913
- //
914
- // // 7 years, 11 months and 27 days
915
- // const almostEightYears = 2919 * 24 * 60 * 60 * 1000
916
- // clock.tick(almostEightYears)
917
- // expect(callback).toHaveBeenCalledTimes(0)
918
- //
919
- // // tick by 1 day
920
- // clock.tick(24 * 60 * 60 * 1000)
921
- // clock.restore()
922
- // job.stop()
923
- // expect(callback).toHaveBeenCalledTimes(1)
924
- // })
925
- //
926
- // describe('with utcOffset', () => {
927
- // it('should run a job using cron syntax with number format utcOffset', () => {
928
- // const clock = sinon.useFakeTimers()
929
- // const callback = jest.fn()
930
- // // Current time
931
- // const t = DateTime.local()
932
- // // UTC Offset decreased by an hour
933
- // const utcOffset = t.offset - 60
934
- //
935
- // const job = new CronJob(
936
- // `${t.second} ${t.minute} ${t.hour} * * *`,
937
- // callback,
938
- // null,
939
- // true,
940
- // null,
941
- // null,
942
- // null,
943
- // utcOffset,
944
- // )
945
- //
946
- // // tick 1 sec before an hour
947
- // clock.tick(1000 * 60 * 60 - 1)
948
- // expect(callback).toHaveBeenCalledTimes(0)
949
- //
950
- // clock.tick(1)
951
- // clock.restore()
952
- // job.stop()
953
- // expect(callback).toHaveBeenCalledTimes(1)
954
- // })
955
- //
956
- // it('should run a job using cron syntax with numeric format utcOffset with minute support', () => {
957
- // const clock = sinon.useFakeTimers()
958
- // const callback = jest.fn()
959
- // // Current time
960
- // const t = DateTime.local()
961
- //
962
- // // UTC Offset decreased by 45 minutes
963
- // const utcOffset = t.offset - 45
964
- // const job = new CronJob(
965
- // `${t.second} ${t.minute} ${t.hour} * * *`,
966
- // callback,
967
- // null,
968
- // true,
969
- // null,
970
- // null,
971
- // null,
972
- // utcOffset,
973
- // )
974
- //
975
- // // tick 1 sec before 45 minutes
976
- // clock.tick(1000 * 45 * 60 - 1)
977
- // expect(callback).toHaveBeenCalledTimes(0)
978
- //
979
- // clock.tick(1)
980
- // clock.restore()
981
- // job.stop()
982
- // expect(callback).toHaveBeenCalledTimes(1)
983
- // })
984
- //
985
- // it('should run a job using cron syntax with number format utcOffset that is 0', () => {
986
- // const clock = sinon.useFakeTimers()
987
- // const callback = jest.fn()
988
- //
989
- // const job = new CronJob(
990
- // '* * * * * *',
991
- // callback,
992
- // null,
993
- // true,
994
- // null,
995
- // null,
996
- // null,
997
- // 0,
998
- // )
999
- //
1000
- // clock.tick(999)
1001
- // expect(callback).toHaveBeenCalledTimes(0)
1002
- //
1003
- // clock.tick(1)
1004
- // clock.restore()
1005
- // job.stop()
1006
- // expect(callback).toHaveBeenCalledTimes(1)
1007
- // })
1008
- //
1009
- // it('should be able to detect out of range days of month', () => {
1010
- // expect(() => {
1011
- // new CronTime('* * 32 FEB *')
1012
- // }).toThrow()
1013
- // })
1014
- // })
1015
- //
1016
- // describe('setTime', () => {
1017
- // it('should start, change time, start again', () => {
1018
- // const callback = jest.fn()
1019
- // const clock = sinon.useFakeTimers()
1020
- //
1021
- // const job = new CronJob('* * * * * *', callback)
1022
- //
1023
- // job.start()
1024
- // clock.tick(1000)
1025
- //
1026
- // const time = new CronTime('*/2 * * * * *')
1027
- // job.setTime(time)
1028
- //
1029
- // clock.tick(4000)
1030
- //
1031
- // clock.restore()
1032
- // job.stop()
1033
- // expect(callback).toHaveBeenCalledTimes(3)
1034
- // })
1035
- //
1036
- // it('should start, stop, change time, not start again', () => {
1037
- // const callback = jest.fn()
1038
- // const clock = sinon.useFakeTimers()
1039
- //
1040
- // const job = new CronJob('* * * * * *', callback)
1041
- //
1042
- // job.start()
1043
- // clock.tick(1000)
1044
- //
1045
- // job.stop()
1046
- // const time = new CronTime('*/2 * * * * *')
1047
- // job.setTime(time)
1048
- //
1049
- // clock.tick(4000)
1050
- //
1051
- // clock.restore()
1052
- // job.stop()
1053
- // expect(callback).toHaveBeenCalledTimes(1)
1054
- // })
1055
- //
1056
- // it('should setTime with invalid object', () => {
1057
- // const callback = jest.fn()
1058
- // const job = new CronJob('* * * * * *', callback)
1059
- // expect(() => {
1060
- // // @ts-expect-error time parameter cannot be undefined
1061
- // job.setTime(undefined)
1062
- // }).toThrow()
1063
- // })
1064
- //
1065
- // it('should start, change time, exception', () => {
1066
- // const callback = jest.fn()
1067
- // const clock = sinon.useFakeTimers()
1068
- //
1069
- // const job = new CronJob('* * * * * *', callback)
1070
- //
1071
- // const time = new Date()
1072
- // job.start()
1073
- //
1074
- // clock.tick(1000)
1075
- //
1076
- // expect(() => {
1077
- // // @ts-expect-error time parameter but be an instance of CronTime
1078
- // job.setTime(time)
1079
- // }).toThrow()
1080
- //
1081
- // clock.restore()
1082
- // job.stop()
1083
- // expect(callback).toHaveBeenCalledTimes(1)
1084
- // })
1085
- //
1086
- // it('should create recurring job, setTime with actual date, start and run once (#739)', () => {
1087
- // const callback = jest.fn()
1088
- // const clock = sinon.useFakeTimers()
1089
- //
1090
- // const job = new CronJob('0 0 20 * * *', callback)
1091
- //
1092
- // const startDate = new Date(Date.now() + 5000)
1093
- // job.setTime(new CronTime(startDate))
1094
- //
1095
- // job.start()
1096
- //
1097
- // clock.tick(5000)
1098
- //
1099
- // expect(callback).toHaveBeenCalledTimes(1)
1100
- //
1101
- // clock.tick(60000)
1102
- //
1103
- // clock.restore()
1104
- //
1105
- // expect(callback).toHaveBeenCalledTimes(1)
1106
- // expect(job.running).toBe(false)
1107
- // })
1108
- // })
1109
- //
1110
- // describe('nextDate(s)', () => {
1111
- // it('should give the next date to run at', () => {
1112
- // const callback = jest.fn()
1113
- // const clock = sinon.useFakeTimers()
1114
- // const job = new CronJob('* * * * * *', callback)
1115
- // const d = Date.now()
1116
- //
1117
- // expect(job.nextDate().toMillis()).toEqual(d + 1000)
1118
- //
1119
- // clock.restore()
1120
- // })
1121
- //
1122
- // it('should give the next 5 dates to run at', () => {
1123
- // const callback = jest.fn()
1124
- // const clock = sinon.useFakeTimers()
1125
- // const job = new CronJob('* * * * * *', callback)
1126
- // const d = Date.now()
1127
- //
1128
- // expect(job.nextDates(5).map(d => d.toMillis())).toEqual([
1129
- // d + 1000,
1130
- // d + 2000,
1131
- // d + 3000,
1132
- // d + 4000,
1133
- // d + 5000,
1134
- // ])
1135
- //
1136
- // clock.restore()
1137
- // })
1138
- //
1139
- // it('should give an empty array when called without argument', () => {
1140
- // const callback = jest.fn()
1141
- // const clock = sinon.useFakeTimers()
1142
- // const job = new CronJob('* * * * * *', callback)
1143
- //
1144
- // expect(job.nextDates()).toHaveLength(0)
1145
- //
1146
- // clock.restore()
1147
- // })
1148
- // })
1149
- //
1150
- // it('should automatically setup a new timeout if we roll past the max timeout delay', () => {
1151
- // const callback = jest.fn()
1152
- // const clock = sinon.useFakeTimers()
1153
- // const d = new Date()
1154
- // d.setMilliseconds(2147485647 * 2) // MAXDELAY in `job.js` + 2000.
1155
- // const job = new CronJob(d, callback)
1156
- // job.start()
1157
- // clock.tick(2147483648)
1158
- // expect(callback).toHaveBeenCalledTimes(0)
1159
- // clock.tick(2147489648)
1160
- // expect(callback).toHaveBeenCalledTimes(1)
1161
- // job.stop()
1162
- // clock.restore()
1163
- // })
1164
- //
1165
- // it('should give the correct last execution date', () => {
1166
- // const callback = jest.fn()
1167
- // const clock = sinon.useFakeTimers()
1168
- // const job = new CronJob('* * * * * *', callback)
1169
- // job.start()
1170
- // clock.tick(1000)
1171
- // expect(callback).toHaveBeenCalledTimes(1)
1172
- // expect(job.lastDate()?.getTime()).toBe(1000)
1173
- // job.stop()
1174
- // clock.restore()
1175
- // })
1176
- //
1177
- // it('should give the correct last execution date for intervals greater than 25 days (#710)', () => {
1178
- // const callback = jest.fn()
1179
- // const clock = sinon.useFakeTimers()
1180
- //
1181
- // const job = new CronJob('0 0 0 1 * *', callback) // At 00:00 on day-of-month 1.
1182
- // job.start()
1183
- //
1184
- // // tick one tick before nextDate()
1185
- // clock.tick(job.nextDate().toMillis() - 1)
1186
- //
1187
- // expect(callback).toHaveBeenCalledTimes(0)
1188
- // expect(job.lastDate()?.getTime()).toBeUndefined()
1189
- //
1190
- // job.stop()
1191
- // clock.restore()
1192
- // })
1193
- //
1194
- // it('should throw when providing both exclusive parameters timeZone and utcOffset', () => {
1195
- // expect(() => {
1196
- // // @ts-expect-error testing runtime exception
1197
- // new CronJob(
1198
- // `* * * * *`,
1199
- // () => { },
1200
- // null,
1201
- // true,
1202
- // 'America/Chicago',
1203
- // null,
1204
- // null,
1205
- // 120,
1206
- // )
1207
- // }).toThrow()
1208
- // })
1209
- //
1210
- // it('should throw when providing both exclusive parameters timeZone and utcOffset using the object constructor', () => {
1211
- // expect(() => {
1212
- // // @ts-expect-error testing runtime exception
1213
- // CronJob.from({
1214
- // cronTime: '* * * * * *',
1215
- // onTick() { },
1216
- // timeZone: 'America/Chicago',
1217
- // utcOffset: 120,
1218
- // })
1219
- // }).toThrow()
1220
- // })
1221
- //
1222
- // it('should support async callback', () => {
1223
- // const clock = sinon.useFakeTimers()
1224
- // const callback = jest.fn()
1225
- // const job = new CronJob(
1226
- // '* * * * * *',
1227
- // async () => {
1228
- // await new Promise<void>((resolve) => {
1229
- // setTimeout(() => {
1230
- // callback()
1231
- // resolve()
1232
- // }, 500)
1233
- // })
1234
- // },
1235
- // null,
1236
- // true,
1237
- // )
1238
- // clock.tick(1500)
1239
- // job.stop()
1240
- // clock.restore()
1241
- // expect(callback).toHaveBeenCalledTimes(1)
1242
- // })
1243
- // })