@interopio/fdc3 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -914,7 +914,8 @@ const glue42HostManifestsBrowserDecoder = object$1({
914
914
  hidden: optional$1(boolean())
915
915
  });
916
916
  const hostManifestsBrowserDecoder = oneOf$1(object$1({
917
- "Glue42": oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())
917
+ "ioConnect": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())),
918
+ "Glue42": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1()))
918
919
  }), anyJson$1());
919
920
  const v1DefinitionDecoder = object$1({
920
921
  name: nonEmptyStringDecoder$1,
@@ -1020,7 +1021,7 @@ class FDC3Service {
1020
1021
  }
1021
1022
  const userProperties = this.getUserPropertiesFromDefinition(definition, version);
1022
1023
  const createOptions = { url: this.getUrl(definition, version) };
1023
- let baseApplicationData = {
1024
+ const baseApplicationData = {
1024
1025
  name: definition.appId,
1025
1026
  type: "window",
1026
1027
  createOptions,
@@ -1037,17 +1038,18 @@ class FDC3Service {
1037
1038
  caption: definition.description,
1038
1039
  fdc3: version === "2.0" ? { ...definition, definitionVersion: "2.0" } : undefined,
1039
1040
  };
1040
- if (definition.hostManifests?.["Glue42"]) {
1041
- const decodeRes = glue42HostManifestsBrowserDecoder.run(definition.hostManifests["Glue42"]);
1042
- if (!decodeRes.ok) {
1043
- throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(decodeRes.error)}`);
1044
- }
1045
- if (!Object.keys(decodeRes.result).length) {
1046
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1047
- }
1048
- baseApplicationData = this.mergeBaseAppDataWithGlueManifest(baseApplicationData, decodeRes.result);
1041
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1042
+ if (!ioConnectDefinition) {
1043
+ return baseApplicationData;
1044
+ }
1045
+ const ioDefinitionDecodeRes = glue42HostManifestsBrowserDecoder.run(ioConnectDefinition);
1046
+ if (!ioDefinitionDecodeRes.ok) {
1047
+ throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(ioDefinitionDecodeRes.error)}`);
1049
1048
  }
1050
- return baseApplicationData;
1049
+ if (!Object.keys(ioDefinitionDecodeRes.result).length) {
1050
+ return baseApplicationData;
1051
+ }
1052
+ return this.mergeBaseAppDataWithGlueManifest(baseApplicationData, ioDefinitionDecodeRes.result);
1051
1053
  }
1052
1054
  parseToDesktopAppConfig(definition) {
1053
1055
  const { isFdc3, version } = this.isFdc3Definition(definition);
@@ -1084,7 +1086,7 @@ class FDC3Service {
1084
1086
  };
1085
1087
  }
1086
1088
  const fdc3v2Definition = definition;
1087
- let desktopDefinition = {
1089
+ const desktopDefinition = {
1088
1090
  name: fdc3v2Definition.appId,
1089
1091
  type: this.fdc3ToDesktopDefinitionType[fdc3v2Definition.type],
1090
1092
  details: fdc3v2Definition.details,
@@ -1096,13 +1098,14 @@ class FDC3Service {
1096
1098
  intents: this.getIntentsFromV2AppDefinition(fdc3v2Definition),
1097
1099
  fdc3: { ...fdc3v2Definition, definitionVersion: "2.0" }
1098
1100
  };
1099
- if (fdc3v2Definition.hostManifests?.["Glue42"]) {
1100
- if (typeof fdc3v2Definition.hostManifests["Glue42"] !== "object" || Array.isArray(fdc3v2Definition.hostManifests["Glue42"])) {
1101
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1102
- }
1103
- desktopDefinition = this.mergeDesktopConfigWithGlueManifest(desktopDefinition, fdc3v2Definition.hostManifests?.["Glue42"]);
1101
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1102
+ if (!ioConnectDefinition) {
1103
+ return desktopDefinition;
1104
+ }
1105
+ if (typeof ioConnectDefinition !== "object" || Array.isArray(ioConnectDefinition)) {
1106
+ throw new Error(`Invalid '${definition.hostManifests.ioConnect ? "hostManifests.ioConnect" : "hostManifests['Glue42']"}' key`);
1104
1107
  }
1105
- return desktopDefinition;
1108
+ return this.mergeDesktopConfigWithGlueManifest(desktopDefinition, ioConnectDefinition);
1106
1109
  }
1107
1110
  getUserPropertiesFromDefinition(definition, version) {
1108
1111
  if (version === "1.2") {
@@ -3353,7 +3356,7 @@ class IntentsController {
3353
3356
  }
3354
3357
  }
3355
3358
 
3356
- var version = "2.2.1";
3359
+ var version = "2.3.0";
3357
3360
 
3358
3361
  class ApplicationsController {
3359
3362
  glueController;
@@ -920,7 +920,8 @@
920
920
  hidden: optional$1(boolean())
921
921
  });
922
922
  const hostManifestsBrowserDecoder = oneOf$1(object$1({
923
- "Glue42": oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())
923
+ "ioConnect": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())),
924
+ "Glue42": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1()))
924
925
  }), anyJson$1());
