@superinterface/server 1.0.43 → 1.0.44

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 (28) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_btwyo7 +1 -1
  5. package/.next/fallback-build-manifest.json +2 -2
  6. package/.next/server/app/_not-found.html +1 -1
  7. package/.next/server/app/_not-found.rsc +1 -1
  8. package/.next/server/app/index.html +1 -1
  9. package/.next/server/app/index.rsc +1 -1
  10. package/.next/server/chunks/[root-of-the-server]__3a25f63d._.js +3 -3
  11. package/.next/server/chunks/[root-of-the-server]__3a25f63d._.js.map +1 -1
  12. package/.next/server/chunks/[root-of-the-server]__4d829477._.js +3 -3
  13. package/.next/server/chunks/[root-of-the-server]__4d829477._.js.map +1 -1
  14. package/.next/server/chunks/[root-of-the-server]__6169c901._.js +3 -3
  15. package/.next/server/chunks/[root-of-the-server]__6169c901._.js.map +1 -1
  16. package/.next/server/pages/404.html +1 -1
  17. package/.next/server/pages/500.html +1 -1
  18. package/.next/trace +1 -1
  19. package/dist/lib/tasks/getScheduleOccurrences.d.ts +10 -0
  20. package/dist/lib/tasks/getScheduleOccurrences.d.ts.map +1 -0
  21. package/dist/lib/tasks/getScheduleOccurrences.js +301 -0
  22. package/dist/lib/tasks/getTaskScheduleConflict.d.ts.map +1 -1
  23. package/dist/lib/tasks/getTaskScheduleConflict.js +20 -27
  24. package/package.json +1 -1
  25. package/scripts/cleanupTaskConflicts.ts +95 -31
  26. /package/.next/static/{iw7IvcIaTYMhd4DuD49Bv → DQromUo_Z941kWJSSM2pu}/_buildManifest.js +0 -0
  27. /package/.next/static/{iw7IvcIaTYMhd4DuD49Bv → DQromUo_Z941kWJSSM2pu}/_clientMiddlewareManifest.json +0 -0
  28. /package/.next/static/{iw7IvcIaTYMhd4DuD49Bv → DQromUo_Z941kWJSSM2pu}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--iw7IvcIaTYMhd4DuD49Bv--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"iw7IvcIaTYMhd4DuD49Bv\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--DQromUo_Z941kWJSSM2pu--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"DQromUo_Z941kWJSSM2pu\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/iw7IvcIaTYMhd4DuD49Bv/_ssgManifest.js" defer=""></script><script src="/_next/static/iw7IvcIaTYMhd4DuD49Bv/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"iw7IvcIaTYMhd4DuD49Bv","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/DQromUo_Z941kWJSSM2pu/_ssgManifest.js" defer=""></script><script src="/_next/static/DQromUo_Z941kWJSSM2pu/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"DQromUo_Z941kWJSSM2pu","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
