super-time-tracker-ui 0.1.39 → 0.1.41

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 (216) hide show
  1. package/README.md +88 -88
  2. package/bin/stt-ui.js +220 -220
  3. package/dist/standalone/next-output/BUILD_ID +1 -1
  4. package/dist/standalone/next-output/build-manifest.json +5 -5
  5. package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +2 -2
  6. package/dist/standalone/next-output/server/app/_global-error/page.js +1 -1
  7. package/dist/standalone/next-output/server/app/_global-error/page.js.nft.json +1 -1
  8. package/dist/standalone/next-output/server/app/_global-error.html +1 -1
  9. package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
  10. package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/dist/standalone/next-output/server/app/_not-found/page/build-manifest.json +2 -2
  16. package/dist/standalone/next-output/server/app/_not-found/page.js +1 -1
  17. package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
  18. package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/dist/standalone/next-output/server/app/api/auth/signout/route.js +1 -1
  20. package/dist/standalone/next-output/server/app/api/auth/signout/route.js.nft.json +1 -1
  21. package/dist/standalone/next-output/server/app/api/sync/import/route.js +1 -1
  22. package/dist/standalone/next-output/server/app/api/sync/import/route.js.nft.json +1 -1
  23. package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +1 -1
  24. package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -1
  25. package/dist/standalone/next-output/server/app/api/sync/pull/route.js +1 -1
  26. package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -1
  27. package/dist/standalone/next-output/server/app/api/sync/push/route.js +1 -1
  28. package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -1
  29. package/dist/standalone/next-output/server/app/auth/callback/route.js +1 -1
  30. package/dist/standalone/next-output/server/app/auth/callback/route.js.nft.json +1 -1
  31. package/dist/standalone/next-output/server/app/favicon.ico/route.js +1 -1
  32. package/dist/standalone/next-output/server/app/favicon.ico/route.js.nft.json +1 -1
  33. package/dist/standalone/next-output/server/app/login/page/build-manifest.json +2 -2
  34. package/dist/standalone/next-output/server/app/login/page.js +1 -1
  35. package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
  36. package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
  37. package/dist/standalone/next-output/server/app/offline/page/build-manifest.json +2 -2
  38. package/dist/standalone/next-output/server/app/offline/page.js +1 -1
  39. package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
  40. package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
  41. package/dist/standalone/next-output/server/app/page/build-manifest.json +2 -2
  42. package/dist/standalone/next-output/server/app/page/react-loadable-manifest.json +1 -1
  43. package/dist/standalone/next-output/server/app/page.js +1 -1
  44. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  45. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  46. package/dist/standalone/next-output/server/app/pomodoro/page/build-manifest.json +2 -2
  47. package/dist/standalone/next-output/server/app/pomodoro/page.js +1 -1
  48. package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
  49. package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
  50. package/dist/standalone/next-output/server/app/register/page/build-manifest.json +2 -2
  51. package/dist/standalone/next-output/server/app/register/page.js +1 -1
  52. package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
  53. package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
  54. package/dist/standalone/next-output/server/app/reporting/page/build-manifest.json +2 -2
  55. package/dist/standalone/next-output/server/app/reporting/page.js +1 -1
  56. package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
  57. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  58. package/dist/standalone/next-output/server/app/search/page/build-manifest.json +2 -2
  59. package/dist/standalone/next-output/server/app/search/page.js +1 -1
  60. package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -1
  61. package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +1 -1
  62. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +2 -2
  63. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js +1 -1
  64. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
  65. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
  66. package/dist/standalone/next-output/server/app/settings/cloud-sync/page/build-manifest.json +2 -2
  67. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +1 -1
  68. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
  69. package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
  70. package/dist/standalone/next-output/server/app/settings/data/page/build-manifest.json +2 -2
  71. package/dist/standalone/next-output/server/app/settings/data/page.js +1 -1
  72. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  73. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  74. package/dist/standalone/next-output/server/app/settings/display/page/build-manifest.json +2 -2
  75. package/dist/standalone/next-output/server/app/settings/display/page.js +1 -1
  76. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  77. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  78. package/dist/standalone/next-output/server/app/settings/goals/page/build-manifest.json +2 -2
  79. package/dist/standalone/next-output/server/app/settings/goals/page.js +1 -1
  80. package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
  81. package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
  82. package/dist/standalone/next-output/server/app/settings/notifications/page/build-manifest.json +2 -2
  83. package/dist/standalone/next-output/server/app/settings/notifications/page.js +1 -1
  84. package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
  85. package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
  86. package/dist/standalone/next-output/server/app/settings/page/build-manifest.json +2 -2
  87. package/dist/standalone/next-output/server/app/settings/page.js +1 -1
  88. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  89. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  90. package/dist/standalone/next-output/server/app/settings/pomodoro/page/build-manifest.json +2 -2
  91. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +1 -1
  92. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
  93. package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
  94. package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +2 -2
  95. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +1 -1
  96. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
  97. package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
  98. package/dist/standalone/next-output/server/app/settings/tags/page/build-manifest.json +2 -2
  99. package/dist/standalone/next-output/server/app/settings/tags/page.js +1 -1
  100. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  101. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  102. package/dist/standalone/next-output/server/app/sheets/page/build-manifest.json +2 -2
  103. package/dist/standalone/next-output/server/app/sheets/page.js +1 -1
  104. package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
  105. package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
  106. package/dist/standalone/next-output/server/app/today/page/build-manifest.json +2 -2
  107. package/dist/standalone/next-output/server/app/today/page.js +1 -1
  108. package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
  109. package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
  110. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0_l72r2.js +1 -1
  111. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0a439d6.js +1 -1
  112. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0b8a-p3.js +1 -1
  113. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0e-v8-t.js +1 -1
  114. package/dist/standalone/next-output/server/chunks/[externals]__11vad82._.js +3 -0
  115. package/dist/standalone/next-output/server/chunks/[externals]_next_dist_0sqmaqd._.js +3 -0
  116. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-taz6n._.js +3 -0
  117. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00~g.6x._.js +3 -0
  118. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__057h~1v._.js +1 -1
  119. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06666_b._.js +1 -1
  120. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06h__d_._.js +1 -1
  121. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06r8z50._.js +1 -1
  122. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06wq380._.js +1 -1
  123. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_b50~5._.js +1 -1
  124. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0eruj62._.js +1 -1
  125. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0fc0f.7._.js +1 -1
  126. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g2.yrs._.js +1 -1
  127. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g4.zxh._.js +1 -1
  128. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hasizg._.js +1 -1
  129. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jlfmb8._.js +1 -1
  130. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m-c-3t._.js +1 -1
  131. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mft_cy._.js +78 -0
  132. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m~u8g4._.js +1 -1
  133. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nx-vwn._.js +1 -1
  134. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o-u0o6._.js +3 -0
  135. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pzvh8l._.js +1 -1
  136. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0rl2w7-._.js +1 -1
  137. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wdwx.8._.js +3 -0
  138. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wj1pxh._.js +1 -1
  139. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0y.-jfw._.js +3 -0
  140. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0yqw7pu._.js +1 -1
  141. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~22xdv._.js +3 -0
  142. package/dist/standalone/next-output/server/chunks/_00h8h72._.js +1 -1
  143. package/dist/standalone/next-output/server/chunks/_01k5l~6._.js +1 -1
  144. package/dist/standalone/next-output/server/chunks/_01m8bky._.js +1 -1
  145. package/dist/standalone/next-output/server/chunks/_08yfru9._.js +1 -1
  146. package/dist/standalone/next-output/server/chunks/_0a9455x._.js +1 -1
  147. package/dist/standalone/next-output/server/chunks/_0glc6qw._.js +1 -1
  148. package/dist/standalone/next-output/server/chunks/_0k9xfs_._.js +1 -1
  149. package/dist/standalone/next-output/server/chunks/_0qc0j~f._.js +1 -1
  150. package/dist/standalone/next-output/server/chunks/_0s9bykd._.js +1 -1
  151. package/dist/standalone/next-output/server/chunks/_0ykasjm._.js +1 -1
  152. package/dist/standalone/next-output/server/chunks/ssr/0prs_next_dist_0gm.sou._.js +1 -1
  153. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0xgtqus._.js → [root-of-the-server]__03~l7zo._.js} +2 -2
  154. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07dg5mm._.js +1 -1
  155. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__08n6l..._.js +1 -1
  156. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0f0-17f._.js +1 -1
  157. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0i8nvpz._.js +1 -1
  158. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp4i1o._.js +1 -1
  159. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0kehl40._.js → [root-of-the-server]__0mvoac~._.js} +2 -2
  160. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0q5n4_f._.js +1 -1
  161. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0s2z7s7._.js +1 -1
  162. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0t9jvpg._.js +1 -1
  163. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ta228.._.js +1 -1
  164. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__11yff~n._.js +1 -1
  165. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__13lfzik._.js +1 -1
  166. package/dist/standalone/next-output/server/chunks/ssr/_09_de1y._.js +3 -0
  167. package/dist/standalone/next-output/server/chunks/ssr/{_0j8zmg6._.js → _0mb-jfk._.js} +1 -1
  168. package/dist/standalone/next-output/server/chunks/ssr/_0n~tafj._.js +1 -1
  169. package/dist/standalone/next-output/server/chunks/ssr/_10n.q--._.js +1 -1
  170. package/dist/standalone/next-output/server/chunks/ssr/_118t3.z._.js +3 -0
  171. package/dist/standalone/next-output/server/chunks/ssr/_119e_ui._.js +3 -0
  172. package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +3 -0
  173. package/dist/standalone/next-output/server/chunks/ssr/components_entry-list_tsx_02.v.ur._.js +1 -1
  174. package/dist/standalone/next-output/server/functions-config-manifest.json +11 -1
  175. package/dist/standalone/next-output/server/middleware-build-manifest.js +5 -5
  176. package/dist/standalone/next-output/server/middleware-manifest.json +2 -30
  177. package/dist/standalone/next-output/server/middleware.js +5 -0
  178. package/dist/standalone/next-output/server/pages/500.html +1 -1
  179. package/dist/standalone/next-output/static/chunks/01.p8x7rwa_da.js +1 -0
  180. package/dist/standalone/next-output/static/chunks/0352pgxbvl-fv.css +3 -0
  181. package/dist/standalone/next-output/static/chunks/05q3gfx1e8sea.js +2 -0
  182. package/dist/standalone/next-output/static/chunks/{0tunlsiqaj8k7.js → 0_ofg6_dn.8-1.js} +1 -1
  183. package/dist/standalone/next-output/static/chunks/0fa.o-_asg9n7.js +1 -0
  184. package/dist/standalone/next-output/static/chunks/{0d1bw0ondgg09.js → 0fxgcr1q998_k.js} +1 -1
  185. package/dist/standalone/next-output/static/chunks/0j2e~637-6iat.js +1 -0
  186. package/dist/standalone/next-output/static/chunks/0oqkatex7m1ci.js +1 -0
  187. package/dist/standalone/next-output/static/chunks/11om1fvdw0yt4.js +1 -0
  188. package/dist/standalone/next-output/static/chunks/{turbopack-0f5lhej4rg9kr.js → turbopack-0qr4v3fex9a4_.js} +1 -1
  189. package/dist/standalone/package.json +1 -1
  190. package/dist/standalone/public/icons/site.webmanifest +19 -1
  191. package/dist/standalone/public/manifest.webmanifest +30 -30
  192. package/dist/standalone/public/sw.js +74 -73
  193. package/package.json +1 -1
  194. package/dist/standalone/next-output/server/chunks/[externals]_next_dist_0arv.vj._.js +0 -3
  195. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.8v_6p._.js +0 -3
  196. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__07wrb8~._.js +0 -3
  197. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_ar6en._.js +0 -3
  198. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jvridy._.js +0 -3
  199. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mp257.._.js +0 -3
  200. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nhm~x6._.js +0 -3
  201. package/dist/standalone/next-output/server/chunks/ssr/_0y1l.fp._.js +0 -3
  202. package/dist/standalone/next-output/server/chunks/ssr/_11_k_h_._.js +0 -3
  203. package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +0 -3
  204. package/dist/standalone/next-output/server/edge/chunks/0iv-_next_dist_esm_build_templates_edge-wrapper_0tu5gg3.js +0 -3
  205. package/dist/standalone/next-output/server/edge/chunks/0prs_next_dist_esm_build_templates_edge-wrapper_0qnghjz.js +0 -3
  206. package/dist/standalone/next-output/server/edge/chunks/[root-of-the-server]__0864en3._.js +0 -69
  207. package/dist/standalone/next-output/static/chunks/0bkrh0v8rs7jg.js +0 -1
  208. package/dist/standalone/next-output/static/chunks/0dx.1c1lmm455.css +0 -3
  209. package/dist/standalone/next-output/static/chunks/0lj1_~cxf~l6t.js +0 -1
  210. package/dist/standalone/next-output/static/chunks/0o1-l.q7jp8h9.js +0 -1
  211. package/dist/standalone/next-output/static/chunks/0p4cjapdzyl6k.js +0 -2
  212. package/dist/standalone/next-output/static/chunks/0yhbka048dolq.js +0 -1
  213. package/dist/standalone/next-output/static/chunks/11cm.4cgwu.ci.js +0 -1
  214. /package/dist/standalone/next-output/static/{BrJRktoc4eE78z4-7oyH2 → nWINZxUmLtSJoWt1IRxld}/_buildManifest.js +0 -0
  215. /package/dist/standalone/next-output/static/{BrJRktoc4eE78z4-7oyH2 → nWINZxUmLtSJoWt1IRxld}/_clientMiddlewareManifest.js +0 -0
  216. /package/dist/standalone/next-output/static/{BrJRktoc4eE78z4-7oyH2 → nWINZxUmLtSJoWt1IRxld}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -1,88 +1,88 @@
