@apifuse/provider-sdk 2.2.0-beta.64 → 2.2.0-beta.65

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.
@@ -3,8 +3,12 @@
3
3
  * through the SDK context (`ctx.http`, `ctx.stealth`, `ctx.env`,
4
4
  * `ctx.credential`, `ctx.browser`), not through ambient Node/Bun globals.
5
5
  *
6
- * Three rules, all reported at `warn` level in this first release so the
7
- * fleet can migrate before the level is raised:
6
+ * Three rules, reported at `error` level: a finding fails `apifuse check` and
7
+ * `apifuse submit-check` (official and standalone mode alike). The first
8
+ * release reported them at `warn` as a migration window; the window closed once
9
+ * the fleet's request-path hits were fixed or acknowledged. A deliberate
10
+ * exception is acknowledged in code (see below), never through a hidden
11
+ * allowlist.
8
12
  *
9
13
  * - `process-env-direct-read`: `process.env.X`, `process.env["X"]`, a bare
10
14
  * `process.env` object use, and the `Bun.env` equivalents. Runtime bootstrap
@@ -82,7 +86,7 @@ export function isBootstrapEnvName(name: string): boolean {
82
86
  const BOOTSTRAP_ENTRYPOINT_FILE_PATTERN = /^(?:dev|start|deploy)\.[cm]?[jt]sx?$/;
83
87
  /** Operator tooling directories at the provider root (fixture recorders, smoke scripts). */
84
88
  const TOOLING_DIRECTORY_PATTERN = /^(?:scripts|tools|bin)\//;
85
- const TEST_SOURCE_FILE_PATTERN =
89
+ export const TEST_SOURCE_FILE_PATTERN =
86
90
  /(?:^|\/)(?:__tests__|__mocks__|tests)\/|\.(?:test|spec)\.[cm]?[jt]sx?$/;
87
91
  const RECORDED_FIXTURE_SOURCE_FILE_PATTERN =
88
92
  /(?:^|\/)__fixtures__(?:\/|$)|(?:^|\/)__tests__\/fixtures(?:\/|$)/;
@@ -595,7 +599,7 @@ export type RuntimeBoundaryLintInput = {
595
599
  };
596
600
 
597
601
  /**
598
- * Lint the provider runtime boundary. Returns warn-level diagnostics (one per
602
+ * Lint the provider runtime boundary. Returns error-level diagnostics (one per
599
603
  * file and rule, listing every line) and information entries for findings
600
604
  * acknowledged with `@apifuse-allow`.
601
605
  */
@@ -644,7 +648,7 @@ export function lintRuntimeBoundary(
644
648
  if (findings.length > 0) {
645
649
  diagnostics.push({
646
650
  rule,
647
- level: "warn",
651
+ level: "error",
648
652
  field,
649
653
  message: `${describeSubjects(findings)}: ${remediation(rule)}`,
650
654
  });