@tschk/moonshine-adapter-conformance 0.3.7 → 0.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tschk/moonshine-adapter-conformance",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/index.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export { adapterConformance } from "./suite.js";
2
- export type { Harness, HarnessFactory } from "./suite.js";
2
+ // Re-exported for the suite's own consumers; the framework owns the shape so
3
+ // deploy adapters can name it without depending on the test suite.
4
+ export type { Harness, HarnessFactory } from "@tschk/moonshine-framework";
package/src/suite.ts CHANGED
@@ -12,6 +12,7 @@ import { resolve } from "node:path";
12
12
  import {
13
13
  MANIFEST_VERSION,
14
14
  type DeploymentAdapter,
15
+ type HarnessFactory,
15
16
  type MoonshineManifest,
16
17
  type RenderContext,
17
18
  type RouteArtifact,
@@ -24,16 +25,6 @@ import {
24
25
  } from "@tschk/moonshine-server";
25
26
  import { reactRenderer, type Renderer } from "@tschk/moonshine-react";
26
27
 
27
- export type Harness = {
28
- start(): Promise<URL>;
29
- stop(): Promise<void>;
30
- };
31
-
32
- export type HarnessFactory = (
33
- fetch: (request: Request) => Promise<Response>,
34
- options: { manifest: MoonshineManifest; staticDir: string },
35
- ) => Harness;
36
-
37
28
  const pageFile = resolve(import.meta.dir, "fixtures", "Page.tsx");
38
29
 
39
30
  function getRouteData(context: RenderContext): unknown {
@@ -65,7 +56,9 @@ const conformanceRenderer: Renderer = {
65
56
  clearTimeout(t);
66
57
  try {
67
58
  controller.error(new Error("aborted"));
68
- } catch {}
59
+ } catch (err) {
60
+ console.error("Error during stream abort:", err);
61
+ }
69
62
  });
70
63
  },
71
64
  });