Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 1.94 KB

deps.md

File metadata and controls

54 lines (33 loc) · 1.94 KB

Third-party modules

The library imports and re-exports certain third-party modules likely to be useful across Factory+ services. This is partly for convenience and partly to abstract out dependencies which may need to change in the future.

GSSAPI

import { GSS } from "@amrc-factoryplus/utilities";

This is an export of the gssapi.js npm module, which provides an interface to the Kerberos library. On Windows GSS can be imported, but imports as undefined, as we currently don't support GSSAPI on Windows.

MQTT

import { MQTT } from "@amrc-factoryplus/utilities";

This is a straight re-export of the mqtt npm module.

Sparkplug

import { SpB } from "@amrc-factoryplus/utilities";

This is a re-export of the Sparkplug B v1.0 payload decoder from the official sparkplug-payload Javascript library.

Postgres

import { Pg } from "@amrc-factoryplus/utilities";

This is a re-export of the native bindings to the Postgresql client libraries. The Docker images ensure that these have been build with GSSAPI support, allowing the client to use Factory+ Kerberos credentials to access the database.

Fetch

import { fetch } from "@amrc-factoryplus/utilities";

This is an implementation of the Fetch API. Currently this is provided by got-fetch, as this is the only implementation available for Node which provides correct caching support; this may change in the future, especially if Node provides a native implementation.