@wular/coder 0.4.1 → 0.4.2

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 (244) hide show
  1. package/README.md +69 -70
  2. package/dist/{add-ej0X9e3a.js → add-C2y-mVzl.js} +1 -1
  3. package/dist/{add-U-pty9qJ.js → add-CLYTF_up.js} +1 -1
  4. package/dist/{add-CE-70LFs.js → add-DRsPpQFl.js} +1 -1
  5. package/dist/{add-BxpLHnvD.js → add-DkpUwhtO.js} +1 -1
  6. package/dist/{add-json-CEa-6luW.js → add-json-5uPnWPoD.js} +1 -1
  7. package/dist/{agent-BsYx3Odz.js → agent-hw3zKw8y.js} +1 -1
  8. package/dist/{agent-JdtZozvP.js → agent-r5mMcehf.js} +1 -1
  9. package/dist/{alias-DX-Bm86x.js → alias-_0Rwf2cA.js} +1 -1
  10. package/dist/{app-BT5f7zL5.js → app-oE8G1-bi.js} +1 -1
  11. package/dist/{approvals-C-AvFt6s.js → approvals-DbVrsxec.js} +1 -1
  12. package/dist/{approve-DOmpQRNd.js → approve-DeAhFL-m.js} +1 -1
  13. package/dist/{apps-CjfrZyM5.js → apps-eujHiNca.js} +1 -1
  14. package/dist/{archive-BziJ1rQ-.js → archive-BCUfymIB.js} +1 -1
  15. package/dist/{archive-BUB8gFKD.js → archive-DZ6vpMHb.js} +1 -1
  16. package/dist/{archive-sweep-CtBcARgN.js → archive-sweep-Cxbh8yAI.js} +1 -1
  17. package/dist/{ask-dE3U3ss2.js → ask-BU2WVxVM.js} +1 -1
  18. package/dist/auth-CBWTmAPA.js +1 -0
  19. package/dist/{auth-BFny--17.js → auth-Dmn2U7rr.js} +1 -1
  20. package/dist/{cli-BilSDkvE.js → cli-DWCR7iqa.js} +1 -1
  21. package/dist/cli.js +1 -1
  22. package/dist/{config-Da_cwoxI.js → config-12pK4qW7.js} +1 -1
  23. package/dist/{create-C_iMJV4Y.js → create-D3f6q0Yq.js} +1 -1
  24. package/dist/credentials-l6dsrZLL.js +1 -0
  25. package/dist/dash/manifest.json +744 -858
  26. package/dist/dash/public/assets/chunks/{agent-pills-c9c4ac4d4a10df83.js → agent-pills-dd0b7643e125bbf1.js} +1 -1
  27. package/dist/dash/public/assets/chunks/{agent-settings-form-8be2ddab074aba6d.js → agent-settings-form-45ae6aeaaed2b568.js} +1 -1
  28. package/dist/dash/public/assets/chunks/{agents-grid-951584b6f4c4314e.js → agents-grid-b906da80c31fc035.js} +1 -1
  29. package/dist/dash/public/assets/chunks/{combo-41234c24668b1db1.js → combo-952a457d52360d88.js} +1 -1
  30. package/dist/dash/public/assets/chunks/{composer-d10d4b1d54c4f751.js → composer-49f9e7c5c4dfda3b.js} +1 -1
  31. package/dist/dash/public/assets/chunks/{composer-5534be50bc12385e.js → composer-f331d00837143aee.js} +1 -1
  32. package/dist/dash/public/assets/chunks/{connect-apps-aa2a3d82e48ed8c3.js → connect-apps-661f3b3a85f1776a.js} +1 -1
  33. package/dist/dash/public/assets/chunks/{credentials-list-bc5bfcab058176c5.js → credentials-list-e6177d0943517929.js} +2 -2
  34. package/dist/dash/public/assets/chunks/{custom-range-4761ab14f05149df.js → custom-range-03ba6fb2ade7d282.js} +1 -1
  35. package/dist/dash/public/assets/chunks/{editor-bfe8cd854f8001be.js → editor-34cb529d6d8a4b09.js} +1 -1
  36. package/dist/dash/public/assets/chunks/{engines-list-f1191390f5715b39.js → engines-list-2f1acee3ecc8461a.js} +1 -1
  37. package/dist/dash/public/assets/chunks/{heads-f3bcd289663d48fa.js → heads-1570a3a6db331979.js} +1 -1
  38. package/dist/dash/public/assets/chunks/{list-1d259660d7612c5f.js → list-87b359bebd26986a.js} +1 -1
  39. package/dist/dash/public/assets/chunks/{mcp-list-e3bebbbe831393b8.js → mcp-list-b42f0d2ee463b37d.js} +1 -1
  40. package/dist/dash/public/assets/chunks/{models-list-44f857a469ca04d5.js → models-list-0669d26fd662aec3.js} +1 -1
  41. package/dist/dash/public/assets/chunks/{platform-actions-d1426602049926d2.js → platform-actions-c92ca3c6198a9387.js} +1 -1
  42. package/dist/dash/public/assets/chunks/{runners-list-1901af8a5dea1f09.js → runners-list-9fffa50432c470c9.js} +1 -1
  43. package/dist/dash/public/assets/chunks/{select-7ae25fd8a7d6c338.js → select-1013702bdfb1ade4.js} +1 -1
  44. package/dist/dash/public/assets/chunks/shared-init-20e199043ff5d00f.js +2 -0
  45. package/dist/dash/public/assets/chunks/{task-actions-8e1d93c788d001df.js → task-actions-a9603d520434baab.js} +1 -1
  46. package/dist/dash/public/assets/chunks/{task-view-6d7618d2820a5cb4.js → task-view-f7039cb330bcb0b5.js} +3 -3
  47. package/dist/dash/public/assets/chunks/{tasks-list-f4784e5cbd0ed785.js → tasks-list-2a905b4a0c3a9042.js} +1 -1
  48. package/dist/dash/public/assets/chunks/{toolbar-a75d2570f07cbb70.js → toolbar-f964fa864699f095.js} +1 -1
  49. package/dist/dash/public/assets/dash-49ca85b59ac65c20.css +1 -0
  50. package/dist/dash/public/assets/dash-account-96fc41be318839fa.css +1 -0
  51. package/dist/dash/public/assets/dash-agents-290a7b21c7dc0c92.css +1 -0
  52. package/dist/dash/public/assets/dash-agents-new-a7a07bf4ebda24c2.css +1 -0
  53. package/dist/dash/public/assets/dash-agents-param-slug-69a72fb0bbd14cc2.css +1 -0
  54. package/dist/dash/public/assets/dash-agents-param-slug-edit-397bdfb2f0ca328c.css +1 -0
  55. package/dist/dash/public/assets/dash-agents-param-slug-platforms-a7b3b7247c27f1d2.css +1 -0
  56. package/dist/dash/public/assets/dash-agents-param-slug-settings-8389b7d0555e8ccf.css +1 -0
  57. package/dist/dash/public/assets/dash-agents-param-slug-tasks-5987b8aea5e8f30d.css +1 -0
  58. package/dist/dash/public/assets/dash-agents-param-slug-usage-19abc69e1d4e6b0a.css +1 -0
  59. package/dist/dash/public/assets/dash-settings-53b8e6a8f656fa1a.css +1 -0
  60. package/dist/dash/public/assets/dash-settings-param-tab-ac61fdfdd6fd533f.css +1 -0
  61. package/dist/dash/public/assets/dash-tasks-cc0b1d32874b731c.css +1 -0
  62. package/dist/dash/public/assets/dash-tasks-param-id-02b8c7bd99cc1090.css +1 -0
  63. package/dist/dash/public/assets/dash-usage-884943221f76ad93.css +1 -0
  64. package/dist/dash/public/assets/pnext-client-17ba55bb57a1f4da.js +1 -0
  65. package/dist/dash/public/assets/{pnext-client-1b9ab0963a8ff77b.js → pnext-client-1afa4148bea69ad2.js} +1 -1
  66. package/dist/dash/public/assets/pnext-client-2693db10b197ade1.js +1 -0
  67. package/dist/dash/public/assets/pnext-client-43f52a07f8067b1b.js +1 -0
  68. package/dist/dash/public/assets/pnext-client-4594b693fe612835.js +1 -0
  69. package/dist/dash/public/assets/pnext-client-73f73e24f8141fb6.js +1 -0
  70. package/dist/dash/public/assets/pnext-client-7574da4651b40eae.js +1 -0
  71. package/dist/dash/public/assets/pnext-client-7b3a2c1092cbbb02.js +1 -0
  72. package/dist/dash/public/assets/pnext-client-816fe5fc96d3f768.js +1 -0
  73. package/dist/dash/public/assets/pnext-client-86cb956b448b0887.js +1 -0
  74. package/dist/dash/public/assets/pnext-client-8b64e3c030164288.js +1 -0
  75. package/dist/dash/public/assets/pnext-client-8f6161084c595a22.js +1 -0
  76. package/dist/dash/public/assets/pnext-client-9203ec11926e5d04.js +1 -0
  77. package/dist/dash/public/assets/pnext-client-a38b446f941d44df.js +1 -0
  78. package/dist/dash/public/assets/pnext-client-bd8d51aaa095e8a4.js +1 -0
  79. package/dist/dash/public/assets/pnext-client-e9821d1f1bdb281d.js +1 -0
  80. package/dist/dash/server/bundle-0.1.6-b29ec45cb963d47f/entry.js +2 -0
  81. package/dist/{default-vYPT26DR.js → default-CwQXCtoB.js} +1 -1
  82. package/dist/{default-Bobztoxf.js → default-De8FXiWz.js} +1 -1
  83. package/dist/{delete-z1_86nf6.js → delete-BD6AnCLg.js} +1 -1
  84. package/dist/{delete-D8gEwoOj.js → delete-cS01oOIb.js} +1 -1
  85. package/dist/{disable-DVKd-0Xb.js → disable-BMWWeYFQ.js} +1 -1
  86. package/dist/{discover-Df-a8K4R.js → discover-Cfx5RPU7.js} +1 -1
  87. package/dist/{docs-DKJnqZqt.js → docs-DWegDRiu.js} +1 -1
  88. package/dist/{enable-C8Zf_wpN.js → enable-Cfzeau2x.js} +1 -1
  89. package/dist/{flow-17k25MHt.js → flow-kAxxVOiR.js} +1 -1
  90. package/dist/{init-CoMfFxbG.js → init-C4tDFH4G.js} +1 -1
  91. package/dist/integrations-D-L3uQRj.js +1 -0
  92. package/dist/{list-BYiG8Zav.js → list-5Ljf9TxF.js} +2 -2
  93. package/dist/{list-BAKvxSbh.js → list-COAo7eZd.js} +1 -1
  94. package/dist/{list-DX-z3SBp.js → list-DuPqU3fk.js} +1 -1
  95. package/dist/{list-C5w01-8q.js → list-DzGuMkQy.js} +1 -1
  96. package/dist/{list-VToARh3C.js → list-J8d_zh-o.js} +1 -1
  97. package/dist/{list-BxEywhHU.js → list-vOvIpbOH.js} +1 -1
  98. package/dist/{list-CIW2joV1.js → list-vpyS-hv8.js} +1 -1
  99. package/dist/{list-DpCf4G-H.js → list-way5oLO0.js} +1 -1
  100. package/dist/{login-DkkslfBx.js → login-BBw95-S3.js} +1 -1
  101. package/dist/{login-BFxX4jJy.js → login-CNmeRAL7.js} +1 -1
  102. package/dist/{logout-BHAtw4Z8.js → logout-j0dTo_Ib.js} +1 -1
  103. package/dist/{maintenance-C5FklUw3.js → maintenance-DkLVtqM7.js} +1 -1
  104. package/dist/{mcp-CCZOAo06.js → mcp-CsmBtlW9.js} +1 -1
  105. package/dist/{migrate-C4vM7DQN.js → migrate-D4nzYhk8.js} +1 -1
  106. package/dist/{model-Bs1StDo3.js → model-B79MFtRV.js} +1 -1
  107. package/dist/{push-CUC55Bqd.js → push-DbdnbZYt.js} +1 -1
  108. package/dist/{queue-6io_NOP3.js → queue-C9fSdE_X.js} +27 -27
  109. package/dist/refresh-BDmap1RA.js +1 -0
  110. package/dist/{remove-B93LNkZI.js → remove-BNzbUhaK.js} +1 -1
  111. package/dist/{remove-eQ8y5C5p.js → remove-CLpL12Ya.js} +1 -1
  112. package/dist/{remove-CuH8a3L9.js → remove-CaYH9Cna.js} +1 -1
  113. package/dist/{remove-C5_xggx7.js → remove-D-QeeZQL.js} +1 -1
  114. package/dist/{rename-CYfy03FE.js → rename-Bhcb4t9F.js} +1 -1
  115. package/dist/{result-BEtQZHaY.js → result-BfTfJayl.js} +1 -1
  116. package/dist/{result-BzaM3inj.js → result-D8DsvJDu.js} +1 -1
  117. package/dist/{resume-DYzKvyEw.js → resume-aZ8yWDBh.js} +1 -1
  118. package/dist/{review-oIBeECZE.js → review-BEhDcX4b.js} +1 -1
  119. package/dist/{rotate-key-IdMYH7gg.js → rotate-key-BqnKhTK8.js} +1 -1
  120. package/dist/{run-CTtd0Znc.js → run-BWbabvub.js} +1 -1
  121. package/dist/{run-CawRGnOg.js → run-BdPjxaZU.js} +1 -1
  122. package/dist/{run-BDYl0CKl.js → run-Dqe38jX8.js} +1 -1
  123. package/dist/runner-BPpiJvHx.js +1 -0
  124. package/dist/sdk.js +1 -1
  125. package/dist/{serve-CPnmrKyf.js → serve-C0WC-QrV.js} +2 -2
  126. package/dist/{serve-GmRO89s5.js → serve-CcObDKKQ.js} +1 -1
  127. package/dist/{serve-CE8YV2e9.js → serve-Ck95047c.js} +1 -1
  128. package/dist/{serve-CQKZxzFE.js → serve-DA5I2qXj.js} +2 -2
  129. package/dist/{server-Kb22cWfF.js → server-BxLFZL80.js} +1 -1
  130. package/dist/{setup-host-GFTUzzZJ.js → setup-host-DLd_j2Uw.js} +1 -1
  131. package/dist/{shared-DVtzWhUT.js → shared-BLkGRKty.js} +1 -1
  132. package/dist/{show-COTZEYgc.js → show-DzoQIs75.js} +1 -1
  133. package/dist/{show-CMUg8SJu.js → show-FC3dJcD-.js} +1 -1
  134. package/dist/{status-D26U--p8.js → status-BU3DR1XU.js} +1 -1
  135. package/dist/{steer-C6uARLp5.js → steer-P_38hRRD.js} +1 -1
  136. package/dist/{stop-BrGI3hSS.js → stop-BJGDRPsp.js} +1 -1
  137. package/dist/{stop-ByCAlbmN.js → stop-BWY6k6v5.js} +1 -1
  138. package/dist/{store-DzqXS2wT.js → store-B3ZHoBJY.js} +4 -4
  139. package/dist/{store-B94tSate.js → store-BLi19UDE.js} +1 -1
  140. package/dist/{task-CgOKgkEG.js → task-b2BK481M.js} +1 -1
  141. package/dist/{test-NEbhlxvo.js → test-BrSrhop9.js} +1 -1
  142. package/dist/{tools-D0Zfs8Hx.js → tools-CgswhJzh.js} +1 -1
  143. package/dist/{unalias-C9NqmSDq.js → unalias-mMHXqok7.js} +1 -1
  144. package/dist/{update-BTxYQj7Z.js → update-DbOWToPy.js} +1 -1
  145. package/dist/{upgrade-hA0yWBvx.js → upgrade-D6oC9HQI.js} +2 -2
  146. package/dist/{usage-BhqoCjvE.js → usage-Cb8Dtv9V.js} +1 -1
  147. package/dist/{usage-C4d9X2Uq.js → usage-DMs-IIJC.js} +1 -1
  148. package/dist/{watch-DtRuC0Wc.js → watch-BcMQXGYO.js} +1 -1
  149. package/dist/{watch-CSdj24ct.js → watch-eE2XiwsC.js} +1 -1
  150. package/dist/{worker-DX7P9kWl.js → worker-DrucI22w.js} +1 -1
  151. package/dist/{workflow-Dcmdooi8.js → workflow-Cshghoas.js} +1 -1
  152. package/docs/cli.md +145 -0
  153. package/package.json +3 -2
  154. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  155. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  156. package/src/core/defaults.ts +25 -0
  157. package/src/server/dash/app/dash/layout.css +58 -1
  158. package/src/server/dash/app/dash/layout.tsx +16 -4
  159. package/src/server/dash/app/dash/settings/[tab]/page.tsx +1 -1
  160. package/src/server/dash/comps/nav/side-toggle.tsx +1 -1
  161. package/src/server/dash/comps/ui/menu.tsx +5 -1
  162. package/src/server/dash/comps/ui/toast.css +3 -2
  163. package/dist/auth-DWHIzqbA.js +0 -1
  164. package/dist/credentials-B1jv6dkg.js +0 -1
  165. package/dist/dash/public/assets/chunks/shared-init-ffb3397e494137c9.js +0 -2
  166. package/dist/dash/public/assets/dash-9e02d5d1a6d42ee3.css +0 -1
  167. package/dist/dash/public/assets/dash-account-04859899c1838ada.css +0 -1
  168. package/dist/dash/public/assets/dash-agents-9e678137267dec07.css +0 -1
  169. package/dist/dash/public/assets/dash-agents-new-26fa27b17ef9b8d8.css +0 -1
  170. package/dist/dash/public/assets/dash-agents-param-slug-b975c48f8abf3444.css +0 -1
  171. package/dist/dash/public/assets/dash-agents-param-slug-edit-e13fda599bb04843.css +0 -1
  172. package/dist/dash/public/assets/dash-agents-param-slug-platforms-70292932cb27bc96.css +0 -1
  173. package/dist/dash/public/assets/dash-agents-param-slug-settings-71f9a86251723fcc.css +0 -1
  174. package/dist/dash/public/assets/dash-agents-param-slug-tasks-fb8eb2ed71006601.css +0 -1
  175. package/dist/dash/public/assets/dash-agents-param-slug-usage-7c8740f1cdd52c71.css +0 -1
  176. package/dist/dash/public/assets/dash-settings-8eb818da462227e8.css +0 -1
  177. package/dist/dash/public/assets/dash-settings-param-tab-849a1a9542e273f5.css +0 -1
  178. package/dist/dash/public/assets/dash-tasks-81e510e0b6931b42.css +0 -1
  179. package/dist/dash/public/assets/dash-tasks-param-id-bbd2a83342f2ec10.css +0 -1
  180. package/dist/dash/public/assets/dash-usage-8e0259e03eaed1bd.css +0 -1
  181. package/dist/dash/public/assets/pnext-client-03b03b254e525e82.js +0 -1
  182. package/dist/dash/public/assets/pnext-client-1c7859bb888f4ef0.js +0 -1
  183. package/dist/dash/public/assets/pnext-client-3c748afe963fb05d.js +0 -1
  184. package/dist/dash/public/assets/pnext-client-4f47c2cae220f107.js +0 -1
  185. package/dist/dash/public/assets/pnext-client-6ab9fd9b53b794d2.js +0 -1
  186. package/dist/dash/public/assets/pnext-client-6c241786342498e4.js +0 -1
  187. package/dist/dash/public/assets/pnext-client-80b56d420f02b808.js +0 -1
  188. package/dist/dash/public/assets/pnext-client-83135c17bae850a3.js +0 -1
  189. package/dist/dash/public/assets/pnext-client-8e6fa4302ae0396f.js +0 -1
  190. package/dist/dash/public/assets/pnext-client-932c9d8cc0717fc8.js +0 -1
  191. package/dist/dash/public/assets/pnext-client-a42ae63d4de113f9.js +0 -1
  192. package/dist/dash/public/assets/pnext-client-d2ee6f8c1e337032.js +0 -1
  193. package/dist/dash/public/assets/pnext-client-d513f65ec23b7f20.js +0 -1
  194. package/dist/dash/public/assets/pnext-client-ecb88e2a8a109954.js +0 -1
  195. package/dist/dash/public/assets/pnext-client-f1545ee6270bbf9a.js +0 -1
  196. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +0 -30
  197. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +0 -2704
  198. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +0 -208
  199. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +0 -834
  200. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +0 -35
  201. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +0 -1582
  202. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +0 -131
  203. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +0 -437
  204. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +0 -25
  205. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +0 -831
  206. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +0 -724
  207. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +0 -22
  208. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +0 -172
  209. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +0 -378
  210. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +0 -89
  211. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +0 -6270
  212. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +0 -1198
  213. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +0 -61
  214. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +0 -5151
  215. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +0 -20
  216. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +0 -438
  217. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +0 -17
  218. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +0 -107
  219. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +0 -183
  220. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +0 -647
  221. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +0 -129
  222. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +0 -7146
  223. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +0 -2397
  224. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +0 -220
  225. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +0 -72
  226. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +0 -231
  227. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +0 -627
  228. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +0 -265
  229. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +0 -18
  230. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +0 -16
  231. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +0 -17
  232. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +0 -219
  233. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +0 -16
  234. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +0 -48
  235. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +0 -963
  236. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +0 -26
  237. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +0 -12579
  238. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +0 -505
  239. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +0 -54
  240. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +0 -15
  241. package/dist/integrations-5xCaXSd-.js +0 -1
  242. package/dist/refresh-BIrmrWYq.js +0 -1
  243. package/dist/runner-D7ScbIHJ.js +0 -1
  244. package/src/server/dash/app/dash/token-from-hash.tsx +0 -17