925
926
  const v1DefinitionDecoder = object$1({
926
927
  name: nonEmptyStringDecoder$1,
@@ -1026,7 +1027,7 @@
1026
1027
  }
1027
1028
  const userProperties = this.getUserPropertiesFromDefinition(definition, version);
1028
1029
  const createOptions = { url: this.getUrl(definition, version) };
1029
- let baseApplicationData = {
1030
+ const baseApplicationData = {
1030
1031
  name: definition.appId,
1031
1032
  type: "window",
1032
1033
  createOptions,
@@ -1043,17 +1044,18 @@
1043
1044
  caption: definition.description,
1044
1045
  fdc3: version === "2.0" ? { ...definition, definitionVersion: "2.0" } : undefined,
1045
1046
  };
1046
- if (definition.hostManifests?.["Glue42"]) {
1047
- const decodeRes = glue42HostManifestsBrowserDecoder.run(definition.hostManifests["Glue42"]);
1048
- if (!decodeRes.ok) {
1049
- throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(decodeRes.error)}`);
1050
- }
1051
- if (!Object.keys(decodeRes.result).length) {
1052
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1053
- }
1054
- baseApplicationData = this.mergeBaseAppDataWithGlueManifest(baseApplicationData, decodeRes.result);
1047
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1048
+ if (!ioConnectDefinition) {
1049
+ return baseApplicationData;
1050
+ }
1051
+ const ioDefinitionDecodeRes = glue42HostManifestsBrowserDecoder.run(ioConnectDefinition);
1052
+ if (!ioDefinitionDecodeRes.ok) {
1053
+ throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(ioDefinitionDecodeRes.error)}`);
1055
1054
  }
1056
- return baseApplicationData;
1055
+ if (!Object.keys(ioDefinitionDecodeRes.result).length) {
1056
+ return baseApplicationData;
1057
+ }
1058
+ return this.mergeBaseAppDataWithGlueManifest(baseApplicationData, ioDefinitionDecodeRes.result);
1057
1059
  }
1058
1060
  parseToDesktopAppConfig(definition) {
1059
1061
  const { isFdc3, version } = this.isFdc3Definition(definition);
@@ -1090,7 +1092,7 @@
1090
1092
  };
1091
1093
  }
1092
1094
  const fdc3v2Definition = definition;
1093
- let desktopDefinition = {
1095
+ const desktopDefinition = {
1094
1096
  name: fdc3v2Definition.appId,
1095
1097
  type: this.fdc3ToDesktopDefinitionType[fdc3v2Definition.type],
1096
1098
  details: fdc3v2Definition.details,
@@ -1102,13 +1104,14 @@
1102
1104
  intents: this.getIntentsFromV2AppDefinition(fdc3v2Definition),
1103
1105
  fdc3: { ...fdc3v2Definition, definitionVersion: "2.0" }
1104
1106
  };
1105
- if (fdc3v2Definition.hostManifests?.["Glue42"]) {
1106
- if (typeof fdc3v2Definition.hostManifests["Glue42"] !== "object" || Array.isArray(fdc3v2Definition.hostManifests["Glue42"])) {
1107
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1108
- }
1109
- desktopDefinition = this.mergeDesktopConfigWithGlueManifest(desktopDefinition, fdc3v2Definition.hostManifests?.["Glue42"]);
1107
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1108
+ if (!ioConnectDefinition) {
1109
+ return desktopDefinition;
1110
+ }
1111
+ if (typeof ioConnectDefinition !== "object" || Array.isArray(ioConnectDefinition)) {
1112
+ throw new Error(`Invalid '${definition.hostManifests.ioConnect ? "hostManifests.ioConnect" : "hostManifests['Glue42']"}' key`);
1110
1113
  }
1111
- return desktopDefinition;
1114
+ return this.mergeDesktopConfigWithGlueManifest(desktopDefinition, ioConnectDefinition);
1112
1115
  }
1113
1116
  getUserPropertiesFromDefinition(definition, version) {
1114
1117
  if (version === "1.2") {
@@ -3359,7 +3362,7 @@
3359
3362
  }
3360
3363
  }
3361
3364
 
3362
- var version = "2.2.1";
3365
+ var version = "2.3.0";
3363
3366
 
3364
3367
  class ApplicationsController {
3365
3368
  glueController;
package/dist/fdc3.es.js CHANGED
@@ -903,7 +903,8 @@ const glue42HostManifestsBrowserDecoder = object$1({
903
903
  hidden: optional$1(boolean())
904
904
  });
905
905
  const hostManifestsBrowserDecoder = oneOf$1(object$1({
906
- "Glue42": oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())
906
+ "ioConnect": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())),
907
+ "Glue42": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1()))
907
908
  }), anyJson$1());
