@interopio/fdc3 2.4.0-next.0 → 2.4.1

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.
package/changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ 2.4.1
2
+ fix: fixed initialization delay when running in a io.cd clients outside of io.cd
3
+ chore: improvement to getOrCreateChannel to be more compliant with the standard
4
+ 2.4.0
5
+ chore: Change log level when fdc3.broadcast is used while not joined on a channel
6
+ fix: fdc3.raiseIntent filtering by contextType for instance handlers
1
7
  2.3.3
2
8
  chore: unified repo bump
3
9
  2.3.2
@@ -2307,6 +2307,14 @@ class GlueController {
2307
2307
  async checkIsFdc3DataWrappingSupported() {
2308
2308
  const globalBrowserNamespace = window.glue42core || window.iobrowser;
2309
2309
  const methodName = globalBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
2310
+ const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
2311
+ if (!myServer) {
2312
+ return false;
2313
+ }
2314
+ const registersControlMethod = myServer.getMethods().some((method) => method.name === methodName);
2315
+ if (!registersControlMethod) {
2316
+ return false;
2317
+ }
2310
2318
  const data = globalBrowserNamespace ? { domain: "system", operation: "isFdc3DataWrappingSupported" } : { command: "isFdc3DataWrappingSupported" };
2311
2319
  try {
2312
2320
  const res = await this.glue.interop.invoke(methodName, data, { instance: this.interopInstance().instance });
@@ -3295,7 +3303,7 @@ class IntentsController {
3295
3303
  }
3296
3304
  }
3297
3305
 
3298
- var version = "2.4.0-next.0";
3306
+ var version = "2.4.1";
3299
3307
 
3300
3308
  class ApplicationsController {
3301
3309
  glueController;
@@ -4196,10 +4204,9 @@ class ChannelsBaseController {
4196
4204
  async getOrCreateChannel({ commandId, channelId }) {
4197
4205
  await this.initDonePromise;
4198
4206
  this.logger?.info(`[${commandId}] - getOrCreateChannel() invoked for channel with id ${channelId}`);
4199
- const isUserChannel = this.isUserChannel(channelId);
4200
- if (isUserChannel) {
4201
- this.logger?.error("There's an already existing system channel with passed id. Retrieve it using fdc3.getSystemChannels() or create a new app channel with a different id");
4202
- throw new Error(ChannelError.AccessDenied);
4207
+ const userChannel = (await this.getUserChannels(commandId)).find((ch) => ch.id === channelId);
4208
+ if (userChannel) {
4209
+ return userChannel;
4203
4210
  }
4204
4211
  const isPrivateChannel = this.stateStore.getPrivateChannelById(channelId);
4205
4212
  if (isPrivateChannel) {
@@ -2313,6 +2313,14 @@
2313
2313
  async checkIsFdc3DataWrappingSupported() {
2314
2314
  const globalBrowserNamespace = window.glue42core || window.iobrowser;
2315
2315
  const methodName = globalBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
2316
+ const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
2317
+ if (!myServer) {
2318
+ return false;
2319
+ }
2320
+ const registersControlMethod = myServer.getMethods().some((method) => method.name === methodName);
2321
+ if (!registersControlMethod) {
2322
+ return false;
2323
+ }
2316
2324
  const data = globalBrowserNamespace ? { domain: "system", operation: "isFdc3DataWrappingSupported" } : { command: "isFdc3DataWrappingSupported" };
2317
2325
  try {
2318
2326
  const res = await this.glue.interop.invoke(methodName, data, { instance: this.interopInstance().instance });
@@ -3301,7 +3309,7 @@
3301
3309
  }
3302
3310
  }
3303
3311
 
3304
- var version = "2.4.0-next.0";
3312
+ var version = "2.4.1";
3305
3313
 
3306
3314
  class ApplicationsController {
3307
3315
  glueController;
@@ -4202,10 +4210,9 @@
4202
4210
  async getOrCreateChannel({ commandId, channelId }) {
4203
4211
  await this.initDonePromise;
4204
4212
  this.logger?.info(`[${commandId}] - getOrCreateChannel() invoked for channel with id ${channelId}`);
4205
- const isUserChannel = this.isUserChannel(channelId);
4206
- if (isUserChannel) {
4207
- this.logger?.error("There's an already existing system channel with passed id. Retrieve it using fdc3.getSystemChannels() or create a new app channel with a different id");
4208
- throw new Error(ChannelError.AccessDenied);
4213
+ const userChannel = (await this.getUserChannels(commandId)).find((ch) => ch.id === channelId);
4214
+ if (userChannel) {
4215
+ return userChannel;
4209
4216
  }
4210
4217
  const isPrivateChannel = this.stateStore.getPrivateChannelById(channelId);
4211
4218
  if (isPrivateChannel) {
package/dist/fdc3.es.js CHANGED
@@ -2296,6 +2296,14 @@ class GlueController {
2296
2296
  async checkIsFdc3DataWrappingSupported() {
2297
2297
  const globalBrowserNamespace = window.glue42core || window.iobrowser;
2298
2298
  const methodName = globalBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
2299
+ const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
2300
+ if (!myServer) {
2301
+ return false;
2302
+ }
2303
+ const registersControlMethod = myServer.getMethods().some((method) => method.name === methodName);
2304
+ if (!registersControlMethod) {
2305
+ return false;
2306
+ }
2299
2307
  const data = globalBrowserNamespace ? { domain: "system", operation: "isFdc3DataWrappingSupported" } : { command: "isFdc3DataWrappingSupported" };
2300
2308
  try {
2301
2309
  const res = await this.glue.interop.invoke(methodName, data, { instance: this.interopInstance().instance });
@@ -3284,7 +3292,7 @@ class IntentsController {
3284
3292
  }
3285
3293
  }
3286
3294
 
3287
- var version = "2.4.0-next.0";
3295
+ var version = "2.4.1";
3288
3296
 
3289
3297
  class ApplicationsController {
3290
3298
  glueController;
@@ -4185,10 +4193,9 @@ class ChannelsBaseController {
4185
4193
  async getOrCreateChannel({ commandId, channelId }) {
4186
4194
  await this.initDonePromise;
4187
4195
  this.logger?.info(`[${commandId}] - getOrCreateChannel() invoked for channel with id ${channelId}`);
4188
- const isUserChannel = this.isUserChannel(channelId);
4189
- if (isUserChannel) {
4190
- this.logger?.error("There's an already existing system channel with passed id. Retrieve it using fdc3.getSystemChannels() or create a new app channel with a different id");
4191
- throw new Error(ChannelError.AccessDenied);
4196
+ const userChannel = (await this.getUserChannels(commandId)).find((ch) => ch.id === channelId);
4197
+ if (userChannel) {
4198
+ return userChannel;
4192
4199
  }
4193
4200
  const isPrivateChannel = this.stateStore.getPrivateChannelById(channelId);
4194
4201
  if (isPrivateChannel) {
package/dist/fdc3.umd.js CHANGED
@@ -2302,6 +2302,14 @@
2302
2302
  async checkIsFdc3DataWrappingSupported() {
2303
2303
  const globalBrowserNamespace = window.glue42core || window.iobrowser;
2304
2304
  const methodName = globalBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
2305
+ const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
2306
+ if (!myServer) {
2307
+ return false;
2308
+ }
2309
+ const registersControlMethod = myServer.getMethods().some((method) => method.name === methodName);
2310
+ if (!registersControlMethod) {
2311
+ return false;
2312
+ }
2305
2313
  const data = globalBrowserNamespace ? { domain: "system", operation: "isFdc3DataWrappingSupported" } : { command: "isFdc3DataWrappingSupported" };
2306
2314
  try {
2307
2315
  const res = await this.glue.interop.invoke(methodName, data, { instance: this.interopInstance().instance });
@@ -3290,7 +3298,7 @@
3290
3298
  }
3291
3299
  }
3292
3300
 
3293
- var version = "2.4.0-next.0";
3301
+ var version = "2.4.1";
3294
3302
 
3295
3303
  class ApplicationsController {
3296
3304
  glueController;
@@ -4191,10 +4199,9 @@
4191
4199
  async getOrCreateChannel({ commandId, channelId }) {
4192
4200
  await this.initDonePromise;
4193
4201
  this.logger?.info(`[${commandId}] - getOrCreateChannel() invoked for channel with id ${channelId}`);
4194
- const isUserChannel = this.isUserChannel(channelId);
4195
- if (isUserChannel) {
4196
- this.logger?.error("There's an already existing system channel with passed id. Retrieve it using fdc3.getSystemChannels() or create a new app channel with a different id");
4197
- throw new Error(ChannelError.AccessDenied);
4202
+ const userChannel = (await this.getUserChannels(commandId)).find((ch) => ch.id === channelId);
4203
+ if (userChannel) {
4204
+ return userChannel;
4198
4205
  }
4199
4206
  const isPrivateChannel = this.stateStore.getPrivateChannelById(channelId);
4200
4207
  if (isPrivateChannel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/fdc3",
3
- "version": "2.4.0-next.0",
3
+ "version": "2.4.1",
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,13 +32,14 @@
32
32
  },
33
33
  "license": "MIT",
34
34
  "devDependencies": {
35
- "@interopio/utils": "^1.4.0-next.0"
35
+ "@interopio/utils": "^1.4.0"
36
36
  },
37
37
  "dependencies": {
38
38
  "@finos/fdc3": "2.1.0"
39
39
  },
40
40
  "publishConfig": {
41
+ "@interopio:registry": "https://registry.npmjs.org",
41
42
  "access": "public"
42
43
  },
43
- "gitHead": "829e13f42f5f68b20bc5189e1faa74aae834a0d3"
44
+ "gitHead": "fcada3f27f1e123cbcd1da9bb1195346f7fe1896"
44
45
  }