{"_id":"@atomist/drift-sdm","_rev":"8-abe56e4206cd59c7e5a9759b4269928f","name":"@atomist/drift-sdm","dist-tags":{"branch-drift-sdm":"1.0.0-drift-sdm.20190822162453","latest":"1.0.0-drift-sdm.20190822144852"},"versions":{"1.0.0-drift-sdm.20190822144852":{"name":"@atomist/drift-sdm","version":"1.0.0-drift-sdm.20190822144852","description":"SDM for calculating fingerprints and serving up drift reports","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomists/drift-sdm#readme","repository":{"type":"git","url":"git+https://github.com/atomist/drift-sdm.git"},"bugs":{"url":"https://github.com/atomist/drift-sdm/issues"},"keywords":["atomist","automation","sdm","seed"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/automation-client-ext-dashboard":"1.1.1-master.20190810154215","@atomist/automation-client-ext-humio":"^0.2.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"2.0.3-master.20190821110014","@atomist/sdm-pack-drift":"0.1.0-master.20190821065818-sdm-pack-drift.20190822113235","@atomist/sdm-pack-fingerprints":"5.0.0-master.20190822065724","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","yamljs":"^0.3.0"},"devDependencies":{"@atomist/sdm-local":"^1.1.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.15.0","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js}{,.map}\" \"{lib,test,views,public}/**/*.{d.ts,js}{,.map}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s git:info gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","start":"atm-start","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc","spider":"npm run compile:ts && node ./lib/script/spider.js -o Azure-Samples -s cognitive"},"engines":{"node":">=10.0.0","npm":">=5.0.0"},"gitHead":"a4c3fe09d6f29b6fe3532ce55154bc0de4bf3f44","_id":"@atomist/drift-sdm@1.0.0-drift-sdm.20190822144852","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-bSlxIS9vZsAvTkgsnVVCRxeEkxuwwCDwHNxx5kPE+Rxd1z9AFvGLPJLp2xWTBOR4bE3frz8GbilIFP27ZXVZPg==","shasum":"8f85fd7160c1f4ab0b129fa24e1cdee59385c280","tarball":"https://registry.npmjs.org/@atomist/drift-sdm/-/drift-sdm-1.0.0-drift-sdm.20190822144852.tgz","fileCount":80,"unpackedSize":2404795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXqxiCRA9TVsSAnZWagAA+noQAIpgommkeeSrhMkrNpOc\nngn3k7K5ukZ7Wpr1hXagNLolVGH6TQc2p+exxHDNDivwEPQFtRt0G48HDp+e\nhdu6fYNJ+uKBi7jOO53m9GZjJpvab7x436jmpoAQBY76yePCll5Vdo7kISVX\nP0w6jYFSW+e/hcOfJhWuS7xFdtMRYAM8V6gICLge6obs+UXH3nO2747U69jU\nAD8ndAMCZse36Lza1kjpI40OdDr1+eXrdRhe5w6L8ebmXYTmslI+TIgvjfy0\n41EjKE5EfMYlK3ADogAxzAa7h7V9s6Om2mhuR3pQ3J7U7zHUAocKj5n9kV0L\nKAuBiBEoYwGpFwBhwpDRM/DpvHL7qwnJ4Q9RcqcvwBKfXY1HvufzI7k1dWfL\nddx/O9INz6knUv1/K0fokGl+s0st/SaRtZss0oFbd9djam5X/bxHY+JmMjUh\nO4aJi06q6qH/PluWlhtOwXvMFpg3+j3ymYsiWGZkM64eAY3HoGuq445B3Icb\neTfwIDl1J3i2rEsMORDdYSiEd+pz+Zcq5ZnEtwEZvDMDi3Gohm4Bqy8ElRK4\nYGtSKrfQCfhaNak+DQ8yEtC+GfpLGXXHX1/ZZim+UuRyV408tzXVTMR7j2/S\nLi0ld9znJt/ZjLemn1Yx/MXq0YDV1cM/xdOufKSIINjPjH9HTSp2gABudOKf\nkqsI\r\n=U4oi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKyS47tmTZgqe8dppq9w39lM2TzUaQlYVbI3nFcKrTXAiA2chhJi/A7m0SYnRzodSq17xBawjBYqQbu/ELHURf3KA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drift-sdm_1.0.0-drift-sdm.20190822144852_1566485601357_0.3675682453584228"},"_hasShrinkwrap":false},"1.0.0-drift-sdm.20190822162453":{"name":"@atomist/drift-sdm","version":"1.0.0-drift-sdm.20190822162453","description":"SDM for calculating fingerprints and serving up drift reports","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomists/drift-sdm#readme","repository":{"type":"git","url":"git+https://github.com/atomist/drift-sdm.git"},"bugs":{"url":"https://github.com/atomist/drift-sdm/issues"},"keywords":["atomist","automation","sdm","seed"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/automation-client-ext-dashboard":"1.1.1-master.20190810154215","@atomist/automation-client-ext-humio":"^0.2.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"2.0.3-master.20190821110014","@atomist/sdm-pack-drift":"0.1.0-master.20190821065818-sdm-pack-drift.20190822113235","@atomist/sdm-pack-fingerprints":"5.0.0-master.20190822065724","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","yamljs":"^0.3.0"},"devDependencies":{"@atomist/sdm-local":"^1.1.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.15.0","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js}{,.map}\" \"{lib,test,views,public}/**/*.{d.ts,js}{,.map}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s git:info gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","start":"atm-start","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc","spider":"npm run compile:ts && node ./lib/script/spider.js -o Azure-Samples -s cognitive"},"engines":{"node":">=10.0.0","npm":">=5.0.0"},"readme":"  <img src=\"./images/dockerImageSunburst.png\"\n  width=\"130\" hight=\"130\" align=\"right\" />\n\n# @atomist/org-visualizer\n\nA tool for visualizing technology usage and drift across an organization. \n\nThe cloud native era has led to an explosion of repositories, which we lack tools to understand and manage at scale. See Rod Johnson's blog [This Will Surprise You](https://blog.atomist.com/this-will-surprise-you/) for further discussion.\n\nAn Atomist **aspect** captures a concern in your project, in anything available from git: repository content (code and configuration) and git data such as branch counts and committer activity. Aspects support the following use cases:\n\n1. *Visualization* (all aspects): See usage and drift across your organization.\n2. *Convergence* (some aspects): Help drive code changes to achieve consistency on an \"ideal\" state of an aspect, such as a particularly version of a library.\n3. *Reaction to change* (some aspects): React to changes in aspect usage within a project: for example, to a library upgrade, removing the Spring Boot Security starter or exposing an additional port in a Docker container.\n\nThis project focuses on the visualization use case. Visualizations are exposed via d3 sunburst charts and via a REST API returning JSON documents.\n\nThere is out of the box\nsupport for investigating the following aspects of your project:\n\n- TypeScript version\n- Spring Boot version and starters (with Maven)\n- Docker base images, Dockerfile path and exposed ports\n- Java build tool (Maven, Gradle)\n- Library versions (npm, Maven, Python)\n- Inclusion of a code of conduct\n- Common CI tools\n- git activity and branch count\n\nAnalysis is extensible using the Atomist `Project` API. Implementing and registering additional aspects will result in additional visualization links after re-analysis and restarting the application.\n\nAn example visualization, showing Docker images used across two GitHub organizations:\n\n![Docker image visualization](images/dockerImageSunburst.png \"Docker image drift\")\n\n## Running\n\nTo visualize your org:\n\n1. Clone and build this project\n2. Set up the required PostgreSQL database\n3. Run the `org-visualizer`\n4. Run analysis on your repositories\n5. Hit the web interface at [http://localhost:2866](http://localhost:2866)\n6. If you have more ideas, add code to study more aspects of your projects\n\n### Building\n\nPlease use Node 10+.\n\nFirst, install with `npm ci`.\n\nNext, build with `npm run build`\n\n### Database setup\n\n#### Creating the Database\n\nData about each repository is stored locally in a PostgreSQL database.\n\nStart Postgres, connect to it, and run the [create.ddl](ddl/create.ddl) script to set up the database.\n\nIf you want to wipe out your data and start over, this will also accomplish that.\n\n```\n> psql\npsql> \\i ddl/create.ddl\n```\n\n#### Connecting to the Database\n\nFor anything other than the default Postgres [connection parameters](https://node-postgres.com/features/connecting) and db `org_viz`:\n\nConfigure the Postgres database details in `client.config.json` in your `~/.atomist`:\n\n```json\n{\n  \"sdm\": {\n    \"postgres\": {\n      \"user\": \"<postgres user>\",\n      \"password\": \"<postgres password\",\n      \"host\": \"<postgres host>\",\n      \"port\": \"<postgres port>\",\n      \"database\": \"org_viz\"\n    }\n  }\n}\n```\n\nIf `~/.atomist/client.config.json` does not exist, create it with the above content.\n\n### Other Dependencies\n\nYou will need the following installed on your machine for the out of the box aspects to work:\n\n- The `git` binary\n- Java\n  - A JDK (*not* a JRE)\n  - Maven - `mvn` must be on the path. \n- Node\n- npm\n\n All artifacts referenced in Maven or Node projects must be accessible when the analysis runs.\n You can check this by manually running `mvn` or `npm i` on the relevant projects.\n\n### Analyze your repositories\n\n>You can start quickly by loading data from four open source organizations by running the script `load-demo-data.sh`.\n\nThe `analyze` command is part of this org-visualizer project.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start the org_visualizer (in the org_visualizer project): `atomist start --local`\n\n#### GitHub\n\nTo analyze a GitHub organization, run the following command:\n\n`atomist analyze github repositories`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\nWhen prompted for a query, hit enter to skip.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\n#### Local directories\nTo analyze local directories, wherever they were cloned from, specify the full path of the parent directory of the repositories, as follows: \n\n```\natomist analyze local --l /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze [local|github]` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.) \n\nUse the `--cloneUnder [dir]` option to supply a stable directory under which all cloning should be performed.\nOtherwise, temporary files will be used.\n\n>If using a stable directory, make sure the directory exists and is writable\nby the `org-visualizer` process. And keep an eye on disk usage, as these directories\nare not transient and will not be deleted automatically.\n\n### Run the web app\n\nWhen the server is running with `atomist start --local`, you can see the visualizations.\n\nGo to [http://localhost:2866](http://localhost:2866).\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing [Aspects](lib/aspect/aspects.ts). Aspects know how to take **fingerprints** (extractions of small relevant bits) of the code, compare them, and even update them. Analysis is triggered by `atomist analyze` or, in regular use, by an [Atomist SDM](https://github.com/atomist/sdm).\n2. **Query** functionality.\n3. **API** layer. Once your server is running, see the Swagger API documentation at [http://localhost:2866/api-docs](http://localhost:2866/api-docs)\n4. Simple **UI** using static React and d3 exposing sunburst charts based on the API.\n\n## Extending\n\nThis project includes some well known aspects but it is intended for you to add your own.\n\nDo this by updating the `aspects` function defined in the [`aspects.ts`](lib/aspect/aspects.ts) file. Simply add aspects to this array:\n\n```typescript\nexport function aspects(): Aspect[] {\n    return [\n        DockerFrom,\n        TypeScriptVersion,\n        //... add your aspects here\n```\n\n>After updating your code you will need to rerun existing analyses. Run `atomist analyze [local|github] --update true` again to force updates on existing data.\n\nSee the [developer guide](./docs/developer.md) for more information.\n\n## Next Steps\nThe [Atomist](https://www.atomist.com) service keeps analyses up to date automatically across all your repositories. It can also help to achieve consistency and convergence in eligible aspects by updating projects, and enabling workflows on change.\n\nSee [https://atomist.com/developer.html](https://atomist.com/developer.html) for further information.\n\n-----\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"14d5ec4c1ac1d7e7cf35ce54275ff7b859a0e3ea","_id":"@atomist/drift-sdm@1.0.0-drift-sdm.20190822162453","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-LM0GP0pgM7ja+Mi9al+N8MzSWoVkvLo0WL9aokuPi+BGW086sEyoaSPuG/0pOvZKSgcScta0xQg3kLcABivXoQ==","shasum":"aec2d3dd7fccd3b6ef9dbe37f8ec73ccbc6893f2","tarball":"https://registry.npmjs.org/@atomist/drift-sdm/-/drift-sdm-1.0.0-drift-sdm.20190822162453.tgz","fileCount":80,"unpackedSize":2404795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXsJ9CRA9TVsSAnZWagAAowMQAJW4UHerezRwnBCjvM4a\nksA4CaHSH2+/j1L5r6Ky/q2If6EWWqRiVDlzD9f05vt6NFZfpyurZiBpjFLC\ncBWNIM2g0zh81zfu1nLyYYxIgsVRrGDexk8n/C0GI5vvdh7QeI8Wk7s1/08B\ngpbC4KPWewJ7PEDQZiiYuTUlwLbZv/IwclJCy2NJ/2N024HpUrAK+3Gy45XP\nvJDbkRV4KXBdRAb6nl008jbU/mSjgY/4qgahJwyBvZGmnvHwJemJq0Z4muFV\nAeQgtara5Fesf+yxAcbEfcxfcoIIZJYHlZP+NBeylMt6y+qu4+V0cyYxXTk4\nSss1otEyFjf6yMe1IqJENT7NuuxdQ9s56kupW/mz1e0lo9FWnqWkAwyaFqu6\nJ+I0lIVoz6R7B0mSMXfhs/sknMxj6Df6i+kjieXdW/iQAEkLpQR2h8y9BhAJ\ny3yY4tUuXG2NFPd0Z2+S8Yx8rt4nkqXoHW0bUXmN/eJnhk75rgB/6lSO/oo0\nQT1thY4UA4PBSyRttALuSagv/siG1oQkGoWH46Hri0HkjZe3gMc5ISAHc4iy\nlOa0MQ/afb3f1LXFgizkXPAq8Yrzh8EsEXnC5HlvO4OlUMnDeYwqjE9VP8VF\n+iqU5IW+NNpCkcJRezYuN+lEC3HFMXhsytc0sCtL59iHgnl8lGhXr7EAXUGZ\nXUKD\r\n=ZcKY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPaCsvH8SY8hcVjZqqZLi3v4gTfLNFAVI2I4cAQO2LiQIgSfgDG2LXXkt/HIvZHFaDcQUq2dbXZyr4hNeTLXjl0eo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drift-sdm_1.0.0-drift-sdm.20190822162453_1566491260783_0.9171531217190536"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-22T14:53:21.159Z","1.0.0-drift-sdm.20190822144852":"2019-08-22T14:53:21.502Z","modified":"2023-02-23T17:59:09.768Z","1.0.0-drift-sdm.20190822162453":"2019-08-22T16:27:41.002Z"},"maintainers":[{"email":"neil.prosser+npmjs@gmail.com","name":"neilprosser"},{"email":"npm@atomist.com","name":"atomist-bot"},{"email":"cd@atomist.com","name":"cdupuis"},{"email":"slimslenderslacks@gmail.com","name":"slimslenderslacks"}],"description":"SDM for calculating fingerprints and serving up drift reports","homepage":"https://github.com/atomists/drift-sdm#readme","keywords":["atomist","automation","sdm","seed"],"repository":{"type":"git","url":"git+https://github.com/atomist/drift-sdm.git"},"author":{"name":"Atomist Inc."},"bugs":{"url":"https://github.com/atomist/drift-sdm/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}