@openfin/node-adapter 46.100.57 → 46.100.58

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +25 -12
  2. package/package.json +2 -2
@@ -17141,6 +17141,30 @@ class BufferReader {
17141
17141
  }
17142
17142
  }
17143
17143
 
17144
+ /**
17145
+ * Optional `platform` avoids stubbing os.platform in tests.
17146
+ * On macOS, the RVM appends --security-realm=standalone_app_<hash> for
17147
+ * standalone-app launches (see RuntimeManagerMac), overriding the
17148
+ * manifest realm. Accept these standalone_app_* realms as valid when the
17149
+ * runtime version matches so port discovery succeeds on macOS.
17150
+ */
17151
+ function matchRuntimeInstance(config, message, platform = os__namespace.platform()) {
17152
+ const args = config.runtime.arguments || '';
17153
+ const realm = config.runtime.securityRealm || (args.split('--security-realm=')[1] || '').split(' ')[0];
17154
+ if (config.runtime.version && realm) {
17155
+ const versionMatch = config.runtime.version === message.requestedVersion;
17156
+ const realmMatch = realm === message.securityRealm ||
17157
+ (platform === 'darwin' &&
17158
+ typeof message.securityRealm === 'string' &&
17159
+ message.securityRealm.startsWith('standalone_app_'));
17160
+ return versionMatch && realmMatch;
17161
+ }
17162
+ if (config.runtime.version) {
17163
+ return config.runtime.version === message.requestedVersion && !message.securityRealm;
17164
+ }
17165
+ return false;
17166
+ }
17167
+
17144
17168
  /* eslint-disable @typescript-eslint/naming-convention */
17145
17169
  const launcher = new Launcher();
17146
17170
  // value for message_type
@@ -17155,17 +17179,6 @@ var DiscoverState;
17155
17179
  DiscoverState[DiscoverState["HELLO"] = 1] = "HELLO";
17156
17180
  DiscoverState[DiscoverState["PORT_MESSAGE"] = 2] = "PORT_MESSAGE";
17157
17181
  })(DiscoverState || (DiscoverState = {}));
17158
- function matchRuntimeInstance(config, message) {
17159
- const args = config.runtime.arguments || '';
17160
- const realm = config.runtime.securityRealm || (args.split('--security-realm=')[1] || '').split(' ')[0];
17161
- if (config.runtime.version && realm) {
17162
- return config.runtime.version === message.requestedVersion && realm === message.securityRealm;
17163
- }
17164
- if (config.runtime.version) {
17165
- return config.runtime.version === message.requestedVersion && !message.securityRealm;
17166
- }
17167
- return false;
17168
- }
17169
17182
  function generateManifest(config) {
17170
17183
  const manifest = {
17171
17184
  devtools_port: config.devToolsPort,
@@ -17446,7 +17459,7 @@ class NodeEnvironment extends BaseEnvironment {
17446
17459
  };
17447
17460
  }
17448
17461
  getAdapterVersionSync() {
17449
- return "46.100.57";
17462
+ return "46.100.58";
17450
17463
  }
17451
17464
  observeBounds(element, onChange) {
17452
17465
  throw new Error('Method not implemented.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "46.100.57",
3
+ "version": "46.100.58",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -20,7 +20,7 @@
20
20
  "es-toolkit": "^1.39.3",
21
21
  "ws": "^7.5.10",
22
22
  "tslib": "2.8.1",
23
- "@openfin/core": "46.100.57"
23
+ "@openfin/core": "46.100.58"
24
24
  },
25
25
  "scripts": {
26
26
  "prebuild": "rimraf ./out",