908
909
  const v1DefinitionDecoder = object$1({
909
910
  name: nonEmptyStringDecoder$1,
@@ -1009,7 +1010,7 @@ class FDC3Service {
1009
1010
  }
1010
1011
  const userProperties = this.getUserPropertiesFromDefinition(definition, version);
1011
1012
  const createOptions = { url: this.getUrl(definition, version) };
1012
- let baseApplicationData = {
1013
+ const baseApplicationData = {
1013
1014
  name: definition.appId,
1014
1015
  type: "window",
1015
1016
  createOptions,
@@ -1026,17 +1027,18 @@ class FDC3Service {
1026
1027
  caption: definition.description,
1027
1028
  fdc3: version === "2.0" ? { ...definition, definitionVersion: "2.0" } : undefined,
1028
1029
  };
1029
- if (definition.hostManifests?.["Glue42"]) {
1030
- const decodeRes = glue42HostManifestsBrowserDecoder.run(definition.hostManifests["Glue42"]);
1031
- if (!decodeRes.ok) {
1032
- throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(decodeRes.error)}`);
1033
- }
1034
- if (!Object.keys(decodeRes.result).length) {
1035
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1036
- }
1037
- baseApplicationData = this.mergeBaseAppDataWithGlueManifest(baseApplicationData, decodeRes.result);
1030
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1031
+ if (!ioConnectDefinition) {
1032
+ return baseApplicationData;
1033
+ }
1034
+ const ioDefinitionDecodeRes = glue42HostManifestsBrowserDecoder.run(ioConnectDefinition);
1035
+ if (!ioDefinitionDecodeRes.ok) {
1036
+ throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(ioDefinitionDecodeRes.error)}`);
1038
1037
  }
1039
- return baseApplicationData;
1038
+ if (!Object.keys(ioDefinitionDecodeRes.result).length) {
1039
+ return baseApplicationData;
1040
+ }
1041
+ return this.mergeBaseAppDataWithGlueManifest(baseApplicationData, ioDefinitionDecodeRes.result);
1040
1042
  }
1041
1043
  parseToDesktopAppConfig(definition) {
1042
1044
  const { isFdc3, version } = this.isFdc3Definition(definition);
@@ -1073,7 +1075,7 @@ class FDC3Service {
1073
1075
  };
1074
1076
  }
1075
1077
  const fdc3v2Definition = definition;
1076
- let desktopDefinition = {
1078
+ const desktopDefinition = {
1077
1079
  name: fdc3v2Definition.appId,
1078
1080
  type: this.fdc3ToDesktopDefinitionType[fdc3v2Definition.type],
1079
1081
  details: fdc3v2Definition.details,
@@ -1085,13 +1087,14 @@ class FDC3Service {
1085
1087
  intents: this.getIntentsFromV2AppDefinition(fdc3v2Definition),
1086
1088
  fdc3: { ...fdc3v2Definition, definitionVersion: "2.0" }
1087
1089
  };
1088
- if (fdc3v2Definition.hostManifests?.["Glue42"]) {
1089
- if (typeof fdc3v2Definition.hostManifests["Glue42"] !== "object" || Array.isArray(fdc3v2Definition.hostManifests["Glue42"])) {
1090
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1091
- }
1092
- desktopDefinition = this.mergeDesktopConfigWithGlueManifest(desktopDefinition, fdc3v2Definition.hostManifests?.["Glue42"]);
1090
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1091
+ if (!ioConnectDefinition) {
1092
+ return desktopDefinition;
1093
+ }
1094
+ if (typeof ioConnectDefinition !== "object" || Array.isArray(ioConnectDefinition)) {
1095
+ throw new Error(`Invalid '${definition.hostManifests.ioConnect ? "hostManifests.ioConnect" : "hostManifests['Glue42']"}' key`);
1093
1096
  }
1094
- return desktopDefinition;
1097
+ return this.mergeDesktopConfigWithGlueManifest(desktopDefinition, ioConnectDefinition);
1095
1098
  }
1096
1099
  getUserPropertiesFromDefinition(definition, version) {
1097
1100
  if (version === "1.2") {
@@ -3342,7 +3345,7 @@ class IntentsController {
3342
3345
  }
3343
3346
  }
3344
3347
 
3345
- var version = "2.2.1";
3348
+ var version = "2.3.0";
3346
3349
 
3347
3350
  class ApplicationsController {
3348
3351
  glueController;
package/dist/fdc3.umd.js CHANGED
@@ -909,7 +909,8 @@
909
909
  hidden: optional$1(boolean())
910
910
  });
911
911
  const hostManifestsBrowserDecoder = oneOf$1(object$1({
912
- "Glue42": oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())
912
+ "ioConnect": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1())),
913
+ "Glue42": optional$1(oneOf$1(glue42HostManifestsBrowserDecoder, anyJson$1()))
913
914
  }), anyJson$1());
914
915
  const v1DefinitionDecoder = object$1({
915
916
  name: nonEmptyStringDecoder$1,
@@ -1015,7 +1016,7 @@
1015
1016
  }
1016
1017
  const userProperties = this.getUserPropertiesFromDefinition(definition, version);
1017
1018
  const createOptions = { url: this.getUrl(definition, version) };
1018
- let baseApplicationData = {
1019
+ const baseApplicationData = {
1019
1020
  name: definition.appId,
1020
1021
  type: "window",
1021
1022
  createOptions,
@@ -1032,17 +1033,18 @@
1032
1033
  caption: definition.description,
1033
1034
  fdc3: version === "2.0" ? { ...definition, definitionVersion: "2.0" } : undefined,
1034
1035
  };
1035
- if (definition.hostManifests?.["Glue42"]) {
1036
- const decodeRes = glue42HostManifestsBrowserDecoder.run(definition.hostManifests["Glue42"]);
1037
- if (!decodeRes.ok) {
1038
- throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(decodeRes.error)}`);
1039
- }
1040
- if (!Object.keys(decodeRes.result).length) {
1041
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1042
- }
1043
- baseApplicationData = this.mergeBaseAppDataWithGlueManifest(baseApplicationData, decodeRes.result);
1036
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1037
+ if (!ioConnectDefinition) {
1038
+ return baseApplicationData;
1039
+ }
1040
+ const ioDefinitionDecodeRes = glue42HostManifestsBrowserDecoder.run(ioConnectDefinition);
1041
+ if (!ioDefinitionDecodeRes.ok) {
1042
+ throw new Error(`Invalid FDC3 ${version} definition. Error: ${parseDecoderErrorToStringMessage(ioDefinitionDecodeRes.error)}`);
1044
1043
  }
1045
- return baseApplicationData;
1044
+ if (!Object.keys(ioDefinitionDecodeRes.result).length) {
1045
+ return baseApplicationData;
1046
+ }
1047
+ return this.mergeBaseAppDataWithGlueManifest(baseApplicationData, ioDefinitionDecodeRes.result);
1046
1048
  }
1047
1049
  parseToDesktopAppConfig(definition) {
1048
1050
  const { isFdc3, version } = this.isFdc3Definition(definition);
@@ -1079,7 +1081,7 @@
1079
1081
  };
1080
1082
  }
1081
1083
  const fdc3v2Definition = definition;
1082
- let desktopDefinition = {
1084
+ const desktopDefinition = {
1083
1085
  name: fdc3v2Definition.appId,
1084
1086
  type: this.fdc3ToDesktopDefinitionType[fdc3v2Definition.type],
1085
1087
  details: fdc3v2Definition.details,
@@ -1091,13 +1093,14 @@
1091
1093
  intents: this.getIntentsFromV2AppDefinition(fdc3v2Definition),
1092
1094
  fdc3: { ...fdc3v2Definition, definitionVersion: "2.0" }
1093
1095
  };
1094
- if (fdc3v2Definition.hostManifests?.["Glue42"]) {
1095
- if (typeof fdc3v2Definition.hostManifests["Glue42"] !== "object" || Array.isArray(fdc3v2Definition.hostManifests["Glue42"])) {
1096
- throw new Error("Invalid 'hostManifests['Glue42]' key");
1097
- }
1098
- desktopDefinition = this.mergeDesktopConfigWithGlueManifest(desktopDefinition, fdc3v2Definition.hostManifests?.["Glue42"]);
1096
+ const ioConnectDefinition = definition.hostManifests?.ioConnect || definition.hostManifests?.["Glue42"];
1097
+ if (!ioConnectDefinition) {
1098
+ return desktopDefinition;
1099
+ }
1100
+ if (typeof ioConnectDefinition !== "object" || Array.isArray(ioConnectDefinition)) {
1101
+ throw new Error(`Invalid '${definition.hostManifests.ioConnect ? "hostManifests.ioConnect" : "hostManifests['Glue42']"}' key`);
1099
1102
  }
1100
- return desktopDefinition;
1103
+ return this.mergeDesktopConfigWithGlueManifest(desktopDefinition, ioConnectDefinition);
1101
1104
  }
1102
1105
  getUserPropertiesFromDefinition(definition, version) {
1103
1106
  if (version === "1.2") {
@@ -3348,7 +3351,7 @@
3348
3351
  }
3349
3352
  }
3350
3353
 
3351
- var version = "2.2.1";
3354
+ var version = "2.3.0";
3352
3355
 
3353
3356
  class ApplicationsController {
3354
3357
  glueController;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/fdc3",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "IO Connect implementation of the FDC3 standard",
5
5
  "main": "dist/fdc3.umd.js",
6
6
  "module": "dist/fdc3.es.js",
@@ -32,10 +32,13 @@
32
32
  },
33
33
  "license": "MIT",
34
34
  "devDependencies": {
35
- "@interopio/utils": "^1.2.1"
35
+ "@interopio/utils": "^1.3.0"
36
+ },
37
+ "dependencies": {
38
+ "@finos/fdc3": "2.1.0"
36
39
  },
37
40
  "publishConfig": {
38
41
  "access": "public"
39
42
  },
40
- "gitHead": "ca51340ed407172a1db52832ba5827c593754dc5"
43
+ "gitHead": "e8465212356b4fcdb12da69a473ef63a2839a61e"
41
44
  }