Nutella Peanut-Butter Marshmallow
Miss any of our Open RFC calls?Watch the recordings here! »

pos-portal-operational-reports-lib

1.1.2 • Public • Published

Background

This library is designed to be shared between the WebService and UI layer. This library has two main purposes:

  1. Provide strongly-typed models so the UI layer knows what type of data to expect
  2. Define the logic interface and provide a client-proxy for calling the service so the caller (typiclly UI layer) doesn't need to understand the internals of building urls, interpretting repsonses, etc when calling the service.

Technical

Building the project

Note: You may also use npm, but yarn typically provides a better (faster) experience

yarn install
yarn run build

Committing Changes

It's important that when you commit changes you remember to build and test the project before committing. If you forget to do this, it could break clients attempting to consume your changes. To help with this, you can run the following command:

npm run installHooks

This will install some git hooks that will automatically build and test the project before committing.

Consuming the project

To consume this project, you need to create a git-style reference in the package.json file of the consuming project. You should ensure that you reference a specific commit (via the commit SHA hash) so that you get repeatable builds. Below is an example:

"devDependencies": {
    "pos-portal-operational-reports-access": "git+https://vl185.msais.com/bitbucket/scm/portal/operational-reports-lib.git#f67adcadd8c1dcc910dcbd45d3977adadb8e56b8"
}

Known Issues

  • "dom" reference inconsistency
    • Since this library is intended to be shared by the UI and WebService layer, it's a little odd for it to reference the "dom" lib in tsconfig.json. The reason it needs this dom reference is because of the client proxy's usage of the "fetch" api. We considered pulling this class out into it's own project, but it doesn't currently feel worth the overhead (maintaining another build definition, referencing another project, etc), so for now we'll live with this "slight inconsistency". The developer will be repsonible for ensuring that no logic intended to be executed on the server uses any dom apis.

Keywords

none

Install

npm i pos-portal-operational-reports-lib

DownloadsWeekly Downloads

1

Version

1.1.2

License

ISC

Unpacked Size

24.5 kB

Total Files

31

Last publish

Collaborators

  • avatar