@fairfox/polly 0.69.0 → 0.70.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/dist/src/client/index.js +17 -20
- package/dist/src/client/index.js.map +4 -4
- package/dist/src/mesh.js +62 -5
- package/dist/src/mesh.js.map +5 -4
- package/dist/src/peer.js +62 -5
- package/dist/src/peer.js.map +5 -4
- package/dist/src/polly-ui/markdown.js +3 -3
- package/dist/src/polly-ui/markdown.js.map +2 -2
- package/dist/src/shared/lib/mesh-diagnostics.d.ts +98 -0
- package/dist/src/shared/lib/mesh-network-adapter.d.ts +0 -4
- package/dist/tools/test/src/e2e-mesh/console-allowlist.d.ts +31 -0
- package/dist/tools/test/src/e2e-mesh/index.d.ts +27 -0
- package/dist/tools/test/src/e2e-mesh/index.js +1089 -0
- package/dist/tools/test/src/e2e-mesh/index.js.map +22 -0
- package/dist/tools/test/src/e2e-mesh/keys.d.ts +55 -0
- package/dist/tools/test/src/e2e-mesh/launch-peer.d.ts +70 -0
- package/dist/tools/test/src/e2e-mesh/mesh-assertions.d.ts +53 -0
- package/dist/tools/test/src/e2e-mesh/serve-consumer.d.ts +32 -0
- package/dist/tools/test/src/e2e-mesh/wait-for-convergence.d.ts +38 -0
- package/dist/tools/test/src/e2e-mesh/with-relay.d.ts +53 -0
- package/dist/tools/test/src/visual/index.js +24 -24
- package/dist/tools/test/src/visual/index.js.map +2 -2
- package/dist/tools/verify/src/cli.js +361 -22
- package/dist/tools/verify/src/cli.js.map +6 -6
- package/dist/tools/verify/src/config.d.ts +26 -1
- package/dist/tools/verify/src/config.js +9 -1
- package/dist/tools/verify/src/config.js.map +4 -4
- package/dist/tools/verify/src/primitives/index.d.ts +30 -0
- package/dist/tools/visualize/src/cli.js +43 -1
- package/dist/tools/visualize/src/cli.js.map +3 -3
- package/package.json +11 -8
- package/LICENSE +0 -21
- package/README.md +0 -362
|
@@ -139,9 +139,5 @@ export declare class MeshNetworkAdapter extends NetworkAdapter {
|
|
|
139
139
|
* and target ids and the crypto blob in the `data` field.
|
|
140
140
|
*/
|
|
141
141
|
private wrap;
|
|
142
|
-
/**
|
|
143
|
-
* Try to unwrap an incoming crypto-wrapped message. Returns the original
|
|
144
|
-
* Message on success, undefined on verification or decryption failure.
|
|
145
|
-
*/
|
|
146
142
|
private tryUnwrap;
|
|
147
143
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fairfox/polly/test/e2e-mesh — canonical console-noise allowlist.
|
|
3
|
+
*
|
|
4
|
+
* Mesh runs emit a small number of benign console lines (Repo lifecycle,
|
|
5
|
+
* Automerge warmup, occasional sync diagnostics). E2e scripts watch the
|
|
6
|
+
* Puppeteer console stream and fail on anything unexpected; without an
|
|
7
|
+
* allowlist every run trips on the same benign noise.
|
|
8
|
+
*
|
|
9
|
+
* The allowlist is owned by polly because polly knows which lines its
|
|
10
|
+
* own code produces. Consumers extend it with their app-specific noise.
|
|
11
|
+
* Entries are tested as substrings against the rendered console message.
|
|
12
|
+
*/
|
|
13
|
+
/** Match a console line that contains the given substring. */
|
|
14
|
+
export interface ConsolePattern {
|
|
15
|
+
/** Optional console level filter — "log" | "info" | "warn" | "error".
|
|
16
|
+
* Undefined matches any level. */
|
|
17
|
+
level?: "log" | "info" | "warn" | "error";
|
|
18
|
+
/** Substring or RegExp the rendered console line must satisfy. */
|
|
19
|
+
match: string | RegExp;
|
|
20
|
+
/** Short reason — surfaces in failure messages when the allowlist
|
|
21
|
+
* evolves and an entry should be removed. */
|
|
22
|
+
reason: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const MESH_CONSOLE_ALLOWLIST: ReadonlyArray<ConsolePattern>;
|
|
25
|
+
/**
|
|
26
|
+
* Return true when the console line matches any allowlist entry.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isAllowedConsoleLine(line: {
|
|
29
|
+
level: string;
|
|
30
|
+
text: string;
|
|
31
|
+
}, allowlist?: ReadonlyArray<ConsolePattern>): boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fairfox/polly/test/e2e-mesh — end-to-end test kit for the mesh.
|
|
3
|
+
*
|
|
4
|
+
* Centralises the patterns every consumer's e2e scripts reinvent today:
|
|
5
|
+
* pairing-ceremony driving, convergence polling, console-noise filtering,
|
|
6
|
+
* screenshot-on-failure, and an embedded signalling relay. Fairfox and
|
|
7
|
+
* lingua import from this subpath rather than reimplementing.
|
|
8
|
+
*
|
|
9
|
+
* The kit is opinionated about the shape of the consumer it drives —
|
|
10
|
+
* pairing UI exposes stable `data-e2e-*` attributes, the bootstrap path
|
|
11
|
+
* goes through `createMeshClient`, the document state is observable via
|
|
12
|
+
* a polled DOM predicate. Consumers that follow the conventions get the
|
|
13
|
+
* full kit for free; those that diverge supply their own driver per
|
|
14
|
+
* primitive.
|
|
15
|
+
*
|
|
16
|
+
* Diagnostic obligation runs by default through {@link startDiagnosticRecorder}:
|
|
17
|
+
* unexpected silent drops on the diagnostic stream fail the script. A
|
|
18
|
+
* scenario that legitimately exercises a drop branch (e.g. revocation)
|
|
19
|
+
* passes the expected kinds to `assertNoSilentDrops({ allow: [...] })`.
|
|
20
|
+
*/
|
|
21
|
+
export { type ConsolePattern, isAllowedConsoleLine, MESH_CONSOLE_ALLOWLIST, } from "./console-allowlist";
|
|
22
|
+
export { knownPeersFor, type PrebakedKeyringPair, type PrebakedKeyringSet, type PrebakedPeer, prebakeKeyringPair, prebakeKeyringSet, } from "./keys";
|
|
23
|
+
export { type CapturedConsoleLine, type LaunchedPeer, type LaunchPeerOptions, launchPeer, } from "./launch-peer";
|
|
24
|
+
export { type DiagnosticRecorder, MeshAssertionError, type MeshAssertionFailure, startDiagnosticRecorder, } from "./mesh-assertions";
|
|
25
|
+
export { type ServeConsumerOptions, type ServeConsumerResult, serveConsumer, } from "./serve-consumer";
|
|
26
|
+
export { type ConvergencePredicate, type PeerSnapshot, type WaitForConvergenceOptions, waitForConvergence, waitForMeshConnected, } from "./wait-for-convergence";
|
|
27
|
+
export { type WithRelayOptions, type WithRelayResult, withRelay } from "./with-relay";
|