@taskmark/ui 0.2.2 → 0.2.5

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 (209) hide show
  1. package/README.md +23 -7
  2. package/app/api/taskmark-reload/route.ts +103 -0
  3. package/app/board/page.tsx +6 -4
  4. package/app/globals.css +17 -1
  5. package/app/layout.tsx +2 -0
  6. package/bin/lib/static-preview.mjs +110 -0
  7. package/bin/lib/watch-board-markdown.mjs +65 -0
  8. package/bin/taskmark.js +254 -46
  9. package/components/board/app-bar.tsx +31 -34
  10. package/components/board/board-dev-reloader.tsx +49 -0
  11. package/components/board/epic-list.tsx +2 -4
  12. package/components/board/markdown-content.tsx +1 -2
  13. package/components/board/overall-work-items-list.tsx +2 -1
  14. package/components/board/static-board-app.tsx +0 -1
  15. package/components/board/story-list.tsx +2 -1
  16. package/components/board/task-list.tsx +2 -1
  17. package/components/board/work-item-sheet.tsx +15 -2
  18. package/components/board/work-items-list.tsx +2 -2
  19. package/components/setup/setup-wizard.tsx +2 -6
  20. package/dist/prod-next/BUILD_ID +1 -0
  21. package/dist/{standalone/.next → prod-next}/app-path-routes-manifest.json +3 -2
  22. package/dist/{standalone/.next → prod-next}/build-manifest.json +3 -3
  23. package/dist/prod-next/export-marker.json +6 -0
  24. package/dist/prod-next/images-manifest.json +68 -0
  25. package/dist/prod-next/next-minimal-server.js.nft.json +1 -0
  26. package/dist/prod-next/next-server.js.nft.json +1 -0
  27. package/dist/{standalone/.next → prod-next}/prerender-manifest.json +3 -3
  28. package/dist/{standalone/.next → prod-next}/react-loadable-manifest.json +2 -2
  29. package/dist/prod-next/required-server-files.js +337 -0
  30. package/dist/{standalone/.next → prod-next}/required-server-files.json +0 -7
  31. package/dist/{standalone/.next → prod-next}/routes-manifest.json +6 -0
  32. package/dist/prod-next/server/app/_global-error/page.js +32 -0
  33. package/dist/prod-next/server/app/_global-error/page.js.nft.json +1 -0
  34. package/dist/prod-next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  35. package/dist/{standalone/.next → prod-next}/server/app/_global-error.html +1 -1
  36. package/dist/{standalone/.next → prod-next}/server/app/_global-error.rsc +1 -1
  37. package/dist/{standalone/.next → prod-next}/server/app/_global-error.segments/_full.segment.rsc +1 -1
  38. package/dist/{standalone/.next → prod-next}/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  39. package/dist/{standalone/.next → prod-next}/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  40. package/dist/{standalone/.next → prod-next}/server/app/_global-error.segments/_head.segment.rsc +1 -1
  41. package/dist/{standalone/.next → prod-next}/server/app/_global-error.segments/_index.segment.rsc +1 -1
  42. package/dist/{standalone/.next → prod-next}/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  43. package/dist/prod-next/server/app/_not-found/page.js +2 -0
  44. package/dist/prod-next/server/app/_not-found/page.js.nft.json +1 -0
  45. package/dist/prod-next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  46. package/dist/prod-next/server/app/_not-found.html +1 -0
  47. package/dist/prod-next/server/app/_not-found.rsc +21 -0
  48. package/dist/prod-next/server/app/_not-found.segments/_full.segment.rsc +21 -0
  49. package/dist/{standalone/.next → prod-next}/server/app/_not-found.segments/_head.segment.rsc +1 -1
  50. package/dist/prod-next/server/app/_not-found.segments/_index.segment.rsc +8 -0
  51. package/dist/{standalone/.next → prod-next}/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  52. package/dist/{standalone/.next → prod-next}/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  53. package/dist/{standalone/.next → prod-next}/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  54. package/dist/prod-next/server/app/api/taskmark-reload/route.js +1 -0
  55. package/dist/prod-next/server/app/api/taskmark-reload/route.js.nft.json +1 -0
  56. package/dist/prod-next/server/app/api/taskmark-reload/route_client-reference-manifest.js +1 -0
  57. package/dist/prod-next/server/app/board/page.js +50 -0
  58. package/dist/prod-next/server/app/board/page.js.nft.json +1 -0
  59. package/dist/prod-next/server/app/board/page_client-reference-manifest.js +1 -0
  60. package/dist/{standalone/.next → prod-next}/server/app/favicon.ico/route.js +1 -1
  61. package/dist/prod-next/server/app/favicon.ico/route.js.nft.json +1 -0
  62. package/dist/prod-next/server/app/page.js +2 -0
  63. package/dist/prod-next/server/app/page.js.nft.json +1 -0
  64. package/dist/prod-next/server/app/page_client-reference-manifest.js +1 -0
  65. package/dist/prod-next/server/app/setup/page.js +2 -0
  66. package/dist/prod-next/server/app/setup/page.js.nft.json +1 -0
  67. package/dist/prod-next/server/app/setup/page_client-reference-manifest.js +1 -0
  68. package/dist/{standalone/.next → prod-next}/server/app-paths-manifest.json +3 -2
  69. package/dist/{standalone/.next → prod-next}/server/chunks/319.js +1 -1
  70. package/dist/{standalone/.next → prod-next}/server/chunks/490.js +1 -1
  71. package/dist/prod-next/server/chunks/57.js +19 -0
  72. package/dist/prod-next/server/chunks/616.js +1 -0
  73. package/dist/prod-next/server/chunks/708.js +1 -0
  74. package/dist/prod-next/server/chunks/724.js +1 -0
  75. package/dist/{standalone/.next/server/chunks/445.js → prod-next/server/chunks/741.js} +2 -2
  76. package/dist/prod-next/server/functions-config-manifest.json +6 -0
  77. package/dist/prod-next/server/interception-route-rewrite-manifest.js +1 -0
  78. package/dist/{standalone/.next → prod-next}/server/middleware-build-manifest.js +1 -1
  79. package/dist/prod-next/server/middleware-react-loadable-manifest.js +1 -0
  80. package/dist/prod-next/server/pages/404.html +1 -0
  81. package/dist/{standalone/.next → prod-next}/server/pages/500.html +1 -1
  82. package/dist/prod-next/server/server-reference-manifest.js +1 -0
  83. package/dist/prod-next/server/server-reference-manifest.json +1 -0
  84. package/dist/prod-next/static/chunks/51.e9139a9ea6eb36b9.js +1 -0
  85. package/dist/{standalone/.next/static/chunks/781-f9f201ddc8c8591a.js → prod-next/static/chunks/613-6f794154d28bb75a.js} +1 -1
  86. package/dist/prod-next/static/chunks/app/_global-error/page-d34451c04262dd7d.js +1 -0
  87. package/dist/prod-next/static/chunks/app/api/taskmark-reload/route-d34451c04262dd7d.js +1 -0
  88. package/dist/prod-next/static/chunks/app/board/page-cd1d9be0c0127225.js +1 -0
  89. package/dist/prod-next/static/chunks/app/layout-856e8a282e69e7d0.js +1 -0
  90. package/dist/prod-next/static/chunks/app/page-d34451c04262dd7d.js +1 -0
  91. package/dist/prod-next/static/chunks/app/setup/page-c3003359e8becc84.js +1 -0
  92. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/app-error-d34451c04262dd7d.js +1 -0
  93. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/forbidden-d34451c04262dd7d.js +1 -0
  94. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/not-found-d34451c04262dd7d.js +1 -0
  95. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/unauthorized-d34451c04262dd7d.js +1 -0
  96. package/dist/prod-next/static/chunks/webpack-bfe8992962004e2b.js +1 -0
  97. package/dist/prod-next/static/css/2e6ec4c80894e3c0.css +1 -0
  98. package/dist/prod-next/static/wbcgYS3Jw87KqhnA9ttOL/_buildManifest.js +1 -0
  99. package/dist/public/taskmark-snapshot.json +1 -0
  100. package/lib/display-path.ts +6 -0
  101. package/lib/taskmark/dev-reload-token.ts +5 -0
  102. package/lib/taskmark/project-label.ts +3 -2
  103. package/lib/taskmark/validate.ts +4 -4
  104. package/next.config.ts +3 -8
  105. package/package.json +6 -4
  106. package/public/taskmark-snapshot.json +1 -1
  107. package/scripts/build-static.mjs +10 -1
  108. package/scripts/prepare-standalone.mjs +53 -20
  109. package/dist/standalone/.next/BUILD_ID +0 -1
  110. package/dist/standalone/.next/server/app/_global-error/page.js +0 -32
  111. package/dist/standalone/.next/server/app/_global-error/page.js.nft.json +0 -1
  112. package/dist/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +0 -1
  113. package/dist/standalone/.next/server/app/_not-found/page.js +0 -2
  114. package/dist/standalone/.next/server/app/_not-found/page.js.nft.json +0 -1
  115. package/dist/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  116. package/dist/standalone/.next/server/app/_not-found.html +0 -1
  117. package/dist/standalone/.next/server/app/_not-found.rsc +0 -20
  118. package/dist/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +0 -20
  119. package/dist/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +0 -7
  120. package/dist/standalone/.next/server/app/board/page.js +0 -50
  121. package/dist/standalone/.next/server/app/board/page.js.nft.json +0 -1
  122. package/dist/standalone/.next/server/app/board/page_client-reference-manifest.js +0 -1
  123. package/dist/standalone/.next/server/app/favicon.ico/route.js.nft.json +0 -1
  124. package/dist/standalone/.next/server/app/page.js +0 -2
  125. package/dist/standalone/.next/server/app/page.js.nft.json +0 -1
  126. package/dist/standalone/.next/server/app/page_client-reference-manifest.js +0 -1
  127. package/dist/standalone/.next/server/app/setup/page.js +0 -2
  128. package/dist/standalone/.next/server/app/setup/page.js.nft.json +0 -1
  129. package/dist/standalone/.next/server/app/setup/page_client-reference-manifest.js +0 -1
  130. package/dist/standalone/.next/server/chunks/57.js +0 -19
  131. package/dist/standalone/.next/server/chunks/570.js +0 -1
  132. package/dist/standalone/.next/server/chunks/600.js +0 -1
  133. package/dist/standalone/.next/server/chunks/666.js +0 -1
  134. package/dist/standalone/.next/server/functions-config-manifest.json +0 -4
  135. package/dist/standalone/.next/server/middleware-react-loadable-manifest.js +0 -1
  136. package/dist/standalone/.next/server/pages/404.html +0 -1
  137. package/dist/standalone/.next/server/server-reference-manifest.js +0 -1
  138. package/dist/standalone/.next/server/server-reference-manifest.json +0 -1
  139. package/dist/standalone/.next/static/O83kNzYUmJlkfw7SS-SsU/_buildManifest.js +0 -1
  140. package/dist/standalone/.next/static/chunks/826.92750d8ed3a55429.js +0 -1
  141. package/dist/standalone/.next/static/chunks/app/_global-error/page-82d456ade9f47021.js +0 -1
  142. package/dist/standalone/.next/static/chunks/app/board/page-f609a854d76933c2.js +0 -1
  143. package/dist/standalone/.next/static/chunks/app/layout-3745e06d87691845.js +0 -1
  144. package/dist/standalone/.next/static/chunks/app/page-82d456ade9f47021.js +0 -1
  145. package/dist/standalone/.next/static/chunks/app/setup/page-acaffda2083bf4d0.js +0 -1
  146. package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-82d456ade9f47021.js +0 -1
  147. package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-82d456ade9f47021.js +0 -1
  148. package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-82d456ade9f47021.js +0 -1
  149. package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-82d456ade9f47021.js +0 -1
  150. package/dist/standalone/.next/static/chunks/webpack-f181688592aeb1f6.js +0 -1
  151. package/dist/standalone/.next/static/css/7af268deac5c5edb.css +0 -1
  152. package/dist/standalone/node_modules/next/dist/compiled/jest-worker/processChild.js +0 -1
  153. package/dist/standalone/node_modules/next/dist/compiled/jest-worker/threadChild.js +0 -1
  154. package/dist/standalone/node_modules/next/dist/server/lib/start-server.js +0 -494
  155. package/dist/standalone/node_modules/next/dist/server/next-server.js +0 -1429
  156. package/dist/standalone/node_modules/next/dist/server/next.js +0 -455
  157. package/dist/standalone/node_modules/next/dist/server/require-hook.js +0 -82
  158. package/dist/standalone/node_modules/next/dist/server/route-modules/app-page/module.compiled.js +0 -36
  159. package/dist/standalone/node_modules/next/dist/server/route-modules/pages/module.compiled.js +0 -20
  160. package/dist/standalone/node_modules/styled-jsx/index.js +0 -1
  161. package/dist/standalone/node_modules/styled-jsx/package.json +0 -132
  162. package/dist/standalone/node_modules/styled-jsx/style.js +0 -1
  163. package/dist/standalone/package.json +0 -76
  164. package/dist/standalone/public/taskmark-snapshot.json +0 -1
  165. package/dist/standalone/server.js +0 -44
  166. /package/dist/{standalone/.next → prod-next}/package.json +0 -0
  167. /package/dist/{standalone/.next → prod-next}/server/app/_global-error.meta +0 -0
  168. /package/dist/{standalone/.next → prod-next}/server/app/_not-found.meta +0 -0
  169. /package/dist/{standalone/.next → prod-next}/server/app/favicon.ico.body +0 -0
  170. /package/dist/{standalone/.next → prod-next}/server/app/favicon.ico.meta +0 -0
  171. /package/dist/{standalone/.next → prod-next}/server/chunks/318.js +0 -0
  172. /package/dist/{standalone/.next → prod-next}/server/middleware-manifest.json +0 -0
  173. /package/dist/{standalone/.next → prod-next}/server/next-font-manifest.js +0 -0
  174. /package/dist/{standalone/.next → prod-next}/server/next-font-manifest.json +0 -0
  175. /package/dist/{standalone/.next → prod-next}/server/pages-manifest.json +0 -0
  176. /package/dist/{standalone/.next → prod-next}/server/prefetch-hints.json +0 -0
  177. /package/dist/{standalone/.next → prod-next}/server/webpack-runtime.js +0 -0
  178. /package/dist/{standalone/.next → prod-next}/static/chunks/4bd1b696-deb4a0a1da1923b0.js +0 -0
  179. /package/dist/{standalone/.next → prod-next}/static/chunks/669-8103441c67b185da.js +0 -0
  180. /package/dist/{standalone/.next → prod-next}/static/chunks/701-df3ee5f1cf837b1a.js +0 -0
  181. /package/dist/{standalone/.next → prod-next}/static/chunks/794-25668765560cb197.js +0 -0
  182. /package/dist/{standalone/.next → prod-next}/static/chunks/app/_not-found/page-0b3785af737e7968.js +0 -0
  183. /package/dist/{standalone/.next → prod-next}/static/chunks/framework-b29f9083d3cda3b2.js +0 -0
  184. /package/dist/{standalone/.next → prod-next}/static/chunks/main-app-bfb36455d24b3e5a.js +0 -0
  185. /package/dist/{standalone/.next → prod-next}/static/chunks/main-bb33c46a9c25dee8.js +0 -0
  186. /package/dist/{standalone/.next → prod-next}/static/chunks/next/dist/client/components/builtin/global-error-dc53ab29e0491fe4.js +0 -0
  187. /package/dist/{standalone/.next → prod-next}/static/chunks/polyfills-42372ed130431b0a.js +0 -0
  188. /package/dist/{standalone/.next → prod-next}/static/css/c593627ceef17a4b.css +0 -0
  189. /package/dist/{standalone/.next → prod-next}/static/media/36966cca54120369-s.p.woff2 +0 -0
  190. /package/dist/{standalone/.next → prod-next}/static/media/982ceffe7b733b3b-s.p.woff2 +0 -0
  191. /package/dist/{standalone/.next → prod-next}/static/media/b7387a63dd068245-s.woff2 +0 -0
  192. /package/dist/{standalone/.next → prod-next}/static/media/b8bfb68ab9ab617c-s.woff2 +0 -0
  193. /package/dist/{standalone/.next → prod-next}/static/media/e1aab0933260df4d-s.woff2 +0 -0
  194. /package/dist/{standalone/.next/static/O83kNzYUmJlkfw7SS-SsU → prod-next/static/wbcgYS3Jw87KqhnA9ttOL}/_ssgManifest.js +0 -0
  195. /package/dist/{standalone/public → public}/apple-touch-icon.png +0 -0
  196. /package/dist/{standalone/public → public}/favicon-96x96.png +0 -0
  197. /package/dist/{standalone/public → public}/favicon.ico +0 -0
  198. /package/dist/{standalone/public → public}/favicon.svg +0 -0
  199. /package/dist/{standalone/public → public}/file.svg +0 -0
  200. /package/dist/{standalone/public → public}/globe.svg +0 -0
  201. /package/dist/{standalone/public → public}/next.svg +0 -0
  202. /package/dist/{standalone/public → public}/og/og-default.png +0 -0
  203. /package/dist/{standalone/public → public}/site.webmanifest +0 -0
  204. /package/dist/{standalone/public → public}/tm_dark.png +0 -0
  205. /package/dist/{standalone/public → public}/tm_light.png +0 -0
  206. /package/dist/{standalone/public → public}/vercel.svg +0 -0
  207. /package/dist/{standalone/public → public}/web-app-manifest-192x192.png +0 -0
  208. /package/dist/{standalone/public → public}/web-app-manifest-512x512.png +0 -0
  209. /package/dist/{standalone/public → public}/window.svg +0 -0
