{"_id":"@asayerio/tracker-axios","_rev":"5-fb3b3a12465a4222fc8c55603ac1d998","name":"@asayerio/tracker-axios","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@asayerio/tracker-axios","description":"Tracker plugin for axios requests recording","version":"1.0.0","axios":["axios","logging","replay"],"author":{"name":"Aleksandr K","email":"alex@openreplay.com"},"license":"MIT","type":"module","main":"./lib/index.js","scripts":{"lint":"prettier --write 'src/**/*.ts' README.md && tsc --noEmit","build":"npm run build-es && npm run build-cjs","build-es":"rm -Rf lib && tsc","build-cjs":"rm -Rf cjs && tsc --project tsconfig-cjs.json && echo '{ \"type\": \"commonjs\" }' > cjs/package.json && replace-in-files cjs/* --string='@asayerio/tracker' --replacement='@asayerio/tracker/cjs' && replace-in-files cjs/* --string='/lib/' --replacement='/'","prepublishOnly":"npm run build"},"dependencies":{},"peerDependencies":{"@asayerio/tracker":"^5.6.8","axios":"^0.21.1"},"devDependencies":{"@asayerio/tracker":"^5.6.8","axios":"^0.21.1","prettier":"^1.18.2","replace-in-files-cli":"^1.0.0","typescript":"^3.6.4"},"_id":"@asayerio/tracker-axios@1.0.0","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-R/p++u72gnIlrlgxnstiREa8BGjh35+lgDYMR3OQBQOSGEP025rXYfV7UG3dbDP2DYGtszWSPqVaP/QJgPLXFQ==","shasum":"66cee37ea84c6e3351863212b8176823f83dee32","tarball":"https://registry.npmjs.org/@asayerio/tracker-axios/-/tracker-axios-1.0.0.tgz","fileCount":12,"unpackedSize":14346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh117lCRA9TVsSAnZWagAA8woQAJjsMnYOxeAMOFBIQ+rb\ne0anzVRPB8xS0zOmlQZqKaqxPEgQc2taY/XneHtzVsinZ58kXxMCVgWlhlaa\nj9qG6oYo78tNxkLje6DFAaCbZkzY0SRyRZ6yVNGADPnuDiK4Jx6Uz6JmC2ng\nkjNtdgk1rb+dfPOOnEZvtEQP2laSBZnhIAwZWyjcuh45DAJWMruvfOX7rUd8\nPGdQrs8wV9r/PibXdqQQMDOWv4//WaDGCwOJ/Xt3uZaGK16d3zUrOz2aaIPs\nZZjqwW5qbuyErfCzt2E4cnV5Zn9swmhldOHpcamtuTvyKV11bK7fcIn7sl2b\nw7BeeKn9RU2+8jfVdnOyRZ1TvskIp4eTSAiW0mG4mV71ok5qxBYWo6JmSC6g\nDYZzunyohH39st15HIVygfSbn/nUC6cZpICJsv1/vJDakhUN6U9DcZ0BozpN\nmXL1jUMbnPcU2sKwvAJ34aPm+mNGira8TVr1sGrCC+YlEcXlj2e1ZIfV3gUV\ng2YUSqlHgvRExwCFbGRD6fo0WohXIEEZz76WLmc9bOheuV350Vt6np4a1RoY\nW/T8aXPn2V90pGp90DWLPDAy62C2TStr9n/w8FZMBkgWK3NClnJBw96KKWTc\nI2wO9nmfZCvoV4EuJbcoiQczWKYY+4OrTOZf5bbzJ2WXr1zjeSTX+RR6dH/k\n/1al\r\n=GwMG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQgRQr4LfWKQtxqdOVqngsRQzwZHtY0By3+goAJn76CAIhAOSFHb/EkKcadCsCVzB0VYRt8OLxCa7DS90WQXllgjsv"}]},"_npmUser":{"name":"pandacodes","email":"alex.kaminsky.11@gmail.com"},"directories":{},"maintainers":[{"name":"estradino","email":"support@asayer.io"},{"name":"tahayk","email":"tahayk2@gmail.com"},{"name":"pandacodes","email":"alex.kaminsky.11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tracker-axios_1.0.0_1622054896895_0.20355424220262686"},"_hasShrinkwrap":false,"deprecated":"This package is no longer maintained. Please, use @openreplay/tracker and @openreplay/tracker-axios instead"}},"time":{"created":"2021-05-26T18:48:16.596Z","1.0.0":"2021-05-26T18:48:17.070Z","modified":"2022-08-15T16:00:19.336Z"},"maintainers":[{"email":"support@asayer.io","name":"estradino"}],"description":"Tracker plugin for axios requests recording","author":{"name":"Aleksandr K","email":"alex@openreplay.com"},"license":"MIT","readme":"# Asayer Tracker Axios plugin\n\nTracker plugin to support tracking of the [Axios](https://axios-http.com/) requests.\n\n## Installation\n\n```bash\nnpm i @asayerio/tracker-axios\n```\n\n## Usage\n\nInitialize the `@asayerio/tracker` package as usual and load the plugin into it.\n\n```js\nimport Tracker from '@asayerio/tracker';\nimport trackerAxios from '@asayerio/tracker-axios';\n\nconst tracker = new Tracker({\n  projectID: YOUR_PROJECT_ID,\n});\ntracker.start();\n\ntracker.use(trackerAxios());\n```\nOptions:\n\n```ts\n{\n\tinstance: AxiosInstance;                       // default: axios\n  failuresOnly: boolean;                         // default: true\n  captureWhen: (AxiosRequestConfig) => boolean;  // default: () => true\n  sessionTokenHeader: string;                    // default: undefined\n}\n```\nBy default plugin connects to the static `axios` instance, but you can specify one with the `instance` option.\n\nSet `failuresOnly` option to `false` if you want to record every single request regardless of the status code. By default only failed requests are captured, when the axios' promise is rejected. You can also [regulate](https://github.com/axios/axios#request-config) this axios behaviour with the `validateStatus` option.\n\n`captureWhen` parameter allows you to set a filter on what should be captured. The function will be called with the axios config object and expected to return `true` or `false`.\n\nIn case you use [OpenReplay integrations (sentry, bugsnag or others)](https://docs.asayer.io/integrations), you can use `sessionTokenHeader` option to specify the header name. This header will be appended automatically to the each axios request and will contain OpenReplay session identificator value.\n","readmeFilename":"README.md"}