{"_id":"@airtame/analytics","name":"@airtame/analytics","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@airtame/analytics","version":"0.1.1","description":"Analytics module for sending data to our data broker.","main":"dist/index.js","scripts":{"build":"npm run clean && cross-env NODE_ENV=production webpack --config ./webpack.config.js --mode=production && npm run declaration","clean":"rimraf ./dist","declaration":"tsc --declaration --declarationDir ./dist","lint:fix":"eslint --fix","prettier:fix":"prettier --write","stylelint":"stylelint --fix","test":"jest --passWithNoTests","watch":"npm run start"},"devDependencies":{"@types/jest":"^26.0.15","@typescript-eslint/eslint-plugin":"^4.5.0","@typescript-eslint/parser":"^4.5.0","cross-env":"^7.0.3","eslint":"^7.12.0","eslint-config-prettier":"^6.14.0","eslint-import-resolver-webpack":"^0.13.0","eslint-loader":"^4.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","fork-ts-checker-webpack-plugin":"^5.2.0","jest":"^26.6.3","prettier":"^2.1.2","prettier-eslint":"^11.0.0","rimraf":"^3.0.2","terser-webpack-plugin":"^5.0.1","ts-jest":"^26.4.4","ts-loader":"^8.0.7","typescript":"^4.0.3","webpack":"^5.2.0","webpack-cli":"^4.9.0"},"engines":{"node":">=16.11.0","npm":">=8.0.0"},"dependencies":{"cross-fetch":"^3.1.4"},"types":"./dist/index.d.ts","gitHead":"4b52b883986781c63a2ee75930f80596cbb5baca","_id":"@airtame/analytics@0.1.1","_nodeVersion":"16.11.0","_npmVersion":"8.0.0","dist":{"integrity":"sha512-vEuyfdhcikMVd/ejlztoZY5e5rDHHyEv84O2FNKwx5yVuHW2ZyICmv3inxdmN8U5GA7qtoYRFAo6D+tiDOheyQ==","shasum":"053712a6e2bd6e4a4568e5b113b4a29d0024a94d","tarball":"https://registry.npmjs.org/@airtame/analytics/-/analytics-0.1.1.tgz","fileCount":11,"unpackedSize":15409,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZHBffPGbr2Jp4Zr3VqkmRBKOFLFqFa9UkTVEE+DlbmQIhAMG3QhoGoNrKiwWt8bpbJITSYfxIGNYOkmpQu0bDyU2F"}]},"_npmUser":{"name":"airtame-ops","email":"devops@airtame.com"},"directories":{},"maintainers":[{"name":"rene-airtame","email":"rene.hansen@airtame.com"},{"name":"airtame-ops","email":"devops@airtame.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/analytics_0.1.1_1711371004695_0.2945309413285677"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-25T12:50:04.586Z","0.1.1":"2024-03-25T12:50:04.842Z","modified":"2024-03-25T12:50:05.406Z"},"maintainers":[{"name":"rene-airtame","email":"rene.hansen@airtame.com"},{"name":"airtame-ops","email":"devops@airtame.com"}],"description":"Analytics module for sending data to our data broker.","readme":"# [Analytics](https://gitlab.com/airtame/arc/analytics/-/blob/main/README.md)\n\nThis package contains the Analytics Tracker used to send analytics to our data broker.\n\n## Usage\n\n### In your project\n\nTo start, make sure that your project is setup to use Airtame's private NPM repository:\n\n```bash\necho @airtame:registry=https://gitlab.com/api/v4/packages/npm/ >> .npmrc\n```\n\nAnd the you can simply install the library:\n\n```bash\nnpm install --save @airtame/analytics\n```\n\n**Note:**\n\nYou will need to set up your NPM config to log onto our Gitlab instance:\n\n```bash\nnpm config set '//gitlab.com/api/v4/packages/npm/:_authToken' \"<your token>\"\n```\n\nBut you should replace `your token` with a token that you generate here:\nhttps://gitlab.com/profile/personal_access_tokens.\n\nYour token should have `read_api` and `read_repository` rights to work.\n\n### Examples\n\nA few tests are included which showcase the usage of the AnalyticsTracker class:\n\n- [analytics-tracker.test.ts](./src/analytics-tracker.test.ts)\n\n## Build\n\nTo build the library:\n\n```bash\n# Install the dependencies\nnpm install\n\n# Run the build script\nnpm run build\n```\n\nAfter that you have the artifacts in the `dist/` folder.\n\n## Development\n\n### Prereleases\n\nThis is the prefered option in case you need to make changes to the library, but\nwould like to verify these changes in a consumer project before creating a real\nrelease.\n\nHere's the suggested way to do it:\n\n1. Decide on the impact level of your change, `major`, `minor` or `patch` and\n   then start a new `pre` release for that version bump. Assuming e.g. `minor`,\n   issue the following:\n\n   `npm version preminor`\n\n2. This will create a new commit with the minor version bumped, and a suffix for\n   the prerelease iteration. E.g. `v1.2.3` -> `v1.3.0-0`.\n3. Push this change to have CI trigger a new build/release cycle.\n4. Test out this version in the consumer project and verify everything works as\n   expected.\n5. If further changes are neded, make them and create a new prerelease iteration\n   like so:\n\n   `npm version prerelease`\n\n   This will increment the prerelease iteration one each time:\n\n   `v1.3.0-1`\n   `v1.3.0-2`\n   `v1.3.0-3`\n\n   Etc.\n\n6. Repeat step 5. until satisfied and then issue a new **real** release:\n\n   `npm version minor`\n\n## [CHANGELOG](./CHANGELOG.md)\n","readmeFilename":"README.md"}