@@ -1,455 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- 0 && (module.exports = {
6
- NextServer: null,
7
- default: null
8
- });
9
- function _export(target, all) {
10
- for(var name in all)Object.defineProperty(target, name, {
11
- enumerable: true,
12
- get: all[name]
13
- });
14
- }
15
- _export(exports, {
16
- NextServer: function() {
17
- return NextServer;
18
- },
19
- // exports = module.exports
20
- // Support `import next from 'next'`
21
- default: function() {
22
- return _default;
23
- }
24
- });
25
- require("./require-hook");
26
- require("./node-polyfill-crypto");
27
- const _log = /*#__PURE__*/ _interop_require_wildcard(require("../build/output/log"));
28
- const _config = /*#__PURE__*/ _interop_require_default(require("./config"));
29
- const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
30
- const _constants = require("../lib/constants");
31
- const _constants1 = require("../shared/lib/constants");
32
- const _tracer = require("./lib/trace/tracer");
33
- const _constants2 = require("./lib/trace/constants");
34
- const _formaturl = require("../shared/lib/router/utils/format-url");
35
- const _asynccallbackset = require("./lib/async-callback-set");
36
- const _routerservercontext = require("./lib/router-utils/router-server-context");
37
- function _interop_require_default(obj) {
38
- return obj && obj.__esModule ? obj : {
39
- default: obj
40
- };
41
- }
42
- function _getRequireWildcardCache(nodeInterop) {
43
- if (typeof WeakMap !== "function") return null;
44
- var cacheBabelInterop = new WeakMap();
45
- var cacheNodeInterop = new WeakMap();
46
- return (_getRequireWildcardCache = function(nodeInterop) {
47
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
48
- })(nodeInterop);
49
- }
50
- function _interop_require_wildcard(obj, nodeInterop) {
51
- if (!nodeInterop && obj && obj.__esModule) {
52
- return obj;
53
- }
54
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
55
- return {
56
- default: obj
57
- };
58
- }
59
- var cache = _getRequireWildcardCache(nodeInterop);
60
- if (cache && cache.has(obj)) {
61
- return cache.get(obj);
62
- }
63
- var newObj = {
64
- __proto__: null
65
- };
66
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
67
- for(var key in obj){
68
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
69
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
70
- if (desc && (desc.get || desc.set)) {
71
- Object.defineProperty(newObj, key, desc);
72
- } else {
73
- newObj[key] = obj[key];
74
- }
75
- }
76
- }
77
- newObj.default = obj;
78
- if (cache) {
79
- cache.set(obj, newObj);
80
- }
81
- return newObj;
82
- }
83
- let ServerImpl;
84
- const getServerImpl = async ()=>{
85
- if (ServerImpl === undefined) {
86
- ServerImpl = (await Promise.resolve(require('./next-server'))).default;
87
- }
88
- return ServerImpl;
89
- };
90
- const SYMBOL_LOAD_CONFIG = Symbol('next.load_config');
91
- class NextServer {
92
- constructor(options){
93
- this.options = options;
94
- }
95
- get hostname() {
96
- return this.options.hostname;
97
- }
98
- get port() {
99
- return this.options.port;
100
- }
101
- getRequestHandler() {
102
- return async (req, res, parsedUrl)=>{
103
- return (0, _tracer.getTracer)().trace(_constants2.NextServerSpan.getRequestHandler, async ()=>{
104
- const requestHandler = await this.getServerRequestHandler();
105
- return requestHandler(req, res, parsedUrl);
106
- });
107
- };
108
- }
109
- /**
110
- * @internal - this method is internal to Next.js and should not be used
111
- * directly by end-users, only used in testing
112
- */ getRequestHandlerWithMetadata(meta) {
113
- return async (req, res, parsedUrl)=>{
114
- return (0, _tracer.getTracer)().trace(_constants2.NextServerSpan.getRequestHandlerWithMetadata, async ()=>{
115
- const server = await this.getServer();
116
- const handler = server.getRequestHandlerWithMetadata(meta);
117
- return handler(req, res, parsedUrl);
118
- });
119
- };
120
- }
121
- getUpgradeHandler() {
122
- return async (req, socket, head)=>{
123
- const server = await this.getServer();
124
- // @ts-expect-error we mark this as protected so it
125
- // causes an error here
126
- return server.handleUpgrade.apply(server, [
127
- req,
128
- socket,
129
- head
130
- ]);
131
- };
132
- }
133
- setAssetPrefix(assetPrefix) {
134
- if (this.server) {
135
- this.server.setAssetPrefix(assetPrefix);
136
- } else {
137
- this.preparedAssetPrefix = assetPrefix;
138
- }
139
- }
140
- logError(...args) {
141
- if (this.server) {
142
- this.server.logError(...args);
143
- }
144
- }
145
- async logErrorWithOriginalStack(err, type) {
146
- const server = await this.getServer();
147
- // this is only available on dev server
148
- if (server.logErrorWithOriginalStack) {
149
- return server.logErrorWithOriginalStack(err, type);
150
- }
151
- }
152
- async revalidate(...args) {
153
- const server = await this.getServer();
154
- return server.revalidate(...args);
155
- }
156
- async render(...args) {
157
- const server = await this.getServer();
158
- return server.render(...args);
159
- }
160
- async renderToHTML(...args) {
161
- const server = await this.getServer();
162
- return server.renderToHTML(...args);
163
- }
164
- async renderError(...args) {
165
- const server = await this.getServer();
166
- return server.renderError(...args);
167
- }
168
- async renderErrorToHTML(...args) {
169
- const server = await this.getServer();
170
- return server.renderErrorToHTML(...args);
171
- }
172
- async render404(...args) {
173
- const server = await this.getServer();
174
- return server.render404(...args);
175
- }
176
- async prepare(serverFields) {
177
- const server = await this.getServer();
178
- if (serverFields) {
179
- Object.assign(server, serverFields);
180
- }
181
- // We shouldn't prepare the server in production,
182
- // because this code won't be executed when deployed
183
- if (this.options.dev) {
184
- await server.prepare();
185
- }
186
- }
187
- async close() {
188
- if (this.server) {
189
- await this.server.close();
190
- }
191
- }
192
- async createServer(options) {
193
- let ServerImplementation;
194
- if (options.dev) {
195
- ServerImplementation = require('./dev/next-dev-server').default;
196
- } else {
197
- ServerImplementation = await getServerImpl();
198
- }
199
- const server = new ServerImplementation(options);
200
- return server;
201
- }
202
- async [SYMBOL_LOAD_CONFIG]() {
203
- const dir = _nodepath.default.resolve(/* turbopackIgnore: true */ this.options.dir || '.');
204
- const config = await (0, _config.default)(this.options.dev ? _constants1.PHASE_DEVELOPMENT_SERVER : _constants1.PHASE_PRODUCTION_SERVER, dir, {
205
- customConfig: this.options.conf,
206
- silent: true
207
- });
208
- // check serialized build config when available
209
- if (!this.options.dev) {
210
- try {
211
- const serializedConfig = require(/* turbopackIgnore: true */ _nodepath.default.join(/* turbopackIgnore: true */ dir, config.distDir, _constants1.SERVER_FILES_MANIFEST + '.json')).config;
212
- config.experimental.isExperimentalCompile = serializedConfig.experimental.isExperimentalCompile;
213
- } catch (_) {
214
- // if distDir is customized we don't know until we
215
- // load the config so fallback to loading the config
216
- // from next.config.js
217
- }
218
- }
219
- return config;
220
- }
221
- async getServer() {
222
- if (!this.serverPromise) {
223
- this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf)=>{
224
- if (!this.options.dev) {
225
- if (conf.output === 'standalone') {
226
- if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {
227
- _log.warn(`"next start" does not work with "output: standalone" configuration. Use "node .next/standalone/server.js" instead.`);
228
- }
229
- } else if (conf.output === 'export') {
230
- throw Object.defineProperty(new Error(`"next start" does not work with "output: export" configuration. Use "npx serve@latest out" instead.`), "__NEXT_ERROR_CODE", {
231
- value: "E375",
232
- enumerable: false,
233
- configurable: true
234
- });
235
- }
236
- }
237
- this.server = await this.createServer({
238
- ...this.options,
239
- conf
240
- });
241
- if (this.preparedAssetPrefix) {
242
- this.server.setAssetPrefix(this.preparedAssetPrefix);
243
- }
244
- return this.server;
245
- });
246
- }
247
- return this.serverPromise;
248
- }
249
- async getServerRequestHandler() {
250
- if (this.reqHandler) return this.reqHandler;
251
- // Memoize request handler creation
252
- if (!this.reqHandlerPromise) {
253
- this.reqHandlerPromise = this.getServer().then((server)=>{
254
- this.reqHandler = (0, _tracer.getTracer)().wrap(_constants2.NextServerSpan.getServerRequestHandler, server.getRequestHandler().bind(server));
255
- delete this.reqHandlerPromise;
256
- return this.reqHandler;
257
- });
258
- }
259
- return this.reqHandlerPromise;
260
- }
261
- }
262
- /** The wrapper server used for `import next from "next" (in a custom server)` */ class NextCustomServer {
263
- constructor(options){
264
- this.didWebSocketSetup = false;
265
- this.options = options;
266
- }
267
- getInit() {
268
- if (!this.init) {
269
- throw Object.defineProperty(new Error('prepare() must be called before performing this operation'), "__NEXT_ERROR_CODE", {
270
- value: "E355",
271
- enumerable: false,
272
- configurable: true
273
- });
274
- }
275
- return this.init;
276
- }
277
- get requestHandler() {
278
- return this.getInit().requestHandler;
279
- }
280
- get upgradeHandler() {
281
- return this.getInit().upgradeHandler;
282
- }
283
- get server() {
284
- return this.getInit().server;
285
- }
286
- get hostname() {
287
- return this.options.hostname;
288
- }
289
- get port() {
290
- return this.options.port;
291
- }
292
- async prepare() {
293
- if (this.options.dev) {
294
- process.env.__NEXT_DEV_SERVER = '1';
295
- }
296
- const { getRequestHandlers } = require('./lib/start-server');
297
- let onDevServerCleanup;
298
- if (this.options.dev) {
299
- this.cleanupListeners = new _asynccallbackset.AsyncCallbackSet();
300
- onDevServerCleanup = this.cleanupListeners.add.bind(this.cleanupListeners);
301
- }
302
- const initResult = await getRequestHandlers({
303
- dir: this.options.dir,
304
- port: this.options.port || 3000,
305
- isDev: !!this.options.dev,
306
- onDevServerCleanup,
307
- hostname: this.options.hostname || 'localhost',
308
- minimalMode: this.options.minimalMode,
309
- quiet: this.options.quiet
310
- });
311
- this.init = initResult;
312
- }
313
- setupWebSocketHandler(customServer, _req) {
314
- if (!this.didWebSocketSetup) {
315
- var _req_socket;
316
- this.didWebSocketSetup = true;
317
- customServer = customServer || (_req == null ? void 0 : (_req_socket = _req.socket) == null ? void 0 : _req_socket.server);
318
- if (customServer) {
319
- customServer.on('upgrade', async (req, socket, head)=>{
320
- this.upgradeHandler(req, socket, head);
321
- });
322
- }
323
- }
324
- }
325
- getRequestHandler() {
326
- return async (req, res, parsedUrl)=>{
327
- this.setupWebSocketHandler(this.options.httpServer, req);
328
- if (parsedUrl) {
329
- req.url = (0, _formaturl.formatUrl)(parsedUrl);
330
- }
331
- return this.requestHandler(req, res);
332
- };
333
- }
334
- async render(...args) {
335
- let [req, res, pathname, query, parsedUrl] = args;
336
- this.setupWebSocketHandler(this.options.httpServer, req);
337
- if (!pathname.startsWith('/')) {
338
- console.error(`Cannot render page with path "${pathname}"`);
339
- pathname = `/${pathname}`;
340
- }
341
- pathname = pathname === '/index' ? '/' : pathname;
342
- req.url = (0, _formaturl.formatUrl)({
343
- ...parsedUrl,
344
- pathname,
345
- query
346
- });
347
- await this.requestHandler(req, res);
348
- return;
349
- }
350
- setAssetPrefix(assetPrefix) {
351
- var _routerServerGlobal_RouterServerContextSymbol_relativeProjectDir, _routerServerGlobal_RouterServerContextSymbol;
352
- this.server.setAssetPrefix(assetPrefix);
353
- // update the router-server nextConfig instance as
354
- // this is the source of truth for "handler" in serverful
355
- const relativeProjectDir = _nodepath.default.relative(process.cwd(), this.options.dir || '');
356
- if ((_routerServerGlobal_RouterServerContextSymbol = _routerservercontext.routerServerGlobal[_routerservercontext.RouterServerContextSymbol]) == null ? void 0 : (_routerServerGlobal_RouterServerContextSymbol_relativeProjectDir = _routerServerGlobal_RouterServerContextSymbol[relativeProjectDir]) == null ? void 0 : _routerServerGlobal_RouterServerContextSymbol_relativeProjectDir.nextConfig) {
357
- _routerservercontext.routerServerGlobal[_routerservercontext.RouterServerContextSymbol][relativeProjectDir].nextConfig.assetPrefix = assetPrefix;
358
- }
359
- }
360
- getUpgradeHandler() {
361
- return this.server.getUpgradeHandler();
362
- }
363
- logError(...args) {
364
- this.server.logError(...args);
365
- }
366
- logErrorWithOriginalStack(err, type) {
367
- return this.server.logErrorWithOriginalStack(err, type);
368
- }
369
- async revalidate(...args) {
370
- return this.server.revalidate(...args);
371
- }
372
- async renderToHTML(...args) {
373
- return this.server.renderToHTML(...args);
374
- }
375
- async renderError(...args) {
376
- return this.server.renderError(...args);
377
- }
378
- async renderErrorToHTML(...args) {
379
- return this.server.renderErrorToHTML(...args);
380
- }
381
- async render404(...args) {
382
- return this.server.render404(...args);
383
- }
384
- async close() {
385
- var _this_init, _this_cleanupListeners;
386
- await Promise.allSettled([
387
- (_this_init = this.init) == null ? void 0 : _this_init.server.close(),
388
- (_this_cleanupListeners = this.cleanupListeners) == null ? void 0 : _this_cleanupListeners.runAll()
389
- ]);
390
- }
391
- }
392
- // This file is used for when users run `require('next')`
393
- function createServer(options) {
394
- // next sets customServer to false when calling this function, in that case we don't want to modify the environment variables
395
- const isCustomServer = (options == null ? void 0 : options.customServer) ?? true;
396
- if (isCustomServer) {
397
- const selectTurbopack = options && (options.turbo || options.turbopack || process.env.IS_TURBOPACK_TEST);
398
- const selectWebpack = options && (options.webpack || process.env.IS_WEBPACK_TEST);
399
- if (selectTurbopack && selectWebpack) {
400
- throw Object.defineProperty(new Error('Pass either `webpack` or `turbopack`, not both.'), "__NEXT_ERROR_CODE", {
401
- value: "E851",
402
- enumerable: false,
403
- configurable: true
404
- });
405
- }
406
- if (selectTurbopack || !selectWebpack) {
407
- process.env.TURBOPACK ??= selectTurbopack ? '1' : 'auto';
408
- }
409
- } else {
410
- if (options && (options.webpack || options.turbo || options.turbopack)) {
411
- throw Object.defineProperty(new Error('Only custom servers can pass `webpack`, `turbo`, or `turbopack`.'), "__NEXT_ERROR_CODE", {
412
- value: "E852",
413
- enumerable: false,
414
- configurable: true
415
- });
416
- }
417
- }
418
- // The package is used as a TypeScript plugin.
419
- if (options && 'typescript' in options && 'version' in options.typescript) {
420
- const pluginMod = require('./next-typescript');
421
- return pluginMod.createTSPlugin(options);
422
- }
423
- if (options == null) {
424
- throw Object.defineProperty(new Error('The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'), "__NEXT_ERROR_CODE", {
425
- value: "E75",
426
- enumerable: false,
427
- configurable: true
428
- });
429
- }
430
- if (!('isNextDevCommand' in options) && process.env.NODE_ENV && ![
431
- 'production',
432
- 'development',
433
- 'test'
434
- ].includes(process.env.NODE_ENV)) {
435
- _log.warn(_constants.NON_STANDARD_NODE_ENV);
436
- }
437
- if (options.dev && typeof options.dev !== 'boolean') {
438
- console.warn("Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options");
439
- }
440
- // When the caller is a custom server (using next()).
441
- if (options.customServer !== false) {
442
- const dir = _nodepath.default.resolve(/* turbopackIgnore: true */ options.dir || '.');
443
- return new NextCustomServer({
444
- ...options,
445
- dir
446
- });
447
- }
448
- // When the caller is Next.js internals (i.e. render worker, start server, etc)
449
- return new NextServer(options);
450
- }
451
- // Support commonjs `require('next')`
452
- module.exports = createServer;
453
- const _default = createServer;
454
-
455
- //# sourceMappingURL=next.js.map
@@ -1,82 +0,0 @@
1
- // Synchronously inject a require hook for webpack and webpack/. It's required to use the internal ncc webpack version.
2
- // This is needed for userland plugins to attach to the same webpack instance as Next.js'.
3
- // Individually compiled modules are as defined for the compilation in bundles/webpack/packages/*.
4
- // This module will only be loaded once per process.
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- 0 && (module.exports = {
10
- addHookAliases: null,
11
- defaultOverrides: null,
12
- hookPropertyMap: null
13
- });
14
- function _export(target, all) {
15
- for(var name in all)Object.defineProperty(target, name, {
16
- enumerable: true,
17
- get: all[name]
18
- });
19
- }
20
- _export(exports, {
21
- addHookAliases: function() {
22
- return addHookAliases;
23
- },
24
- defaultOverrides: function() {
25
- return defaultOverrides;
26
- },
27
- hookPropertyMap: function() {
28
- return hookPropertyMap;
29
- }
30
- });
31
- const path = require('path');
32
- const mod = require('module');
33
- const originalRequire = mod.prototype.require;
34
- const resolveFilename = // @ts-expect-error
35
- mod._resolveFilename;
36
- let resolve = process.env.NEXT_MINIMAL ? __non_webpack_require__.resolve : require.resolve;
37
- const hookPropertyMap = new Map();
38
- const defaultOverrides = {};
39
- try {
40
- Object.assign(defaultOverrides, {
41
- 'styled-jsx': path.dirname(resolve('styled-jsx/package.json')),
42
- 'styled-jsx/style': resolve('styled-jsx/style'),
43
- 'styled-jsx/style.js': resolve('styled-jsx/style')
44
- });
45
- } catch (_) {}
46
- const toResolveMap = (map)=>{
47
- const resolveMap = [];
48
- for (const [key, value] of Object.entries(map)){
49
- try {
50
- resolveMap.push([
51
- key,
52
- resolve(value)
53
- ]);
54
- } catch {}
55
- }
56
- return resolveMap;
57
- };
58
- function addHookAliases(aliases = []) {
59
- for (const [key, value] of aliases){
60
- hookPropertyMap.set(key, value);
61
- }
62
- }
63
- addHookAliases(toResolveMap(defaultOverrides));
64
- // @ts-expect-error
65
- mod._resolveFilename = (function(originalResolveFilename, requestMap, request, parent, isMain, options) {
66
- const hookResolved = requestMap.get(request);
67
- if (hookResolved) request = hookResolved;
68
- return originalResolveFilename.call(mod, request, parent, isMain, options);
69
- // We use `bind` here to avoid referencing outside variables to create potential memory leaks.
70
- }).bind(null, resolveFilename, hookPropertyMap);
71
- // @ts-expect-error
72
- // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled
73
- // that needs to point to the rendering runtime version, it will point to the correct one.
74
- // This can happen on `pages` when a user requires a dependency that uses next/image for example.
75
- mod.prototype.require = function(request) {
76
- if (request.endsWith('.shared-runtime')) {
77
- return originalRequire.call(this, `next/dist/server/route-modules/pages/vendored/contexts/${path.basename(request, '.shared-runtime')}`);
78
- }
79
- return originalRequire.call(this, request);
80
- };
81
-
82
- //# sourceMappingURL=require-hook.js.map
@@ -1,36 +0,0 @@
1
- "use strict";
2
- if (process.env.NEXT_RUNTIME === 'edge') {
3
- module.exports = require('next/dist/server/route-modules/app-page/module.js');
4
- } else {
5
- if (process.env.__NEXT_EXPERIMENTAL_REACT) {
6
- if (process.env.NODE_ENV === 'development') {
7
- if (process.env.TURBOPACK) {
8
- module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js');
9
- } else {
10
- module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js');
11
- }
12
- } else {
13
- if (process.env.TURBOPACK) {
14
- module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js');
15
- } else {
16
- module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js');
17
- }
18
- }
19
- } else {
20
- if (process.env.NODE_ENV === 'development') {
21
- if (process.env.TURBOPACK) {
22
- module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js');
23
- } else {
24
- module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js');
25
- }
26
- } else {
27
- if (process.env.TURBOPACK) {
28
- module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js');
29
- } else {
30
- module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js');
31
- }
32
- }
33
- }
34
- }
35
-
36
- //# sourceMappingURL=module.compiled.js.map
@@ -1,20 +0,0 @@
1
- "use strict";
2
- if (process.env.NEXT_RUNTIME === 'edge') {
3
- module.exports = require('next/dist/server/route-modules/pages/module.js');
4
- } else {
5
- if (process.env.NODE_ENV === 'development') {
6
- if (process.env.TURBOPACK) {
7
- module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.dev.js');
8
- } else {
9
- module.exports = require('next/dist/compiled/next-server/pages.runtime.dev.js');
10
- }
11
- } else {
12
- if (process.env.TURBOPACK) {
13
- module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.prod.js');
14
- } else {
15
- module.exports = require('next/dist/compiled/next-server/pages.runtime.prod.js');
16
- }
17
- }
18
- }
19
-
20
- //# sourceMappingURL=module.compiled.js.map
@@ -1 +0,0 @@
1
- module.exports = require('./dist/index')