@reckona/mreact-router 0.0.146 → 0.0.147
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.
- package/README.md +4 -0
- package/dist/build.d.ts +12 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +45 -35
- package/dist/build.js.map +1 -1
- package/dist/cli.js +118 -12
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/build.ts +67 -40
- package/src/cli.ts +144 -12
- package/src/index.ts +1 -0
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
2
3
|
import { resolve } from "node:path";
|
|
3
|
-
import { buildApp, packageAwsLambdaArtifact, packageCloudflarePagesArtifact } from "./build.js";
|
|
4
|
+
import { buildApp, packageAwsLambdaArtifact, packageCloudflarePagesArtifact, } from "./build.js";
|
|
4
5
|
import { buildTargetsFromCliTarget, createCliRequestLogger, formatCliHelp, parseCliArguments, resolveCliAllowedHosts, resolveCliDevPort, resolveCliHost, resolveCliHostPolicy, resolveCliRequestLogMode, } from "./cli-options.js";
|
|
5
6
|
import { startDevServer } from "./dev-server.js";
|
|
6
7
|
import { startServer } from "./serve.js";
|
|
@@ -25,19 +26,36 @@ if (parsed !== undefined) {
|
|
|
25
26
|
? createCliRequestLogger()
|
|
26
27
|
: undefined;
|
|
27
28
|
if (command === "build") {
|
|
29
|
+
const startedAt = performance.now();
|
|
30
|
+
let activeBuildPhase;
|
|
31
|
+
console.log(`mreact-router build v${await readRouterCliVersion()}`);
|
|
32
|
+
console.log(`Target: ${formatCliBuildTarget(parsed.target)}`);
|
|
33
|
+
console.log(`Root: ${process.cwd()}`);
|
|
34
|
+
console.log("Config: loading...");
|
|
28
35
|
const loaded = routeArg === undefined
|
|
29
36
|
? await loadMreactRouterViteConfigDetails({ command: "build", cwd: process.cwd() })
|
|
30
37
|
: { project: { appDir: resolve(routeArg) }, viteConfig: undefined };
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
try {
|
|
39
|
+
const result = await buildApp({
|
|
40
|
+
...loaded.project,
|
|
41
|
+
...(parsed.clientSourceMaps === undefined
|
|
42
|
+
? {}
|
|
43
|
+
: { clientSourceMaps: parsed.clientSourceMaps }),
|
|
44
|
+
onBuildProgress(event) {
|
|
45
|
+
activeBuildPhase = updateBuildProgressLog(event, activeBuildPhase);
|
|
46
|
+
},
|
|
47
|
+
outDir: resolve(".mreact"),
|
|
48
|
+
targets: buildTargetsFromCliTarget(parsed.target),
|
|
49
|
+
viteConfig: loaded.viteConfig,
|
|
50
|
+
});
|
|
51
|
+
console.log(`Built ${result.routes.length} routes in ${formatDurationSeconds(performance.now() - startedAt)}.`);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (activeBuildPhase !== undefined) {
|
|
55
|
+
throw new Error(`Build failed during ${formatBuildPhaseFailureLabel(activeBuildPhase)}: ${error instanceof Error ? error.message : String(error)}`);
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
41
59
|
}
|
|
42
60
|
else if (command === "package") {
|
|
43
61
|
if (routeArg === "aws-lambda") {
|
|
@@ -63,7 +81,11 @@ if (parsed !== undefined) {
|
|
|
63
81
|
else if (command === "dev") {
|
|
64
82
|
const loaded = routeArg === undefined
|
|
65
83
|
? await loadMreactRouterViteConfigDetails({ command: "serve", cwd: process.cwd() })
|
|
66
|
-
: {
|
|
84
|
+
: {
|
|
85
|
+
project: { appDir: resolve(routeArg) },
|
|
86
|
+
serverPort: undefined,
|
|
87
|
+
viteConfig: undefined,
|
|
88
|
+
};
|
|
67
89
|
const server = await startDevServer({
|
|
68
90
|
...loaded.project,
|
|
69
91
|
logger,
|
|
@@ -94,4 +116,88 @@ if (parsed !== undefined) {
|
|
|
94
116
|
process.exitCode = 1;
|
|
95
117
|
}
|
|
96
118
|
}
|
|
119
|
+
async function readRouterCliVersion() {
|
|
120
|
+
try {
|
|
121
|
+
const source = await readFile(new URL("../package.json", import.meta.url), "utf8");
|
|
122
|
+
const json = JSON.parse(source);
|
|
123
|
+
return typeof json.version === "string" ? json.version : "unknown";
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return "unknown";
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function formatCliBuildTarget(target) {
|
|
130
|
+
return target ?? "default";
|
|
131
|
+
}
|
|
132
|
+
function updateBuildProgressLog(event, activePhase) {
|
|
133
|
+
if (event.kind === "routes-discovered") {
|
|
134
|
+
console.log(`Routes: ${event.count} discovered`);
|
|
135
|
+
return activePhase;
|
|
136
|
+
}
|
|
137
|
+
if (event.kind !== "phase-start") {
|
|
138
|
+
return activePhase;
|
|
139
|
+
}
|
|
140
|
+
const message = buildPhaseProgressMessage(event.phase);
|
|
141
|
+
if (message !== undefined) {
|
|
142
|
+
console.log(message);
|
|
143
|
+
}
|
|
144
|
+
return event.phase;
|
|
145
|
+
}
|
|
146
|
+
function buildPhaseProgressMessage(phase) {
|
|
147
|
+
switch (phase) {
|
|
148
|
+
case "scan":
|
|
149
|
+
return "Routes: discovering...";
|
|
150
|
+
case "serverModules":
|
|
151
|
+
return "Server: building...";
|
|
152
|
+
case "clientBundles":
|
|
153
|
+
return "Client: building...";
|
|
154
|
+
case "writeManifests":
|
|
155
|
+
return "Artifacts: writing...";
|
|
156
|
+
default:
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function formatBuildPhaseFailureLabel(phase) {
|
|
161
|
+
switch (phase) {
|
|
162
|
+
case "scan":
|
|
163
|
+
return "route discovery";
|
|
164
|
+
case "collectFiles":
|
|
165
|
+
return "source file collection";
|
|
166
|
+
case "analyzeSources":
|
|
167
|
+
return "source analysis";
|
|
168
|
+
case "validate":
|
|
169
|
+
return "production route validation";
|
|
170
|
+
case "prepareOutput":
|
|
171
|
+
return "output preparation";
|
|
172
|
+
case "publicAssets":
|
|
173
|
+
return "public asset collection";
|
|
174
|
+
case "serverActionManifest":
|
|
175
|
+
return "server action manifest generation";
|
|
176
|
+
case "serverModules":
|
|
177
|
+
return "server output build";
|
|
178
|
+
case "importPolicy":
|
|
179
|
+
return "import policy generation";
|
|
180
|
+
case "serverModuleArtifacts":
|
|
181
|
+
return "server artifact writing";
|
|
182
|
+
case "clientBundles":
|
|
183
|
+
return "client output build";
|
|
184
|
+
case "navigationRuntime":
|
|
185
|
+
return "navigation runtime build";
|
|
186
|
+
case "prerender":
|
|
187
|
+
return "static prerender";
|
|
188
|
+
case "cloudflare":
|
|
189
|
+
return "Cloudflare artifact generation";
|
|
190
|
+
case "writeManifests":
|
|
191
|
+
return "manifest writing";
|
|
192
|
+
case "adapterArtifacts":
|
|
193
|
+
return "adapter artifact writing";
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function formatDurationSeconds(ms) {
|
|
197
|
+
const seconds = ms / 1000;
|
|
198
|
+
if (seconds < 10) {
|
|
199
|
+
return `${Math.round(seconds * 10) / 10}s`;
|
|
200
|
+
}
|
|
201
|
+
return `${Math.round(seconds)}s`;
|
|
202
|
+
}
|
|
97
203
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAChG,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB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AAC,GAAG,CAAC,8BAA8B,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;YAC1D,CAAC;iBAAM,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;gBAC/B,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC;oBAC/B,YAAY,EAAE,sBAAsB,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC;oBACtE,UAAU,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC;oBAChE,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;oBAClD,MAAM;oBACN,MAAM,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC;oBACtC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;iBACvC,CAAC,CAAC;gBACH,OAAO,CAAC,GAAG,CAAC,6CAA6C,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;YACzE,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;gBAC7C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { resolve } from \"node:path\";\nimport { buildApp, packageAwsLambdaArtifact, packageCloudflarePagesArtifact } from \"./build.js\";\nimport {\n buildTargetsFromCliTarget,\n createCliRequestLogger,\n formatCliHelp,\n parseCliArguments,\n resolveCliAllowedHosts,\n resolveCliDevPort,\n resolveCliHost,\n resolveCliHostPolicy,\n resolveCliRequestLogMode,\n} from \"./cli-options.js\";\nimport { startDevServer } from \"./dev-server.js\";\nimport { startServer } from \"./serve.js\";\nimport { loadMreactRouterViteConfigDetails } from \"./vite-config.js\";\n\nlet parsed;\n\ntry {\n parsed = parseCliArguments(process.argv.slice(2));\n} catch (error) {\n console.error(error instanceof Error ? error.message : String(error));\n process.exitCode = 1;\n}\n\nif (parsed !== undefined) {\n const command = parsed.command;\n const routeArg = parsed.routeArg;\n\n try {\n if (parsed.help === true || command === \"help\") {\n console.log(formatCliHelp(command === \"help\" ? routeArg : command));\n } else {\n const logger =\n resolveCliRequestLogMode(parsed.log, process.env) === \"requests\"\n ? createCliRequestLogger()\n : undefined;\n\n if (command === \"build\") {\n const loaded =\n routeArg === undefined\n ? await loadMreactRouterViteConfigDetails({ command: \"build\", cwd: process.cwd() })\n : { project: { appDir: resolve(routeArg) }, viteConfig: undefined };\n const result = await buildApp({\n ...loaded.project,\n ...(parsed.clientSourceMaps === undefined\n ? {}\n : { clientSourceMaps: parsed.clientSourceMaps }),\n outDir: resolve(\".mreact\"),\n targets: buildTargetsFromCliTarget(parsed.target),\n viteConfig: loaded.viteConfig,\n });\n console.log(`Built ${result.routes.length} routes.`);\n } else if (command === \"package\") {\n if (routeArg === \"aws-lambda\") {\n const manifest = await packageAwsLambdaArtifact({\n fromDir: resolve(parsed.from ?? \".mreact\"),\n ...(parsed.handler === undefined ? {} : { handlerEntry: resolve(parsed.handler) }),\n outDir: resolve(parsed.out ?? \".lambda\"),\n skipRuntimeDependencyCheck: parsed.skipRuntimeDependencyCheck,\n });\n console.log(\n `Packaged AWS Lambda artifact with ${manifest.files.length} files (${manifest.totalBytes} bytes).`,\n );\n } else if (routeArg === \"cloudflare-pages\") {\n const manifest = await packageCloudflarePagesArtifact({\n fromDir: resolve(parsed.from ?? \".mreact\"),\n outDir: resolve(parsed.out ?? \".mreact/pages\"),\n });\n console.log(\n `Packaged Cloudflare Pages artifact with ${manifest.files.length} files (${manifest.totalBytes} bytes).`,\n );\n } else {\n throw new Error(\n `Unsupported package target ${JSON.stringify(routeArg)}. Expected \"aws-lambda\" or \"cloudflare-pages\".`,\n );\n }\n } else if (command === \"dev\") {\n const loaded =\n routeArg === undefined\n ? await loadMreactRouterViteConfigDetails({ command: \"serve\", cwd: process.cwd() })\n : { project: { appDir: resolve(routeArg) }, serverPort: undefined, viteConfig: undefined };\n const server = await startDevServer({\n ...loaded.project,\n logger,\n port: resolveCliDevPort(parsed.port, process.env, loaded.serverPort),\n viteConfig: loaded.viteConfig,\n });\n console.log(`mreact app router ready at ${server.url}`);\n } else if (command === \"start\") {\n const server = await startServer({\n allowedHosts: resolveCliAllowedHosts(parsed.allowedHosts, process.env),\n hostPolicy: resolveCliHostPolicy(parsed.hostPolicy, process.env),\n hostname: resolveCliHost(parsed.host, process.env),\n logger,\n outDir: resolve(routeArg ?? \".mreact\"),\n port: Number(process.env.PORT ?? 3001),\n });\n console.log(`mreact app router serving built output at ${server.url}`);\n } else {\n console.error(`Unknown command: ${command}`);\n process.exitCode = 1;\n }\n }\n } catch (error) {\n console.error(error instanceof Error ? error.message : String(error));\n process.exitCode = 1;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,QAAQ,EACR,wBAAwB,EACxB,8BAA8B,GAG/B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EAEtB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;A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,eAAe;YAClB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,mBAAmB;YACtB,OAAO,0BAA0B,CAAC;QACpC,KAAK,WAAW;YACd,OAAO,kBAAkB,CAAC;QAC5B,KAAK,YAAY;YACf,OAAO,gCAAgC,CAAC;QAC1C,KAAK,gBAAgB;YACnB,OAAO,kBAAkB,CAAC;QAC5B,KAAK,kBAAkB;YACrB,OAAO,0BAA0B,CAAC;IACtC,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,EAAU;IACvC,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;IAE1B,IAAI,OAAO,GAAG,EAAE,EAAE,CAAC;QACjB,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IAC7C,CAAC;IAED,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AACnC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { readFile } from \"node:fs/promises\";\nimport { resolve } from \"node:path\";\nimport {\n buildApp,\n packageAwsLambdaArtifact,\n packageCloudflarePagesArtifact,\n type BuildAppPhase,\n type BuildAppProgressEvent,\n} from \"./build.js\";\nimport {\n buildTargetsFromCliTarget,\n createCliRequestLogger,\n type CliBuildTarget,\n formatCliHelp,\n parseCliArguments,\n resolveCliAllowedHosts,\n resolveCliDevPort,\n resolveCliHost,\n resolveCliHostPolicy,\n resolveCliRequestLogMode,\n} from \"./cli-options.js\";\nimport { startDevServer } from \"./dev-server.js\";\nimport { startServer } from \"./serve.js\";\nimport { loadMreactRouterViteConfigDetails } from \"./vite-config.js\";\n\nlet parsed;\n\ntry {\n parsed = parseCliArguments(process.argv.slice(2));\n} catch (error) {\n console.error(error instanceof Error ? error.message : String(error));\n process.exitCode = 1;\n}\n\nif (parsed !== undefined) {\n const command = parsed.command;\n const routeArg = parsed.routeArg;\n\n try {\n if (parsed.help === true || command === \"help\") {\n console.log(formatCliHelp(command === \"help\" ? routeArg : command));\n } else {\n const logger =\n resolveCliRequestLogMode(parsed.log, process.env) === \"requests\"\n ? createCliRequestLogger()\n : undefined;\n\n if (command === \"build\") {\n const startedAt = performance.now();\n let activeBuildPhase: BuildAppPhase | undefined;\n console.log(`mreact-router build v${await readRouterCliVersion()}`);\n console.log(`Target: ${formatCliBuildTarget(parsed.target)}`);\n console.log(`Root: ${process.cwd()}`);\n console.log(\"Config: loading...\");\n const loaded =\n routeArg === undefined\n ? await loadMreactRouterViteConfigDetails({ command: \"build\", cwd: process.cwd() })\n : { project: { appDir: resolve(routeArg) }, viteConfig: undefined };\n try {\n const result = await buildApp({\n ...loaded.project,\n ...(parsed.clientSourceMaps === undefined\n ? {}\n : { clientSourceMaps: parsed.clientSourceMaps }),\n onBuildProgress(event) {\n activeBuildPhase = updateBuildProgressLog(event, activeBuildPhase);\n },\n outDir: resolve(\".mreact\"),\n targets: buildTargetsFromCliTarget(parsed.target),\n viteConfig: loaded.viteConfig,\n });\n console.log(\n `Built ${result.routes.length} routes in ${formatDurationSeconds(performance.now() - startedAt)}.`,\n );\n } catch (error) {\n if (activeBuildPhase !== undefined) {\n throw new Error(\n `Build failed during ${formatBuildPhaseFailureLabel(activeBuildPhase)}: ${\n error instanceof Error ? error.message : String(error)\n }`,\n );\n }\n throw error;\n }\n } else if (command === \"package\") {\n if (routeArg === \"aws-lambda\") {\n const manifest = await packageAwsLambdaArtifact({\n fromDir: resolve(parsed.from ?? \".mreact\"),\n ...(parsed.handler === undefined ? {} : { handlerEntry: resolve(parsed.handler) }),\n outDir: resolve(parsed.out ?? \".lambda\"),\n skipRuntimeDependencyCheck: parsed.skipRuntimeDependencyCheck,\n });\n console.log(\n `Packaged AWS Lambda artifact with ${manifest.files.length} files (${manifest.totalBytes} bytes).`,\n );\n } else if (routeArg === \"cloudflare-pages\") {\n const manifest = await packageCloudflarePagesArtifact({\n fromDir: resolve(parsed.from ?? \".mreact\"),\n outDir: resolve(parsed.out ?? \".mreact/pages\"),\n });\n console.log(\n `Packaged Cloudflare Pages artifact with ${manifest.files.length} files (${manifest.totalBytes} bytes).`,\n );\n } else {\n throw new Error(\n `Unsupported package target ${JSON.stringify(routeArg)}. Expected \"aws-lambda\" or \"cloudflare-pages\".`,\n );\n }\n } else if (command === \"dev\") {\n const loaded =\n routeArg === undefined\n ? await loadMreactRouterViteConfigDetails({ command: \"serve\", cwd: process.cwd() })\n : {\n project: { appDir: resolve(routeArg) },\n serverPort: undefined,\n viteConfig: undefined,\n };\n const server = await startDevServer({\n ...loaded.project,\n logger,\n port: resolveCliDevPort(parsed.port, process.env, loaded.serverPort),\n viteConfig: loaded.viteConfig,\n });\n console.log(`mreact app router ready at ${server.url}`);\n } else if (command === \"start\") {\n const server = await startServer({\n allowedHosts: resolveCliAllowedHosts(parsed.allowedHosts, process.env),\n hostPolicy: resolveCliHostPolicy(parsed.hostPolicy, process.env),\n hostname: resolveCliHost(parsed.host, process.env),\n logger,\n outDir: resolve(routeArg ?? \".mreact\"),\n port: Number(process.env.PORT ?? 3001),\n });\n console.log(`mreact app router serving built output at ${server.url}`);\n } else {\n console.error(`Unknown command: ${command}`);\n process.exitCode = 1;\n }\n }\n } catch (error) {\n console.error(error instanceof Error ? error.message : String(error));\n process.exitCode = 1;\n }\n}\n\nasync function readRouterCliVersion(): Promise<string> {\n try {\n const source = await readFile(new URL(\"../package.json\", import.meta.url), \"utf8\");\n const json = JSON.parse(source) as { version?: unknown };\n\n return typeof json.version === \"string\" ? json.version : \"unknown\";\n } catch {\n return \"unknown\";\n }\n}\n\nfunction formatCliBuildTarget(target: CliBuildTarget | undefined): string {\n return target ?? \"default\";\n}\n\nfunction updateBuildProgressLog(\n event: BuildAppProgressEvent,\n activePhase: BuildAppPhase | undefined,\n): BuildAppPhase | undefined {\n if (event.kind === \"routes-discovered\") {\n console.log(`Routes: ${event.count} discovered`);\n return activePhase;\n }\n\n if (event.kind !== \"phase-start\") {\n return activePhase;\n }\n\n const message = buildPhaseProgressMessage(event.phase);\n if (message !== undefined) {\n console.log(message);\n }\n\n return event.phase;\n}\n\nfunction buildPhaseProgressMessage(phase: BuildAppPhase): string | undefined {\n switch (phase) {\n case \"scan\":\n return \"Routes: discovering...\";\n case \"serverModules\":\n return \"Server: building...\";\n case \"clientBundles\":\n return \"Client: building...\";\n case \"writeManifests\":\n return \"Artifacts: writing...\";\n default:\n return undefined;\n }\n}\n\nfunction formatBuildPhaseFailureLabel(phase: BuildAppPhase): string {\n switch (phase) {\n case \"scan\":\n return \"route discovery\";\n case \"collectFiles\":\n return \"source file collection\";\n case \"analyzeSources\":\n return \"source analysis\";\n case \"validate\":\n return \"production route validation\";\n case \"prepareOutput\":\n return \"output preparation\";\n case \"publicAssets\":\n return \"public asset collection\";\n case \"serverActionManifest\":\n return \"server action manifest generation\";\n case \"serverModules\":\n return \"server output build\";\n case \"importPolicy\":\n return \"import policy generation\";\n case \"serverModuleArtifacts\":\n return \"server artifact writing\";\n case \"clientBundles\":\n return \"client output build\";\n case \"navigationRuntime\":\n return \"navigation runtime build\";\n case \"prerender\":\n return \"static prerender\";\n case \"cloudflare\":\n return \"Cloudflare artifact generation\";\n case \"writeManifests\":\n return \"manifest writing\";\n case \"adapterArtifacts\":\n return \"adapter artifact writing\";\n }\n}\n\nfunction formatDurationSeconds(ms: number): string {\n const seconds = ms / 1000;\n\n if (seconds < 10) {\n return `${Math.round(seconds * 10) / 10}s`;\n }\n\n return `${Math.round(seconds)}s`;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const getSession: typeof getSessionInternal;
|
|
|
38
38
|
* @deprecated Import session helpers from `@reckona/mreact-auth` instead.
|
|
39
39
|
*/
|
|
40
40
|
export declare const rotateSession: typeof rotateSessionInternal;
|
|
41
|
-
export type { AwsLambdaArtifactManifest, BuildAppPhase, BuildAppPhaseTiming, BuildAppOptions, BuildAppResult, BuiltImportPolicyArtifact, CloudflarePagesArtifactManifest, PackageAwsLambdaArtifactOptions, PackageCloudflarePagesArtifactOptions, } from "./build.js";
|
|
41
|
+
export type { AwsLambdaArtifactManifest, BuildAppPhase, BuildAppPhaseTiming, BuildAppOptions, BuildAppProgressEvent, BuildAppResult, BuiltImportPolicyArtifact, CloudflarePagesArtifactManifest, PackageAwsLambdaArtifactOptions, PackageCloudflarePagesArtifactOptions, } from "./build.js";
|
|
42
42
|
export type { ServerActionContext } from "./actions.js";
|
|
43
43
|
export type { AppRouteHref, DynamicHrefOptions, RouteParamsFor, RouteSearchParams, RouteSearchValue, StaticHrefOptions, } from "./typed-routes.js";
|
|
44
44
|
export type { InferLoaderData, LayoutProps, LoaderContext, GenerateMetadataContext, ManifestContext, ManifestDescriptor, MetadataImage, MetadataScalar, MetadataThemeColor, MetadataViewport, MReactNode, PageProps, RobotsContext, RobotsManifest, RobotsRule, RouteHeadDescriptor, RouteHandlerContext, RouteMetadata, RouteParams, RouteSecurityHeaders, RouteStrictTransportSecurity, SitemapContext, SitemapEntry, } from "./types.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,IAA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,kBAAkB,EAChC,aAAa,IAAI,qBAAqB,GACvC,MAAM,cAAc,CAAC;AAQtB;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,gCAAgC,CAAC;AACzE;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,qBAAqB,CAAC;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAC7C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAmGnD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAkBnB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAM/C,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAiBpB,OAAO,EAAE,8BAA8B,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASxF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { buildApp, packageAwsLambdaArtifact, packageCloudflarePagesArtifact } from \"./build.js\";\nexport { assetHref, assetPreloadLinks } from \"./assets.js\";\nexport { cacheControl, createMemoryRouteCache, revalidatePath } from \"./cache.js\";\nexport { deleteCookie, parseCookieHeader, serializeCookie, setCookie } from \"./cookies.js\";\nexport { defineMessages, detectLocale } from \"./i18n.js\";\nexport { defer, isDeferredLoaderData } from \"./deferred.js\";\nexport type { DeferredLoaderData } from \"./deferred.js\";\nexport { Link, linkProps } from \"./link.js\";\nexport { href } from \"./typed-routes.js\";\nexport { parseMultipartStream } from \"./multipart.js\";\nexport type {\n MultipartFixedLengthStream,\n MultipartStreamFieldOptions,\n MultipartStreamParseOptions,\n MultipartStreamPart,\n} from \"./multipart.js\";\nexport { getNavigationState, subscribeNavigationState } from \"./navigation-state.js\";\nexport { getRouterRuntimeCacheStats } from \"./runtime-cache.js\";\nexport type { HttpUpgradeHandler } from \"./upgrade.js\";\nexport {\n cookies,\n headers,\n html,\n isNotFoundError,\n isRedirectError,\n json,\n next,\n notFound,\n parseForm,\n redirect,\n redirect303,\n redirectExternal,\n rewrite,\n textError,\n} from \"./navigation.js\";\nexport type { ParseSchema } from \"./navigation.js\";\nexport { createMemoryPrerenderStore } from \"./prerender-store.js\";\nexport { getServerRuntimeState } from \"./runtime-state.js\";\nimport {\n createMemorySessionStore as createMemorySessionStoreInternal,\n createSession as createSessionInternal,\n destroySession as destroySessionInternal,\n getSession as getSessionInternal,\n rotateSession as rotateSessionInternal,\n} from \"./session.js\";\nimport type {\n MemorySessionStoreOptions as MemorySessionStoreOptionsInternal,\n SessionCookieOptions as SessionCookieOptionsInternal,\n SessionRecord as SessionRecordInternal,\n SessionStore as SessionStoreInternal,\n} from \"./session.js\";\n\n/**\n * @deprecated Import session helpers from `@reckona/mreact-auth` instead.\n */\nexport const createMemorySessionStore = createMemorySessionStoreInternal;\n/**\n * @deprecated Import session helpers from `@reckona/mreact-auth` instead.\n */\nexport const createSession = createSessionInternal;\n/**\n * @deprecated Import session helpers from `@reckona/mreact-auth` instead.\n */\nexport const destroySession = destroySessionInternal;\n/**\n * @deprecated Import session helpers from `@reckona/mreact-auth` instead.\n */\nexport const getSession = getSessionInternal;\n/**\n * @deprecated Import session helpers from `@reckona/mreact-auth` instead.\n */\nexport const rotateSession = rotateSessionInternal;\nexport type {\n AwsLambdaArtifactManifest,\n BuildAppPhase,\n BuildAppPhaseTiming,\n BuildAppOptions,\n BuildAppProgressEvent,\n BuildAppResult,\n BuiltImportPolicyArtifact,\n CloudflarePagesArtifactManifest,\n PackageAwsLambdaArtifactOptions,\n PackageCloudflarePagesArtifactOptions,\n} from \"./build.js\";\nexport type { ServerActionContext } from \"./actions.js\";\nexport type {\n AppRouteHref,\n DynamicHrefOptions,\n RouteParamsFor,\n RouteSearchParams,\n RouteSearchValue,\n StaticHrefOptions,\n} from \"./typed-routes.js\";\nexport type {\n InferLoaderData,\n LayoutProps,\n LoaderContext,\n GenerateMetadataContext,\n ManifestContext,\n ManifestDescriptor,\n MetadataImage,\n MetadataScalar,\n MetadataThemeColor,\n MetadataViewport,\n MReactNode,\n PageProps,\n RobotsContext,\n RobotsManifest,\n RobotsRule,\n RouteHeadDescriptor,\n RouteHandlerContext,\n RouteMetadata,\n RouteParams,\n RouteSecurityHeaders,\n RouteStrictTransportSecurity,\n SitemapContext,\n SitemapEntry,\n} from \"./types.js\";\nexport type {\n AppRouterBuildTarget,\n AppRouterClientConsoleMethod,\n AppRouterClientSourceMapMode,\n AppRouterClientSourceMapOption,\n AppRouterProductionOptions,\n} from \"./config.js\";\nexport type {\n AssetHelperOptions,\n AssetLinkDescriptor,\n AssetManifest,\n AssetManifestEntry,\n} from \"./assets.js\";\nexport type {\n AppRouterCache,\n AppRouterCacheEntry,\n CacheControlOptions,\n MemoryRouteCacheOptions,\n RouteCachePolicy,\n} from \"./cache.js\";\nexport type { CookieOptions } from \"./cookies.js\";\nexport type { AppRouterImportPolicy } from \"./import-policy.js\";\nexport type {\n LinkChild,\n LinkOptions,\n LinkPrefetch,\n LinkProps,\n LinkScroll,\n LinkTransition,\n TrustedLinkHtml,\n} from \"./link.js\";\nexport type {\n AppRouterNavigationState,\n AppRouterNavigationStateListener,\n AppRouterNavigationType,\n} from \"./navigation-state.js\";\nexport type { RouterRuntimeCacheStat } from \"./runtime-cache.js\";\nexport type { MemorySessionStoreOptionsInternal as MemorySessionStoreOptions };\nexport type {\n AppRouterCspInlineNonceWarningLogEvent,\n AppRouterLogError,\n AppRouterLogEvent,\n AppRouterLogger,\n AppRouterLogLevel,\n AppRouterRuntime,\n AppRouterRequestEndLogEvent,\n AppRouterRequestErrorLogEvent,\n AppRouterRenderTimingLogEvent,\n AppRouterRequestStartLogEvent,\n AppRouterRequestTimingLogEvent,\n} from \"./logger.js\";\nexport type { DetectedLocale, LocaleRoutingOptions, MessageTree } from \"./i18n.js\";\nexport {\n createFormCsrfToken,\n formCsrfCookie,\n formCsrfFieldName,\n validateFormCsrf,\n} from \"./csrf.js\";\nexport type {\n AppRouterAllowedServerAction,\n AppRouterServerActionOptions,\n PreparedFormActionReference,\n} from \"./actions.js\";\n/**\n * @deprecated Import session helpers and types from `@reckona/mreact-auth` instead.\n */\nexport type SessionCookieOptions = SessionCookieOptionsInternal;\n/**\n * @deprecated Import session helpers and types from `@reckona/mreact-auth` instead.\n */\nexport type SessionRecord<TData = unknown> = SessionRecordInternal<TData>;\n/**\n * @deprecated Import session helpers and types from `@reckona/mreact-auth` instead.\n */\nexport type SessionStore<TData = unknown> = SessionStoreInternal<TData>;\nexport { startDevServer } from \"./dev-server.js\";\nexport type { StartDevServerOptions } from \"./dev-server.js\";\nexport { renderAppRequest } from \"./render.js\";\nexport type {\n AppRouterResponseHook,\n AppRouterResponseHookContext,\n RenderAppRequestOptions,\n} from \"./render.js\";\nexport {\n parseTraceContext,\n traceContextFromRequest,\n} from \"./trace.js\";\nexport type {\n RouterInstrumentation,\n RouterMiddlewareEndInstrumentationEvent,\n RouterMiddlewareInstrumentationEvent,\n RouterRequestEndInstrumentationEvent,\n RouterRequestInstrumentationEvent,\n RouterRouteEndInstrumentationEvent,\n RouterRouteInstrumentationEvent,\n RouterTraceContext,\n} from \"./trace.js\";\nexport type {\n FileSystemPrerenderStoreOptions,\n KeyValuePrerenderStoreAdapter,\n KeyValuePrerenderStoreOptions,\n MemoryPrerenderStoreOptions,\n} from \"./prerender-store.js\";\nexport { createFileSystemPrerenderStore, createKeyValuePrerenderStore } from \"./prerender-store.js\";\nexport { preloadBuiltAppRuntime, renderBuiltAppRequest, startServer } from \"./serve.js\";\nexport type {\n BuiltAppRuntimePreloadMode,\n AppRouterPrerenderStore,\n BuiltAppRuntimePreloadStrategy,\n RenderBuiltAppRequestOptions,\n RequestHostPolicy,\n StartServerOptions,\n} from \"./serve.js\";\nexport { matchRoute, scanAppRoutes } from \"./routes.js\";\nexport type { AppFileConvention } from \"./file-conventions.js\";\nexport type {\n AppAssetRoute,\n AppMetadataRoute,\n AppRoute,\n MatchedRoute,\n PageRoute,\n RouteSegment,\n ServerRoute,\n} from \"./routes.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reckona/mreact-router",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.147",
|
|
4
4
|
"description": "File-system app router, SSR, actions, and deployment adapters for mreact.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jsx",
|
|
@@ -105,20 +105,20 @@
|
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"typescript": "^6.0.3",
|
|
108
|
-
"@reckona/mreact": "0.0.
|
|
109
|
-
"@reckona/mreact-
|
|
110
|
-
"@reckona/mreact-
|
|
111
|
-
"@reckona/mreact-query": "0.0.
|
|
112
|
-
"@reckona/mreact-reactive-core": "0.0.
|
|
113
|
-
"@reckona/mreact-
|
|
114
|
-
"@reckona/mreact-
|
|
115
|
-
"@reckona/mreact-
|
|
116
|
-
"@reckona/mreact-
|
|
108
|
+
"@reckona/mreact": "0.0.147",
|
|
109
|
+
"@reckona/mreact-compat": "0.0.147",
|
|
110
|
+
"@reckona/mreact-compiler": "0.0.147",
|
|
111
|
+
"@reckona/mreact-query": "0.0.147",
|
|
112
|
+
"@reckona/mreact-reactive-core": "0.0.147",
|
|
113
|
+
"@reckona/mreact-devtools": "0.0.147",
|
|
114
|
+
"@reckona/mreact-server": "0.0.147",
|
|
115
|
+
"@reckona/mreact-shared": "0.0.147",
|
|
116
|
+
"@reckona/mreact-reactive-dom": "0.0.147"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"vite": ">=8 <9"
|
|
120
120
|
},
|
|
121
121
|
"optionalDependencies": {
|
|
122
|
-
"@reckona/mreact-router-native": "0.0.
|
|
122
|
+
"@reckona/mreact-router-native": "0.0.147"
|
|
123
123
|
}
|
|
124
124
|
}
|