You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs-site): remove fabricated API reference, fix all content to match real code
- Delete all ApiDocs Elm modules (Types, TreeshakeCheck, EslintPluginTreeshake,
DevtoolsBridge, DevtoolsTypes) and the API route (Route.Api.Package_.ModuleName_)
- Remove API link from header nav in Shared.elm
- Remove .api-reference, .api-item, .api-signature, .api-example CSS rules
- Rewrite devtools-bridge package page with real exports: attachDaVinciBridge,
attachJourneyBridge, attachOidcBridge, emitAuthEvent, emitConfigEvent,
DEVTOOLS_EVENT_NAME, BridgeHandle, DevtoolsOptions
- Rewrite devtools-types package page with real schemas: AuthEventSchema,
NetworkDataSchema, SdkDataSchema, SdkConfigDataSchema, DomDataSchema,
SessionDataSchema, JourneyDataSchema, OidcDataSchema, FlowStateSchema,
FlowSummarySchema, FlowExportSchema, OIDC semantic schemas
- Rewrite treeshake-check package page with real CLI options and programmatic API:
checkPackage, analyzeTreeshakeability, getEntryFromPackageJson, error classes
- Rewrite eslint-plugin-treeshake package page with real single rule
(no-treeshake-hazard) and its check categories, configs (recommended/strict)
- Rewrite DaVinci integration guide: attachDaVinciBridge with Subscribable interface
- Rewrite Journey integration guide: attachJourneyBridge with RTK Query state
- Rewrite OIDC integration guide: attachOidcBridge with endpoint-to-phase mapping
- Fix stale ApiDocs references in contributing docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: packages/docs-site/content/contributing/code-style.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ Test files live in `packages/<name>/test/` directories, mirroring the source str
121
121
The docs site follows standard Elm conventions:
122
122
123
123
-**elm-format** — All Elm files must be formatted with `elm-format`. The pre-commit hook runs this automatically.
124
-
-**Module naming** — Modules use PascalCase and match their file path (e.g. `ApiDocs.TreeshakeCheck` lives at `src/ApiDocs/TreeshakeCheck.elm`).
124
+
-**Module naming** — Modules use PascalCase and match their file path (e.g. `Search` lives at `src/Search.elm`).
125
125
-**Type annotations** — Every top-level function must have a type annotation.
126
126
-**No partial functions** — Never use `List.head`, `Maybe.withDefault` without documenting why, or any function that can crash. Use pattern matching instead.
Copy file name to clipboardExpand all lines: packages/docs-site/content/docs/davinci-integration.md
+43-54Lines changed: 43 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Ping Identity DaVinci is an orchestration platform for identity flows. The wolfc
13
13
14
14
DaVinci flows consist of a series of nodes that the user progresses through. Each node may involve user interaction (login forms, MFA challenges), server-side decisions (risk evaluation, policy checks), or external service calls (social login providers, identity verification).
15
15
16
-
The devtools bridge captures every node transition as an `AuthEvent`and the overall flow progress as a `FlowState`, giving you full visibility into what is happening during authentication.
16
+
The devtools bridge monitors a DaVinci client's `Subscribable` interface and emits an `AuthEvent` on every node status transition, giving you full visibility into what is happening during authentication.
17
17
18
18
## Setup
19
19
@@ -23,79 +23,68 @@ The devtools bridge captures every node transition as an `AuthEvent` and the ove
The `davinci` adapter hooks into the DaVinci SDK's event system and translates its internal events into the standard `AuthEvent` schema that the devtools panel understands.
37
-
38
-
## What Gets Captured
39
-
40
-
With the DaVinci adapter active, the bridge emits events for:
31
+
// Pass your DaVinci client instance
32
+
const handle =attachDaVinciBridge(daVinciClient);
41
33
42
-
-**Flow start** — when `daVinciClient.start()` is called
43
-
-**Node transitions** — each time the flow advances to a new node
44
-
-**User submissions** — form data submitted at each node (passwords are redacted)
45
-
-**Collector callbacks** — interactions with individual collectors within a node
-**Flow completion** — successful authentication with token issuance
34
+
// Optionally pass SDK config and devtools options
35
+
const handle =attachDaVinciBridge(
36
+
daVinciClient,
37
+
{
38
+
clientId: 'my-app',
39
+
redirectUri: 'https://example.com/callback',
40
+
},
41
+
{ consoleLog: true },
42
+
);
43
+
```
48
44
49
-
## Flow State Tracking
45
+
The bridge subscribes to the client via `client.subscribe()` and reads node state via `client.getNode()`. It decodes each node using an internal schema and only emits events when the node status actually changes.
50
46
51
-
The bridge also maintains a `FlowState` object that represents the current position in the DaVinci flow:
47
+
### Cleanup
52
48
53
49
```typescript
54
-
// FlowState is updated automatically
55
-
// Access it from the DevTools panel or programmatically:
The DevTools extension visualizes this as a node graph in the Flow view, where each step is a node and transitions are edges.
61
-
62
-
## Advanced Configuration
53
+
<callouttype="warning">Always call `handle.detach()` when you are done. Failing to do so may cause memory leaks from lingering event listeners.</callout>
63
54
64
-
### Filtering Events
55
+
##What Gets Captured
65
56
66
-
You can filter which events are emitted to the devtools panel:
57
+
With the DaVinci bridge attached, the following events are emitted:
When the component unmounts or the flow completes, destroy the bridge to stop event capture and release resources:
90
-
91
-
```typescript
92
-
bridge.destroy();
93
-
```
78
+
On each subscription callback:
94
79
95
-
<callouttype="warning">Always call `bridge.destroy()` when you are done. Failing to do so may cause memory leaks from lingering event listeners.</callout>
80
+
1. The bridge calls `client.getNode()` and decodes the result with `Schema.decodeUnknownOption`
81
+
2. If the node status matches the previous status, the event is skipped (deduplication)
82
+
3. If `window.__PING_DEVTOOLS_EXTENSION__` is not present, the event is dropped (no extension installed)
83
+
4. The node data is mapped to `SdkData` via the pure `nodeToSdkData` function
84
+
5. Session snapshots (cookies + localStorage) are taken before and after, with diffs emitted as separate events
96
85
97
86
## Troubleshooting
98
87
99
-
-**No events appearing**— Verify that the DaVinci SDK version is compatible. The adapter supports `@ping-identity/davinci-client`.
100
-
-**Missing node transitions**— Some custom DaVinci nodes may not emit standard events. Contact the node author to ensure compatibility.
101
-
-**Redacted fields showing as empty**— The bridge redacts sensitive fields by default. To see raw values during development, pass `redact: false` in the bridge options (never do this in production).
88
+
-**No events appearing**-- Verify that `window.__PING_DEVTOOLS_EXTENSION__` exists. The bridge only emits events when the Ping DevTools extension is detected.
89
+
-**Missing node transitions**-- The bridge deduplicates by `nodeStatus`. If two consecutive nodes have the same status string, only the first is emitted.
90
+
-**Optional peer dependency**-- The bridge has `@forgerock/davinci-client` as an optional peer dependency. You do not need to install it separately if you are already using the DaVinci SDK.
0 commit comments