NPM @bcgovimage

The purpose of NPM is to share independently usable packages of code for teams to achieve a variety of capabilities in their systems. This depends on how they choose to use each package. For example, our Common Service Showcase Team is using a few of these packages to delivery the functionality contained in the Document Generation API image which we published to DockerHub. We are also hosting that doc-gen image as an API that teams, who do not want to host their own instance of, can make webservice calls to.

Packages

Share independently usable packages of code for teams to achieve a variety of capabilities in their systems.

Common Document Generation Service NPM Packages
[Deprecated] Carbone Copy API
[Deprecated] Express library that provides and interface for generating documents from templates and data. It provides a local file storage cache that means callers do not have to upload the template for each render. Callers should should store cache keys/hashes and check if templates exist before generation. This is a wrapper around carbone, please refer to their documentation for more detail. The API follows their recommendations.

https://www.npmjs.com/package/@bcgov/carbone-copy-api
[Deprecated] Carbone Render
[Deprecated] Library to generate a document from an existing template and JSON data. This is a wrapper around carbone, please refer to their documentation for more detail.

https://www.npmjs.com/package/@bcgov/carbone-render
[Deprecated] File Cache
[Deprecated] Library to store files locally identified by a hash of the file contents. A sub-directory is created and identified by a hash of the file, the original file is then stored under the hash sub-directory. The hash is created when writing the binary contents to disk. Each file will generate a unique hash.

https://www.npmjs.com/package/@bcgov/file-cache