1
- # super-time-tracker-ui
2
-
3
- Web UI for
4
- [super-time-tracker](https://github.com/f3rnox/super-time-tracker) time sheets.
5
- The npm package ships a standalone Next.js build and the `stt-ui` CLI to run it
6
- locally.
7
-
8
- Requires Node.js 20 or newer.
9
-
10
- ## Install
11
-
12
- ```bash
13
- npm install -g super-time-tracker-ui
14
- ```
15
-
16
- Then start the UI:
17
-
18
- ```bash
19
- stt-ui
20
- ```
21
-
22
- Open [http://127.0.0.1:3000](http://127.0.0.1:3000) (default port).
23
-
24
- `stt-ui --version` prints the installed package version.
25
-
26
- On start, the default browser opens at the server URL. Pass `--no-open` or set
27
- `STT_UI_OPEN_BROWSER=0` to skip that.
28
-
29
- ## Configuration
30
-
31
- | Variable | Default | Description |
32
- | --- | --- | --- |
33
- | `PORT` | `3000` | HTTP port |
34
- | `STT_UI_HOSTNAME` | `127.0.0.1` | Bind address and URL shown in the terminal |
35
- | `STT_UI_OPEN_BROWSER` | enabled | Set to `0` or `false` to disable auto-open |
36
-
37
- The CLI ignores the shell `HOSTNAME` variable (on WSL it is often the Windows
38
- machine name).
39
-
40
- Examples:
41
-
42
- ```bash
43
- PORT=8080 stt-ui
44
- STT_UI_HOSTNAME=0.0.0.0 stt-ui
45
- stt-ui --no-open
46
- ```
47
-
48
- ## Development
49
-
50
- Clone the repo and install dependencies:
51
-
52
- ```bash
53
- pnpm install
54
- ```
55
-
56
- Run the dev server:
57
-
58
- ```bash
59
- pnpm dev
60
- ```
61
-
62
- Open [http://localhost:3000](http://localhost:3000).
63
-
64
- ### Production build
65
-
66
- `pnpm build` produces a standalone app under `dist/standalone`. Build output
67
- uses `next-output/` as the Next.js dist directory. Post-build scripts copy
68
- static assets into the standalone tree and prune the publish bundle.
69
-
70
- Run the production server from the repo:
71
-
72
- ```bash
73
- pnpm build
74
- pnpm stt-ui
75
- ```
76
-
77
- `pnpm start` runs `next start` against the project root and is mainly for local
78
- Next.js workflows. The published package uses `stt-ui` and the standalone
79
- output instead.
80
-
81
- ## Publishing
82
-
83
- `prepublishOnly` runs `pnpm build`. The published tarball includes
84
- `bin/stt-ui.js` and `dist/standalone` only.
85
-
86
- ## License
87
-
88
- MIT
1
+ # super-time-tracker-ui
2
+
3
+ Web UI for
4
+ [super-time-tracker](https://github.com/f3rnox/super-time-tracker) time sheets.
5
+ The npm package ships a standalone Next.js build and the `stt-ui` CLI to run it
6
+ locally.
7
+
8
+ Requires Node.js 20 or newer.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install -g super-time-tracker-ui
14
+ ```
15
+
16
+ Then start the UI:
17
+
18
+ ```bash
19
+ stt-ui
20
+ ```
21
+
22
+ Open [http://127.0.0.1:3000](http://127.0.0.1:3000) (default port).
23
+
24
+ `stt-ui --version` prints the installed package version.
25
+
26
+ On start, the default browser opens at the server URL. Pass `--no-open` or set
27
+ `STT_UI_OPEN_BROWSER=0` to skip that.
28
+
29
+ ## Configuration
30
+
31
+ | Variable | Default | Description |
32
+ | -------- | ------- | ----------- |
33
+ | `PORT` | `3000` | HTTP port |
34
+ | `STT_UI_HOSTNAME` | `127.0.0.1` | Bind address and URL shown in the terminal |
35
+ | `STT_UI_OPEN_BROWSER` | enabled | Set to `0` or `false` to disable auto-open |
36
+
37
+ The CLI ignores the shell `HOSTNAME` variable (on WSL it is often the Windows
38
+ machine name).
39
+
40
+ Examples:
41
+
42
+ ```bash
43
+ PORT=8080 stt-ui
44
+ STT_UI_HOSTNAME=0.0.0.0 stt-ui
45
+ stt-ui --no-open
46
+ ```
47
+
48
+ ## Development
49
+
50
+ Clone the repo and install dependencies:
51
+
52
+ ```bash
53
+ pnpm install
54
+ ```
55
+
56
+ Run the dev server:
57
+
58
+ ```bash
59
+ pnpm dev
60
+ ```
61
+
62
+ Open [http://localhost:3000](http://localhost:3000).
63
+
64
+ ### Production build
65
+
66
+ `pnpm build` produces a standalone app under `dist/standalone`. Build output
67
+ uses `next-output/` as the Next.js dist directory. Post-build scripts copy
68
+ static assets into the standalone tree and prune the publish bundle.
69
+
70
+ Run the production server from the repo:
71
+
72
+ ```bash
73
+ pnpm build
74
+ pnpm stt-ui
75
+ ```
76
+
77
+ `pnpm start` runs `next start` against the project root and is mainly for local
78
+ Next.js workflows. The published package uses `stt-ui` and the standalone
79
+ output instead.
80
+
81
+ ## Publishing
82
+
83
+ `prepublishOnly` runs `pnpm build`. The published tarball includes
84
+ `bin/stt-ui.js` and `dist/standalone` only.
85
+
86
+ ## License
87
+
88
+ MIT
package/bin/stt-ui.js CHANGED
@@ -1,220 +1,220 @@
1
- #!/usr/bin/env node
2
- 'use strict'
3
-
4
- const { execSync, spawn } = require('node:child_process')
5
- const { existsSync } = require('node:fs')
6
- const http = require('node:http')
7
- const { join } = require('node:path')
8
-
9
- const root = join(__dirname, '..')
10
- const { version } = require('../package.json')
11
-
12
- if (process.argv.includes('--version') || process.argv.includes('-V')) {
13
- process.stdout.write(`${version}\n`)
14
- process.exit(0)
15
- }
16
-
17
- const standalone_dir = join(root, 'dist', 'standalone')
18
- const server_js = join(standalone_dir, 'server.js')
19
-
20
- if (!existsSync(server_js)) {
21
- console.error(
22
- 'Production build not found. Run `pnpm build` in the project root.',
23
- )
24
- process.exit(1)
25
- }
26
-
27
- const port = process.env.PORT ?? '3000'
28
- const hostname = process.env.STT_UI_HOSTNAME ?? '127.0.0.1'
29
- const { HOSTNAME: _machine_hostname, ...env } = process.env
30
-
31
- /**
32
- * Frees port so a new server can bind (e.g. previous stt-ui still running).
33
- * @param {string | number} port
34
- */
35
- function release_port(port) {
36
- const port_num = Number(port)
37
-
38
- if (!Number.isFinite(port_num)) {
39
- return
40
- }
41
-
42
- if (process.platform === 'win32') {
43
- try {
44
- execSync(
45
- `powershell -NoProfile -Command "Get-NetTCPConnection -LocalPort ${port_num} -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue }"`,
46
- { stdio: 'ignore' },
47
- )
48
- } catch {
49
- // no listener
50
- }
51
-
52
- return
53
- }
54
-
55
- try {
56
- execSync(`fuser -k ${port_num}/tcp`, { stdio: 'ignore' })
57
- return
58
- } catch {
59
- // fuser missing or no listener
60
- }
61
-
62
- try {
63
- const pids = execSync(`lsof -ti :${port_num}`, {
64
- encoding: 'utf8',
65
- stdio: ['pipe', 'pipe', 'ignore'],
66
- }).trim()
67
-
68
- if (pids.length > 0) {
69
- execSync(`kill ${pids.split('\n').join(' ')}`, { stdio: 'ignore' })
70
- }
71
- } catch {
72
- // no listener
73
- }
74
- }
75
-
76
- /**
77
- * Hostname suitable for URLs opened in a browser.
78
- * @param {string} bind_hostname
79
- * @returns {string}
80
- */
81
- function browser_hostname(bind_hostname) {
82
- if (bind_hostname === '0.0.0.0' || bind_hostname === '::') {
83
- return '127.0.0.1'
84
- }
85
-
86
- if (bind_hostname === '[::]') {
87
- return '[::1]'
88
- }
89
-
90
- return bind_hostname
91
- }
92
-
93
- /**
94
- * Commands to open a URL, in fallback order.
95
- * @param {string} url
96
- * @returns {[string, string[]][]}
97
- */
98
- function browser_openers(url) {
99
- if (process.platform === 'darwin') {
100
- return [['open', [url]]]
101
- }
102
-
103
- if (process.platform === 'win32') {
104
- return [['cmd', ['/c', 'start', '', url]]]
105
- }
106
-
107
- return [
108
- ['xdg-open', [url]],
109
- ['wslview', [url]],
110
- ['sensible-browser', [url]],
111
- ]
112
- }
113
-
114
- /**
115
- * Opens a URL in the system default browser; no-op if no opener is available.
116
- * @param {string} url
117
- */
118
- function open_browser(url) {
119
- const openers = browser_openers(url)
120
- let index = 0
121
-
122
- const try_next = () => {
123
- if (index >= openers.length) {
124
- return
125
- }
126
-
127
- const [command, args] = openers[index]
128
- index += 1
129
-
130
- const child = spawn(command, args, {
131
- detached: true,
132
- stdio: 'ignore',
133
- })
134
-
135
- child.on('error', (err) => {
136
- if (err.code === 'ENOENT') {
137
- try_next()
138
- }
139
- })
140
-
141
- child.unref()
142
- }
143
-
144
- try_next()
145
- }
146
-
147
- /**
148
- * Calls callback once the server responds at url.
149
- * @param {string} url
150
- * @param {() => void} on_ready
151
- */
152
- function wait_for_server(url, on_ready) {
153
- const max_attempts = 50
154
- let attempts = 0
155
- let opened = false
156
-
157
- const try_once = () => {
158
- const req = http.get(url, (res) => {
159
- res.resume()
160
-
161
- if (!opened) {
162
- opened = true
163
- on_ready()
164
- }
165
- })
166
-
167
- req.setTimeout(1000, () => {
168
- req.destroy()
169
- })
170
-
171
- req.on('error', () => {
172
- attempts += 1
173
-
174
- if (attempts < max_attempts) {
175
- setTimeout(try_once, 200)
176
- }
177
- })
178
- }
179
-
180
- try_once()
181
- }
182
-
183
- const should_open_browser =
184
- !process.argv.includes('--no-open') &&
185
- process.env.STT_UI_OPEN_BROWSER !== '0' &&
186
- process.env.STT_UI_OPEN_BROWSER !== 'false'
187
-
188
- const app_url = `http://${browser_hostname(hostname)}:${port}`
189
-
190
- if (process.env.STT_UI_KILL_EXISTING !== '0') {
191
- release_port(port)
192
- }
193
-
194
- const child = spawn(process.execPath, [server_js], {
195
- cwd: standalone_dir,
196
- env: {
197
- ...env,
198
- NODE_ENV: 'production',
199
- HOSTNAME: hostname,
200
- PORT: port,
201
- },
202
- stdio: 'inherit',
203
- })
204
-
205
- if (should_open_browser) {
206
- wait_for_server(app_url, () => {
207
- open_browser(app_url)
208
- })
209
- }
210
-
211
- child.on('exit', (code, signal) => {
212
- if (signal !== null) {
213
- process.kill(process.pid, signal)
214
- return
215
- }
216
-
217
- process.exit(code ?? 0)
218
- })
219
-
220
- console.error(`stt-ui starting at ${app_url}`)
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execSync, spawn } = require("node:child_process");
5
+ const { existsSync } = require("node:fs");
6
+ const http = require("node:http");
7
+ const { join } = require("node:path");
8
+
9
+ const root = join(__dirname, "..");
10
+ const { version } = require("../package.json");
11
+
12
+ if (process.argv.includes("--version") || process.argv.includes("-V")) {
13
+ process.stdout.write(`${version}\n`);
14
+ process.exit(0);
15
+ }
16
+
17
+ const standalone_dir = join(root, "dist", "standalone");
18
+ const server_js = join(standalone_dir, "server.js");
19
+
20
+ if (!existsSync(server_js)) {
21
+ console.error(
22
+ "Production build not found. Run `pnpm build` in the project root.",
23
+ );
24
+ process.exit(1);
25
+ }
26
+
27
+ const port = process.env.PORT ?? "3000";
28
+ const hostname = process.env.STT_UI_HOSTNAME ?? "127.0.0.1";
29
+ const { HOSTNAME: _machine_hostname, ...env } = process.env;
30
+
31
+ /**
32
+ * Frees port so a new server can bind (e.g. previous stt-ui still running).
33
+ * @param {string | number} port
34
+ */
35
+ function release_port(port) {
36
+ const port_num = Number(port);
37
+
38
+ if (!Number.isFinite(port_num)) {
39
+ return;
40
+ }
41
+
42
+ if (process.platform === "win32") {
43
+ try {
44
+ execSync(
45
+ `powershell -NoProfile -Command "Get-NetTCPConnection -LocalPort ${port_num} -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue }"`,
46
+ { stdio: "ignore" },
47
+ );
48
+ } catch {
49
+ // no listener
50
+ }
51
+
52
+ return;
53
+ }
54
+
55
+ try {
56
+ execSync(`fuser -k ${port_num}/tcp`, { stdio: "ignore" });
57
+ return;
58
+ } catch {
59
+ // fuser missing or no listener
60
+ }
61
+
62
+ try {
63
+ const pids = execSync(`lsof -ti :${port_num}`, {
64
+ encoding: "utf8",
65
+ stdio: ["pipe", "pipe", "ignore"],
66
+ }).trim();
67
+
68
+ if (pids.length > 0) {
69
+ execSync(`kill ${pids.split("\n").join(" ")}`, { stdio: "ignore" });
70
+ }
71
+ } catch {
72
+ // no listener
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Hostname suitable for URLs opened in a browser.
78
+ * @param {string} bind_hostname
79
+ * @returns {string}
80
+ */
81
+ function browser_hostname(bind_hostname) {
82
+ if (bind_hostname === "0.0.0.0" || bind_hostname === "::") {
83
+ return "127.0.0.1";
84
+ }
85
+
86
+ if (bind_hostname === "[::]") {
87
+ return "[::1]";
88
+ }
89
+
90
+ return bind_hostname;
91
+ }
92
+
93
+ /**
94
+ * Commands to open a URL, in fallback order.
95
+ * @param {string} url
96
+ * @returns {[string, string[]][]}
97
+ */
98
+ function browser_openers(url) {
99
+ if (process.platform === "darwin") {
100
+ return [["open", [url]]];
101
+ }
102
+
103
+ if (process.platform === "win32") {
104
+ return [["cmd", ["/c", "start", "", url]]];
105
+ }
106
+
107
+ return [
108
+ ["xdg-open", [url]],
109
+ ["wslview", [url]],
110
+ ["sensible-browser", [url]],
111
+ ];
112
+ }
113
+
114
+ /**
115
+ * Opens a URL in the system default browser; no-op if no opener is available.
116
+ * @param {string} url
117
+ */
118
+ function open_browser(url) {
119
+ const openers = browser_openers(url);
120
+ let index = 0;
121
+
122
+ const try_next = () => {
123
+ if (index >= openers.length) {
124
+ return;
125
+ }
126
+
127
+ const [command, args] = openers[index];
128
+ index += 1;
129
+
130
+ const child = spawn(command, args, {
131
+ detached: true,
132
+ stdio: "ignore",
133
+ });
134
+
135
+ child.on("error", (err) => {
136
+ if (err.code === "ENOENT") {
137
+ try_next();
138
+ }
139
+ });
140
+
141
+ child.unref();
142
+ };
143
+
144
+ try_next();
145
+ }
146
+
147
+ /**
148
+ * Calls callback once the server responds at url.
149
+ * @param {string} url
150
+ * @param {() => void} on_ready
151
+ */
152
+ function wait_for_server(url, on_ready) {
153
+ const max_attempts = 50;
154
+ let attempts = 0;
155
+ let opened = false;
156
+
157
+ const try_once = () => {
158
+ const req = http.get(url, (res) => {
159
+ res.resume();
160
+
161
+ if (!opened) {
162
+ opened = true;
163
+ on_ready();
164
+ }
165
+ });
166
+
167
+ req.setTimeout(1000, () => {
168
+ req.destroy();
169
+ });
170
+
171
+ req.on("error", () => {
172
+ attempts += 1;
173
+
174
+ if (attempts < max_attempts) {
175
+ setTimeout(try_once, 200);
176
+ }
177
+ });
178
+ };
179
+
180
+ try_once();
181
+ }
182
+
183
+ const should_open_browser =
184
+ !process.argv.includes("--no-open") &&
185
+ process.env.STT_UI_OPEN_BROWSER !== "0" &&
186
+ process.env.STT_UI_OPEN_BROWSER !== "false";
187
+
188
+ const app_url = `http://${browser_hostname(hostname)}:${port}`;
189
+
190
+ if (process.env.STT_UI_KILL_EXISTING !== "0") {
191
+ release_port(port);
192
+ }
193
+
194
+ const child = spawn(process.execPath, [server_js], {
195
+ cwd: standalone_dir,
196
+ env: {
197
+ ...env,
198
+ NODE_ENV: "production",
199
+ HOSTNAME: hostname,
200
+ PORT: port,
201
+ },
202
+ stdio: "inherit",
203
+ });
204
+
205
+ if (should_open_browser) {
206
+ wait_for_server(app_url, () => {
207
+ open_browser(app_url);
208
+ });
209
+ }
210
+
211
+ child.on("exit", (code, signal) => {
212
+ if (signal !== null) {
213
+ process.kill(process.pid, signal);
214
+ return;
215
+ }
216
+
217
+ process.exit(code ?? 0);
218
+ });
219
+
220
+ console.error(`stt-ui starting at ${app_url}`);
@@ -1 +1 @@
1
- BrJRktoc4eE78z4-7oyH2
1
+ nWINZxUmLtSJoWt1IRxld
@@ -7,16 +7,16 @@
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/BrJRktoc4eE78z4-7oyH2/_buildManifest.js",
11
- "static/BrJRktoc4eE78z4-7oyH2/_ssgManifest.js",
12
- "static/BrJRktoc4eE78z4-7oyH2/_clientMiddlewareManifest.js"
10
+ "static/nWINZxUmLtSJoWt1IRxld/_buildManifest.js",
11
+ "static/nWINZxUmLtSJoWt1IRxld/_ssgManifest.js",
12
+ "static/nWINZxUmLtSJoWt1IRxld/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0~_1hgycum995.js",
16
16
  "static/chunks/039umyocrekqe.js",
17
17
  "static/chunks/0mp37.c08~r3d.js",
18
- "static/chunks/0p4cjapdzyl6k.js",
18
+ "static/chunks/05q3gfx1e8sea.js",
19
19
  "static/chunks/0k8-u5fk80qxa.js",
20
- "static/chunks/turbopack-0f5lhej4rg9kr.js"
20
+ "static/chunks/turbopack-0qr4v3fex9a4_.js"
21
21
  ]
22
22
  }
@@ -9,9 +9,9 @@
9
9
  "static/chunks/0~_1hgycum995.js",
10
10
  "static/chunks/039umyocrekqe.js",
11
11
  "static/chunks/0mp37.c08~r3d.js",
12
- "static/chunks/0p4cjapdzyl6k.js",
12
+ "static/chunks/05q3gfx1e8sea.js",
13
13
  "static/chunks/0k8-u5fk80qxa.js",
14
- "static/chunks/turbopack-0f5lhej4rg9kr.js"
14
+ "static/chunks/turbopack-0qr4v3fex9a4_.js"
15
15
  ],
16
16
  "pages": {},
17
17
  "ampFirstPages": []
@@ -2,7 +2,7 @@ var R=require("../../chunks/ssr/[turbopack]_runtime.js")("server/app/_global-err
2
2
  R.c("server/chunks/ssr/[root-of-the-server]__06q-pw2._.js")
3
3
  R.c("server/chunks/ssr/0prs_next_dist_04rppf5._.js")
4
4
  R.c("server/chunks/ssr/0prs_next_dist_esm_build_templates_app-page_02gdlo7.js")
5
- R.c("server/chunks/ssr/[root-of-the-server]__0kehl40._.js")
5
+ R.c("server/chunks/ssr/[root-of-the-server]__0mvoac~._.js")
6
6
  R.c("server/chunks/ssr/[root-of-the-server]__10-0zal._.js")
7
7
  R.c("server/chunks/ssr/0prs_next_dist_client_components_builtin_global-error_08dhpo7.js")
8
8
  R.c("server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js")