@webjsdev/core 0.7.20 → 0.7.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 -2
- package/dist/webjs-core-browser.js +3 -3
- package/dist/webjs-core-browser.js.map +2 -2
- package/dist/webjs-core-testing.js +15 -15
- package/dist/webjs-core-testing.js.map +2 -2
- package/dist/webjs-core.js +4 -4
- package/dist/webjs-core.js.map +2 -2
- package/index-browser.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/component.d.ts +71 -13
- package/src/component.js +92 -3
- package/src/render-server.js +12 -4
- package/src/router-client.js +121 -22
- package/src/serialize.js +16 -2
- package/src/task.js +1 -3
- package/src/webjs-config.d.ts +34 -0
package/src/webjs-config.d.ts
CHANGED
|
@@ -80,6 +80,32 @@ export interface WebjsRedirectRule {
|
|
|
80
80
|
/** The trailing-slash canonicalization policy in `webjs.trailingSlash`. */
|
|
81
81
|
export type WebjsTrailingSlash = 'never' | 'always' | 'ignore';
|
|
82
82
|
|
|
83
|
+
/** Dev task orchestration in `webjs.dev` (#550). Read by the CLI, not the server. */
|
|
84
|
+
export interface WebjsDevTasks {
|
|
85
|
+
/**
|
|
86
|
+
* One-shot commands run sequentially to completion BEFORE the dev server
|
|
87
|
+
* boots (the old `predev` hook: `webjs db migrate`, a registry copy). A
|
|
88
|
+
* non-zero exit aborts the boot.
|
|
89
|
+
*/
|
|
90
|
+
before?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* Long-lived commands run as child processes ALONGSIDE the dev server (the
|
|
93
|
+
* old `concurrently` watchers: the Tailwind CLI `--watch`). Spawned once in
|
|
94
|
+
* the parent and torn down on exit, so a watcher cannot leak past the server.
|
|
95
|
+
*/
|
|
96
|
+
parallel?: string[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Start task orchestration in `webjs.start` (#550). Read by the CLI, not the server. */
|
|
100
|
+
export interface WebjsStartTasks {
|
|
101
|
+
/**
|
|
102
|
+
* One-shot commands run sequentially to completion BEFORE the prod server
|
|
103
|
+
* boots (the old `prestart` hook: `webjs db migrate`). A non-zero exit
|
|
104
|
+
* aborts the boot.
|
|
105
|
+
*/
|
|
106
|
+
before?: string[];
|
|
107
|
+
}
|
|
108
|
+
|
|
83
109
|
/** The object form of `webjs.csp` (the non-boolean shape). */
|
|
84
110
|
export interface WebjsCspConfig {
|
|
85
111
|
/**
|
|
@@ -118,6 +144,14 @@ export interface WebjsConfig {
|
|
|
118
144
|
*/
|
|
119
145
|
seed?: boolean;
|
|
120
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Dev/start task orchestration (#550). `webjs dev` / `webjs start` run these
|
|
149
|
+
* so a bare CLI invocation matches `npm run dev` / `start`. Read by the CLI
|
|
150
|
+
* (`packages/cli/lib/app-tasks.js`), NOT the server readers.
|
|
151
|
+
*/
|
|
152
|
+
dev?: WebjsDevTasks;
|
|
153
|
+
start?: WebjsStartTasks;
|
|
154
|
+
|
|
121
155
|
/** Per-path response-header rules, shaped like Next's. */
|
|
122
156
|
headers?: WebjsHeaderRule[];
|
|
123
157
|
|