@webjsdev/core 0.7.53 → 0.7.54

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/index.d.ts CHANGED
@@ -54,6 +54,12 @@ export type {
54
54
  WebjsCspConfig,
55
55
  WebjsDoctorConfig,
56
56
  WebjsDoctorSeverity,
57
+ WebjsCiConfig,
58
+ WebjsCiStep,
59
+ WebjsCiNestedStep,
60
+ WebjsCiCommand,
61
+ WebjsCiGroup,
62
+ WebjsCiNestedGroup,
57
63
  } from './src/webjs-config.d.ts';
58
64
 
59
65
  // Compile-time serializability typing for server actions (#488): the opt-in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webjsdev/core",
3
- "version": "0.7.53",
3
+ "version": "0.7.54",
4
4
  "type": "module",
5
5
  "description": "The runtime for WebJs, a full-stack JavaScript framework built on web components with server-side rendering and no build step. Ships the html and css template tags, the WebComponent base class, signals, directives, and the isomorphic renderers.",
6
6
  "types": "./index.d.ts",
@@ -144,6 +144,46 @@ export interface WebjsStartTasks {
144
144
  before?: string[];
145
145
  }
146
146
 
147
+ /** One command step of `webjs ci` (#1471). */
148
+ export interface WebjsCiCommand {
149
+ /** Shown in the step heading and its result line. */
150
+ title: string;
151
+ /** The shell command, run with `node_modules/.bin` on PATH and `CI=true` in the environment. */
152
+ run: string;
153
+ /** Extra environment for this step only, e.g. `{ WEBJS_E2E: '1' }`. */
154
+ env?: Record<string, string>;
155
+ }
156
+
157
+ /** A step inside a group: a nested group takes ONE slot of its parent and runs sequentially, so it cannot declare `parallel`. */
158
+ export interface WebjsCiNestedGroup {
159
+ /** The group name. */
160
+ title: string;
161
+ /** The group's steps, run in order. */
162
+ steps: WebjsCiNestedStep[];
163
+ }
164
+
165
+ /** A top-level group of `webjs ci` steps. */
166
+ export interface WebjsCiGroup extends WebjsCiNestedGroup {
167
+ /** How many steps run at once (default 1, sequential). Captured output is replayed whole per step, never interleaved. */
168
+ parallel?: number;
169
+ }
170
+
171
+ /** A top-level `webjs ci` step: a string is shorthand for a command whose title is the command. */
172
+ export type WebjsCiStep = string | WebjsCiCommand | WebjsCiGroup;
173
+
174
+ /** A step inside a group: the same shapes, minus `parallel` on a nested group. */
175
+ export type WebjsCiNestedStep = string | WebjsCiCommand | WebjsCiNestedGroup;
176
+
177
+ /**
178
+ * Local CI in `webjs.ci` (#1471): the step list `webjs ci` runs, and the same
179
+ * list a cloud pipeline runs through `npm run ci`. Read by the CLI
180
+ * (`packages/cli/lib/ci-config.js`), not the server.
181
+ */
182
+ export interface WebjsCiConfig {
183
+ /** The steps, run in order. A failing step fails the run. Required: a block with no steps is refused, since a run of zero steps would read as green. */
184
+ steps: WebjsCiStep[];
185
+ }
186
+
147
187
  /**
148
188
  * A severity a `webjs.doctor.gate` entry may declare, mirroring ESLint's
149
189
  * three-level scale. `error` fails the `webjs doctor` exit, `warn` reports
@@ -227,6 +267,24 @@ export interface WebjsConfig {
227
267
  dev?: WebjsDevTasks;
228
268
  start?: WebjsStartTasks;
229
269
 
270
+ /**
271
+ * The `webjs db` verb map (#1468), bring-your-own-ORM. Each key is a verb
272
+ * and its value the shell command `webjs db <verb>` runs instead of the
273
+ * drizzle-kit default (node_modules/.bin on PATH, extra args appended), so
274
+ * `webjs db migrate` keeps one spelling across ORMs:
275
+ * `{ migrate: 'prisma migrate deploy' }`. Any key is a verb; an unmapped one
276
+ * keeps its default, so an app with no block is unchanged. Read by the CLI
277
+ * (`packages/cli/lib/app-tasks.js`), NOT the server.
278
+ */
279
+ db?: Record<string, string>;
280
+
281
+ /**
282
+ * Local CI (#1471): the step list `webjs ci` runs locally and a cloud
283
+ * pipeline runs through `npm run ci`, so the two cannot drift. Read by the
284
+ * CLI (`packages/cli/lib/ci-config.js`), NOT the server.
285
+ */
286
+ ci?: WebjsCiConfig;
287
+
230
288
  /**
231
289
  * `webjs doctor` policy (#1257): which project-health checks the project
232
290
  * treats as fatal. Read by the CLI (`packages/cli/lib/doctor.js`), NOT the