Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDC3 For Web Browsers Implementation DON'T REVIEW YET #1309

Open
wants to merge 672 commits into
base: main
Choose a base branch
from

Conversation

robmoffat
Copy link
Member

@robmoffat robmoffat commented Aug 5, 2024

Implementation PR for FDC3 for the Web (#896)

This PR primarily implements the getAgent() function (in the fdc3-get-agent package) as defined by the FDC3 Web Connection Protocol (WCP) and a DesktopAgentProxy (in the fdc3-agent-proxy package) that it uses to implement communication with browser-based Desktop Agents via the FDC3 Desktop Agent Communication Protocol (DACP).

Additionally, the FDC3 repository is refactored to be a monorepo supported by npm workspaces. The existing repository was split into fdc3-context (context type definitions), fdc3-schems (bridging and DACP protocol messages) and fdc3-standard (existing API TypeScript definitions, Intents and App Directory) packages. A testing package was added with tooling used in multiple packages for testing.

These packages are rolled up for release on NPM by an fdc3 package (publishing to the existing @finos/fdc3 NPM package). Previous releases provided both ES6 and CommonJs modules within a single package - this release will only provide ES6, with a separate fdc3-commonjs module provided for backwards compatibility (will release at @finos/fdc3-commonjs).

Finally, a reference implementation, demo for FDC3 in a Web Browser and reference channel selector and intent resolver UIs (that can be injected into an app by getAgent) are provided in the toolbox/fdc3-for-web package.

@robmoffat robmoffat requested a review from a team as a code owner August 27, 2024 09:16
@kriswest kriswest added this to the 2.2 candidates milestone Sep 20, 2024
@robmoffat robmoffat changed the title FDC3 For Web Browsers Implementation DO NOT MERGE OR REVIEW FDC3 For Web Browsers Implementation PLEASE REVIEW Dec 17, 2024
@robmoffat robmoffat changed the title FDC3 For Web Browsers Implementation PLEASE REVIEW FDC3 For Web Browsers Implementation DON'T REVIEW YET Dec 17, 2024
Copy link

424 passed

Copy link

424 passed

Copy link

424 passed

Copy link

424 passed

"build": "npx rollup -c rollup.config.mjs"
},
"dependencies": {
"@kite9/fdc3": "2.2.0-beta.29"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we're rolling up a build, this may be movable to a devDependency...

@@ -0,0 +1 @@
export * from '@kite9/fdc3';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FDC3 global (window.fdc3) may need to be redeclared here, it (most likely) won't get pulled in by the re-exporting all of the fdc3 module's exports... That may or may not be affected by moving @finos.fdc3 to be a devDependency - if so I'd rather repeat the declaration than force download of the additional es6 mdoule when working with commonJs.

nodeResolve(),
commonjs({
// use a regex to make sure to include eventual hoisted packages (RM: what is this?)
include: /\/regenerator-runtime\//,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inlcuding a polyfill for some node versions to handle es6 await, yield and generator functions in the build. If we find something is not properly included in teh build, we may need to add something here. See https://www.npmjs.com/package/@rollup/plugin-commonjs for docs on include. After glancing at those, I think we might need to ensure that the commonjs build is working correctly and all expected functionality and types are present...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants