create-rsc-kit 0.30.32 → 0.30.34
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/dist/templates.js +9 -3
- package/package.json +1 -1
package/dist/templates.js
CHANGED
|
@@ -117,9 +117,14 @@ export function scripts(o) {
|
|
|
117
117
|
// Into dist/, which is already ignored. Named after the project it
|
|
118
118
|
// landed a 63MB binary in the root of, next to the source, with
|
|
119
119
|
// nothing in .gitignore covering it.
|
|
120
|
+
//
|
|
121
|
+
// compile:binary compiles the output already there, and is what the
|
|
122
|
+
// build marker names: a deploy has just run build, and compile would
|
|
123
|
+
// run it again. compile is the one command for a person.
|
|
120
124
|
...(o.host === 'bun'
|
|
121
125
|
? {
|
|
122
|
-
compile: `${vite} build && bun
|
|
126
|
+
compile: `${vite} build && bun run compile:binary`,
|
|
127
|
+
'compile:binary': 'bun build --compile --splitting .output/server/compile.mjs --outfile dist/app',
|
|
123
128
|
}
|
|
124
129
|
: {}),
|
|
125
130
|
}),
|
|
@@ -797,8 +802,9 @@ A release step or a worker is a file in \`${o.sourceDir}/commands\` with a defau
|
|
|
797
802
|
export — \`export default async (args: string[]) => 0\` — run as \`./app migrate\`
|
|
798
803
|
from the compiled binary or \`node .output/server/commands.mjs migrate\` from a
|
|
799
804
|
plain build. It shares the app's code, so there is no second entry point or
|
|
800
|
-
binary to write. The return value is the exit code, and \`
|
|
801
|
-
|
|
805
|
+
binary to write. The return value is the exit code, and \`instrumentation.ts\` is
|
|
806
|
+
imported, and its \`register()\` run, for a command only if it exports
|
|
807
|
+
\`register = true\`: any other validates the environment it imports itself. A worker's second argument is
|
|
802
808
|
\`{ signal, deadline }\` (\`CommandContext\`, from \`@rsc-kit/core/commands\`): loop on
|
|
803
809
|
\`signal.aborted\`, and read \`context.deadline\` when needed, never destructure it.
|
|
804
810
|
Keep \`--splitting\` in the \`compile\` script: it is what lets a worker hold a stop that arrives while Bun parses the binary. Never run a command as
|