Skip to content

Commit 952bb3c

Browse files
authored
49663 fix bug with duplicate template names (finos#39)
* fix issue with editing template name and duplicate name check * don't allow save on enter if save disabled * swap out yarn.lock for package-lock.json and update * fixing a couple of minor build warnings
1 parent 03335b6 commit 952bb3c

37 files changed

+59888
-18975
lines changed

.github/workflows/docusaurus.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ jobs:
4040
- name: Configure Node
4141
uses: actions/setup-node@v1
4242
with:
43-
node-version: '12'
43+
node-version: '16.17.*'
4444
- name: Install website dependencies
45-
run: yarn --cwd website install
45+
working-directory: ./website
46+
run: npm install
4647
- name: Patch forked version
4748
run: |
4849
# Extract GitHub org/user and patch siteConfig.js only if not "finos"
@@ -56,7 +57,8 @@ jobs:
5657
run: |
5758
curl ${{ env.CONTRIBUTE_SCRIPT_URL }} | bash -s
5859
- name: Build website
59-
run: yarn --cwd website build
60+
working-directory: ./website
61+
run: npm run build
6062
- name: Publish website
6163
run: |
6264
# Extract GitHub org/user

.github/workflows/package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ${{ matrix.os }}
2929
strategy:
3030
matrix:
31-
node: [14.x]
31+
node: [16.17.x]
3232
os: [ubuntu-latest, windows-latest]
3333

3434
steps:
@@ -73,7 +73,7 @@ jobs:
7373
- name: Configure Node
7474
uses: actions/setup-node@v1
7575
with:
76-
node-version: 14.x
76+
node-version: 16.17.x
7777
registry-url: ${{ matrix.registry }}
7878

7979
- name: Check package version

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
### Changed
1212

13+
* Updated definition of the `Instrument` context type to include optional market identifiers ([#819](https://github.com/finos/FDC3/pull/819))
14+
1315
### Deprecated
1416

1517
### Fixed
@@ -96,6 +98,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
9698
* Updated Methods.ts to support the updated signature for `addContextListener` introduced in FDC3 1.2 ([#462](https://github.com/finos/FDC3/pull/462))
9799
* Clarified the description of the addContextListener functions from the Desktop Agent and Channel APIs in spec and docs. ([#492](https://github.com/finos/FDC3/pull/492))
98100
* Clarified that implementing `fdc3.getInfo()` is required for compliance with the FDC3 standard ([#515](https://github.com/finos/FDC3/pull/515))
101+
* Corrected syntax errors in valuation schema ([#834](https://github.com/finos/FDC3/pull/834))
102+
* Clarified that API errors are promises rejected with a JavaScript (or language appropriate) Error Object with a message chosen from the error enumerations. ([#843](https://github.com/finos/FDC3/pull/843))
103+
* Clarified that `findIntent` functions should return the `ResolveError.NoAppsFound` error, rather than an `AppIntent` with an empty `apps` array when no apps are fund during intent resolution. ([#843](https://github.com/finos/FDC3/pull/843))
104+
* Clarified spec requirements for registration of intent handlers (SHOULD support `interop.intents.listensFor` in an appD record, may support other routes including dynamic registration at runtime) ([#844](https://github.com/finos/FDC3/pull/844))
105+
* Corrected schema definition for appD `interop.intents.listensFor` element ([#847](https://github.com/finos/FDC3/pull/847))
99106

100107
## [npm v1.2.0] - 2021-04-19
101108

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![npm-build](https://github.com/finos/FDC3/workflows/npm-build/badge.svg)](https://github.com/finos/FDC3/actions?query=workflow%3Anpm-build)
99
[![website-build](https://github.com/finos/FDC3/workflows/website-build/badge.svg)](https://github.com/finos/FDC3/actions?query=workflow%3Awebsite-build)
1010
[![Slack](https://img.shields.io/badge/slack-@finos/fdc3-green.svg?logo=slack)](https://finos-lf.slack.com/messages/fdc3/)
11+
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6579/badge)](https://bestpractices.coreinfrastructure.org/projects/6579)
1112

1213
FDC3 aims to provide an open standard for interoperability on the financial desktop. This includes standardized verbs to invoke actions between applications (called "intents"), a standardized data format, an OpenAPI app directory standard, and standardized API operations.
1314

docs/api/ref/Channel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public broadcast(context: Context): Promise<void>;
132132

133133
Broadcasts a context on the channel. This function can be used without first joining the channel, allowing applications to broadcast on both App Channels and User Channels that they aren't a member of.
134134

135-
If the broadcast is denied by the channel or the channel is not available, the method will return an `Error` with a string from the [`ChannelError`](ChannelError) enumeration.
135+
If the broadcast is denied by the channel or the channel is not available, the promise will be rejected with an `Error` with a `message` string from the [`ChannelError`](ChannelError) enumeration.
136136

137137
Channel implementations should ensure that context messages broadcast by an application on a channel should not be delivered back to that same application if they are joined to the channel.
138138

@@ -173,7 +173,7 @@ If no _context type_ is provided, the most recent context that was broadcast on
173173

174174
It is up to the specific Desktop Agent implementation whether and how recent contexts are stored. For example, an implementation could store context history for a channel in a single array and search through the array for the last context matching a provided type, or context could be maintained as a dictionary keyed by context types. An implementation could also choose not to support context history, in which case this method will return `null` for any context type not matching the type of the most recent context.
175175

176-
If getting the current context fails, the promise will return an `Error` with a string from the [`ChannelError`](ChannelError) enumeration.
176+
If getting the current context fails, the promise will be rejected with an `Error` with a `message` string from the [`ChannelError`](ChannelError) enumeration.
177177

178178
#### Examples
179179

docs/api/ref/DesktopAgent.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ fdc3.addIntentListener("QuoteStream", async (context) => {
150150
151151
#### See also
152152
153+
* [Register an Intent Handler](../spec#register-an-intent-handler)
153154
* [`PrivateChannel`](PrivateChannel)
154155
* [`Listener`](Types#listener)
155156
* [`Context`](Types#context)
@@ -192,7 +193,7 @@ createPrivateChannel(): Promise<PrivateChannel>;
192193
193194
Returns a `Channel` with an auto-generated identity that is intended for private communication between applications. Primarily used to create channels that will be returned to other applications via an IntentResolution for a raised intent.
194195
195-
If the `PrivateChannel` cannot be created, the returned promise MUST be rejected with an error string from the [`ChannelError`](Errors#channelerror) enumeration.
196+
If the `PrivateChannel` cannot be created, the returned promise MUST be rejected with an `Error` object with a `message` chosen from the [`ChannelError`](Errors#channelerror) enumeration.
196197
197198
The `PrivateChannel` type is provided to support synchronisation of data transmitted over returned channels, by allowing both parties to listen for events denoting subscription and unsubscription from the returned channel. `PrivateChannels` are only retrievable via raising an intent.
198199
@@ -247,7 +248,7 @@ Find all the available instances for a particular application.
247248
248249
If there are no instances of the specified application the returned promise should resolve to an empty array.
249250
250-
If the request fails for another reason, the promise will return an `Error` with a string from the `ResolveError` enumeration.
251+
If the request fails for another reason, the promise MUST be rejected with an `Error` Object with a `message` chosen from the `ResolveError` enumeration.
251252
252253
#### Example
253254
@@ -268,10 +269,9 @@ findIntent(intent: string, context?: Context, resultType?: string): Promise<AppI
268269
Find out more information about a particular intent by passing its name, and optionally its context and/or a desired result context type.
269270
270271
`findIntent` is effectively granting programmatic access to the Desktop Agent's resolver.
271-
It returns a promise resolving to the intent, its metadata and metadata about the apps and app instances that are registered to handle it.
272-
This can be used to raise the intent against a specific app or app instance.
272+
It returns a promise resolving to an `AppIntent` which provides details of the intent, its metadata and metadata about the apps and app instances that are registered to handle it. This can be used to raise the intent against a specific app or app instance.
273273
274-
If the resolution fails, the promise will return an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration.
274+
If the resolution fails, the promise MUST be rejected with an `Error` Object with a `message` chosen from the [`ResolveError`](Errors#resolveerror) enumeration. This includes the case where no apps are found that resolve the intent, when the `ResolveError.NoAppsFound` message should be used.
275275
276276
Result types may be a type name, the string `"channel"` (which indicates that the app will return a channel) or a string indicating a channel that returns a specific type, e.g. `"channel<fdc3,instrument>"`. If intent resolution to an app returning a channel is requested, the desktop agent MUST include both apps that are registered as returning a channel and those registered as returning a channel with a specific type in the response.
277277
@@ -349,7 +349,7 @@ Find all the available intents for a particular context, and optionally a desire
349349
`findIntentsByContext` is effectively granting programmatic access to the Desktop Agent's resolver.
350350
A promise resolving to all the intents, their metadata and metadata about the apps and app instances that registered as handlers is returned, based on the context types the intents have registered.
351351
352-
If the resolution fails, the promise will return an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration.
352+
If the resolution fails, the promise MUST be rejected with an `Error` Object with a `message` chosen from the [`ResolveError`](Errors#resolveerror) enumeration. This includes the case where no intents with associated apps are found, when the `ResolveError.NoAppsFound` message should be used.
353353
354354
The optional `resultType` argument may be a type name, the string `"channel"` (which indicates that the app will return a channel) or a string indicating a channel that returns a specific type, e.g. `"channel<fdc3,instrument>"`. If intent resolution to an app returning a channel is requested without a specified context type, the desktop agent MUST include both apps that are registered as returning a channel and those registered as returning a channel with a specific type in the response.
355355
@@ -490,7 +490,7 @@ getOrCreateChannel(channelId: string): Promise<Channel>;
490490
491491
Returns a `Channel` object for the specified channel, creating it (as an _App_ channel) if it does not exist.
492492
493-
If the Channel cannot be created or access was denied, the returned promise MUST be rejected with an error string from the `ChannelError` enumeration.
493+
If the Channel cannot be created or access was denied, the returned promise MUST be rejected with an `Error` Object with a `message` chosen from the `ChannelError` enumeration.
494494
495495
#### Example
496496
@@ -541,7 +541,7 @@ If the channel already contains context that would be passed to context listener
541541
542542
An app can only be joined to one channel at a time.
543543
544-
Rejects with an error if the channel is unavailable or the join request is denied. The error string will be drawn from the [`ChannelError`](Errors#channelerror) enumeration.
544+
If an error occurs (such as the channel is unavailable or the join request is denied) the promise MUST be rejected with an `Error` Object with a `message` chosen from the [`ChannelError`](Errors#channelerror) enumeration.
545545
546546
#### Examples
547547
@@ -590,17 +590,17 @@ redChannel.addContextListener(null, channelListener);
590590
open(app: AppIdentifier, context?: Context): Promise<AppIdentifier>;
591591
```
592592
593-
Launches an app, specified via an [`AppIdentifier`](Metadata#appidentifier) object.
593+
Launches an app, specified via an [`AppIdentifier`](Types#appidentifier) object.
594594
595595
The `open` method differs in use from [`raiseIntent`](#raiseintent). Generally, it should be used when the target application is known but there is no specific intent. For example, if an application is querying an App Directory, `open` would be used to open an app returned in the search results.
596596
597597
**Note**, if the intent, context and target app name are all known, it is recommended to instead use [`raiseIntent`](#raiseintent) with the `target` argument.
598598
599599
If a [`Context`](Types#context) object is passed in, this object will be provided to the opened application via a contextListener. The Context argument is functionally equivalent to opening the target app with no context and broadcasting the context directly to it.
600600
601-
Returns an [`AppIdentifier`](Metadata#appidentifier) object with the `instanceId` field set to identify the instance of the application opened by this call.
601+
Returns an [`AppIdentifier`](Types#appidentifier) object with the `instanceId` field set to identify the instance of the application opened by this call.
602602
603-
If opening errors, it returns an `Error` with a string from the [`OpenError`](Errors#openerror) enumeration.
603+
If an error occurs while opening the app, the promise MUST be rejected with an `Error` Object with a `message` chosen from the [`OpenError`](Errors#openerror) enumeration.
604604
605605
#### Example
606606
@@ -616,7 +616,7 @@ let instanceIdentifier = await fdc3.open(appIdentifier, context);
616616
#### See also
617617
618618
* [`Context`](Types#context)
619-
* [`AppIdentifier`](Metadata#AppIdentifier)
619+
* [`AppIdentifier`](Types#appidentifier)
620620
* [`AppMetadata`](Metadata#appmetadata)
621621
* [`OpenError`](Errors#openerror)
622622
@@ -631,7 +631,7 @@ Raises a specific intent for resolution against apps registered with the desktop
631631
The desktop agent MUST resolve the correct app to target based on the provided intent name and context data. If multiple matching apps are found, a method for resolving the intent to a target app, such as presenting the user with a resolver UI allowing them to pick an app, SHOULD be provided.
632632
Alternatively, the specific app or app instance to target can also be provided. A list of valid target applications and instances can be retrieved via [`findIntent`](DesktopAgent#findintent).
633633
634-
If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration is returned. If a specific target `app` parameter was set, but either the app or app instance is not available then the `ResolveError.TargetAppUnavailable` or `ResolveError.TargetInstanceUnavailable` errors MUST be returned.
634+
If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, the promise MUST be rejected with an `Error` object with a `message` chosen from the [`ResolveError`](Errors#resolveerror) enumeration. If a specific target `app` parameter was set, but either the app or app instance is not available, the promise MUST be rejected with an `Error` object with either the `ResolveError.TargetAppUnavailable` or `ResolveError.TargetInstanceUnavailable` string as its `message`.
635635
636636
If you wish to raise an intent without a context, use the `fdc3.nothing` context type. This type exists so that apps can explicitly declare support for raising an intent without context.
637637
@@ -674,8 +674,9 @@ try {
674674
675675
#### See also
676676
677+
* [Raising Intents](../spec#raising-intents)
677678
* [`Context`](Types#context)
678-
* [`AppIdentifier`](Metadata#AppIdentifier)
679+
* [`AppIdentifier`](Types#AppIdentifier)
679680
* [`IntentResult`](Types#intentresult)
680681
* [`IntentResolution`](Metadata#intentresolution)
681682
* [`ResolveError`](Errors#resolveerror)
@@ -696,7 +697,7 @@ Using `raiseIntentForContext` is similar to calling `findIntentsByContext`, and
696697
697698
Returns an `IntentResolution` object, see [`raiseIntent()`](#raiseintent) for details.
698699
699-
If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration is returned. If a specific target `app` parameter was set, but either the app or app instance is not available then the `ResolveError.TargetAppUnavailable` or `ResolveError.TargetInstanceUnavailable` errors MUST be returned.
700+
If a target intent and app cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, the promise MUST be rejected with an `Error` object with a `message` chosen from the [`ResolveError`](Errors#resolveerror) enumeration. If a specific target `app` parameter was set, but either the app or app instance is not available, the promise MUST be rejected with an `Error` object with either the `ResolveError.TargetAppUnavailable` or `ResolveError.TargetInstanceUnavailable` string as its `message`.
700701
701702
#### Example
702703
@@ -710,9 +711,10 @@ await fdc3.raiseIntentForContext(context, targetAppIdentifier);
710711
711712
#### See also
712713
714+
* [Raising Intents](../spec#raising-intents)
713715
* [`raiseIntent()`](#raiseintent)
714716
* [`Context`](Types#context)
715-
* [`AppIdentifier`](Metadata#AppIdentifier)
717+
* [`AppIdentifier`](Types#appidentifier)
716718
* [`IntentResolution`](Metadata#intentresolution)
717719
* [`ResolveError`](Errors#resolveerror)
718720

docs/api/ref/Errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Errors
33
---
44

5-
Some FDC3 API operations return promises that can result in errors.
5+
FDC3 API operations may sometimes result in an error, which must be returned to the caller. Errors should be returned by rejecting the promise returned by the API with a JavaScript `Error` object (or equivalent for the language of the implementation). The `Error` Object's message should be chosen from the appropriate Error enumeration below.
66

77
## `ChannelError`
88

0 commit comments

Comments
 (0)