Skip to content

Commit 5ba8b04

Browse files
committed
feat(devtools-types): scaffold shared AuthEvent schema and types
Chrome extension for clients within the SDK ecosystem (javascript). Contains a bridge, extension, and types package. README.md documents feature set. chore: readme
1 parent 44f9be3 commit 5ba8b04

101 files changed

Lines changed: 11397 additions & 123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"updateInternalDependencies": "patch",
1515
"ignore": [
1616
"scratchpad",
17+
"@forgerock/devtools-extension",
18+
"@forgerock/devtools-bridge",
19+
"@forgerock/devtools-types",
1720
"@forgerock/pingone-scripts",
1821
"@forgerock/device-client-app",
1922
"@forgerock/davinci-app",

.changeset/quiet-onions-study.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@forgerock/journey-client': minor
3+
'@forgerock/oidc-client': minor
4+
---
5+
6+
Adds subscribe method to public api

.changeset/seven-hoops-win.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@forgerock/davinci-client': minor
3+
---
4+
5+
Adds a get cache method to expose the cache for consumers like devtools

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
.pnpm-store/*
66
.npm/_logs
77

8+
# Elm
9+
elm-stuff/
10+
811
# Generated code
912
logs/*
1013
tmp/

e2e/davinci-app/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import './style.css';
88

99
import { Config, FRUser, TokenManager } from '@forgerock/javascript-sdk';
1010
import { davinci } from '@forgerock/davinci-client';
11+
import { attachDevToolsBridge } from '@forgerock/devtools-bridge';
1112
import type {
1213
CustomLogger,
1314
DaVinciConfig,
@@ -334,16 +335,13 @@ const urlParams = new URLSearchParams(window.location.search);
334335
}
335336
}
336337

337-
/**
338-
* Optionally subscribe to the store to listen for all store updates
339-
* This is useful for debugging and logging
340-
* It returns an unsubscribe function that you can call to stop listening
341-
*/
342338
davinciClient.subscribe(() => {
343339
const node = davinciClient.getNode();
344340
console.log('Event emitted from store:', node);
345341
});
346342

343+
attachDevToolsBridge(davinciClient, config);
344+
347345
const qs = window.location.search;
348346
const searchParams = new URLSearchParams(qs);
349347

e2e/davinci-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@forgerock/davinci-client": "workspace:*",
15+
"@forgerock/devtools-bridge": "workspace:*",
1516
"@forgerock/javascript-sdk": "4.7.0",
1617
"@forgerock/protect": "workspace:*",
1718
"@forgerock/sdk-logger": "workspace:*"

e2e/davinci-app/tsconfig.app.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
{
1919
"path": "../../packages/protect/tsconfig.lib.json"
2020
},
21+
{
22+
"path": "../../packages/devtools-bridge/tsconfig.lib.json"
23+
},
2124
{
2225
"path": "../../packages/davinci-client/tsconfig.lib.json"
2326
}

e2e/journey-app/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import './style.css';
88

99
import { journey } from '@forgerock/journey-client';
10+
import { attachJourneyBridge } from '@forgerock/devtools-bridge';
1011

1112
import type { JourneyClient, RequestMiddleware } from '@forgerock/journey-client/types';
1213

@@ -65,6 +66,7 @@ if (searchParams.get('middleware') === 'true') {
6566
let journeyClient: JourneyClient;
6667
try {
6768
journeyClient = await journey({ config: config, requestMiddleware });
69+
attachJourneyBridge(journeyClient, config);
6870
} catch (error) {
6971
const message = error instanceof Error ? error.message : 'Unknown error';
7072
console.error('Failed to initialize journey client:', message);

e2e/journey-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"serve": "pnpm nx nxServe"
1212
},
1313
"dependencies": {
14+
"@forgerock/devtools-bridge": "workspace:*",
1415
"@forgerock/journey-client": "workspace:*",
1516
"@forgerock/oidc-client": "workspace:*",
1617
"@forgerock/protect": "workspace:*",

e2e/journey-app/tsconfig.app.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
],
1616
"references": [
1717
{
18-
"path": "../../packages/sdk-effects/logger/tsconfig.lib.json"
18+
"path": "../../packages/device-client/tsconfig.lib.json"
1919
},
2020
{
21-
"path": "../../packages/device-client/tsconfig.lib.json"
21+
"path": "../../packages/sdk-effects/logger/tsconfig.lib.json"
2222
},
2323
{
2424
"path": "../../packages/oidc-client/tsconfig.lib.json"
2525
},
26+
{
27+
"path": "../../packages/devtools-bridge/tsconfig.lib.json"
28+
},
2629
{
2730
"path": "../../packages/protect/tsconfig.lib.json"
2831
},

0 commit comments

Comments
 (0)