@webjsdev/core 0.7.54 → 0.7.55

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
@@ -53,6 +53,8 @@ export type {
53
53
  WebjsTrailingSlash,
54
54
  WebjsCspConfig,
55
55
  WebjsDoctorConfig,
56
+ WebjsAuditConfig,
57
+ WebjsAuditIgnore,
56
58
  WebjsDoctorSeverity,
57
59
  WebjsCiConfig,
58
60
  WebjsCiStep,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webjsdev/core",
3
- "version": "0.7.54",
3
+ "version": "0.7.55",
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",
@@ -212,6 +212,27 @@ export interface WebjsDoctorConfig {
212
212
  gate?: Record<string, WebjsDoctorSeverity>;
213
213
  }
214
214
 
215
+ /** One advisory `webjs audit` accepts (#1492): its id and why that is safe. */
216
+ export interface WebjsAuditIgnore {
217
+ /** The advisory id, `GHSA-xxxx-xxxx-xxxx` or `CVE-YYYY-NNNN`. */
218
+ id: string;
219
+ /** Why accepting it is safe: which chain reaches it, and why that chain cannot reach users. Required. */
220
+ reason: string;
221
+ }
222
+
223
+ /**
224
+ * `webjs.audit` (#1492): the dependency audit's failing level and its
225
+ * allowlist, in one place. `webjs audit` runs `npm audit` or `bun audit` and
226
+ * fails on any advisory at or above `level` that `ignore` does not list. A
227
+ * malformed block exits 1, so an allowlist cannot silently stop applying.
228
+ */
229
+ export interface WebjsAuditConfig {
230
+ /** The lowest severity that fails the audit. Default `'high'`. */
231
+ level?: 'low' | 'moderate' | 'high' | 'critical';
232
+ /** Advisories with no patched release that the app's users cannot reach. */
233
+ ignore?: WebjsAuditIgnore[];
234
+ }
235
+
215
236
  /** The object form of `webjs.csp` (the non-boolean shape). */
216
237
  export interface WebjsCspConfig {
217
238
  /**
@@ -292,6 +313,13 @@ export interface WebjsConfig {
292
313
  */
293
314
  doctor?: WebjsDoctorConfig;
294
315
 
316
+ /**
317
+ * `webjs audit` policy (#1492): the failing severity and the advisories the
318
+ * app accepts, each with a reason. Read by the CLI
319
+ * (`packages/cli/lib/audit.js`), NOT the server.
320
+ */
321
+ audit?: WebjsAuditConfig;
322
+
295
323
  /** Per-path response-header rules, shaped like Next's. */
296
324
  headers?: WebjsHeaderRule[];
297
325