@webjsdev/core 0.7.54 → 0.7.56
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 +2 -0
- package/package.json +1 -1
- package/src/webjs-config.d.ts +42 -0
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webjsdev/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.56",
|
|
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",
|
package/src/webjs-config.d.ts
CHANGED
|
@@ -132,6 +132,20 @@ export interface WebjsDevTasks {
|
|
|
132
132
|
* appDir) entries are skipped. Read by the server (`readDevWatchPathsFromApp`).
|
|
133
133
|
*/
|
|
134
134
|
watch?: string[];
|
|
135
|
+
/**
|
|
136
|
+
* Dev embed bridge (#1498, #1504), DEV-ONLY, off by default. Parent origins
|
|
137
|
+
* (`https://builder.example`) allowed to frame the dev server and exchange
|
|
138
|
+
* `webjs-embed` messages with it. A set `WEBJS_EMBED_ORIGINS` replaces this
|
|
139
|
+
* list. Ignored by `webjs start`.
|
|
140
|
+
*/
|
|
141
|
+
embedOrigins?: string[];
|
|
142
|
+
/**
|
|
143
|
+
* Dev source locations (#1499, #1504), DEV-ONLY, off by default. `true` stamps
|
|
144
|
+
* `data-webjs-src="<app-relative-file>:<line>"` on the element opening tags of
|
|
145
|
+
* the app's `html` templates. `WEBJS_SOURCE_LOCATIONS=1|0` overrides it for
|
|
146
|
+
* one run. Ignored by `webjs start`.
|
|
147
|
+
*/
|
|
148
|
+
sourceLocations?: boolean;
|
|
135
149
|
}
|
|
136
150
|
|
|
137
151
|
/** Start task orchestration in `webjs.start` (#550). Read by the CLI, not the server. */
|
|
@@ -212,6 +226,27 @@ export interface WebjsDoctorConfig {
|
|
|
212
226
|
gate?: Record<string, WebjsDoctorSeverity>;
|
|
213
227
|
}
|
|
214
228
|
|
|
229
|
+
/** One advisory `webjs audit` accepts (#1492): its id and why that is safe. */
|
|
230
|
+
export interface WebjsAuditIgnore {
|
|
231
|
+
/** The advisory id, `GHSA-xxxx-xxxx-xxxx` or `CVE-YYYY-NNNN`. */
|
|
232
|
+
id: string;
|
|
233
|
+
/** Why accepting it is safe: which chain reaches it, and why that chain cannot reach users. Required. */
|
|
234
|
+
reason: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* `webjs.audit` (#1492): the dependency audit's failing level and its
|
|
239
|
+
* allowlist, in one place. `webjs audit` runs `npm audit` or `bun audit` and
|
|
240
|
+
* fails on any advisory at or above `level` that `ignore` does not list. A
|
|
241
|
+
* malformed block exits 1, so an allowlist cannot silently stop applying.
|
|
242
|
+
*/
|
|
243
|
+
export interface WebjsAuditConfig {
|
|
244
|
+
/** The lowest severity that fails the audit. Default `'high'`. */
|
|
245
|
+
level?: 'low' | 'moderate' | 'high' | 'critical';
|
|
246
|
+
/** Advisories with no patched release that the app's users cannot reach. */
|
|
247
|
+
ignore?: WebjsAuditIgnore[];
|
|
248
|
+
}
|
|
249
|
+
|
|
215
250
|
/** The object form of `webjs.csp` (the non-boolean shape). */
|
|
216
251
|
export interface WebjsCspConfig {
|
|
217
252
|
/**
|
|
@@ -292,6 +327,13 @@ export interface WebjsConfig {
|
|
|
292
327
|
*/
|
|
293
328
|
doctor?: WebjsDoctorConfig;
|
|
294
329
|
|
|
330
|
+
/**
|
|
331
|
+
* `webjs audit` policy (#1492): the failing severity and the advisories the
|
|
332
|
+
* app accepts, each with a reason. Read by the CLI
|
|
333
|
+
* (`packages/cli/lib/audit.js`), NOT the server.
|
|
334
|
+
*/
|
|
335
|
+
audit?: WebjsAuditConfig;
|
|
336
|
+
|
|
295
337
|
/** Per-path response-header rules, shaped like Next's. */
|
|
296
338
|
headers?: WebjsHeaderRule[];
|
|
297
339
|
|