
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@openfin/node-adapter
Advanced tools
Allows the use of the OpenFin API from node.js. Please note that the launch
and connect
methods are specific to a node environment.
connect
can be used to establish a connection to an OpenFin runtime from node.
A uuid
value must be provided to identify the connection. Multiple connections require distinct uuid
values.
A Runtime version or manifest URL must also be specified.
Note:
connect
instantiates a Runtime instance if one does not exist for the given configuration. If a Runtime is already running,connect
simply establishes a new connection.
import { connect } from '@openfin/node-adapter';
(async () => {
const fin = await connect({
uuid: 'my-uuid-123',
runtime: {
version: 'stable'
}
});
await fin.Platform.startFromManifest('http://www.your-domain-goes-here.com/manifest.json');
})();
import { connect } from '@openfin/node-adapter';
(async () => {
const fin = await connect({
uuid: 'connection-id',
manifestUrl: 'http://www.your-domain-goes-here.com/manifest'
});
})();
Unlike connect
, launch
starts an OpenFin application if not running and returns a port number instead of a fin
object.
This port number can be provided to connect to create a fin
object for the Runtime that has been created on the specific port.
launch
can be called multiple times for a given application; however launches for an application that is already running result in a run-requested event being triggered instead of a relaunch. If the application is an OpenFin platform, this scenario results in the layout windows reloading.
import { launch, connect } from '@openfin/node-adapter';
(async () => {
const port = await launch({
manifestUrl: 'http://www.your-domain-goes-here.com/manifest'
});
const fin = await connect({
address: `ws://localhost:${port}`,
uuid: 'external-app-via-launch'
});
console.log(await fin.System.getRuntimeInfo());
})();
@openfin/node-adapter
comes bundled with its own types.
If you wish to explicitly reference OpenFin types, the OpenFin
namespace export can be used as follows:
import OpenFin, { connect } from '@openfin/node-adapter';
(async () => {
const fin: OpenFin.Fin<'external connection'> = await connect({
uuid: 'connection-id'
});
const platform: OpenFin.Platform = await fin.Platform.startFromManifest(
'http://www.your-domain-goes-here.com/manifest'
);
})();
For users of the connect
and launch
functions in openfin-adapter
, no changes are necessary, other than updating the dependency name.
If you are using the exported types from openfin-adapter
, you can now use the OpenFin
export that encapsualates them.
import { launch, connect, Application, Fin } from 'openfin-adapter';
(async () => {
const fin: Fin = await connect({
uuid: 'external-connection-1',
runtime: { version: 'stable' }
});
const app: Application = await fin.Application.start({...});
})()
import OpenFin, { launch, connect } from '@openfin/node-adapter';
(async () => {
const fin: OpenFin.Fin<'external connection'> = await connect({
uuid: 'external-connection-1',
runtime: { version: 'stable' }
});
const app: OpenFin.Application = await fin.Application.start({...});
})()
FAQs
See README.md
The npm package @openfin/node-adapter receives a total of 2,551 weekly downloads. As such, @openfin/node-adapter popularity was classified as popular.
We found that @openfin/node-adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.