@shipengine/toll-shipping
v1.1.5
Published
Shared library for Toll Group on ShipEngine
Downloads
81
Maintainers
Keywords
Readme
Toll Shared Library
This is a shared library used by Toll Group carriers integrated into SE Connect.
The following environment variables are required for any SE Connect App referencing this library:
- BASIC_AUTH_USER - Toll API User Name
- PASSWORD_UAT - Toll API Test Password
- PASSWORD_PRD - Toll API Production Password
To get the required files and fonts for label-gen, you may need to copy-paste the static folder into the root directory of the connect runtime.
Documentation
Documentation for the Toll API is in the /docs
folder.
Test Changes Locally
To test changes in this shared library without publishing, run npm link
in this directory and then switch to the SE Connect App directory and run npm link @shipengine/toll-shipping
.
- Make sure to run
npm run build
in this directory when any change is made.
Unit Tests
Tests are located under src/utils/__tests__
. Use npm run test
to run them.
Build Tracking Events
Run npm run convert-tracking-events
to convert csv tracking event data into json.
- This script should be ran if any csv data file is added or updated.
- There should be a csv file in
src/data
for each Business ID supported. Business IDs are defined insrc/utils/constants.ts
.
Push Updates
- Make sure the latest changes are built with
npm run build
and unit tests succeed withnpm run test
. - Increment the minor version in
package.json
then runnpm install
to increment version inpackage-lock.json
- Preview the package contents with
npm publish --dry-run
to make sure everything looks correct. - Run
npm publish
and the public npm library should have its version incremented.- The library will become available to install in the Toll SE Connect Apps.
- Note: You will need to create an account on the npm website and request permissions to publish from the IT Help Desk.