{"name":"@scarf/scarf","version":"0.1.7","description":"Scarf is like Google Analytics for your npm packages. Gain insights into how your packages are installed and used, and by which companies.","main":"report.js","homepage":"https://github.com/scarf-sh/scarf-js","repository":{"type":"git","url":"git+https://github.com/scarf-sh/scarf-js.git"},"scripts":{"postinstall":"node ./report.js","test":"jest"},"author":{"name":"Scarf Systems"},"license":"MIT","devDependencies":{"jest":"^25.3.0","minimist":"^1.2.2","standard":"^14.3.1"},"standard":{"globals":["expect","test","jest","beforeAll","afterAll","describe"]},"readme":"# scarf-js\n\n![](https://github.com/scarf-sh/scarf-js/workflows/CI/badge.svg)\n[![npm version](https://badge.fury.io/js/%40scarf%2Fscarf.svg)](https://badge.fury.io/js/%40scarf%2Fscarf)\n![](https://img.shields.io/npm/dw/@scarf/scarf)\n\nScarf is like Google Analytics for your npm packages. By sending some basic\ndetails after installation, this package can help you can gain insights into how\nyour packages are used and by which companies. Scarf aims to help support\nopen-source developers fund their work when used commercially.\n\nTo read more about why we wrote this library, check out [this post](https://github.com/scarf-sh/scarf-js/blob/master/WHY.org) on the topic.\n\n### Features\n\n- No dependencies\n- Fully transparent to the user. Scarf will log it's behavior to the console\n  during installation. It will never silently report analytics for someone that\n  hasn't explictly given permission to do so.\n- Never interrupts your package installation. Reporting is done on a best effort basis.\n\n### Installing\n\nYou'll first need to create a library entry on [Scarf](https://scarf.sh). Once\ncreated, add a dependency on this library to your own:\n\n```bash\nnpm i --save @scarf/scarf\n```\n\nOnce your library is published to npm with this change, Scarf will automatically\ncollect stats on install, no additional code is required!\n\nHead to your package's dashboard on Scarf to see your reports when available.\n\n#### Configuration\n\nUsers of your package will be opted in by default and can opt out by setting the\n`SCARF_ANALYTICS=false` environment variable. If you'd Scarf analytics to\ninstead be opt-in, you can set this by adding an entry to your `package.json`\n\n\n```json5\n// your-package/package.json\n\n{\n  // ...\n  \"scarfSettings\": {\n    \"defaultOptIn\": false\n  }\n  // ...\n}\n```\n\nScarf will now be opt-out by default, and users can set `SCARF_ANALYTICS=true`\nto opt in.\n\nRegardless of the default state, Scarf will log what it is doing to users who\nhaven't explictly opted in or out.\n\n### What information does Scarf provide me as a package author?\n\n- Understanding your user-base\n  - Which companies are using your package?\n  - Is your project growing or shrinking? Where? On which platforms?\n- Which versions of your package are being used?\n\n### As a user of a package using Scarf, what information does Scarf send about me?\n\n- The operating system you are using\n- Your IP address will be used to look up any available company information. The\n  IP address itself will be subsequently deleted.\n- Limited dependency tree information. Scarf sends the package name and version for\n  certain packages (provided they are not scoped packages, `@org/package-name`,\n  which are assumed to be private):\n  - Packages in the dependency tree that directly depend on\n  Scarf.\n  - Packages that depend on a package that depends on Scarf.\n  - The root package of the dependency tree.\n  \n### As a user of a package using Scarf, how can I opt out of analytics?\n\nScarf's analytics help support developers of the open source packages you are\nusing, so enabling analytics is appreciated. However, if you'd like to opt out,\nyou can add your preference to your project's `package.json`:\n\n```json5\n// your-package/package.json\n\n{\n  // ...\n  \"scarfSettings\": {\n    \"enabled\": false\n  }\n  // ...\n}\n```\n\nAlternatively, you can set this variable in your environment:\n\n```shell\nexport SCARF_ANALYTICS=false\n```\n\nEither route will disable Scarf for all packages.\n\n### Developing\n\nSetting the environment variable `SCARF_LOCAL_PORT=8080` will configure Scarf to\nuse http://localhost:${SCARF_LOCAL_PORT} as the analytics endpoint host.\n\n### Future work\n\nFuture releases of scarf-js will provide a module of utility functions to\ncollect usage analytics in addition to the current installation analytics.\n","readmeFilename":"README.md","gitHead":"b354bdf998ebdbe042f420119fef13378962e33f","bugs":{"url":"https://github.com/scarf-sh/scarf-js/issues"},"_id":"@scarf/scarf@0.1.7","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XUBa8nl9J1XGyyA+wul1ko5v5ioNU1s/pUPODnPzJ4+uUOwwYZm197KQoxxzOAsypldlFGnAlQ8nkjTjoQV9GQ==","shasum":"e6ffb3660bda77f96037f8c4e21174177fed2d97","tarball":"http://registry-npm.ywwl.com/@scarf/scarf/download/@scarf/scarf-0.1.7.tgz","fileCount":5,"unpackedSize":21835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeodQoCRA9TVsSAnZWagAAzuMP/3obU+s5NdExI705Qxj0\n3qxD4LTc04PSDoMzCU6tJ/JTBvg4THVwrstZghTTheyjpyG/sXaOMlD8aV1A\nZPqBNBySsXK3YVpN/SFpQ8hevICLRjJ2UJS1wQcTyi0YFtdCsVFxJTuWzz5X\nUWGHjQpq3HmgaQRGYemeLgOxNe9BhtKGJ4OSQKZKXeiIoHbJRa8q1xAc3wwi\nEcu8IIKsmmf32i//jwRMkHugRH0nRv2/xY2KiNK1wfVR/sBqQTWMvblCEdEB\nvjBW3fdY6PzuNShJHsosWzGqq+zkNCIuCLyEspLp5tBIjk+yC/iP+PU2HTCd\nLi+5rR9U790tuTulv+iJnPFnwj+Ie62ywVM/3xrHgwXAWaz2G08IkQ4Hw1Jf\n2L4AAaW3YuLcFXBlSzD6AKQhCDJwmXprd/ZJR6Z3UqOsXlzM4E0Wfb257DaL\nuAkVSUpgoJyHtscsfZuagguMwQUsXcvDB7KNQsiEnXcZ4XFpSvaT5Iq+O3iR\nhGvdS3LG+9GAOdBMAI8A96XYKeBPw3iWy9mXhPxKUETzSnIX6MMzMExkelXf\nmVEQjqVYFAnI61LpTKVj1+ArtMBFeOGaszSXyTN9OgVnmST1m7fGVgh/lbpZ\nUfvuAcuB1ACjwAEQwpPOL27JlHZ5fnBLnxirBd17Vs23JBpqYmKO5YrdHCB5\nD4ax\r\n=C2ux\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFq/kn6CnJWCaSdrkhkQKhGiBqwk7IQgqjpEXZFBPaaDAiBJcT8VoxtCHYfmnDAwFpSabVCoFVeQgVQuklO3IBuLnA=="}],"size":7356,"noattachment":false,"key":"/@scarf/scarf/-/@scarf/scarf-0.1.7.tgz"},"maintainers":[{"name":"aviaviavi","email":"avipress@gmail.com"}],"_npmUser":{"name":"aviaviavi","email":"avipress@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scarf_0.1.7_1587663911895_0.2665724308096198"},"_hasShrinkwrap":false,"publish_time":1587663912029,"_cnpm_publish_time":1587663912029,"dist-tags":{"0-1-x-latest":"0.1.8","latest":"1.4.0","next":"1.4.0"}}