Skip to content

Commit 406db09

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/dot-net-events
2 parents b7f3606 + 97f9809 commit 406db09

774 files changed

Lines changed: 69901 additions & 42965 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.
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/report-nyc-coverage-github-action@v1.2.7
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1515
* Added reference materials and supported platforms information for FDC3 in .NET via the [finos/fdc3-dotnet](https://github.com/finos/fdc3-dotnet) project. ([#1108](https://github.com/finos/FDC3/pull/1108))
1616
* Specifications for getAgent() and Browser-Resident Desktop Agents. ([#1191](https://github.com/finos/FDC3/pull/1191))
1717
* Specification for Preload Desktop Agents. This content was previously in the supported platforms section. It had been revised and amended to include recommended behavior related to the new validateAppIdentity() function. ([#1191](https://github.com/finos/FDC3/pull/1191))
18-
* Added optional validateAppIdentity() function to DesktopAgent interface. ([#1191](https://github.com/finos/FDC3/pull/1191))
1918
* Typescript definitions for getAgent() and related types. ([#1191](https://github.com/finos/FDC3/pull/1191))
2019
* Typescript definitions for Desktop Agent Communication Protocol (DACP). These constitute the internal "wire protocol" that the "@finos/fdc3" library uses to communicate with Browser-Resident DAs. ([#1191](https://github.com/finos/FDC3/pull/1191))
2120
* Typescript definitions for Web Connection Protocol (WCP). These constitute the messages used to establish connectivity between "@finos/fdc3" and a Browser-Resident DA. ([#1191](https://github.com/finos/FDC3/pull/1191))
2221
* Added support for broadcast actions to the `fdc3.action` context type, allowing an Action to represent the broadcast of a specified context to an app or user channel. ([#1368](https://github.com/finos/FDC3/pull/1368))
2322
* Added utility functions `isStandardContextType(contextType: string)`, `isStandardIntent(intent: string)`,`getPossibleContextsForIntent(intent: StandardIntent)`. ([#1139](https://github.com/finos/FDC3/pull/1139))
2423
* 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))
2524
* Added new `CreateOrUpdateProfile` intent. ([#1359](https://github.com/finos/FDC3/pull/1359))
26-
* 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))
2730
* Added .NET docs for Events to API reference. ([#1441](https://github.com/finos/FDC3/pull/1441))
2831

2932
### Changed
@@ -35,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3538
* 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))
3639
* `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))
3740
* 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()`
3842

3943
### Deprecated
4044

@@ -108,7 +112,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
108112
* Further clarified the difference between the behavior of User channels and other channel types on joinUserChannel/addContextListener. ([#971](https://github.com/finos/FDC3/pull/971))
109113
* Clarified description of the behavior of `IntentResolution.getResult()` when the intent handler returned void (which is not an error). ([#1004](https://github.com/finos/FDC3/pull/1004))
110114
* An error was fixed in the appD schema where launch details sub-schemas were combined with `oneOf`, rather than `anyOf`. This causes validation errors for web or online native apps as their details elements overlap on a `url` field. ([#1034](https://github.com/finos/FDC3/pull/1034))
111-
* The appD `icon` and `screenshot` sub-schemas were updated to require the `src` value is set and restrict additional values, ensuring that common mistakes (such as using a `url` rather than `src` field are caught by the schemas when used to validate. ([#1037](https://github.com/finos/FDC3/pull/1037))
115+
* The appD `icon` and `screenshot` sub-schemas were updated to require the `src` value is set and restrict additional values, ensuring that common mistakes (such as using a `url` rather than `src` field are caught by the schemas when used to validate). ([#1037](https://github.com/finos/FDC3/pull/1037))
112116
* Linting, spell checking other corrections were applied to markdown syntax throughout the FDC3 documentation ([#1032](https://github.com/finos/FDC3/pull/1032))
113117
* Corrected bad example URLs in the App Directory overview/discovery page in the current and past versions as they did not agree with the paths provided in the API specification and OpenAPI schema. ([#1060](https://github.com/finos/FDC3/pull/1060))
114118

0 commit comments

Comments
 (0)