package/.next/trace CHANGED
@@ -1 +1 @@
1
- [{"name":"generate-buildid","duration":164,"timestamp":795551255443,"id":4,"parentId":1,"tags":{},"startTime":1760687065859,"traceId":"a951ec8da84a75aa"},{"name":"load-custom-routes","duration":163,"timestamp":795551255653,"id":5,"parentId":1,"tags":{},"startTime":1760687065859,"traceId":"a951ec8da84a75aa"},{"name":"create-dist-dir","duration":1411,"timestamp":795551313146,"id":6,"parentId":1,"tags":{},"startTime":1760687065916,"traceId":"a951ec8da84a75aa"},{"name":"create-pages-mapping","duration":171,"timestamp":795551383129,"id":7,"parentId":1,"tags":{},"startTime":1760687065986,"traceId":"a951ec8da84a75aa"},{"name":"collect-app-files","duration":3722,"timestamp":795551383331,"id":8,"parentId":1,"tags":{},"startTime":1760687065987,"traceId":"a951ec8da84a75aa"},{"name":"create-app-mapping","duration":1365,"timestamp":795551387075,"id":9,"parentId":1,"tags":{},"startTime":1760687065990,"traceId":"a951ec8da84a75aa"},{"name":"create-app-layouts","duration":224,"timestamp":795551388498,"id":10,"parentId":1,"tags":{},"startTime":1760687065992,"traceId":"a951ec8da84a75aa"},{"name":"collect-default-files","duration":1417,"timestamp":795551390513,"id":12,"parentId":1,"tags":{},"startTime":1760687065994,"traceId":"a951ec8da84a75aa"},{"name":"generate-route-types","duration":15351,"timestamp":795551389405,"id":11,"parentId":1,"tags":{},"startTime":1760687065993,"traceId":"a951ec8da84a75aa"},{"name":"public-dir-conflict-check","duration":495,"timestamp":795551404815,"id":13,"parentId":1,"tags":{},"startTime":1760687066008,"traceId":"a951ec8da84a75aa"},{"name":"generate-routes-manifest","duration":2035,"timestamp":795551405411,"id":14,"parentId":1,"tags":{},"startTime":1760687066009,"traceId":"a951ec8da84a75aa"},{"name":"run-turbopack-compiler","duration":7726875,"timestamp":795551411676,"id":16,"parentId":1,"tags":{},"startTime":1760687066015,"traceId":"a951ec8da84a75aa"},{"name":"verify-and-lint","duration":1889281,"timestamp":795559164019,"id":19,"parentId":1,"tags":{},"startTime":1760687073767,"traceId":"a951ec8da84a75aa"},{"name":"verify-typescript-setup","duration":5265231,"timestamp":795559162111,"id":18,"parentId":1,"tags":{},"startTime":1760687073765,"traceId":"a951ec8da84a75aa"},{"name":"check-static-error-page","duration":2952,"timestamp":795564441160,"id":22,"parentId":21,"tags":{},"startTime":1760687079045,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":2111,"timestamp":795564526632,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1760687079130,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":1367,"timestamp":795564527385,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":1486,"timestamp":795564527267,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":271540,"timestamp":795564531486,"id":50,"parentId":26,"tags":{},"startTime":1760687079135,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":275614,"timestamp":795564527452,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":315771,"timestamp":795564533257,"id":53,"parentId":42,"tags":{},"startTime":1760687079137,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":321423,"timestamp":795564527694,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":321228,"timestamp":795564533293,"id":54,"parentId":45,"tags":{},"startTime":1760687079137,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":326835,"timestamp":795564527709,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":350875,"timestamp":795564533177,"id":52,"parentId":33,"tags":{},"startTime":1760687079137,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":358479,"timestamp":795564527645,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":353103,"timestamp":795564533116,"id":51,"parentId":30,"tags":{},"startTime":1760687079137,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":358667,"timestamp":795564527558,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":351155,"timestamp":795564535103,"id":57,"parentId":29,"tags":{},"startTime":1760687079138,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":358712,"timestamp":795564527551,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":364478,"timestamp":795564535128,"id":58,"parentId":32,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":372003,"timestamp":795564527630,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":364615,"timestamp":795564535052,"id":56,"parentId":27,"tags":{},"startTime":1760687079138,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":372146,"timestamp":795564527526,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":375261,"timestamp":795564533388,"id":55,"parentId":31,"tags":{},"startTime":1760687079137,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":381135,"timestamp":795564527569,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":378922,"timestamp":795564535155,"id":59,"parentId":34,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":386454,"timestamp":795564527652,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":394061,"timestamp":795564535206,"id":61,"parentId":43,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":401592,"timestamp":795564527699,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":398079,"timestamp":795564535190,"id":60,"parentId":41,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":405602,"timestamp":795564527690,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":391537,"timestamp":795564550191,"id":68,"parentId":35,"tags":{},"startTime":1760687079154,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":414094,"timestamp":795564527658,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":396368,"timestamp":795564550570,"id":69,"parentId":46,"tags":{},"startTime":1760687079154,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":419253,"timestamp":795564527714,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":398327,"timestamp":795564550987,"id":70,"parentId":48,"tags":{},"startTime":1760687079154,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":421613,"timestamp":795564527723,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":404642,"timestamp":795564551197,"id":71,"parentId":47,"tags":{},"startTime":1760687079155,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":428146,"timestamp":795564527719,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":407025,"timestamp":795564551310,"id":72,"parentId":28,"tags":{},"startTime":1760687079155,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":430831,"timestamp":795564527542,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":411979,"timestamp":795564560859,"id":73,"parentId":49,"tags":{},"startTime":1760687079164,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":445160,"timestamp":795564527728,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":504252,"timestamp":795564535443,"id":64,"parentId":40,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":512039,"timestamp":795564527685,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":579640,"timestamp":795564535426,"id":62,"parentId":36,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":587431,"timestamp":795564527664,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":574946,"timestamp":795564542623,"id":66,"parentId":37,"tags":{},"startTime":1760687079146,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":589917,"timestamp":795564527669,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":583947,"timestamp":795564535436,"id":63,"parentId":39,"tags":{},"startTime":1760687079139,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":591718,"timestamp":795564527678,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":599621,"timestamp":795564549659,"id":67,"parentId":44,"tags":{},"startTime":1760687079153,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":621602,"timestamp":795564527704,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"is-page-static","duration":610341,"timestamp":795564541920,"id":65,"parentId":38,"tags":{},"startTime":1760687079145,"traceId":"a951ec8da84a75aa"},{"name":"check-page","duration":624604,"timestamp":795564527674,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1760687079131,"traceId":"a951ec8da84a75aa"},{"name":"static-check","duration":711738,"timestamp":795564440551,"id":21,"parentId":1,"tags":{},"startTime":1760687079044,"traceId":"a951ec8da84a75aa"},{"name":"generate-required-server-files","duration":269,"timestamp":795565152613,"id":75,"parentId":1,"tags":{},"startTime":1760687079756,"traceId":"a951ec8da84a75aa"},{"name":"write-routes-manifest","duration":656,"timestamp":795565158044,"id":77,"parentId":1,"tags":{},"startTime":1760687079761,"traceId":"a951ec8da84a75aa"},{"name":"load-dotenv","duration":18,"timestamp":795565170995,"id":80,"parentId":79,"tags":{},"startTime":1760687079774,"traceId":"a951ec8da84a75aa"},{"name":"run-export-path-map","duration":244,"timestamp":795565282323,"id":81,"parentId":79,"tags":{},"startTime":1760687079886,"traceId":"a951ec8da84a75aa"},{"name":"next-export","duration":734715,"timestamp":795565170401,"id":79,"parentId":1,"tags":{},"startTime":1760687079774,"traceId":"a951ec8da84a75aa"},{"name":"move-exported-app-not-found-","duration":2091,"timestamp":795565906129,"id":82,"parentId":78,"tags":{},"startTime":1760687080510,"traceId":"a951ec8da84a75aa"},{"name":"move-exported-page","duration":9204,"timestamp":795565908294,"id":83,"parentId":78,"tags":{},"startTime":1760687080512,"traceId":"a951ec8da84a75aa"},{"name":"static-generation","duration":1324766,"timestamp":795565166891,"id":78,"parentId":1,"tags":{},"startTime":1760687079770,"traceId":"a951ec8da84a75aa"},{"name":"write-routes-manifest","duration":97960,"timestamp":795566491876,"id":84,"parentId":1,"tags":{},"startTime":1760687081095,"traceId":"a951ec8da84a75aa"},{"name":"node-file-trace-build","duration":4008256,"timestamp":795565154393,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1760687079758,"traceId":"a951ec8da84a75aa"},{"name":"apply-include-excludes","duration":284,"timestamp":795569162665,"id":85,"parentId":1,"tags":{},"startTime":1760687083766,"traceId":"a951ec8da84a75aa"},{"name":"print-tree-view","duration":1887,"timestamp":795569163273,"id":86,"parentId":1,"tags":{},"startTime":1760687083767,"traceId":"a951ec8da84a75aa"},{"name":"telemetry-flush","duration":98,"timestamp":795569165168,"id":87,"parentId":1,"tags":{},"startTime":1760687083769,"traceId":"a951ec8da84a75aa"},{"name":"next-build","duration":18348270,"timestamp":795550817001,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1760687065420,"traceId":"a951ec8da84a75aa"}]
1
+ [{"name":"generate-buildid","duration":113,"timestamp":901197401668,"id":4,"parentId":1,"tags":{},"startTime":1760792712211,"traceId":"5d7cdc0f2b01ea90"},{"name":"load-custom-routes","duration":185,"timestamp":901197401824,"id":5,"parentId":1,"tags":{},"startTime":1760792712211,"traceId":"5d7cdc0f2b01ea90"},{"name":"create-dist-dir","duration":665,"timestamp":901197433600,"id":6,"parentId":1,"tags":{},"startTime":1760792712243,"traceId":"5d7cdc0f2b01ea90"},{"name":"create-pages-mapping","duration":1000,"timestamp":901197511225,"id":7,"parentId":1,"tags":{},"startTime":1760792712320,"traceId":"5d7cdc0f2b01ea90"},{"name":"collect-app-files","duration":11510,"timestamp":901197512267,"id":8,"parentId":1,"tags":{},"startTime":1760792712321,"traceId":"5d7cdc0f2b01ea90"},{"name":"create-app-mapping","duration":1833,"timestamp":901197523828,"id":9,"parentId":1,"tags":{},"startTime":1760792712333,"traceId":"5d7cdc0f2b01ea90"},{"name":"create-app-layouts","duration":557,"timestamp":901197525683,"id":10,"parentId":1,"tags":{},"startTime":1760792712335,"traceId":"5d7cdc0f2b01ea90"},{"name":"collect-default-files","duration":10596,"timestamp":901197528416,"id":12,"parentId":1,"tags":{},"startTime":1760792712338,"traceId":"5d7cdc0f2b01ea90"},{"name":"generate-route-types","duration":36808,"timestamp":901197526747,"id":11,"parentId":1,"tags":{},"startTime":1760792712336,"traceId":"5d7cdc0f2b01ea90"},{"name":"public-dir-conflict-check","duration":567,"timestamp":901197563606,"id":13,"parentId":1,"tags":{},"startTime":1760792712373,"traceId":"5d7cdc0f2b01ea90"},{"name":"generate-routes-manifest","duration":1449,"timestamp":901197564291,"id":14,"parentId":1,"tags":{},"startTime":1760792712374,"traceId":"5d7cdc0f2b01ea90"},{"name":"run-turbopack-compiler","duration":6956005,"timestamp":901197571398,"id":16,"parentId":1,"tags":{},"startTime":1760792712381,"traceId":"5d7cdc0f2b01ea90"},{"name":"verify-and-lint","duration":1976521,"timestamp":901204598225,"id":19,"parentId":1,"tags":{},"startTime":1760792719407,"traceId":"5d7cdc0f2b01ea90"},{"name":"verify-typescript-setup","duration":4871111,"timestamp":901204596155,"id":18,"parentId":1,"tags":{},"startTime":1760792719405,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-static-error-page","duration":2604,"timestamp":901209481000,"id":22,"parentId":21,"tags":{},"startTime":1760792724290,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":1829,"timestamp":901209555903,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1760792724365,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":1277,"timestamp":901209556464,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":1340,"timestamp":901209556402,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":293401,"timestamp":901209565004,"id":51,"parentId":28,"tags":{},"startTime":1760792724374,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":301896,"timestamp":901209556550,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":328629,"timestamp":901209564659,"id":50,"parentId":31,"tags":{},"startTime":1760792724374,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":336722,"timestamp":901209556629,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":343891,"timestamp":901209565503,"id":55,"parentId":35,"tags":{},"startTime":1760792724375,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":352754,"timestamp":901209556668,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":370550,"timestamp":901209574999,"id":59,"parentId":46,"tags":{},"startTime":1760792724384,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":388851,"timestamp":901209556723,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":404683,"timestamp":901209575052,"id":60,"parentId":26,"tags":{},"startTime":1760792724384,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":423279,"timestamp":901209556479,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":419449,"timestamp":901209575111,"id":61,"parentId":47,"tags":{},"startTime":1760792724384,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":437858,"timestamp":901209556732,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":425410,"timestamp":901209575158,"id":62,"parentId":48,"tags":{},"startTime":1760792724384,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":443859,"timestamp":901209556737,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":439314,"timestamp":901209575245,"id":63,"parentId":30,"tags":{},"startTime":1760792724384,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":458020,"timestamp":901209556565,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":445851,"timestamp":901209575248,"id":64,"parentId":33,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":464502,"timestamp":901209556654,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":450087,"timestamp":901209575304,"id":65,"parentId":42,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":468739,"timestamp":901209556703,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":469227,"timestamp":901209575309,"id":66,"parentId":45,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":487877,"timestamp":901209556719,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":476460,"timestamp":901209575437,"id":67,"parentId":27,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":495407,"timestamp":901209556536,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":507106,"timestamp":901209565400,"id":54,"parentId":40,"tags":{},"startTime":1760792724375,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":515926,"timestamp":901209556693,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":500339,"timestamp":901209575440,"id":68,"parentId":29,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":519257,"timestamp":901209556558,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":511838,"timestamp":901209575445,"id":70,"parentId":34,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":530650,"timestamp":901209556662,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":522075,"timestamp":901209565274,"id":52,"parentId":36,"tags":{},"startTime":1760792724375,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":530684,"timestamp":901209556673,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":511935,"timestamp":901209575443,"id":69,"parentId":32,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":530745,"timestamp":901209556642,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":523353,"timestamp":901209575447,"id":71,"parentId":41,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":542127,"timestamp":901209556698,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":533486,"timestamp":901209565362,"id":53,"parentId":39,"tags":{},"startTime":1760792724375,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":542169,"timestamp":901209556687,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":535553,"timestamp":901209575647,"id":73,"parentId":49,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":554482,"timestamp":901209556744,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":540070,"timestamp":901209575450,"id":72,"parentId":43,"tags":{},"startTime":1760792724385,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":558834,"timestamp":901209556708,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":594105,"timestamp":901209574792,"id":58,"parentId":38,"tags":{},"startTime":1760792724384,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":612246,"timestamp":901209556683,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":603175,"timestamp":901209574163,"id":57,"parentId":44,"tags":{},"startTime":1760792724383,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":620701,"timestamp":901209556714,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"is-page-static","duration":645987,"timestamp":901209565560,"id":56,"parentId":37,"tags":{},"startTime":1760792724375,"traceId":"5d7cdc0f2b01ea90"},{"name":"check-page","duration":654896,"timestamp":901209556678,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1760792724366,"traceId":"5d7cdc0f2b01ea90"},{"name":"static-check","duration":731205,"timestamp":901209480385,"id":21,"parentId":1,"tags":{},"startTime":1760792724290,"traceId":"5d7cdc0f2b01ea90"},{"name":"generate-required-server-files","duration":385,"timestamp":901210211912,"id":75,"parentId":1,"tags":{},"startTime":1760792725021,"traceId":"5d7cdc0f2b01ea90"},{"name":"write-routes-manifest","duration":754,"timestamp":901210218050,"id":77,"parentId":1,"tags":{},"startTime":1760792725027,"traceId":"5d7cdc0f2b01ea90"},{"name":"load-dotenv","duration":16,"timestamp":901210231716,"id":80,"parentId":79,"tags":{},"startTime":1760792725041,"traceId":"5d7cdc0f2b01ea90"},{"name":"run-export-path-map","duration":335,"timestamp":901210352260,"id":81,"parentId":79,"tags":{},"startTime":1760792725162,"traceId":"5d7cdc0f2b01ea90"},{"name":"next-export","duration":1149574,"timestamp":901210231160,"id":79,"parentId":1,"tags":{},"startTime":1760792725040,"traceId":"5d7cdc0f2b01ea90"},{"name":"move-exported-app-not-found-","duration":35716,"timestamp":901211381761,"id":82,"parentId":78,"tags":{},"startTime":1760792726191,"traceId":"5d7cdc0f2b01ea90"},{"name":"move-exported-page","duration":130953,"timestamp":901211417612,"id":83,"parentId":78,"tags":{},"startTime":1760792726227,"traceId":"5d7cdc0f2b01ea90"},{"name":"static-generation","duration":1575854,"timestamp":901210227726,"id":78,"parentId":1,"tags":{},"startTime":1760792725037,"traceId":"5d7cdc0f2b01ea90"},{"name":"write-routes-manifest","duration":25417,"timestamp":901211803815,"id":84,"parentId":1,"tags":{},"startTime":1760792726613,"traceId":"5d7cdc0f2b01ea90"},{"name":"node-file-trace-build","duration":3988491,"timestamp":901210214009,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1760792725023,"traceId":"5d7cdc0f2b01ea90"},{"name":"apply-include-excludes","duration":308,"timestamp":901214202529,"id":85,"parentId":1,"tags":{},"startTime":1760792729012,"traceId":"5d7cdc0f2b01ea90"},{"name":"print-tree-view","duration":2055,"timestamp":901214203210,"id":86,"parentId":1,"tags":{},"startTime":1760792729012,"traceId":"5d7cdc0f2b01ea90"},{"name":"telemetry-flush","duration":28,"timestamp":901214205273,"id":87,"parentId":1,"tags":{},"startTime":1760792729015,"traceId":"5d7cdc0f2b01ea90"},{"name":"next-build","duration":17150460,"timestamp":901197054844,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1760792711864,"traceId":"5d7cdc0f2b01ea90"}]
@@ -0,0 +1,10 @@
1
+ import { type Dayjs } from 'dayjs';
2
+ type TaskSchedule = PrismaJson.TaskSchedule;
3
+ type Options = {
4
+ now?: Date;
5
+ lookAheadDays?: number;
6
+ maxOccurrences?: number;
7
+ };
8
+ export declare const getScheduleOccurrences: (schedule: TaskSchedule | null | undefined, options?: Options) => Dayjs[];
9
+ export {};
10
+ //# sourceMappingURL=getScheduleOccurrences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getScheduleOccurrences.d.ts","sourceRoot":"","sources":["../../../src/lib/tasks/getScheduleOccurrences.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,KAAK,EAAE,MAAM,OAAO,CAAA;AAOzC,KAAK,YAAY,GAAG,UAAU,CAAC,YAAY,CAAA;AAG3C,KAAK,OAAO,GAAG;IACb,GAAG,CAAC,EAAE,IAAI,CAAA;IACV,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AA0VD,eAAO,MAAM,sBAAsB,GACjC,UAAU,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,UAAS,OAAY,KACpB,KAAK,EA4DP,CAAA"}
@@ -0,0 +1,301 @@
1
+ import dayjs from 'dayjs';
2
+ import utc from 'dayjs/plugin/utc';
3
+ import timezone from 'dayjs/plugin/timezone';
4
+ dayjs.extend(utc);
5
+ dayjs.extend(timezone);
6
+ const DEFAULT_LOOKAHEAD_DAYS = 90;
7
+ const DEFAULT_MAX_OCCURRENCES = 60;
8
+ const LOOKBACK_MINUTES = 15;
9
+ const DAY_CODE_TO_INDEX = {
10
+ SU: 0,
11
+ MO: 1,
12
+ TU: 2,
13
+ WE: 3,
14
+ TH: 4,
15
+ FR: 5,
16
+ SA: 6,
17
+ };
18
+ const parseDayCode = (value) => {
19
+ const code = value.slice(-2).toUpperCase();
20
+ return Object.prototype.hasOwnProperty.call(DAY_CODE_TO_INDEX, code)
21
+ ? DAY_CODE_TO_INDEX[code]
22
+ : null;
23
+ };
24
+ const uniqueSorted = (values) => Array.from(new Set(values)).sort((a, b) => a - b);
25
+ const normaliseTimePart = (list, fallback) => list && list.length ? uniqueSorted(list) : [fallback];
26
+ const shouldIncludeCandidate = ({ candidate, earliestAllowed, lookAheadEnd, }) => {
27
+ if (candidate.isBefore(earliestAllowed))
28
+ return false;
29
+ if (candidate.isAfter(lookAheadEnd))
30
+ return false;
31
+ return true;
32
+ };
33
+ const handleCountAndUntil = ({ candidate, countLimit, produced, until, }) => {
34
+ if (until && candidate.isAfter(until)) {
35
+ return { shouldContinue: false, produced };
36
+ }
37
+ if (produced >= countLimit) {
38
+ return { shouldContinue: false, produced };
39
+ }
40
+ return { shouldContinue: true, produced: produced + 1 };
41
+ };
42
+ const generateWeeklyOccurrences = ({ startLocal, rule, timeZone, lookAheadEnd, earliestAllowed, limit, }) => {
43
+ var _a, _b;
44
+ const days = uniqueSorted((Array.isArray(rule.byDay) && rule.byDay.length
45
+ ? rule.byDay
46
+ : [startLocal.format('dd').toUpperCase()])
47
+ .map(parseDayCode)
48
+ .filter((value) => value !== null));
49
+ if (!days.length)
50
+ days.push(startLocal.day());
51
+ const hours = normaliseTimePart(rule.byHour, startLocal.hour());
52
+ const minutes = normaliseTimePart(rule.byMinute, startLocal.minute());
53
+ const seconds = normaliseTimePart(rule.bySecond, startLocal.second());
54
+ const interval = Math.max(1, (_a = rule.interval) !== null && _a !== void 0 ? _a : 1);
55
+ const countLimit = Math.max(0, (_b = rule.count) !== null && _b !== void 0 ? _b : Number.POSITIVE_INFINITY);
56
+ const until = rule.until ? dayjs.tz(rule.until, timeZone) : null;
57
+ const byMonth = Array.isArray(rule.byMonth) && rule.byMonth.length ? rule.byMonth : null;
58
+ const baseWeekStart = startLocal.startOf('week');
59
+ const occurrences = [];
60
+ let produced = 0;
61
+ let weekIndex = 0;
62
+ const maxIterations = 1000;
63
+ while (occurrences.length < limit &&
64
+ weekIndex < maxIterations &&
65
+ produced < countLimit) {
66
+ const weekStart = baseWeekStart.add(weekIndex * interval, 'week');
67
+ if (weekStart.isAfter(lookAheadEnd))
68
+ break;
69
+ for (const dayIndex of days) {
70
+ const dayLocal = weekStart.add(dayIndex, 'day');
71
+ if (dayLocal.isBefore(startLocal))
72
+ continue;
73
+ if (until && dayLocal.isAfter(until))
74
+ return occurrences;
75
+ if (byMonth && !byMonth.includes(dayLocal.month() + 1))
76
+ continue;
77
+ for (const hour of hours) {
78
+ for (const minute of minutes) {
79
+ for (const second of seconds) {
80
+ const candidate = dayLocal
81
+ .hour(hour)
82
+ .minute(minute)
83
+ .second(second)
84
+ .millisecond(0);
85
+ if (candidate.isBefore(startLocal))
86
+ continue;
87
+ const { shouldContinue, produced: nextProduced } = handleCountAndUntil({
88
+ candidate,
89
+ countLimit,
90
+ produced,
91
+ until,
92
+ });
93
+ produced = nextProduced;
94
+ if (!shouldContinue)
95
+ return occurrences;
96
+ if (!shouldIncludeCandidate({
97
+ candidate,
98
+ earliestAllowed,
99
+ lookAheadEnd,
100
+ }))
101
+ continue;
102
+ occurrences.push(candidate);
103
+ if (occurrences.length >= limit)
104
+ return occurrences;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ weekIndex += 1;
110
+ }
111
+ return occurrences;
112
+ };
113
+ const generateSimpleSeries = ({ startLocal, rule, unit, lookAheadEnd, earliestAllowed, limit, timeZone, }) => {
114
+ var _a, _b;
115
+ const hours = normaliseTimePart(rule.byHour, startLocal.hour());
116
+ const minutes = normaliseTimePart(rule.byMinute, startLocal.minute());
117
+ const seconds = normaliseTimePart(rule.bySecond, startLocal.second());
118
+ const interval = Math.max(1, (_a = rule.interval) !== null && _a !== void 0 ? _a : 1);
119
+ const countLimit = Math.max(0, (_b = rule.count) !== null && _b !== void 0 ? _b : Number.POSITIVE_INFINITY);
120
+ const until = rule.until ? dayjs.tz(rule.until, timeZone) : null;
121
+ const byMonth = Array.isArray(rule.byMonth) && rule.byMonth.length ? rule.byMonth : null;
122
+ const byDay = Array.isArray(rule.byDay) && rule.byDay.length ? rule.byDay : null;
123
+ const occurrences = [];
124
+ let produced = 0;
125
+ let index = 0;
126
+ const maxIterations = 5000;
127
+ while (occurrences.length < limit &&
128
+ produced < countLimit &&
129
+ index < maxIterations) {
130
+ const base = startLocal.add(index * interval, unit);
131
+ index += 1;
132
+ if (base.isBefore(startLocal))
133
+ continue;
134
+ if (until && base.isAfter(until))
135
+ break;
136
+ if (byMonth && !byMonth.includes(base.month() + 1))
137
+ continue;
138
+ for (const hour of hours) {
139
+ for (const minute of minutes) {
140
+ for (const second of seconds) {
141
+ const candidate = base
142
+ .hour(hour)
143
+ .minute(minute)
144
+ .second(second)
145
+ .millisecond(0);
146
+ if (candidate.isBefore(startLocal))
147
+ continue;
148
+ if (byDay) {
149
+ const code = candidate.format('dd').toUpperCase();
150
+ if (!byDay.includes(code))
151
+ continue;
152
+ }
153
+ const { shouldContinue, produced: nextProduced } = handleCountAndUntil({
154
+ candidate,
155
+ countLimit,
156
+ produced,
157
+ until,
158
+ });
159
+ produced = nextProduced;
160
+ if (!shouldContinue)
161
+ return occurrences;
162
+ if (!shouldIncludeCandidate({
163
+ candidate,
164
+ earliestAllowed,
165
+ lookAheadEnd,
166
+ }))
167
+ continue;
168
+ occurrences.push(candidate);
169
+ if (occurrences.length >= limit)
170
+ return occurrences;
171
+ }
172
+ }
173
+ }
174
+ }
175
+ return occurrences;
176
+ };
177
+ const generateOccurrencesForRule = ({ startLocal, rule, timeZone, lookAheadEnd, earliestAllowed, limit, }) => {
178
+ const frequency = rule.frequency.toLowerCase();
179
+ if (frequency === 'weekly') {
180
+ return generateWeeklyOccurrences({
181
+ startLocal,
182
+ rule,
183
+ timeZone,
184
+ lookAheadEnd,
185
+ earliestAllowed,
186
+ limit,
187
+ });
188
+ }
189
+ if (frequency === 'daily') {
190
+ return generateSimpleSeries({
191
+ startLocal,
192
+ rule,
193
+ unit: 'day',
194
+ lookAheadEnd,
195
+ earliestAllowed,
196
+ limit,
197
+ timeZone,
198
+ });
199
+ }
200
+ if (frequency === 'monthly') {
201
+ return generateSimpleSeries({
202
+ startLocal,
203
+ rule,
204
+ unit: 'month',
205
+ lookAheadEnd,
206
+ earliestAllowed,
207
+ limit,
208
+ timeZone,
209
+ });
210
+ }
211
+ if (frequency === 'yearly') {
212
+ return generateSimpleSeries({
213
+ startLocal,
214
+ rule,
215
+ unit: 'year',
216
+ lookAheadEnd,
217
+ earliestAllowed,
218
+ limit,
219
+ timeZone,
220
+ });
221
+ }
222
+ if (frequency === 'hourly') {
223
+ return generateSimpleSeries({
224
+ startLocal,
225
+ rule,
226
+ unit: 'hour',
227
+ lookAheadEnd,
228
+ earliestAllowed,
229
+ limit,
230
+ timeZone,
231
+ });
232
+ }
233
+ if (frequency === 'minutely') {
234
+ return generateSimpleSeries({
235
+ startLocal,
236
+ rule,
237
+ unit: 'minute',
238
+ lookAheadEnd,
239
+ earliestAllowed,
240
+ limit,
241
+ timeZone,
242
+ });
243
+ }
244
+ // Unsupported frequencies fall back to no additional occurrences.
245
+ return [];
246
+ };
247
+ export const getScheduleOccurrences = (schedule, options = {}) => {
248
+ if (!schedule || typeof schedule !== 'object')
249
+ return [];
250
+ const { now = new Date(), lookAheadDays, maxOccurrences } = options;
251
+ const effectiveLookAheadDays = lookAheadDays !== null && lookAheadDays !== void 0 ? lookAheadDays : DEFAULT_LOOKAHEAD_DAYS;
252
+ const effectiveMaxOccurrences = maxOccurrences !== null && maxOccurrences !== void 0 ? maxOccurrences : DEFAULT_MAX_OCCURRENCES;
253
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
254
+ const { start, timeZone = 'UTC', recurrenceRules = [] } = schedule;
255
+ if (typeof start !== 'string')
256
+ return [];
257
+ const startLocal = dayjs(start).tz(timeZone);
258
+ if (!startLocal.isValid())
259
+ return [];
260
+ const nowLocal = dayjs(now).tz(timeZone);
261
+ const lookAheadEnd = nowLocal.add(effectiveLookAheadDays, 'day');
262
+ const earliestAllowed = nowLocal.subtract(LOOKBACK_MINUTES, 'minute');
263
+ const results = [];
264
+ const seen = new Set();
265
+ const addOccurrence = (occurrence) => {
266
+ const timestamp = occurrence.valueOf();
267
+ if (seen.has(timestamp))
268
+ return;
269
+ seen.add(timestamp);
270
+ results.push(occurrence.utc());
271
+ };
272
+ if (!Array.isArray(recurrenceRules) || recurrenceRules.length === 0) {
273
+ if (shouldIncludeCandidate({
274
+ candidate: startLocal,
275
+ earliestAllowed,
276
+ lookAheadEnd,
277
+ }))
278
+ addOccurrence(startLocal);
279
+ return results.sort((a, b) => a.valueOf() - b.valueOf());
280
+ }
281
+ for (const rule of recurrenceRules) {
282
+ if (!rule || typeof rule !== 'object' || !rule.frequency)
283
+ continue;
284
+ const occurrences = generateOccurrencesForRule({
285
+ startLocal,
286
+ rule,
287
+ timeZone,
288
+ lookAheadEnd,
289
+ earliestAllowed,
290
+ limit: effectiveMaxOccurrences,
291
+ });
292
+ for (const occurrence of occurrences) {
293
+ addOccurrence(occurrence);
294
+ if (results.length >= effectiveMaxOccurrences)
295
+ break;
296
+ }
297
+ if (results.length >= effectiveMaxOccurrences)
298
+ break;
299
+ }
300
+ return results.sort((a, b) => a.valueOf() - b.valueOf());
301
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"getTaskScheduleConflict.d.ts","sourceRoot":"","sources":["../../../src/lib/tasks/getTaskScheduleConflict.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlD,eAAO,MAAM,qBAAqB,QAAiB,CAAA;AAEnD,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,KAAK,YAAY,GAAG,UAAU,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAA;AAW9D,eAAO,MAAM,uBAAuB,GAAU,qDAM3C;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,YAAY,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;;;;;;EAiCA,CAAA"}
1
+ {"version":3,"file":"getTaskScheduleConflict.d.ts","sourceRoot":"","sources":["../../../src/lib/tasks/getTaskScheduleConflict.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlD,eAAO,MAAM,qBAAqB,QAAiB,CAAA;AAEnD,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,KAAK,YAAY,GAAG,UAAU,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAA;AAI9D,eAAO,MAAM,uBAAuB,GAAU,qDAM3C;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,YAAY,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;;;;;;EA8CA,CAAA"}
@@ -1,26 +1,18 @@
1
- import dayjs from 'dayjs';
2
- import utc from 'dayjs/plugin/utc';
3
- dayjs.extend(utc);
1
+ import { getScheduleOccurrences } from './getScheduleOccurrences';
4
2
  export const FIFTEEN_MINUTES_IN_MS = 15 * 60 * 1000;
5
3
  export var TaskScheduleConflictStatus;
6
4
  (function (TaskScheduleConflictStatus) {
7
5
  TaskScheduleConflictStatus["NONE"] = "none";
8
6
  TaskScheduleConflictStatus["CONFLICT"] = "conflict";
9
7
  })(TaskScheduleConflictStatus || (TaskScheduleConflictStatus = {}));
10
- const getScheduleStart = ({ schedule }) => {
11
- if (!schedule || typeof schedule !== 'object')
12
- return null;
13
- const start = schedule.start;
14
- if (typeof start !== 'string')
15
- return null;
16
- const parsed = dayjs(start).utc();
17
- if (!parsed.isValid())
18
- return null;
19
- return parsed;
20
- };
8
+ const LOOKAHEAD_DAYS = 365;
9
+ const MAX_OCCURRENCES = 120;
21
10
  export const getTaskScheduleConflict = async ({ prisma, threadId, key, schedule, excludeTaskId, }) => {
22
- const target = getScheduleStart({ schedule });
23
- if (!target) {
11
+ const targetOccurrences = getScheduleOccurrences(schedule, {
12
+ lookAheadDays: LOOKAHEAD_DAYS,
13
+ maxOccurrences: MAX_OCCURRENCES,
14
+ }).map((occurrence) => occurrence.valueOf());
15
+ if (!targetOccurrences.length) {
24
16
  return { status: TaskScheduleConflictStatus.NONE };
25
17
  }
26
18
  const tasks = await prisma.task.findMany({
@@ -32,18 +24,19 @@ export const getTaskScheduleConflict = async ({ prisma, threadId, key, schedule,
32
24
  },
33
25
  });
34
26
  for (const task of tasks) {
35
- const existing = getScheduleStart({
36
- schedule: task.schedule,
37
- });
38
- if (!existing)
27
+ const existingOccurrences = getScheduleOccurrences(task.schedule, {
28
+ lookAheadDays: LOOKAHEAD_DAYS,
29
+ maxOccurrences: MAX_OCCURRENCES,
30
+ }).map((occurrence) => occurrence.valueOf());
31
+ if (!existingOccurrences.length)
32
+ continue;
33
+ const hasConflict = targetOccurrences.some((targetMs) => existingOccurrences.some((existingMs) => Math.abs(existingMs - targetMs) < FIFTEEN_MINUTES_IN_MS));
34
+ if (!hasConflict)
39
35
  continue;
40
- const diffMs = Math.abs(existing.diff(target));
41
- if (diffMs < FIFTEEN_MINUTES_IN_MS) {
42
- return {
43
- status: TaskScheduleConflictStatus.CONFLICT,
44
- conflictingTaskId: task.id,
45
- };
46
- }
36
+ return {
37
+ status: TaskScheduleConflictStatus.CONFLICT,
38
+ conflictingTaskId: task.id,
39
+ };
47
40
  }
48
41
  return { status: TaskScheduleConflictStatus.NONE };
49
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superinterface/server",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superinterface-server": "./bin/index.cjs"