@@ -1,831 +0,0 @@
1
- import { createRequire as __coderRequire } from "node:module";
2
- const __pnextRoot = __coderRequire(import.meta.url).resolve("@wular/pnext").replace(/\/src\/index\.ts$/, "");
3
- import { createRequire as __pnextCreateRequire } from "node:module";
4
- const require = __pnextCreateRequire(("file://" + __pnextRoot + "/package.json"));
5
- import {
6
- scanRootParamTypes
7
- } from "./chunk-PA4QEARJ.js";
8
- import {
9
- getNextConfig
10
- } from "./chunk-2ICEVELW.js";
11
- import {
12
- ensureDir,
13
- toPosixPath
14
- } from "./chunk-2HFY3DQT.js";
15
-
16
- // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/typed-routes/generate.ts
17
- import { existsSync as existsSync2 } from "node:fs";
18
- import { readFile, writeFile } from "node:fs/promises";
19
- import path2 from "node:path";
20
-
21
- // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/typed-routes/manifest.ts
22
- import { existsSync } from "node:fs";
23
- import { readdir } from "node:fs/promises";
24
- import path from "node:path";
25
- var PAGE_EXTENSIONS = ["tsx", "ts", "jsx", "js", "mdx", "md"];
26
- var LAYOUT_NAMES = new Set(PAGE_EXTENSIONS.map((ext) => `layout.${ext}`));
27
- function isGroupSegment(name) {
28
- return name.startsWith("(") && name.endsWith(")");
29
- }
30
- function isSlotSegment(name) {
31
- return name.startsWith("@");
32
- }
33
- function decodeLiteral(segment) {
34
- return segment.replace(/%5[Ff]/g, "_");
35
- }
36
- function groupsFromBracketRoute(route) {
37
- const groups = {};
38
- let pos = 1;
39
- for (const segment of route.split("/").filter(Boolean)) {
40
- const optionalCatchAll = /^\[\[\.\.\.(.+)\]\]$/.exec(segment);
41
- if (optionalCatchAll?.[1]) {
42
- groups[optionalCatchAll[1]] = { pos: pos++, repeat: true, optional: true };
43
- continue;
44
- }
45
- const catchAll = /^\[\.\.\.(.+)\]$/.exec(segment);
46
- if (catchAll?.[1]) {
47
- groups[catchAll[1]] = { pos: pos++, repeat: true, optional: false };
48
- continue;
49
- }
50
- const param = /^\[(.+)\]$/.exec(segment);
51
- if (param?.[1]) {
52
- groups[param[1]] = { pos: pos++, repeat: false, optional: false };
53
- }
54
- }
55
- return groups;
56
- }
57
- function bracketRouteFromEntry(entry) {
58
- const segments = entry.route.split("/").filter(Boolean).map((segment) => {
59
- const catchAll = /^:(.+)\*$/.exec(segment);
60
- if (catchAll?.[1]) {
61
- const name = catchAll[1];
62
- return name === entry.catchAll && entry.catchAllOptional ? `[[...${name}]]` : `[...${name}]`;
63
- }
64
- const param = /^:(.+)$/.exec(segment);
65
- if (param?.[1]) return `[${param[1]}]`;
66
- return segment;
67
- });
68
- return `/${segments.join("/")}`.replace(/\/$/, "") || "/";
69
- }
70
- function bracketRouteFromDir(relativeDir) {
71
- const segments = [];
72
- for (const segment of relativeDir.split("/").filter(Boolean)) {
73
- if (isGroupSegment(segment) || isSlotSegment(segment)) continue;
74
- if (/^\[\[?\.\.\..+\]\]?$/.test(segment) || /^\[.+\]$/.test(segment)) {
75
- segments.push(segment);
76
- } else {
77
- segments.push(decodeLiteral(segment));
78
- }
79
- }
80
- return `/${segments.join("/")}`.replace(/\/$/, "") || "/";
81
- }
82
- function pagesRouteFromRelative(relative) {
83
- const withoutExt = relative.replace(/\.[^.]+$/, "");
84
- const trimmed = withoutExt.replace(/\/index$/, "").replace(/^index$/, "");
85
- const route = `/${trimmed}`.replace(/\/$/, "") || "/";
86
- return route;
87
- }
88
- async function walkFiles(dir) {
89
- if (!existsSync(dir)) return [];
90
- const out = [];
91
- const entries = await readdir(dir, { withFileTypes: true });
92
- for (const entry of entries) {
93
- const full = path.join(dir, entry.name);
94
- if (entry.isDirectory()) out.push(...await walkFiles(full));
95
- else out.push(full);
96
- }
97
- return out;
98
- }
99
- function isPrivate(relativeDir) {
100
- return relativeDir.split("/").some((seg) => seg.startsWith("_") && !isGroupSegment(seg) && !isSlotSegment(seg));
101
- }
102
- function convertCustomRouteSource(source) {
103
- const normalized = source.startsWith("/") ? source : `/${source}`;
104
- const converted = normalized.split("/").map((segment) => {
105
- const optional = /^:(.+)\*$/.exec(segment);
106
- if (optional?.[1]) return `[[...${optional[1]}]]`;
107
- const catchAll = /^:(.+)\+$/.exec(segment);
108
- if (catchAll?.[1]) return `[...${catchAll[1]}]`;
109
- const param = /^:([A-Za-z0-9_]+)$/.exec(segment);
110
- if (param?.[1]) return `[${param[1]}]`;
111
- return segment;
112
- }).join("/");
113
- return [converted.replace(/\/$/, "") || "/"];
114
- }
115
- async function buildRouteTypesManifest({
116
- config,
117
- routes,
118
- nextConfig
119
- }) {
120
- const relApp = (file) => toPosixPath(path.relative(config.root, file));
121
- const isHybrid = config.appPath.includes("pnext-pages-compat");
122
- const sourceAppPath = (entry) => {
123
- if (!isHybrid) return entry.file;
124
- const basename = entry.kind === "page" ? /^page\.(?:tsx?|jsx?|mdx?)$/ : /^route\.(?:tsx?|jsx?)$/;
125
- const source = entry.sourceFiles.find((file) => {
126
- const normalized = toPosixPath(file);
127
- return normalized.includes("/source-app/") && basename.test(path.basename(normalized));
128
- });
129
- if (!source) return void 0;
130
- const relative = toPosixPath(source).split("/source-app/")[1];
131
- return relative ? path.join(config.root, "app", relative) : void 0;
132
- };
133
- const manifest = {
134
- appRoutes: {},
135
- pageRoutes: {},
136
- layoutRoutes: {},
137
- appRouteHandlerRoutes: {},
138
- redirectRoutes: {},
139
- rewriteRoutes: {},
140
- appPagePaths: /* @__PURE__ */ new Set(),
141
- pagesRouterPagePaths: /* @__PURE__ */ new Set(),
142
- layoutPaths: /* @__PURE__ */ new Set(),
143
- appRouteHandlers: /* @__PURE__ */ new Set(),
144
- pageApiRoutes: /* @__PURE__ */ new Set(),
145
- filePathToRoute: /* @__PURE__ */ new Map()
146
- };
147
- const hybridFilteredRoutes = isHybrid ? routes.filter((entry) => {
148
- const file = entry.file;
149
- if (!file.includes("pnext-pages-compat")) return true;
150
- const sourceFiles = entry.sourceFiles ?? [];
151
- const isPagesWrapper = sourceFiles.some((sf) => sf.includes("source-pages"));
152
- if (isPagesWrapper) return false;
153
- return true;
154
- }) : routes;
155
- for (const entry of hybridFilteredRoutes) {
156
- if (entry.synthetic || entry.interception || entry.metadataRoute) continue;
157
- const source = sourceAppPath(entry);
158
- if (!source) continue;
159
- const bracket = bracketRouteFromEntry(entry);
160
- const rel = relApp(source);
161
- const info = { path: rel, groups: groupsFromBracketRoute(bracket) };
162
- if (entry.kind === "page") {
163
- if (!manifest.appRoutes[bracket]) manifest.appRoutes[bracket] = info;
164
- } else {
165
- if (!manifest.appRouteHandlerRoutes[bracket]) manifest.appRouteHandlerRoutes[bracket] = info;
166
- manifest.appRouteHandlers.add(rel);
167
- manifest.filePathToRoute.set(rel, bracket);
168
- }
169
- }
170
- const appFiles = await walkFiles(isHybrid ? path.join(config.root, "app") : config.appPath);
171
- const appPath = isHybrid ? path.join(config.root, "app") : config.appPath;
172
- for (const file of appFiles) {
173
- const relative = toPosixPath(path.relative(appPath, file));
174
- const base = path.basename(relative);
175
- if (!LAYOUT_NAMES.has(base)) continue;
176
- const dir = path.dirname(relative) === "." ? "" : path.dirname(relative);
177
- if (isPrivate(dir)) continue;
178
- const bracket = bracketRouteFromDir(dir);
179
- const rel = relApp(file);
180
- if (!manifest.layoutRoutes[bracket]) {
181
- manifest.layoutRoutes[bracket] = {
182
- path: rel,
183
- groups: groupsFromBracketRoute(bracket),
184
- slots: []
185
- };
186
- }
187
- manifest.layoutPaths.add(rel);
188
- manifest.filePathToRoute.set(rel, bracket);
189
- }
190
- for (const file of appFiles) {
191
- const relative = toPosixPath(path.relative(appPath, file));
192
- const segments = relative.split("/");
193
- let slotIndex = -1;
194
- for (let i = segments.length - 1; i >= 0; i--) {
195
- if (isSlotSegment(segments[i])) {
196
- slotIndex = i;
197
- break;
198
- }
199
- }
200
- if (slotIndex === -1) continue;
201
- const slotName = segments[slotIndex].slice(1);
202
- const ownerDir = segments.slice(0, slotIndex).join("/");
203
- if (isPrivate(ownerDir)) continue;
204
- const ownerRoute = bracketRouteFromDir(ownerDir);
205
- const layout = manifest.layoutRoutes[ownerRoute];
206
- if (layout && !layout.slots.includes(slotName)) layout.slots.push(slotName);
207
- }
208
- const PAGE_BASENAMES = new Set(PAGE_EXTENSIONS.map((ext) => `page.${ext}`));
209
- for (const file of appFiles) {
210
- const relative = toPosixPath(path.relative(appPath, file));
211
- if (!PAGE_BASENAMES.has(path.basename(relative))) continue;
212
- const dir = path.dirname(relative) === "." ? "" : path.dirname(relative);
213
- if (isPrivate(dir)) continue;
214
- const route = bracketRouteFromDir(dir);
215
- if (!manifest.appRoutes[route]) continue;
216
- const rel = relApp(file);
217
- manifest.appPagePaths.add(rel);
218
- manifest.filePathToRoute.set(rel, route);
219
- }
220
- const pagesDir = path.join(config.root, "pages");
221
- for (const file of await walkFiles(pagesDir)) {
222
- const relative = toPosixPath(path.relative(pagesDir, file));
223
- if (!PAGE_EXTENSIONS.some((ext) => relative.endsWith(`.${ext}`))) continue;
224
- const base = path.basename(relative);
225
- if (base.startsWith("_app.") || base.startsWith("_document.") || base.startsWith("_error.")) {
226
- continue;
227
- }
228
- const rel = relApp(file);
229
- const isApi = relative === "api" || relative.startsWith("api/");
230
- const route = pagesRouteFromRelative(relative);
231
- if (isApi) {
232
- manifest.pageApiRoutes.add(rel);
233
- manifest.filePathToRoute.set(rel, route);
234
- } else {
235
- manifest.pageRoutes[route] = { path: rel, groups: groupsFromBracketRoute(route) };
236
- manifest.pagesRouterPagePaths.add(rel);
237
- manifest.filePathToRoute.set(rel, route);
238
- }
239
- }
240
- const redirects = nextConfig.redirects;
241
- if (typeof redirects === "function") {
242
- const list = await redirects();
243
- for (const item of list ?? []) {
244
- for (const route of convertCustomRouteSource(item.source)) {
245
- manifest.redirectRoutes[route] = { path: route, groups: groupsFromBracketRoute(route) };
246
- }
247
- }
248
- }
249
- const rewrites = nextConfig.rewrites;
250
- if (typeof rewrites === "function") {
251
- const result = await rewrites();
252
- const sources = Array.isArray(result) ? result : [...result?.beforeFiles ?? [], ...result?.afterFiles ?? [], ...result?.fallback ?? []];
253
- for (const item of sources) {
254
- for (const route of convertCustomRouteSource(item.source)) {
255
- manifest.rewriteRoutes[route] = { path: route, groups: groupsFromBracketRoute(route) };
256
- }
257
- }
258
- }
259
- return manifest;
260
- }
261
-
262
- // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/typed-routes/typegen.ts
263
- function isDynamicRoute(route) {
264
- return /\[.+\]/.test(route);
265
- }
266
- function generateRouteTypes(manifest) {
267
- const appRoutes = Object.keys(manifest.appRoutes).sort();
268
- const pageRoutes = Object.keys(manifest.pageRoutes).sort();
269
- const layoutRoutes = Object.keys(manifest.layoutRoutes).sort();
270
- const redirectRoutes = Object.keys(manifest.redirectRoutes).sort();
271
- const rewriteRoutes = Object.keys(manifest.rewriteRoutes).sort();
272
- const appRouteHandlerRoutes = Object.keys(manifest.appRouteHandlerRoutes).sort();
273
- const hasAppRouteHandlers = appRouteHandlerRoutes.length > 0;
274
- const union = (list) => list.map((route) => JSON.stringify(route)).join(" | ");
275
- let result = "";
276
- result += appRoutes.length > 0 ? `type AppRoutes = ${union(appRoutes)}
277
- ` : "type AppRoutes = never\n";
278
- if (hasAppRouteHandlers) {
279
- result += `type AppRouteHandlerRoutes = ${union(appRouteHandlerRoutes)}
280
- `;
281
- }
282
- result += pageRoutes.length > 0 ? `type PageRoutes = ${union(pageRoutes)}
283
- ` : "type PageRoutes = never\n";
284
- result += layoutRoutes.length > 0 ? `type LayoutRoutes = ${union(layoutRoutes)}
285
- ` : "type LayoutRoutes = never\n";
286
- result += redirectRoutes.length > 0 ? `type RedirectRoutes = ${union(redirectRoutes)}
287
- ` : "type RedirectRoutes = never\n";
288
- result += rewriteRoutes.length > 0 ? `type RewriteRoutes = ${union(rewriteRoutes)}
289
- ` : "type RewriteRoutes = never\n";
290
- const routeUnionParts = [
291
- "AppRoutes",
292
- "PageRoutes",
293
- "LayoutRoutes",
294
- "RedirectRoutes",
295
- "RewriteRoutes"
296
- ];
297
- if (hasAppRouteHandlers) routeUnionParts.push("AppRouteHandlerRoutes");
298
- result += `type Routes = ${routeUnionParts.join(" | ")}
299
- `;
300
- return result;
301
- }
302
- function generateParamTypes(manifest) {
303
- const allRoutes = {
304
- ...manifest.appRoutes,
305
- ...manifest.appRouteHandlerRoutes,
306
- ...manifest.pageRoutes,
307
- ...manifest.layoutRoutes,
308
- ...manifest.redirectRoutes,
309
- ...manifest.rewriteRoutes
310
- };
311
- let paramTypes = "interface ParamMap {\n";
312
- const sortedRoutes = Object.entries(allRoutes).sort(([a], [b]) => a.localeCompare(b));
313
- for (const [route, routeInfo] of sortedRoutes) {
314
- const groups = routeInfo.groups;
315
- if (!isDynamicRoute(route) || Object.keys(groups ?? {}).length === 0) {
316
- paramTypes += ` ${JSON.stringify(route)}: {}
317
- `;
318
- continue;
319
- }
320
- let paramType = "{";
321
- for (const [key, group] of Object.entries(groups)) {
322
- const escapedKey = JSON.stringify(key);
323
- if (group.repeat) {
324
- paramType += group.optional ? ` ${escapedKey}?: string[];` : ` ${escapedKey}: string[];`;
325
- } else {
326
- paramType += group.optional ? ` ${escapedKey}?: string;` : ` ${escapedKey}: string;`;
327
- }
328
- }
329
- paramType += " }";
330
- paramTypes += ` ${JSON.stringify(route)}: ${paramType}
331
- `;
332
- }
333
- paramTypes += "}\n";
334
- return paramTypes;
335
- }
336
- function generateLayoutSlotMap(manifest) {
337
- let slotMap = "interface LayoutSlotMap {\n";
338
- const sorted = Object.entries(manifest.layoutRoutes).sort(([a], [b]) => a.localeCompare(b));
339
- for (const [route, routeInfo] of sorted) {
340
- const slots = [...routeInfo.slots].sort();
341
- slotMap += slots.length > 0 ? ` ${JSON.stringify(route)}: ${slots.map((slot) => JSON.stringify(slot)).join(" | ")}
342
- ` : ` ${JSON.stringify(route)}: never
343
- `;
344
- }
345
- slotMap += "}\n";
346
- return slotMap;
347
- }
348
- function formatRouteToRouteType(route) {
349
- const isDynamic = isDynamicRoute(route);
350
- let routeType = route;
351
- if (isDynamic) {
352
- routeType = route.split("/").map((part) => {
353
- if (part.startsWith("[") && part.endsWith("]")) {
354
- if (part.startsWith("[[...") && part.endsWith("]]")) return "${OptionalCatchAllSlug<T>}";
355
- if (part.startsWith("[...")) return "${CatchAllSlug<T>}";
356
- return "${SafeSlug<T>}";
357
- }
358
- return part;
359
- }).join("/");
360
- }
361
- return { isDynamic, routeType };
362
- }
363
- function serializeRouteTypes(routeTypes) {
364
- routeTypes.sort(([a], [b]) => a.localeCompare(b));
365
- let union = "";
366
- for (const [route, cause] of routeTypes) {
367
- union += `
368
- | \`${route}\` // ${cause}`;
369
- }
370
- return union;
371
- }
372
- function generateRouteTypesFile(manifest) {
373
- const routeTypes = generateRouteTypes(manifest);
374
- const paramTypes = generateParamTypes(manifest);
375
- const layoutSlotMap = generateLayoutSlotMap(manifest);
376
- const hasAppRouteHandlers = Object.keys(manifest.appRouteHandlerRoutes).length > 0;
377
- const routeExports = [
378
- "AppRoutes",
379
- "PageRoutes",
380
- "LayoutRoutes",
381
- "RedirectRoutes",
382
- "RewriteRoutes",
383
- "ParamMap"
384
- ];
385
- if (hasAppRouteHandlers) routeExports.push("AppRouteHandlerRoutes");
386
- const exportStatement = `export type { ${routeExports.join(", ")} }`;
387
- const routeContextInterface = hasAppRouteHandlers ? `
388
-
389
- /**
390
- * Context for Next.js App Router route handlers
391
- * @example
392
- * \`\`\`tsx
393
- * export async function GET(request: NextRequest, context: RouteContext<'/api/users/[id]'>) {
394
- * const { id } = await context.params
395
- * return Response.json({ id })
396
- * }
397
- * \`\`\`
398
- */
399
- interface RouteContext<AppRouteHandlerRoute extends AppRouteHandlerRoutes> {
400
- params: Promise<ParamMap[AppRouteHandlerRoute]>
401
- }` : "";
402
- return `// This file is generated automatically by Next.js
403
- // Do not edit this file manually
404
-
405
- ${routeTypes}
406
-
407
- ${paramTypes}
408
-
409
- export type ParamsOf<Route extends Routes> = ParamMap[Route]
410
-
411
- ${layoutSlotMap}
412
-
413
- ${exportStatement}
414
-
415
- declare global {
416
- /**
417
- * Props for Next.js App Router page components
418
- * @example
419
- * \`\`\`tsx
420
- * export default function Page(props: PageProps<'/blog/[slug]'>) {
421
- * const { slug } = await props.params
422
- * return <div>Blog post: {slug}</div>
423
- * }
424
- * \`\`\`
425
- */
426
- interface PageProps<AppRoute extends AppRoutes> {
427
- params: Promise<ParamMap[AppRoute]>
428
- searchParams: Promise<Record<string, string | string[] | undefined>>
429
- }
430
-
431
- /**
432
- * Props for Next.js App Router layout components
433
- * @example
434
- * \`\`\`tsx
435
- * export default function Layout(props: LayoutProps<'/dashboard'>) {
436
- * return <div>{props.children}</div>
437
- * }
438
- * \`\`\`
439
- */
440
- type LayoutProps<LayoutRoute extends LayoutRoutes> = {
441
- params: Promise<ParamMap[LayoutRoute]>
442
- searchParams: Promise<Record<string, string | string[] | undefined>>
443
- children: React.ReactNode
444
- } & {
445
- [K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
446
- }${routeContextInterface}
447
- }
448
- `;
449
- }
450
- function generateLinkTypesFile(manifest) {
451
- const visited = /* @__PURE__ */ new Set();
452
- const staticRouteTypes = [];
453
- const dynamicRouteTypes = [];
454
- for (const routeMap of [
455
- manifest.appRoutes,
456
- manifest.pageRoutes,
457
- manifest.redirectRoutes,
458
- manifest.rewriteRoutes,
459
- manifest.appRouteHandlerRoutes
460
- ]) {
461
- for (const route in routeMap) {
462
- if (visited.has(route)) continue;
463
- visited.add(route);
464
- const { isDynamic, routeType } = formatRouteToRouteType(route);
465
- const cause = routeMap[route].path;
466
- (isDynamic ? dynamicRouteTypes : staticRouteTypes).push([routeType, cause]);
467
- }
468
- }
469
- for (const filePath of manifest.pageApiRoutes) {
470
- if (visited.has(filePath)) continue;
471
- visited.add(filePath);
472
- const { isDynamic, routeType } = formatRouteToRouteType(filePath);
473
- (isDynamic ? dynamicRouteTypes : staticRouteTypes).push([routeType, filePath]);
474
- }
475
- const serializedStaticRouteTypes = serializeRouteTypes(staticRouteTypes);
476
- const serializedDynamicRouteTypes = serializeRouteTypes(dynamicRouteTypes);
477
- const routeTypesFallback = !serializedStaticRouteTypes && !serializedDynamicRouteTypes ? "string & {}" : "";
478
- return `// This file is generated automatically by Next.js
479
- // Do not edit this file manually
480
-
481
- // Type definitions for Next.js routes
482
-
483
- /**
484
- * Internal types used by the Next.js router and Link component.
485
- * These types are not meant to be used directly.
486
- * @internal
487
- */
488
- declare namespace __next_route_internal_types__ {
489
- type SearchOrHash = \`?\${string}\` | \`#\${string}\`
490
- type WithProtocol = \`\${string}:\${string}\`
491
-
492
- type Suffix = '' | SearchOrHash
493
-
494
- type SafeSlug<S extends string> = S extends \`\${string}/\${string}\`
495
- ? never
496
- : S extends \`\${string}\${SearchOrHash}\`
497
- ? never
498
- : S extends ''
499
- ? never
500
- : S
501
-
502
- type CatchAllSlug<S extends string> = S extends \`\${string}\${SearchOrHash}\`
503
- ? never
504
- : S extends ''
505
- ? never
506
- : S
507
-
508
- type OptionalCatchAllSlug<S extends string> =
509
- S extends \`\${string}\${SearchOrHash}\` ? never : S
510
-
511
- type StaticRoutes = ${serializedStaticRouteTypes || "never"}
512
- type DynamicRoutes<T extends string = string> = ${serializedDynamicRouteTypes || "never"}
513
-
514
- type RouteImpl<T> = ${routeTypesFallback || `
515
- ${"| StaticRoutes"}
516
- | SearchOrHash
517
- | WithProtocol
518
- | \`\${StaticRoutes}\${SearchOrHash}\`
519
- | (T extends \`\${DynamicRoutes<infer _>}\${Suffix}\` ? T : never)
520
- `}
521
- }
522
-
523
- declare module 'next' {
524
- export { default } from 'next/types.js'
525
- export * from 'next/types.js'
526
-
527
- export type Route<T extends string = string> =
528
- __next_route_internal_types__.RouteImpl<T>
529
- }
530
-
531
- declare module 'next/link' {
532
- export { useLinkStatus } from 'next/dist/client/link.js'
533
-
534
- import type { LinkProps as OriginalLinkProps } from 'next/dist/client/link.js'
535
- import type { AnchorHTMLAttributes, DetailedHTMLProps } from 'react'
536
- import type { UrlObject } from 'url'
537
-
538
- type LinkRestProps = Omit<
539
- Omit<
540
- DetailedHTMLProps<
541
- AnchorHTMLAttributes<HTMLAnchorElement>,
542
- HTMLAnchorElement
543
- >,
544
- keyof OriginalLinkProps
545
- > &
546
- OriginalLinkProps,
547
- 'href'
548
- >
549
-
550
- export type LinkProps<RouteInferType> = LinkRestProps & {
551
- /**
552
- * The path or URL to navigate to. This is the only required prop. It can also be an object.
553
- * @see https://nextjs.org/docs/api-reference/next/link
554
- */
555
- href: __next_route_internal_types__.RouteImpl<RouteInferType> | UrlObject
556
- }
557
-
558
- export default function Link<RouteType>(props: LinkProps<RouteType>): JSX.Element
559
- }
560
-
561
- declare module 'next/navigation' {
562
- export * from 'next/dist/client/components/navigation.js'
563
-
564
- import type { NavigateOptions, PrefetchOptions, AppRouterInstance as OriginalAppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js'
565
- import type { RedirectType } from 'next/dist/client/components/redirect-error.js'
566
-
567
- interface AppRouterInstance extends OriginalAppRouterInstance {
568
- /**
569
- * Navigate to the provided href.
570
- * Pushes a new history entry.
571
- */
572
- push<RouteType>(href: __next_route_internal_types__.RouteImpl<RouteType>, options?: NavigateOptions): void
573
- /**
574
- * Navigate to the provided href.
575
- * Replaces the current history entry.
576
- */
577
- replace<RouteType>(href: __next_route_internal_types__.RouteImpl<RouteType>, options?: NavigateOptions): void
578
- /**
579
- * Prefetch the provided href.
580
- */
581
- prefetch<RouteType>(href: __next_route_internal_types__.RouteImpl<RouteType>, options?: PrefetchOptions): void
582
- }
583
-
584
- export function useRouter(): AppRouterInstance;
585
-
586
- export function redirect<RouteType>(
587
- url: __next_route_internal_types__.RouteImpl<RouteType>,
588
- type?: RedirectType
589
- ): never;
590
-
591
- export function permanentRedirect<RouteType>(
592
- url: __next_route_internal_types__.RouteImpl<RouteType>,
593
- type?: RedirectType
594
- ): never;
595
- }
596
-
597
- declare module 'next/form' {
598
- import type { FormProps as OriginalFormProps } from 'next/dist/client/form.js'
599
-
600
- type FormRestProps = Omit<OriginalFormProps, 'action'>
601
-
602
- export type FormProps<RouteInferType> = {
603
- action: __next_route_internal_types__.RouteImpl<RouteInferType> | ((formData: FormData) => void)
604
- } & FormRestProps
605
-
606
- export default function Form<RouteType>(props: FormProps<RouteType>): JSX.Element
607
- }
608
- `;
609
- }
610
- function generateValidatorFile(manifest, toImportSpecifier) {
611
- const generateValidations = (paths, type, pathToRouteMap) => paths.sort().filter((filePath) => filePath.endsWith(".ts") || filePath.endsWith(".tsx")).filter(
612
- (filePath) => type !== "AppPageConfig" || filePath.endsWith("page.ts") || filePath.endsWith("page.tsx")
613
- ).map((filePath) => {
614
- const importPath = toImportSpecifier(filePath);
615
- const route = pathToRouteMap?.get(filePath);
616
- const typeWithRoute = route && (type === "AppPageConfig" || type === "LayoutConfig" || type === "RouteHandlerConfig") ? `${type}<${JSON.stringify(route)}>` : type;
617
- return `// Validate ${filePath}
618
- {
619
- type __IsExpected<Specific extends ${typeWithRoute}> = Specific
620
- const handler = {} as typeof import(${JSON.stringify(importPath.replace(/\.tsx?$/, ".js"))})
621
- type __Check = __IsExpected<typeof handler>
622
- // @ts-ignore
623
- type __Unused = __Check
624
- }`;
625
- }).join("\n\n");
626
- const appPageValidations = generateValidations(
627
- [...manifest.appPagePaths].sort(),
628
- "AppPageConfig",
629
- manifest.filePathToRoute
630
- );
631
- const appRouteHandlerValidations = generateValidations(
632
- [...manifest.appRouteHandlers].sort(),
633
- "RouteHandlerConfig",
634
- manifest.filePathToRoute
635
- );
636
- const pagesRouterPageValidations = generateValidations(
637
- [...manifest.pagesRouterPagePaths].sort(),
638
- "PagesPageConfig"
639
- );
640
- const pagesApiRouteValidations = generateValidations(
641
- [...manifest.pageApiRoutes].sort(),
642
- "ApiRouteConfig"
643
- );
644
- const layoutValidations = generateValidations(
645
- [...manifest.layoutPaths].sort(),
646
- "LayoutConfig",
647
- manifest.filePathToRoute
648
- );
649
- const hasAppRouteHandlers = Object.keys(manifest.appRouteHandlerRoutes).length > 0;
650
- let typeDefinitions = "";
651
- if (appPageValidations) {
652
- typeDefinitions += `type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
653
- default: React.JSXElementConstructor<PageProps<Route>> | ((props: { params: Promise<ParamMap[Route]>, searchParams: Promise<any> }) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
654
- generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
655
- generateMetadata?: (
656
- props: { params: Promise<ParamMap[Route]> } & any,
657
- parent: ResolvingMetadata
658
- ) => Promise<any> | any
659
- generateViewport?: (
660
- props: { params: Promise<ParamMap[Route]> } & any,
661
- parent: ResolvingViewport
662
- ) => Promise<any> | any
663
- metadata?: any
664
- viewport?: any
665
- }
666
-
667
- `;
668
- }
669
- if (pagesRouterPageValidations) {
670
- typeDefinitions += `type PagesPageConfig = {
671
- default: React.ComponentType<any> | ((props: any) => React.ReactNode | Promise<React.ReactNode> | never | void)
672
- getStaticProps?: (context: any) => Promise<any> | any
673
- getStaticPaths?: (context: any) => Promise<any> | any
674
- getServerSideProps?: (context: any) => Promise<any> | any
675
- getInitialProps?: (context: any) => Promise<any> | any
676
- /**
677
- * Segment configuration for legacy Pages Router pages.
678
- * Validated at build-time by parsePagesSegmentConfig.
679
- */
680
- config?: {
681
- maxDuration?: number
682
- runtime?: 'edge' | 'experimental-edge' | 'nodejs' | string // necessary unless config is exported as const
683
- regions?: string[]
684
- }
685
- }
686
-
687
- `;
688
- }
689
- if (layoutValidations) {
690
- typeDefinitions += `type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
691
- default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
692
- generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
693
- generateMetadata?: (
694
- props: { params: Promise<ParamMap[Route]> } & any,
695
- parent: ResolvingMetadata
696
- ) => Promise<any> | any
697
- generateViewport?: (
698
- props: { params: Promise<ParamMap[Route]> } & any,
699
- parent: ResolvingViewport
700
- ) => Promise<any> | any
701
- metadata?: any
702
- viewport?: any
703
- }
704
-
705
- `;
706
- }
707
- if (appRouteHandlerValidations) {
708
- typeDefinitions += `type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRoutes> = {
709
- GET?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
710
- POST?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
711
- PUT?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
712
- PATCH?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
713
- DELETE?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
714
- HEAD?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
715
- OPTIONS?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
716
- }
717
-
718
- `;
719
- }
720
- if (pagesApiRouteValidations) {
721
- typeDefinitions += `type ApiRouteConfig = {
722
- default: (req: any, res: any) => ReturnType<NextApiHandler>
723
- config?: {
724
- api?: {
725
- bodyParser?: boolean | { sizeLimit?: number | string }
726
- responseLimit?: string | number | boolean
727
- externalResolver?: boolean
728
- }
729
- runtime?: 'edge' | 'experimental-edge' | 'nodejs' | string // necessary unless config is exported as const
730
- maxDuration?: number
731
- }
732
- }
733
-
734
- `;
735
- }
736
- const routeImports = [];
737
- if (appPageValidations) routeImports.push("AppRoutes");
738
- if (layoutValidations) routeImports.push("LayoutRoutes");
739
- if (appPageValidations || layoutValidations || appRouteHandlerValidations)
740
- routeImports.push("ParamMap");
741
- if (hasAppRouteHandlers) routeImports.push("AppRouteHandlerRoutes");
742
- const routeImportStatement = routeImports.length > 0 ? `import type { ${routeImports.join(", ")} } from "./routes.js"` : "";
743
- const nextRequestImport = hasAppRouteHandlers ? "import type { NextRequest } from 'next/server.js'\n" : "";
744
- const nextTypes = [];
745
- if (pagesApiRouteValidations) nextTypes.push("NextApiHandler");
746
- if (appPageValidations || layoutValidations)
747
- nextTypes.push("ResolvingMetadata", "ResolvingViewport");
748
- const nextTypesImport = nextTypes.length > 0 ? `import type { ${nextTypes.join(", ")} } from "next/types.js"
749
- ` : "";
750
- return `// This file is generated automatically by Next.js
751
- // Do not edit this file manually
752
- // This file validates that all pages and layouts export the correct types
753
-
754
- ${routeImportStatement}
755
- ${nextTypesImport}${nextRequestImport}
756
- ${typeDefinitions}
757
- ${appPageValidations}
758
-
759
- ${appRouteHandlerValidations}
760
-
761
- ${pagesRouterPageValidations}
762
-
763
- ${pagesApiRouteValidations}
764
-
765
- ${layoutValidations}
766
- `;
767
- }
768
-
769
- // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/typed-routes/generate.ts
770
- async function writeIfChanged(file, source) {
771
- if (existsSync2(file) && await readFile(file, "utf8") === source) return;
772
- await ensureDir(path2.dirname(file));
773
- await writeFile(file, source);
774
- }
775
- async function generateTypedRoutes(config, routes) {
776
- const nextConfig = getNextConfig();
777
- const typedRoutes = nextConfig.typedRoutes === true;
778
- const manifest = await buildRouteTypesManifest({ config, routes, nextConfig });
779
- const typesDir = path2.join(config.root, ".next", "types");
780
- await writeIfChanged(path2.join(typesDir, "routes.d.ts"), generateRouteTypesFile(manifest));
781
- const toImportSpecifier = (rootRelativePath) => {
782
- const abs = path2.join(config.root, rootRelativePath);
783
- const rel = toPosixPath(path2.relative(typesDir, abs));
784
- return rel.startsWith(".") ? rel : `./${rel}`;
785
- };
786
- await writeIfChanged(
787
- path2.join(typesDir, "validator.ts"),
788
- generateValidatorFile(manifest, toImportSpecifier)
789
- );
790
- if (typedRoutes) {
791
- await writeIfChanged(path2.join(typesDir, "link.d.ts"), generateLinkTypesFile(manifest));
792
- }
793
- await writeIfChanged(
794
- path2.join(typesDir, "root-params.d.ts"),
795
- rootParamsTypesFile(scanRootParamTypes(path2.join(config.root, "app")))
796
- );
797
- await writeNextEnv(config.root, typedRoutes);
798
- }
799
- function rootParamsTypesFile(rootParams) {
800
- if (rootParams.size === 0) {
801
- return `// Type definitions for Next.js root params (next/root-params)
802
- // No root params detected.
803
- export {}
804
- `;
805
- }
806
- const order = ["string", "string[]", "undefined"];
807
- const getters = [...rootParams.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([name, types]) => {
808
- const union = order.filter((type) => types.has(type)).join(" | ");
809
- return ` export function ${name}(): Promise<${union}>`;
810
- });
811
- return `// Type definitions for Next.js root params (next/root-params)
812
-
813
- declare module 'next/root-params' {
814
- ${getters.join("\n")}
815
- }
816
- `;
817
- }
818
- async function writeNextEnv(root, typedRoutes) {
819
- const lines = [
820
- '/// <reference types="next" />',
821
- 'import "./.next/types/routes.d.ts";',
822
- 'import "./.next/types/root-params.d.ts";'
823
- ];
824
- if (typedRoutes) lines.push('import "./.next/types/link.d.ts";');
825
- lines.push("", "// NOTE: This file should not be edited", "");
826
- await writeIfChanged(path2.join(root, "next-env.d.ts"), lines.join("\n"));
827
- }
828
-
829
- export {
830
- generateTypedRoutes
831
- };