Skip to content

Commit 97f9809

Browse files
authored
Merge pull request #1309 from finos/fdc3-for-web-impl
FDC3 For Web Browsers Implementation
2 parents 6af7978 + 61c5a2b commit 97f9809

File tree

770 files changed

+69892
-42954
lines changed

Some content is hidden

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

770 files changed

+69892
-42954
lines changed

.github/workflows/base-coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test coverage for main branch
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- fdc3-for-web-impl
8+
9+
jobs:
10+
test_and_upload_coverage:
11+
runs-on: ubuntu-latest
12+
name: Test and upload coverage
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
ref: ${{ github.event.ref }}
18+
fetch-depth: 1000
19+
20+
- name: Run tests
21+
run: |
22+
npm i
23+
npm run test
24+
npm run merge
25+
npm run report
26+
27+
- name: Upload coverage artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: test-coverage-output
31+
path: nyc-coverage-report

.github/workflows/coverage.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Node.js CI Tests and Coverage
2+
3+
# Controls when the workflow will run on any branch
4+
on:
5+
pull_request:
6+
7+
# Allows Coverage to be written back as a PR comment
8+
permissions:
9+
pull-requests: write
10+
11+
# Define the jobs for this workflow
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
fetch-depth: 1000
22+
23+
- name: Fetch base
24+
run: git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1000
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 20.x
30+
31+
- name: Install dependencies
32+
run: npm install
33+
34+
- name: Run tests
35+
run: npm run test
36+
37+
- name: Merge Results
38+
run: npm run merge
39+
40+
- name: Create Report
41+
run: npm run report
42+
43+
- name: Create test summary
44+
uses: test-summary/action@dist
45+
with:
46+
paths: "**/test-results.xml"
47+
show: "fail, skip"
48+
output: test-summary.md
49+
if: always()
50+
51+
- name: PR comment with file
52+
uses: thollander/actions-comment-pull-request@v3
53+
with:
54+
file-path: test-summary.md
55+
56+
- name: Download previous coverage
57+
uses: dawidd6/action-download-artifact@v7
58+
with:
59+
workflow: base-coverage.yml
60+
name: 'test-coverage-output'
61+
path: base-artifacts
62+
search_artifacts: true
63+
64+
- name: Report Coverage
65+
uses: sidx1024/[email protected]
66+
with:
67+
coverage_file: "nyc-coverage-report/coverage-summary.json"
68+
base_coverage_file: "base-artifacts/coverage-summary.json"
69+

.github/workflows/cve-scanning.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ jobs:
4545

4646
- run: npx --yes auditjs ossi --whitelist allow-list.json
4747
if: success() || failure()
48-
49-
- run: npx --yes auditjs ossi --whitelist ../../allow-list.json
50-
working-directory: toolbox/fdc3-workbench
51-
if: success() || failure()
5248

5349
- run: npx --yes auditjs ossi --whitelist ../allow-list.json
5450
working-directory: website

.gitignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ website/build/
1313
website/static/toolbox
1414
website/node_modules
1515
website/i18n/*
16-
website/package-lock.json
17-
website/.docusaurus/**
16+
website/.docusaurus/
17+
website/static/schemas/next/*
18+
website/static/ui
19+
test-results.xml
20+
1821

1922
.idea/
2023
*.iml
21-
website/.yarn
24+
website/.yarn
25+
.nyc_output
26+
toolbox/fdc3-for-web/fdc3-web-impl/generated/
27+
cucumber-report.html
28+
nyc-coverage-report/

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
npx lint-staged

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Omit the registry url which can be an organization's internal npm mirror when generating package-lock.json file
2+
# see: https://github.com/npm/cli/pull/4874
3+
# and https://docs.npmjs.com/cli/v8/using-npm/config#omit-lockfile-registry-resolved
4+
omit-lockfile-registry-resolved = true

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
website
1010
dist
1111
src/app-directory/*/target
12+
node_modules
13+
coverage
14+
.nyc_output
15+
build

.semgrepignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ website/**
22

33
# Just used for build so ignoring
44
s2tQuicktypeUtil.js
5-
schemas/api/t2sQuicktypeUtil.js
5+
t2sQuicktypeUtil.js
66

77
# API schema set for localhost gets picked up by semgrep rule
8-
schemas/bridgingAsyncAPI/bridgingAsyncAPI.json
8+
schemas/bridgingAsyncAPI/bridgingAsyncAPI.json
9+
10+
# demo apps get picked up for not having integrity headers
11+
toolbox/fdc3-for-web/demo/src/client/apps/**

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2222
* Added utility functions `isStandardContextType(contextType: string)`, `isStandardIntent(intent: string)`,`getPossibleContextsForIntent(intent: StandardIntent)`. ([#1139](https://github.com/finos/FDC3/pull/1139))
2323
* Added support for event listening outside of intent or context listnener. Added new function `addEventListener`, type `EventHandler`, enum `FDC3EventType` and interfaces `FDC3Event` and `FDC3ChannelChangedEvent`. ([#1207](https://github.com/finos/FDC3/pull/1207))
2424
* Added new `CreateOrUpdateProfile` intent. ([#1359](https://github.com/finos/FDC3/pull/1359))
25-
* Added conformance tests into the FDC3 API documentation in the current version and backported into 2.0 and 2.1. Removed outdated 1.2 conformance tests (which are preserved in the older 2.0 and 2.1 versions). ([#1417](https://github.com/finos/FDC3/pull/1417)).
25+
* Added conformance tests into the FDC3 API documentation in the current version and backported into 2.0 and 2.1. Removed outdated 1.2 conformance tests (which are preserved in the older 2.0 and 2.1 versions). ([#1417](https://github.com/finos/FDC3/pull/1417))
26+
* Added separate `fdc3-commonjs` module for compatibility with older projects that use CommonJS. ([#1452](https://github.com/finos/FDC3/pull/1452))
27+
* Added testing policy to [Contributing](CONTRIBUTING) page to address ([810](https://github.com/finos/FDC3/issues/810))
28+
* Added the ability to control logging to the JS console from getAgent() and the DesktopAgentProxy via arguments to getAgent(). ([#1495](https://github.com/finos/FDC3/pull/1495))
29+
* Added the ability for a browser-based DesktopAgent to control the timeouts used in the DesktopAgentProxy when making calls to it, via properties in WCP3Handshake message. ([#1497](https://github.com/finos/FDC3/pull/1497))
30+
2631

2732
### Changed
2833

@@ -33,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3338
* FDC3 apps are now encouraged to instantiate their FDC3 interface (DesktopAgent) using the `getAgent()` function provided by the `@finos/fdc3` module. This will allow apps to interoperate in either traditional Preload DAs (i.e. Electron) as well as the new Browser-Resident DAs. ([#1191](https://github.com/finos/FDC3/pull/1191))
3439
* `ContextType` and `Intent` (`string`) types were created for use in DesktopAgent API signatures - they are unions of standardized values and `string`, enabling autocomplete/IntelliSense in IDEs when working with the FDC3 API. ([#1139](https://github.com/finos/FDC3/pull/1139))
3540
* SessionStorage use by `getAgent` was updated to scope the stored data by `window.name` and the app's `identityUrl`. ([#1442](https://github.com/finos/FDC3/pull/1442))
41+
* FDC3 Workbench updated to use `getAgent()` rather than `fdc3Ready()`
3642

3743
### Deprecated
3844

0 commit comments

Comments
 (0)