@reckona/create-mreact-app 0.0.20 → 0.0.22
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 +1 -1
- package/dist/index.js +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ for API Gateway HTTP API v2 and Lambda Function URL payload format 2.0.
|
|
|
54
54
|
|
|
55
55
|
For AWS Lambda production apps, add packages imported by loaders, middleware, route handlers, metadata, server actions, or their app-local helper modules to `importPolicy.allowedPackages` in the generated `src/lambda.ts`.
|
|
56
56
|
|
|
57
|
-
Package Lambda deployments from a minimal asset directory, not the full project root. The generated `docs/deploy/aws-lambda.md` shows a `prepare-lambda-asset.sh` example that copies `.mreact/`, the bundled handler, manifests, lockfiles, and production `node_modules` into `.lambda/` so CDK/SAM/serverless assets stay below AWS's 250 MB unzipped deployment package limit. Generated Lambda projects build with `mreact-router build --target=node`, keeping Cloudflare Workers route modules out of Node-only artifacts and storing compiled server route artifacts in `.mreact/server/server-modules/*.json` instead of one large server manifest. The Lambda adapter treats `outDir` as read-only and materializes runtime files under `/tmp` by default, so `.mreact/` can stay inside the deployed package; generated Lambda handlers use top-level `await createPreloadedAwsLambdaRequestHandler()` so built runtime modules, middleware, route modules, layouts, and route metadata are imported during Lambda initialization rather than on the first request. Static middleware matchers
|
|
57
|
+
Package Lambda deployments from a minimal asset directory, not the full project root. The generated `docs/deploy/aws-lambda.md` shows a `prepare-lambda-asset.sh` example that copies `.mreact/`, the bundled handler, manifests, lockfiles, and production `node_modules` into `.lambda/` so CDK/SAM/serverless assets stay below AWS's 250 MB unzipped deployment package limit. Generated Lambda projects build with `mreact-router build --target=node`, keeping Cloudflare Workers route modules out of Node-only artifacts and storing compiled server route artifacts in `.mreact/server/server-modules/*.json` instead of one large server manifest. The Lambda adapter treats `outDir` as read-only and materializes runtime files under `/tmp` by default, so `.mreact/` can stay inside the deployed package; generated Lambda handlers use top-level `await createPreloadedAwsLambdaRequestHandler()` so built runtime modules, middleware, route modules, layouts, and route metadata are imported during Lambda initialization rather than on the first request. Static middleware matchers, loader redirects, request artifacts without page render exports, and split loader/metadata artifacts avoid unnecessary dependency evaluation on unmatched health checks and simple redirects. For pnpm projects, the generated script uses `--config.node-linker=hoisted` and includes symlink and actual-file-byte checks because pnpm's default isolated linker can create Lambda artifacts that package larger than `du` suggests.
|
|
58
58
|
|
|
59
59
|
Use `--src-dir` to generate a larger-app layout:
|
|
60
60
|
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { mkdir, readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
2
|
import { basename, dirname, join } from "node:path";
|
|
3
3
|
const internalPackageVersions = {
|
|
4
|
-
"@reckona/mreact-auth": "^0.0.
|
|
5
|
-
"@reckona/mreact-devtools": "^0.0.
|
|
6
|
-
"@reckona/mreact-forms": "^0.0.
|
|
7
|
-
"@reckona/mreact": "^0.0.
|
|
8
|
-
"@reckona/mreact-query": "^0.0.
|
|
9
|
-
"@reckona/mreact-reactive-core": "^0.0.
|
|
10
|
-
"@reckona/mreact-router": "^0.0.
|
|
4
|
+
"@reckona/mreact-auth": "^0.0.22",
|
|
5
|
+
"@reckona/mreact-devtools": "^0.0.22",
|
|
6
|
+
"@reckona/mreact-forms": "^0.0.22",
|
|
7
|
+
"@reckona/mreact": "^0.0.22",
|
|
8
|
+
"@reckona/mreact-query": "^0.0.22",
|
|
9
|
+
"@reckona/mreact-reactive-core": "^0.0.22",
|
|
10
|
+
"@reckona/mreact-router": "^0.0.22",
|
|
11
11
|
};
|
|
12
12
|
const currentMreactVersion = internalPackageVersions["@reckona/mreact"].replace(/^\^/, "");
|
|
13
13
|
const typescriptVersion = "^6.0.3";
|
|
@@ -962,7 +962,7 @@ export const handler = await createPreloadedAwsLambdaRequestHandler({
|
|
|
962
962
|
});
|
|
963
963
|
\`\`\`
|
|
964
964
|
|
|
965
|
-
The generated handler uses top-level \`await\` with \`createPreloadedAwsLambdaRequestHandler()\` so the built runtime, middleware, route modules, layouts, and metadata are imported during the Lambda initialization phase instead of racing the first user request. Add \`timings: true\` while diagnosing production latency to emit \`router:request:timing\` and \`router:render:timing\` debug events for request conversion, render phases, loader wait, page render, layout render, response construction, and Lambda response conversion. Loader timing splits module load/evaluation from user loader execution with \`loaderModuleLoadMs\` and \`loaderExecutionMs\`; middleware timing similarly splits \`middlewareModuleLoadMs\` and \`middlewareExecutionMs\`.
|
|
965
|
+
The generated handler uses top-level \`await\` with \`createPreloadedAwsLambdaRequestHandler()\` so the built runtime, middleware, route modules, layouts, and metadata are imported during the Lambda initialization phase instead of racing the first user request. Static middleware matchers, loader redirects, request artifacts without page render exports, and split loader/metadata artifacts avoid unnecessary dependency evaluation on unmatched health checks and simple redirects. Add \`timings: true\` while diagnosing production latency to emit \`router:request:timing\` and \`router:render:timing\` debug events for request conversion, render phases, loader wait, source analysis, page render, layout render, response construction, and Lambda response conversion. Loader timing splits module load/evaluation from user loader execution with \`loaderModuleLoadMs\` and \`loaderExecutionMs\`; source analysis reports \`sourceAnalysisArtifactMs\` when a built analysis summary is reused; middleware timing similarly splits \`middlewareModuleLoadMs\` and \`middlewareExecutionMs\`.
|
|
966
966
|
|
|
967
967
|
## Streaming SSR
|
|
968
968
|
|