2.0.1 • Published 3 years ago
pn-tracking-utils v2.0.1
A repo with various utils used by the pn tracking team
Info
Currently all utils are CLI commands, and therefore the instructions for using or creating new utils are from that perspective, in the future we might add posibilities to create utils that can be used in inline code.
Available Util functions
invalidateCache
Invalidates a CF distribution cache, used after deploys to ensure users get the newest content
example
./node_modules/.bin/invalidateCache -distributionId E11H3T7TK5IA4S -path /premium* -callerReference customer_portal_tracking
Options
Parameter | Description | Required | Default |
---|---|---|---|
distributionId | Cloudfront distribution Id | true | |
path | Path to be invalidated | true | |
callerReference | Reference of who is making the invalidation | false | system-invalidation |
Testing
To test any current function run the file directly using
node bin/filename.js -arg argValue