diff --git a/how-to/customize-home-templates/scripts/launch.mjs b/how-to/customize-home-templates/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/customize-home-templates/scripts/launch.mjs +++ b/how-to/customize-home-templates/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-server-authentication/scripts/launch.mjs b/how-to/integrate-server-authentication/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-server-authentication/scripts/launch.mjs +++ b/how-to/integrate-server-authentication/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-bloomberg-basic/scripts/launch.mjs b/how-to/integrate-with-bloomberg-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-bloomberg-basic/scripts/launch.mjs +++ b/how-to/integrate-with-bloomberg-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-excel/scripts/launch.mjs b/how-to/integrate-with-excel/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-excel/scripts/launch.mjs +++ b/how-to/integrate-with-excel/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-ms365-basic/scripts/launch.mjs b/how-to/integrate-with-ms365-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-ms365-basic/scripts/launch.mjs +++ b/how-to/integrate-with-ms365-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-ms365-low-code-basic/scripts/launch.mjs b/how-to/integrate-with-ms365-low-code-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-ms365-low-code-basic/scripts/launch.mjs +++ b/how-to/integrate-with-ms365-low-code-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-ms365-low-code/scripts/launch.mjs b/how-to/integrate-with-ms365-low-code/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-ms365-low-code/scripts/launch.mjs +++ b/how-to/integrate-with-ms365-low-code/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-ms365/scripts/launch.mjs b/how-to/integrate-with-ms365/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-ms365/scripts/launch.mjs +++ b/how-to/integrate-with-ms365/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-openid-connect/scripts/launch.mjs b/how-to/integrate-with-openid-connect/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-openid-connect/scripts/launch.mjs +++ b/how-to/integrate-with-openid-connect/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-rss/scripts/launch.mjs b/how-to/integrate-with-rss/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-rss/scripts/launch.mjs +++ b/how-to/integrate-with-rss/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-salesforce-basic/scripts/launch.mjs b/how-to/integrate-with-salesforce-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-salesforce-basic/scripts/launch.mjs +++ b/how-to/integrate-with-salesforce-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-salesforce/scripts/launch.mjs b/how-to/integrate-with-salesforce/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-salesforce/scripts/launch.mjs +++ b/how-to/integrate-with-salesforce/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-servicenow-basic/scripts/launch.mjs b/how-to/integrate-with-servicenow-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-servicenow-basic/scripts/launch.mjs +++ b/how-to/integrate-with-servicenow-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-servicenow/scripts/launch.mjs b/how-to/integrate-with-servicenow/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-servicenow/scripts/launch.mjs +++ b/how-to/integrate-with-servicenow/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-snap-basic/scripts/launch.mjs b/how-to/integrate-with-snap-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-snap-basic/scripts/launch.mjs +++ b/how-to/integrate-with-snap-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integrate-with-snap/scripts/launch.mjs b/how-to/integrate-with-snap/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/integrate-with-snap/scripts/launch.mjs +++ b/how-to/integrate-with-snap/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-browser/scripts/launch.mjs b/how-to/register-with-browser/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-browser/scripts/launch.mjs +++ b/how-to/register-with-browser/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-dock-basic/scripts/launch.mjs b/how-to/register-with-dock-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-dock-basic/scripts/launch.mjs +++ b/how-to/register-with-dock-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-dock/scripts/launch.mjs b/how-to/register-with-dock/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-dock/scripts/launch.mjs +++ b/how-to/register-with-dock/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-home-basic/scripts/launch.mjs b/how-to/register-with-home-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-home-basic/scripts/launch.mjs +++ b/how-to/register-with-home-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-home/scripts/launch.mjs b/how-to/register-with-home/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-home/scripts/launch.mjs +++ b/how-to/register-with-home/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-platform-windows/scripts/launch.mjs b/how-to/register-with-platform-windows/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-platform-windows/scripts/launch.mjs +++ b/how-to/register-with-platform-windows/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-store-basic/scripts/launch.mjs b/how-to/register-with-store-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-store-basic/scripts/launch.mjs +++ b/how-to/register-with-store-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/register-with-store/scripts/launch.mjs b/how-to/register-with-store/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/register-with-store/scripts/launch.mjs +++ b/how-to/register-with-store/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/support-context-and-intents/scripts/launch.mjs b/how-to/support-context-and-intents/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/support-context-and-intents/scripts/launch.mjs +++ b/how-to/support-context-and-intents/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-notifications/scripts/launch.mjs b/how-to/use-notifications/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/use-notifications/scripts/launch.mjs +++ b/how-to/use-notifications/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-theming-basic/scripts/launch.mjs b/how-to/use-theming-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/use-theming-basic/scripts/launch.mjs +++ b/how-to/use-theming-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-theming/scripts/launch.mjs b/how-to/use-theming/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/use-theming/scripts/launch.mjs +++ b/how-to/use-theming/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/workspace-native-window-integration/scripts/launch.mjs b/how-to/workspace-native-window-integration/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/workspace-native-window-integration/scripts/launch.mjs +++ b/how-to/workspace-native-window-integration/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/workspace-platform-starter-basic/scripts/launch.mjs b/how-to/workspace-platform-starter-basic/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/workspace-platform-starter-basic/scripts/launch.mjs +++ b/how-to/workspace-platform-starter-basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/workspace-platform-starter/CHANGELOG.md b/how-to/workspace-platform-starter/CHANGELOG.md index 268748c4da..63dac74f63 100644 --- a/how-to/workspace-platform-starter/CHANGELOG.md +++ b/how-to/workspace-platform-starter/CHANGELOG.md @@ -73,6 +73,7 @@ - Added sharing for pages moved into module - Added sharing for workspaces moved into module - Added example dummy share server for testing locally (stores in memory), to use update manifest.fin.json `https://workspace.openfin.co` references to `http://localhost:8080` +- Fixed Interop Broker client registration helper logic to ensure that a connectionUrl has a value. Empty strings were resulting in native apps being identified as supporting FDC3 2.0 instead of interop. ## v15 diff --git a/how-to/workspace-platform-starter/client/src/framework/platform/broker/client-registration-helper.ts b/how-to/workspace-platform-starter/client/src/framework/platform/broker/client-registration-helper.ts index 09c9cf36db..a0dfe5473d 100644 --- a/how-to/workspace-platform-starter/client/src/framework/platform/broker/client-registration-helper.ts +++ b/how-to/workspace-platform-starter/client/src/framework/platform/broker/client-registration-helper.ts @@ -9,7 +9,7 @@ import type { ApiMetadata } from "../../shapes/interopbroker-shapes"; import type { Logger } from "../../shapes/logger-shapes"; -import { isEmpty } from "../../utils"; +import { isEmpty, isStringValue } from "../../utils"; /** * Used to track client interactions with a broker. @@ -192,7 +192,7 @@ export class ClientRegistrationHelper { const payloadApiVersion = payload?.apiVersion; if (!isEmpty(payloadApiVersion) && !isEmpty(payloadApiVersion?.type)) { apiVersion = payloadApiVersion; - } else if (!isEmpty(id.connectionUrl)) { + } else if (isStringValue(id.connectionUrl)) { // if they haven't specified apiVersion meta data and it is external and has a url then we will assume fdc3 2.0 apiVersion = { type: "fdc3", version: "2.0" }; } else { diff --git a/how-to/workspace-platform-starter/scripts/launch.mjs b/how-to/workspace-platform-starter/scripts/launch.mjs index 1ad26eefdf..2aa68a3fc1 100644 --- a/how-to/workspace-platform-starter/scripts/launch.mjs +++ b/how-to/workspace-platform-starter/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`);