{"_id":"@atomist/sdm-pack-aspect","_rev":"471-e8caaa965e0aa032a434819ee7e59589","name":"@atomist/sdm-pack-aspect","dist-tags":{"branch-sdm-pack-aspect":"1.0.0-sdm-pack-aspect.20190822170455","latest":"1.0.0-sdm-pack-aspect.20190822170455","branch-master":"1.0.0-master.20191114212211","next":"1.0.0-master.20191114212211","branch-nortissej-analysis-page-tweaks":"1.0.0-nortissej.analysis-page-tweaks.20190830023849","branch-nortissej-tag-reasons":"1.0.0-nortissej.tag-reasons.20190917044950","branch-score-org":"1.0.0-score-org.20190918224408","branch-code-metrics-move":"1.0.0-code-metrics-move.20191004142934"},"versions":{"1.0.0-sdm-pack-aspect.20190822170455":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sdm-pack-aspect.20190822170455","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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":"65f8da0de46049183605dbc92e9b67a436d3e53b","_id":"@atomist/sdm-pack-aspect@1.0.0-sdm-pack-aspect.20190822170455","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jH0jwZj8BlO1hJHci0SaFVdbuy1XF8xmBNoTfxri8NlVCkhAdzEnaAybh7FWbwoF2gj9EoWEpZK3V89+42yWOA==","shasum":"1abe13ed470a12f29e9ac0caa48c8f15b29dca44","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sdm-pack-aspect.20190822170455.tgz","fileCount":331,"unpackedSize":2547809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXsv7CRA9TVsSAnZWagAAT6EQAIrEV2BR+MvahOWTjar5\neuc8iuhzZ4ecl8P6cQoxkUjhd71qVy4Xm420C5aBo8/oXjLWEBYGalnr6ePY\nZGOefc2IyMcBQbGo23sVLW4Loqiyq/6cKnCuHV4Jm+Z3kKpKd49/dufvx1b4\nTWk+g8Q0nAudiRIprxtUu01MlEpo7fvFI0aoc6OgC9E9HLbWw5KOXy/iRtFz\nkSjBi2sxue+BeKFHoQRxNP8keqfmZRrcQq/OH5OY7Rmortzpn5c8fvhGC3E2\n0hJiE3yyBhO3VE75BjTUtO7S6IbS3b0iYBtI3RunByWxYOYLr0OTOW7tXkrc\nl69SZGzqokkh0Zs3+lFR5B1Gb2plHN0z1Ek5GBqJ/XkYPMUhbFm2mzUoTJjp\nCMNZ43GroD7GAfFUGPg35WdjGwu5WXlQnybDM3ioy5pnw5y03WBPVxLyWId9\nPGWwZ26V3IjU84qLTIokVVcDAoJW30F2cwz9pwtDNNbwKVPWD+/P5QjGeieW\nfweQkdL0oHkd1Kz2YfHlaG/x2VbO6PaQvT9AOh3oZmByW9sgXfDbxIy/K/yD\nn61PgnIbHueaSi//v/+RtjB20CXPB+3QFnDsj3eiH2KyjDpXJbVWUKshhM4h\ndcdzsPlQ7dql5B5uCMak0aCS3Wrt9QaC/4FCddwOYFnZ5Db14LjukHPuxjuq\nzdEl\r\n=LA8q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEuFkFhsa+DJ/gtmvTSUSqwTo32WKW9iRFaqSSTXjb02AiBh3uN/nwY689DNfgCmKbPKyRJMHFUxRMMJHDjA8Zhomg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sdm-pack-aspect.20190822170455_1566493690670_0.6622560788011478"},"_hasShrinkwrap":false},"1.0.0-master.20190822204434":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190822204434","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"9b5b66b768a124e3b3c085a9e8ae92469313a1f5","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190822204434","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/xisvqzZdVcR2z1QySrEmANuPDkNFaZOV0tNxihngJDqFV0ecPxzyL/HlgotAdW+103r5AIDFbFH3Ks69SBmkg==","shasum":"a745b91cc173d8d15791cbffb7065b2c1ce8c344","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190822204434.tgz","fileCount":331,"unpackedSize":2547024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXv+RCRA9TVsSAnZWagAAZiAQAJwBBcdopjQjM1gc7Vkp\nXT1oQ8UsFpsA2OTXaAqYWvOa6yakSNVPi5grhgyBtiwuN0miJoG944ZEVM3W\nUSZKx9A1/D6i1KqF4aZFki64UAXMVMN1Nnh7R14TqPo/OcbQY5UcGuuuJtgi\ngeTZtpipEfD8r/SLjV/e3xGA1+PPZNK6PD3P4pEvbpyKpmYm542e0Y0nAfrm\nrQNy9tLOcylQdHwLWz48+uowCeeV3N/fMGPBEDL6YCFc7pLuWI/hi+Axvyb+\nY6CP9GPSBrzGUziSSEHXfNczH2RkvUyGipJc+Scrgl9Ev9R/sUdAXYTZ+OsJ\n1crOgUY9wgphTHuvFzmykHJ6AMnSlLbdr7oFrDVkNf4WELrxnuaGLKU11rUQ\nD0kcqeNbS8EwYSMkKH58E0LYVu+57yvloAeCAx4suk5J6TEq4oaZQem1YjaJ\nl48uacwxnQtFFHLHmtIKAYSCSap/dL+zERmMQs70dkU15mo8MT0/PwabAp/h\nBKJlOJgjC83CIhVH3g52PvdWaeaLlD4jDn7lzgDXI3r/84M09LTYlapY/KQX\nv/1yqocacXsZHQuqwlTbQJlqmFeGHpaId8Cd2ibd+nozdzV0aW0Y5MbgB6VO\nx1b1BaiBiK8CxPdvmW9gf19Z4H+ahxy77t96vOw3YxflfLvCHh7t/1KNeEXq\nvDg2\r\n=7s89\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFllg5nLqH31v3+LCfU/xtX9t5IwRolk0Ze5hC5E9FN7AiB//zTaLMVy/XowbMhrCHD62t4G6jlQvx0WC+NkraUvZA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190822204434_1566506897301_0.33649178543288727"},"_hasShrinkwrap":false},"1.0.0-master.20190822205229":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190822205229","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"93d0a892c8f2764f8ffb4b70de749f04b3c57308","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190822205229","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ub2kdU9VhFL1OHCNV/9ddVIGtlP6LhUjp1weV17iha9k1Plt3FAl5ugcGeKG3d55gvWaTx0vkKqQSO4/BD9t7g==","shasum":"b13838c561c6db56f35263a7920deaa245570e4f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190822205229.tgz","fileCount":331,"unpackedSize":2547024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXwFZCRA9TVsSAnZWagAACzYP/jEoc4Oh0zTHf9IOsn5X\nCDiQZzrFm47jonpUUYSNMujaoKT1vXE37nQ6/6ya0/It/dxGlDsoiqmmvZHq\nRq5yk5SEckYg7fJxqqZvOgHzBlerxGmNZHX12JqWd0wu+rSiXGLV/zytY9O3\nMXPcKOg/dwqRgk241FU8DQOTNuyqr7Fc4Nv6n10VesrcprWwajZq+3Sh4QnD\nZmwb0cu0aXUOv4y24IPISYscblD4p6WctP4AhWmLr3OeRLEJaSyMRcSkhiVi\nvdWFjwyELkyxk0eFleLkRPBqkIN5LgFFw+fbljgldRj1H2r9tSEPZn0oC2eU\ngRhd+pt5EFykIUyOT5TObEc5oqNVCptfCy3ACP3umYUuyGDugCALPhN6C9hN\nT4fwFgyaf3txDzzBLIw4tdib2tHYU+UGkMkW1DvqmWkspNSt84XD2JAMSlyQ\njUj3bW9FJbdu7d140zRUUeIcr37P8iPUSTHN8LMujnGYX9EKCWqENLJuANc4\nsNty8wAaF6+yspEmHXhRI122+/BXxF+HmqOPnFAwgQJwW507k2UeHWKcT4ry\nfX79prfnVPkX6edoCPPYdKtxQ86QSDOe1SYtwaqQpUJXRnWjVjoMnZHPUfHE\no0C8KlcXkheu3eCMqWY5RG+FuCA/bYwgBlcsPLlfpst6gNT3zO+i+nJlz3xF\nOC60\r\n=R+3T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa2QLPnKLiWx/RfdlZzroSmkO8cZFGdUoOpYli0ARC6QIgegxf4po0F8aAnXRTcyXdHAfqYswxmqBPYYjG0AC4m3A="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190822205229_1566507352478_0.7604827012928441"},"_hasShrinkwrap":false},"1.0.0-master.20190822205919":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190822205919","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"d896735a47f26314df59d428e8892d6997c7782a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190822205919","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-nKnvOQKRPZy15pJ/Kog6jLwyiN/CNcSZf7Mb4BsryfRbgAkufRX8oN8eVNstkCwxbdAziiQvJaVz2qNuk78SMg==","shasum":"4483209bc3ca6e85eaeb2bdcc8c5f8896cd4f744","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190822205919.tgz","fileCount":331,"unpackedSize":2547399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXwL2CRA9TVsSAnZWagAAwj4P/jDdpMb1ew/z68nTnZEa\nWlIrW6ptUMW79UBQmciPiIS0sDWpTi1VD6AhDAmrashAnOGStT9CozimKDWM\n/GjbUIDriI0Yi+uCmuXmKkAIBUIEkjOMUdaz2YHpuM9Zy9EqDsHMvw64WAo2\nsAp/JJxCRe5Bv3ur1oei14Wb9bNo0228puaDcpvtb/jKQInX0bc+pQQAMd02\nbmRZvWN36G5RzpH/z/fa9L0QOpDmb2Ddd/7neN5xJfSp8zPQ9ol4Z4Qt4KdO\nf6S60jqHUVW8dp+md14UsJ4nGZ+FY6EHs1yYB0vf96LV80NO4zUgioBiIWbD\nhvKEw2SkVeF3OHkbESVGNYuum52WjdIjfSJXGT2TQt82xbooJI/j06wXN2Lq\nmv4hZD7GxW0zuvUJ77IM7x5Dwd4d6W/SrGAHG3EmdtVLhP5BjAshnAAdIyhc\ng8uj708jxPAK7dzRfCr774TU6DmO5jpaSM1wu3Jw5UZj3wsXWJdncsKnETWv\n3ypVi/K5x+D22deYJU75nNSAdmL5lrPcULQtymu8m8Bh8j3Uo7O4coXuYQDB\n+02EGJxtNg9GnLCwg50Y9pqkHaKtKw9qi7xehoE7q4mj6ndqQv1DyAwFm8FB\nK03W0q3eLSDNUeQuiF02xrlHgozBqc5TgxAQ4txTjjbSzKRhqGmD0uocj+3Y\n1oG1\r\n=g4uB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqHt/OnWfUaZGCYYdyvm5X60VeqqdxW0F4RIBTE/szRQIhALkfKCsXJdPZo0rurukAHF2cxu8m3YZSjoeHM/0PvuVW"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190822205919_1566507765795_0.012695421743498247"},"_hasShrinkwrap":false},"1.0.0-master.20190822211855":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190822211855","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"8f3e05e5b071ef46e93074504f32c648f5fc6c40","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190822211855","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-i8d5CnVEu0CgQVqwJiiavFKHqlfkw2ccaHu+UQEq6cipRJvhLNkwzXsHCmr3C0Frxm46pcxk6sxS78UhpPuZSA==","shasum":"b3ef60e0d9044ade82fae2c07c82491828579bfd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190822211855.tgz","fileCount":335,"unpackedSize":2562877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXwfbCRA9TVsSAnZWagAADCYP/jaW6dkaA4f9Xa4ARb8m\n0tWSUR55+4tzqPVjFzv6O6b9hWZxFm0e8U2ipvzNX6EcKd07wl7jSapUCdok\nc/0P7m5nNY5Keqqi/JPoiHWcsi0sobPDrH+ylPU4KDRQntPrQ7QMnPsh8gzh\nAaMfr/oVE/QAPkyQEUinmMk9/7P4ZhlOxbH8Z0uaIrJRvS0OsMsl0ZB8j3Nm\no7zmR4t7mF+bqYTF3rCtqniI0b0nRd8LEm5AtoY9uuDkg295iVKhb7J504J4\n5AgO5V+kdzo9hb42EgxFPMwDnVCxfdcfesWt+daxCDEpAmwuydyX9/Q74y3j\nd9NeG+ekrkAeJotX/roT0O1Mg1hd58D30gYaOARRvJG+2VxRaziV40IAN7fQ\nVy1wM2ah5dHkIO1e/NWFUTmPlIA85YvnHXsnRK/++R0auNG3YCYdw6NEBbEH\nCX9PMUndjf2lSCvFHkuNnmSjAf3ukbyrejO7VnoNinsWYw5ENy3cFRRFSWe9\nQGjUaSN091QHhZS5vD4lAQGfGS9fKGJa7daRT1cOjt4qRg7ju79y3wJ2jeVn\nkMgCpZVC9xxL3ZqkDQ5NHgWUnCabWtHUR3QtpNox3LJjWXp88JFJ0SQaHATl\ngUx5vjk/1CtWrbNXOHVhyGvCHKYGWeKrV4kw0PNBgHUx+6pNQRqqFMvUCW8w\n126y\r\n=tPP3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdDufzkEUyXgYgnnK47rLfvUWN6//phRzX+iNrRdIivQIhAIih9tzhWzlAfjFf/oYcTRe/SbcbifIftq7EWU+WMrM2"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190822211855_1566509018047_0.6931470132940836"},"_hasShrinkwrap":false},"1.0.0-master.20190822212524":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190822212524","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"894311426f15d879f75a4f7cf751b2617ed62d70","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190822212524","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-olKLKitajLCr4hBzMP5EvWzf4iUpIDTrEz1nRRrX28OTFkEbeyoKP/WDDtG1loSwHJjMRxUQrLgIoEkXRWoTJg==","shasum":"87b0421ac23da2cfebbbbfbbcd94f9dff31f1719","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190822212524.tgz","fileCount":335,"unpackedSize":2562877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXwk9CRA9TVsSAnZWagAA21cP/0+5nhaUQ8Mc5rY/VZOf\nf6Qfc2gVvk8sYgy7wTy9o1pHrUV3uLiCb/OWqW6DQocT/idzsvY1iTZJ2yWW\nSHogf6QvT1vZCqzMRBsA1v0jL6A5KfU0gITo+Eft+YiKNWLnYGlNwBfQ7bN8\nRNTHoUkHZF9a7US76qlNMZDXS0GGMz6047DhMVn8uT/mRMhygUbrs+DrGLvg\ngkn3LAd3UyEUDTmtUwavz+XAsQaEugyKmh69cPtcbcTH3Ls6oivRDD8CsprR\ngxXusKN0ZkaUXpGSdPuSZw7e5dDO9ZOCsDtSoLIjimwoPQ7H1xypPBpDbwjZ\nqQRv5twHIoHhLaTddUmTOumyzG9DBaGF8wJuZZ4LzcdxWrGj6esM9uzjDf1H\nMC2eGKY11la6Ds+N12xVaSAqvRJw20bRYWCnOyFmNifYzJJEFNCcmBx4YJJS\ndrQs/YLbT0GMSGU1K55QJC8MDMEFpl+/L9TZqoh0j0wAniq4rFQ5UYUi+ZhO\nff5b6ckCeHsGsgT8iotJKZ12w3DOtaJAT2CeIQjuTwmqeLr1Y0nDrAphnoTE\nMwgNKHv1Q8WOfd39uTDI1kQUemhC4udJzK6yklaHJxVA+l8WCVKXs421qVJH\nO+ZzYb0rzdtGBCghk3HZ3VRFg7nwznM3aidxTndH2oiZqILXBHQwn0ZutVDc\nXIcM\r\n=G5QC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNKeMrcuY9fsnqqZpQRKZCNAPhaSkYi5U0KFlBLEnuWgIhAKV+Lclensda+UWCqXao5jFRoZBqPtjJ8hdD7HIawjUn"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190822212524_1566509372973_0.5288678433190064"},"_hasShrinkwrap":false},"1.0.0-master.20190822233651":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190822233651","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"8fa36a926698cc07cfdc65c8cb6b964d294b247f","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190822233651","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-8+Rip35I8oeFQVdVcrRsaqWUMG7c2rXO9NQXZqQKEdppN+ozufiNOLGabIeiE9RKvNUaGHV/8N6ShKdnmMbaRA==","shasum":"17370224ff165482af537b5c6dea0fb60113944d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190822233651.tgz","fileCount":335,"unpackedSize":2563137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXyfjCRA9TVsSAnZWagAAnjMP/2De/G82ui329G9/QFYQ\nyYEHZd/MPTeCWvoJvqs1Y7bsN8Qz+OV1gw9mhqTu96ZcL249fPMNaFHpaIE2\nXZPzetZU2xJt8KTQbuJnXSd29tPKrF1E1pHMc5mv/kzL7JjVIy0mCf5IOIXE\nQ8GwBR3kqyoevSjGBDR1F6+3Yc1RubStuQRLL2mNci0ySyNH2LgCGrGDLjHw\nQ6HDOkHgd/X8YlHR9I3xpMhMo3hpJjjzKR8hO2TmwWBN/Xc/Cykv1417g6aR\nFk3Qls0o4TKfK7LnQDA68tZHiqcmeX7aOQYyntvtyhlNkZwVnc+9tuCG+QLr\nzWxiTLD8iXdXSWOsmp7byqiRHDX4sU9ciGPNsfTA5bFTgR6gxgVWibRlh7K1\nDqFWEYVZSWGOkXsfvH9GYqYvpyMHcOrUK0Ym6loPTW8glQWKdH61ZHQHtkDV\nwSkmnk6ZhMfVYIXw+pOk2bmRxplxJgTDQdoPuFFgK04WZ6idvAlS57p1QR9Q\nglTWRFzQRkSPvKW+kR5czCuuiOc3wMM7OiHXVV/5F/BaJ9nL3VP8JoBgGljt\nuUq8P4VtQTZMZXxO+o+IhnTJ5LUvhhelfEI+Kxb2BaHDy5smeoOtUEwL5saR\nBjHDt5jWaRs/rAgCYwqSQWb5nptnQpoS1HU6sn2hegI9QMqsab2JwFAmDomu\nhJ5m\r\n=zTHB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICphh4I3f408RnpLqbQa//EeCS/sTNwXSTAbhffvoPXTAiB/yVsfqJz8ZNOcBGSESDTzLA3EHt3D8iO8nPX8CWD65Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190822233651_1566517218861_0.5838000646947215"},"_hasShrinkwrap":false},"1.0.0-master.20190823011012":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823011012","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"afcb5e919600c5c2506bfe788d4e72133a17348f","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823011012","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-r1jNkWV1OgsCRFHXEb7flR30BxlMRVWGNBDgWD8mdEQTNoBhhyeiieRpquMYK6IG2KBqwAHbymQ1HvhuCbFEww==","shasum":"3639683fd60ab3c611b033be08ae4a1975698dd3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823011012.tgz","fileCount":331,"unpackedSize":2565353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXz3aCRA9TVsSAnZWagAAYDYP/3KsI+UYNuG+5nXVfAku\n7qXmZnX8G6sCrjgSem981X5FsIag0WfUMvC6Qdo2sOwfKooFSpZ6E47wqTVO\n2jE89tcFayKiyOkfeVqnKX51rO0F4aCiYSZLYDrL0/rLgtnmRPEGI4jilbKO\ngYtFTrUmgdR1SI3uHOl1fRQ0qFxvIMGUIwb6/4NvJhSjOl473xq/NnVrImXW\n8j+dDsIpr+bgz99VAsz8k+/37Axmcb+nuzDd4HzWwY+Ei5CI+6y/L2Uq76uq\n1mEUgGaXntEsLgDgtdUi7LxBJgkSYb2mM7x13QSaecdv1i4q0Vff0KEnLqKJ\nF/U0keM4ocpMCefzI7xTrQI+taHPS2rc/lkhaHB7tFVYeMvY5ykHr2IQubkU\nXTu4XHuGLDh9CEWdN4OpJ9udBfMFaJj1qjj7vhhLxXXbIxRL2NQr9SLEv5cp\nZSDSA/gFUAmr8eySgQRwWYUIdmv0IRY4G1HEmKHGwF0KtMsTFURIZLkuF+1L\nrzRzGP8HRk+EDvmx1KnQ0WOei4bxDcHfxtJZcr74q0UazEdQYpbbRR01r9Mb\nfpgvmk+3RhRo29CgvehaMT8JFnL4NSbu0cUPGvBatdvud9yp9u4u0X45eAy8\nT71A2rwmBslR2sILL45/N2HrafHaFUndDMUhiR7PtRLFdm8dFptWq5gC/5I4\nt7lq\r\n=/M/u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/CVU/pd4Hkwp3is9hdUeUEblgrkQPzji2wZpw4L23YwIhAIlcExttQ7/xSwAMYmYd2TizUEtXmK2U9vDLwgkbkcq7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823011012_1566522842056_0.968009418701588"},"_hasShrinkwrap":false},"1.0.0-master.20190823015601":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823015601","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"7a64f210c69c00cd86975e0661a6326c74d9216d","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823015601","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-dsvGwXKbJzeTGTgDtZBaHWbmVbS7dj5h2BFLgxufCaAULdL3A6XZZxu04xeZJVxzBadU+uWHe+swijYCZ3cj2A==","shasum":"308a384eb8a4e2d2f4c78512007f4ade07f45893","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823015601.tgz","fileCount":331,"unpackedSize":2568150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX0ilCRA9TVsSAnZWagAAP9gP/AxCDMqTOH2jSfSUq2sM\nUsihNDtfauTSMDqkQnsJQTruhGdtt8dr8PHYmmCW8ZccnOVYdVQ4wH7NejSn\n0Wj4qzDabM9cDMmcikbnK8aS+YfAgNmEcNTs7Ue/n4Tcb9/sJ3m324s55KLl\nNrAJbwG/H3EnS0x2q9NfbFB5QLzvBBfNYOvQ6lT7xYeaMtCnnkRU824dbe+r\nw1RRnELEm1yfELxwCeO3Ye6tRuNYovlPRhb4vJ2wIKFBmY/Rb5A6CHd02CaX\njzL60Q341BgZSdIf7yrqUOZf4V/+6oTL95Mb11ZSGBXYHhpkZ+1J2lC8Txvt\nFxEGioYSUy9Cp11o2OWD76NlhqZifPT1VArUFAJmq7IXRjkhvxfBEx8+8LM+\nWxD4EdyLQfqQswqu48ZD9h+1XON/nJZo/wDOC2uyuE7+p9JnHiTnThaHZ3Sw\nX1m3iaC+Tw4imp2Khnk/bRCQ7GzyY8PZCBOcGsVGiF41GornQSgMd3GqGrOW\nVh8cFbnBpylHYs4BxmZq2X9GnRWfF/HztEEd3qgHMxjnl22bMDRS8xnA9Trv\nSppUpnmRW+fXEp95m60p3m7CTxoE8+YSmV8oqpZGLpLtdmSWWvhUcIPNac8k\n2p0sQv1Ub00i+vq6XAoXHWLhUljjP6lZKQVw5KIcqn8WSIlf2Rt507yWBrzP\nKvkg\r\n=U4F2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYqeyqQayP9PJQ9XPCaGVZM6y+vJLvT6/xSXv7ZAsewwIgJg6McLDHYB1FaZoiwzguPG3LG3oF4iI7qwynwhcUjO8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823015601_1566525604608_0.5317797000779683"},"_hasShrinkwrap":false},"1.0.0-master.20190823021947":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823021947","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"e951fff1f21aba7e973388b3c68e4eb0959cab5c","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823021947","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-DoFHmgIVzBUmyawP8j+WtjAamnBPx1MuzlmBn72GIvhDLAT8rvrbD7bnBWUabpT7RLd+9tk+GBub6TS3NvBncA==","shasum":"c82158f02bf0665b62ae7fcc082c65f6d0aa510f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823021947.tgz","fileCount":327,"unpackedSize":2564621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX04FCRA9TVsSAnZWagAAl/oQAIX+ss2JxnJmjw542egz\nJksuCZFJV2b0xyXDPaLn+Oik3VfJ2X1wi+BdNVQkheltuDIRZTgxEqvuehEg\n1i54os6KfuKFXWiTGwB4maG372vp1s98Kf5k3/g4bM9MuIyhmkJlLdcLR3uU\nQJqBWYjFsiloPcw5871KjyhyfnC0FcmiVjWYEo6of9lSMdp4O9t1vAF/GrDv\ntQdiHAuLEOnSaHX/xa3kB63CcaBljWnuPY6XJFE9IgrnZq3NQaIoSWaI9ASC\nD4J7X62WmgBN2+fsXpQI0mSl/oE2o/L00leN0E8YyAWF31bT/CnMtd3gEI1H\nvTewnYqueokA1fzCpE5VeVNDRsAQQQ8pFnQSTETErIlaQCLsOWDkIZ8sMFHF\nyNvtm67cVCpV2rk9XwRYOWUrhms3DGVV2oNu/7MZPAEIMvqbU3mUtdb3dWwp\no9G5asglpzs0Ms+MbfiZsU7xkdSRwLrrvvmExW643Q+uw0IZgPRTzk3JTLIv\nA2RvMrCjPKZlL3if3vhpbab5X8P5r4mQE//sQ3drsOwGytZI6yZouwGSoWpL\nHkr9gueMGK+Bu0fDzJ/id4jeIuVCWZAwPLJ0yUL9hruNv7Mp7butPaG91IfG\nmPbww2RHzBnF9w/F2PjXj9VtKJQdp2U0e+weqBBegih3+pKwygyR9s/Alp7c\n/Jz6\r\n=VbFE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTWTk5N7z0/g0PHu1wIHMY7pNejqcJP8oZmJX/rNPlJQIhAOWvJcxV6p28ufgaa5pBZMv//ok6bDLYYmeZETvwhqK5"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823021947_1566526979483_0.6587026129118694"},"_hasShrinkwrap":false},"1.0.0-build.20190823041544":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190823041544","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"2a05cbbb9248bfc77a0f30dcc1f09593222ff7dc","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190823041544","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-boGQKcpBuNaLPJvHufDNL47ONPj2ueeN0su3EeCN0rOetI/Gj0KzKdYYUDWxrPruZBMjDAZ7Ex2DCb+YDdH9Kw==","shasum":"0542383b0a52641bad6caf4749c343e86a793f44","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190823041544.tgz","fileCount":327,"unpackedSize":2565261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX2lkCRA9TVsSAnZWagAA6jQP/1Ko/BcC2h2LCjP6eiIJ\nuYzagFSpSAgcJd5ajM7FWm7enisLaygIqw+bz8WgruEFh/Sx0/YGKQbyAljc\nWXpWjwxaOHnEEitmrY1fFR8E/GRBulLL9kg87eOPuVcJCH6UWsElQoXusDdP\n17TdlNgTXVdSNGzo3kM4UANM9NT7Y/lwrcp///4KIF80W+zuquLe7U8bDCWa\ngMWcXvxf7lhiFWot19+eqnTfIIk8XbRPm4g+TwZxsnOVwIowawlBXq3HDRl3\nErRPJg6T3Zr7AStX+k24ne7wyoo75FqzBDgIO2gyxrRqVusw4pIH77Rt0VnC\n5f+7uQNhmpbyh9Oi23FjvlOFCVd+bKkyaXiZAITs8APCMCU/aqvQpuK4VRqR\nyYmK4S0Nd32QTTjAOrFHb5OphdX9YlucI1DrJwQzcKbrbi6k5zWDUwYYDm7s\nlYqFLt3YwYe3WfE5s7AGSvE+YqEcaYWgZjiOtcY4ddARmiGT+9PkETUJrTKv\nhVoxp8WR/7haf1o+lu8WF6gdTjFVMJJJDVIz4BGT4yCHFS7gOPQZQXxMliav\nwRGkZEIOSbncAYzOZgLNmjsg8kYSL9/xwl/NK3j03R4WkA0HsurNgoCnVNw8\nn3CUux/0WjqEUyhhI9jDBpGBgN9I4sJd2mbf53ykKbJx6d1o/K7V4ol4o+c0\nm/Uj\r\n=F1Ml\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7zrf6dmKcf33c6hhQMFRDlsLMfsNy8/TcVnAOQBv4EQIgMlMn6qG2brxqNoC5/Lyuq+ypU42gWTQuzaSkfq9agU0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190823041544_1566533988234_0.868786131688934"},"_hasShrinkwrap":false},"1.0.0-master.20190823084332":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823084332","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"78b88ff454b4dfc91fff98e18230926823d490ea","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823084332","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-L5NQxhiorSW+NHMpOeNDZgU2xOkbUaSyKUopdo4V5ChfaKDzjz/3rcriIkIPE407TOYCeyNiKVRwTqvV6GnjPQ==","shasum":"f83ed75925e1dca050c4f929065d98c4913d82bf","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823084332.tgz","fileCount":327,"unpackedSize":2564017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX6fwCRA9TVsSAnZWagAATMgP/R29jT41HrGQd8WFD45H\n7wJca0y1/SVv9tk/cCOQUTAiow+lP8DHLivc/4Ds8mi5rEJyDGY5e6vmbp+9\nx/jVOjZovjQ+8zq7MP0g9XJ0hCV5Ji1hWn8DQTuSIZDbX+VCgdHHec87v6kP\nEvdUUOnuju7sNYisUlHKCKYGzRQrdLaCrbFbOBQifnNVzMS9BvQK1H3PQFza\ncCy74WOwZM9CraC/zXDYsEcI6m7QTiCYm9z/azPsrwxf8DEztc1ZmNgDMFjO\nbL7pfGKAht6rveXxNknoQW7hXi/nELry2eod8WYAVdeCHubSFexdrCdsGKoa\ngMFlj/FVnxeLeTbf6s8MYPlUD/Cpi5viVaobm3TiDorMylTh0yb8PLmnuqmx\nJl0uWUlJPC+C6eYos00dl8iCttthzVYxf8vEKP8bS+wz8PfnvP9Fkfrfch80\nE0uTmUZO5wXY65V3moMEwTsWfYBv4Tx01uSVdo1zd6MLtlwnxxtzF1s6+k9z\nmGpZcq4k9qxtGlywxqcZzkNwSs3+wBuW9Uj7hhoX4+LSS2/yaXx0YkhTTr8M\nY+kCxLewdpSM1MVK2IzLauz/E4H3FCcog4F+dgSUNqA7RM29iuJVZ6ZocOg4\nDRZs87fap8gqvpOQr/lB0GssS44LpEs0RBxbDM4jYJRfTyype4dzMj2YAT8l\njneM\r\n=RpWh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0Vosksn6NpLkVWpAiDPgrYphpFTzpas0f7Wpb+RMyKAIgci+HdKACd9aI74jYYKLawvS2JSg1LiKyKctj8wonPT8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823084332_1566549999908_0.8355206859166417"},"_hasShrinkwrap":false},"1.0.0-master.20190823101150":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823101150","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"ba0ea24edbf11e7814683e149c2e13ba7ffe8cb5","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823101150","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-WSMsp5cKlNy9n4d+QqOLW2HyLpauLpa6/iH5fqL/BtOPM0hgvmBEHhUSK0eYMO11U5+8EYcVdfFy6DD4Ff9zcw==","shasum":"6edd000a23af65c6f31f6b785971223a8ae59b13","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823101150.tgz","fileCount":327,"unpackedSize":2563951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX7z0CRA9TVsSAnZWagAAPz8P/0b6ThlBWf+Xjr0ITCcQ\n9Mgf33Y6mC0Y60h9YTjOZwq2GP3eoKpjQUDUtib0Ef3Z8xtcY3LVkI4e6WBs\nfaKE9Xm1vLt2ByP/eEq7YVONjI7vd15MM9gmnJYn11Ol5DZS/lGPgIz4+r+P\ncMDFFitQu6AeNoxsXTBJde4SBGwAe/OQCJaaoafrjCnHcxrdh3+gmgswTOF4\nE+ituPu3ZVHvkTQWx2X+6NpaAH5ZGiLcCTNjgjo9mZM0dgce7vDEOhii7eo1\n6pASXC4clopas0L3g1e/6jyGUH2/8APWOOzrY8XRV+RmRWVqVMZzpT07yMQx\nMvQcDQpgDNkg+/bBegACcbYr6yPm77c2fE7dqVXcqQkeoD6g8ZZ/4IUNPP7N\ndzJbb6yQsCsed1dmBlJCpChuyxOWyXnNiSJcdpzbVEKaIQ3INnLkcGsWQX5Y\nXVpyTrE7eZZ/50z/2wgIKhhmR2KrAPFKUy+4ZZ2cAqODrmbfGvvQyXeqzp+A\nk4Kv55vDikBSn6bI1Y2sfBHBbhzgeyK33sf0oV8DiYKhK0ZxyTGwtRFTpaaj\n2q44t1Cdb15TQBk5uIrpD55KpDxJ243ZSY8N+7MchwJQA/ND5SPWKu96C+ef\nZrov5FpceXL1JqhxdBmaqj6FaSlVaZOfdcEKCyZJsR/G3bCaBw+PmeuatAtg\nilm4\r\n=eYrX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwRzCwkTwDXlrIIhTbDpXnUsodcJpXnDsFXtD1CeTS5AIgEUUGi9iuVD/H2o1gtUooxYBh6Z5qE4WsaL+jcvZP/gs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823101150_1566555380338_0.3910695212149684"},"_hasShrinkwrap":false},"1.0.0-master.20190823103332":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823103332","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"f51f003830becf350c9883204dbbe4fe083bf087","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823103332","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Gf2cKNc2TJkmGD8pAIah1fqQDHFNvUoLPgHpzqyxm/6HFbaCtO0ICjJCevneilRZEzw57JNOpR9YeNcdHRL6jA==","shasum":"990145ff0a1a89d7d331ca35727459198fbe9b27","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823103332.tgz","fileCount":327,"unpackedSize":2564554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX8IJCRA9TVsSAnZWagAAXl8P/3yTf4sWZVFGdB03C8Gg\n+qyL9N664mw5O2Ycdy0Aohw9amFc577ZUfaQSsP1NrKoJ4ZyNVgUBsLkTImC\n396IxAu6xdHHhL94/r56VpgCeN/lx0EwX9SqT6gSnoomS9ubBpY5Y5dhqIQy\ndUiEoOG0RpbYjE+hpsbouW6m6j/5UAwhzzYKHMEkshqxk8DAAut+kTRzFe0Q\nbevMWYVSva5y1ptfQu6KlJDGEa0xNeYw0sX774zIFcs1qB34w/YKiiaWCALA\n4V+PL7Ycj0w7FKLO7WlU8zaOAsEIFPB+j0Gb2LjpV6T3hnFoe1AoMQGMvd/j\n/8PARdRJ7NjAVZlSKiPxysvY8IneOcdApvd/ZdmfRUF3I61sh9r3tnwQbpuT\nFibU9x6vrhfVxYCpdxhjIWaOz1keqKPYaGVMGyj1gWNRdTCbxG271i6351PH\nRLGmFavNYre8k//UJpaj9N/14yU9E1jHLGuJ+KXlSIy7IxtochMWIAUYY3qh\nXjyrUtpVJur9Frz704hWuAY0x9Pl8UaqtFgKaY4a2SGy2rPjkf8yPJUbEpZq\n+ju3JCpiDplg2UDg1yYOg4a74q8+An/8KMkL8Ue0DUTlE9X8esdpxPzVdc7v\n5uxIqpbmDoskwCbc3uWI+cmAQyLPxmnYAxN3NhSJxfnEfjQRZ9ZGukBvuvT3\nzTzu\r\n=5Zh6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/W98GnU+HaqW/i3v6IJiYCDk42aAbnq3Evv8ysuewSQIgcv7W04gOnUOyCHpVNh7wIQZtLr1XFoEBMF6Y7YQdKg8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823103332_1566556681141_0.6675707773292414"},"_hasShrinkwrap":false},"1.0.0-master.20190823110159":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823110159","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"eef6f603e05bba2ff35aec769d99910c84d87840","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823110159","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-vNwQduezy0MOUDIIE19Aa14GmKmO77tPZSZYVZ/WLu5a7LZfGVu79FZjfgmiAA7/A3Xfgt1+m5ZuyDB5DcphIQ==","shasum":"00772b0d1e5042995f80c26d09c48dcdcdae6b43","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823110159.tgz","fileCount":327,"unpackedSize":2564909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX8h4CRA9TVsSAnZWagAA2pgQAI5eULdre5UtYvJGdGhv\n4GJjrExJ1xeXhIJEyzZSChV+wsW217g5douLZ7pMm7FCLyv0/FqXnRzKZMUd\nxGYiT6M8HNiM0gKE+EgDIj6ljrNXJ5tymQ05NbPpH7qUCVPxrviI2nAlQgMg\nf7he6U32zktvcVjjPz9u7G9UhlhHv/+ViOzMdR9TxMPE37+/zCxVfRUpr+XT\nNCZj9UxPjMwLf9s50w1QUjt5gh+N/S9qhzylKneMh1ikiR8KBcT3jvt1kqS+\nsZ8uQ2d8M5DqWFVipZy9Rkxref/W3CTKAmRbpyrcZuRFBvojCTSuhEPSbXoD\nOtpqYNBzhy0u46yRpbq7Vt0B8v3oaa6pHNIU5NO1jQ5vT6cF+OEAbb/npHQ7\nBu4eiR6lXa7jo3OiYONWWjnMtIYDpzSanptAsmty5TX6PKf8u6arTRt5TvK7\ntXOb5NDtp3tAHcsphlvEHlGdiJ55ZX5boiM9zpBZCVZ4AM6UcoGOIR8Kt2hP\n3gKi7BbUos0iachkZkG7QGX6UnVyzU9LZxG3eRb8D/FT6WFAJkaauzHH6bgY\njrXXgYNSMAqKno9vHZhJjQuGr6h6M8ST8QQ6f1usFn3s4OuDxC6e6lvPG02F\n44IA5ll6GnUkWWToQieanpzt2E4APAuoHIA7F7CFW+Fbs98yntnASr0DQzbX\ngrIJ\r\n=d2W3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFRbmA6QcuG8nsLBsrSjYP45pAzMVDAlbAAoX2vnPVoSAiAnAnjcu9dXznKP0mwD2vWv4p5tUpBJtNs5XPGRKpnWIw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823110159_1566558327765_0.9257639254527632"},"_hasShrinkwrap":false},"0.1.29-master.20190822002550":{"name":"@atomist/sdm-pack-aspect","version":"0.1.29-master.20190822002550","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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/customize/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/customize/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":"9ec88d8301edaeb59fa7e6fdd114b447e9e27afa","_id":"@atomist/sdm-pack-aspect@0.1.29-master.20190822002550","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-G/5vZDOrfhKnK0NG1QKXR/pVECNK9JQiCOb8S/5i57SauTMUgPLsavWvU6qErjIjM7lIMrvdzGn7gIuS13wTMg==","shasum":"c62a0896e287dfec9936f4a774de0db8f312b1ff","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-0.1.29-master.20190822002550.tgz","fileCount":327,"unpackedSize":2565432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYB9RCRA9TVsSAnZWagAAB5sQAJn/JdcynQHHuY0hBGLH\nwVQMu2klQU7vGh79/aG7D6c/XvnG7DVYS1SS5Ss6EW7urs4GMVDjT8J8Bw3j\nYvD8r8EiLTu5qtSacTWhB9VAvRjt9u0z28nf71U6Dro+XTH5R4V9FCQENjM6\nxxaO20NwXo3sopqGaQT3K5Wnt70YZYXWRULx03Qiz14T4gUmPMrYNDYHpBQy\nV1DFSgisE6aSy8+7GDUeFAQw13+GrKrMbFEWvBazefxTd6ft7IdvyTdWJ+wb\n79ze366BdL2mX9sJKSjGH5PZ4C5YytPSASATGNVUYGRrU0WlvLyFmpgtADT8\nG9tl6v3Vj0/jm17BtGvkgU1hXH/SX4DPDzNyKEygbcjJW57yT3UNa1ULf4E3\nfor/vYz6uPw21cU2eqi5YdSL2EP6QyodMwyxBdTnZouVQi7xcFwfe4weA4yg\nRokF2MLJZaVfkF60X/jxBv7QVz0f3/tSh6dH/26JOj4m4FQoDaGb4H6QcyWO\nDtSE6sihlxHUs2uG1QCG1J/E1B+jwNrXld23/pa7vecZFiFKfoXp118ze7r7\nPBcNJ7Vb3gO8PzoMKvb0FkAPTMJ7S+ftz1F4GyliHOhdljFQlDRyxDuqxMRE\nJzlo6k5kcLHVbpy/ssPLI03SwXvPDKzWqtjl00WMRJcikVBbltp+CrGfE/lB\nURr2\r\n=49CJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLejiDS9cDmKYdg0ubLSAo7oHDIlhlyRQp2bNKIADc3QIhAJGjhdd614n3/AfJi7A5sTSxIpbt+12440FCUmi51a+E"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_0.1.29-master.20190822002550_1566580561034_0.7166311433835464"},"_hasShrinkwrap":false},"1.0.0-master.20190823180736":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190823180736","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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/customize/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/customize/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":"cf5e371de73a5d3deec276e738928fb7d86e0903","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190823180736","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-U60Bo2cHKJhJIsQrJKgsK9EdI11b3rWkoDcnQCPMRceTS8UaEfhhd3OmIH3Coc1UnUKCLhtcQeBUlt1VSt0uMw==","shasum":"cf4a878c030bfab695fead3a04539349e855d2e9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190823180736.tgz","fileCount":327,"unpackedSize":2565940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYCxACRA9TVsSAnZWagAAEHoP+wYe648fQUUsBs0sMkN0\nHzmbEFCfRXkH0CNyfU4N6iAFN4XHpU3I+xu/7kC/YIJv3Wdzv7RkI7OrkTZQ\nB5UfFaYcwsnZ0c4RXJOq58DY8wZnLxmX/+tf1JjbdmA3pnRw2ijO3Uw8YdPm\nOA3CCDXaYqqW033neBNFQ2DqdO7w5zQtmtHcJNgx1kW6XyNAREotA3Czskz9\nGdO5lVky28bZ4GJmZV02nOZJlXEy9Tc9vX0NBoAScAFe+aDOT7TQ1IuQx3I7\nJUBSUa51SlOYFd1/UU9icNfBwiXUCY+VTV1AbaoorQVDRoalNjd4QWov9HSP\nTyYMqail+uCQT5tNJWn5sJOTMjfvPa4oHrdAWU9hlnSyL5GMrgG3IQghGspR\nBon/YyQtxNU0dnywDQt6MkJERUlLcTgucw9qSPTcGd6+NfqxFrkyv15xlkWI\nh5xgUQ6ST523czO0NlOM5og4+4SLSAaiOaoP4pPLOJLPjQiatxKzbGKZ5AXA\nObwosY5z1+0TSf1L9lCIABIO7iVRbaLXAKEISHpAALAZm+5HfSFGoVwkRwIl\nBjAtx0qR1zmVa3EGqnoWKvd7oLETIYIxzsXr5btA/vfEoiM9nV1HvMmolCg+\nWaerGeHwxGBBdhkeC6FvP65YBltwDOEwzlG71viizY8ni2Llw8NV6d6oYpQZ\naXil\r\n=IfMF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVTIhZrXTX9nKgLNrhVgwma8z+wy1pYlR9uzn8uJC/EQIhAP4zhuVO/QKvK09Gd8eKKSiFQU84A5nFmTxI7JylziJR"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190823180736_1566583872286_0.45532026060337616"},"_hasShrinkwrap":false},"1.0.0-build.20190823193749":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190823193749","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"bb289b8f9b1b0e22a528e7e4dac5b83b9b50ac8f","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190823193749","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ChIuqozdB6akF55qHEiI0oJJ/qYV37sOSeBqYrC7LYnUtR2Ys4Zug7RK1wrhKbAhCYm0jYxgecodl63EsLLdsg==","shasum":"bfb716d16a37eecd0b41dd7bc64ffba4c6251dc6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190823193749.tgz","fileCount":327,"unpackedSize":2566000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYEGcCRA9TVsSAnZWagAAYqcP/09G19y7yqHqDZC79F4L\nlkIHZLO5wl8igJh7p6S/42y5y1B//AcwkIFLnW1Cr6lRIMha6oZKbNnIEzZ7\ntOoV8jjyPZvDjxQT2zNpsyJMlxnD/i9kOq+oDBI4lY1nO5u0H4mo04+EBklr\nnVo/E9n+HVbIgTCljtApy49sML/UA60RmPTaYSvodFiai/o/e1iq8XHsU8Af\nVUTjja5QvmrN/GhRV0glycPEDAs/sIQ8aduSv8lZ9qokPVeU98Y/yAUTOopT\nWhr8x1mANW1iScd5kCDhhmlcY7tJnrz9+HM3FnAn3qn0ouaTgw18J7ni0c9/\nxFKzEHegWdkr2sD1k7ShELunGZ33SwFXAWHYmQ0bhy+cILRvbbH3Oh+gTSvc\nGmXW+5tRdBFocfZixWv7NMuGJgH7N0/PufwN0M8xdTM+9/UIPvzbV/EduCBL\n2pUbjmhPMBBhlD8d7K9R0jNOxJiin4zWWyeT7I+KixYuuwyc27GnJjmbLvS9\nOd17apUV+S6j+fJO1BATYszeHFKbKstWyBAvTEbhv9TwfB1ZenZDO6jTY1BB\nCQVdGSN5AqCDs6owDyP3Q4BVY4XhkLQGdMwQ78C35jZAbRw775s0vc3HT2At\nhbSelJnveVqqsc2DZgAd5n9uIM6EvZA1/Z/f/+QklIm/TmBnphsmPhNdcKeK\nL13Q\r\n=CSRo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEwLjC6sRe8XY3LXXCvwpFp7ooiqu0xo24rKTs/+HOMwIgSRdMzEc9p2Fjnk+jpn5W8Gs6EL9Io+9+x1F2Kg7OOqo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190823193749_1566589339584_0.527898982975572"},"_hasShrinkwrap":false},"1.0.0-build.20190823211654":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190823211654","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"714c1a9370ddc9eb7f6f864a5897eb2a459b0acb","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190823211654","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ALnEjAbrPUn6NUZci2L62j38n59Tn2Decn92YDb5Bv/FHO1namzOVlblC1EwWgBeiy4r2fQjw7TzxG6WBgkUyw==","shasum":"21efaf64c10f1c8fa91da9b23ffe9771735128be","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190823211654.tgz","fileCount":327,"unpackedSize":2566153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYFicCRA9TVsSAnZWagAAkyIQAJ9w36IpIXIqpbnEmJst\nX8xrou4zTBCQt2YgJIwAGgVLFPlk9m3FKdX7g/aJ48l3II6J1yySxjxriqWZ\nJhInjulK5MLo7D7Pc08/igInp2E9OJzyiwZoccilOu5C4peB4Xue1LNRWRPB\nY7ZPMhxbLHOtn+A/U/Rj9/rM3/ZaZagPmAcMIc6rYHBq+l7DCw3/DGsDXQ7P\nZW67moXI4kpHIiRSePRI7/b/kqQKv3Sgy8ZZ7gTACmKZklT7maugvVbBc9sb\ncA/njKOW4311mMkJhVg7PlBFgxctLFTsr2F77z8EWcUAy/mo8SL8Gm4aC1hM\n9GMWkTC62vUVjmhijbpHlSUfaqZAzAQeeoTiyapCCGqEFI6NCK6DbkE8SvGY\n39eDOCAb3xocOTpl552Kyl7V9NuTLM2u8+lFZqx6m1YaiRBU0D+9hWDY9B2C\nGTpEVS0BjfaDJPhrBS12Lm9BvCrjir04MLeboT/tQ9sqciKinTpmYmNmZDKK\nnWTWQ3kzRPUYMyyntYc/QK86ZAtGFxYaRlwa7AvVKzRxzMApruueUNarmC9M\nU+j4eBCS8LKiL9WG8o4igxZnCgZFIiPk8eD604/3TQVFoo2y/PaQnXxYeWpN\nLZ06UjjJZ6lwGanvo4Pe+TMGcLW8jsVh1z+03y2GAH1/nrH/asUCFHKRJuma\nMDzd\r\n=Hh8J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDG7f4eOubknfHndCFZPZSi1hw6NLLX/5fSA4eie9rI/wIhAKd6SQTKLPlTrvYWOWHlY7uaegwrTC1wHucWeGAfl8ur"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190823211654_1566595227872_0.013624845012033537"},"_hasShrinkwrap":false},"1.0.0-build.20190823220415":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190823220415","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"66d21f70b8342451ddc2ea8a16a98d4bd78f522a","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190823220415","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-xI+ZhXJ65lYCfdYajgbFLqUfZvg0U6QyKhg/VCRaKlYmobcqWHmcsM/nLaVCgoKqDBbpSnpYyi/p7cqzEZNLNg==","shasum":"ff9bee49262bd06b63b67588771cb34798306780","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190823220415.tgz","fileCount":327,"unpackedSize":2566152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYGPUCRA9TVsSAnZWagAAvq4P/2A9l4dM5NPMeZwZqBt2\nvsQdOjFwslSW7HdhF2b077DTy/8eIh9gEbp3SomFXZx28EiXOqZb6qbmOacj\n1ZRPGlPXv0PzOH7Glzpv9u4MaDTxB9i4pS4aqEaSacYHQr7O6BdqYA8Cr1IM\nYjftz1pqHqbvOyoOUXpaz0AdowKUOhkAzNMob+lx3/RzTwZTt8+Tj/NPF+GN\ngBWxSkKgTBCT5r3TSmQsRGTRuxYK6WTTJsBAzuHZkp9SncWs2B2Lmn6NcLwZ\nDvd5R5z30WNbt2krx0B4Ps69GaxrKnV2/Anuoi8HxxKNa2i8xLrouZAdBwum\nTfOolg7zgBXgcKIWZO3EcaJbMWCigtraH9HG5L9KRadUL1VWTEc15d5/1/og\nuep9BhJjZ2XEUM3LGruI5+xZ9ygzOeX+RBE71Tjl9VPCiY5KsUzMa4BoVhze\nwhyHjlKlpEbiAMDBH3TAU0PA8KFXHchdFYfVEcSU+JzA7ucqP3CuFhvKMROP\npgK3wSo8hg/O7zPNVmZv068Q8m49cLiMqUKSrh0EH3CWATlHHhRekeej+ShY\nBiIxPLwJEMms3GWSTj/Uj13Rs5apqImn9fL1sR8LX1uXn4Dxq7Hsoa2qfuBe\nhf95JmvvMkRDdJkEJZemHxd1Hj1816kI8jLtMQ4rguB62ucG0LIdGbXWKCCq\nWR7n\r\n=BPZu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDNbPqM7kz+9bm3D068uCmXZ4XGCOMfoqbkcJCw8xckAiEAyaS7apuWvuE5lgM6+fiYVxBoHier0DttJs+UNIOErS8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190823220415_1566598099691_0.30272823711807906"},"_hasShrinkwrap":false},"1.0.0-build.20190823224946":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190823224946","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"4d42c7769ef933edc851938069fd3d74225663fa","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190823224946","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-yzEuDBJREfVHYWGs2vDwcAqPyqEoADtip4/MNLwgPG4rd+8gNOyXtjyGz3yAXTKfI1EjYb/p7FS/X2nWl2eYyw==","shasum":"3f2092bb056673d67e0b0657a61710aca9ff3f48","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190823224946.tgz","fileCount":327,"unpackedSize":2566134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYG6JCRA9TVsSAnZWagAAiVYQAJikC8V4QZ1KZJQ5x9g5\noiCIbZO0BEVeBwiuRbb/wAmdaOxwhi0YOF159o4Y/24ukgdh9G+EH38cvkMI\nBDFfzK6JlX3uk0w1sPWa8YzfMv09/7d0+0fMeDjrOmip29XMW0vybDXuTIhv\nRDtpkmXCI5pkgXRwolfCxyqrQjdCUZ3LcwsTSQpLPAIb23uxWuSSZSqvRnX1\nQmnj5lkvXm04TMsSoAFKPD7CUX4C7NT16BYbRac/UKuy6tuWNb/jMg5G6KnW\nDUknbexBo1YHpDZH8Qh48KHKD5cbwiDYPkUuexpiwx58GwaTrzeVL+R0E2wc\nwvgMX7n/Pagn5uFwQxQMPOmWEHgthQoSdp/iwQJrf56D1/DQqOyoZwd8E9Gk\nrr3Oic5R5PW8ExUVrdUNDau+dFvbsa1G+I+5vdF7Axigo4jF/MZIksYITCYZ\no5+Jjquxd80BoyGQpqcISO6uZg22Zf8DHkphcwr4OXq+b1bTFVJsnwx7rtp2\n4SzsXKnpuQ+TSq2JDAApwi+KyNa+CO8pFFHaJWfYImNu+ptCCNeqy5mtoYUm\npthHwBdIACAYE9i60s0zy5B+XE+xkXsMthvbKcVrQaAz1Jkk2JMPuGgM/zcj\nDBJGRXzT1EyK9dAo4GTEe1POcIwP1eG7radDYA9K4Qc3Qd/puRculhnuapcw\nYCA0\r\n=ZqEE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE2nMDuFF2pS2bbSl6w5lcnhwt3SS0BNstR7CogCybyYAiEA9oarn5VCa2sWhGTAink0mKyzVt2yitoubHWYMhKzYuU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190823224946_1566600841148_0.7966179453037772"},"_hasShrinkwrap":false},"1.0.0-separateGitHubCommands.20190823225702":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-separateGitHubCommands.20190823225702","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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/customize/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/customize/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":"542de1cb79760121823724085f8cc0f51244729c","_id":"@atomist/sdm-pack-aspect@1.0.0-separateGitHubCommands.20190823225702","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-p/wo1OHAbLfprM/IPgo3XeHBwtKKMoDABnPmMKPQYPGDLPNu4IOzGCdJm24n8dLDMiddhPeG5Oa3pEyVjlYjeA==","shasum":"37f66e8a29cfa6fb70afa6444ed0b57e514d6571","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-separateGitHubCommands.20190823225702.tgz","fileCount":327,"unpackedSize":2568809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYHA0CRA9TVsSAnZWagAAOMUP/1+TvF3VcLApiwfrWZtt\n6cI6rp1PDqvseC9+WmHBjyyy9Glrn4NJWp5emGzq3Szw+0jjioVmOHOL93nR\n8y1nNPmLHM3NKtrcUBUPvBfOyWwGvm0Eq8AbZevMReW4JURAP5xg6yMJq8iI\nrMmi+Os9wLtPXdhqCaTrVXYt/Oct49GgLEZsme9JEjDp3oP0G0K3LhHAIkN+\nlIh27mBDq3o6vgbtstSbnv1Mps/z4QV1Z8gChjwE52huaI3qB6cNB6WnqJWj\nnhziLY+42t5/7DFAzCsew/IsFssyOtl/bD2HnlWtOudDQvqyQXzVFbe1NEjQ\nCYdQaSHwowHMhj9Y1uHvpCzjGCj/T655ZjL9iIVoHLH3eT4u3PqRjL3Jv4qQ\n6tBmtrXIS4rofd4v52SlAVPHB/dS+fes5gelZLGq6Lhv1tXhOt7HcIXL65z/\nDEaof5i43caoJbVKoFE9104zmOld9jWrTQmaq45TXIc+8e42QqkH+LQEKCqs\ntw+pMKklJDt8/tZb+iWOdYkPYzRXSHsUI7oEH+KvI5FvrDKQTFrIn1gdOBOj\n3dT2dqpgNfTKk2bKorvppyJ8WFR9YgAn7aLd6XF9ddcFBV6BVhJnB2m+lLv/\nsKgdlvLjctpZiAYDLnSkzVyTeqVeNAoCwUMbCtxdr2zqpusuAtiY8q0uNB0B\nhNtr\r\n=Oqsz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDinci3BM3DDDwzuc2TPHoMCtX+E3/gSwJJ9QLqu1R0+QIgSxZgaBzToIqhZUxKUjk09F+RIfx3teDcYXmOycAQ6v4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-separateGitHubCommands.20190823225702_1566601267995_0.15853901161579542"},"_hasShrinkwrap":false},"1.0.0-build.20190824020702":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190824020702","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"bd3583aaee4759e1998d66559d9b9f8e9bf1bd4f","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190824020702","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+ehKBB1lzsxWgjADIw1RyB7B3DtUAGhADrkM/XaMc3QbRtxCCblveGUIQX+EIusFUE94mDrtlBP3XKOFFsEYYg==","shasum":"15b513ff4845931c0c3f425259b4f22f2956af73","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190824020702.tgz","fileCount":327,"unpackedSize":2567459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYJzECRA9TVsSAnZWagAAqLsQAIQy+r00zLB7nqG1zaXk\nMCVPsCRojYlHMjjEKxBiHorEHzw/CaUn9z9WOflkdObtgwnCt49Rh9yzYIxw\nMcg8JRUlz2oZthCfuG8hnm0caANNhR/aV0aM3bBSrweSjJ/AAts8E308EWuN\nI/x7ZCH+sgx7xBT0pmaWf509nBAKRHGwFs5XEYc8eumDPZeM98kP+ObxeUCV\nCLOBFrTywGGWCQwM86va0SI1k8qMQ6nHnJbOYEPcCqZMetTDVrODT52vbQNi\nezs/AT8fqtcSY+70Nov/7x07AQ7+BbA7JLWELZce8GwvVv1IhZlqDmc/zVmz\n4JRYIu8EUDgbQ3956iXTdN7ucm50ojErIT9wZTeZlxd9F3JGA8jjhVqPcZPM\nksfAPolFpDo6+fj1XGH2yE5pk5csLyrntcdEp+7TLceQr5S490l8NRUuKYgb\nFdpj5udlbxGVkG5UsoRefloSRAMq1KeGasKVgsuBk9xuXVm08rXpxnZgLHP/\nsdNOKTPtiMItu6MBbUl7wsFyLmHHeijVGXldRyl6vw+hCe049RH1BKgGuK0f\nLI6GboljNfosGcTZQihZet1dSLrcN2dZXnY/Gq3Ici2PGsnCyXU+hCc8oQRS\n5+tdzmF2NXsTBKiVQJ9coyYs4XaeE1M3Ok4AsClHRT/SU0i+eyKodDJfUEvr\n+MSY\r\n=joWr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDONZ1KqYpahDY16vRjwPtUR/7sQWtllonLweibxPkA+AiAsYhXgZlc1rqnJteYoHug+jDgnof2eh8Ukci5opP05pw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190824020702_1566612675389_0.6833244757477575"},"_hasShrinkwrap":false},"1.0.0-build.20190824025734":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190824025734","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"8efde9d81f256e4c67737629ab2f9e1ba7dce4ff","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190824025734","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-cb8K4tg/0PQWs2XbOYmfqpdv50Z+OwDlgrNEr/MHAVXQqvEE9QLTub93Q+ST+C1cADxL6sTRIWbnEPvfg+rQQg==","shasum":"fdb1a634e50e6fe2d53e664412bd95a4a3d3c998","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190824025734.tgz","fileCount":327,"unpackedSize":2567598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYKiKCRA9TVsSAnZWagAAL4YP/jh8azECg4IqhSHWBQCi\n3qLyyzLBgALKpW58av8f8bgtaF2AjJxJlR8eI+g0UVmx/45nFSd/d3/+e6uV\nLigpTy4o4Gq7ntiiq4NHhT1Pbk2rlV9Z/rKL56F7k/XCKLAMkjLyvRfM+LtD\ncNPKF8ADmd4NBQ0GYFApvfeVoPjVb0edta4ib4qKP4aqLT08EK8wNtXfXsAj\naBQSKcKaLFkDtEnAXrFtvxhkVVcnqtS/6kDr+9I8riqG6H5+kq0wiBh3LWe+\nZBA4hx74jodO8luQ1aUC1WGlMPMWiVSdX+9ORo9KNkTswACoHiPpD7DUK0Mr\n+MthIU4RVCn3T5CITmHk9g3HFONJd6bN2h82VNcziYK+1Ku9rCxkCRdwUJhi\nru4C9R0S2cQ/Bjk3q2IFrhLALhh3KeDFk4lcmonlNTRCDwOElqgVvwdEKb2O\nRlGYVASiZf3sBtK7jGENFKjno19Po74u584Enq2OZzwR1sicX9bm5bX3UJcS\nuJyIBdPKlhiQrQoErMEKyPTihgRlOwwu5sogi7duQelE+PBa4j54Gi2jLVhU\nQAhDKQ/hxr844uEpftYpli6dNhtubX9xMYE3Wwbo4YN1a5A9Pj1rfF+b+qAA\niD6z/urEZOVdrGmEP9pymd9YuOKEiKI9iEpESwuC2S/7vASK2LZUsz6fv0Wp\nADub\r\n=f9qc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG27y2Y3AVPx3JhVt3b2ep9rC79248JGIMDSfM1D442fAiBiS6OmYxXV0vomqHLChG1+Bb40TKntGN997wlg/LP++g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190824025734_1566615689800_0.8776555285600589"},"_hasShrinkwrap":false},"1.0.0-master.20190824173651":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190824173651","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"618e383395b5a2d9d901d94e769c0c118d783506","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190824173651","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-9P1b2EArMxL+wLRV7gJmdeNquZcEp3UO2YJKrLeGMzw+amD6MktFC+U4l3JsrWAyvS9x5BxMWkKr1MeZB7Bsrg==","shasum":"73d6bcc25df6f72ef9e0cb354e6e8d68ebf8349f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190824173651.tgz","fileCount":327,"unpackedSize":2569078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYXaoCRA9TVsSAnZWagAA/hcP/0k9J6XYkaj0MfwCXfbh\nuDAmLgXzPl3K1rxX16TAfVVq3DmTBHXe5o6hDTWptgI3bekYR0oUDqkt7I5l\nOFOegt98EpNBCNykT6i+3VxNhsYiLFE1jPZyf/1WK6yGOTcmTnW45FQwbV+/\n+rJujAh517wTSslbZnCtfUheveC0f1r89+7MNJQFqHsHIMXGZOKPpCjH1HLY\nF7p99hSlxJE8r6eZb9ysQ1RmHNLrB2/fp7Xxde/GzWGhTHncus6ckvx0cxEz\ngmSrtEZAqwI7/DEFsDO+mGjfKsBZncPQOSegdcBpy8Y0zyqQU9vjyuXdHG28\nX5Yy0aNlQNKmZ4CENpk4SmUaU3jZBXcRZufLHkqwTcbRlo8jfduYu2iqCZK0\nsTdFb0nXC0oUdG2Mt3MfFQN47DDm+ylN7NHKCeNvRRnx991J6I0fNsHrU88m\nRJnonyzhf987e9cYtNO9r8LWc6KAPzKaMC2UOaLZRE6jKBxOH/DfEke7e7xl\nzT86u/xvyHbZYaZ6zPIXWXk89gR8YMcxEB0qu60PwGhbUo8UNp/f/hiTSUuD\nTa79ayYfQecL0nYbagEeyzgvX7GASbqbFKUG07TiUu/ibMmWH7bqn47mWHmh\nKQHm1EN6a22t5fAWK/OK58BSi7rxq08yHJkZmJQFj8yIeBR47ptNXrJ5awql\nNXDc\r\n=mra4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrc4w5DLJUFbXTmAckUr33FFLq21kXaVnOSNHbH/aiRQIhAI8BuvAsezPhPbplMih44t/c/pP6+1FSknvzNli4ltDd"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190824173651_1566668455696_0.9715064944421796"},"_hasShrinkwrap":false},"1.0.0-build.20190824225507":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190824225507","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-set-publish.20190823162648","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"2be68c27c588b0f7c3340df156730486c269ed24","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190824225507","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-RIXMRAjyxux7GovpCKei6mOiWm5RagmVliZ5CJW3Uu5V7q2vyxibR9h4jL+4pIJCKRMl/8KnKMcyczj/St0uxg==","shasum":"1585d5642f645efb29bd7c0022eea9ad7935fb72","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190824225507.tgz","fileCount":327,"unpackedSize":2568824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYcFVCRA9TVsSAnZWagAAwn8P/0UOn6vI/FkEy7Rh/FUf\n66dzIXeS80C/1xAWrSjd6qSn6TX82rZA5l1N6ZCded2BSfZ0b84GFvNZhZH5\nsIzW1T/9kXcr2ZPMvmhV8y3f/dCWijfAlgE9SGB4/wg2wFqzMBdC7Cbawnyy\nQsxAcpGAFDSZzSKDyUVVJcfm/XSdAN8IVRdBgDxBX3VKT/xbjT5NDIzpg1CX\n1CiVbN1VZFILrlIOCpLIABC1vfSqqqkKEoFuDZ1ykoAVbERJYodeO0ET9c0y\nP9ZucatfoUw8vbBt+hmOo0oDXnlqYIxAyyUX9hQ5GTsjgLIjzrj8eKXeSwd2\n11tZW7mNi1vI/jN8rN/ivQX7W4m2nYfJrRS5ObK4E0ZnXdx1J6Veb/ZrY9NF\nkZIKsnqtlR5721EQK1+jFpabz5ryr1yWsfWgEYik3ki7/chz4iNe+dm72vUg\njQXMHpTCar0LYNgPWpB9DJsS+XJ/BHpK4h+oAXuGvSvYTzJsLR9M6wRfIsRm\nW5vylKvsL3VdwS3XV52fKXVfObeDORQK/cN6QIriEPZVk/sDPgvi7uO5sFPc\n3OocT+1TTgtCVSarceXKBmbmHrgfeyzOsnuOtYZAzVmV3ShRwYuHBpYM9cze\nPwQ3rujN7GGapJA3d3+Zu1BpZeZFu2Y7IeRkLDOb1M0uDZz1ru+CPAdXA6wv\nk8NI\r\n=ZqsQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFG/6d/H5Q3kVFZb4065xv9NFxpu1m5tKonBlMCBSgvoAiAZBLCyeUMASqA74pgt8buzlVT3f63mmU6eLA0eIcMGrg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190824225507_1566687572906_0.9088095047687099"},"_hasShrinkwrap":false},"1.0.0-nortissej.analyzeForkedRepositories.20190824230043":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.analyzeForkedRepositories.20190824230043","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190822232250","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"cec831631c47c3e9142fc0291039e088d6e5775f","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.analyzeForkedRepositories.20190824230043","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/dpuDOwQh6TgpNakP5hafjD3/ngrmM5sw/6z70gKlWgiMzsr/A2l7mSosBVaKpK3tqhJCzu2zRoSPS6OEUJrdw==","shasum":"4778d56f14d75344623c6d8e75ff71ea7a505c75","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.analyzeForkedRepositories.20190824230043.tgz","fileCount":327,"unpackedSize":2569146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYcKaCRA9TVsSAnZWagAA9IMP/212FosI7lyKtl5DFF1O\nxvv7gImj43XMtPNykD6Cm5Ovfq0SW2DeXZsxww5mlogylnrBYeciyDSTPP9x\nVkExl4g1QjU+MgoVCGt7x0ckK0BFui5QQc9/HkMtinh1EKdpgzfelPE/kNcf\ndrpDNVKY0iG882nFAwlURNh30116GRYT28fPBF0iA+vQ1f6aCwlZuJqD2El6\nzB+lI+uqrhgUCz1FGYdLgtFfJaMC8GSoYTATvGedePynLgFOT6Z2cU/3xf37\nBKgohnXEgkL2bZKz/IFkyIaafkfwB2vPRaq/xus4iKzPH94eZ7ss3rra0nZ1\nWdsehsFhEQGHvZ+JZa9VKJXCbwg159zf5PpQIkqoiNJ9F7e03b8J4LajfotK\nCUXpGomGKgVfjug1195MS8oMSLDjHKl36ViRxkGr8V2yAwcOaPVEuJNO17Ps\n++yvVfOuQvL62jGf9huCLnJA009MXXlTeMko4J4t2QWQyMnhO8e8E/GsoaCc\n/99yjAHZ0lgwjPIkBDCQRnSQ0kDsPKZtVYSBq+J1htaR0PoDCHkvjyx5YVJx\n5xInPFFjlL72sVQiuyA0mWzLGgl4Q1aMKNDMAlujONKAmTRN8a1BpKHF9kwF\nDA/7yRJYXQ8NetWCl/BimTYyObmzae9oI1qXSw0m5cywUhB5xZL2CgS1h7e/\nbeD0\r\n=NCXw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHImDYJlDSmCsUDPKY6DF0JvHx/3J4+UhVKcKcwycDvWAiBzIGMeoicIBsz8LPHHQqRZNNddQK0g5ffXWwMI3g/h1Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.analyzeForkedRepositories.20190824230043_1566687897544_0.5860185155591493"},"_hasShrinkwrap":false},"1.0.0-build.20190825022308":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190825022308","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190825000414","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"ff04ba3c09c6c53b0a828776936899349fab71ea","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190825022308","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Lkq7ZiPHP+prnENiBiWhro9BsLFn4e3m9kX7+bis2KHKRIYcIzUpH1Nd+uLUMRA0ma2I+j0HWKv5oxjKp5Uy3g==","shasum":"19747f133a467f39d1391cf480ec6e43c7872d82","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190825022308.tgz","fileCount":327,"unpackedSize":2568819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYfIMCRA9TVsSAnZWagAAXmwP/0p1fcIotQUmVDE464ps\n59sKKJj/Wn6UgImWaDdDUVWQ73Xo94WhKaq0s6bPehJftQDR7+zev00puxCW\nxWXPss0ugTpNR/rH2WSGg6zJMwyTElYdN5XlN+tB/3iqc3Pn3diF3p+RScpZ\nhhY2pdlkLd3gGTD9jKMW7GQc4kYlx0yhu6WI5KjsZtJOS5jMklAtBAAogNIv\nlIdimLqek3k3mcRi9lUvK+n/ffTvTxlyADw/JbxlYmryPy5s2J44tUnAFc81\nkUGXo3F/AeITfeniGDxietDnE7zRx2vW1SS5PgwZZhM3H10emMiUyibfMD8l\nZzdlATZ8BNAqsglYUqdqxLMKP0jY7nlml/ZNXQyM+LgktMJ/4hGtDmhg4RZz\ntHWHKwi8w0zr/AiDofJDRqqCQu0lS42RwLA0KrUgT/VjAS2jENkWBUte249i\nLx+ECWmc+UZbx3bDhmCIgjYDUXw+fNk5deYeZqUkXijWmG+s3QFSoKPsO3LB\n1fT1dYuvdTUDS8GMcYwzxCkEPtcy65ad/Jl7x6aTF4+Vd92KKXzBRxVklBDO\ncoNMybZ26KuKbp8lJz3hPB9E4RGTTw9UfaUJ+nDSyhAnm5sOlaLj4Fc3lA2d\n/72qt7jzGGGIsniTX5GFxVs8CgZVcpkXoA4ix13pHJenzVVFUzfhLCUp21Ub\npSO1\r\n=xjMc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFK7v5BG3+pIsFrwkzc4IZm5epGKWAadK9t08dCERNRpAiEAwg/14i9j/3VqKC+sCx367obxiSR1FrkzzYwpYzWvQiU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190825022308_1566700043450_0.20042679945411934"},"_hasShrinkwrap":false},"1.0.0-build.20190825175944":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190825175944","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190825000414","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\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/customize/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/customize/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":"69c4db9df45dd2d3830bab87c09c2fbaf3d2c88f","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190825175944","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bTc+upqx+x7OJBR6i5MNdVqAtb9ASErIzKPFWvTkrbCV31/njgM0ZcqUmu2h4iTNdTigiESkRuamGRFLNlUwFg==","shasum":"00bb45f4385de0881a0e3ed1b290419420094faa","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190825175944.tgz","fileCount":327,"unpackedSize":2571018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYs2VCRA9TVsSAnZWagAAqZ4P/iTkqhtxvCKU+6j2r+oo\nYascAXrGjQJmsOmK0JfN/VHc8d8tbhW9hE5NSHksuDTFlDZsdhudMw4KW/aD\nEQrGNl2ouV351OLl69xE1TIFBXC+z9IZH1gAzhMb4rgkx1HZjtJBcg61jaTV\nDpGnCe0/Hk45x6scd8+UxQhUA5TjTg1Sc5sBXweLOoA0Q+wiXCrOG/Gr6dfO\ntNy7/n4AbhEGTi4KwF+s9bi6H0eA9qujsIIh/uNAWVoz7tmh3hJ+86LlKnZf\nVThlET/A9cS4LBxw3c8Karqd58l2JD4YSallrYBLIHHg7WmahiQJi/lPXxDB\nQrdAuaziTXtwVt7iKAvl3M1POHa5igGKx7YchH2dW5VeGDkSOju5FO6YuS0P\nfip8XuMFH7Xo7KKog4RD0ksLPlTR6hRnAofRC1FaGeN2rY1ommXMq2KT2W1u\nUcJqzSJrLooOtRBPY5ER4s3qXavQmLnK8lg2dpdK96jJaogp3lAAkszgjlrc\ncz/Dlnsg+mrpquwqBhfXOQBeNVqtnBOgQKszD26yET5tfwMpt3iptjARXn+f\nv01l4wMnwHwrss+NgoU6JdPI6GJ+81Sbt9a/4MlMTqJk8ODKDpG6ghcmFWXS\ni26xz9ddOhqYR0+sZ9NAPE8LCu1B7nMmIhp2xckFPy5RCyzmQmttgMJoVQx8\nU7GS\r\n=UOGs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGUVohbmKUI9f+4gluRJhPsRnGHNUOZ5xjeJvcteR0/wAiEAsz+1sm8SWF5FzMOJco9r3MpbkY10TZvPiIxUm4QEomw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190825175944_1566756244625_0.029337916795790786"},"_hasShrinkwrap":false},"1.0.0-build.20190825210928":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-build.20190825210928","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190825000414","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6dd267011af706320719df0ef837931412c7e7aa","_id":"@atomist/sdm-pack-aspect@1.0.0-build.20190825210928","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-mRPTIfrKelcdrJg9zr0CDYkt6b2bP/twBaCebxgr/o53yEVi2sBVYiHllBVmfJ/rjSUnYOF0zfwXdQnG6ZuxrQ==","shasum":"7aa85f55aeb8c9cde49523b7929a3cd674d9bf1e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-build.20190825210928.tgz","fileCount":327,"unpackedSize":2575475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYvnYCRA9TVsSAnZWagAAXU8P/0E4ZorMP64yaBLHlX2m\no1r9YB3Gtv1PZcdgc3bjH6ljWqJnGO7gpfuKn+jjCVQPDKHPyprMV5Q8qClh\nmUcnXsoGgMr/cyY1LBlzHyspKwtwXf0PpUqx04JCuR/vPEWQFOok4sYGpH1B\n81gJF6itITxkLuk3gElso28j5nh12EHZT64p6PXFPFZb+NSvcvKEjUmQxDNI\n+I6HjQHfYp4f0D4Xw0O0mbia88VgA88ap/oqaoeVaMZqH1uEm0ULj12r0l71\nws1M28IPm33uFotCgkPTDccvks7KNy51M5k15ppyRNL61lTDq/tlg9/PUP/7\nLGqRpzNOcypQFqTljF0kxjB4Tp9S+VZMs4prq3OUKo8hPMUC8SFYx8SFnHI1\nLk0LWtFdiU1PnlhbjssaFnCtG9mmx4gaq9HoetFNcqdHfxc/5Qc1UYyeTvSS\nyxAooE/7MybOQjpaGdwrefjr0qsNWSP/G9s6DfcfmW2wvl3XYzi0m8ADAsg2\nhX0Xh2ti2uqm9C02y0cnp6qY0RELptnLkvnW5CvS+Z62DdfoGdEFbHCgvO4H\n13npYGB4TiNlVC+SOIMB+kumFi/IcFwjkBvjvsHyPY0jdd5tmeUU0Fw9vdlL\nUuNs810fPuNM1B7AteKW9ea9vvmLEz3mGseFz4QtMA7EiDhfqEL1FqDF1ma7\n0K2Y\r\n=YP1/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHYYX/YJohK2VVvdNg/zpZV3rzkPGQ0omPGwtZvgXecgIhANClNX2pAFfH7TiHwby9vdzT0AHaxTH7g1UQ6i5Zp8nv"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-build.20190825210928_1566767575734_0.6590574631184876"},"_hasShrinkwrap":false},"1.0.0-master.20190825212924":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190825212924","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190825000414","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"8e2f023d5738ad2e65b67f7019a4219d0c199639","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190825212924","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-c0ZloKsH2IDR/KDDWYTW5TVtzUq03XkAAMrYzkI22zLM6+r+tnSd40jdQJZMd3FUZZUxfMnTq9KdHGsxbchPAQ==","shasum":"10ce741e2b3d4ca881fc5ef241ef853447565c7b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190825212924.tgz","fileCount":327,"unpackedSize":2575477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYv52CRA9TVsSAnZWagAAcX4P/i7mRsCMqUZQMAYWBXnl\n7dV02PkysquFzlsN5tWDC6L4RxnU/rfNwt9OoZsuJyGA6hqjV7JV14ZbyT+D\nG1V+oA+iGtSwUBabzd7ux71qZC6zQCWhzdjtzHs+wL8fQwgLdUq1sW3RxBF3\nUnjny7lh3w3++MxKK0Qmp3Z+8rICpnIcUR76OMOokGQebSKKtsShLs9qreaW\nRINZvAOT26MSKcLLkTDR9FycFP3NowjLP3bZkS1c7jzoVcASvcReCS7ewIIv\nOgv/Dz/dcheay+sKwjEgelhtmoe9l+IO0O2yeid7XKLTEyEHvKDTRXFnS5qm\npFhA+uPBR4+eaZkNCjWZ38CRY6cszg5c/0SFGqL3C6HalFd1ByQY/5XOWW2h\n/G7bHvcnwmaHiHcjOsaMJOuC1GbrtTzB16sUmaZ8EwpCItRQlo/eGwedK0pI\nMnsEbinOwb6td1Vc7FBpVHCMZ5KHPG9aAAQgvrBBPCrbUxKjoI1B7TagG4nf\nO2lBWw9Z0FX0+hBF5DiArkmqachiM+nVxQWMzkT7WY/1crR6xtgBuSuJdsRl\nHGEBheFGeSq86rTELZRJZK6eu77vWFbIkfnyggWoLp9KcmbxliwjcR4KqIab\nUXj3pN2Neby1MPUdboD9nRIVPBtdqOyO7K9QLzWrAy7CSEK36IwhQnFfVXLX\nGoea\r\n=7nZ/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOrnE5d1txgHyRL0XE2k/q/9Oe7uvuYr91l6X6pwu3dAIgQEZmNvTRIrZHc79bYp+yucdstj2LWW373k2PilP+y/U="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190825212924_1566768757884_0.27113478637203525"},"_hasShrinkwrap":false},"1.0.0-master.20190825221206":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190825221206","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190825000414","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a4b1a2c1c7c03711e18d4749b5b5bb408dc3551e","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190825221206","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-fpNheYuMoCh+vCDSccsj8sHZGskVREDI6j3GmP833Unxpja9pM/F4PZU95hAvzXDRgwY7a28eRuVurh8KTg7HQ==","shasum":"4d8c43e1295e5c6cc21d85b5977e6f300d3386a9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190825221206.tgz","fileCount":343,"unpackedSize":2594127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYwiYCRA9TVsSAnZWagAA/UoP/3869IJPHo24d7/nUMCY\nG27xUCyq+6Rzav89orHEj7NDhRtwP1UYmrEZfRjXo0A80Q8HoNzV/ZzOoHTK\nzz9NGWhXo2MR7VtjcjXxkWNC+QFPJPRMPkRIc2AX4BmI4eoGZb5B+b0tdUos\n+L3O0oKi13tJzQOY0DnWQe5SMqnQUb69WbvyfEW3B/LyVkCf4Wr1cOKMbcgU\n+NGQQE29vrvQcJboLEC9slQlOyVOk5QdhApo/A/oTo9fw4H2eM/4Mdr5AQzA\nZkS1mHtovyBXvV5C/cKXUM+/Ej3i6qest/Nj3+1Cc1tbBH2CAt4MWN4msC8l\n7lOjpBQ8Z56ZSxtqb3aYiw3pwIpWE9PUs2/LwYJKQrl0dpEbbUZEBbo/WJEu\nr36ieCY6rUfO8/mW94ZFjG8a1GSDU2+KT2WhZsBZvSN9TNKAK1njC550s5yb\nJGBke5GUITgCPL5nbIfP+uR5ZdUCOnRcZjp0l8TawHdeZgNXOy64xg/gXyqz\neotaccyiZqee2lMvTNbhFzfjuXoherBnYogR/5+i8zKhMqHodBLbZXeg10iN\n0HVsJXQY5zPWW4RXB5T0NSvRyX6NkFVtXnxfQbjuC5QMfoDObF7M4IG/PCW0\n/uPtl2cFPXwBkSabhMwfKXpalkhigVJV0AQLhp18I2vZX1M0JptFVWE+rWcv\nHbIe\r\n=5rIk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4rL4poGAIcyHbS1+EffMJcGF7g9VTx0N4kskouWopSQIhAPayYQj4OZhQvHQUlZXCRIzQCblKGfHbn/rjcQiWWoT6"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190825221206_1566771351703_0.8233092551209806"},"_hasShrinkwrap":false},"1.0.0-master.20190826084818":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826084818","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"802072bae10b62905b1d64db5d9f4ed807de7302","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826084818","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-u6QBPh2f3GGG1d9a5NQOhEh06wEn16mlrnkeo0VSp3paHiiMTsEuEVQRkpHQnoAFBXw7elScrPd49J2Zq0kbkA==","shasum":"fc5ce9b35c946c5fdc3ee4a023890611dd9eb7b8","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826084818.tgz","fileCount":343,"unpackedSize":2594290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdY52aCRA9TVsSAnZWagAA/GAP/3yNZMpy9je4xpTH0NhU\nMbSduHZ+OG4Em6oYowz5lKkLxht3Ei4rBUcB3TFrekp7gedsV7+9O/1Vtt9o\nIrcakdqYRqLDXi7abqi4vvNWoFYilZCE0gUXQdC2EUMjH6BtU189rKUIfWxc\n4gPTAS3bYk8FI8u+YgrZi+KzK4yfB3RMT3R878xfTa98wCwaDQAIpC/M/hs4\nMiAbjCmLc3/Dq15Aj36OrkBaONIO0XKvuwie/SoG15B+kMsfUoj68h7iDloH\nnFNPpfsMTkBYmnRv1JJoigYsZiCLkaLWhGe7dtTkdTKKmEb1XyItQIcJR5z8\nn+u6HqjfKwvUfNnL43Y2MCcv/5OJ6PDdcsLyYjynUUBIP59EfNrjVw8p37q2\nX/L+wxyjKPaNCr8w+7+yxIlNUcjhltPYM90sakOyjcKrtl/8IyToq/NTkD0J\nKPS52IVL1EDlAJByTEtqOqe0wntuLyzJd3rZHjjG6oRGSMWo6P1jLHpZmUjy\niNoOgzzl5rfgByoeOoiCg5D7nyQMl2Ys2HYxpKpuJA7324wccZSo+2zHjwsY\n357xK3+xQ2nNuFXPt+FOeoKLS2NYJaG8zwa0Dck58iTFtQm/b8AUuRgrmujv\n3RGorH4patFrvUUy+xNtD/yGTrfQcgIFweoJ5Mm6mkc00boP9tI/3yt3oQgP\nLlPi\r\n=WVC4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpZL9m8s4BWzKcLxFEE+X/Rx1o3IcDVbmgr8Pgz31GYgIhAKGFs3hoLukOtPY3PMtTq7he6iZVnv50AroTRBoeYDxu"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826084818_1566809498072_0.42951685079502955"},"_hasShrinkwrap":false},"1.0.0-master.20190826124534":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826124534","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"1ad5967d7656da1714faffd7c94402550404e5a3","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826124534","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-nvq5LvBuSSScyb9LGQAH8p1dtWeAvp4R+mKH23KnC8mRD1xt/TDUkfCscU2lJGvbHKzFGaY86V7IJbcDtZ7CGg==","shasum":"18f06b90841321e494f9c612e832a19add43bd81","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826124534.tgz","fileCount":343,"unpackedSize":2594200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdY9VFCRA9TVsSAnZWagAAPQAQAJ4+me47QYR37GlCasOB\n0RCkMKaUgzqLIsPQXoTWFOdXeK8Oh1ELki9m7dB9vp0ZB7kFMvmNxMWkUf6w\nxgGrgz8BwEfq8cb2KEZnSP+CCfMQaf+l1uvor+JdtP60eNTM3hqnlZIWUYFe\nbXx2LbyRPhlBJPFQ/BxD9Uy6Yy43kRLKlL/5YxRp2gMMG6/nLBOZLqY331Wn\nYOJxAuobN6Fi452uv93Kjf0bCk5UC/RzNhfY1MUHk3Z71aRDNsjS+ANCyHJj\nel6hQHjfh0lodNJtbgFjbn1ioH8nB04/xg78/eMcgp3oZARwUVgBeYum4tPT\n4YAsC4MUrFKpxCqyjdk3fbiH6+QQq7EJs2BNRZDhsbi2BuXpT2NZR6hvd+Q9\nQBElQkmN2v8hxg2ALD0afWBH2l0wzJV8S6Go6/jh4xS14Ykd2aWE6Drce32z\n1qMJ+93NhkELTZN52S7npyb4yegATJBA88UNvVz4zlT4zkt1tJirGFzgO65l\nsOfv0iFRL9BlaLRhU6GzC3KR73+Oa233uAhTMtDOmtWhXf+l5to4Bh/xcyfm\nqlZvmmcRcwhGW/Fu2js2mz8HLFbRr1VxkvOhTAGAsrzsshf/fU/Qss/LyHvG\n9MEdo9Q3xC0fobD4jBjSn5gJVCpt893AjqjelShyA0qUym9KBwZ7sOCfve7y\nbD4U\r\n=G3DS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpJgVMzEIDdeSpCwnXTgTui3C1n9CAIRNb2TgG62vjMAiAIQB2g5MQE/eVVagkUSDYwvcTJGc1NVJFCFNDguX9Lng=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826124534_1566823748292_0.3323397552633447"},"_hasShrinkwrap":false},"1.0.0-master.20190826154649":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826154649","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d4c145fd9b58da0ac8733952665ba74bc7166d6a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826154649","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-kHgB815ARgKpkGR7tB5lOZZlLXmXw+ihz4pToP8AyKTWDILR9vpkUgqgrU70I9bGNCkmo+Jevbar8IMR2fqnlw==","shasum":"7bfcff53a72eda88ebc8a7df50aca8c41b0577d8","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826154649.tgz","fileCount":343,"unpackedSize":2596143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZAAECRA9TVsSAnZWagAAlzUP/2BdlmYCHiSlZnuvE2Jb\nRHvP//kT5TMu19bXL4VUy4ptcJnvyNAsVHe9vByPtBBvJGQ23RyXBTsU6zeI\nTgg+3TF+y5n9WpN8eDlfUvpMl9rjjaqL1iN5IZ0ig/3kkDG1CUAOJtpqYg27\nx2hX1lQaW3ioySITz3N3J80xStkHaDA+vXXjuMEXbL/ZquJJUPUe9nvstJw8\nEaREzCwVzUV1yKwYjFz+e+ayXxOfBATHS+dSK71uz2SwvlmoO7QmJ0Pk1ZjX\nOQXgvH0WmsD4eVQzDcDvdnjYAfDQ8T71KV3yZDrocvEEDvNzQt0sxp0Mt9zS\n0VBcpOyHZ5oBau17lbXRwzuo7oxL5sanUsVvyo7Ly/ncwPHZs3cKHfn1zIcs\nwybg8yoO/25lUK4vegPZ35q5QMatkol2O76N8ZdlPigIRHU7JiJX720Hg7Kw\n4hTvBBnNzerBSXZW0ll8pP4Mvpfvelc3taNgy1XP7Spm3xTmVBOm5IrFAmDB\nzmFNObVReCeYcNZYd0kr6YsOOH1FBEOtNGkhdwEVAvOfugXyTq+3IUqKDwgB\n5XwQ7nmY1PRloXzUO1AItZMLzzJpz3ohLOxt2phach5dmRr5/G51aQu6xulL\n/wPpFKBPTlxBs3m5ujvpNdD2fCuYGJV/ROM+hYe/d4TLcMKhV3ylL1o4HaV+\nYY3b\r\n=jQk0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRm+0+DmeZ4gEPCVryP089ACry2wrFKEx6329eou0NjAiBui2C7itLTQRgj0r5A+HYcN5oLvMDPrxe6jr56xYST4A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826154649_1566834691203_0.7875063678706633"},"_hasShrinkwrap":false},"1.0.0-master.20190826160021":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826160021","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"83273a6200c37ed73b699f7a7778ece64cf2655d","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826160021","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-x5dPhcgW8qMdQGTIdfcP3ZWckXqgOTh5VMSjCFw1IHjM4zIKjnGmT8zdcgT8ZXcXwtWogAkSwTevSDJztE/R8g==","shasum":"0dff8b956132531da674a44b9351dc4c4cca77bc","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826160021.tgz","fileCount":343,"unpackedSize":2596212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZAM1CRA9TVsSAnZWagAA5wUQAJST/NOgy5FBcs3ZR5lu\nE443Oq0A5wwE5Er/ySRzKCyIBq7rmCMBELpSIR8MfAo9Fe060s6K6o/IObs2\nloXagC0a6s3RzZWJw0Ixr/flIDkaVlQ+WbF/rytyRzsHwwZHvz93rclW9CdD\n4f1kyrhQcKJdBhWal+CHzfF4yxABEQ5wJycKhh4voEPRraUgiE+sBVoroPtE\nIE1DTnKWkAOxJD2m6aQg2e1ypjrU8TiScyHStSLZuqadTtu2qTcav3Wd09Ba\nSkeCneNUUzAdGOrkw9Eh7h9DnDtPhKnritUYoz/fSCZuDhmaY6+LnUD2ctdv\nzuCgZC1zbfqWWrmQJzXuhS/V5wQLzRiUU8CWpx8uzoTbP8aS3dQDfAMkoS1f\nkdMLOg4s1jo9jPWmmsQHYhwfl/fy2cyzZmgWjdwJpCglULtXd5vWHe23BPGh\nwFrJIoFxTOYzvskv07IPUTCUsaS4Qh9HrOvPTMKE58bk4M4EHSufK+Pk/5vx\ndrwn4qVgrGQQEw2V7UI5GveejA1YIhbNDSQdmBN7aTZOPvGybP/QDr+mRPdP\n3cs3JZawKnVKjM9G+EVoGK8HdppJrOdXZuPww2GKUXITjqnj3s/rYTh8sr6T\nZI6ucZD1mgbq4EZ1SEuJVY1CLVu6N9cLnIH1xke8cDF141uhcmJrpRBzaPaT\nv55h\r\n=VyfC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHzdzyfK2CpkNRSFUEGDVBVpp61a2uFqUflaOA0ALLzgIgI0m1E09tOKhfrMdGRi6HaBbLwNUUhgUYpPCpf9syz+M="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826160021_1566835507611_0.9848829233654659"},"_hasShrinkwrap":false},"1.0.0-master.20190826174847":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826174847","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a20857120d3f383fc422b1cb184e1c473012adcf","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826174847","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-cLt4hSd02j/att2D4ZbIJKwrMXW+c03EIwNK/XnYf5UxekNZoqRGtUMZBkEjRqeAZ1hTg9ui8sDpYFywlb9mbg==","shasum":"d8299d65aa9ec69c72de5735ab2de70aab5bf1cf","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826174847.tgz","fileCount":343,"unpackedSize":2600455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZBx5CRA9TVsSAnZWagAA8OsP/2WQulgYXaNAojhImJGD\n+2kbrICA4jcqp74Q3A59JCoNFWmgU+U8jxNqWMGnW7F8mLm9CYs4ZMY50mdy\n5NNhK96iEeOYDnh3+2KoKxw9c55ALFpD74hjDXCG9QKNE6tmNfjk11C7cNNA\ncG3+sRqtCtVNvfQlzXE/pGy8K3MiMJbCgi/WwUTZIALCyjB2xAjMxJNtyJUD\nxz0+UhT9CLnTnLlj+eU+bRJ0IJ6brH1tRmxCdzet/B+X+IICMzCDbARySa7B\na0/PBP2yEXaNYVgynTE9gqsNZkddLGkqJ8CPFo2gG7QD0wzuMc+jBPP5L4OW\nBaIs6PvCOP/tv6u3KMpeNo0pGiu67CGhDWSeAQp6RWdKAJbcgJjV8Ls0UTlJ\nMZP4zVl/wc7H76YF+4JCaTkbwPoXBKVaPNkdEkUnW/QgFM/3EabUO9qxa1Gt\ndUF2pNG8KmFTvDsibmztSWPFZCNDajhXLIlT0llZtvYMd1Xz4ubQ71ky7neh\nQIP8cXG1q6Z9N8O+kHk66GrSeFP57FbZV6NFq51glxmK29Ep19MyCDKbGYZR\nz/fs58qr+oPKiSBSXc7i1CCSiSloAKp6pwd9eDwHtt9rmfKPWi2XE2Gd3biQ\ngDSb1KyHUbL1e4leL8s9uksq0DAf+yHB8MJ5rnu+WpY3hx+Hj35k6HcP+lpU\nEbxx\r\n=ekYJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+4ZLdmPBh11NceEMh8nXtFCg82XFm4D8UrwEfguWFUwIhANr3KMXO9gwOkP9PmVjgi92wK0amBW4zpEyS3+/XeSUt"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826174847_1566841977163_0.17101903434359245"},"_hasShrinkwrap":false},"1.0.0-master.20190826175144":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826175144","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a20857120d3f383fc422b1cb184e1c473012adcf","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826175144","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-px1ccwMx07pgJklrrO4xQYmVmDKeztrpgJva5EQh8T5irrBc9bDK85FadwEUVau1WTh1e4fhCFucz8lmFXjGPQ==","shasum":"b2cdf5f918554cf940ac5ab31c2883fc7c50f735","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826175144.tgz","fileCount":343,"unpackedSize":2600455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZB1VCRA9TVsSAnZWagAALVQQAJsTOy/k+ist5YMRtv45\nVL9MgInr457Q7IXbNj9AL906BxdR2ocULxL0jp0RYGao1kxY36EIKq1Bi/I/\nTZSE2CemSSUmJD/6pGT7RLMdiza4vJ189FTibkxZ8OOHGrNodabg7s7qF5Br\n3QrnC8yZGME+lnRBxEPdXe0hohcl+z7JCm/kQHqQTxwdglhwyB6JqQY6ZjxC\nbbF8FUUBvhgx7g3DMbVTi4kODmj7LqeFel3foXkhUomnEbYGsctyTZ9SwkAj\nJ53jZQj9IyMqzF7B5M7XownOoLyXz1yVu2LR6KvpngnPLPS/jeqj5AWSNjF8\nXcz/4e7yVD4I2KJJuwnUFUe7/ewqiwF/GaFr2Mxajbo17YAFknkIGorvMhdY\nBq1isOqtqy4i/hhObMSUlvO4Z7r3oU+1r3ND19T6spN/ktJIyW6VvOcBIJ06\nXnIHjKwM2ebse2d7/+wtN1kuDy3oFPKDk8Mc9yNOMbavcDHgV0vTLcYv2bda\nl8oc/loVNtXBSHtUyWCFgjfKzLuPd7o536m1pip7SFA5vKpHMaqLMd9TGg+W\nQA92uGyYencUuimLTGf7rNPY0AOMoniVCNNMP+HkXR4IkiawiRp/Iu8nJfI9\nAB+gNaEWkJzO74PG7Gn9qmVS9O16vOld9FgaLJInq9nAUe5jj4LO1wgczX9F\n0T87\r\n=spCo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyxploMkbDsvVUq4TFYx6wq29/qnzV/dBgTX0l4DGfuQIhAJBntxZ9aTmxxAuj6mviVcEF3EYbYG4O+8LrmJwl6Nm7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826175144_1566842196879_0.733719838171309"},"_hasShrinkwrap":false},"1.0.0-master.20190826181119":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826181119","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ccf38233b2f512ac8b6aea34e5d547fe4c1cd81b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826181119","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-B+p5+prQ0MNHQucLVEvo7wJ4hD78ZrQ9cPPwKRljupvs3WUiv+6Z91y9/z46yVaLxqK3zUg2f+vnoJ84s9wQQQ==","shasum":"7e5cd67a90528c83afabe1dea7e478fed8ad68fe","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826181119.tgz","fileCount":343,"unpackedSize":2600804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZCGTCRA9TVsSAnZWagAAxRUP/2RPtL4Flvb5c33BS4Nj\nwAQdImYKbupzo91JyfmasFDaOK5yeXZbG/tG1DDX7QX7uVcSjjIJGBnCUmK7\n5bra4g8PMpovZH/aNlvxOQxae6BatnxFl2duPri2tQXa6Xzsx8giRP2yZ6Zg\nV+N/P5enCD1wdRwFiPBc+2NavnR0XL5SFmFEzcP0BoY1emTo911uDWAq0CiG\nqUlegEkcwTvuyGBs/1CX4QOnJL3LTY4oz2XJPFkAQS9iq6jYzk38mtCvIYEv\nd9sN0tGjmtxalX5RZO3Eu7zAUcJf1mc3ZRKN9xOFD93cLmLICo4DqHxEdZVz\n9vjB6S0alWjBbs7k88jdwvFkjzb8Gs+rdcF7/nJ4yYaCHWBC/jfSgVp+sAme\nI+u8ZoLfotl0N/Ik95z56zMsbcGeJ0jUXPTWF8p/471k7mdqokNBPHlOoZ7p\nbMMDZtsqbCilq+2Qy0nW9taD2K3M3C8lKv7M3oNLGxsAWIIY4QoCAlXxiTbM\n5tbXYNyv0PPgv32K/e0W1ROd3UyU9A+d/4xlvYD/V262zdOdVhcksTXkwRWo\nm7C+nLpf8NZSPgwNGoA3wzbdqgEjtCM7q94Qz7DO74JWih8CGTxbSeNOsGEW\nzUOKPICya6ojsIQ7lQfN/D2gQ43psB6ui2Ay15PTE1wCOGXRlEGNSHWLq0qA\n2x2E\r\n=kago\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2zjxrvoxVajMpX0eQkha1Usftb9OOEM9B9UOSlJ/DtQIhAJ364sB5IbVt+VdCtgvjh+2x0awKkc/ur/I6CpX8iPys"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826181119_1566843283194_0.07347362291381776"},"_hasShrinkwrap":false},"1.0.0-master.20190826205249":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190826205249","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2fd3628ed76118a615861c368ff7cbe29db0b0df","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190826205249","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-fjgMIzTeamSyD9HNUAWAP7MIg39lnI9ttx5lqx/6JxmMwzyT5eebNlzH6316iA7xOgzq7du03sap36c47HNg4g==","shasum":"4659f8b6bd5e50e87d6a75528ca0ba20bec51c93","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190826205249.tgz","fileCount":343,"unpackedSize":2600567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZEemCRA9TVsSAnZWagAANJgP/iqs+gsaJ8cxR9qwJBM9\nx60EfrnACpIhL14J06vuSbJVdDZVY2IJ9jF5xZeD/WWGFmbHicqu1YAI83A5\nup0GAL2W+6xEOv4PJbu2/wjWe577HKQM0/CnzCxxYxxRfaXm9Rdb78SovEwW\ntS3HFWG6DvlGOg/xb5lFSq0sQPN58sJ/20bdPlHE8WlSzqzXQ7nA2VzKQ/jC\n86BHP/tmwZXzl6xGwSuKuO64DWpNcqVTtX9MD8W/DNl2FaDqXaqe0dgLhy7Q\nt9EMc14SmGwmpgAqDhcCQvP/9OvawLFpW09BsdjsLQuZB0vyYqJUGt0UPkCM\ndl8kkF5c7haA12hP6AkXebRP+g1cRHTTs7q/8z8Sj44pDb/8R1vqcaqZ35lb\nFp57taZ6gXe0NuUSQqeCgdeZksoYfpKmu/NZMmR5T6kc/8McVmxykXG2KMak\nd988qGtjNI4Vq1wTjsb2a0vX5N2qyTAtme9tNvBUCRpMzlZK3V2m719jSHc2\n5O7VcWhpo5OZ8umkfKHa/tC7HlqCv9kXcbM3Hsp24QCR4etDHfxtjBaFiUXJ\nJD3XWYhp9gMeCzjyCXSm6eraojNeaJxQE25ZFEBazMjtFpdLDO8TW3XwUmOo\nLVG4VqsRBoNSC70PSRXoOG9CcPYZwps5wPQ7yjbwLjr0aKJOrhOYMFvth+QY\ns+tR\r\n=WdyQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6YpVNTbPqvruFtO266dX+oI1ebc7zny9pDq79fV72TwIhAIPsfPY+jOXY/1mPAdwsl78fZFWkncWcpQGeYqEB0/za"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190826205249_1566853030052_0.11133749587242359"},"_hasShrinkwrap":false},"1.0.0-trackAnalysis.20190827042830":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-trackAnalysis.20190827042830","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"62287d8bc17e5064efbefe537ce7daf7e21c6cf2","_id":"@atomist/sdm-pack-aspect@1.0.0-trackAnalysis.20190827042830","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+qnHMHII0oYAakR21Nmdm7kmMkFYLZfekR7VcUTqiWS+t+OnBG90zB2/BpLBJ00QF7mVMuNmLdvrjjIfbnmEXg==","shasum":"e23c071a0d8163abcc256de43dad27f425391ee9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-trackAnalysis.20190827042830.tgz","fileCount":361,"unpackedSize":2628564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZLJbCRA9TVsSAnZWagAAu4AP/3iEed9H3ZknWwA1deg0\nvkI18NOZV+MGHSF/kmYjdNLViAK2bYBoXn6mRn5d2fkeiVx1TW2jvJOU+9cX\nB122qSqPmt2D/8NvyZpzjYanYrfhVTm07QMltoMy0NYaYtoF4vDFmRtXgCo8\ngz5lStGos7Aty1RTWdefsjmL3/+PBU74VVvzimm2gkHi9u2sK4FfP3mIiY39\nv4cKnW5ffL0HAdVmcDHneOEyXzlQO+NlQeu6jgQISoejoXPGAExhpwU1TI4I\nfirKt/lkttG5hzLyEaHvRdIRfWqmTvv6b6yJg80ju6PszIxgCLCWujkAonJx\nfYHFcDI2bCI3kNewVrpUz9n55CLCXHdtx1swd27ThS2qZ0IPLPtChCE6vsA2\nss7LwrQNHN4aieBLK9GzsjDX6oELE+s+teVbKFkgJY9FCnD05P2rYTbd5fUF\nDNLCQJvIPV0k3mrb9LnLUCLEjOe8xplU0rbo7EvG3QvwqE1TJZ4+v2RHxUFP\nFQLICuMh98zndcY0HfHpfKknmxrTU6zNlKdvfi1LG13IXODkMEZiYSkAoGvj\nWH2yoLg9g0rLPjRH0gJyzCeWTdlmc1VEtePiqJ0puWwTleZVXfLx23YFH8yK\n5DX7d83Hvmk5a1IE29pSKQE8VUsDyvcX5gG30R5n5db0UW0FfYBI0thiR44w\n4sOa\r\n=8r/d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCi5QUCkTlMyWY2HKEXubjVht1mEc8J9bPLRitq2sxnvgIhAJHIl7OaWvO2GRd3Zl7wWL0A4ae322gS52VuyvRo2VFe"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-trackAnalysis.20190827042830_1566880346425_0.8342694921842144"},"_hasShrinkwrap":false},"1.0.0-master.20190827044125":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827044125","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ef52cd4b34f7240d98dafe86b7b8f89d08d91501","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827044125","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-l+VHzPMI33jKkGjZug6miWLIt5+eQNOrh62f+IHyJDDIGoB9fxcyf+M2tG9CvZ/ZmYdUAJ0h6Nz0vb5V7TL7uw==","shasum":"a6eb35cf8e4ff7e50a2c5ece49a72ea21ebd4ee2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827044125.tgz","fileCount":361,"unpackedSize":2631046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZLU9CRA9TVsSAnZWagAAtdoQAIpnVl6ESoyJQ14++5cj\nqJkDYIRqeMUG5AlWTbamTd8AWAL6dCfrf4PqfLm2IiYwYxepsMNMisGMALQQ\nFJGokA5vg9+v6MdKVSMbrQiclIjshlzu4Ml7CkUt2PjtOfeTrSzFGq4PsnY0\nhiB/iInQNZlymE0IPOl+5fQhDt6Vvi1/n9GsSX8b92qt52wYj56VfvS0q5Lv\nJI5Mgapygjq+KRmxuLi7y9s6jl5IGwRlaaUU7XvAWEtd/yDcZuzyK2x+Wa82\nkA/S0xW8sY9kTb3AX+8xramfdoBWL4wbUi4PURs6PS2vXrrr/YNAHFMCNpcK\nxIc3hmGwLQNanSzaZdYIT9WqZ1ss7dncJBm7U4OaTfOQYsoV4Tk/C8/tRSIY\n1X1naWYYCPGVZg+STgzd945dzuoerhOnep2bkmyHfyyfW2JXLCVs10n5l8Jd\nj2zuSxVsBX86M5S/Z3hstRbaxod2kvIZdAiTxWGBmo3+f8lGZ7K0ssSSr7Yf\nrM5Ql1G9wX+O5Qka84Yadi+iD6o0inSj7T5cGEdwhazna5v6q8ME42rHSPAX\nHxoWRsqTpoxTonXx6LDSpDr60gKcpoKnEN2YNvBaY7A+qzQbqAVA4v/RykPp\nW/aQKI66JjyWJNni4UgaXsYgTgCG8fevXrzDfEFOCwQ0wG2HYC4jvqvKDfvm\nDNGr\r\n=cqtq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGM2BdaH+L0lUdAa3JSNvByU9GilQ3j5lmkAYtZL8QFEAiAiZs806mnWs2WJW7M7dyuV/ztYwLK0qnxFJZumeZivMA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827044125_1566881084810_0.09087024162690138"},"_hasShrinkwrap":false},"1.0.0-master.20190827123312":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827123312","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"43df7c02f4f7d3e001777cf85d80b3e4092b2876","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827123312","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Fd+2v9EpR+CGkHCLYv0PeEs5Gh+rx0jgkQCF16HSSttA/vsvFyuQXwxJkQw3jmziCq4PACYrosss1xm6Dk6PmA==","shasum":"94d448fc9debfe3f52223034c9d32e70cdbb1a6d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827123312.tgz","fileCount":361,"unpackedSize":2630835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZSQkCRA9TVsSAnZWagAAmP0P/RAbMLbF8OJBORcbvEZI\ncgq1riIcz/8QeWMwEfuCHXNP6N80a7XURto5duZphq9K+8LK4bKNSkjtY1/7\nfowYVKbgnuGWU5qa6HhG37vbbjzVsPyRCcAowGLF4GWGz4/88aA2BlSgrc04\n4bdElZ+x2/652c1+qn+72jhPA62CAsL+e6myXx0XZACnc16ohwod4YWcQP8k\narRvsNG8Q/rwdNTOQU+7uCvFS03FOm2B729LXMdvmXtbAYxbova8kAwQ5YAW\nVmqaRe4R+biLe9CAb12qwH15zXSqs7/hhHmFod6PrMiFMouwhPFnzVnPeWme\n1FWrF5Lfpzfqc3EV5utTkHspZmH4GBPHFB8/ddZn6A1DVBiinBRXEpI3MTxI\nQu4yGB9nVWC7LIsoPxKwEpaGjzuV/BUN5OX8a5jXEIB85E/snsKh38BCucpA\nKj3BRTJ3gxOKioyL5k55BMnaYIwgF64nJjkH9cZfdyeJ39zwCDf2lrzPKR9A\n4RCS1z7b6RLRxU9jx9bxu9VjPY0b823psvt0p73dt2w5S2ASj1rAsyhaeKAb\n9wIOsqzfSPT7vZ5D/nuLT30KYd1HE6/tzyxL4fgnnVFnbG03HURSdMqfTg9T\n4mVM5pGk3X9Zapln5GMhIw3cPZU5n8DDvEo9SC9vCjJiUxUVPaN1qZoSwVz8\npf1j\r\n=HjnS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMbK6DOlRROjFePxVYTdNJqp/4E1b6OQ0NT1RHkZwbbAIgFt/wSC3+AU4G5JrVj8QVvS5CvtWYzZWjOWg8Dx+X1nM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827123312_1566909476317_0.49289463026443747"},"_hasShrinkwrap":false},"1.0.0-master.20190827134420":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827134420","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"1e52325ff099f7c08188dd97c628a3118d5c6da7","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827134420","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-6xmM2PLI0FXrBbh35dh+9vcE+lASxjHi9EcUmntWQhDlAP4EGT+eCODNOO2/0rvsyzkBm33qKfSt+BKfdu801Q==","shasum":"6a03bf04eb4add4ce00a3e15e306d85222e8a692","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827134420.tgz","fileCount":361,"unpackedSize":2630769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZTSeCRA9TVsSAnZWagAAGzkP/3xv4QhaXk1JcihCWp7o\nn+JLbsPzcLJ4pYzZ/J/fPUyLJ+ZOy4b3yS8LI5EujUNELOQlBOTbsqRZZxe3\nUGSXs1b6cIlnQcol+m86HowiEwLmFEw2GhNugiwL+WK47VGjdYTU7GWXyluz\ndkwUiHUN0ZmYolZGYRrTpjouIpu2vgkPvLT98StiTSfZS9ojlSPsss5Z+WrU\nUe0Poao7AE0TTcoNxkQLP5tHGyYTXoyTPktinNV1cH5ijXubadtPYRqFEN/I\nPBuG7+nPq3C5G0mFbwR4p95J+O03qpb+sY/d0luVduKKWBuErl3YJPhX4myh\nv4kYI5zKnrbpV2alp/Oc3fFDW5AfNX8uMefBGAm0TFOLriWyf+gKqiUWME+W\nu+fCqD4N6vIhsjVPwUo9WQnHSYY8bnwewecbxFTIq6rBk2G+XT1hGkzEXlZb\nKjvulCUGX6ZMUL4QQfaMOHc5M54Fkq+EbaLrVIjwqrVjgYRClKwJSPwHmD5o\nJLoaZ8gbQPgnPIPLuzph0YSffKUymG87ZnkDSv6RPX/hMoMk/czWuq98xAqb\nXccNFehDcfeLHOi2cykzYypnHRKD1vjhvNIg1Br161gmmRU1E7d9BVgwVW48\nOTc2VOuqvht5AoVAj0N31KCy/48GsAEe8jK8FJcIH+80UUPzPrButgnlVbmL\n2pfI\r\n=FxZT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHf6/MMvlfrX0EosBuznYEGHyUBxwpbj9xEkQwMwIg8qAiASpgtTJp/eETu0xtauot+82Ixi9KPqCAsaTWhIz2RiqQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827134420_1566913694072_0.7116287532795322"},"_hasShrinkwrap":false},"1.0.0-master.20190827181726":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827181726","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190821065818","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190821222758","@atomist/sdm-core":"1.6.2-master.20190822002319","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"04dc4f2ba061ce4c822c3dc9d5b932d2aa83067e","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827181726","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-eu0nF2SRqNlcN37Z/jpHAsOgrrrxcxlFu8m8S2pD5XIwwzgQNQVZjyBGN03b4blp/cfluQ50VihWymqStLRX8A==","shasum":"de011d15d1f3eb9d5ee5010bb71cdc7d436c3f42","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827181726.tgz","fileCount":361,"unpackedSize":2630769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZXTLCRA9TVsSAnZWagAAUBcP+wZWRwxjf4txC9WqM2f8\nIOx8BgQGQH8GUO7feIqcZWHcQCJAv1BaemVIAUTRUDAgqoEzZL5+Db19j31w\nzjcls6IqJdg2UidrWhcpvF/V6VqqkZNnJvtk743/6Pi+9uKJLrpiSh/R1rnq\nlXI043qM5+xEBikl0HeoMv7BGOrNN/D2EypCFAvzZJGHtPq4Dowrif3/fs6b\nVBfSa5kFb2++aFPtjTKLNH/fFp4NeZs6SoaZEmhl1VQuX7k9TUd7IdNTatRM\nYeA0qoKRPG3hk/KXxVFUA07YxZYpClTILNGySmqtd5fCKc8xzQE6AnIG8y98\ncgiMg1fIaPUI1ypcFJc3idquEn4XyHKuN6dDd+2sHPV4YwotRihQgWWgJ114\nncTu97ay1yT0pIckYKMo3aTMfGixwYdJwGTM+CUwGoMMKMly820nID8GtVQ9\ngjIkCMBjR0jcLohULKDvAhuULHKL4KFfKLwapr/iLxuVh6/B5/8/MPShEbdc\nngCYPz7rgBohCe0ggQaCTg0kEaospjhj81m9qsKArjoGLddwwS158bBORJc+\nLGgnFtFKLkNkR6IO/lsePKBxoBH1fBbvmsaHvI0pMYpw9OWcYhiNZ6LHktmY\nqn1n8EPURVpfcTGnWCpMtfr00cQbYza0JRHTKhfN4+i02qgyqmkTV/dB1EDX\nnVue\r\n=FqTI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFD+gcYcK9jGkf+sEMk94DU5S3vInZitq21y5jYqbAa6AiEA1HET2CI8+JgtI3f23fwEvn81YUuBYEPFQy5fcJ0qhbw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827181726_1566930122569_0.850828609736586"},"_hasShrinkwrap":false},"1.0.0-master.20190827183836":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827183836","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190826082455","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d6431dca15cf2e3df1331045515cb1a7616e2f6a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827183836","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ui3/yFXF8didauIcW3r+IbcFRcqH8IaG4cGdrcZp633cxrHSILkIkPSSyD1zYCyK4wk/1nO7Sh7RnQUOz/85Ig==","shasum":"fa77c0ccc88e2996ef82a3574831d1a8c1f749e3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827183836.tgz","fileCount":361,"unpackedSize":2630635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZXmDCRA9TVsSAnZWagAAkBIP/AqjyvBFWam9TTONqFAF\nR/kPUQPzUCbw0yWcWihdYzaR97V9SKDWqcV7aj9UMTjQRTjUL96l2HorDd48\n4x6LYm+9bFO2upfHBzXOVCYXXhHKqhbtFLzxPqvM9IGEYMTxJGHKHytTuEzu\nWSWWWk3uP8opUlCL96Mkx7rH77i+4hnv4j1zRrWYiAZI3AqZTz5G3n332jGS\noF2BBiiBYnwECn8NKBu2ODzJwlQlidVHSc6cRjUylWCYa6yWXV19KXcUuDiP\n4Wy4pDrp801Tf4/W1hYQqO2PIfYChOSJdEvZ+QDls2QtA743S+/MQzx2jlwf\nxCGoRPHqji550OFDuwPeYhJ6ZnDr5kh1gD25FSnKCm1qCL0LHWBOtTHRB3jd\nGQxhapzJbeoJdw/0kz/tRd/ru2bAKLx5KUpACVS99LgjZFc09udMrUpd8Lfw\nWb86YZsUa8Ao7/J63MQ5jhygZkNcRVROfdKjGezibLp8r5611JxYH6yp+Dwu\njnHfjIFglykd5svogHPkALF/6Ek7VjpG0CyUMqrs7vLttgpKEMdyaO+lFJbW\nB2OFY26bK0q+2iz3A+cmbiW+5vFLs0WJ4eUAq+IdMFKtRVluRnHSoya1+vUb\ncPLiBPI0TG1s54iY3vF9Zr1vA+KGNtvXqerMphZZDYxlO9g3SRTaS4ToEAmd\nD7JK\r\n=4WqI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSxxaS2oPDT1d0/KrCdpzZH8cAWdc2kkspbiYy3N/pRQIhAJ7vPxwDX9SLXc2X7EdUpyQMVEwku7w4+WMTXv1upkz9"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827183836_1566931331002_0.8320940753966091"},"_hasShrinkwrap":false},"1.0.0-master.20190827200805":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827200805","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"39bb5d7c70f45b3c944964ea378c11d370e629ae","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827200805","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-7PaDjfxuu6DpvS68/4rY+8LAXKh+U+6UpuBFnA+nN1LKLw7dZUPoDyck2/Ks6ZysUZ7sg0OQyxzHNqZF/B++LA==","shasum":"4cc685c43f49f3d8058c52f52bca6f5827c5f03e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827200805.tgz","fileCount":361,"unpackedSize":2631329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZY6dCRA9TVsSAnZWagAAK60P/0VPK6jKG1CK19LfWWNs\nPflPzAfvAIyLf/SnilTLegbG4FwzPJTVeEOTCnVhqlxsNCJ9zJADXtodvQUa\n9+2Vyq5OaxX1zsmpYiOrcmWwNKBTZwTJi7bSh36Hzh8eVnH2KvYWCVQlvsMu\nn9YycyhAVjCH1N0895Xf2jGq+7t3FFdsnW/xHhyS7fyLEpc/Mrp0cntOrnpw\nixN3T/Yz4ldeqk/cAnAfxHNrQ5YBUp3gHcuyZkPjyBGX8TgX+NQkkwBgKx9w\nIkVW6KQg+LrY+rEKa62u65P7VL9Bv2BPuy3LDkKLyMMpUUzrqQoXU4/4Vw7x\nsVhYxMY9hbD4IKQFuUadl8cd3Zvdy3ufpnrGtpdgFI0uug2+m38x1p7bP8sp\nYS1kvf0gCzZlXpAxcRavEcbzGiR1OWXiM0F3rQe/WOCie89C2XaZWVJrqsz0\no448rcKZTIMZA2mT9GilmaEGMz5jsuYhvg0Z2QKL9do+rnC++54n5WfZc/s3\nfAz6ITnWZ4IdU84OcogmfsiOiGywdqOpqIQihcxkJ9o2+aRUzST3mQzPZqZH\nNhzPAewP8w2DDD+/uHyVI1ga6Q/PErECyaRtKfa95CqOWr4LcHGCNwvhA5QM\nDRZL5j8/WqFBPb9wEStwU1klkDJ6X1/bAwG+Jw0VpLOJedUPjJlbZSbQbb/+\nZvrf\r\n=tdqz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzEAxJjeq8DoYEWwi92o7U8uRnhExdhc3FWdOtaDrXkAIgQ1jrLAAXlINJX9IoGmzM3v+Tn5c6oOdDbUtwUUskEzo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827200805_1566936732466_0.7517047787493019"},"_hasShrinkwrap":false},"1.0.0-master.20190827220109":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827220109","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"91bd8e01a1f16b5345c03f8ebdfb67565db37f75","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827220109","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-rBMJTd0ffpVhGp6yavQH7iWsYBmozF+ZSGpTAtR8R2vb1oAH3Oh1UoxkzZg9eGSm31SrKH4gajmYVSBOxhyM7w==","shasum":"c052db0495989c380e988a15d7fea8918399719e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827220109.tgz","fileCount":361,"unpackedSize":2631953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZakKCRA9TVsSAnZWagAAr2oP/A07EFhBL0Efha1eelbZ\n6tub4UTnN4iTfQoQuE9OewJsZHzzLrMUFAwzWrE9JQY3o+dZzpJcCg+TvRTY\n2ZCjVDP+woauWizHFJo8pQKpTUbILgVtA9GtgkcFUSITbsTUQO6V4UWtPCxO\nWQPgxOmEo0Gc/A1cXpNR/j2pUNeC0t7IS5bu12RDrFm8J3LktacePF/8HAiG\nDsigvovR8/NVwzvFswdyEtYODMQvqNEHs4l4mlBwkKMl41gU/KPikZfxb2t0\nHBVlctSv97DF0tP5DdjhCkRYeNvyppR5HdBbbbGux19UFwQziY5eEFMxcEkF\nHWZARrStuWiB8bVmAaS7sL1BEIPYTXnNM0NP0oJpMsA7z4Ur6utPw8aBlnz0\niSBxMCe4L0WiEudtj16C9hdygKllGdBsTeIddP/L+kaHeyswOp0VYnvz6De5\nu2aB8iNT+ZuTy/VZirDI6TvMB/KeCws6aiCI5ThjMz2+k/APFHLxwSr8TmAI\ns5SVo19XuO+4j5XFGQYdQT8h+qI74+5DftlDjWSmauIYIWxjUakIa/I+qxyp\nLv02s/VB6sVzXUf2eFjVNnqqjZ4EL84rt6tTXEY51fDhX9HtdLadoPHc6WkJ\nTeRGr+qa4O5b0dKy7NZxkeSH+ybFCYm8wMmwrD0+fMuZN34xhUWNDaR0Kfw4\nHgvV\r\n=yvhM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEj8GCljkWcFLnZZvpbZLcz7X+fTT6I6yDhj11ZPcYygAiBlOFRmvZh8R0qThScZugx1h+5POOMpxgJ2jixObTxIiA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827220109_1566943498216_0.962195283519298"},"_hasShrinkwrap":false},"1.0.0-master.20190827222920":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190827222920","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"8457fd82fe8027e143f217dc62ded8ad50a622dc","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190827222920","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-INHitgHw6rXB2xO0jR3VgnmtHjmMFBc9r9bGecRe3JDEpq9BWTrrzwH7wyyzG3J3Ohiw16+qI2c/UaQx9sk7tg==","shasum":"c6ae4333b027bcffa220d9409383eb0b0fc3cc18","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190827222920.tgz","fileCount":361,"unpackedSize":2631329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZa/PCRA9TVsSAnZWagAAqv8P/0Lh19tsfussv6EC5YNe\nf1vkumuw+KaeLJxh4WLGkg4nPIZ7qoQq4iFMjMtG6b2iosNbZOTXJ7gZLCUj\n9yl1xeRPcNzzw2ZN3WASExf+VBylbpZdskPhDQnOTvx5VVvxF99T1JLbtD7L\nxe5W5ex9HJ/Nh3NdsipxOs3XWpx0PV+kIZEEPNuAc7wKJX4wQGa7cv6dnQo2\niSen2QGKj7O74VPgM7uFpD7McJ+Q8P9CQIGAHWEqf1xZkCwdbQuGDNH/Oldu\n38K9Un5e9/W/dzmimlXYaHe179gAzWfZkq7AzfLcjpSARzP6GYbcO15t5Wv3\nuP8Gzk8Oq8aK+xRKUe/hzblJbrPOR0anMzniZe5ZyklCNLsY42KBvguCPXWh\nMU1PPIglPQnYqccaqQZ3SD0DgCtDpZKMB7lgdaK5bvPRjtLDg1g0BG4ee3Kc\nULS879ZLKafr/LtaMHfaG+CRnz4Hxwe0acG0WEJgZyVUpNlqSekJG1Hxq4E4\nR5YrNR0S21b2MT7yM3bbq5Mx6DXFfjQyqbXSqzACRxe/v7JbXYxEeU1jtZRx\nYTwrrAHCIFs9lj8MTbtKXgKbSbbDkpn7yn9IMufJecCrb3I8nWx44Cc8No6s\nDt+cuBxR5DhOHyf5kbK+2OUtWlE7bnki5kwzeRbiTwhyA63oAUN57mjcPktJ\nF2In\r\n=Y+Vd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8EIRhds2A2LQdJiYJfE4pXAYA8iESAxCkSPhdho2nfgIhAI51rdfqtm3Xy8TOuqJMecivNxx8rsGe30izY9PNtxMN"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190827222920_1566945231101_0.19037798996638378"},"_hasShrinkwrap":false},"1.0.0-master.20190828011722":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828011722","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c7038011fb9fb6dfed0d44b4e23027107debaa70","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828011722","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Cg31o1+4nW1G85sJV/nVMM0+1PDPBqS5zeJEfTkfRKqLYaIkV/FlgFP3IzxMVp3Gh4Khi/0k+qOR1CpOa6KcCQ==","shasum":"7cb7d0bc146115ae3b5e466940f278fad719e75a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828011722.tgz","fileCount":361,"unpackedSize":2632041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZdd0CRA9TVsSAnZWagAAbb4P+wWV9gk62IQA7pB+0yKk\nhnBts+SRbpq0XH2bK4phYSGBURdsjb6S/cgAPV3QQ+fBueRB/ZYD0DsaCmxV\nTCWf9yYjHOF4uVfqIugrlNHinxnohAiHpnyCWaPHXHhh/FYGwNhaFNuvOg9k\nhuE8B+5nu5pxQud0MDXKM8I4WIQxcSRAtL9puiiZ2AAxEiBKy9SdaoYnxSVM\nv/KviQjALypApIp/h0KbCjvyMmcadl2whptyvqkw2BwltI1uRs6kO2p3t6zZ\nd7ekIt40i26ewSrBG983E2jO2WNbCnKevbhhDzYPuosEUeBUGWfc+ISoJvFB\n8VtJeHbRHCDNUN3rOp9zBh5KN8IQWyWZHdqXHUUqjPrB5IsfGKf81xViPtbP\nRPdle0IbTjpfP1gQcTNnREECRuKrzqRY5j/GL94POX4ivZ4jckCicR7r8pEX\nD0Y9Pf0xZkjhSXZyp6z2qCmJV25WidmsTXtQjxMbv33AIdBrqLzcCrGucipd\njE4drYobxu0L3mWs3N2HVrrpuom5CVoE5dMC4JM683koDpbAxEn1lPU3wqKh\nyzsdDBvrNM0vRsjxf6un71SVbJbeT+d2FEh4Yy5yrIZE4l2iKcSL9uSCIygw\n4db7p23mqdv4ta+XpyAaEZSHozxMH3oSea2XcbRzmU2JcxYJEhikq8OP7A9d\nvkwQ\r\n=aYqI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBlx0OXGEY7P0jQw+6Uk/0rClLHZx8nfKS2L74WlhPeQAiEAlyw0HC3qLKJFyUZ/xcdt1rNEIGjb33fewyQs8eadPfU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828011722_1566955379500_0.47473854449730046"},"_hasShrinkwrap":false},"1.0.0-nortissej.pageLoadError.20190828012824":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.pageLoadError.20190828012824","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0c095652f45ef21632d59f7c5f4dbaf3cabf9882","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.pageLoadError.20190828012824","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-6MSJUiLPRcgrgrp5aWOAXT4K5fSnUqfViuLz7D1QM7YzDAw8Qa/zfEF9ewmk2FVkWjJY9MpATzEI92QToQfSxQ==","shasum":"2fed09d8a2e4901b4133c546fe5ff462633fbed7","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.pageLoadError.20190828012824.tgz","fileCount":365,"unpackedSize":2634753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZdnnCRA9TVsSAnZWagAAeycP/iiG4T/8B2/HS3XF20Ai\nOFBnIbL2vXuHMeh52kRmQzKW2jU/JSXnx29wvNBXKwiV/G1jbqIO/GTfl6H9\nd85hvWQg2DF0oHVGgKZYasWhP954cpxsWDVl6wauWCPvszXdey5R5ZkBU98X\nAJeyOobC4LTPT9BjEH/ktNtsiQvj/EYDMevGVO3Ai1Jkaw0GnfthRMrNU4sZ\nFDRLda93zs/RKHn8RoTcU9MKtHR6gp6PaRNHfcRS+Br7U40jViv6qpVBjlQ7\nKYyO9fGu5EmnZOw9nJye87byTIb1+OvhOGHRof9lypNnS+8dixYhdtO5fKqL\nrMhApqofPZmZbhP5FGpL1eYDXdDp4BAsbJn0PzD+NTvdqrLCus9OW95acBic\ndOu5nC6iXRd5ifWzjfSl7KmYpDIq0MGkt/Ns/P2pJTCR7jzMwsEIEJuWInrA\nOMWqf+BnJ9F7bKyGW2rIeLv+UwoBDg+lMfTPXdhk/Yk5O9Y20LOihCGtcWfA\nqmX60Ab3yBXBq7dlRQBDghmZPLInKQU/+rlgRYtTWq4MhmOlZO338Fjr/92c\nOM+ltRPol3BMBN6jl9Qd6jDPWAkdafCr/6ojrdKHjkzrzOWEJ/82vCmtSJTE\nVxGzeGuS/lphFYSkhOHm7/6z6anFhe0+asUAImW8zPVRZMgYTQNFBgxoXlte\n1XoT\r\n=Zsxw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7rChDRocClwSeqQk3UWVsZiaNbWyAEtijSPZcl6h2uAIgTVEl9IiPWPGy1LMlTsIpxS3sr439Jx7BO9rq6cFGtMY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.pageLoadError.20190828012824_1566956007380_0.7863477911954337"},"_hasShrinkwrap":false},"1.0.0-master.20190828014024":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828014024","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"1f08674323df4f3d7cb5b37f2bcb8cbc9d9f4eeb","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828014024","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ZWVAHrwvTulx7nZCcgc56PNOCXI5wmgpswBsPtrOWYorLEk7s5lgl8G3GmmSyrVYm/8R6dE2rLlz62ZB6KFQyA==","shasum":"48e7e8fc9f94b8bcf26d8208e27a6a34d3d5bbfd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828014024.tgz","fileCount":361,"unpackedSize":2634172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZdzlCRA9TVsSAnZWagAAcBMQAIVmfFVkd+kzUDOiEvmM\n0yT/EiLCh02Hu1YZNLSLZEbF0/KHwA9ghXTKijz7+zQeWTbihxoSIWHPJ9SZ\nZ7NANFjEanDVBlQkzCNEJonERZ/gE64HZV5c400EHsQb4J/hIJV3UeeqoDG3\nTWx5y0Fllk8yz1XnUdDGfd/KHARFEwOSU84v0AbybY/KlMT3rEDgmPmqPrxF\ndWKSouiX3NgXECcVkRBzb6lqdzdiL9sbJoJWb6GmGCtU0fxHKsQRceedDLC8\n/7VvsHcaVf9o8fTQYq3+uDyV59X9XUs8xAHrIGCxJS0PNp9FeR4u510jpcSH\nDHcFZ5mmoL0MI+KOWoyvCjZiKod4JzrZt3W1l9h0yED4Z5xauMBVZZkXrTdB\nPMJLUsHOWbyW8v+IX1HXhMFf78asLBwM7/yu3+s8J34luJU1FfY55TrJCeAT\nPpoFRI4KOh/OXTeX6Wo2c4qr8nqPPVme13mEvuF7Y0uCdcRuov/ew7O9uq3T\nTmwYmzK/S2KNYiC29uUMp5W6d5D9Dscr2rCrXu3H2/7PhQIUBj+s6WX0wdu7\nzM22dpFb+MeL4TXjtU4C2z5b9S0Wn8CRgSGL8FcSoDvSuOHJzIsX0A4ePaNK\nH88tqlCtRlhyTyoNhL1gRHJ4IpGcSVj2IA0/WKtLDAQczpcoKZHAMlK/cZa3\nKew8\r\n=Y8xN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCebMsa1rkhYXj7FBY5v1aashAMeoB5bbL1qlSAjQ4S3QIhAKvX+h5F6FQcr6+BKR+09oV9km0z/XWhJE0vRuJ5YjPl"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828014024_1566956772740_0.7815602396174388"},"_hasShrinkwrap":false},"1.0.0-nortissej.pageLoadError.20190828020117":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.pageLoadError.20190828020117","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a9ecb51e270f3157be492bd262d73580d9ec30d8","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.pageLoadError.20190828020117","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-sP2q6GJZKl2NB/MVnzoDq6bWYZdy3NRtltAE6A0/2FceJsi5S2nX6j2+0GyaA9XJ/v8/zoF5RF+YbGlndtrfPQ==","shasum":"e42069a7158b294a232918ed5d3fba332aa82870","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.pageLoadError.20190828020117.tgz","fileCount":365,"unpackedSize":2634526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZeHDCRA9TVsSAnZWagAARQMP/3U885ToNonWQZk+33Xr\nXJAo2ObOtzNOMHseASLmqVCoZYjYZgUvMCVFRtFhyMRFSnmn7Sdqddy3bYpy\nhmSAUROUiQwhvavunPxVWfdJdrcCMv+8DODa5jg4tdySBFZKjC3r0fXSmHx9\nvjlRypA+ZkQYs2LtXasuFY4SR1UtvYL+zwjeaMvj6NYYlg9tEr8me74ZN9E0\nWjO88ty+FDpTuyMF0tIfmwb/SUiawiRw1GoEPsHz3afElO2tHe1UXG+MzmsY\nC14U3zjmDqjjzwu/9UQJ8mJQENiekzIWoimiRM9g9d2wxO71JoSwiR2LHLHD\niMcUPOvHEKWUsIdEe/tOivs6Rb0XQAsvwOgW0+E2Mtxyygje185dmP87Z10B\nVOarGe2xxxfgIARHIZKYpIIWXDK1EGcrcQtxfum16Fcg4qcxXV5COK4bbdZM\nX+bfk5VmO6jDgFRhEpgeAViseXBwoRESWBMVOi4IGeRRVTMVLgayKGPsIm0l\nHrO9iZUQK0tEdrxaM+z3lVN3UbdRts2/4CDa+ql6pxb5zulvjb/sOGszAIva\nZl4+2+SfcYZ/0pecVSbhBc1x9hIIYevHrcbPBLOOYydZSdh3wKl4Qpum07mO\n03Us6UKGdfcWNOuJgfvTSZljSQupj+a5oop8aDLaB1/bqIE/I91UYMOi3Af6\na6q6\r\n=yqVm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTtTG1nlazqIDP6d1ULXAqoif7dtoSET6WA62y7Mk4JAiBhZ8UnyZqxcQ+0YCZrU7n6t/mTtAoVDWxWFnKlsbhp1g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.pageLoadError.20190828020117_1566958019343_0.7103778237389053"},"_hasShrinkwrap":false},"1.0.0-master.20190828163003":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828163003","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"cf8ed403b5a85826061dd292469b838b2e29825b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828163003","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-maKCtT+UP2sKfsX2jNBGSyKq8VBXM5CI4I0mWx5cXPPM49QtPiC0oY4fjzF6Q7Lo/wVRgAaZDMrJ8uUpzlDiAg==","shasum":"7a602e22b3c1bfa56b9270f593132ea01ce69c95","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828163003.tgz","fileCount":361,"unpackedSize":2639554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZq1uCRA9TVsSAnZWagAA1y0P/R+OjRSX6Xxz+E868zrr\n7zRA202HIQAqWxdrhUwBfl34zGEobK6Yig3SHJalYv95Z0rCsng65gHzKZTN\nvAX4xJJTDBFyz4kUfzQAldjkF21LRxLRHsTc0hQlVkrtZerJDh5xpJdtmNaM\n5I7Nu0563jY69gncYoDfJrSB//eq8Dd/N24g9InG31+BPUEqnxlj/ZYHYkF1\n4/nGxMkzVikcgVuxtRZn+MIFEArI3uVGzZ+b2Fk0H4PH02O4qc8qcZy9mdVa\nrVbp/iGgHDREx8l5on6DVJoSUvGXLgXHeA2p2Y+kFVG5sq7Scd1xHW3li+EV\neBFv2SIy6Qz+1eGHJcDOLQHkr3NqAegAI28Kd/1WMKL5+/MmzzRs7uLbWQF8\n2lJyzQJSYiFIi6oZj3Tui3tUOLs020eEXSBy+F3Hr/ac9rfSBvTDBqjDvsf6\nPZhF3kLvkJHoBU38mnAQnVIyVzjsuVMmdSiTveP7teDJjEeydF9Rc3HWQWkd\nCNZpJ77eM0b1ZYSaDkmohVTCyjIonQkGtNBv6qexOy0wHnCAP1rwtE9DSedk\n0PjY71AFAEk8NfIty0gO1DK/13i2jcelR1V+kNvvezdPE/3z6qCIhgtAOnym\nH8zwIv+ypaDhbnrzqvFCCk5HYYejCrUGZjq+i6jn2RLY0FhFuBiFB2Sl7mal\nNrDg\r\n=LWUV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtj+h7C+r0JieC8/gkC0NAY1pcFbNR7/UNgQhmCqcjrQIgcuzqBaBfv7WV0n50lv1yDuFt0NkAg8uDVe/GQkpWoI8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828163003_1567010157477_0.33792721026487027"},"_hasShrinkwrap":false},"1.0.0-master.20190828164842":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828164842","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190827193312","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c237d7ff3dbd16067b3280394eaed8a4c9e625b0","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828164842","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HLm55GjMFODb0uJsYyT38PI1ZfK8gs2yO3/36ahcOUq2pJ3PGV4Hb/eLQYO7fr9BpybZGUHhlT8r+fs7zc4BkQ==","shasum":"243ede649fa1f03b9c7e8d7de67ffc4a161b020b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828164842.tgz","fileCount":365,"unpackedSize":2640444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZrG/CRA9TVsSAnZWagAAjQ0P/jEX7lT5KHcWOnJvTkxt\n+PG/o4T2uGvmf7JC9YoiqV71wn8zp7ewVV7q1UQ0l7xnsz1kf5Y/XNWqovc6\n/kJPunzRdVLpU1TddphBhMv9QSuUWPxY/2Hx1EAyMSzhzQ67uBP1jf4R9/yi\ndccQW5CCW9oA4HEyS3Gh7CZ5DIxCAhs0yZVVu3Sz7TY/TNNSstxujKd/wHJ3\nF1Z/eRfNM2D0jUnTnFKRssoC29ui/mREZhGBmkD90YoWP1YY7UHm0EZyBLxG\nK2OEdPUnAuVLKmt6v9IEy9dxOl2edczcROmCmnWPZ466FrmGgF6AWLKsDfM4\nviKzglzExVEZO+3dZGeR5mQzyaDo+lpCpCdMUd29RoZMCY/AvtqxFbU+zkWe\n+qpNy/isrFZFc74HLi5rJIJxZ/FUc+ojmRKbUlDUfNxdrVxI6JIhBj8vtXSC\n/seaOv6gCtbSCCUUcXlalQEHDokfx6zh94W8G9i8nmRduAke6+QgDGCY0v42\n5yuetGQQhjzU3KrWjFkKXSHQBu/jLbfxax9NWBqS4wH4C1nuWj0DqqFjnUHA\nka+XXc/YolCbPcNDhEbo03pmV2z7X+PEidrcj/OxRKw9H63Y11UGwpTceqM+\ndm6rOthKXHJ7k/0cswmBNvyanOx5+Zwj1WWmORPaa+YpViK2XdpWn5xf+JgB\ntrU1\r\n=djGK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaj2eDVJn18TY52Si8Trqf0WjS3JdqJtstkAFIQYBxPgIhAPTTfyzQsnouhO2cY75IcCfMG0pHGDTrAN5kzB6sG4X3"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828164842_1567011261914_0.3396215661010422"},"_hasShrinkwrap":false},"1.0.0-master.20190828175951":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828175951","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7e2cc830f70232ed0c2cba5ea222ab664b325a81","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828175951","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-OS2ZVsu31tTPQXmrT/RyRN4oB8GPxqmK/ORLD+z5Ytnj7tJd/QmVaTh2gyNlYgrdgWxcDqXBtZ2efvdvdczoaA==","shasum":"c3bc3f3b97d5b927c81c2f3412e02f2eeeecc7a2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828175951.tgz","fileCount":369,"unpackedSize":2648854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZsJCCRA9TVsSAnZWagAAs8cP/2E/feXmixhnSsf4Fnhm\nhI1owH2+929/Xubg53DK6SgLmkTi8YZnSap5bJa2a9/luSkvLs/KBbBxkuhb\nrd3KImveK6ojZnxDdiLxDl4sEAHs+FaciMq3PXNYtD8f4qYP63wRnNiLnpWB\nx98WjXDXqADiE7L49b6afPoMLnESWyH8N/f10SDJPNct3hNOt4G/JPzF16Zv\n9zMxn+/10cH+2b8vLHhiHGFa5cWeXLsxZ21YuDNn9ojAw8j0xcJe2f2YW/tt\nKZAtwZFoJ3r2w3ZB/vpT4HfSB6LzYR3vODvODRSaJsKfqjaMq4wGhc1/nW4+\nsVp7D3+9XBkqOuK370mh5H+9szgcOQ6viBnuMJY6NIG7kJPjCQ2sX2T0Y/Wn\nyzfXJjAkvUhgaGaDFNn8Et4K9GMKA1BIXKFCxg50naa8df9l4AE/UKoulpj1\n4JIO8ixbwo5xu4K2OWQ82lylQjPeusC8QURXAmz8fJ0SDbmvYwLT8eU+f9gN\nWnIwJPaye4fd8b8pQs+by/cx+GBO7sjAQ0zIiNY2AEApfLQzLsF3ljyuk5lT\nHVmDwA1DByP1ga3wzuCs4mF52LZyLvbUKRu7sPlul7zfcFMZ7ogCAtEKqGV/\nvBzt60VxXJ+wxMeQV5OyeDk/ezQ4zrZRtj7i6gV5CO2lzcdJ07WEEyJWLvDv\nrl/t\r\n=YIFo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4jyMqjH7wRADADhAQ7ooQWwUTdxHmfcz7qR8XxAf8+QIgexSt0i2P4fCEezU/XBXW+sbM2GtR+qRIPJ+/g1RJpvM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828175951_1567015489979_0.8242503961198777"},"_hasShrinkwrap":false},"1.0.0-master.20190828194556":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828194556","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6c2e05818e0a197804165d3a0220430f61d4ff57","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828194556","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-lPm+rP8Y3sh4bRDQKjQ7qoEzMOqT26kCuZ/9QNtt7r/APhaIm66YGEtmauQGM7UoY4MoM4+4N8T/XZlNXwATPQ==","shasum":"3d0a94367ae5ea2b736b5874dc3fc03b3f1b1d7b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828194556.tgz","fileCount":369,"unpackedSize":2649264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZtroCRA9TVsSAnZWagAAEaIQAJXjx1IvBt66N8+iD+sE\niRV+2TJ7LgYHEo/XswLVByw2VYJJqAUe3yA848+IxrFsWXu3hKM1/cYmYEZr\nC2HSWgIfZTAbgCwbgYD8DGko7WOxvvGE8OWcKed1K/AJCYELBRssmukCmAPU\nykUzKqt6K/GQ3QcPSY/ggi/NND/4Xd3wfqxfmQxlyP6n1r3x93s2WglObq4f\n3lsovGtWXhUHv/5wmv94SDpUhk9M7vGLhWFzNSZla+0BAONgZp3C80ZnAPIK\nvgWv3Sf2kZC+niHgM/GKwDe0W5x/aAmmwfShCubhf4wonqGZp3aT9/ayRuAy\nu4Zx3cNQGk7y6DFFdjrntWvK7C7IH4N0muHt0H0wI3AuvHaHo0wTKgV8ZR3D\nr2azoAxjATaE7csak24ooPXDyehyOwpDBV4jSe6AidGdMp8kQx1deItMJ6lW\nRU5oHK4uEmx6d8RALiEKPNnMbAGtSeKPy38PVfOHY6swx9aiXyCsLr44F74l\nEz42w7JTHZCQLSwFXhBE7UEyh16ExzwvTYWMs9akoM+j/DbhPMtlid+Tm7Xu\nKhxmsBh0CsDCsdL58e0yDE4699F3ECMkw0EWzyQz8ZzGGGvazKLLFyzdWP1a\nQbz611KcuUmM/kFe6Hmv8Ms4xBCIwzf6gamSK/vxX8fWhK4ITYGeQh5gyYS8\nHaJI\r\n=eXNW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfSmzfUUf32zEtkiSrGTMLgx3y50Gc7WlOzTfc4zT7HAiBFNt5iilFgn2+OcUYqeUm5lLQSKRk9e9u7RlEjmHJ5fA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828194556_1567021799204_0.14515929181142062"},"_hasShrinkwrap":false},"1.0.0-master.20190828204032":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828204032","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"38d6a484c7261775eb85bb468730a7e165880b2d","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828204032","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Qvk8VvLMuOgzpWS4eri+xja+GUqdVGuJ2bjcm6vRastuVvVHgWMeFLMKgzLjuY6POrL6oCWLViEZDazE5xUbHQ==","shasum":"16e4917e65273ee24cff2b5f65ecfddd2be11543","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828204032.tgz","fileCount":369,"unpackedSize":2649345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZufsCRA9TVsSAnZWagAALOAP/1AOa2cyDlwa9ytZ1IWK\nBcvIaROVkgJ4Gq2z/qaWlPh6B5ioKL8O18kA67hy2rRd82rBw+hXkGIqj5dU\noTwgNS904VRxhxkyuXDVwZcKIAfOfVTo8G6cGCSge41JqvGwMXVMeUkLpM1C\n+Bp5Pzja5OIIKKTyO2hiWuivzpBYK/4G63G/Nqay4nJikdObIzHio0W/idWI\nq84NC46dWp1+MocT7m05V72BEuH5+0w/H9ZW4ulp2IcpmSGBpWYo6OmtDmYB\nKw/HKOvm771blfgnFzz8xctKvPJE3viELD5/VDUyi5DfXZUSpxi+1jNx75Pk\nm7h0GbXdVoEX85ss7mKZ7lCfFGWT2c/H9ba0KM6kThnCE5YQzqK+z87xtzXe\n7wOPBY8kS3w9Q+2on9mrNtbfNei3Xr6piOTDmBPCi3u3kPQvf/OK1V9qwQna\nJC+bJtzt8D0bWTJJcpDH97xhFK3ddOJgusKNyqqXolTDoZie7Uke7p099OdF\n9J6GxcXau/XnZSoXtv23Kt0C0vp6zsRfzqP23YrysxyLw9tlojcObT4lxkQY\nrPAZEQ7HgNPiDlO/DxizGHBY1H8mx4M1N9rlGf+IE/pPKL3u6jSuuuhydhDX\nbS/58zR8hboMq25frXGj78O1uBmG5a9I6CHqSWk2uzOYB9piuQegXsMwbqfW\nVWmM\r\n=FPub\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1U7QoNO3KNe/+k8fP4a/f2helmRvTb333IY1OFSsh0AIgNqZiqIJqpTy2O2MWumUsbrdhUZTFuaFYHidKvEicq98="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828204032_1567025131524_0.20446690515511823"},"_hasShrinkwrap":false},"1.0.0-master.20190828214118":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828214118","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c6db96b407c168be4e27ee2705c260679c493965","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828214118","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+CYP9IhEsqexL01Se2C5br+gIYt0g3sYwH2NiYM7qpMZ6fKA5Xjg5IAvF3JB0lAV/gJqjQduK29WXNoqdijq8A==","shasum":"0059974a01561325651b8c0e3a73dc0abc816bf8","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828214118.tgz","fileCount":365,"unpackedSize":2642227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZvbiCRA9TVsSAnZWagAAdBYP/irKjgrVLuFnG+E9il04\nSieauhcEJjAN5Bm84RdZ04VsdIx8yMZHuyq/iJqa5Prkkl2tYBl8x1rCcCJb\nDwf5rCvwOE5oYwaE2z0Hs/dOF8cB1pME+WNw9Ur/jvc5JphGGAQY7IW06zCR\nLBBGpxIO8e80A+cNQ5KZysSk1fD8mu6k8iWTHGMWvdnQuRTzcjOeC0WXKWfV\nqqhM7OXan1zwHmqkdF74aDpshl5+lYKqagcJFWeXBEvc/FSEgkIiisv5XG5Q\nz5pvF/UPtNQqOPkiVoNt2xwchh0oWRMxRO1d3hw9PHR4qaKZQCg8qHFpigkK\nCBFeSPhfufqh89BsuXR3bfTL4T7yYF532jBA9Ts5oJXnJXmnNM/HWqQjpnoK\n3aSYRO4hwRW872or2zoO5AXIJuEYrr2ZNRj02AoMLwgfTbgRli1cHzcxORTD\nttMflBVYf4/R77aiO3r3+fxhiX2iY1f4GwTb1u1DAIq18tnO0Jn3QO6ce6vZ\nSWCHLICavQuK7Foa7tqGvCsoxRI5dmS/iryDETtVRLrkzq0c4Vrtmjis3H3p\ndNrJsU4vk9TFescPIL/EQCW2Ge1LnN3fTJuWpH+Q11ZzpVwirq3T7Ot3LkqI\nPzndrLkkI94+ZIJdWqw3NoVccCgS5PP4KFHhYRGoTwA/7UQMJm12najDoSHi\nIIVb\r\n=xdd7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1ErZ9EdnMB0YS4Pq4SUbk4SnrrgKfiIS4JMDbD2GIPAiBQXncuMBHhWdqTRlZbCNgKX4t3nn2jP2NmNqXw8BgNPA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828214118_1567028961567_0.1304961468794048"},"_hasShrinkwrap":false},"1.0.0-master.20190828220622":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828220622","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f30541deff3871083d30c8c8d90dad4d05592585","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828220622","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-vttV6X0HHy7hfgw8N2+Pu7Bkm8rfC41TtwZLaMabt0Q8q7gHFdWbvPvbpkO5Rn37KThyKGain/zx1umKxT4ClA==","shasum":"9ba8bb4e8bd662ad6fee1cc0fa3825b72af3b34a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828220622.tgz","fileCount":365,"unpackedSize":2643936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZvwqCRA9TVsSAnZWagAAXj0P/2Ag0SIaI2qPyfh2GQKq\nBEiWJ1fjgFgN4GxnZZVsHrVmvW7JRzXsbwVsV4je/kAC+peyEMmKRj6xgPDh\nqBGqlyR/sd7xVtPMz90t8Tl96DWg14xEmjarxBOruPMSI2IR4XRtD0DvG4Bi\nEvcyBw7/KaHFZISy37DTYFx+Bb4DhB2aRv7lSsS+D1LX8Jw9DXXplr/vm444\n6VuF38JTCPVwCz/HTYga66+45G30S06j9kyPSxLolAvrdTiXBgkWyJNK+PSu\nyQtmpiJbEKt3oiMTIJ/yryFPQggOKejl1A+jqluTRnrf5ln0Yyg/CuTKUmQh\n7NfllrHOm2pOBgeKFCZSSl6VhmfK2iFK9QeUbrK5gbZgaR0j85NscTTnJQXn\nX4B8kt1f5tHVd0RzLo6vD1LuBzPkjmDIvoK2Z26ee1j4yd2KKdK+Zoyq8vQt\nixQZP8x45+EI0pRns5evB8rjfyItJdxnl2ZMHVbkgcwlnR3p8OSCEaxcqqt2\nWbbEzGzQYTDgFPyTtTYIAM4bBKdAw0TKHn6GUdosR7bXrmghkQZYFRzE042S\ntDNy+SDTntC54/sxdGbABJkN/d6jutRHbFJeuqprrsr52uji9IINUpl0Odiv\nTD+AWG7jeYSNjOgulaI409q8q8iFYkFjmy8OYq+GvqguH2o6vfePlYFgu5cq\naBzs\r\n=GfeV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2Y0EmGgcqXMBiP5N+9HADv3NXfeDRGtEygIsYW19WtAIgRm4DYyuiPrxPHxYsLuQu8CfBKxhXuZye2P28IwFEv60="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828220622_1567030313831_0.6039941716789503"},"_hasShrinkwrap":false},"1.0.0-master.20190828223407":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190828223407","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e0e6cb53cb2c245689334ebf54e3d0b7f29ac855","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190828223407","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-L/7Tg8i7XR4MU7QGKn6JEKwOKnph7QXc4whi1YmIrBtVD7I11sBFKuE6hSmzHwMKHsIqGHNz6RY/qvVyU1Y8jg==","shasum":"1b2f3b819b1fde65ffd7f7a52fd6a87fc09c6498","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190828223407.tgz","fileCount":365,"unpackedSize":2643982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZwK0CRA9TVsSAnZWagAAsIYP/R3UGzr1d6KRgueQqlLq\n5tfqcPx/HTNzSw6LOnkt6G3egPdy3YKS2BbvVCw2hPch7Eeg2qt5b2OErkEs\nFn7E+yXX24CNnZQ23MrZ31LlAYVQtTABWTrlqDATixbIh4Qi/dOZYygKfk9b\nnSIlq/pZOpIkwOXryFfZZfBN0qCTfT4ms2plVcZSfxWQPz3ENm1GlAn2Js0z\n17+hhurm0nYHcSTdC3pmKXsLp29bLaF7zs/Kon4QdLtdu63i9kZDM0LqZtFr\nqOxmtoDdWmzQc3Y9k7AuebrwJMs6rv2KoRU/nvV81rQQTL2CboquzH3SnrSM\nJK7k8nvBqhViIiLC22l69HobrtX97wES0mt7XnSQVC6M+uggMmt0xHSkiTx+\nqKeMgLImdebQcIrQNm1XD0Ngfhopb19mkukvKnQbcLqXMqq4XimjdqQyQMtz\nFoepccUVvYmUYZZ3POzu4DCk5rl2qWzFmtIdp25bYJD+g8L+Fuok1mu2Z7pg\ns3XUGRTOw+7D7XI4E2y8/jWcoJUmnMd4dTJ6ULMiJS0YadQsHtQpIcySmUib\nEDFKAiUUnglRsrztMxklnifK/LL1XoEpec+u+6DUTpBvH39AuZw5D8oWrmg4\nkRrK50aaVaznNJDkxZIR+eGD3eYg/j+sTfhUyAHngAEhLkYH5fN2IojXTKd8\nOsot\r\n=PuOA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuaVxKoIb8w6pkt2h0/gj9i2SPfDIK/W51eDgj1dftugIgKc0UH1uRzbjRc9tsohF56AVeUUkli3LABFGh6x+ZuCM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190828223407_1567031987761_0.680389735541119"},"_hasShrinkwrap":false},"1.0.0-master.20190829001823":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190829001823","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"3360458d4ad6b2517a2f027ea25879bb715c60eb","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190829001823","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-y9cLUb1ThH7gjgcx+uc99sXr9pvRtyH0D3KfNxEjr0qYeK5oODfsM3iA2VDz5RVDN6MxKqcEeB78+blRSN+Abw==","shasum":"75a26a85a66f0cadafbd60d22b435ebcdc0df9db","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190829001823.tgz","fileCount":361,"unpackedSize":2642183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZxsDCRA9TVsSAnZWagAAdK0QAIZjdAplEt9feClcM3Qz\nUxV9cdFFOSEscJtYF7TJy+rTg2avLsQJIPP2Wz7AtWGcfL0eW+eg0kHN38eN\nW5wYT3VGdM/+fbaCSh/kSzgY5P5yQcGzn9FMwqxO+1aYECJxlm7u84UFXneI\nPgq1nkYBok1/WVXXa9mloXUDj9czfpdJThXKBL1TuhlOapStq1w+KVEL9eRF\n2KurxNW5vT1mG0tmn+C0h+FH+Wca2sEXAk9ufvBqtCgwrkPHSxxkqtVJr9gw\n/djjsQAaZhOTimDBCoOWDsQrtE37CqvfxvX71my5YLpdhMqD6RW5ithWdJqi\nl3XjR+VgYHWctxDJZpI2ZarRODcLQPRMrbWnuLbRKo2X33qFeldq6GwMsncA\n+ms/Dk25PDY7jwY52c9TmqMoUswccUT5qmF/OUcch3pUgVk5HYbtUeEoTL4c\nlTuXx6Og1wJWM3AlGu9kOu/uemBc2kNOuUdP9zCKqzNy253tardvEzyGlJ8g\ncuvsSSguQXm5gQaeoUVt9ojXDTtrVRMkLZkp2MYooHV0l9WMpiP8+HeJFZAT\nEEijlZThGOWuauS7/bScBqeR2E8VP+aB1IxA2RvjOVsf/xdWPJOxwlEjzcQL\n4wlNM0658WluW7cf5cp2Crhk8DD4mthB1NkM+xCKfWbY9nKqVaHk0XGWXZW5\nn0hD\r\n=FaF/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFWPTZEHrXCt88+iFflHLESgmQbdIZbCAVgaHNmU+f2iAiEAvy1ZbSXQa5FJBahWHnBbsgYKMXaVw5hsMLPoZP+rbKA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190829001823_1567038210584_0.9796381015866347"},"_hasShrinkwrap":false},"1.0.0-master.20190829002434":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190829002434","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"^5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e3d38549a46fe4f914a9a3288172ae74b54995d4","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190829002434","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-mEQ3/EmgsDD4ImDhTwdio0YplZBY6wLpugrbW4FR31tPFhZqe0F/qJUBSwW04WCJymxKWDLnDjsCC5Le26fTSg==","shasum":"39f507acffcccd5997a4a80860fc4b8409500998","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190829002434.tgz","fileCount":361,"unpackedSize":2642183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZxxbCRA9TVsSAnZWagAARaMQAJ9NfNSO02RZNgYS8n1Z\nXG5kTj0UR2Cv51zKtYkGh8AsLuMTPMtMo2UKIFleaNSLSqkstd4BDwyRu+Xs\ndpZoec8OH4m23cLcXEDaksn2x8gg+0f/bDeGM+B5NbXK3wfkbk8xOFd49Ybj\nPVxExA0UV5K25QUr8R7fjnlKXEt/GHSr3Vd2CvR+nCcd1JKPN3z5DB/7Igzn\nIRSoRJfqt4mGuFqLQiw2cHtzbMfLmSIrYvUqgl8ckslPvpPMHBwUjQR0MiF1\n6gvHlbVmp8k3Y88Q8ka6B/gKIXOahGUxz3A9oINv8pVa9lHcHDqAFNSj6nlc\njldqJbWuvAX5KECQmBpyjMcS1JCaC0K12q2TFZduEdTC5P5nAWbA0HpaE25C\nvTiRhCVzzBoK1Af/RBvinWKLFL+UZlcHBmvZtv5Nu1/JbFt06CdZD0dspjnM\nYCt11mIbmN1e7E0ptHI3V568bbRfwQhQNSh+qD8dfjSo7N5QfYS398XBh1Mp\nqXzCOR1s32Nggz/+2k4RDG93WD7WMqVMBkcnyDNq6mk8CZ8plHuU157aXZ1m\nbTxmqo3TfUwHcxKI4anCx19QLs9ppMVZy5dDwyKWYLuZJjEsu+nJGxYS/7xK\nU1Ztvw2ErcgsesewIMrUOai8a60VutzcPXwCiklqGBo2jOkSPz7jlrTeeFxZ\ncLjP\r\n=tf6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClStmvAfyYomA4im665V5MTWku6mTPI9WlDSGfOPfKoAIgO/Rs/zZkzUWLYY91mjc01fdC8K8c4Q58EyMAnjo1oEs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190829002434_1567038555159_0.3775563721068722"},"_hasShrinkwrap":false},"1.0.0-master.20190829071035":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190829071035","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6c37abfeb25105217edef3ae3355f8b369953869","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190829071035","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-t49528BgRlgMUed6T9MA+P+BR3I8gtNdJt3tIsMr408dsl9dNU3GaFfUI3ALscLo3mjsVxdRnMaenbkQTtnAOQ==","shasum":"e76aacd977edb9ba9599db8dde8e77cf4e5c279b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190829071035.tgz","fileCount":361,"unpackedSize":2642182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ3t6CRA9TVsSAnZWagAATCMQAJ8ziVkrabeHdLTNijHn\nQqt+8c219w3ZN0JlYF05AV7s2G/oGsR5kZJtgskSVZ9Be2dX47UHrjiAS+K4\naER8szF97ZPNoMSkjwymtunHWVbSAHCLdJs3n2mHU84zuNmnXrUyjL9fMmWe\nxz/IacDyJfgwDbfaUa3VrZ190gpfAeLlvSQuRgagTff8RlWK2N3TSwB4BVuy\ndTHYlFS0QBJkJfPPG6odSExgFVuK4NIoUAIegE1Eg5Q+sgEviqiUiB+nziEw\naL3Z6wwi9o2u0R89z8OLaEfl8u6rD4SlKwFh7faufP5jCRRQIW1bAie2v2xq\nWK6kztDWCpmY+X+taeOufK9XqypCu5AIxlmw735x2Pb6MrG4RKqReXRlcXo2\n4RJE5sGMr5jwFdEaCDQaFxbc3fiVhUZhfgAQ0tLEqvKFJ1cMq+0HvMGSC9uD\nB3b/uhiyIdJtAKw9Ks2Gi88fzH/kKw1A2ydeXZWFm7bAr2uD6WnZs29N2rPK\noe92in+LoJfsZA00RBcxYhrdeYucEuVufifkfbLzwoj3Ws/ReVtu/P0/Rgkg\nNYV0vFag/c0ZkyGPCSxc/AtmkSRXIEELY6OPvm9Ex0/6lTXxz3uDg7zNHbo4\nX4HD9ZXg1hzM541PYg9POVv/Cd0aIWXj8a925RlyFwIXybxxKfhY0xRmuAcm\nNd+f\r\n=Mpyr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBB3k/IZrCaAK52GTnwSxUrf4lwIfahX1gR/aT3Hm2NAiBku0yf+vDZRwVUrPJ6cdGKlxnkcKaMibOfVsMkkPsOcA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190829071035_1567062905494_0.2815428109241296"},"_hasShrinkwrap":false},"1.0.0-repos-on-dirft.20190829082931":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-repos-on-dirft.20190829082931","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f19bc9bd4d27828181ebdb3e8e70840b5defe7ab","_id":"@atomist/sdm-pack-aspect@1.0.0-repos-on-dirft.20190829082931","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HoEPi99A9VxgpJghMeerV1hb1vYUhX/FzdWYs1r/OZSN6Jz3d5uPk5A5zQOk2dq0DTwf/hf4yXLBIulinM6OHA==","shasum":"465cc9479ff3b882873d1d41ef9379ef44b1831e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-repos-on-dirft.20190829082931.tgz","fileCount":361,"unpackedSize":2645456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ43wCRA9TVsSAnZWagAApL8P/j6oxU40cdV3m0HVBl3j\nAfBXKM5zaQeDXu5n3nnlPoXpSfjn/Bd2uvxoyYxMagsMKIW1cpeKLEh8VH12\nPDxL1AX47aXWwMiHhJnlZYpn7PQhzqyAI4zRPLNXMhi2OHI0EI92wPNBZoYz\nBQ5KfSl/OsllsPdVvrbdy5qctJBPzOc6kaE1U2mdM/Wj1TcpiQve0MJZl1Um\ni9x28lEd+AB3kD4R582pPgxIJwlmdAMhRIWwdhaepUFxnHHars+ByalovEkc\nDbHIEiEYajDOIce/onK8sXgj2ioWWR7XNN0dIaoxxPu4grvjpy40ZV14srV4\nzZWLCapUrTmmleTUXRlAQuqY4rfuL/f3i+N1vTS+eR71x7k1eNgip2uCF3Y0\nuonOnUfHrwkZSRHRcFHAizulwvzUpkpUhK2s34ODfKz/Op2T6qDJw9lTyq2u\nK5cozdYpNoXOcrJP/9qwGDttSlPsAymj7DxzAdnQ53/LI2Ly4zMfNaWtP4sQ\nrLuxdSKED024PYYKxNlGDhVGL17lQDcWu+Aq2B5vnTXNGAsuPeSZ77TXe75o\nabru87gb2E8ASamgHdUPt5itib/zBmO0SuCx/QdFbsbPhDwwK7tTXGCtGEEj\nd8ghbxj8fnCRERbKkE1Ht4AJ1STYpmd/pzzTt8ZURk7w/Mu/yMeApPsaXUBP\nDH/R\r\n=I535\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCICjfzFtE9EYSBdIoT6hMaWlPsr7TvVM9KJjZgg1L/+3PAh9sSGKKfOnJ3b1GBHJMmrKSZ+ck3JFnPsmjGoZnrAUe"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-repos-on-dirft.20190829082931_1567067632182_0.32645159407169544"},"_hasShrinkwrap":false},"1.0.0-presence2.20190829184457":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-presence2.20190829184457","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7fdbbc5538655826932dea3d6e2f972f2f528451","_id":"@atomist/sdm-pack-aspect@1.0.0-presence2.20190829184457","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QmjoDFsCAEa0gx0FNC74DRSmifj7kBLy3UbKh1/meCnTwq2l550oWTxs13qqda2r5uMb+Db/7n2Be3RSo2TqoQ==","shasum":"7ef8da9878770111dae41788a06660ace1a6c8a6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-presence2.20190829184457.tgz","fileCount":361,"unpackedSize":2642480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaB3tCRA9TVsSAnZWagAAfMwP/31NsJTrYSB1ZR7kzzlg\nTEJMT7b2fukdCz112gS3Nv893/firnFXp0sR5/zdjtHOfBXNj1BCKh6/+yGW\nmWq4Kr/AeS9yOVRu9foltxxtwwTXwG+fBIwIJO7Z5sVs3SUz9ofBM2XGdAfe\npUid1IYB7nVdjIoiR3fbJAOIeJ9Wlj362zKbyW+1V9vInNtaW1XvTJhlgBbM\nsp970DLO1ZZAoJQFpZSgDYdIh1LoHmJk+WKbiWDKOdsvaGDtqYzXsBvJ9Chh\neuKsaXGjrwDLNsmb6cCy0Tq9IZQuZj9ClXBKRJ4iNYoNTovB8Ojum6oq+zOS\nqY6PaDrphRjlD2/l/VZTIXTE/VYZbWeOH1zAAx4yyM0gkEMe4Eck4RkRCbFP\nZPzEhdmG+NQOfUN5L4BL0uN9qxXuLQvmlpXbLuhcA9gqNjtMcPuILNzuZXsP\nw38+z1fE3ZGsNgC02n9oofSGRvONywEM3Fi3QDmKoHIHgo9KXQ4/EyoUBppR\n4VkIK8RnRKVfRWOlax9ekzR+UDy5nJiX0gZqtTmf5UjT4NS9ncbhz6UlTj0H\nZdP+qd4GG+98O4ZGhhXiZ1tU0PG0s5dQDCjOxhezkDHvTN+bmXeykthuhkMX\nbAUfoQZZuZw6I2vb50CijbyqakHfOzSOi0KRWH6j5qgjZ2nydEsOG7mJkKX2\nzaT+\r\n=X86f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDNIntjPUG7zY/ua0JDC5ciwkJadbasJZRAfNkhrhH/gIgVCxOKqf3B5S3l6+C1W8ceYYbcimmYNjm+Z6/sSjFiYw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-presence2.20190829184457_1567104492571_0.6569815649183108"},"_hasShrinkwrap":false},"1.0.0-master.20190829185621":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190829185621","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a50c9c8576341d1c9f42c9067f3fee98c0557c05","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190829185621","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-AN1X8nHfIsVFrrQBuzrGqQVZsLW+myAaKhzWTx2BOhGVOR34AVjDyUxsB/sm8kJSkk5YBY7eJdlAXM1JcQYd6w==","shasum":"6db661cafa35b6968b6e9a00299f45418621afd6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190829185621.tgz","fileCount":361,"unpackedSize":2642474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaCD1CRA9TVsSAnZWagAAtWAP+QHHUn155R/rbNEsma09\nWAwWj9jozxahbPLDauIRQBh7mTmHpql89PJDhayztJOA6Mo8vu0Hjib1ZsQf\n+7LnChdl7hDjp/23emD6cOH2Vph6d8bQpmVZxTF1tu9K5aaUUxCH5i/UN1Ey\nmFYYYP3+Fdn/VnDTZxH60tVupz/pPhKfaOVUMZYkXYxVMf9pd7qxgHGMIvsp\nSVKHCoXBnrdlZaL579YDgLv9L+JA2AeYgPyJtkHvhtknOOe8GXuEfKXCQr+q\nBf3h6g/jViqoBkE8RMX/WaND4uL9TiIfDIvvRVM89HW8Hp2usdv5GxbpGBUD\nj8T4EG7WWxghzhJQX0568eVZLFnr8VtS1xBcevK6cXq2pUTne5xu+EYXxWVP\nF5BDoN3ltHdETvO0i+65oSHzYNYtRgmGS568BIqQImHNoOSliKDOTl+pOgSr\nB1xsNE62GdxG07mgu/WiOqogLGHcyBgF1g38pD9xMv1YOtSaVD+wvBfWV1/g\n909ehz+fh/8hDupwJKewi5PzETin1Hui6bI7k3/FT+u16rowkJpQ+f8sy2Q1\nJu6QYSFHz89oT9OeDb6WjsB4JVsCcUr6dOccskxTW4cgkKKRJz6ZOVBlnNHt\n/+8vclGohuM7N6cByzax/RXUflHjwuaNr6YMdV73/Jr7lgQrHP9vT9P+zFXb\nKml/\r\n=/6GU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCz9DtQ9sPuWXuh5XffPgOLFSPZxdwL4vQYQHt2O6mjzwIhAMhKWfPO5R8WGnsSxZqNce+flJs4Qvk035beZdwFu8ZK"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190829185621_1567105268661_0.5539203850126784"},"_hasShrinkwrap":false},"1.0.0-score-fp.20190829214435":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-fp.20190829214435","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e08db5fb6fde9a17f52bfc254dab6009cd9660bc","_id":"@atomist/sdm-pack-aspect@1.0.0-score-fp.20190829214435","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Gx0lN8puvxDQfx8AxDqR10xG9Vz6zmHTlv3qYV8yCPb3DtMN4UcU0tAklpvvdr6Yy1EvTNvyiTsZSpz7Xsj65Q==","shasum":"294f779946dea7b840abbdb7ca2db7e9c0c709f8","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-fp.20190829214435.tgz","fileCount":365,"unpackedSize":2651855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaEhmCRA9TVsSAnZWagAADV4P/3ZIfZJx9m0EjYT40jj1\nP+rEX8Nm4dtWkYMi/lrjIsYA0VcPuQlA2Xv8hq/8nJkAgHhR/K6h8nQga62E\nrclun9MsuQ8XOQyxVIybnN+gwcs1GcFmEMWX8llAs9nD4x8AU/LwFP0OYYpw\n+5yFM5tDVm+NpfxOXxrH/gPTD2U0gpNNn3ursY8UNa5+85uR3ELDZ2XYIIEf\nB3x/0O2dnYyvYAm/mxuaiMgBv0M0rSe2zOUm7N7SHicxruWtfoPd2kZS86ap\ngN/eDh7MyrfODeQiivuA2nly6s9K7juJDfuBHgjcVf2HmGWmEbH7/beh2F9w\ncm+nO0nhKR7vkocDK/oyrN66jl4stUKiUCZsFA7yKcDpplSqg2pHM8BtWpKQ\nymK2bW+cVVzpnMYVbs2KPtQVQ8Dn6zsfwJ+FrQLkYY4oBnbJldjS8QQ0cWKw\nDwtIka773wpTJ/Iy4bOJPeL5TESnWue93aehVkdw5SUcDz6Q0Ox9DiQwiOou\nxTtRZ9oJiQ588WguSG/C6/CEuo3vDjPyDLbxyrzblAcuy34ET5eNAHpjEJ90\nmdZotLP8ULaTxG2s5tg6NZB2VTEbR5GCJE9HsqvxerLg1QkAWq5VIwLPTkmu\nQrstgUO6GsL4r9m/+b4MPBkP7BOchJHrlT1t8op+/MNiAOhw7hf88l5Rn2Db\nABCd\r\n=O6B4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHYwh3Bu5YwAmFZXRv/1dqE656kcIMpblQRRSdRH7SsAiBXTdp1Mqiu6ptlKlqp0rjLs0rxGZKPoqP8uZ8yRNZfqg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-fp.20190829214435_1567115365851_0.7277286123212336"},"_hasShrinkwrap":false},"1.0.0-score-fp.20190829225050":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-fp.20190829225050","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a3ef02d5cf5c40958d6010a67b5599fc5950ee77","_id":"@atomist/sdm-pack-aspect@1.0.0-score-fp.20190829225050","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-5MPqOCGBrI/EnXdV+J4f99n+CXbFc1jlT0fqeZsvOz+IwFLQmKs5ePiMueiiLXDzkh9gZ2A70B+DMxTLL6BZ0g==","shasum":"a8696606f90092376b3cf55abec56aa8c5ee30e0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-fp.20190829225050.tgz","fileCount":365,"unpackedSize":2653901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaFfICRA9TVsSAnZWagAA1HkQAKA02zR1u1/J/4slGL4h\nS7Q8WtnnLa8hdQwJWUQ/ExJRL8Ml3Rg2DRj+MXI5s9Y/QcdJQroR1jNuipxz\nOz4EQIhi4mM9KXbtQzzer4wAGuOJTOEhgpoc6L1eLiwF7DAlRHMWPmtCMEad\nQFkjFFqyqdkNNlGCaKNhixVbeQJkjNjpMMPhqzdyhgRrygpYKK5v0H3opKcC\n9Vkd3PyfFkAY4wizrEF+8oGE4FUtkpPYx3n8VWV4cdgQieG3R6eb8QoiO8BX\nbLlt/Lg2k7WWGcDlRzLC5A15VpkAWWnCWKF9Iq1NOxKr2dFapGBeyO/JEa/H\nfRyHkk2eGqYFUqMoVfdOgyr1MAX5kdTX86Yt69EEfydsIculONWdJr4QWPE5\nLEFlIWUYZq/q9SSXk8b6NjMujQG4tvMsk6ynccIS7OXNKmpOXXjFy8CBCMaG\nAAF9oDz0o2k5U89PhfDsqv58BHrNto8lTT6dBypPIUveoUuDXCNZ/T0yCRAB\nOplSYl2Sn68Gix3OpJAdxmj2PVOJ+MpEaWuRTdnQOfqv0IwGQlsq12NpkWzg\nN7c7CjyYyZA1GT48LKkew4dRSB9XUzBz4H2Fj29R6rapjXJ32CyThY1smTr9\nrOgEhXPPYjoZafmlJnzbpGQqxqscJDQGwbbqhZYanAO8I+wGmob1Tjium2by\niOQs\r\n=e+PS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9GS5hUNSeVnTbYkCzPN+pXIjmJyo/k4gv4ri1074sWAiEA+jdFZIHAqOHFpuTgDJiU8n/VCVPsTmPBdGljZO/shI4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-fp.20190829225050_1567119304075_0.9482458665771487"},"_hasShrinkwrap":false},"1.0.0-tag-fp.20190830002356":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-tag-fp.20190830002356","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7a476f1203c76af3fc2aa940ae168f2c1d11a744","_id":"@atomist/sdm-pack-aspect@1.0.0-tag-fp.20190830002356","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-rVNrzuyOYnsnN1XkOIN0O6IIVoGz4C2PTwuOyNmTfa+Gj/l4bfAiHG9dDOF/8ztqpKJXsYIdSd4nXfw1jBCuaw==","shasum":"fb08d47d44fa01ee202e6ae91c618813719192b0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-tag-fp.20190830002356.tgz","fileCount":365,"unpackedSize":2653505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaG2pCRA9TVsSAnZWagAAsH8P/RLH6oYMtkHevfJyCKKJ\nTLxu3OEad7XSouQA2gCzkYgoF8FtjkqC4jtZzrq2NPZ5IzqnmmyGLnqNA9H5\niXC0ngCYJupvbT1Vf+YMcX5uAS7Yd2bSEy770QiBnaRQNRgpaUyp6m/JLiJ/\nnZxX6hKg+AiDClJvV07JTe99e+j16+YeQMS/NtdDAI2GWaysRF1wFleN0tPO\njGQAm/6rG+JrZyujIJ3FEFLZi4/K088y+lqBHkVYxW6A9Qfd3hGQR3PVGfkf\ncIMUx/in7Zdkdd7SHpF/9BfXI0Q47dE/zRhKmI6PDyFYPpwomJx4A1yCjU2F\n8NDb9gBzKQksXefR36R7vMOR66ozF82Ym+fqh4qkSd6+MwK8faxvfnvJwF3q\nGF348MBU2nbl/HWmIz6pKk3ogFsANOoPdh3Miswb0UEPZ8S35zAUmPpq85vK\n0944+wb8lrHcQ7w22V9X4A8SkKXWwxuUiwFhZr/qo3E6RbndCTfpqhNWMIT7\nQs37QbEdFfEbbr3dlpwzdAdO+vwkTe870O6HClLCZw0878YLMUdJsvtmDFwz\n8ka0tiodLqcQZD97X4GxywHoA8ua+dsK9wJoJWvplRIhjigb63Y4qDDlhEA7\nkfvxpBf8KNrSWJcYzwHqEJ13kPL/PzZ7UN0F+MzHx4ejjNRY9TjJc7wY4HXQ\n4r9w\r\n=Wpje\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqEy8WsBbm9EvdsO5V9cTiT/svTMBhVph64wj128ZkOgIhAIzuj1N/SwL++52Krvi9uMm23afoy/vInhgP+H9RNKt8"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-tag-fp.20190830002356_1567124905263_0.011546432594108591"},"_hasShrinkwrap":false},"1.0.0-nortissej.analysis-page-tweaks.20190830002740":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.analysis-page-tweaks.20190830002740","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"483f5f4357054e83a03df687dec69b21bbf1f54e","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.analysis-page-tweaks.20190830002740","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-1jxnCpGdDi4F5GrBzoq4s+VEb+G+NKQ1NqkMVYi6FCNUlBZ4Sbtfoe2mUpzTHnNbxK6PtCrzXXU8PJG+1NToQQ==","shasum":"5a8fd63ec6a932433285ddb46a0a2355e2054e4a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.analysis-page-tweaks.20190830002740.tgz","fileCount":362,"unpackedSize":2706754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaG5vCRA9TVsSAnZWagAAYMoP+QEPAyykIVs0maq5fZ6N\nP5ZV/nTtPhzy/npVfEPNiUhIeFu9roySNikcEwIkrh817oIrF5EfKeZo9T6C\nrfjxPGBVrvQHlw9AjkXZ5NmJpb6scvFTSErio/dovEaGAcdXJ1N7W/P0w3Xj\n/o7n34bvqZw1FYwKa+9cYXEGu0ssz6Jfr0rTMbPwiaOHDhwnAYOXXN+u0agX\nhNmahkETVv6aQFvD/IqCflvrFzUogpQfmMroExEPn3N/jEWEMxGwnSjBMXeZ\n5FcQOUu6jkK1ZnqiJyYMn5wnf4onrvEOapcylMIJ1n2O9RuukJpQkejGhSXO\nr4TNdstYd4VpPQbTCClaOuaGmv2p4MifFcNrQ5VJicAHxwKKyu5MX/4E7VDC\nPl9nYElBd/zKn0st6PsagIATITglwpXkLXUgwsCV0ijqqigl7pzc6E1sT6qy\ntvHTPejtyqy3PhUxl247ZOVxY8RaFBgjVI/xy1DJNhlOT45Rl9MKb8yFObXa\n0uOwlMz4i84fzTa3r7lYffvrn0jD9c+nB6AZiIdExHCKfdV4FBsRqB6462NF\nvbWdDTyKZHjqLC2Z/C4h2wHMiVgvJcHJ+MCvgIdN3rw1v1Bfm6+l9sP7xRlw\neXNq68hDTCrIK1A00q5Fz0ItR0mxrjl9Al8m9iuw/EwDjknMZJiy68t1ab6r\nD87h\r\n=T9EY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAINBBOoblgdw92chMoEhE3Pyiz4DN06+FUFBMUhiW48AiEArIGKeFa1nrbwl26FrpGWv5GU1aHIeA6d6uv7BqIKmGQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.analysis-page-tweaks.20190830002740_1567125102473_0.05527323180371768"},"_hasShrinkwrap":false},"1.0.0-nortissej.analysis-page-tweaks.20190830003630":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.analysis-page-tweaks.20190830003630","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"bfcea3f35b8ac878602cb5e67f88e98091d8f75c","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.analysis-page-tweaks.20190830003630","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bNV0eobmnfSjxcvuOerXA1aJUuPtHMS3OVhK5QFqwF0LA86OrWymgOoXi1bzOQQ40jAO40QjIRs3z9fuRvQlww==","shasum":"a65147ab1ec2540919e7a3b98e932adb42bbf858","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.analysis-page-tweaks.20190830003630.tgz","fileCount":362,"unpackedSize":2707206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaHDBCRA9TVsSAnZWagAAbXYQAIvB5s4SdoukT8X4Bm5A\n2pbMq7bBgk2ZDnidOgcuB6DyR82NvJzF2R1HvNAQCvII6Yn3IHw+3iMeR7zf\nayuE4AZq1yvPBV8/1i3vuq/56K6g3p4jK8TK4lLsZdytt63OWZzjSA/yg33w\nKOYPF5VDAMy2UxzakzV5JXjndRl6BcR3OXD2qrDfelRRm5FCV7XukpAHvYGf\n6rzPVjrPqg0uVUpE/Ka/L3QwxZ3c6czFCOwEzJdnBjMQR56kIRIeL9mjBNVe\nFZVmnd9ukyNDU4DN+S3vKNRoSSyb3U/iKx/hua/BenZBciQyKP4oObPDK0T4\n2zWG6RG/TzXuXtpVMzJ+IcmvKhHzgQmQ9ndmbbmRtpH8zzQWzRP/Mq0qjLG2\nMni+cr8h01O016E2Yt/kLzDKpyu4sIDAxRTMOAuK9p2qQLcWkymjJHxJ038Q\nwHSbgm2Dj+kUXS4Svl7Q4SS2mfYxPwNtQzROPtLelUotPlJe97m5lO/mqA69\n326gYbpHljSzBz9O/CyNPOZ747ay1QJRf1nOzPKE1rBKU6nMrcxHeZuFa0rW\nHtEzUSF1REyKzqPwOe4X/Mvt5IzryL7afWpbHn4xGe+hYRvLtSstgiPHGvaU\n+5W/mVTK4xispxHZKRoCcdFVlx7II2RcnOmjWJ/hxmd5qxWbi7ieknhsm6PD\nzjIm\r\n=NJHO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/kDSKlmSlXeA2LftZcq9M8Dfm/pqS8qSGyNrMxbm+RAiEAvuRbFROGPVESVDUL5pRyt3CR+cpRK9TsgQuJmRUsMO8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.analysis-page-tweaks.20190830003630_1567125696878_0.7980178205776451"},"_hasShrinkwrap":false},"1.0.0-master.20190830022924":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830022924","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"91e80d559ec5c367614de5617c880f03c1633624","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830022924","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-EQr2WRnDFWXd7luS+vprnJ0rj8XL71WqLiUjzm+D7wTNkCu66leifEG3le5wwj7Oq5GlAbLihIeIf78K3jGifg==","shasum":"f07c205606be94504028a36a314811573962d6b7","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830022924.tgz","fileCount":365,"unpackedSize":2653505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaIryCRA9TVsSAnZWagAAF24P/RtY89wcQ+Jg9donOXj7\njjWo6t7AiRUs1HFFn3NN7wrxlzG8pt9VjS3Tyw2dHaVGpZ8aCa3B2mBYmwUy\nBOT0Ngq+u3nudCpng6o3I1mMbT0WtZWfINZf01uiF6Op0qzrbHCZTt0SQTOW\nQN7nX3bBQq8eGcRM3YcrEKtesgNvI7AaQAFlYyBIEDjBq7ft79gKBreDWXk0\naoChrZjn2FwkZ7MhME0nmuTOzBIFK51G7yLmq5ze90uOfRh5XuO0yej9A5p2\n9ONOMms72yV8+NSgiOVZCInCAjXNmWY1lr8vBDMNrnOzqDyfuukbZZwd7ikm\nDJis/5zUKvpGHm6s42hjcf0PTnizWqnPklpM71iodRVPO3pFxhqRZxxj6jtt\npPXj9QBKOYUB+az8tewepLe5Kpv6B1lp5IfZochqc4+9njU6xMPVSxJk9ezU\nYUt63wxYBZQF+QZSKN/3BC7y4lCeXsz/P0byADuylXLetWmV6aNhhZ2cZCvp\nx6H4KEhIbyjO0SJBTUbdv2uWDf4Dr2uECEgROegyIy7/RKYhnlKGmedrm6sB\nP7kHI8CP64gy2nMIr15DmXsSJiRuk/sbZQtkirhvS6maEKiM443mYbMwe8v4\nvgExpZP65vyvnde1NM25B4NcGUhCZQMZMjyScyOL+A42jdPkcBpnqihGJw5O\nYWTs\r\n=lGk4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8wpF0p8pbnZKh4DOqTtbBKwN/JWMqB3hjy15qkBOkuAIgJrrdUPplvPhwMLcidytsehQPFauwj9JOEQ+8yekhCXA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830022924_1567132402175_0.44938646478306343"},"_hasShrinkwrap":false},"1.0.0-nortissej.analysis-page-tweaks.20190830023849":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.analysis-page-tweaks.20190830023849","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"167f0e34c54a90e651c43474b4acffaa0737621a","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.analysis-page-tweaks.20190830023849","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-uH9x5Bk7qXqP/HqWjg2xIeJYCQODC/fu/NXHghiE02x0JYbUHnrl9NqxvU8A3IBMR0PUU6fZr5j2Yhlu976tHQ==","shasum":"eda23eb490163061c09237d6791125d9d97b477e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.analysis-page-tweaks.20190830023849.tgz","fileCount":366,"unpackedSize":2720291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaI03CRA9TVsSAnZWagAAGx4P/jmxdE9B84bflw9EhXHp\ncZneBXCTpJuAS/UU9qDc1KChFbkdbE3xSveKqGir2j2wa29BNzam1lHYL+vW\nriB9DuwBoGsXjwCWOxHXwKCC2zL/6gkP28Dea9Jxu+SEb0EwmCa6V4qAPzXC\nceB5nBG+6OPt4E/IpyRLAo6arfGcHGWqKNp31CKq6sNLe+2bJFjun6bYzmzi\nr6VUeSKfPUxQseoGHBe2hJ1Q8JTsFAqDjtc4K+mi1EOF3F3LvE5eXf3rqJqH\nofR/4rG+k7/hG+Lqv9bGzty1cqEC3zXcK7HIxLUBUHSQKQcnOlgZ6DwnYCY6\nwVfE/XzE4KZ1e59g/IcYhZBtM0YvTj78S4dJYgsnb1jvQ7M6A8m8KJzBMKE9\n5e5QN8wLi9lW1drQkTx3hjz/JcewKYdvyBXe5gKxIDbxjoAqA+z9ieGzkvlp\nJdb15LMPOgDmZh+jwAnlHO6mw0gCKjG2kL53+dhBk3aLfd5UvkRa9ZOngkN+\nONEWKaa48+SN4wlnETHoX1R05IBqrpPd2oeSzhje5yfuf8b81tIUrrGKJDjg\n19iHxTZ58iCRk1IE+XOkg6dtIBqnuuCs4xjmbs07iU1sBfRLj06ys+r0phWc\n2Pp22hsyLzi6aLPwEi9n8l0KbPb8+oSVRiSuSBlKbda4RWt9bvOUk9l3x8sh\nUVjk\r\n=fh2C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS+icMswdKta0RmAhjY7rQ5LE06OVMjKrc9dV3qca8CQIhALNKjH9A1rJaL2OAOVxtE0HGiV+aHcclptnOK+SAUA96"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.analysis-page-tweaks.20190830023849_1567132983034_0.4693746365956346"},"_hasShrinkwrap":false},"1.0.0-master.20190830024410":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830024410","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0f8216c58b1d97a3a8b24348ca35dc294509372a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830024410","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-m7KFHcJrwh9WHctUnlUWrD1+Hu0A+hmqh7el2kyChw9OMEiWNTy8r06CokkgMAqHac88tvhIpPYDEgpForjzjQ==","shasum":"d84e5aaebde6d928e07b68474690c5b475c165e0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830024410.tgz","fileCount":366,"unpackedSize":2720243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaI6ACRA9TVsSAnZWagAAOaYQAI9StAYVmVVvpwPyLMfp\nwIOkQfQEQrg4tLX6/iiuJHV8ugDfVR6E2o9Ie0QeIgICmipTObbnW11G4FKI\ndylqgvPWyKSzJL57Klz5XO+Im+t4KRruP6ka69pZJEhjHZEQA45jgvlfizWr\nNiNviG870Iuk27Oqnn0m0sxJoUREbB8MMpeHXbJMdvZluZYWt2P/sC8P+0f/\n2jtK2wIkLzvYveRZrcdiiyz2SnY98rCCUoU5CIzwMol4P6VT9UYAU8A5W+GR\nPeV7XCaDOF/MoAUFqHTe9fjX2Pvlzh7i9Mau0ZsrkrByFFChASwDsaKG7Tog\ntaB0PvvvsuMhQSv0Gll1LHq07hX9peMTP+w+eL3OfFSIHw8ykQzT9AnMednu\nKgv8LGQWt0BHdV90M9jWRsEbcUP7XtFHEvTPFfsmQXQK4DQQ77XnphaQeZfB\n/iAxrhL7JiYktDBwnHrb9lkLSXBoXpPOmIMRIS3DXTV0F5A+titx51b5MEiK\npxu7051a1DPFH65Tb6wO4sOcqDoz0qbG4Jyft1t4CGeFaNEyfLegIDlvipb0\nmOblrB0ZnUqt2NzyuBQhODasMBH3iv/UnxLukvkzAyCHYtvlxmfejITyf7Uy\nvprXwSS9hBDYlWNsX8t68Cr24ACop8z1WZd2VuHuG7mqp5H7Tbp2YT2p5EEp\nx66C\r\n=VhuB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwaOdWM6f65Bzo1D89volEH7PBkzX2k1dqwa7oJKi7XAiEAqRKPvR8VHT3kFoopixOWdBc7XtNvGBSr4nlgT3Z7mUg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830024410_1567133312146_0.7043648193092269"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830084921":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830084921","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"384ddd57c93fbb6e09943432df71140ff2339f07","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830084921","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wfnExrhcL9GYCBBaNiBxSCYTpD47L3pWLXRIG21MGPKVFHBtWmQ0dKMnsDL2U4RPQ+vRKSfjvfzajr6ZSMkEEg==","shasum":"83e965ff4c5c17ebb39e5d3281d704f66de81519","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830084921.tgz","fileCount":366,"unpackedSize":2720852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaORHCRA9TVsSAnZWagAA1KgP/R8FrMGnVVkswrPdJuBp\n7HS94KUGK4IYxlrVc/BOxPZHJbI8RIDqexh1155oRJUasbxGL1s3WqbNKY4z\nU4+mPy+8ZoW0X3wF9yDM6p0/rbo6uvVwgWwVfdLZ5SUwNBrqQXzW1qkyz/6M\nJzNcplUzxgKBMK9C2nzP06wRU9kgRZJHoFwJKhWHNX7VB/eSsEp1qtfJXwSm\nr4IGSJQ5BbsT9+jMj6xtNh1rZcDankToAMVa0l5X77a1jvqVsqFIKtuwtgIB\ntzyH/1g1fLpvGMlFkrHwhmQYqdf/PRuQHXB2lnnjhmj1/6hUNJbG0FTxfl+z\nG4QSgQGme0v02YAQrdRm1Rlkx2fv1HpgV15K9IakN0Lr6DUdrWUrC5/vHein\nPJhqTFezbGxSO/0QIGdUPnHlYORFLuDdnSZ5G5Jm6yJarn4TsZLU8lWMJ5O6\nLaAZpExI38XtGJpS0nP9mWKO6mb/5wjedARc1OaGfpTASE6K7vgJcKuImSmX\n6mlHOSbPaj9ky91qFl35+UFmldCUNNwKvHiRCxAskkIgVLtyYQlIO4fxHhsI\nZZlLbuR95xuvyEAyqTKETtUUnMrWq9b6eQ8NrlQAdDwMNU7zeuzYLehXUoM+\nyBxRKKqzv/CendACivAPEC9J/1Kh29uWtStq70muFBwkEC6DBWXyK0N+o2iH\n9Jq6\r\n=tjti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZIxDsCKENWi4nIF2tR8MAFcIRn559xLwu05Y4vanvSAiEAxSSg7iTKk/G7OMC+fa5NKYIzyq5VvBw5ubZesFl/qAk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830084921_1567155270529_0.4324241363006933"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830103331":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830103331","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"55080eb4bf5de7ee950a354537ab42d1f16a3b52","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830103331","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-pUuxMYaWLB6CzSRp9xe8ew+LZcCoKcTz5awaCQ7vVfGnE0xj7cCJ0OQE/1FYnT30HsD/U1Cmx1pkbTA/wiD1Lg==","shasum":"da68547557014f70453a56ae3d281bc4cb727f86","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830103331.tgz","fileCount":382,"unpackedSize":2739035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaPxYCRA9TVsSAnZWagAAVPsP/1UWX9pCoN/huzL19Dwl\nRuVqWSAhc4yo2kJrg9o62K2sBRLk26fYSquBuyJiTFGQax97EOo7KnP9Wk3W\nYK2Cwkny8mw6mxO/5VGVl7bppBhDoWRxZKV11yCll7olHUVBBDp9zL+gQY73\naCr8GELk3qItZR36qkuH7XBvzhxDs+EckA9YfFRVfz6OYmTeRRvtVSqOJ7zq\nKPEr+VbpktBeHS6YR6hmLGDYrGi3GL35CFxIi5DcOUWE9WUaDyBL7ET90Qht\nEv4xp5p6R7BoQ2NjjjvAjWf0FZqAYIDQZoY7V3oRRH8M+H8rC3IMuYvVudlf\nOvGbDT5FtsimCxaq+sNOeRxox7YFBPfsKuHQ/UCcdZEPgp0o5HpdVk8rUG7E\nAtF6wBR/RS9P/QxS4I04GbUY51uH/YlM6t6WnrbxaeHoispcmIkEw51YxdW7\nvC05qtHhHwCqgkLxJbqNKJlh02L23UQAqNJDXPk19abBtF1AjJ24RWF1sSGD\nKP/6z/F7ETfcxhQsv9klQuPuKKUjsgq0HZLJ7MGvixsxS/mOVHNofDWgYKnV\nYNiIhyU1tLvnDKoHoKxPpmUC+GWMbbND1e/1A+Zpb/hjOKOmfnrtKHsX9T0z\nfloAslxiFrXjrztN8Er8Eo3LXG4JxtO3OFuwWobN8eJ335rji2jV7F1F6ybw\ntCr1\r\n=JE6V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1MWXVvyt/+9vI6AzN6VRErdhkZcJjZj0hvohgmuw8FQIhAL94xFpgW04frEdzOuBGYAxXbR7dIjG0tHtihl+53bSx"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830103331_1567161432259_0.11044520257838375"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830104250":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830104250","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"db628b8c475cb42eb2824269df4f066bcf8f1b39","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830104250","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hjZASCkDMJyYwcdfoUMx6GlroqJDjxUftkt4oo8QUCpHU/MyzuIv6z7ArE4XxjX5Xw0K2no7V74ymZe6Xuzyrw==","shasum":"6cb4e8469ce2caa09f320ccbb200d480956e95d2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830104250.tgz","fileCount":382,"unpackedSize":2738009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaP6lCRA9TVsSAnZWagAAFC4P/Agta6R+ou2LOoPyjO+e\nnJfz03jXDveySR4DYodsq3YGDdEOjzFbv0b/sP9Jjv0+Iq5GzdcFK1AoM8R7\n/YwTl2crW2n5d6Ii4V2rhs3uI8vj8VkihnTUO3kkVaXvDsQ7nbbP7mnK5GUx\nLRJ7GI+cQY37Wgc38Ati0oAdBt2MV0qcaCbg3PcPyUDSqnjgJ0tePWAYpsz8\no1WI+BS0+7sfW03QU5Cnjl0D0pS/pyIKtQNzcVvBoD0/qO34bwzZvlyrhNhm\nDnYq99E3Py0YF4VCFJYn8EfChKGJv0JulU2WiH1J0V6TNZPwgenU+7m+8W2X\nzjtPivTxrVPJtExxC152+Eq1Rmxrj0JUrcb8YcaazO1yy0L5UaiF/4R6CUzd\nzWZmwLj3CLW3z/te/VfE1uKEh8LlOSicI7Sl80cQ1ravV+i5Tesj045UWYtW\njgOcaGVixAIsvvIzDltHcxUQt3ptmjPkCox9n9END81X7Cr52X6ew08aLodg\nKYuK5JwDdktA0uv6PkuhvpqcBZkusc8H1HD4Bf7nvEiBSXMMoSXSQDfLgOPf\nLoKid7lreAD+nD/BkFEAMhhASAS+OnNN1J7iqYP/n5+j2JGwk0Pfqt7HX/75\nSQLUl9rOwHSA8b7I5KrDk2dUSQ4xZuOB2T2h/wx/RTRcFWWItqAucy4F4zfP\nWvDu\r\n=tcHM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICY/XPhCbOeB4Lf1Rwgtv0nVcr70/MSeQ5jnJ240E+c5AiEAqPK+aKuQiC6eMaJVkaiUxHne8+KiZQMPWpQsVxfj83Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830104250_1567162020703_0.9959176129775738"},"_hasShrinkwrap":false},"1.0.0-master.20190830193631":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830193631","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"cc98bfd22a18df3edd27479671ea4e1f358ccc69","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830193631","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ugMCP3sBQzzqXnE2SjYwGhDZfi/JYF54vWT9qq7YPjwM1mZZEJt0ZYl1BKP1K0iXFH81vCW/lJipOcuRAvS5TA==","shasum":"24d3d66b52e94d50073bc70bc416aa1cff8efc2c","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830193631.tgz","fileCount":366,"unpackedSize":2723942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaXu1CRA9TVsSAnZWagAAKCYQAJGB6tO8W0vXTl2Q3bfh\nq7EHPAGTsosx3e7y4kg5SHk5mXmTigXvtGsZzDIIUqZwbDWxKJL1vCvVGEhT\nfTOcQo2Jftt8CD7cjlSfdgyPJ6/tscR/SIVq8C8fdmVKqpjUgFBh7SBUZazB\nW6mWfl7NaMb3VIRWWhqmifgWRtT9BKANXjbqs7SRYdRz9isnez8/BLVGwfk5\nPty8aijyZQzz2r2423SBe9NX5xMttjIWpr1pPW1p80aBkpdiWmSfxbWgpHCS\nC6TXhkOd0uHrlSNx2jKt/JEJG9e7OfaTVxPyiaH5KlitOm0SBzDrElqFV/4W\nJjHHOLy+brVhxgLBRmLyg6Ypoqz7smAJx2Up+yZLYh16T+Uxm+R+18pA3s2h\nM9DC8R/tOCRrx2Lo8sRfPaRqB8JJpuryMZB9uiuLHnPQXWIVAZ56V7JMgngb\nLmibAyFR4V7o29/NDn6hif0DQwb2K9etnVG6/4lvplyCtoVJ7kCwMeOsVqdy\nak0v2P7q9CJEKLMI3X8FAvcK8dOztQkGRAP+pL7CBhayp5AVQbXh4Aks38QW\nAYGME+r1gPNnDLf+6OPdLNOaCZWE1X3TDUdvpd5a3yny81JLyuXRGQxMFhYB\ni/t4WvbB7IfIJkDjUh5AlyxSsTM/7RpTmcKooPuMkI1fha2GMm3jzkchFphU\nLQ+z\r\n=AKEb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAY26E2tIu6SupHQhBZqQTDZ9xDMGuvzwahdN6v/BF7UAiBTO9WPySbzoXKVJ3mmBSbOURlt04RvZa5/xrzbHDA3iA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830193631_1567194036525_0.9351657309909331"},"_hasShrinkwrap":false},"1.0.0-master.20190830202238":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830202238","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"cc98bfd22a18df3edd27479671ea4e1f358ccc69","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830202238","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Z6+JeyQ+uX7qOFvnbOI/asQDWasaP+IZ9gAkRQuB/t3x8nLwF+WRoynLykQ0rq2Vyah4Y8YSR26imq/kCEb+fw==","shasum":"c29af34504ce961d66686f1f5b61ed5b680659e6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830202238.tgz","fileCount":366,"unpackedSize":2723942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYaoCRA9TVsSAnZWagAAKXoP/1vLv5Z5HGlYEzWfU4fQ\nj/u33qs7Zmmk9cOKQ+Yxdtwq6vysDDIVFUht85BWlZZREQTQ2BOsjEbK31L6\nNSDn5EWMM5moaBvybJvfEkksIt7IeuxHpknX+Ekg6K3z9Mmu12auwIxvRfh6\njTOZaPJdjv8NztRdp6YSFLnc/PCpsaihVsfnoERGyoVwLPcnHJC6AbOjtAZ8\nfJb/CCQLDJytVmkWoRYXRZ0BIy0Yyeu2YdWEtEiMZGQTUihOH75FaEfGJ0GJ\nfZ+OwgDvrdt8v3+4Yxn6XzkCIM7KL8/kRNkav2muicw21V52avt/fYYH9beJ\nDtMKthhmbtJV/Z9w9WCuFLdjK3RF5Xw0xr0xmU7fVEstm9QpM+pM/9oAegVo\nCzAUyjkP37AIbxdRuymuYQ2sJxJmJ8diPvOvIzMURNvdTfhI37xNQ0U3R2Z3\neNFDs7/vwZ7W1O9a27SL/CEQu+AMbFHk4QS59iCZo4b14m4tjqxGN8f8xxA+\nCNsAFkKQuGh2IpUN93t8I6d1YEsX4I4PlccGkFDqOnH9GFjbWvz42vkvlvRz\neYqD4KjnAOqRt+26vdjb6yWrWQEWdj/xQMYdC0rmSG1qw2ootWnqvd/Ou2tR\n5986h/z+f/3zvKPpXn6Aa79TdY1BzkvYRW2zV5EutgVZ6uaVgfwfeO3b8QvB\nrxz7\r\n=zBGC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIMPeru2EVE2/w8oCZb84HzDzSIdzSWV6hxrOTHE8tKgIhALFJ3CVbSHACd1KmvtwveNBmqrhchva+FtFCXoa441EC"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830202238_1567196839611_0.013141065608349711"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830202243":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830202243","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"3afa517bb7e73fea87182f5d2d4e4e8b065a6d87","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830202243","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-5gcLwxdH+3sEKaR1TqOBXxKFAMcJP33Uxtdr4eWCy4IVFcJkk+1pnxwurQ9V/kzBfBIuEVHlFL7EJR5hbEpK5g==","shasum":"480a6364628115683b5cfe1e9bb9b88e92e4b2ec","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830202243.tgz","fileCount":392,"unpackedSize":4489325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYa8CRA9TVsSAnZWagAASqAQAJo/OAdig5BfObaX37Xz\nqm0dENadoKgDHJn1RVaB77ZKNNYgBl7H6Ok4HBr4ejeJI9+0f8EqX1d3qZoA\naUcK/1gVVuxbQ0QwMF4HExi8LiquxQsBbJJNAXo5l++1W40kv5+nRGa1bbVI\nj7ZkP4Y6FYnYnhez2sjvAgQdsaS2m3Z9K2eTwgha66qxEawkj1g4OCr9VVmk\no2A/xvDsLuDl8PgivxpKJJbN3BIz3q8vSrpw0RyK6FwcFQFmtKLrgebf1+7x\nezjx3VqA3gIF7g5BmtFY2WR5rUrG224dQQKzztHLYELgUMljnvg/gOai7w6c\n6HW5s/NKNUByaGdOhE74IhIbtzH17rXzD5KCbp2Y7SA3npOS+ydyX8Si1tlt\nT8zJFpSa/4P4k2zP+R8Sk++J7gpys4pQuI+8C9N4hF6W2NjpICsNHX2lkNuM\nnBgdsDYMgSzSqDFeN8/4In61oMz+ZuzOrlkj++jUz/VEFaGv9q7N3IeepUaQ\n4Q9UroGtGV8Enp5xHW08bE8tu0YV0Xi9Ki5tM6jdKwyg6SIxZUIuOvwn4E8O\now2+/FAnCwN7NKewCF8gFq7IwXvrZxUZS1P+cHjYB14A+CTIG3Pl67zG+P0b\nCVV+ak1e81qsLTsIaYm8pGCnjI9SvD/Kb1oVc1QWiMc27tguW49pbDioCEZ+\n/ixs\r\n=WKFb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCywhjtCsRLHHYcXCRyDXilrEoXQP9nldjOu+7bid2wJQIhALCNpeqgiC2cwI4Xc6AhDA3Qsp1irbaOzfb4ML2GJfvh"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830202243_1567196859707_0.5426129227550194"},"_hasShrinkwrap":false},"1.0.0-nortissej.fewerScoredAspects.20190830202329":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.fewerScoredAspects.20190830202329","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d0ad73526935ff71610ff38ea936dcc6e4bb6068","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.fewerScoredAspects.20190830202329","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-KFzUqUMRwjeNlw9NX9yGEBXYUPc1RwkXlUDb860DfdsAtzvj7B8I+xXw1yVhKamwDLyKc2uOfULvzcuXmSDngw==","shasum":"30572c08bb423f7c4cb02c974f36fb6b664de3c6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.fewerScoredAspects.20190830202329.tgz","fileCount":366,"unpackedSize":2724543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYc4CRA9TVsSAnZWagAAS/gQAKRp9vYhNlVFIYGQoYeJ\nT1rj+DpSsZMnp2u+nrmiUpTNJt/ybqG51WpFJcGHF2MuxxkA0brnfQ4KGxRM\na0jl6/GW+dba+oW5PvXw1H/bq7/W2685PAKz3fJ3dWh7gZDYkTwvgJ8uMHkr\nhlBm0k1g79d0Hc+zj3mCZ12W2yF+vIIBqZ6iIlBXF/PgTrvks8t/Djx5WoyH\nHnsjKFyYKrcgaZyWmTNudm8QuMihVpG8GlDNzQ4p/hfwuRCRSjE6Udmw9LIK\nHW7h4JL/1AV/eQ4Q6qYolMbgWaNcq8Nj8DWG36Xk6bhcSLFo6X8fjuJkfDcE\np8ElQdD3cKa4tS7Gva9b0Y308hCy/y/PFZB4ieTehR9GxzqpMo4KsR4oH/yC\nQWZX+Oz3L8uTJiVswaj0UQ+ykz8SvJp+FOGBehdxEHOfIgFiIqv8faVzMO3A\nHOHaQrpZyEUUC89EeWVv0mjFzR5WQBRxGsOBXNwCr1d0Q4N1nbCHbhlN6vzL\nkfwBg8m8A9udcbTW4W36kmUU4XfkSiFL9kgt8MdvbWIXZ4nY87Vr23MctkFf\n9QIbOGKAOkg7x9zLnsUrGi5wUjdey/MItSksrrTaDxwxeZ66aFWmgtLxIqf/\njLgR8TzMCurpAxyuvVXGL/1gRxVt+/ffdcz6KHaaZ5jVD0teBTOqhUn66ZNZ\nvMzI\r\n=gC0n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCrR0RujpSaAd2Jn+UaRahTp7jCB1ffS4vX+nycQZU1AiAds5ah6JdQfHJbtpC9/w9X4JLmhwDuysPA5Sn/IxK4ig=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.fewerScoredAspects.20190830202329_1567196983937_0.6184551686860058"},"_hasShrinkwrap":false},"1.0.0-master.20190830203711":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830203711","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"85eeeceb228d3def905dd731974304ed38ba0738","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830203711","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-uHrQXJ5R86xG3DeAkY34JBouKEkb66/P0L+lDqIddsP6UsTEj6kshDYLmIT89Kd7qWjThxUTt+9R7qRUonHH9Q==","shasum":"f11168089af166dc1f26176c2661f8fb0ac8b787","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830203711.tgz","fileCount":366,"unpackedSize":2724499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYo0CRA9TVsSAnZWagAAV/4P/0Gi8mHRli8GqwY4i5fX\nrFVurmYRRZP6pXBbdKQTQxA2XF9D5X4Ta52vJ7oNaI2QMK4wYtmA/EgEeiDV\n0mAztCauxXCxP2HjT59agw9kIaXVwhaGWo692DaXgDwX02kA5SKOcFmPHky/\n+NDnIUbOwM7/WJ7VnlgxL1uoVGgOgq5qQJzZkRqQymQSk5NhmPepmCo6AmYG\nWNyihWRRAjN/nojl7CESl9vkW/KBRDSpT4AsLpbmSUMFXTNENwzFZMKLavZR\nEgxQEm1Rhw4QWL7J+MPyUqBuumahSnTLujuCvXQxLroLFa/NlA0kdbFja+MQ\n/vbHEX65A+WNBm9Ne5S1OXuruP4Ajr5HBXPYwQeZOfJQF3339FbThM5s2zx+\n/eQqUOFq7QHpn4/xoTdSuiNFyFPpPAJSnnfv2APnk4jbVDAvoWd4rgnyg45Z\nGSlYKlHD2S2v7U1nbjSwWm1vTlct66/HAgAXVj/vFLGqfWYepqv6JSa3IjVR\nQFwkQHBM68aVdk70/Q7DKarHu3H4Pb8OVFAoMIHlVODXJTv3nzgJtgolYQyM\nUc01TQYMeqbl0lqtFKKhWP0mnL3PQMIa7KXHD3oZRalNVywAVg6ERTHFO5iD\nna2ktzgBMovB9Au6HbiFqt1wfvw13UHzfPBqxpcnvTdlZAmahHqXBqDnZ/Vn\nxW+D\r\n=38sG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcsEs/arKW97iM2kNwmOhlgNCQ33vJOZGCKqEgfz7MgAIgUAJG5uMy/bBPezi6pC0ppaMQk5LDfrQ66F7FRihlrXo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830203711_1567197747659_0.9016171184640489"},"_hasShrinkwrap":false},"1.0.0-master.20190830205836":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830205836","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"266640674c7c7f06b78e1ba6cb307b051ea3afbc","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830205836","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-VZZBndndYM2fTqFNp7xOoOO4vsPHPcLXuMp++q8VpQ1tgCkXbGzgEUnsRbAenOiTGY5VJOMF6SS7LBoAFDSGEA==","shasum":"7d7d00e2fa393a6d7297adff122df51d96974ace","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830205836.tgz","fileCount":366,"unpackedSize":2722895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaY8WCRA9TVsSAnZWagAApOUP/3zhMgY3KNNd+8TW42WH\nPsOpVEj9tPN11KSqpxEla56ggHwcdOt4R8YW0i+R6+ahKBDOzerZrDzKnHkm\n5emoTSI71oa5qiuLD0szWiZg4kpZusCofRU4yabQtRFBUqQhPf+LdZYDnIXa\nwlw/K0GH5H6gbHuG8m2joSJKw0NosLjIWTXuo9Q508amXBtf9AxbZVh0MuIU\nCHPu93Ff+nXC/As/3bUzWU5qCGR8SKauJsabbm+sMpqapxftd/JM3pOzdvbJ\nE1DiUMQFnT+uRDrkLBQEk8Am+BtKucKU7o7QYzfDmVhf0cCEZMZWvRoKJvy2\nYPm3cOto+od0a80rxmNGjedjZ3+fTtpb8tufsvzlt+sCpEEjmlCW6g9HYPbl\nrTZPBEJnPf/szAnJTfMxxGMSRAafFYNGPRsf1AdId9oz7TypiQT6GBE4hKzh\nTqLjHOGTockP/YnR1ecEvuxJSDIOr3gA+n9N0Mh6OCVr1LDfEZl/G+ij5FaX\njDrFaMIt4+/DfxpRj6Bi8+8cCx1TQhoLMLbsxcFaY28UEl1BtcIpKfvAzanJ\ncuiVZwVUo1y+6Krnft4oXbCwRQMKM6iI9JTU4hTPawqbR2God+nsXUCCQ8W2\nZB2dW+FfvLltGadYnZU8KOH/qopFnQVOImB5nOmz5brcyUcKPe15Stq2J3AS\nOyBp\r\n=xtcz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrwGUmKkvciOxzRLcm4vkyUp/DcW7v9J/xd1CpbpzT0gIhAJLOb35bPu76r4BRkI5SdvYIwcDSYbRdfbw9GeIO8zD6"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830205836_1567198997322_0.6979204791525528"},"_hasShrinkwrap":false},"1.0.0-master.20190830213102":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830213102","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"74ca7fd317348b2c25589e41ed041d8f96473ca6","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830213102","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-LOS14PUbvzryHG7wXiD6n/hxUNkJD5FHWUrm4q8VG+NP/GkP703U78xDHxZ39mm2PHTuykFCLdC4vKcYt+DFZg==","shasum":"8c0449e1017785de58e884adfcde4c6ea32d6b83","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830213102.tgz","fileCount":366,"unpackedSize":2722907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaZa8CRA9TVsSAnZWagAAdAgP/3XWGGAFb8JEm1NBK9jn\nH3BkBnyZ8VOWELQj7qz0AbNmBd/ldzWFO8q532T9lOtZ4phgcjXO+BDVpF1X\n1GrG4o04WnA8HUCpa1LFOlAGjKSlf2m8yxgwQLFICTmVgXzo1z+946jTrcvC\n/mwjLSuBwY8PKVPJDgeeKS4S1Be6xW6FIyZANlWwx4E1XDjYRcmRPFscU3DD\nxB9qdBQ3XszFF22wbvQeIHt3bQI2rxdaX6Bqs78GTvlQyjPUma5Xs2x7Psm2\nSEQhxFHvTTTJ4ZXHTV1y6rRU5VWfqD0Fs9bWrqE9QbRdunh0L4Jv0jdCfrsE\nJ90JJqGwYn2VKndUUaBuBbMOnsW5VBTPxNNZ3NjoLGrbyT79NIm1Qj7Oz6KO\nBikd2hkGwdroPdRgx6ippd8xBREXER/1mgKI3sXLyZF+Ut2t3USNgsA0Ha3V\nH12741daa4weVGXElcSUAcI06VDYFJ544VV7VHNFoYUKvcNSnPJPKZLqbLd1\niG6zaCsjCBZzgicYwljkfPGXOwWLWGCLpTG9rtH1AtmsUD5sS4MVXsL6TNNr\nhZ+GkGxoaVjpflGuGNiwJylyv5jjpO3qY86h/ML5UQGGy2FJP0bQ6kZhEZO+\nsURIqKON6kRS/bn4Cf6QqIPPC4rRffvbtOBm972QowEK8sG79xKrUFv1ZVS8\nTAWV\r\n=b1C4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnkx01S7EjSmP/+ieoIRum08f/rY5OgAm+TrCwmYaKqAIgNULbMqlPOx4IaCFjzLfNOXLEFtfenD3+50jqtqQ5IKQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830213102_1567200956282_0.8963024221075637"},"_hasShrinkwrap":false},"1.0.0-atomist.t29e48p34.typescript-version.master.20190830213310":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-atomist.t29e48p34.typescript-version.master.20190830213310","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"28767c791b7b48c3835788685ec1b6de95e9422d","_id":"@atomist/sdm-pack-aspect@1.0.0-atomist.t29e48p34.typescript-version.master.20190830213310","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ihEgD0FppeNLiAsYkG1hfovOgrG9gHnm1tjH5MB11II3gFDq6Bfks04Z3Rupp8KEyWHW87CxJSb06QCFfUuq3w==","shasum":"68c072ce9e923e63f9e3293c51216311c2e03610","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-atomist.t29e48p34.typescript-version.master.20190830213310.tgz","fileCount":366,"unpackedSize":2722980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaZcWCRA9TVsSAnZWagAAub0P/3XRzwwMom699IKWvN4J\nSYe+kd0ZkL5bozPG9Hz7bUIc+vvp1Em+XXt6TwlUtLHVsULr7lPzrK8GM5g0\nicszzFRUDL+XXokf0zQxPsfC65GP1sO/TXF5a8RKMq4xUhe92pUDFkfS8iqw\nj/1fc33hAZVS2DVtmXipyPOOO0SB+5g3TcmFAtg2tRu+Hy4cNXq0FV6/3iWh\ncKNNwBNHGD17+zDxat7XWGSD6+b7LEu00UHgDIbY01uyuijBgOMvhth2QRsb\nVWwbw5mlL0CuUoTWfpU+/IRXv6uxUDeL28RwfXNxFy2kiBVG5hQW09vE3Ksw\nUimyueWhYLojKSo47Osyiy+/jJMq+FYBdMFn2x3NSuz3mNnj0p+bwXhWCe9T\nYx2r76fIyYsFofg6Y5z3JjB+WjLjE49iKqA2A9H4a/KfjQVQPCCmvJuNie3z\nFw1lVDhykaz4y+9JwTEoRFrUTEdPYsRdGTh6tDuJlnZvPfMIt37BkFPQPbkI\nXq7mTTpME6dipOMxpUnOTGizm1+0WDNm3gs1eYJOqTT6W3aJo26zk/fP2iCp\n5CmUFXuqoWT5FCQjQDKMU7SJryITLUnYLsl8gq/KceIfRqO7rIWn0/hDlnxe\njfh9TTAmvkRcu4f1GiEKTe3XV9RpSJ0w2jL/a2dwYdCPaTE6VER4SP402kSg\nxm49\r\n=v9yc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCHxwizv3ieMLOHk2ZuYgn+r/RpH/+D+ZcABYHXrCLJoYCIQD83ctbWoSd1raBAVGH8oIIe+tsFciqS8zE79Szc9KAsQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-atomist.t29e48p34.typescript-version.master.20190830213310_1567201045886_0.2404896642122778"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830213420":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830213420","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"fcbeda5bfc7658bc06dba86b9d8391cf295f4d16","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830213420","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-n1k9Cgh6HbM6iDr8jE+cxQazbQG5fGF8hfFjHcRF9M8V02tqFxcIdFBAfiBiaBC2aLBJqMRI9G8/5trx7T+Xdw==","shasum":"62e61b1034e7bf12d9de2dba7493fc24d4599642","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830213420.tgz","fileCount":392,"unpackedSize":4489952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaZdaCRA9TVsSAnZWagAAD5wP+gIouMIo1DGf1gXp1MNV\nMqyM3nlwils5TK/T5va4whsxcA5IK7DG2XOezzOttsxlEIVpFajaPpwRY9zA\nb1xNS/s+xKVHJjbbGbQilVGbmDmKmUpDKa5JTsvFnmb8NX3tqbp32mArusAg\nn4i3Jr/lK+vWy1dVym2nH73kuUJJb3b8RU1D/5/qkRAix09eqFH/G5DiJ4T6\nM+eXHrH2VMSXzXINfP/A8Yz0ppZObFoHniZykptXkRJOqkE/4JdRikmMMPyQ\n+5LzBsGUZNH3IkB7NwUK09vz6+ichRbJ2TYB46rOEmQ+HS2i0PZnyAm29Pgg\nsoVXsnkQM2WiyK7Fj0L9BlDkyAmVwLu+Jx/AF0p8OoyBNwBJb8TLaO6PPTWm\nZPewdaR3QEjUEP2CiJ6dchU1JGCcIjfyDDxvHpFiXvQGRL4e5nfIu8xxhyd/\n8M+AXIJFD76TlFBnIHMM/LqcoxuUfgCcYlkXlUVVBUZ4yVWPF/NPMSGrJeO8\nPgt7KY4t6WSArGudu1b6BEZRvJmmIbaMn58oRsYckgykp+ZjGDBzIFL9JZqH\n9YNdZGKlyIX018T8TLbtbvjFX+ehq4I8ZAN5E6dU03FDIvyaR/O/qoNcvWns\nCe73A3oLwsbGJKypcHL/g5jsvUqPeJGVwoHbAxGvAoqVI3xHt1x8AOBx2qH7\nEDlh\r\n=pO1p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhzkcPMHw+Ba5bts40oy8B2K8mzE1d7ZO6m5/nXIUxiAiAn5N4fPeJRSeK8TATRh/kRD58Tq+ZsxNyQhi0KkWkIFg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830213420_1567201114188_0.2546467753709418"},"_hasShrinkwrap":false},"1.0.0-master.20190830215314":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190830215314","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2b868609698541e5a04767de570ea40b6ffa168b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190830215314","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-1bRP7fjRkCATR2cab0fpeCUiUFIG6Khl8FHcfi2o3AqQBNk/2aFgyKPXGq1fkEsIjz33EejlXA5qeW8Bactxvg==","shasum":"dbead9790f15237bf5ab7a3c4f155e75ef2a0fb3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190830215314.tgz","fileCount":370,"unpackedSize":2723338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaZuzCRA9TVsSAnZWagAAN8sP/1eVfTNFIQ3QHbhsXW+0\nibxZFmN+a7eBuFq/PKyyBo9YJnJvo1uc05Zipj4CTKMCscZC+aErKpkShtj1\nmMz7kamaWmbDWz+AyWIK+VEtWMadGC/AO4QThh2/27I8jspys9njq1I1oFTy\n6Zz3owNkj2L02FBU3aJkzaeSsZwzNdjfGxHXtGklgzvDJBky4UPCuTIcioZk\n3tWIemACcVd5APQ9x7OKzE3Vg0RF8DbGve35NQSoNiyuCyUL8sGNyUm4kPQN\nuSU7lnM27D5QVYKlBR00mBkL9TOTgXkDOeEJaeIVcmaLuFbT4nIaUKy4B7bj\nySQGbXEq+PMPyGYT9HOb0T6PR1XXucV2fH6knnTnFnVWw6A4LviVJTz8isZL\nsIX+da2fQKGUhGpWgEhrEgdF1/zPPZ7Bt2FVYyr6VRiS0NjC7aLncP5nqSeN\nR8p2KHj6yIywl9U+h3Rz4kTJ2yxeT5BRLNdpmNPEPXXw9gbVXF6qj9+ilMBQ\nd+169oF3cKzNAZCoCk0YuhT41lcmCgZEv7SP2RbdufK422yo3QxFzm/nOfHJ\nc2mfYXHeDdABPBpImptNaauzBZK5MFUr0tTsb+AdxKIjJ9xCjw4L8Kh8WXu5\nWH+WgKP0JIKEw/C/xAwwlrCd62w2v+yCUFdh2mm6onWBVFj/sBYtmpegOX4v\ngIdT\r\n=n5bv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHsscx95BLfkuaX1b/4YPk2Kf22BdV1dXeiO/SXs7EgOAiEAwy5MGD3xQRgJj90MC6SzBSsDvVf5GKtoOYEZpAj3u/c="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190830215314_1567202226857_0.9036512426294241"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830221406":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830221406","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7a5afb76ded79dd460e432d93f43c99de4ddf8a7","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830221406","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wh/4tG6AUZb2bpKbq0ktt+QMQz8ApHSs26U1mYePDoBWDuzWuqFtiJaAJzeQaNBqW/PG3/FusPP37Oh/BgPs4Q==","shasum":"e09ee6d4bd0afc7ab52c7358a6ad3c09c2513796","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830221406.tgz","fileCount":392,"unpackedSize":4490593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaaCtCRA9TVsSAnZWagAAqsIP/j6hIyt+1N7vz06Po+qp\nbpKTbYCsgXnkOWm916NvWYw/x63R4ti/Jhj+11PIL/zu7jD6NkO8Oi1VcIcD\nLu8WUvDkJmgW0V1apiTh364Dc2G6JAgzajTyFuj1F19bXlHqAXWTJ3iPP3SR\nanBxRBpjAn29wzNZiWGzHkB8apBhd1AK8ag5gXrx73bKB/NfkV6vDqxFiv0q\n6flhsbeE3Vd4X7x5eOPof3nsdaNZUz4k3aed+sjlI46qfdtqU9gG/vMYYKmq\nN6LAqF8vTa0ntCEHmGzbBzucTi6MwAX/NmCKpLtFrsDcpye+A5PPFET9DmhZ\nGrQQ4Hf0bjy5qfql2pEyBHjh+eKoiywDk7fkScUrM8E9ynvXMWa9I1xwSAt9\nUUTW05k/aisRZxcxajp64Nf1Wgs+AFFZ6qJii4ML4fLjvoCs+rvutx003jH9\nFYbIAsxe15vrKGfo4Coc3s8TSCFrOyw5tcfoludRPmFZsSCd5tRnDXE2JzQM\nH8S/02ynENUVkyus20UkBO7ZUPVeyZrM71xqWXHEKJpMCXGzwOxNbwA74h82\nTZnwuUnO/8oGBpxp35fnIk4humnv9CA1GnDdnAbQEWWjFZ4zm5gBsi70UCnr\n3nvtDTH8ucjRXF1p6FCOO6gD+qU4zCJWKe2emq2w5oXcCfjSe2hSQTth1t8G\nipI/\r\n=+ioS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGmDwtt83WpkaL7mL5WvFMX50+XFv+1fzI5VFu46+tYQAiEA8XO2HwmGD2w3W5Od7e7tDsJMH/avnn0S/oiHlaR9Jz8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830221406_1567203501071_0.8247852221245202"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830232758":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830232758","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"562e0b5daaae622f79d3a5f439d3d9bcb00c650d","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830232758","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ImwPJTDAK2a+bdYpaEzAaN95micOvf2mZ03W2rua2R5uhp+p5/q7FbyHYooJFQdAHmIKZybXYhI1aBppeYfMNA==","shasum":"e3e83d00bb04f76141bb8b25b0418e2cb24b6d62","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830232758.tgz","fileCount":392,"unpackedSize":4490931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdabHzCRA9TVsSAnZWagAADJsQAIGRT1qf/AKHIzzh/0Dk\nbcH5tuZ/rJi1eFYa2pYyhDH1Ir47RS6D1XcEvLnfSs2lYaQ7K1MWNEEB0mVW\nW5UXUccUF4s1gyxVfhUgmVzxBWynPc4DWkmR3fFA0wERyvIB8OogHm/Ejev3\nMF+t0YcaKzhduePPvE3dV/iVYdwOe/ZTMZXH9NWqb4UljRqvhLc7rpncv7fJ\ncJLUApSmCwD37XxuL1cfWJX/QNiW75kLruzxm1+0NO34I89Dp4PdXxyt86oZ\nFX6OkPEiaBiXfAHQz8xWUKum/uZNyiG6F3WIrx52i+2hoAlzq+zbPll6ztpJ\n3U/BJhWxEH5mUF1x98jyPXtzh+/VioPkF+0dRUwqcMLDyTwFSZsaVSIoES+V\nJ4fd9wkhVHyxJyxySfM73bP37PSmQTG8XI7Ad0mIhZFo/3q2ln4aeD3N33iL\nrm6XKwG7pNBQ87Jy43EiWrRU4c3RavO4lLYTos4cyYZ2p57GrZdh/yK8xqTj\nqZl83lUmyB53tiSCjBSOrpAYqHsfKYZEg4nyRWg6IvE8MLcM82UNXrm1tVRu\n5+p+evMhE1CWOvRTDb7BBwrvCy5UL7rWMQbxHHsmyVn12nKnSb2LsGBqtagQ\nocp6gSMxc1nPQAA+f2xnbtas6IRAgWc+iDn1EwtSJJUSD1r/qGrS9Fk/3msz\nOhsv\r\n=ykuP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdEvXPbzYLP7pNlxqwrI1rVb0dCDqDRNyN38Y99BHXgwIhANabjDX7JAlrbKeve0KehHzRNg7DorMg/N1ekUJ01Qqq"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830232758_1567207922935_0.37715214482259873"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190830234648":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190830234648","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"83d78e814756145e30a7d248258dbfa5590283e6","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190830234648","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HsT+pf8QxiivQ+v/BQ+gQIpmXuwnB4NNpSaasRukY1gN7phS4XAsW6wGDbbdWw7BaKLE6NWvH1wl6uQvH6QKPA==","shasum":"b3b803e71f456dbef828b4bacd02a45058adcab6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190830234648.tgz","fileCount":392,"unpackedSize":4491217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdabZnCRA9TVsSAnZWagAAZREP/Ar39sur4MUatGnKsV1K\nyD+UHbeHbFLKdHvl2fmC1JZrosugd1aRV7xN0vMxbVnBd8dGxqdGONhqgMYh\nZUJi99am6TX90o93vO38oO/ANdf4x8/2XnKSnAr7e0zRpNgLCt0yQtYZvq8O\nXw2hVOkhykCXQIQyYpCg8Wz5iQ8QPtQtbgcbnF1rzOHlOXdagGOG60ZdVMMu\n0BdwAvQLJ/lDyhfPWjlzS1FUsG9nE0FR0GTjD4uqzrGz2CdKKehAPR9B4Q9l\nWFtM6ORHAbd4jeDMmnp10qkvM9IDZl17VJ7LcNqLk1g7TMvSjKspm22JTW9R\n05VJpr73HnqRHTTXDmuPp7V+VbbfeAWXddzzbzTLPYtHLyGe87c/6uhTHqdP\nWKD400mkYw94WYMILLXj9HP+wSJB6sA7SwLrQGQwH3l8DympP5+O9Y2dyOwx\n/Z1iHb9jk38Wa6MVlkPGl23Yspr8496l/piBLmKk+f70jUnzdlNnRStUM6kX\n2uIlVOXHucxpKyHXz+tnSIWM9aKH+U74sovaVzmfzlCn1Q0fp9EQx/Uy5ZM6\nHMAUXq7JzsqxXYPRbJ/AaA/wkVj+Tsx8ZUIZ9aCBAUx4F3sQj4G0ZQ4Yjd2b\ncDV5gyQoAAcqulg/iCeMFFw6KYexL+NvSzmpnndck+X0BF/+9SwgAEf/UoLC\nP9Rg\r\n=Uydt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEL6QEOQVpWW62cHPp2/O8t6dPYU1RCdGFDNcHxDWeIgIhAJ+zuCJOESB3GYvXt7nTx5xbhlYnkogEU4TwBr7h7kyY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190830234648_1567209062035_0.7290531393558604"},"_hasShrinkwrap":false},"1.0.0-aspectErrors.20190830235323":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-aspectErrors.20190830235323","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2168f46a41e6150d19533a665359e9e9848e4d9a","_id":"@atomist/sdm-pack-aspect@1.0.0-aspectErrors.20190830235323","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-dPbMsk6um1Sz5a9aI3j62ixOVsvNo7b3aWz6e7kUfUhGXBSChrqbLKXFGISdhtnEkezdSru6pViiA+vqN6lhqQ==","shasum":"392b684c36599ccf861ea0c0ad37ced25cbb96e2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-aspectErrors.20190830235323.tgz","fileCount":370,"unpackedSize":2731657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdabf2CRA9TVsSAnZWagAA6OgQAI3qQLQTLkQkRyIeCudn\n1DuiMpnQZ96DGrXlQIHD8smCErFb6eYosi1y528JPhuVCLgz02hnX10ktSBm\nXRqucSBekeN1cOis/FIuwo60xuNGBNoCMlG81LlD01p7LlkkuqzJlngP2Wxe\nsPviSkboNJmi2//Z0J6roQCAsAUVDWGklm+ddtYOOsqpQiOQGBKZhV2C3vFL\nu43O8FO/zIrwrdvmCTuIPobORFbfxwV3GEfJtGQLNnwFbJGTybb8KaDqWu7c\nqr4dIgE1ul/975RrigvS2HEfVppzXneXc6WJDFDOOFRRG1wsKHJVxob1s2fO\nQD1h5cXx4QxXPIyyzL5kJuXfbVSkS7jT4Agp1aJVnlM/jKkxwfI7rPippYiB\n68rD3qt25NtUtmbIhusFmmbCXbRIbaPGH2Jzjiv5R2M+3Ge0qaHxTPUXphth\nH8TKdJHFAyxdA/fXeQ2rOJUSIS+7LDLflnh5R382AZHwZkQ5W0K5L5d3b3ZL\nJ9kNzp9yIGRImB0Hx47Nrkotpmr3HIrVYQEU5JRoJjUIX4/s9z816aS9YeUC\nGfKwqsNJ/EOJZ2duWSRdiiA35S/zrZTxQvuqzl6RQJDF8kT+AplBZdtx9i4L\nuTRoK5VazL2UXPsJ1RqYFiwS36xSpRJJyqcBWyDW81Ce6ckCRPBa2xEGTIik\na5Gj\r\n=tXwT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlHipU9hkOcO3mE1WmjrpVY8r+At9KA8noRnbkmOohUgIgJZJgEacBO2kjKBAdOiVbsSWYWaFbqEKtKDBa6QagtS8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-aspectErrors.20190830235323_1567209461519_0.4874719991503371"},"_hasShrinkwrap":false},"1.0.0-aspectErrors.20190830235920":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-aspectErrors.20190830235920","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2168f46a41e6150d19533a665359e9e9848e4d9a","_id":"@atomist/sdm-pack-aspect@1.0.0-aspectErrors.20190830235920","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oI1yNYgZQioG4312ul268tuh8WXSwNRhlt9PaQooudXNEAeof+jE7MvZQfeAjk06jPINgB5NOi/DPL/YzTD2YA==","shasum":"d11a8e0f6456357ce28e6ea97c0dd856a40022a0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-aspectErrors.20190830235920.tgz","fileCount":370,"unpackedSize":2731657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdablbCRA9TVsSAnZWagAAMbAP/AwuDmfweqVbJPRVqIlP\nupMOGd6J2JESrZ3h9jEnMzcWjQIQC+uMCd5sLpuQ//4TFpqnT6wfSjA++/FF\n0ypYB6tvqLHguh7AZoHW/x3mL02MB4165z0kTfPmoLtjbOKM+dhRBcxvjyY/\nACN14PN4dBwyrPuxDakCuTKoE2TUOW7npZ3WpUKWbW0et/NmjYo6ZoPgV1WD\n26EOOSRJeDgB7FglrPrB4BDH8C+n16cieBP/xdm0XqNknhtjWLRX19PajkSq\ndi4AxjwLGhByKiMxa+NxQSZ+F8vL91kQIM7Pm7wuu64jBeFvRTpF3HNmSLae\n60vJXHZssEhcZcJqhMhfUIu3dM/wyjJAZ1TRKlWbI7KNFviQjUhfhz0jim6T\nM6zwpCkD0Q66pJFp0qNgCipCAvd+NV4ZVXCnj1wBosw73hH+YcKSvfrtvRCC\nq64j/w1SJHQmdNxBhDFpm+NLdFlusIxLGR99Ww9cEDC3E1PzJmMo9R+4DpRR\ns1/YU0zhROCAr5cF27iw26c2GhO1UKeBp/sk7GzctaQ/9WprDkXC/X/NjC/3\nqGGcSO5ZkTaAsJ8/3h5Z/AGri3WatuBj7e45ThQNpD8qmnEsFqaEx2p/Et23\nz7gaqDmJ2qIFLLoOswbmC+x812si8+2kiQWaB6kh4ToTPCsgLhiqQk5gmGkT\nZNLQ\r\n=Rcs6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEdg0s7/mg1b5jr9vrYsOT2Pnp6I4ka9hX6vuaZaWewgAiEA3txI1/0BBQ4O5KefgfDQDXcSMxISHWVd9NgY3mG6LB0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-aspectErrors.20190830235920_1567209819027_0.48661899295583866"},"_hasShrinkwrap":false},"1.0.0-master.20190831000647":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190831000647","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"03bcbb067b613af7355e438fb74b9ce73b055f11","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190831000647","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-m8st1h1f1xE5MMzpDWiGI2PhAHetcSSRVAg84wXfpl878LFkXmncJ9T5PRXA6ZEezYDlQhIwANv9FzBn3ZU+dQ==","shasum":"90c087574056bbb0c95696418e5ca81156a0b3f0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190831000647.tgz","fileCount":370,"unpackedSize":2724499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdabsDCRA9TVsSAnZWagAAS38P/23TL/gyflNyadDIU+oa\nXEqDqu7cMRZoLxiWzSJr8FaFPL6UUw+vq+H+2tkB6XUSqIjnysxL56L5Kxo+\n9UZcdQATiJME/ea4VZeAhG0TZlKIXSYNROsP0aEd9uIZFGf6ZdG1BhnHFZGE\n5OBlKT7mnjglcXqaDOYYUwLqz9f789FR8jaFEe1pSfc+SI3FuMBm84jVLK5Y\nqy3hX06sqDbjlVatFrJWPIbtMrIyeIuJiP3W/anUpSCAjcIajGIGenfZ4o7c\n5jZI28hZm+LVJTT5hvML/t5Vm1Nv2pwHDL+UwDTMeMEG+LaP+JxjrMwd0X6p\nui/RcJRcVW9OKERl1odE2eM0c5zVde1Jbukv6lXP3sQpqYg/k5kLWJ+uSAtL\nSeAU+b25IhA6vTCxhkbZ4OmuJlZPRL15pFMUx/9UllQtpAV3lNDhqZSKFyjg\no98CXKw29x85951LpOVwY6mjl1wjzYF29ym8tQ6X9sP37koeiXNn4NT9dL62\njDiBbVZR1qFDJFT9jLjiXEDXl/PdoZ/H8ytN8MWrfzEInpm4KQcATv4dNJa7\n+Fstx94jkOrij5E0fNYnxsjYJvK17aqDXg/v0B7Qi0kBAtjoIC5tRsYZq0ZY\nVjwk+s/ncW56XbfWar7NJhtiahGGj+mTA3SolV92PNpgI2BNMNMapNKfum+P\n7Fn3\r\n=dx54\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVUq07shkRdx026ScLNxfaYHkXxazhqoacqrSHdaeQ5AiEAp+dNIyY4BvTkhWHdoQnwHIkBKrcqcNEiMT5uo4nKuqA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190831000647_1567210242588_0.6158807237575745"},"_hasShrinkwrap":false},"1.0.0-aspectErrors.20190831011035":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-aspectErrors.20190831011035","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c85fdb79261f592e4582f735ec340750a1dde76e","_id":"@atomist/sdm-pack-aspect@1.0.0-aspectErrors.20190831011035","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-rFEINVxYZmgW247NcHGptoIBrDQgklVjLIZa+TZH65Asop3XYZNxqR1orgsZCQ+9csLyem/G5OC3/ifMdHoAvw==","shasum":"ac664c68d0cd464ecca843fbcf6b9cad3e6d5052","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-aspectErrors.20190831011035.tgz","fileCount":375,"unpackedSize":2745347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdacoMCRA9TVsSAnZWagAA7k8P/A/Y/2oK5zwlk8Vuqh3J\nttrwhYrJKsJbxI7z0emaoJpQ+SVA1vOcMrqi/IQJIcxzSpMGBtIuFOlnhOgE\nk+Mumec8HZLg+us4OQQcWy6gQwWB638VLMe7D0n4sT9l5gPw3fE6Fs2JGaJa\nuWKWYBPsjIh4bXoSYdMqlk6BIhALWv3Unldt6AFAz5ot3jagNo2Zu34wDoKL\nIhGm3AxcxSeWxyUOeF8XfRxH3HKxxzMLdlEDn3pa1EO/FEf58d2ReKxyio1e\nRe2AMKJ8EXolwiO5nDKvXTOxex8uODx90+I/qMgTKQ3sZ22OWCQAPh9gncYN\ncX+crvJa/09FPwYyHpHSd72dBlwD+iywB/nw2m/BOF9vduz5BimvsKq/8Q6+\nX48g/+0fSvu9mG1izYiOz7//ZUUfWK108QOcp0VUN0t8A4MsTM7fY8QFNWWw\nWeN7+mVq1R7D+Xnbl2qLgJQizvWGMk+vx0Q5Ksl/vYjpD9P1SgUlsS+I0VAx\nvRIpOdHyfbbzgG1SaYuNka4xKBkaZFowJ/8KD7v7d4eR35o+mLxFLimY12VI\n2pSJKgHFvTWEjDK+9Yt1jYgBVEsPTm9mZD8qc/UngGFLKiaaKXbiSwHOzCQF\ng48xabv+B9GALIETHBSGoMRTiuD2/jzBj2KQGv2f4vOl61m9RVM4ZOASJJT4\ngtrH\r\n=XHLE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOPrey5NKr1BCuVeFZmQAa4kIL+WwEt/vHJS29Pt0nGgIhAITqN/A74Duq5g3LxmUI4UrPr94m+oGxar99UKbo60gm"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-aspectErrors.20190831011035_1567214092093_0.5206914884738625"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190831060327":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190831060327","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830084158","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0cba68d24bd8184f5459a470bf0f12599184c18f","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190831060327","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-NfZP2L8xvUP3MS3oxm/S1g6Hf5+91Dy49GWIGMJlsyECnBOqH2f7EvA6A2j3JL6OvDItm1DZrzazVd6Hu9RVHQ==","shasum":"07e167ccfaa8f7641bd4d74dc26ad6624ea4c789","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190831060327.tgz","fileCount":392,"unpackedSize":4491184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdag6dCRA9TVsSAnZWagAAee4QAJUfjZi9h1ww4HwE579y\nPJ5yZWHZHYqbaJj+jjzLGHPTMWCUOi4uFynnckpyvCqFKj57DaBvxJuFTg/H\nlrWhXAKH3Yez8jtmsxyWqGahE8spavfxFV+S4bb7vMWvLH7r0eDc31CaPB2Q\n770LVk6mSpVs4MJSHnreg+B0FKGDFdc7o2WQVeDHBBamv9DJQiV/Ru8k405n\nWraKQOb5KnuATes2anMeNebGiqLmyxp9tD9XitSJK2nZ8YIppRZYmclIyLYc\niCNklrm5nGsExyTcg8EcklnLcsvKUCZzWQDBDNIHckdtF2zFv9ZV3bgznuwC\nftw2RKI1cSO725QJOo3iXMsZ5TlIHf+Xu3lFU1rYVklDNSAXION5JqNhHnNw\nAvfDvsWJIsYL7G3Mry3YyehPKxF1AM1ooFXm+76cx8urAryfAUB/g6jH3Tdx\nw33CWSMrn/RcgtvNobbAnGWhUD8ycqyXw/6JXVJfr0fbtfGetgoLXOecvSl0\nZhJs/t5t+OxfGsITP369dG8VVr3J3D7NTFPhSbVRRk4GlwOgHJHXbkW7d4Vm\naIgQUb7ia9pL7YFosg9iBRJ0oDJYE4YJNBQORleUvtZd2dkdOdIGN7qBq434\n9T0MlfPLVRsKG8QlC8K8QM1sQ5kILGOTXy13Lnj7rnl0B4F/dsXz4ReuvkCC\nuVP7\r\n=Xv5F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEUYxkMJd0OGPvZXAPMuqZw3FbvSwuk+YVkQ8c5z1Xk4AiBa/PFiAAQ/KxjrdCFfWvfMNaNpTekWFV22z3fE+UUOtA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190831060327_1567231644564_0.8962640026833426"},"_hasShrinkwrap":false},"1.0.0-master.20190831204626":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190831204626","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"537d53c43e4492954a5bf308a1cc319d0afc3040","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190831204626","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ywi/FhnLmQO09VEvsVRV9wi4DSCdRXF+DChqG9wbWd2ghGtDxfzPRqxZ9xJQ+T8EBy9CmyNOYJ3gCuOiXUWZhw==","shasum":"0a53483843459990dedf82a347da4ca8dda37af0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190831204626.tgz","fileCount":370,"unpackedSize":2730073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdat2NCRA9TVsSAnZWagAASp8P/0RLpcEN9Ynn8HPUgrBH\nWFWcG6Iii3mXUqtx+11XB2PWZRfzq7zM9RnZAFrO9Geyk4ZOMhMl3NTT+1mv\n9AxDG2pMKmhXWTq+itQW7SndEJeLLZpki//BsN+M8kKIuGCuT8gZ9qUl4IWR\nrFX+zQkUGd2jnnhmjB9AFXqhODw/b/0q6hCboKTxXmlXEjR9zMe/p+yW0toa\nSFAs6Mm3l+OcOCYnRPMd66+EKV2OMOOJiudzanAKMHjp85cTKJMAR7k+/J33\nY9IY8J/DfaKbXzbR0yRES3yv+TdIguIL33McFs0XObeRQ1JGYYWPBxMh5y1J\ng33ewdtaMuPvquzRzJYG1mL8IE07ikToEGXyV5Me44Fet+NONtLn4+mkdBqN\nLRs2fx66i1PUrr0hMZosspAiZANT3r7KiXoqP12QL+swWuwzfTsToWRHRwZ7\nVqh9nqmnMcxWbkb1vu1D0blH7cOiT+fjRUszlwt+uzVnMaYJ4XpHbtzGEg/V\nZlCw3s16p/BHivn2BcZbbuWxR7v7qSFaBlqoPws/WJs1MsppXcICtyt/bNt1\nWE/41ae7nhz5jB6/pFTcTau5iv2FqWkTh9zDddGLwXqVrFyzGzUYBF10sO4G\n4RilA32nNF/WF5JKf/xivDBfe3zcIZcA0y5WnabX5KnQOYLmC+zae8w1sLv2\nL2wc\r\n=x4sq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9E3C97SqYbK51M/HrI4Oz/O4ihwmGjlXJ0JgAv6UBZAiEAm+oyUjS7iyJp1btgq7IqfdxWdjV7XNnNzg2Q6q9EqoE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190831204626_1567284620973_0.16266124919798397"},"_hasShrinkwrap":false},"1.0.0-master.20190901191108":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190901191108","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7d4bec3ef916dd41e20701babcaaafd60463d11b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190901191108","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-up1nwTs/4w4gQz6hCnczAF8JGqW5rkvaq9s90jqi6BxCujAB5ynQeTyUWMyCYn6wNaJz9FKnT+oBuVSn7H2+wA==","shasum":"e9fe22d004e07161f2948cdd3666136342b92374","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190901191108.tgz","fileCount":370,"unpackedSize":2730521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbBjuCRA9TVsSAnZWagAAthIQAKRa/PfUvIeO4E5mchGL\ngdP1pVsn8aah+1LWuWFdXdQNlGvaIW/hrGZWbVFa1ehUvI3mMqZ8Y78rUZL9\nOXFrtc2jSdIRhej2tnig0VbJL7ddavYRcwFxSgkakAa14o6wehLrn0W/SPY3\nxYHf+W+YfaOtz9eZ6/O+ZYBn+H3k4oc+ObKEOTM40hUt3r2SwPsIn267U8Cy\n3KOAPNOjD3+Bfl/Tn+zTzogVcGvaD46VxpJm0b9XlSkH97GbFUgXyqtuGMXB\nPeXeIpBraw8u/FYI2aCpR3JsrOaJp7Y0LYncDWtKwjK4I/bbXexDwDBAFI3C\nsvMv8Y/YDUYqwtE6cfoihJJYW8rc2Vb7cYaxF94RZIDO9WaWNfc+DQFO0qW5\nRX0w/V69W3h1eblzvYXTYuXXmREfAQKn9+PXvtH9lCA5EP+0sEVfoCVL7ylD\nAK865GWYfuoB26gQamwKPZ4IHfxfgNg/tfc/e367RIguSfciG+Gdz+GrRgvg\ni7w4oxRLVkGZIQgtTpEo7340NtxHhRSwykz0eHGtbjHwXy2BnLDXWYfWMAlA\nYAXiR1JeUizCeZ6K14kH0a9/cC7dItdz0UJzEehHzMoRwyacFMgEe9Mu29SQ\n05DgXc1KRXhJaMg0uIeddycq2ww0PfKuKAYpLfKHWKydGPoTOOY0o8RThU6g\nVZbm\r\n=OClX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDtSYybIOH1CO/g3hXjj4NCG9vBWITXqLhTAMVRIV3zgIhANBjkNI8T6rhKtBMMc8Ydtbj1znULOAYvagsQqvXCPNG"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190901191108_1567365357652_0.46663585308165234"},"_hasShrinkwrap":false},"1.0.0-aspectErrors.20190901211149":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-aspectErrors.20190901211149","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-master.20190828102730","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b1b56a93c5ad99adfe3edc357c9f3abba6c2dc0e","_id":"@atomist/sdm-pack-aspect@1.0.0-aspectErrors.20190901211149","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Ay8fsUMOWssY8TulrxLl97n2e1ojIer6DFmE3dZCZASoi7wxIpbCDA8O45rIQsNmleeVXel8lzj85s1tV5dt+w==","shasum":"77b826945c866639fc5145bcd8813e466b02d2f6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-aspectErrors.20190901211149.tgz","fileCount":375,"unpackedSize":2752530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbDU1CRA9TVsSAnZWagAAgEQQAIpppsVjgf2I+1zW8knO\nP3WvNlEq8jXyDgvSyfw1BklwNpg4aHgiK+wMhco+d+iiLge7YogVjDGJNCbF\neSstEy6GRinBCXtQsdaZgEKL/ugjFWOVzUftj3HfJs4vCIA5YJDl9s+s6hm4\nTcAoerDv6SxQBnmX5/OWS9mequuwLj1ESOh5Lo+1sUqRS/4nAJ8Ns4Aag5O3\nEJkRs9S9YhB1rZsX7h991vWiDdq9Q/rg/k3lw5b7kQgS0I2d+WDoUoYpcja5\nfkWITS4Ddb/6pAL8rktX05iX5txZMXzVNugUdFLHSA6G3LXGkOSzpVoqvuiU\nRSsoc3bkru/Qzn9r3lNkb8Ww4D11/5T1IjxNrt0yq8i79XDbqqA9UdukCVVm\nlzEXUZqfWV8IB6iganAEzGEPwzn38zHRiTGDxefR53fG0ueyd0HAtmYzQSue\ncWWQICutQTpLJ4joRM3sLbkzQlq1cevPgCDikYz6p32+klCK8mVA9IDvqUpQ\nPhKDHUqDi+K9iLLO984fqTJQaMnG6dKBlfdyjEN/i8Q2jPvyAWO6/z98wI2S\nge0MMEXIxQpXIxqIwCLQRjUpTaTIxJ60pKzGxnwAs+1E8t9RXweLVK8WBYbh\nE58BfxHtAYY7Txe9JPVsiUzQsgz7pZmr/puVuPsMJtsmEoZS7xcRurol6VeF\nq/cJ\r\n=20uA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZKvkIRjlp5Jg74atL64SLfDCz4bS0HzYoeVhxhHL+EAIhAJdUT1OksZ2xL6GmOWdh6GlDJ+yVtWiTrdG1G61TKeIH"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-aspectErrors.20190901211149_1567372596454_0.8290417977543529"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190902184809":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190902184809","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830151145","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f357bbefa63e5c9f8dfa4636cf4283ddcda2dee5","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190902184809","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-JqwNWBeQxBzDvDGm4XgluthzFH0lgkPEQJOMK+/xCG+egfATFRmAvQM4InEIGuZktX/VjldMUO/pvr4Ecaql8g==","shasum":"661e4391409417db4d7ce4ba72170573278ad109","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190902184809.tgz","fileCount":396,"unpackedSize":4499263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbWT+CRA9TVsSAnZWagAA4tEP/0V30VyCiI2TgASQ5btn\nQfIf5bUFKWz6p4oN9W3DjMJ6K1Of59uGgn5UR7oFJhmcu8VCyre9Wm6Kth9P\nbnX50O6uHRm/sx02P2/ABkgNrtRurWIQVrNbCkeKLSnz6EyUCOWjZxnmki9R\nKGHf0RaR8o61SKBhRMoeRgH8Glm3zZ7/DA0piKwg5ysW6pq8vNZhiLvPzuZ5\n2JIg+SGOitDA/+TNRkAbisOMS72u0+aYNt30Amsskzqk7f76xd4oasTNdJV4\nmzOcAJtMkPlK/6m9/nmZUzLvrlwH3o8tmd7SsBTUkSkI/dXxiQbkHp1pJexo\nRiKfnfXb+XN1TxbjT4OF10Mw2GbTDX+PECMimDZTObd3IUZj7W6jZ7nKG3zX\n1IOR+rfXno9HnkM/iYN3r3YERkuDoJio7xWg1PXU2GI1E3mE8rzZcDOwKUMu\nt2lKIcigv1Z9DpUvtlzEl3x8O2xR2vU/XUUJYW/5U4pncY96xd4nOGFedT+y\nBxRRTiaXuvr5GGsdLLSu2RjQfDGgHkysF/p+4hAKcFXnf4+oA2P4MWT/At4P\nxcKHxRjOCcOLw1k7gMts59NmRfyEQuPbeE3mqkTBgPZ9/8NZZS9+M7W/q0zZ\nDbJvsIQ757Ox6XK6N/zrdfbgAWYON6yumzMffxemnswHvOxE8y6ajJpZlbOo\n54jZ\r\n=W1FS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHCHWPdOg19dxBp6ed7EbZaM8M9nh/91GbBCdFEEtvLwAiEA+lVmkS/bf7a7PShzdf0/6BmmvRep67q+dfcB8RMtrOo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190902184809_1567450366183_0.21107012534251846"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190902191235":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190902191235","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830151145","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5cc5be6cd90be53908ede4b58d17006bce208dd0","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190902191235","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-vVuZmc/0B/ZlkCYzXPT0cSfTtenX5fWvWltGGbMXfaAsl87OEx1kxJPal8aZD8M8k7iIRD0D3pGNO2aIzuXHzw==","shasum":"d20b92fb4ae1e18a50d77cef308a0e0b72cbe2a6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190902191235.tgz","fileCount":396,"unpackedSize":4499279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbWqqCRA9TVsSAnZWagAAoPwP/1o4CezpypFLQyZSBOZ9\nteShCQsTEKBl/AcjDgIQ0kx9HOU5ZcFCyaO3blDfFyf7+3W+1k/HJQUBS+J1\nrU1vjoWtvr3fvgmQxLEoMYum5tScdcuKMdI7P94bkHz3+bkLdEIXt8eRl/rx\n2j0G1E4NvLoFfWaONbVwRNMwChtktlvFlYwDwbX3E7jSWOMp6tVgBFxNSZZj\nO2AggpgSGioM9+CHRv8czOKilt/udDPzAvx3fKo2AWezZVMipj36sYLSZx+b\nF1WAh8HMZPJjLKMs9AUfLP6usigj5T6LYM9WehNp5w6u3gS8x1GvTn+bR0wN\n07XEXBoz67Vh83LuaxpG3VdR5fyCdE1cmxYt6tIfPAOQPec+7fjhF58Gxyyw\nesAtF2JTyGa/i5a+3zIHIUWFGYshocTGm5TA8E/Z/INUwXZbXRRYjf3S/5+M\nd91D88ny+TeEhxkOUS/fHyN0f0CRqpsHCyYbtuVPRUHO49GCH9i8Ee/surBU\nCWgA3dMFOaJrXJTgOxiRDVydcmbJFUZoeuiY4K2jCWR42X1xA6N1ypRqN2fe\nNUo8KO0LAaxfIGGRPOFqjYjbZNmGwYBWL0h7iOYGxchKu9PqkX2CCr1xbo/p\n2FCa8RezTb+o0WU0VRE+DxVHSd43YzUdIZI/r+EawpHi6Kf3JwVLHhJyKPIH\nHjg6\r\n=158C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAD84eNu/J4M1N7xEyxdyASBXPRJ9PMJvre6nWv4X//fAiBuPDYqCz/7u2M6xYsEWAiGnj2nVnGl/6kptUrpBZhyKQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190902191235_1567451817509_0.4681496930707607"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190903063454":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190903063454","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@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-fingerprints":"5.0.0-dynamic-aspects.20190830151145","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a4d6ac7e04f7aa4995c6f3e94e867e03fe371c9a","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190903063454","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HvfhXrvJgOltVg0NvZ8y72hB9UF2Scmrksryj9dYgNjmJmjMRD3fPyTP0RZYwyRdGtW8h0+1ZTie0vGFn/+H0g==","shasum":"7725988c757f60f9937ec7df819357aba67db4d2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190903063454.tgz","fileCount":380,"unpackedSize":4481514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbgqSCRA9TVsSAnZWagAAdG4P+QDquAet1AeqAods98WP\nNKKZdrchqDLz4Ua9U3jns3acWzgOPsxrVy1WXWkOAfqQljJnbzj5RETQejob\np2ea+5IVb/5h6Txql1wnzlyhZOSpXEXfaeKQ8HIJd/h+O3WsbHLOqwYfEvzF\nWi8RtRFv5fUvHL7l0yQ4YvpkLhtobGRwqCg0tkGyQLFz6/1mx5our0Hwtn9W\nPq4uqR6pq+oIPmc7JZnNjpAF/ddbgzPYGybXWqqb26JD4UIvSOP5o/JaF/Nk\nzZusJJr7DLneGC5tEaCv37ZqRXELbpRPLoJnVnPQdKGJbjoqSvf0RmV/nv0y\n1K7ryfQVQm0YzGuUh4EI8sp1yvZt9/gk0Ag8hqUrTYXJIAlWrczgOO7Oj2QS\nZrSyUFDbh5l6Tew90aLa9omNf+s/deJW/CfZ0/dKDyatwXAZnuBOhA+DuEPW\nhHpgtu721VHL6FxcanvEnQBl+6Dw0KPTVj/lSOlm+5xM7pGAYX7LWfimOfcP\nOTZGA32qxukoBdRezkp6+TW9Ex/Uj5PPPFhYgCfgR0he8AfhXOwWCUM79Tki\nLVBemlAV+gvomhkgHBTZIe5THq3B1qanR3M4NwNXFrxqtpGU3jUfIptQ0a1C\npY5KJvlKzIM1DFmvkONIDNOUyoz2oedNuEwJLcyOrqvkbZ1UweNcGeUoc3Zy\n00fU\r\n=uonZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/U+j8yPfkBgmtOrKrYMe1YTJ1zRbdiTRZDlX2x8GOagIhAMKGkhnZG5RAwOqK1Mo3C6Eb+mSJmt1FWB+p4T3n4cML"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190903063454_1567492753707_0.005713398806685088"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190903064840":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190903064840","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"1d458d88ba85f216d9ded42ff7618f16d98c9ef2","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190903064840","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-sSD/BHepkWhuNMYs5SdtQ/80hLkZMf23C8aADBF/rPUHoW64/DflOO5LGCiI/BaGc5P7kUlg8XKqTOz4PIbtDg==","shasum":"6eee98832149cc57a9b30da8d76545de1a4d292e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190903064840.tgz","fileCount":380,"unpackedSize":4481415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbg3wCRA9TVsSAnZWagAAMhsP+wc9TGxzh4TRnSt6ptor\nVgouUxPlFE1bLo8HWUW5mqnIdGN4v61mThSGPsdqXeqrRwwZ4enGU9vK9KXm\ndiRPfSm+wn903GhuSHfAAQjTf/ArdW6GHabuOaB9gmVelRNPadlgRMODkym2\nOtfPpNSC27ZQ6lTl1DSkwg3uWtrulqZDp+nHscSV5BHDUOWVTD2sSjtbBDII\n1eAIApXYkSDX494OCrvv0XO3xHQK9ZwRHkcWagITl81nWEKIZ7zJXI8TMUKb\nQnkAsGx9Nsjc9wKYU9lYBKdv4Ga8wkIUN9sWgnRLG/cbEToliUOeEfLs8O3y\nEE7jJKoUsQL52eKMAomlvP/B0Q6Lh+NiB3z+XvhUH7gkRiwYj9MH1OkTKjpn\nc5ix6dicAoTfAyzjYYry2wko/xUKPU2KI4A8/DgM0lRd5dzOJ53MdbC3VHWo\ne6PHbX6eMMY6qdVLJaznucC2Etn62X590GxzIMmiK36o2L/h2Zi6PeDDPSY3\nIU/GuwIbsmDQHU5iNEicRI6sB/lTsTAFwsIybx3yp1vsqjU/rmwS/c4mr+YH\nvP2uoWqt8H+suoKeRJ7SFPb35KF5N5By8u2UmXzRdh8/35TL33wxSe1LYdqh\nJCezGA7duJbTQsrxQr6kGt3jIa9mqhpLCdu5sbJeolkhrbPE+rX0TmX32Hay\nKU01\r\n=LWOP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmoBhYJJeW31MZrXUhLvX1n6/MZkn1RoImJ4Txk9ctGQIhAOwo3u1hNSX+D8lSN9YPHUnFbWOMmMc+N0ZDpJNtqdqV"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190903064840_1567493615407_0.5758884689975501"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190903065331":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190903065331","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprints":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b11ab81d75be92bc33537f16d168bd669f87f3d3","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190903065331","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-I4fy6NN2nXYWQUmUwtla5vBqnVwJcqRrKo2p5IWpxxpKpPHv3TxtN2S/a4kUhLOsko+6O4delq+xLqAz95Vm2g==","shasum":"a3de0cb5d7e91627975951a55bbc5f67cdebeed0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190903065331.tgz","fileCount":380,"unpackedSize":4482132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbg7/CRA9TVsSAnZWagAAqZ4P/2fCBYPfFATFsCpEuK0B\nUXZ+UEhlB1l5aSCfvNKKtHqjH04GSKC+qlDj/aleHWpT+4YGXYquzE1QeAtn\n8xRlnntxoKubANiGBbbvWmGPnVSTmuWKTfzZRg9ZXrjO/4/3Whv1ml3Lg5+V\nbVgoDYKJe874uNS6qJXkBy71DqJ8M8tULrsiwsk8adSSj8qHddKAvsML5KcF\ntK2Fum9Emt5JXKRDkLkm5skCzPqv0O1lORlKI69ueeb1XfRQLCAPrmC4PbgB\nobxpElEq3iXJllrrPXBER6nYBseAyn5rKmgD51nFBm9UJJOeWZ6efc0kOdGO\nCY2ukirElmcsxeb+haSGkpY4qiP2jeWAVHZGn0Po1ZnEX+pGeHDOYaobzjUr\n9E+35hYiFgNJDorwbt/IRMwNzF9OZskaDB2aathpn97b+yNlUWdAm94czle1\nbeMvLDbERIfr6+JFa8c9+Wm0kGkTztCrujvyQ25V+7nvUpYBb9KVIM9tCCYm\ntVX6qjQ/3voVP1WyqJo7B+n1xIMTz4gqr6wxPkQicCypIGb6qq0bzSFcicQQ\nUaKmaH5TrVaihUXP6zMP7Xj+KrosNFDzLJM5qrRerhMZ0ZT1jJ0ai7bblOm1\nhmyObfzQFgbDQz5IcnBfPalyrtqF+h0hcpk/fyZ2YSNG/+xp+qznEHqwLI+D\nw2sQ\r\n=fBS9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9O8ppzq1Gxdjio7dUMGUTCj6sGwzVrn3Esg4JHNTCuQIhAJnDAHKNnFpCTdfpoxSUIIb7EaBKZNFv2plmBY1pBL92"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190903065331_1567493887075_0.6695194989061322"},"_hasShrinkwrap":false},"1.0.0-dynamic-aspects.20190903070215":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dynamic-aspects.20190903070215","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e7e757c0c10a4fe1fedad98a813a85fef02508c1","_id":"@atomist/sdm-pack-aspect@1.0.0-dynamic-aspects.20190903070215","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-c8MqacdvPsLnY/GGv2TnHLroL5nyAQBeKPMzv8oSf4rDJqbfnFWJ4vXyzhu/f3uiV2eluvNEsFrjn5jid3oB2A==","shasum":"da7eb809e5a86008f7ce48fec3af5e66a0b616c8","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dynamic-aspects.20190903070215.tgz","fileCount":380,"unpackedSize":4482131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbhE5CRA9TVsSAnZWagAAB3gP+gLaYQQfSdtRoCLgH9k+\npKIVVnST8sJZQKihdOXQTvum0ECYCmq1onqB4hkN8Eb+Ir7j2paNzqrN1D8U\nMyr35Mj541frx+n2My64I9r+IRmPAgSDpRiBLoEP+hK7ShI7q/Yt/r4Wy5LA\nrXNMkwpssLhd15UxggdVOPCRjOBKhjZNlanQ6gLIs7mT8iEpjzvDQ7LtEOSi\nXiYLnYrbW5jjLjG5PrztMqVH89eVJpY4Bywz4UcLWv3rwVAkUgxIryU5+n1W\njkGf5j8Xyh1UJ1olAQ/jD3y2Mm+JI9lNrhXNk/q0tuo7Kj/owXhsjYeabEGk\nkjv5q8tkY774eRiNJaY7ZGkRYvW+BNFdcgGKbCzKxHGqNbRyxtrthjOHz6CF\ngqr111ZKoW+1TVToEmn6MjBZoZSBpTTiX6xRWSaP+cJgGE/HeJYs/SRUox9M\nOmZLICCIZ1BiL7G+4RnZKmHQhRa0AoetZ/LDJSdQUTGSGqFMFC4pkapcJOKC\nk7WZuurEC4z/R3q7E7wszbdYxrh6uqkRcMRZsdZR3FQTNQ5R7cei03zkqEDs\nIgV3NxUHvooIOC327CBwL1pe1FS+eYyGkngLMiYt6A5Wb2QFG/1BK7Iy4IUe\n8TTfIQKgOf5uygPyag+CV8rwSfOUkyfWwimzh+ItR3hpK0FHiI84dcNuYOlu\nFIK0\r\n=70jr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICB2HQKKknccwiCPzCKBJugMT/+Pun3jXMmYMnujvHShAiEArSQH5VEnLjS7IymVqPqL1h2vMehATYX+5RJlDy7mELA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dynamic-aspects.20190903070215_1567494457101_0.17987992784510265"},"_hasShrinkwrap":false},"1.0.0-master.20190903071152":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190903071152","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e21233b0cc41eacbf4b9aa421322c7c4b5ecd9d0","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190903071152","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-3YcDRmS9ALpQF8RjxLvgRAXKUkpJPBJ7K0kSdzsUWLtlMuIYQL6aGR+eflcM12aJj0DvMpkklQAq4dSVtenWtw==","shasum":"5cf8538cd49a03e67526e4f7643e0d85d6ff854f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190903071152.tgz","fileCount":380,"unpackedSize":4482259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbhNyCRA9TVsSAnZWagAAQzwP/3VtyyrsCEVBVj9pm0Qg\nuQ12/Juc7g4jMx9905AXeAqFsRrdfhNd5mPRdn7irkiq4HWFvetSPoZL5xFs\nuLBZAjNEd/VtuC58eIFsxOMOVF7areBZ7BCEkuWz14tX06oIECYtLpYy+zm3\ns80bnMX0zIuv48uivtNFjb50/iOmMCyB+mRzeHnc9fZYbmkx0+n2VoZV4SMp\nZEBHjvxu65Z7T1zP94QTUaX3ROfYFvkawgGWbOQIbXhy3lMNimEHya9fqxWj\n67pg8Rzs4HikxoQtUQW/KgSBe4yR0I99sUfUMLMQrapbkiXa5aOl4frj4wKj\nP88A83t9yRwRnRrCZPSjHQ702qTi/m5pQtzx04tZ0oacfjWWx5niwiHCLVhW\nydv3NbI2X/IrzeAfdGQKV2PjBtSdnUoBs9kTffTnfIQztpUDmFYGZLlfDMQh\nEcwWb+e8E3MfyBXYdb+AiQiliBFWYRTAvACJ17cKLSEIlm/XtHphguk0LoG0\nOfqafvx0AvBuN4A1c81sRe93Wa9S49aO+WgXhdyxNceupNf7Jg3cuoP0wam6\nC1hZjlMjtJFUfBQ1yxR2wtbWBcv41t0hxM4c52uuXyhNJXa/V6aM5L+Zj69i\no6XcCqasoyyxJ37JHPTDepjKPOadeOjLdNPzFH3m0TDyttuht4hr68nfTEyi\nBh+S\r\n=neYH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+Ea9xC5AOhXv+6Ona1gYUZY4auhIMHaswd3GqdC0nuQIgIEElqkVmKsydJEhdevTzWHjJOBa0ZfgHyvvFGEbnxyM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190903071152_1567495025665_0.0207288961649299"},"_hasShrinkwrap":false},"1.0.0-master.20190903071348":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190903071348","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e21233b0cc41eacbf4b9aa421322c7c4b5ecd9d0","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190903071348","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/g62S5PplhBPvuJgceqUO57GkZmgZKxaolmbC7G7g0Lml1CtsQadh1Hd5t0lUbiinZfcmUY7ABD2vS6oTzlbtw==","shasum":"86f7c6807937652fbf03c0d8f3bcc30d6924cf80","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190903071348.tgz","fileCount":380,"unpackedSize":4482259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbhPCCRA9TVsSAnZWagAAZ7sP/iRxP1etrGt6k5iScwZH\nsc1q7wJ+be7gTWDxdrAsQ8j5BBl5WCa9nMSUuaN84Nzb+PDU5HZW1aOPWhjO\nImGXjFKSrO7BoRUnT9m0QWVahnk5c7o6JOp4VB8Ko9GrqF6VsVrVJEXDDdWI\nZspwpJ812hARJUdQNBZGbVhsCYBBIDCcw1yhiEYulwmQjnmL4IZsw3Z/awV7\n6toD/GyfUOVLPyia6llCCeKjlFfVsHBvBky/MByMjAr4TUTJzPxozPgKbVmM\nPEnDEGzakUF0wRGFSmztSvnr92/+W6f/DZrU8PUTRC4qL00vl3ywiUqV91xw\nZC8vDWRxplEFVDKaEuFDy+wg+5WRn1zBgCW/wp1REDSG6cXmh8gYXNrSIR4R\nehyj3EJFIARuFPi1j/qA2B3AFQeZLPwnijUcmI0IaOtu4XdtYWNW1854yIv6\nKNLO9ZUxVu5WH/kwE5s2lfQMJsLixWE0zplUDH7lEBZJ3EIFgXxp5sViZPtp\n4pKFjdEAmxWXXnu+yV/z8ZOq3454CqNueXwQl/CLfWTv51Nx1VVOi6VuAFxF\nExmnxl6m6Jkwg92mH/2i9Imw2LsP2lv+SqTzWqUFFr2O5fVQlHtFuXd8/pmd\n/rJyrp+jrYWAQJn0p/R0Gj4waqO1F18oOvLALmMg8GUIV54Jl0CZNFDW9Z2n\nu1WX\r\n=/i6y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAVb41cI4Wn2uvNnNjTS1JwXCZCNXOIxQemMnhkFOaKDAiB8PGS1j+WG7lycqxi45Zz2H+VGK5/H9jVQF5bn5Sa9ug=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190903071348_1567495105367_0.4547651385461615"},"_hasShrinkwrap":false},"1.0.0-master.20190903125234":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190903125234","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7b2726a0ee64138ac39a3ac891e7d2e8d038cef9","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190903125234","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Hx8JB4HFK4bjKEzsXehAR2COj4kzF9kyg8mJEcmv8kbZujDcmEsasB+G40kPpaumgSy5tTzOY/G5a1HD79ilvw==","shasum":"be9e674bf1b100e9163a509eddd8c273abe29a91","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190903125234.tgz","fileCount":380,"unpackedSize":4482735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbmMDCRA9TVsSAnZWagAA6AEP/RQs4HsRGnoQ1j9hYlmw\nj2uF24/zrRwtdCAcS+mEsyb4YGytRw4/CLV39kshuIm3TXg509MT9G//kxIT\n1q+FEWn+XPF3UVItxU0CrHDdBjg4DHYdLX12PNn1ExFElLrvtMXn5jUOqBKR\nPCyTjEAVD03GHXIwrAYpi1xnXxHiAjBdFEK2NLh9xoc/CIkLqD0hz4L8JMqp\nmjR8PlPfHq6heKORC1HyYUnjysc5RfQm0sc/7xzEQKZdbm+MKxRFOaceX5w1\nKe0i0+60+dHlJBLUoDviTUTXHhSbXwjNgEOUyLAn1tvHtIv3iloPR/m4VVuW\n2av1/vpNNGYUnbHISTJSmMsnktnFHw3Y6HiVmD9enulzP6FNDCTwMZwApIO5\nFyes5oaf+eRjLWCeyxpLZELEmLtlPN09GhQWwGOvd4xgcmzO1dTdDclVaR4R\niO5t2UXrjClnw2eEoE6S3Fi1CTRmrHA2oZQbkiJLDjX9dpuL1VQz82vW/uSG\nnvbX0qomAceO3itfCnGMR5EOlJMPkR1SORkdZePWoJEHTBHEi6rHv0k/4DZa\nAucRD928RkJ07n9miJCHZK4nGM2wEhWriinWfnhSzv90Nm7hEBsTcp7wMID7\noyLFs94WsLck+9+Kr2xXxdpCfFj+fjvas6BxRP58myUAhJleHAYucsTcR7FQ\nJIK0\r\n=4Cr6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDqT7qQoEJdBY10lbNYCyFSdW8FmNZV62++ETUL5MFzYAiEAp3utM2VfejqwuOP7NUOYCMENT+Yj1ZFYbxyM1MyaBds="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190903125234_1567515395264_0.738273476621311"},"_hasShrinkwrap":false},"1.0.0-master.20190903202714":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190903202714","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7e19bb5c137882685444c25908342096ea415c12","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190903202714","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-DmzQAry1kIrEsAYwe1vk6dOPM2kYLKdfQcDeATzHYlt0KzDhkzd4V+6HQGRTSYrTvFmSyuq+HDAyVdhplIPEJQ==","shasum":"c95ca984f61f3f3b886106d6a47635658cb562b3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190903202714.tgz","fileCount":380,"unpackedSize":4482777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbs35CRA9TVsSAnZWagAAL9AP+wcWCXjdKGTEtuIf9vjr\nHtYxGsYOqVvhE3bDGE7hu75NNluz8YBPJ8jE0tH0cCc95ncoZTmwulviWa3G\nI7m4iUWYkolbVbayv5chjRRjC0Sr+lGBaCly6wqGXWsfI3OGXmGAOr1owTN1\n3NvxxbdcOinNTHOliI8YDpx8tXfJeXKO1lCh0ysOSH9Q19SNzrxEG+NkACq5\n1VlAGXXl3tAykGRaqs3s3G2FcZVznAuR7ZYj6JcmIwFvyVP1CsiovXUrNNh6\nlwKKKquXDsGQ4Mpalb+cRZ/168AW8lkd/7M4rrA3k0qMobGglCfObGP18pV6\nMskg5xDt49FYLp0VKNwTxBzKaW93OuXWTryfbCH7ojzSOQugV/JuuK93U4wH\nnDBwlqA45HYnztqv9wjIeVR21r3+msJeamlax41IXJw8dop6pRq54sTQVuM+\nz3CpoA+sKSzn48iBXG+iE6YJ5PcWRpLTDQxRi7+/0i02A8XYtoOI08MERdYg\nbb0gJZfjv+g/UOnB4So7VbDOw4jbEvqOjJn05n9djsomAz5XXl8ld9QUzqCO\n/DDRHUyGjy7CwBgmcRI8DXdrjIMA7a8S4yM/t5nu01spmwhSvt8WIiVlb7iq\nBsteKu7Q7LqPQCuioP7zJ/2OXu7Yt5JKPnRRB1I95fSUivy18sy2i7XUqKRs\nK98j\r\n=snxX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH49/eHeIKdS6YxAy2iAfQyc8lpvDvs06s/YL04sQi/QAiEAvO5fsPuEhy4+kP7PJhUzMv117D1hJD7Q9DcHsy5NZ6A="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190903202714_1567542776224_0.14946606975001897"},"_hasShrinkwrap":false},"1.0.0-aspectErrors.20190904181849":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-aspectErrors.20190904181849","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"85d759b6afabaaf45e10688b3c0036c50728d655","_id":"@atomist/sdm-pack-aspect@1.0.0-aspectErrors.20190904181849","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-2kT7Fl5zYTvUv7mP2ENWW7pAqbC6aGYG8uyeoGE9aO7L+TognIh+Ot7UA5h+JlQZrMM7bcFWgKLyyt+3EoHMnQ==","shasum":"346dd7a4b3d8b46a4d2163c40d9057b8796157cf","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-aspectErrors.20190904181849.tgz","fileCount":385,"unpackedSize":4504786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcAE1CRA9TVsSAnZWagAApD8P/R2lr48eV4VC0fOekLyO\nRMI07R1sPHXBhQC/4fxAKJT2N/vIHqAxv4d5nmMz6/P7aCSzQetD25R0PkRC\nffuEylU6bTY8DsrVdManBm6REkRLgecKjKsaYVS6guawYXW7BQWjagGgdyes\nRpHVZm1+o8sv0F5MF7F7dGnEh49k0Bqa+ssyXTGJRmjCbxyxzm2CeTu8ArUl\n3VMD+ntuzFBRsG6GHwb4ysiLB8Kvdm3vCmPGokPnnuLggWiQtb2QBDWW+ZkW\ncSVoAAnkNM8ZWESGqzf8Y4cuAJ2+AkhZiFAFJMeYFxchpVf+DOp8acvkVyzu\n2g/S9WwTEQ03e5J2kPfFsbHbB7Xb71gBWWUNdjySjcT5VYDYmXagviwYH4n4\nnmsdc4s5kG/KpHD3dk8DcYZgeUIpv6rF8ZPrMp1EYinewYC8IzCRu6pnkyPO\npzeKr/lh9n/WmRHFv0hYGygLnE4JGUGRwxITQVVpC893bxv5LSwin9Of8Qhi\nNRqm1d9ddpYIHG5QSqxlB2fDEoqGWmqs1JJk/p7ffRqcfQP0+aA+HUsW/SMU\nZSpR+tDK1E89KRJhTxF86i+sS69RGDAWxxm6DFJqbakjcC34462ZMIpBKoW3\nH0+5Yoe2qmI38RpQRKFXvwy+9HYXkTa5W00jMHpAqwRdwVVVYc286ow/UnE8\nBdko\r\n=tK4M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKtkaO8b0F+6CrieDSheiPmEXci7SviGvM27Hv3rsplAIga7MIcC0amKMusKnmvmREykn8dTRBIAn4O5CS71A93jg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-aspectErrors.20190904181849_1567621429039_0.09437546333644264"},"_hasShrinkwrap":false},"1.0.0-master.20190904204232":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190904204232","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5974c957cc18cfc2168481759596c122654c3313","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190904204232","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-z/7PvvS5Xtqr62oM8qdRXtUOH7WWbyeNGh6duXalPjnsIClIZLuEHvRPRoi/mD7eNsCeS3yCLSVMm21E0U99dA==","shasum":"f0b33dc7cbf12387f414e3477d87aba8542168a3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190904204232.tgz","fileCount":380,"unpackedSize":4482824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcCLVCRA9TVsSAnZWagAAG+4P/3cVFhbrrg4LEpQF14iq\nDIggxn4R0xzq9KcFk78AaYzCM2uYEHO0K1IFaX3cFNoZVlDlwxtG21OSgiqd\ngI+VjDtirZbU58GD0ozQrXN/dXBPMT7KGeIUNweZoT5mr1UT45tpE5acihdl\n4Zst8lbW9fKVcb6dBzXJ4GMdI+FFc/qv0MxdzGRC6rHJgd6pJ2/kRO78h0yh\niqeHrJubYew6CjHEHNfVoEAQqekg+Ll+fTdesUfIXY+d+YOjfYgYhR4myKkd\nikJCLbHlRhs4tkFZUzDszL5ZVRRrj4OtGesj8KW+NOT+v9tHnpSFqqDbq6YP\nt4nRoYnudHTMJlmrLWmZmgJq+QIiJoXXi+3zZR/rpWIcwew8Xh3FZAqMA2pP\n+NeTLDchGccUgR6qGhe15qnPDw7McRw1WSScUdL1L4+ykoxQLxEGE+YjUdJY\nGlxUaY0d3YXbl/G32ceiEhJh3fwbFe5LN8OMGjEZthWeYuAgIeuyUdz1Zlae\nveKbbTIqMH/cunB7QfYK+4zZ/SjbPDg9sialNXhfXaS4+NI+/bi6JK5VajMR\ncF95+3jUTn9bs8OB8ZULz8Uh4fBySYGqSwRBzgoEH1G9wkQSj8qZmFpVcb9o\nxyR61GPj4mzl89SGXVO0jTGOb3+S8YOnDBmMSQT0N6boLMms0dRqrxOWoa6C\nFZyK\r\n=4XsP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFuC/yqyNoPxIDI8l1CqyajnZVs20Oh4h6UX7M1217GAiEA1SnTP1BHQMciLWzx2VYFqLBpzZSdCmtmycgiYyzTH84="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190904204232_1567630036443_0.35718944759246973"},"_hasShrinkwrap":false},"1.0.0-nortissej.returnAfter401.20190904233404":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.returnAfter401.20190904233404","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"1306c65587f7c8574a7c797315c89a04ef8fc6cb","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.returnAfter401.20190904233404","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-mDWGUhH8Vg8ArIywK4FeYyVSj/EZA4QR3W0pw4GzDPrV5txJD8vIF/fpBXPCEHr9zAftnAUZ/OT6DGLSiCNvuw==","shasum":"bc625743628b456ba62f3cdd00dc0d9c53448d32","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.returnAfter401.20190904233404.tgz","fileCount":380,"unpackedSize":4482852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcEsoCRA9TVsSAnZWagAA2RoP/1/BAIqFvPLISAH2tUuL\navAKitGYUzM1LxYUowEjQNMbZeiScUg9WHdXVO1gnWdt8cvtmU3sqkfVpxlM\n5YrFViBONjb30gixYkrFP7wwiYoedv9E71nYesTcJ0ePCXqDfp26uPzBsQSq\nsf8qINAhuyQa1s9hnUkIZ63i4P/iLcHIA4AXEc94e1IBt9MjAjAzh1wbAxje\nwZJLGz4/45wlgUwVKmWx6KcPrhEp+7w7RBz+kK/O8X13HgioowUT9VQL91/L\nXx156L+46Bq82nzZ7wdE2WPCJkXNDVEOav880zeW9TgI5ZFE4qO5aaK72BeO\nhvXi3CdgN+JFIh9tdTEykgOWvO4F2M1WQgkwRjnvP7BhPFvKZ1UN7vqrIB4k\n8X3PSgHfp9N0b2j2G/Gt2kaCzHOa5lSbEHDLI75kjH9P3NlrgO4D9gm4Z+Xa\nPm9lj8PgXvCD4ZB9Nv1vWY+ssjLHfsEQ5DiQDNO6aj0uuT3r31aLGsCeMQ8k\nm8nZvRs6roHncuzbnEeYFcXC8FnU1I8HtEVezN3HCFA87dAB2nK64N2vjLZL\nifREyqE7I4QD5QFzJwkzamDU+Nab9y+ArZ0KkW5P6R2AKHLpKn5hIquRDQTG\nXO7cJuIw7TKguVJRBoZgrRcAjV1R6k58xMoBsLHyvUZolJ9C7L37BFDUyWNK\nlO/C\r\n=o90e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNw0RGnWVSbpZw0/LPXsnjEvFeiCyS05P8Ybyk5kXAHgIgbg7dgJ3lr8thNoPe3N4l7Y+tsyngMpA1tV8UbFYL4Bc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.returnAfter401.20190904233404_1567640359310_0.6165850324065636"},"_hasShrinkwrap":false},"1.0.0-master.20190904235655":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190904235655","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"09a43188bbaf21506f8eaba8577b83c0f282a977","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190904235655","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-K/NNI7nOZDWELcAPJlDrSYBnOsMSLsQiyuqdihi5++7BCrENUOShBBUWhLT/2Dl2+5qzKmth/vTmUjH/Lu7gRg==","shasum":"6683e3fb512e7b97a8f5b438099cadddab0a2a7e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190904235655.tgz","fileCount":380,"unpackedSize":4482839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcFCUCRA9TVsSAnZWagAA8UYQAI2k/b5U/yQhLPB23JHf\nFs9+lAUSQ1CtEiXREQ++N2nUNtyY76UG5rT4Lv1+u6kSwAz3PWxdtkme7+hC\n+gwPt8Nkay4UaMtdv8b0X+CLCvb98TdRK4vg4zr7Mr5Yk9koJQpAXJVfSzJY\nyxpaiKcBO/hs+ImoSoAFCQWRIBdmX6AYQiOqTxU+BLCR7NkQE2YiJRN5gOoL\nIH3qOzC5bCsMXWu7WGqC5JpGD0+4N4rFW9bVimEy4RXZnJwYthISBXhO3cPN\n4HX0Nb0szTcRBrjSlacamhJl/EoRGebgJZW76i72bU5QyCis3DR6U3EgXH6v\nwIA02oVVYcjMJnbFiGFhtCn7zdqWJPkoLujdHJReyz/TIeHqsbrFrsa+FoRX\n0IHIyM5mRh3LGXYCkkKqd83YpRnM6OZopkhgPHQH7mAKXNAp4qTrGZTol2b2\nnGw5L1BjJkuLepzuAz7hy2pfdLFOb1VWbS8i0uc7iefn6NwUkg2IsJm98G2T\nH1myqBh3FB92AR795hJfo4CGsuuL4O9B7goDMkFWtht5js+Pn+zYI3s5tJeg\n78fauYI9hxrvwYwyk4wRpNbd498e1AZ7ftKEDdPYvQ3pLRfrqCrPD09giJIJ\n+PlqgClLUfpvtSgtE4IOfLjjS7vXnbFjSkqAK55Fd1cPjd4xvWBWjA55om6n\n76sP\r\n=HOoG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPUkFCPkDos8e5tS00X3fqMQUbEJDgWF8Gv6O8kL0mpgIhAKOCi5KDol5jp5ayae5cCRGLbFE2BR3rkcaE1XAxdPak"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190904235655_1567641747470_0.907766291721603"},"_hasShrinkwrap":false},"1.0.0-master.20190905090918":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190905090918","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"*","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"*","@atomist/sdm-core":"+","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"^2.0.0","@atomist/sdm-pack-docker":"*","@atomist/sdm-pack-fingerprint":"*","@atomist/sdm-pack-node":"^1.1.1","@atomist/sdm-pack-sloc":"*","@atomist/sdm-pack-spring":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^13.2.4","zip-a-folder":"0.0.8"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190827162443","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190827182350","@atomist/sdm-core":"1.6.2-master.20190827182244","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-clojure":"2.0.1-master.20190903063949","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@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","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.4.14","@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","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6885674dafc6f4e8f9b550508be5f232a9212640","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190905090918","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-5FD+QM2Lesy+5OBLmbi93eyUHp488kU97fGVrgrZ3YJuH1bPKf8oIgJJzrB2W7LgxIQdyFAlNFjyCSw2RujyLg==","shasum":"77270c49fa0934618ac2a20c64d75c0154ffa696","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190905090918.tgz","fileCount":380,"unpackedSize":4484128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcNImCRA9TVsSAnZWagAAIrcP/3FbLbvq4OIzV++yPyUb\nIvL7/Ip10KU0GzOYYPbezX6I3jNPBBp4Ar6ujnQ7Ht78yZwqiM5cWr9eyCsx\nkIUQY5Ni+AdWWVu1FMbANqKLeCjUdWlPbkEUsNDmIrwOGrRm1KxphCIOqdFa\nK5VVT57Qxlj7x52CjIyNtPeJxklIe+YGPtSm0CztIFZYWbxKAOsD5ze1D+Uj\ne0wtRvj+UWsGDXhLxHPp9f9lnjQUgvaBBJtRDIJShwG7GY7MUVvWqSsarkF+\nzONC9fUyytjKb8b5bZmo7ok2rEk1cYJOLAKyDGD2xwBujoCmot91iyRBwJ5S\nVfSn/Uf8TL1XMhQkpOv0jOd5hUFyutLQ95QC/SP3z9Zo+S27kpBnrgGkimAB\nOAW2deH8kvupb9JOLhpJ6jLTCXF2siCMYfpwh3hbryxeKJao9nE84wSmXVjy\nwklSLXljTw/2d+fAhLCwaBThLzaiw0gYfUhyKZ1+/zVYWYdoj8J1j9qTf5Nm\n+NLnTOJ9WeHDwwfJRVVa/Ze51Zj4uvXqqB+Nphadc4NHkfD+xAqjjGlTe9sG\nG4DIjMs9G5NvFybfUJiDQB3xVKto9/L2TLoEnFQWC+pe1Vum+fuIuCXpJoGz\nEOfFM0z2ocCvUaDwReGRiVTcwiLHKbJyQ1qtbpOvLIGgLRAKZcn3X1Jen9cG\ntGCt\r\n=MNjZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHUgwamssgDZLfK3rJNRU0RxbhaNM9ycEs4E0AE6XjOwIhALV5nSwux8TnuMrG2H79RExleNi2Ozqg2FivdxvETMsM"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190905090918_1567674917401_0.8359950204243722"},"_hasShrinkwrap":false},"1.0.0-master.20190905094333":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190905094333","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6869bd7bf8ad40342c2bf8235a1a1ae0a159f055","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190905094333","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-62LGjmEGSplzCEVSStymZbUa7yr6F1QqUxkU6B1js0ZXBkLgnbtE3lZ2P2UPKaXkjE/aLbsW4aTsAtUxwzauzA==","shasum":"eb7f1c91889679095212314cdc3a2b80d5b52265","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190905094333.tgz","fileCount":380,"unpackedSize":5054632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcNomCRA9TVsSAnZWagAAQK4P/jkkPzNPpIHxa2CyHCky\nTyKoshoqGW2pSut9I1e6r3GCd+8FAWuFNhq97dafinF8uphoe/Xh2BvRtnkg\nKYDy1udMjKemuMgOtL+jUeV1F4Yq14mU5zrP2Yc0TbILPSl6CPvb/t9BMkqG\nRJ4Geqao9YjhGFtCMzjRpISYjNidQUbMdVW1CXST+YoeKnWtERLU8Nij5gBT\nDk/klNoJZk+gPCpRHNyuQ+Q7BQ096odkIJBcCPunxpMp835DCa9B4I5lS5kK\nkKG4fRFv0sqB1qZpJ2y2oHkn9kkaeV52rHb3aTnhhCEp3fsBv45f0FHc7x+h\nVVMQh0MSAM8P/Pfk2FCjdsvEUU7ifZZiC55QFYHGFEpOTOF6pPWDOywB5SSA\nK2xN5vj9kX/YuekQfnr/2cSc55T+yqCaFljB1yyp+yyyECSDKeFWonqRXYRe\n5AhKZuUT4gscHVD1PaFK0BlBpwWCKtbA1ROapsxNeX3AnPUywzLZcUhqSZ35\noI2PEt865PBpBIDuq9hf/OxJv4hYS4M3qIEhZZWI4C53FmM2P3Axm1bxF6/v\nU+SclqME7ZGCd5hdULXCcMaQyIdLj4JPXdg4ksCxdRy/3s6AE3lan1492Kp4\nDB2zlo2mpt7zTpDIdi41nz6v5kcj13Ni3zsoX9T3RYSxCwGLgVJyVNh8/0T+\ncqV1\r\n=ZGts\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFrdACRV0YM7PWewCcz7EpobsnkEwZTJnxsFiyez/c5dAiEAy/jC8y/XkPaC9U3yHqYJEsmxyFkoZxpDEsiZFm3/yXk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190905094333_1567676965929_0.5192330606842688"},"_hasShrinkwrap":false},"1.0.0-master.20190905095751":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190905095751","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"30a3bc84e0efe024c1c47ee0549ebb6becc51040","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190905095751","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-pE+mrVBZqaAobdPnc3ltMphrHQ+NRYyIl6D/phw8Iy/lwjKPxw8vdApr4tWT+v0lENZUBFIWN0Sj7sIdoOM+fw==","shasum":"7c72e7cdcd081f54e4648ddb29ce4ceb999c8dd9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190905095751.tgz","fileCount":380,"unpackedSize":5054679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcN3JCRA9TVsSAnZWagAAwxQP/2gXhK5XN2QvsovsBTx3\nwX2DEeDtAvsZi4+STT+gQqdZDhwrpRdNuFqSVvhW+XOgI+NXqn8FjET3/Xzo\nUxOtgLqxk/O2jPSKv5TU82fODsar2eNtZVu3moseeTfk9PDXtZRdvhGbITYy\n3hteUOSJqRWfzsuJrfTo0UTUPBHZmp3KAjhlfFFXwIt6yGXfFq0fPq0kDR8Q\nfV9WWXRSPTCjigojkkNTcC42ldTSlwugHsRylCNUauJElVNhghmSo5gEp4y1\nl3mIvtxJIUxpBhwXYEtxyKcwSM7C6xb7UIxtZqi3d/zRhXgB19Qkz2CrB8tD\nN1LhFSlotql1tH453Eq4YwjMLrDDClse4Z69s50IqYTEYKCF1JWpADAo2fli\nKJ/Vvf2CA2lUFEU/DhNZEjtjH948aPe8wGDkXXFDK7aQ9OYdTlh/QUli5jdi\n4EtHl58KfXREE0K+vXxMEC2UtLjwIuVJ2lSzc+uxBoIaPEoFDs5UY6JvlHPl\nshPtXfD7ggLySmh/0Ecxx4SFaXaDwd+0K8xmeSoi4+Ko+eKzbF/jtI1xCZ33\nkZQZAFx8uHLVWyyaOUT4q9cUsnhUKmip66NeBsnJS+yxtBzgvoKxyUBzHb9L\nbjp/LfaBBJ7QUU+7ZwJnqvQP7f03KNLP6LcrcYS8XeloAnmrUAE9Vm1uGxO1\ndi1d\r\n=QOUu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8Yu6akH+ir8mV1d+qdFjfM7oNFpA9J9yHBd11wvod0gIgQcIVKmvJKCSho5diepLv3n55mQgvfXlo7CZtazUgyf4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190905095751_1567677896812_0.653888740643839"},"_hasShrinkwrap":false},"1.0.0-master.20190905203158":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190905203158","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0ac91deafb6cfed8587900f98fb0f56801c8b40e","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190905203158","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oG3idiSzbX5Nx/RbQkyL+qf1nhWqdBQP0/Pgof/sLNjrpTxFgzEpnT4Ok+M/CBQltYFMcSqRu+WZOMi9HXCyqQ==","shasum":"48d2567e43e7a01bed041c59cb07806ab9d4b859","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190905203158.tgz","fileCount":380,"unpackedSize":5054679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcXKACRA9TVsSAnZWagAA8t8P/j3F8ZtpM95ycggeiz6O\nbFeKf/LsJ6yW0uYYKL+Hp1xm/mBDJ/jkuCYCxLeAhlRqLQCTS5wkY+EyipWg\nGR2lSWyHdE8OokdzprZsOyuylqfdzIbPLO8se/QXY2mpRC0KDNMa1AFKqAwu\nhSO8gsUkIBZycimDjzmIN3u5mAM3cqux7YlAIMoZNXKLLNoRi5whvksbunhH\nZ1I4AIQVIGfW4oItqSVY0sT3mi570gVya4NKzbFXJ4VA089K90IfLFqVO2pJ\nve1i+F96VDS5Qz02wtzlUFO0viHHrnqTHa5YVNyGI7wz3U5Q927RvGECeKJA\nDKb5cHOMlYdKNkQuS6xfZw4yjII0Cz/wTNR3yQ3lPBXZEdocMH2Tkfvw5pQ2\nriGGZaCJLmVWZmoj0XqxriJEypwgKUUwJ+IZnk0RF2AAutV0aYJa1H/1DsxY\nODm7VPLiKJKuPI3pt1M5RIpWfXau7dz/apxYue+6pd6s1BFoz9oHKMPOuk6z\nrBmOlmiFPYJ0ACPLsghBAIMnhjsQUytJru1ymBMkendcroEWhnwOd4Bmy/WS\n8NengnkLdbd1UThuf+fRWMIVT4sPgGRjhwKvMk7BMpt2MS0xxIALOVm75Zqd\nUNj0aiQ6yOCQhGtsMKw+cWyX05WuCTG6Yyt9OO0aBxR4xijKFOCVDaPKWdGT\nCs3c\r\n=XmHR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpNEE7GXx1i54zry/sSCuHKS3DuHfJ7o7tVx+yvLLtwAIgIRaic7PdIyUu6HEvUsMvVvzuSRCfwKEOgbh5WfhhF8I="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190905203158_1567715968172_0.7982113920083147"},"_hasShrinkwrap":false},"1.0.0-master.20190905215324":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190905215324","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0cb0997896014d10615e63bae29145e3080549cf","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190905215324","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-2ef9+Y7z7wvP+KB48dumtbbLU5gE6ZHAxXoFAMTKIrwVyk1CrVcNBMloIkCc93Vahi6Qf1BNTr5WydXM5KZvXg==","shasum":"830b27016031a11e2ed36300daa78a660ddd68e4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190905215324.tgz","fileCount":385,"unpackedSize":5076676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcYWECRA9TVsSAnZWagAAAgwP/3cr+xG+LQmQI9Us0FrG\nOrP91wyRF2cxHJ6WJqeGGcdvqBuNhLOLKqAZP4u+4WJ4Lmryli8QF5ydCePw\noVH27ckvR3IBdTPQn43FzMNl6bhTPHBJqJyd4DV/Fee6C0WsaKZkMurKkFTX\noAmKmAIOiSXDWjRzBGyu4S77d8geBq7AHd+77TgzAElqdeTfVrjLbFmyUlDQ\n3HPnrA9LX4vugr/EmGyH+PCnQdCfSEGOo4lP3FiqXsZtk9kisq4G60Hna972\nCun8Id0Jr0RMNX69m5TvvKRvSpAFtzdiETpmWCotBUWr9Q+bcxfb41/TSnTc\nCMsmepR59JbXDJkpGZ3gt9M8FpGuTMY/+zqUEzQALdUNPbfGQH8EJs40Voi/\nvLsDAnuEQal5z9upH7IljCAoIUrJ5VTXbj+Z4HY4d86YL2AmtSNeTjQHa4CZ\n/nw5wi7ZRajSFiF7FgyCaGCrN3Irf0cHbFEQDWaRrZm+HayhJCbomKDKuec/\neWSXDhBhdNHmLhGfLjKpxeWqAPtPfxy6xiho7uXwoVyOwoEJ1GTgYfI6NrbS\nE9DaMShdK90G96kkM4pLeisQtPEutYMQgf7j/VF10pd2c5qwYWCJot8RKzBX\neDdvfK5GsIpN/W/NpIijY8gcf1lfSulTORjOuhqdgcCFKozQtlSyzzqCr0kF\nnPO3\r\n=o/si\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx4HFOuBCft/u4KqwC9NbjhAi+SNWzoGtilOqAso0BAgIgAyYjZLb7mD72v6tgvQXMTywViTwGGq7fEQAfK/8+n8U="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190905215324_1567720836119_0.8446099547662522"},"_hasShrinkwrap":false},"1.0.0-nortissej.defense.20190905230037":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.defense.20190905230037","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"96af687a89e828420833ca3be048a6ceaad60620","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.defense.20190905230037","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-4fp7g8PUKCLWc4kVcLV5esMUtXrBcErH+SDoN/0p8II5fF4ooG7Tdzlnor+H2KXA7UDzyLQtEdpxvuT27MUFtg==","shasum":"da9efb4c774522e3ba8f235d5ebd69fc9e3cd384","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.defense.20190905230037.tgz","fileCount":380,"unpackedSize":5055630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcZTrCRA9TVsSAnZWagAAuwQP/3wLE+sU54u3NyaBu4Yk\nT9A3wbnBOh2EqUgeDDwF9h9vLVZjryBcGUicVHR5ZczN7g3FAEi2pezBUTmy\nYPbW81YH2/8AJ2HFiXhcfTo6cIe2gZok/ZA1Xe0dd4nIe48ciWA76pFxnR6j\n4uf4ZS+Jgczf49jktMaGWYbCHWkO/j06SX6vgDBgu0Cxyp/2jExbVoU3WjUT\nnJTHkBTqag81TF4lWkltKUHL8nCWZhqNksCeVbdhGrmX2RfVzgke6TEnoQI/\nmumDiVx47XE4/lnGTuFzHga1Yetttk2d4T38CMJ2HntXewFbT/uz8iF9mFrk\nG6YnSMk4o/yfP5yK52Tvt4EP36pBiphBlhUzVXznrcagyMCg6uPGLBeLf2k8\nq2bQQRJR0dMIw1/7X1erUsYU5gZNzp2PfyRAmSh7PRpXNlajl8nQ2rO9i37/\nMd1qwe7apg6yz6mTBhlmfaVf3r4CgeuzUiBcyJ7IaV4FdZrJt5hchk1EmbMh\nur6EMFygbWr0R/ziMrsztwu435P7qkmYyuqAD+lfisazwuBzdaQj8Tjlij6a\n1pn4y5rnlCpntwhZn7tmfFc7Js1LDtX1LNQA56FRwd6VI2LI49f/vOYicyaI\nx5ff7SfM6uHnaecmbhKVYJ4N4Dx/N7gkEDs9g0TzekftPm88V1sE4bV0rskC\nB9KD\r\n=Tdu8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKcyRFUrC7pOwuKQHxH7dikfa8AvgG6lXaZN82lzPzxwIhAJvnkS+1rJICMuItigRTyhSuKrxOo1D0q/Uv22tx5BwV"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.defense.20190905230037_1567724779056_0.7124367487151961"},"_hasShrinkwrap":false},"1.0.0-master.20190905231019":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190905231019","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"50b2c1ec9744b4d3209c86213784c1f192cea14b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190905231019","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-NpiaxzXQxfsm3lmaEFw1X4L1wHMHEJ17tOYUSWMO37G63MzmJGXGZYs4XgoqbWQDgV+XrvdVJijR2fCMLLuxfw==","shasum":"c7db46e08e3c7b1948968bb34f34b29605491873","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190905231019.tgz","fileCount":385,"unpackedSize":5077605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcZcFCRA9TVsSAnZWagAAdT0P/jp4rBdqQmdKMwLmdZmv\nJMHMF3JEBgSyAs5FcaGWJrOi58t5t8H47zbuwSkGoAK5oeHqcsEP9ZdXTkDL\nIpUMASsexPCBOB+V18eoHyX/uZ6Mr3fBLQ8QV61Y2w04CEUJqABBoXsQD3j+\n6+SNA7hOBc3rDsMbTzFlIPBTtxsKH0YDAITJaxHUOmf0frLkAA0a57WC9NBd\nGNfYW+bjdK9djJa9EGRWpAnsFvzuPAUKDEtm7WGDVb6ylM55nIo20Hzz/6yT\n+5FqEY09iLGXnqAgq/2CRQiYpgvOkWXeNYpH9GOHZ6teHtYJau6RIIQY9Okk\nvzrQKnIyO/oDsD6f7fPLBXlm1hQyVBqdAz/1iMc4/pDiIKNnxQ2kSlihgysm\nC0gyn441RxWqqPFeQxIk9VlNXmBRglfqGgSKCk+FNZZGlkA7J0baVbcO7q5H\nnV6A+NqFiV2glPLdlZTvXBFGijzXOt6N4oWQLJshspvJvnOieTktu+tkUUDe\ngY5c1XGq9tIYIo5cgGb6fHbpRG4lqrfNEBhS2L4InKJYa1NboqeP0p1cpcH6\nHVwqZ9Yz5SMmS0qI/ax8alPwNJbm5NAz+7Jr+UbXLDq6yIRmastfcbKLAUvU\nmL4y0ck6wF5pzKLj7fD9bFN7LbCaHZoBAE2JKK3OF7qS/7dvbxe2zlT6Dax8\nV5fQ\r\n=8p8c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOg2t//TCG8lA6JBg0DgW4+MiRa8By+x5EhX+aoYWlfAiAjVh41Qubfpe5Dxudg5gFBNmIstw0UnN31PaXMvqyMUQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190905231019_1567725316671_0.13353135135679106"},"_hasShrinkwrap":false},"1.0.0-nortissej.tag-reasons.20190905233656":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.tag-reasons.20190905233656","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c87d3c26e524f7aad20a85baa2b2cd03b9c22e58","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.tag-reasons.20190905233656","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-YSszjx/ETIhQHx6SRcOX1mvDoXi+fetscbb88IWhZ/fkqwf1XGVE35q6tcqoi6eVBqfc2OaBbCoHhbP5WWrp1g==","shasum":"c92ea5a1df2b6a02208590e999aadcd010fdc4b4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.tag-reasons.20190905233656.tgz","fileCount":385,"unpackedSize":5078599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcZ2XCRA9TVsSAnZWagAAfBoP/2iCYJU7ghpdex4yWclq\nA5TSMYZdsbGXTc6zo+NP+C0Lz4puqOpAr70nv3AybSMJr4eiV3zsjYl+feTx\nAQtXZn4Uf2UO63x6l1RYuhlJX5shHCt3aHlxH1IGuYWLwdBQ8hKipIgWJUGK\nY8AdqR4yWE9inDIsB5GeKJutdcfSNI30O/JCSCwtLTfMOfXyUXITCTA2dW8z\ntuh7TVZqQNPIxTWy9DcLlXh+bfZSRZu0DYIpqyqjItcRcpwpPr/TNA+4b3yx\n+LL+ZLVJ9bvDgzDTwTwsrnm7FJTBNBzwUjUx2LLcpcNd275b2I8dl+denc2c\n3XA8jn7ggDdMzPtuA62IPg0QBtlnd9jnfLPdjSjnU9gFBvlQdIobXCYvrh00\neW2vngMNtj/HhQ7lKPmfuGMPu3BRC3tmXA1cJ/qfG24HnVPxnumS1t8fvuwO\nIEFQghEivpo2tuuSNnDWEmF1+LHU8HYbq+IELhDXByOAK546rgwM789iNPZq\nrOr2Ab+0+oUTdztr39H3PATRBlJJdXXpLK1r+tI6LZr6RatY6JY/UK1Xq2Jm\nvHFPZCh88F/ddrcMhoATnpXB4R28NU2NackIBeol8MlzBaOki2NKW1pD5694\napqhD0JgZlzLpMGNf3LVXQ0GUObtQal2glb+7f7mw3Uq55hKF1uQcD7vO1Ei\n0rV6\r\n=DlaY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFwugUBFU5t+95cwHbPtltIvRGSWe3kpaMR6t5fDy+TAIgT+JPO9kri9M5p15+aWB4g0crrCi2v96cOaga94F5YAE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.tag-reasons.20190905233656_1567726999146_0.9372788409629413"},"_hasShrinkwrap":false},"1.0.0-nortissej.tag-reasons.20190906004853":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.tag-reasons.20190906004853","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"914817c9a692cd6253858738e72a333fadc5c6af","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.tag-reasons.20190906004853","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-sRyKHesqdCK3zzxE+Z+q2mkz0Mmu659Apk096wn+AkscTu3Na4Lxzxe7o2ucr50P729BaMo7IFXWazcPonAoEA==","shasum":"1abaa927b2d23e749c4e038225616f27c48e8b25","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.tag-reasons.20190906004853.tgz","fileCount":385,"unpackedSize":5078668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdca42CRA9TVsSAnZWagAAxMAQAI8o+GvdwcKAcG2Y2yfp\nLgVQfS3acArW5Y0zfMMV/tRQWgGEZuETuZYLs2+Q/Lsk47jmMtspjT4nccHZ\np/uTLOTiw354ebY/HQTd+ybA+KZgxAt+RkVnLVAp6FYzNCryF4k0JAv7nPSP\nfLJlddRNZaTpNm8TNPLckdAhb1TgmDGZJ3ClPIn2lql9FEOF5gO28w7tsP4W\n2RVNAEC1e5EoSh9GqIB9kkNSdBjmzObB1fYVdVQ0WLZ60D6v6dP23A1Lbo3C\nnZNwLn76MPH91a+ViluLlwSyK732skvAMTFCEz7ZX6NhVRZ+DmAk+sNM8YSD\nAQ6pwQ29tHYFvJtHHyPdRWzXE99teSK8Fl9OOrRKdcZTySz0Wfp3Qo53TxPw\nOqb/KWRd54FhxJXzKNMLCELcFwKU/Rkc+CLkNRheH4KPWMA6NRK9tlE+s+IH\n0dEFySOmxcfSQLgi8thMQykt4ilQYy3ij1yifF3KvWY3VVEg4ciRskEC+FJy\nQs/QsiHHr0UBm4IoA/vh7/c1hxyLjiEPl6i5sjDnZMCjasXFF3eCOxQOaAn3\nfPcsrO9DYeO3u/uW6v/mMulnhVM4of8pom+Ryto6nvRf3Vd4X/SkgDwYOyd3\n8tJYTCifUiEWvfmFIKkYFqCwI0LzfJbVBCA+AFtEcuH/9JRspG4MRe+vjttY\n8E2h\r\n=pz+5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFw+VG3MXR9ZK9iWN4KgjpSIU2oi9JvUYvTjF0s7FKpwAiAf0YCUxifY42V1ETVEmljOYsWisNAoggto5T0Pc5SNtA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.tag-reasons.20190906004853_1567731253363_0.7657553448322358"},"_hasShrinkwrap":false},"1.0.0-nortissej.tag-reasons.20190906181549":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.tag-reasons.20190906181549","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"93a7813640302ddd1da4438e324b3583ed5e88eb","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.tag-reasons.20190906181549","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-gJqOpC+C7x/SQcNeoEZdABjtkJB0btN5bW7QTbfJE6xgxn+xKN4VrHejhiCkvdtSKV4th/7dPHtKuTe/y6lXvQ==","shasum":"e7a04698b31c472e5eeaeb1857dc65029f20c032","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.tag-reasons.20190906181549.tgz","fileCount":385,"unpackedSize":5078429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcqNTCRA9TVsSAnZWagAAS6kP/j36LQLr6jTrW842CCIc\nb3FL7XOcztAD8Is3nMyBmYOluWzFPYsY7qMT+DwrgyloTjCpPPUKqEdyICEY\n7Gn6YhGsCfQBVMkfxW0lO30kKuUWyJgiG/i9wLG73WdQW9k0p3A+Dwbps6H6\nr8KBQeAI3zPyibfY5Y5kDD41tiWBzcCathP3eY3Q58m0alohXJuaeZfE0Tsq\nSmICEQ+gpCGoCbfpEaYXWPkqs6sH6VqHnqlAj47J83Cjtmx6JDhZ4kZu4pGc\nHtZd4xSjich5qnc1H6yYA6cw9/5RlxhEQ9NkeC0nn7X5hakX0fPf6oG02SSf\nDXsDgfC9s2AU8XfnYix+BL9uja4zFjMaW/s2yFI5w2Y2AgOC0o8VUoiB1PXr\nr9LtgvLrcb7STKeiAQD0z3IzPdyt7YCBBhYBU/ndE+CZ1igvK76Pe8Ws6/D9\n+hutN/bxJUD23MvrTXN1jeMvLueUuOnlN+nxJNp1cTJwIY3hG0V2KONzatAf\ncVtJzD9FcSj4jFoHcjWoBBVuc4mjH4A3I3UT4wRwzP7z1XCP0OVJ7JPOo4dK\npjEjBBHVOYTTcMbO7r5IM2THodyNHARoo4Q932fq1IOmmfwfUDSm49yEcvRK\neaKKJztlHleW1mPpYLh3y+gM0QYxG1irr3VQ5VNbGL7poyDjFfYtD6w3apHs\n9mnH\r\n=o/XU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMfkAhP0jUWuq+YGvVWsFDg0NUGwf7PV/1qL8TgjRNAAIgAf8uyzYpLTV2mOY9knXpws22JLfyMXr9FowU++wr6/M="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.tag-reasons.20190906181549_1567794002984_0.7291341869853971"},"_hasShrinkwrap":false},"1.0.0-fingerprinting-job.20190907070844":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fingerprinting-job.20190907070844","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"59a9c971de6ffe5c5206b07ad6745f2de79c2380","_id":"@atomist/sdm-pack-aspect@1.0.0-fingerprinting-job.20190907070844","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-8jw0EK2XO13emwZIkK3o2WX44oDKdtFK9COzGGW6ovOQ4p482Lx6FDhhWA+0TtzPjHYtK4HYXXPfOI5kTd2nwg==","shasum":"edb2047475a81b62b30703c1474e03b70be2a034","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fingerprinting-job.20190907070844.tgz","fileCount":392,"unpackedSize":5095737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc1i6CRA9TVsSAnZWagAATGIP/jjd0hcEebf3mApUTpOP\na9XFf2e/a+t91wtvNZ9IXlOEr1ZAtDCuqMCBxX48BpPw/ac1Y00LM948yD8b\nLyYLaza7NrfW1Z2AoMO7dgqfw0YywBdYl40pYZTSxuXPgGhC08QotZbJ3Kvd\nou7RSNC46ht/La9awPiGb9/kS9c7DQ2tuTqFQ/ds46rCX4NXaIR24k1Azpi6\nxx623sK31D+mDBEbxrqHhDdJL7lJdC+8JiyAOphszvJuDPSLx6Lg739V3GZ4\nV+a1cwMtCJMD63JbDuVCW2IOLNrjjgnImQmjTcU32MUtctgdvnZmDMDeejL3\nG8q15O8/Fz2LFnpHCSrm7b5mTKpiPIWtHuDE/+PH4TPKlwnyYEADA2/BtZOj\nzmeVWaUDUzLJtpAh6ALI+RcuBeFCWQw8GtZnQZ8djttDFg4boZtSXbeDlYoy\nuojdl9UCcvi/X1zjx6p4A2JG4g5rAb9rnpfzPZ7Y4Gukc5/Qg87J82csNCFb\nxm6D30ZxKOPrUSNSHmikYqKUI2jZVBHZ8q4aZwwxEm3BqvNhi5K/x5km6Uft\nwXpTvwFKkIcPJ2wLh/8eV3U0HOW/DpMJBtNWyF7d4pfySilejHwCsWyJhHEl\nZnJQIgZ++R9et616daj44VvNTYKKpJXnOWu0SaRH8qvo6osKUkQYptgQNCZy\nGcvs\r\n=hyDv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC7Gnfezh0Fja9ZzO9l7E2adrPIdQN30sUGR5eeHT8dRAiAQSvlTv/JqR1QqGqTJzvRO2YLuN1gFwuChLZCJW8X3ZQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fingerprinting-job.20190907070844_1567840441537_0.4696500819313505"},"_hasShrinkwrap":false},"1.0.0-master.20190907140422":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190907140422","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"93b2767da4fad4e5c962de987a1c98dfededbd2d","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190907140422","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-a3dnOxvjhZ78iIyORgLyceF3lFTUpkg1KuzrkdZoJvJqhzjVXW+lHO8Xyxe2NurPPv5///Vs+vjDfxQ8rI0s9w==","shasum":"e83ccf0278392bd206d00879600bce7a97dccfa5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190907140422.tgz","fileCount":392,"unpackedSize":5095713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc7oOCRA9TVsSAnZWagAA6bIP/2qjWLrMhHs2MWnrCZpy\nbC8olJ222jhWJrs+2hny8t4+4tnUBtjBFUQU2w/sFTYfCDX6+i39j0+b5gEz\nRikljV1B8I5doU4jFlVwmtg3UOJIWOVHewCWe0o94kNpIR/8w58m7eD4G1Ux\npFmAkhpsFCPfNow2TmbX4kOYdYOBEXR9g33ysDw6gou8UjLgwqwP7bpcKBAO\nq69EeGJHpgqJ/Ft+2sMDSAjLgiGaqphH7aC1pYTKvWwUZO+rdhqL09zrf5yJ\n/zx5axkpDxush8kHcEuAg4XHDqBG15ah9clNpRvuBKZ12Vwuqn76uYSoXY69\nT7SeyFywYUFdJomzLypHW+u2W+djw6Plwn8TWx5wfdLsFBsKGT/8D89DUYyt\nw6JpR9gtkfArlZofgw/R8+pxxaOhCcVS5DzvB60IGybBskBBnsIYjlOLjmX9\nf0/8je2gpr2Wl0OJwA+Ves99BBRnzY5fjJ8eyjeGY1bponvO+PjZN81IuKFU\nnlBvp+h79TAYnBNo+D7nbKGG6awSWFKw2tUkCWoyi8Xn8jB+yQlSYCK+Wvdb\nMSAJT7NVBRBi4L3l4nt8RcTJWaaCNce53qkgJMuPzmzxvc0zddQbDVvEcpHB\ncqjvcrDgd1/dZgnDYy/yMQymsnmys1NKRf6hdf5xzNsOsWsNGVxemrgJxeC8\n74JR\r\n=Gd98\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq9KfniqGv2jCCzNHvIHVHKYhyhGW8s3t7ekQAIBDCGgIgMSD6HRVaYEBZYqPA4oNrzas9Q95sqHZkIdgKZtHEGTQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190907140422_1567865357740_0.5046940952346515"},"_hasShrinkwrap":false},"1.0.0-master.20190909080143":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190909080143","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b803eac4303e4c07e838699caecabdea4e334566","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190909080143","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-2M1bB6I52a4Xkjps4LwmSI0bgAfgKAB4CwPbtv5vbXPJux9RZL8FX22wZVateFv8GSY4xL58QJLMPB7p8f8qtQ==","shasum":"82e35e73b02d6ede166370803421ddd57fb1a7bb","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190909080143.tgz","fileCount":396,"unpackedSize":5106148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddgfzCRA9TVsSAnZWagAAHUgQAJ7405IXF6+zRWkK2Gi3\naGS67V/8ZAalWFk4TJG/7NO3u9aBBshPMAyTkjTqQeO9lG7tTCEbJahXhacV\nzLAZKXeCnjAdCtLAtvzTetLgYRlJjHzbRdVvEH/k4PF5u2QjInoRrghCmxlD\nrRdnqGpDjlDOIpfzuXosgX12K4GO176+Xi+u6AbPKKDlIUau5r7OF/H3ZdaV\ntoDTBOeSO2RnkvbC7h5ceSpuvNJJRUyofGcgPOYRqJKuORhyCzGNqllunEUu\nFI2g8SSfCTvl1lDyKC+lv8jPRCpr8kSpsoS5j6Yak5QUB1r0YrMlb4yt3cwc\nOAjzKdGqUuAN7DqMGHO0Uv+Hh6E2AYgnaO6P8D0a6kmkBzArl2xLH/sXqT47\nF0UKd7RLE27YdHf19XOBwhoK0f/yG3L3UtqZeOYvbZO417rCzNO3JPzy/KRM\nYbRAxbQcKRm6P/pFP6tWuI0UA6dbW9K4bvV5FSiJ27u9ju3LBZBWPFE3H1i8\nkxrDEzJFtJpe1nWBcdXB/Q4ibT2YGwzjTWlAtpueKSQgtmPC4CiQCeZ3gKqr\nYN2svQrr3W/sy6iR8WJjhcfe7HqeqDibKOYzVv4P1vsAsmvgM+nYY1payq+Y\nzNoQP+0nJus25nqDj/jci4vbS9lFP6gNfJBpj34Lg1NKvxb3r2P8ajfI0bN+\nHs3z\r\n=15c8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkUoIeq23ey7k2o7ch6XnX8ARRn8pfSet+vkpWHt/sKAiEAhVVF3gAl3VQbQ6jU6pHQ3/viaadftdhUdyERdhH5pZs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190909080143_1568016370835_0.11323951092899631"},"_hasShrinkwrap":false},"1.0.0-master.20190909105225":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190909105225","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"649d130ba3de334e46c65c3db1b13eac64812381","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190909105225","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-OfZv4xmj5gaeA/C8BnU0ELJVKFn7fjOqZl/zPzkKqRFaT3DQwGjSrLM9O6I+qG/ssJQLfk72f5lESVOzrY0PMQ==","shasum":"f415485ca891fe5578f1e3fc17ec69ac95092e99","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190909105225.tgz","fileCount":396,"unpackedSize":5109183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddi/gCRA9TVsSAnZWagAAsFkP/2Hk9/qxo9x1CoVW9Vyc\nO7suFeLt+6AJKXNDBLFkMjUEH0ARF8gJM5WhlwfA7szWKR4lGIuzdKeyXA/B\nv9zA+1jjXtRjf0a6hebcmhkF71z/V1oKiMRLigUG+i1DNnkeNN14AXdT5Fcd\nfljXPcw4VUobi4UyhMXutg9KZdJgIMPy/BoaZ4mYKvnl++20fxdkYtn+WTQR\nnADw0mJOxi25lVhV424qTpwGQ3pgWAqMf/o0kIzx0KrWAkrSH4iGBvRV4BW2\nYH/yBeFWt4ffpbDOkhCnsYHyLM3NIP77NoOWILMf1s6i+SrSWTM2RSc08iH5\nBfAW5ZmJQeK+M211+Jp7Xo1E38WyCbO4FR/mU18Bi8xAXlvcT0SC5zCeYefJ\noW9u9PbcjyW/5nLlBRomTKh/TXxsjX+mDcGXj1uNdftt1budgy21/lqgrf4R\nwNkxw1E6j7S9dn5H/xmBht33bV8kUKEAmi98yzXCnCt1CHCRPcvnQMheaebM\nuL2u8PvNGIbwIaXNa6zzuXmdPMseHJMOJSh50rPG1IFhU06PMQ46kG/MUZh9\nrUjVRc/XXs2ZP0HEsTTwhltLvACbRX26SN1ckJN2or3OUFURcxrc7HUG4ggD\ncBnT7K8ktxf1Zc2PP0J7rYD7roz6bybYzqwordt/o5uFxFTumDPC2ySYbYzc\nLZIC\r\n=lUrZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAg0VCueQlZ3giuEzayTdzgBZyl3Dg0qtIcddNpLuuagIgJdXhYu66L86pwESeOsUMjgEKpyuc/nuTYZP1/6oOuM4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190909105225_1568026592028_0.15880548643905135"},"_hasShrinkwrap":false},"1.0.0-master.20190909133002":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190909133002","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"8bb96adfaf492559a2598f2e2bd0bc8f6e5420cf","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190909133002","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-CwwOOXW1UamUZvHvJZv2aWPkA06pqMp35BGhp/zR3JYdsljKsUP75kd42scWi+E+lBKvyU4T1SFETP1vVf9TpA==","shasum":"13f232af8ca077b0546eef83353dcebf47fa394a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190909133002.tgz","fileCount":396,"unpackedSize":5109317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddlUcCRA9TVsSAnZWagAAwVUP+wa7EKg79hbuxhsJcH9f\nJQd3t+8Wc/hdwP8/xknKjGNxFmo81VgTJEKvPAXRzE0oQ8isRD27BWL2dc0E\nOE8Hxg4xdn2dynq6WRdufmlxEks73k8YySpDLYqA6nF6J4e+u/Dh7eKSSrSk\nN55x3UWmRZhFvL3fMXsCV6pSMk7HhN4w7Yx0CkcPBRn5fU/YjcPFVaqwDM1q\n59s00m1tY3yaylpSg55Bf+MkokZZ60yvvvFSmyGCnWlAWGZYXGMlMDtMoUvH\n/RBxzO4RYcDqUANbSk+zI/EnoblH+FM5KKjOpinVINwU4jdO9sdVZNVgCuj1\nUWOp4KYxCp5o4IEVTImVjkxX+AaBTzrDxHLYMKgMDBLFQaHUkgloj+NDNpIt\neC/Aq0imS8xofgySuOX13BV5z/p0GgN5rFJHbTzKYLAX8BcJmlYsHzBlrAHS\nulbNef/YWNYEHoNAUf4kyKhZ2c6exUcs6j6JqKIhEu5EQPJ8M4d4nqFybBv6\nqYwjgzMv6s4WtTyfmSKWcxGzKPYQcQDeeBRbByOapCJ3qCZzxBiHKA8SuIj6\nZiWIPYWm2c/th9776BVk5jnSHl3SDCttN/6S+L+4pbfe4Z/nQboZyhCoCiJX\nN/MmUL0jEMCbQqoRTeg5FoiOQ2MmX1F8Wfatk0AwmksYTaI5WyEFRoIz5WP9\ndoax\r\n=NS/2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvwQ/TwK274dBJ9h7dEdt85D8s9UNPlkTvUBwTJxm26QIhAI0NjhaQVG6t0VotsSYWQgV9bwldhvFT5iGdOvtpdmAQ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190909133002_1568036124055_0.3008975625845738"},"_hasShrinkwrap":false},"1.0.0-provideFilesChanged.20190909144606":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-provideFilesChanged.20190909144606","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2cb6adcd0715bf98caaf3bd8477aed64e38d57af","_id":"@atomist/sdm-pack-aspect@1.0.0-provideFilesChanged.20190909144606","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-x1QVeimmii6OthA1Wa+kym3zvDGClAjA9+kiiRVXa+XBw/LN9Q5FjkwkH4rjP3CarjJTsh2fo7Kn9SWQ1ktBvw==","shasum":"06be961f502ed22d0f2f05ce4640a7d9ec8d1b8b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-provideFilesChanged.20190909144606.tgz","fileCount":396,"unpackedSize":5112756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddmbuCRA9TVsSAnZWagAA2eIP/Rk9M3acakJtWx3P+xGM\nukm/+GsuRsfVwr4XyO7nyV0B/POwzEuxEVY3pePBg4r/TSpg4r2dtA94xkGq\nR+Jatbp4DI7CyBrktdsgMkQL/JLJVw9oCWycfmmm5PkIjqECJRxvZWnPS6No\nIRgSkIbsQH6iVearm9lIB88twZyV6Weqr1p1LWyJqKM+1xubnOGqIp/aYgTV\n4JeIaJPB7glYAdr7IrqDdjPQ5V63Hcf9CuQQBwqlNMqFESajss7FiYcBdGE/\nM+c1JY4F7F/LZTmRQfsh5QexzsZk/ehcP5wmu4jg09u6VJGMnQ6hnYiBSGN5\nJ03278W1NkIbnL/kAQ/hRc4Hpn/6Bp4gVmIJlap3z4Ik9j/cqs61fcylNKr2\nUhostXFUSyX7IpaHmwppLc06oVZlHr7VfJuzgPXPRO5hHFKaWGn43FOnVnxU\nU0EETRCYhX11hPy9sG86UIJWM6tIFr+A4ZkbnKOzMYM6iBhz9iE9/jhlLSdr\nHiVYP3KYimQdCcdUlIeHe6FIvp47DiwrRqCAUGLxqBbacfmpiC8T1r+x2fCz\nDTkYWn5eUl9gDTDCjK+bcMFzoUTzCbMy1/jt5Vpv26bpquARr+GwGEQW0LK+\n8x15E0RUPviP4h3HoFKvr5VsjCkaXXA4nn42qAYU8F/Wuoo7IBsLHezt5M7A\nPfBF\r\n=9l41\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjkFiWyc6TFR435CW346SW1WPXn1f1plDMEQ06PIRGDgIhAJHvH+6lCA1SmD5CSvTgXc9rCgJUpEThVaBqUbwMtNt1"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-provideFilesChanged.20190909144606_1568040686197_0.06719260161123164"},"_hasShrinkwrap":false},"1.0.0-provideFilesChanged.20190909202954":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-provideFilesChanged.20190909202954","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"81ab0982874d4fb5bfde25a793eb242b5d7ba2d9","_id":"@atomist/sdm-pack-aspect@1.0.0-provideFilesChanged.20190909202954","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-q9cEpMKjZcajKOjKYR1shUaLG3VVYrYSWXzw69/WvRwhuJGE8yhrmyXDbpiuU+T4FLk9LjUuitpTHIDtyQPm8g==","shasum":"bd7f374d1d8f03df720131d7b63383f427b98fe6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-provideFilesChanged.20190909202954.tgz","fileCount":396,"unpackedSize":5110490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddre6CRA9TVsSAnZWagAAHCkP/3XZGRs7twWgVJ028DHF\nkGSTcpjHl04MCX8WOBvHFl25wqFemArURXS29g6OG5dNAxMQCXC9M6ePLPm9\nXAu8sSICtC6phGYdDbQbKJxbKs4SfDy15mQecFv3kkGgMYJBh2xsNq+A5gaU\nvt333sWOyKQcFmy7nqZYi5YrjQPKalOjFNiMRVBIblb+4XHr4tsnW+mnAojV\nLLhTA0eqNR+3Yco6XT+C5cjhHjXRW4j1EvN4zqHEiYnt9mb9eVck1Kn1YTVV\nd2a3b+c3mMbODWlS3OpwDDgTPxnGhQuKL13VIlxENLTk486/rYuvCH3LKT0y\nx7cjozKehP6Qq6j/pTXljs+J05wa0fY/I2p30zn31mOurd0jAFMN2S8fhKfi\n97a8s2bcx28Q5BL+KI26Jj2eZA2sR8269ElrnmopEGPMAFJQK9r9dNjdE5je\njiALcjDAgVmJSWjxOWV2qn5lveE87VoZxYUTlJVe3t+i+Fq0fg2+gwt1vcd0\nheYvwjXsN5W6PDkqKL1OQkjde9jcDrSwcf4Vmiw/ZuNlpEnnaPj0VuCOMwJW\n/lGOwQO4XX8uslBODueZF9qkVCL/XZlNSF/wN2CH/YczgDhWTXNd2mLaQnSv\nsSRWvqm8e0iOn5u3yUoBDFq4GMnF7j04xFWkIEhWazYcXDJZztRTUKbc4hVS\nVyjR\r\n=teyN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC37C5dSDgqsNqXgX/vrhOycD21OnQEZaSB1V06WkKCJAIgOTiZcLeuHWq0TmpnC/921umtGzj5fapnI/a8DwPfT3k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-provideFilesChanged.20190909202954_1568061370154_0.9498372616745718"},"_hasShrinkwrap":false},"1.0.0-atomist.a260p86nh.sdm-deps.master.20190909203215":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-atomist.a260p86nh.sdm-deps.master.20190909203215","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"25caf1c4470b89cd4064d182dd8d7090d120644d","_id":"@atomist/sdm-pack-aspect@1.0.0-atomist.a260p86nh.sdm-deps.master.20190909203215","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ojlBXfSUMLbBU+WyAzxVyxYPWILyDFjjG3KnnjjJI9z2Y6xfxPKowyhR9H64Nya7JZPLHz/YMBUlr7ZR2fQlZg==","shasum":"7cb80a13a06a0f4ceb5dd0542d60e69c0732a67c","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-atomist.a260p86nh.sdm-deps.master.20190909203215.tgz","fileCount":396,"unpackedSize":5109308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddrfyCRA9TVsSAnZWagAA1VUQAKMrB+9QPJHRdbIWkkbI\n08ybUdm+QC6ceiLNlWU/gEIeyHJ+tqRkoByj6jwUEGULvPxozIBrOltkRrmd\nLrJaKU7jUf2ghXnB58e6sMrf3x3d/TGTBYpdGxK1p33y1EcSVttybR6ER1aL\nMID4BdPULi1v0s1300V2fRko8i2phHxu1mYcMqw2iHPweUXtmPPBXBf4LM7T\nVONm5kxQ8izOXFlyqe84bc911fzH1Ydr/tOZB2bJOf1Fo3VSBmnXXLJ29T55\n6Dj6qoQWBeD7nT5+jfudbGshkVD2nqjzlRIeILw72yN01RG0uE/0FZ5gSQIB\nOGCMmIuoX1c+lXR1EEWTT8PWAu/dO0k8TxFXiPD+sUUXHio5+lk797VnXRb/\nN0Dudzg4Qb69qpFlT3/mLQ9m4CPDUo5KUYGEsSmluHDw6Y4nKRBYMSC05zzp\nS4W16OLk2Ut2RUSFDE7BxQAc0zA7I44F7lklHsDAX1rmBI34uoQGk4x+tmJ0\nJdzH6DoWII4a3c82aRAtoPPQ6kmP1cJSbcGWfWpso4RrRKDsK/lgmGSN57AU\nhm5e5W0DCrEAyI9BhJZwXKr6cvRVeFpHfJgt839/DG6h7WloE1nOrTz8IbdS\nPSRI/pnMg5hvaeiM3GVnY/TCXwNRLkbmc3nYb++D6DdZhum2qU2WaU43HRX5\nqgHO\r\n=/Z+9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhYXiClQxH34bHTdvxoRI/yJ4X+bCIXs6cL2dpMmohdwIhAP+DPVBeqaUoVgcYjPYkiujfVutdihzpLEFbGJwSS53G"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-atomist.a260p86nh.sdm-deps.master.20190909203215_1568061425986_0.3952538014182059"},"_hasShrinkwrap":false},"1.0.0-provideFilesChanged.20190909204809":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-provideFilesChanged.20190909204809","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"81ab0982874d4fb5bfde25a793eb242b5d7ba2d9","_id":"@atomist/sdm-pack-aspect@1.0.0-provideFilesChanged.20190909204809","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-D0T0jDm/kTaZwtJ+kox99M6EDEKKmIRIyh4ABKOrIXtGy4sFl/EDnA9uFLE+dDaL3llgnHdy0RXKmdRT4xdAww==","shasum":"bd3932f197196d819292c8d583d08fcc16e4db51","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-provideFilesChanged.20190909204809.tgz","fileCount":396,"unpackedSize":5110490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddrunCRA9TVsSAnZWagAAK+4P/j6b3NKt6P2dYsnHU+0V\nnScI1JqbNStzr1ij3djo48PpoALLXpJ7hlfGyzpXojmwxxkuQiaJuTICGLQG\nYXJLsRBGajsSlfkuFj75nIMOnchiLCMfTSPY3wAiLQLknB2YsiH3bWFhmdUX\nsLjA6EbjCiEfK3LkxS/bNaTMISE6xHXscaSk+8yPbVrJmJ6kSAiHby+Ea8je\nqP/wiWfeaO//72MwqzILL0e0Nud+TnmW40F6TWuzK9t+xRUTodwhVQemb0Tv\n4ju32bs5mqdANQbN/MgEw556fAKx7Mn0wsaAXcNyccgPB/Fr0fuU5D4sqA2f\nnHaMqvjuxcK9389cXmKGLawOPyFBM0COcnti1scyfo25ooAwb9I+TJnwmPf8\naMWXFN+AtZdMUowrZd24nm5ZRoP5mLpKwXgicmfLvZH6vvjwutVqOp4p/DV+\nGjvPHoROGVQr6v5Ov99co1IyhO/ZjjkCgJdD5MDQhcbq1P/On7+qFvmtJGfb\n1pv8Obh/PT9wA0Tloo0ypn5MfBBu3NRWKrB8SfTp7T4zvWPijUR+GFSo64y9\nHMhsBSwAOX498z7x+VcUeY80id+QSMs5SDsAZTno/PBzNHh+smi86tm4MzNM\nRDU4tOel7na151P2kLSlr2GspETWamGHXmpG/aM2TQREIrTb05PQyZ/U4TNR\nofYp\r\n=S7jI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFaYQEmiTCGZv8fi6g72cKbw2BJroMX3uwvRKGRNumMAiEA3mopR32CwTjBvsjvonnNqMUnhtUmBlNuOedr0/OnWyA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-provideFilesChanged.20190909204809_1568062374727_0.3030591004779861"},"_hasShrinkwrap":false},"1.0.0-provideFilesChanged.20190909210529":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-provideFilesChanged.20190909210529","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"061dd2b2cb351748d38755494d51a956ab43c144","_id":"@atomist/sdm-pack-aspect@1.0.0-provideFilesChanged.20190909210529","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wj311LP3eb7LdI0vKRZtTd2AVhQLSYt6o/yd28MbfHCrgUr71L5jKME+BZ7RUfjpRkHAogwmMSTW7Gq5oZj4AA==","shasum":"9a7ddd906f7f26ce3e05e0a6f1ce7650de9bbdd1","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-provideFilesChanged.20190909210529.tgz","fileCount":396,"unpackedSize":5110712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddr+aCRA9TVsSAnZWagAA6r0P/iEJ6rZxzvBOMY6T0Bnw\n8aTH0QqzaAzLorEWlNjxhrbxdraK/ETCDzZc3I86HlxeMzaS0lsPTW3xBB0I\nx6H4UJTV2eBiPyQ9+AquFq4IXX7qV9HrT2dMvA4jMkrSMJjZjnPnUD+5gVzl\nKUEC2K7jHeULtEkEBx+iQJsb9ElAzS4nXtBVeSha9oC3NmgO+W9uU89Q7vuQ\nCYYnWKXN+0zznI9TV4G1P6TsxlccF3ISH3WHM/d71brwdRr16p8/il2K/VIp\n0kajjGOPEq9i8K25hpSxhgJKft6cl73NFfS7H7BNaffjvM1VitDwAMymZsmJ\nY/gZuhNqYvutR6ZhPE74p4BtxIcwzmmF8WX3H8ZsE7n7UypzJ7Y2EWHYJNUP\nAWN8UTPl50dTR94cskwEdsmWZhq3766qUiYqC82lpf7XA2MrDE0o5fOq683K\nX+KDWV5ENEiP030lF/tkkN/NcCkFerZje13+SGT8zo0RhbuRh2yyQ0Koeblg\n1LczBK0lQjNT3CkTvFdCU5IelJ7mxGzh33zEAWTv/WQZZYLQNyuNrAowrp1I\n4sxDpXkWgqNz5JVGAllAks00X6+m/Y6nfjEFRwgNoTI4SvIzsi/jXxHQxzci\nLK88WGkXCek92iOeEwFdiZpWqPhIfph8IipN6JQ2TreaLgvYEUbV9KuW+MYf\n30/l\r\n=8yxP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOmMjQg/qcPdSJMQfRyp165/HrsfvAnXsHoILZTL0REwIhAO0yCg+HU3Ko1vXQwDvYeTe/veDDKSfCJzkzBFlCLeT5"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-provideFilesChanged.20190909210529_1568063385888_0.12567042184457922"},"_hasShrinkwrap":false},"1.0.0-provideFilesChanged.20190909224312":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-provideFilesChanged.20190909224312","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"1.6.2-master.20190903184656","@atomist/sdm-core":"1.6.2-master.20190903201907","@atomist/sdm-local":"^1.1.0","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6067fe7a7218964e2df835b9532db9f90213b962","_id":"@atomist/sdm-pack-aspect@1.0.0-provideFilesChanged.20190909224312","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-KlhPTTJtanzqudenfZd1blX/Rq5jEC2ABOOty4CmtBTKAAuIk0qTVQ8c+oe1j02PGb4jPtX9VRMPHZVB/7fSCQ==","shasum":"a45022a6d39d4463460b460d5570d07f5d925e83","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-provideFilesChanged.20190909224312.tgz","fileCount":396,"unpackedSize":5110813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddtZ9CRA9TVsSAnZWagAAzpkP/jxTP+3RtKfnxEpugO5C\nPdf9fL2rORA6UjEGPEYBl9iYXY5Gbv9wlLj2ZgbghZpbmBZ+9BX8sUWqZ6y6\nb0G18ofoNT0iLpBe+ZGR+F7zruRdim3/KUz9Pl/qx7++srCuVJtJHRvEKcnd\ndN7N0Nvm24v2bQVUWXuIiyZoWjM56LIhI/CNZ9nxIYFNgFNoTinkyAtJbw4b\njpK73jp42Ld+CDBVzlkW0xjnIpbXf9232396qtvdyXQdRI451+a5fWKFe7iW\nqwbNrM0OSveJkK39dkc2ig/zkEejSDPG3zxwZmTlVtgDQ5CPYqtz/bIO8TYM\nl7aC3Sm/q/WaeNDiOFwmxDgAE/P/h6IV1VOT1d+DJDogPfvMZMhm+20WIR1C\nIGoYil14NUt7yQLc2WcmKY8C1/y3fyYuzPdHAcNATPWqVbiB9bYfsJ/9ZgdC\n5ijpN3aZCq+oKMsIlxox5UzqESx4j0YjYG8Mm6FNTfuuVKFoepk85CzaF10+\nYlPc3EKF8rmYJ0KeRedTBa64oTrppf14uYwf2ycLLbjV5GVXuWhz/0CX+m1e\n4+cLvz8trTfnAsN36okIjuOm22yMc8v2pNFz2TDUJH4B+NW6Iw9pTMUlGucM\nYc8WXYIe8ZnAYaAQEcp0gwpilrF2P6cYhkiznRh77HlF7l2wRmtfve24gNfI\nHeeK\r\n=JYBo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHrRxXJNXl7SbDou/pDfdOvNbHilM+oROOzHYIktFB68AiEA58dQEbGKzUjQ+fZJwWBkCNFRuR6TO3IzpDWVbx1LJ7M="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-provideFilesChanged.20190909224312_1568069244653_0.2555897811448087"},"_hasShrinkwrap":false},"1.0.0-master.20190910082901":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190910082901","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e84a88d222d11df69ab64e97eaec50dd188bd28a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190910082901","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-k3q7sIt8bBgbapEunZGSbQZjZ6nHB1bQju7JEFqmaRpDsJ5yyKMb2gkukXF6ldeS0Kekn8r8RcpbZe6V0I9AqQ==","shasum":"a6a805d3f9977c255e113536493d22710176d205","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190910082901.tgz","fileCount":396,"unpackedSize":5111538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd2B3CRA9TVsSAnZWagAA9LoQAIwDwa6RrDAoyAFcDtrI\nXmYRAM3uC5OX5kfo/wop1rr89PMOqQBVBNPQoWojqtsw4Zbmm/m6p7wd/Yng\nibuknYwV22mUDxIR34GU+5a6RL1vcg8BOxKr2LOVEEWbig9aMbXvegXJSkUG\nHnJeyX1GSG1ouVUo+CYGuFnv9iRwxhQWQmxg2u/11qeaSBJ2ftOjjen7ImjP\nrTkHJHZxmZLUyFBKnfpLKvj7LfNtJ2pxeROIAYcXo22coVM/rF92H7EZCUT+\nLWDONXplBuwoV+4yUUfLB99K6DaV251O8Va328DP2+BVwafLqmf9ZW1hWpXo\nWQ6L+YV23StVjzSwQvcqSn8bovMX2BVUa5frlIQal6PdSTpfABsy1oQFv5ru\nt63rgGLnecf+I349Xz4JLtDFfUX5oyNB/8T30S8MtTiU0rYnyMSjOsR+nq/E\n2MBpIfMUZ4RCWMwLSxAaUo9cw6BzjH649ZUvtzn7vzr7BXeIYfUMrh53VHnW\nN5WblFdCNhCmy0GTxMCEAWTrB1u2UsVU8wIlwLYrblavsVdypjWbqGZantz6\nJBLOLN4HmXFBbSzwdRHVOCzfJvKDEAHZJXJGxn6rKiJ7J5VFrrorgReFyaip\n/vHiXHyyYjlO4bnc4ScsygUqqi602ecM59lw/RvkxOnXj0L0IhGVgdvVnwm0\nDfcN\r\n=a3bh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE6kGaMESM9S/sC/4/BpdzIx6YAriECPDxAT+lMU4MMIAiEArVOhTscHwGg3OmVorZ0CujtX7RsEK1PwuryoxCx0YiI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190910082901_1568104566292_0.33718616957865"},"_hasShrinkwrap":false},"1.0.0-master.20190910200637":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190910200637","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.0-master.20190903062633","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2286973d0e303967bb7fa0ad0bc883f70847b833","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190910200637","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/+6paI6FLRs9rLT0zI1Q/6X/+BzuUjkhwSRtF/58VbxogHyRkCcCbZmqk1HQTZ4U4z8ZXUAZk7YZ1VkotZjHNg==","shasum":"9211f9d17f3210ea97962258e4c40a8f64b65647","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190910200637.tgz","fileCount":396,"unpackedSize":5113008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeAN5CRA9TVsSAnZWagAAZhcP/A1nZa5VCWN2+BEDAWG7\n169D9XheOWc0lGxJrixCmAhLgShHPZcAJm3b1Ku/6nUkk8kgwyX5AMEhnWPD\nuSytae8a5033w4cq8+ZPZg9AJkpJ6mH4WgT53i6JtvefcR31uK8PoGnJoNuw\n+l3s/bNA/9atS/kLXJaYYGEOeUu/K4P0GEBFZzeutgmsEfjDSg/Y1DrQYEbU\nu3AFP5tmzlx6PchV4Tl7/0TW0ZjMwd6yJgGc7NiKvh/6MZyQITXyR65O2SLb\ncGpeqn5PyoUnggmBaDb52+9HcMod7tRRZv4FiE84bLcExoAlGKYK1tl6oTQB\nMnfI3EmejzHOwQIQAaSk6EjKFUmb/zSHlM/kOpz2WwFls8bAfY6NTLAQKB7y\nmelPSWY/yiM0iy6mNClYm5u+a+9q/qsNpchADLiHN7bYX6+zbxZ6tZsHctCc\n0y855Ssf/tKTlVr1sQ+8ubphSu8W7y37YlTd9RMeRxSpLw10La4Qel8nDi/m\nva4gUg1Z94eIPiS2yjoEH14svCRDhZuuZeS6TTUPZu4ZoB+LshX2AqWcEpQB\nhUipunubLdqihJNOSnmhEqXmKE7K6Vd+Q79YyAhwWQHnfJzRa7cOGbakO5UB\nIahBdijCUyMDJSavDdA5imMkSfilRToz3G9vKaaz1SgqOejbqkJrsiRQANOK\nOmRf\r\n=ob3K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0iG1KZLeOYHoOIWaUxMRqcIo/7KRqtfQDMv6jQJ3CsAiApU1Y21u7sS4x9BU3wLTPZjllJ8ERkU9YlNynyvTxX/A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190910200637_1568146296440_0.7390644418941721"},"_hasShrinkwrap":false},"1.0.0-master.20190914014048":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914014048","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4c33726aece17969e1a5789a2428be489efcd6de","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914014048","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bFyegC3iZNn3uyeu7CiQEaijxUaPdoGMKdO9lWwsd/FCOsj5qhz8j4bbIUaqFzuOgxirQHhLKsS5fRDlVMIUvg==","shasum":"8d70442b7728b33f0e83c0e6b088202883f63017","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914014048.tgz","fileCount":396,"unpackedSize":5114675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfEXxCRA9TVsSAnZWagAAo9UQAIifmhjpykB99FCDEcJI\niw4ZsfGSXpHfFKJdHC/mfXXghmZms6NlRNtNkF4qwAtl8NGsjT4h10S9H3yS\ngRscYMhbyngIObRSh7V880ucVibdOmmSFFa3XFn320eDh/e4H4NXVVfvcTqK\nFHnx73k6VYeMm79jmZDN45ZCOt619oCgKfabSg/njtwfXV2v61c+yy6DKP2W\nRD0wueW7hjEUxCBoWK68HptnT02TXixItae+wh6OvvDH0TopsK+oTDV1o9oz\nY14l8WM6fCeHzmh6f6z7sFVeDsOAVhu125P7iNgtmVmKoNxYDkA3HZxRmcsu\nk5hjEl8Y274NaZV9OBt/7sCzTz8IpbSK5jLu8sEzxt0HVqQGGvbtddaZClkq\nMmsuEsgCW7fIczNd2FZ+xlxEPQ10eOtZ+QeN/lOdtq/qtNBmMQP1+YO597EW\nHigiEbg5cW8+3nKfbPmHcMfzOjuxSzE0LEdAtkHszQlFFGNlIcTSWCcFjoet\njXPWzBNTC+W7XtVOTvXYQ2ZTlvSoWWwKo+0ussJ16Yq//GmXVtBN78pv8DhX\nWFXWjFX29Dx+ssrJlvAcmOxCH2Cg047Bm06GK5ueY4KDfAdZ/3XpO44ANeiz\nlFYnoSyeZ5fckD7yG2fLPW+S2zYZglpNinHiFQlXjf8js7j+gQSk7sHUC6m/\nRD3N\r\n=2lDF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM1XeDBjjmpH7BBlDXuI2EeVO/NimnNRlpi6oU+ou8hQIgIMZ8sIFs0iYBXnZs9StyUPS5YvSsFrOePQJzwBeItJ4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914014048_1568425455714_0.8088393821091167"},"_hasShrinkwrap":false},"1.0.0-atomist.t29e48p34.npm-project-deps.master.20190914014318":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-atomist.t29e48p34.npm-project-deps.master.20190914014318","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6b8a75e618c28f3dcb9f7f29f4ee5a65f16cc5e5","_id":"@atomist/sdm-pack-aspect@1.0.0-atomist.t29e48p34.npm-project-deps.master.20190914014318","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-7qOJ5ErdaAXWonxP6K0mHQR0tkaP+MudEEzUzsRi+yKHKQvRwW8UYB3lJMx2l8a8SzrXS5YDc1WL9XIdiLxiDA==","shasum":"ecfa70c4b1a633e33c81bb3e22aea4f5c1c8eeb5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-atomist.t29e48p34.npm-project-deps.master.20190914014318.tgz","fileCount":396,"unpackedSize":5114703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfEbbCRA9TVsSAnZWagAAGCIP/1DHICPWMQp7rwGGWYv+\nSlczlo3uATk02Gr+k8cLIROmcyF2bF0592bH7y4OzMKXzDKVfJLZejoSK4Ut\nslasne7VxFErffKR5mEz3xCq0O3mpOONYwiNWJsmdh3Scwjey4utdfcuJ73M\nKrUXJTS90tZC9CKR8maO3UfxSUXMKQZS3047PjV2unLqLbKjb5HV/v+zPdhw\nGWPtAZNf2coCuxLZO9Uh9J3nf5/td4DWYFF7bJWM/Tamvqt8i08VvbSUg6hb\nCEKw4kFrVaCWQkHKVqHInMImMosl9UPJgEu2ni1ALaAGj3TqkLlkEguqa4pg\np1a5r9lVrWZ0enrDlfMv34ITtRmNklXhBRPDTc9vvzkfzbBWxiIbOHrTQYUN\nFgnetpNgvatFlL6CT7hdJPQD1welI7ctlb/wN+swhKWgZk6hz0fXxxCDiHfN\nLOeIIh7YNoYA3D+gtKnvHvCePLAijvGFBL2m5ZE+bzrH1BaGxkK6DWK5iwcL\n3mFJIu0LbSXRt7M8wHlhshK98IpMbDWyCgK7U/LkGYvNupgLL6g2hnpf283S\nzUQprJi4lOGZFU8PLLryrnXnANU8FwiVzqTW9O+UCxbDfI4lU+lqNmpbPwMd\nNq/G8u53JyWcwH4F1vTu+i9GT15Tn9SlQwF5KyvpnU58EryDBZDrJwL5hS5P\nAWeH\r\n=q2mB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcBy+Pp+paWFlZokznEZ6MDJvHxf+m6fuZ9FEbilF74AIhAIQ7RxA90yuu7bnUPRSuOyvMxRyxf4Ti2DDpL+vjweli"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-atomist.t29e48p34.npm-project-deps.master.20190914014318_1568425690478_0.03478092999448168"},"_hasShrinkwrap":false},"1.0.0-master.20190914021104":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914021104","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a729f580ffc9c80dc0b6a13d41e40d138ec406bc","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914021104","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-tt2ZAXTYG/jdWQW38HHZ2hCHBrIZyipOF8dvREUwFDqNx5paPO0fDNRncyCby8JkeoFD/hlZtUlIKCb1TBqn3g==","shasum":"e57e0b91f09b69a727b5422ebd5541f534f13459","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914021104.tgz","fileCount":396,"unpackedSize":5115223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfE1SCRA9TVsSAnZWagAABjEP/3OJN9sz1ikDq4AOnpxD\ns3vkgr/1yh4NAkbbzT37O3i2Z1jKSh6jV9tICpxiY8pH14ACJX8at6J9bCmF\niLlHnPYAKPxsaN6OYuF2Jdhur8UmiSFtz+nspzxUYzISobNtHtkfgdkSYPd4\nco30SOzHEoYhuJ49peCgTsqvNhcxde9T4owehUyZfWCul+FyNb6Os1wkejdq\nv/8/chsujyVf4YgXE2i2lRChy7DwxgDox2aHAGTilqqfP9gP4wm+2SpytNpe\n4oY+m8KlGkh4UMZF5ZaSFM2zrwMxuELHGhVdUkOrwhJ4mo5oqznbxzWNcuqY\nkHrjnSQ8i5Qpsc/fuBf90Dw1Se5oNXXUCfkdkI0O4JGcsqxVdXijS0rLIVcn\n+5qxLe8xrmD+qKMZRd2WtAPGfsCUFk3E5J+xRZMYrwJYq4JsoTN//FEuWFAj\n56g2VaTUDpHAi5EIXVyGhLT4NjTuqnBkzV0qh1YmRD3tB3tvJmir56tkGJvF\nYzj0Bg++6lU0eBDibLupDIRXDA0lSbVtm3RQbO9wvlB1lTD11MzTklwiQqe1\nU5c37+TdixokLtY05DDwF3Scb/2Ed+J3tKYrtywuiN/C8CTHk00Wb/kWgqbt\nQ4pZVKndrNhRKbyPHbC+l5LLyCVlpHUis5eX82PabZ4VtILmNgA07/qs5jos\npf7n\r\n=EFHG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdSqFeY+dt/NVuCmMZj7+wKUuaGjMrMZTqWHBaRWEe1QIgRq2hVGrjP1cY7Tur7zCdWIgatZ7Stt+z+2daSjh7sNU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914021104_1568427345355_0.22158469902010025"},"_hasShrinkwrap":false},"1.0.0-master.20190914164934":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914164934","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f535db2def252c76b379783cb974e61499127928","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914164934","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-1axcey1WOQuAIWhjZvFX6yEZEPErMg08pZd8Di9TZ6kZsipJki8W7zWysycZOSKY1sSe3IzqMOf7E+cUbshclg==","shasum":"c3052c583c95751d1a376e4a46c9f88e72f41e78","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914164934.tgz","fileCount":396,"unpackedSize":5115736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfRrfCRA9TVsSAnZWagAAXlgP/1alGxXBy29Uyn/lCyCq\nlMmJqHm88T3BDTtttQEFZ7QsVamAYU/q91Ygl/kzRWY1O+PPv8T8w0PW3G4c\nQttny+69AcbwsM21YPytYFGbd3XlDYTMfR2zAXBs/pTltu1velmTUS7lNsB4\nIeVcPwrMUDsTXLnCijBIcOa7bEGjuDRhbdMCxeXfH1xVGxPsLkDfg4Rq/0+h\nYFaxYeZ8TjW55tjbF4mNYakE9X0mImDpj8wAKLoql4uRrf8FH01bswBJyNwP\nqE0SIRycVM5Nq7vF2rfvCe7Qwi4rQzdNhRy0yxnW7pm2Ae8GEyPPC1cn1QRD\nik7Q30L4za1y/gnIF1X/tudICLZOB8Dczz2qv1+Q7DOgVQzUlhqS+Z4tW2pl\nmNik1+zYTKF1SOJ7MA43nqHLLE8MgLNGAQ/b17RZXQxoPk4bRkPSvpk7THRZ\nTKe/ZBUNk8J9sVx6V5/fI/mGTlZraPoICt7o/oucqoUMzxLYvKsCu25BxW4/\nPsgClETDksC+9hYVNNMoNXZ0sDg1mkCpjy40W8IvbgzOzhbMdCHxhNQSeMQy\nFNgpmXeOuPs9GnZEHTewOCZB2jZABPiwmIqdwNUY8C2f2blzjKap5EykF1la\nyu79n2D6g/9jeYHdFmMRCcNti+3fGln42qrk4gwAZwOubik5WaMiUeRqZOuq\nUAV6\r\n=m9U6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnfFJ6JAsQkUvjNhZYAy8pk/YQLm1xNEWHFT6TDpnnoAIgNABXiMCy/VdKAXNM5brUuM7w8tIm12SkSp9TeOZKaiU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914164934_1568479966181_0.7986097772887766"},"_hasShrinkwrap":false},"1.0.0-master.20190914173344":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914173344","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b9d5ffc37d5bcbb08652a5e5eaa36fd1a81cf36d","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914173344","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wzEjG8Y1csRKDhV5x54F7qRd1iqJncg6E5NVfGSw/eezyXtxi6RxwUKaiJ/Iis7pkB1daekshSFtdjP+Yw1s4A==","shasum":"8ee036f88cc407b0cb003236a68bcecd2e9b4927","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914173344.tgz","fileCount":396,"unpackedSize":5115819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfSWaCRA9TVsSAnZWagAAJkoQAJ5m6OVzKedIfWvh06p/\nNQ96TO4kzfvpBDGmr8Nq+uzspwJw5atcX5+JeSYtBFJd1OHrJZ3hMiF9lAq2\nevnKA/vm1Cpz76xgPzfLvixs7e3VLpr8z9GYoocb03DgnBCWztleJm0D5jzA\nBj67UdtgNqYlnRWje+PcbHSn5GPmNQQf2OtUAcXToFvI3oj6Ckq2dXT4aj8f\nqQqj2aRssC6LDvIPg9UB8wQRl0Gy8qOiddyQpYYUPHx44YZSieGtpnvXPc7V\nunKwJG80SOT0dqo1tPIrK8joG8eXsKxWmyRAOsm/BlP0eBJgEJQJfIBoBfDM\nBMQNxalJZUhJ+aSjPrwYez6OhUVYkplzsLziYLTzVNpBlBMh2yD5CIhEWdvu\no3MF+qLyyic7lDYQd2PNhD+0GPg4GRtCBXaKqpSLKLZXBnH69K3xXnMj7LqW\ngbd+2q7pzW8CMyAEXRURQw0PxNkz09VK3l9IBzpJnB5hdsA6ATmTtGiwEkwH\nJLHXNGEHif7MWUtmjHom58bS3NasIIKDBvwhdoWTHu05j3Dt8Q1do20vFF05\n3OTDB/AnDPDIuDWMTKQIGAO5GdmzSlwVPtzs0AGHWEbQY7if+fHFnokFxbv0\nb0qKInHpzlJixeIJoV3kSEnCGuYt6FcHrB3H0Yh2tZiysny3MmNO6W02RbFj\nQ1WT\r\n=8LeQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi3FbL7+LC2LhBgGjPZb7gkHUreVw+kpEECC2/ZOZ04gIgfmRpgvJawXLfdEFk44vmt9UZ0rlv5981atLpQKYOriI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914173344_1568482713316_0.895910265453046"},"_hasShrinkwrap":false},"1.0.0-master.20190914213135":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914213135","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.5","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"1.0.6-master.20190903202948","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"2.0.1-master.20190903203948","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"497b5a9d6be24957dc762f1517c17112e3ce87a3","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914213135","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-lGKNvsdIGEHar0w4xJOt3zPxaQRhyprPeiYKxCwo0Tm4B1UaenOsZCqnl7BKvS2K/N6dkzsghAJr8guX0nn+Nw==","shasum":"a7782397ad52768732304dc61fa37205a7f927aa","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914213135.tgz","fileCount":396,"unpackedSize":5115306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfV1jCRA9TVsSAnZWagAA5VkP/2AEMQivw2ubyxOtbrDZ\nX2KWvrzUv/2CuVvCXU3B2pjbtANqWydXtL3je7N/zF8AhwJLOYqASM0kj43v\nKaEht2DpyGyFydWKp0kvo0thsHthJ25umyXNslPpZ+0jhSgbzzah7sVxLpId\nH4kTwwXZvrECOhty3oAcKty16JpUlpBSbVzb/P6RawlvihDQcMHvMf9t3cGu\nBQMNOmLlj3hX8XEyiaflPGcDyvem8kkrWWT1MYpnLDHF9nDK9rysUmZQw09s\nqW48Y8zqXjcp34JgHzp9RiWF32JYZaVnRLu7qe2dxvDWLklhODP7e5p0ICYP\nK2b1czjU+BGJuhg1fOYGSz+76GQOuy88KJxpZGIsXgbp/pnNZm73xPodMHmi\n+/zgTyKgW9+ZN/voDKQo6vj6HSOxgSSwzyeweZCIr5vIUjYGGwtnfVzaFQpi\n0LUMfzFX/cwTxETvkuFz5/Csq0iD9q9dd3+4rIapXefj08ZjiSrCibB7HDCF\nz/jtVgyPNP06EurcUpbiAZAj3xzhCjwX906oiImZjaqMWb2n9vEQtStKtZ4e\nZ+U7k419EzpniWnHRzJsAR5YQ+oM1XpXxkyhiTNPhd6NXtab0oe0MbSCnBVC\ncNlV7QRoAQlbN+k4MnMC3Hz6RUUfHIlCsyesIybetk4+baYUCcz7FeHP53fa\nxXYg\r\n=D/s9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTaSm3TrZ1mAkdt2e70f5HzftirQAZDRi2vQwn1aZQkAiBcjKnSD4c8EZMRIzg+c9ny1xbAQzJe2P5EFIlns5ismg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914213135_1568496994459_0.5501911996130651"},"_hasShrinkwrap":false},"1.0.0-master.20190914223012":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914223012","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"63cf6863a3fbf4646bab2bcb724c3488b9360fc5","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914223012","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oFDzJenm9j9ISFbwKJm1opzHcqk12gwMkNRD10m3HAqdDH/iFqm6cNwe5l78kYG2TpB3rLanxay2D+xigtaW6w==","shasum":"5784364aa200517fa26286950b90dea9b342de5c","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914223012.tgz","fileCount":396,"unpackedSize":5115363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfWrzCRA9TVsSAnZWagAAYHMQAIcZaGKaknSZV5JbT09V\nGxJ5sV8TGE7xBVy2jAtaEyfpRVEhf+lp+D8NCXcvIHxJSwzcCRUTG3EbTIRt\n6mAxgABnMjrorVg9SYJReWCqQOua3kcOSjSnEej6d4WVDfF7nRGpVPr6v7zB\nXNIb2Ry8ShPIWxXWbLzWAuhPByNtbp1vpoTBAGfmfB0dgyrDa0wQVM0kqcwL\nA9USHigDt3VMy9TKr9RG/DOseV3w5RBKjk4RHBbKJgSgxpSeuZqX700bffNZ\n9CagzHcGRm22uahcQUrHFYnBU+936krkKA1njbeMCpuM537TiOh3gYz7CIKo\nWE4lfnA8GbvZMv6tGgvmDe2IK7Kww6jMtFsChlC6wW3+9TrxOv8B0/8dH4iH\nZGWxSnmYgQkXt3iLx4hpzzwjwIQXa8P0wYICP7Ucv/M3buJ4SHcXZlGoAwUP\n8qOx2wuPTSgI3lSbUivMeKDTBASGIlaeb2PWtob+kncxYyvrYODC/srcgwz4\nRrOWDd33BTjRB+Vm+UNdwZRd1wnYnTNt0lT72WczY7w3bW5uhgJ93Bm3l+hp\ndIEonSxTK/rk36Xbz584VzzNedijW0r5EDV+XGKyi7NfhpKD4vCavvoy9PyY\nY1QLnyXTXvzcROQBzDoiYClcfLRBafJCn6rn0byNbRp8czVyU9Tjo8caRVzz\n1X4s\r\n=IJGz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7Dr4X5upciClDNdeIHr090UlUA7My7SiN3dDiYFD4lAIhAP5d5MgfJCU2mxHE5l5ehsZ91ef5FbvN13/xwkbQBJdf"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914223012_1568500466528_0.2019731180255917"},"_hasShrinkwrap":false},"1.0.0-master.20190914223244":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914223244","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"63cf6863a3fbf4646bab2bcb724c3488b9360fc5","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914223244","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ktzaF9XPuS6E5Eu8gAsoGskfX8kafPkU6sJvJkrgtWP0wtsVNv7tRjw7UKYRS1qIXuggXoyfk3bQn/jrugTu/Q==","shasum":"828f7accfc8d42c120913a5cfbf0030ed9690210","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914223244.tgz","fileCount":396,"unpackedSize":5115363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfWwUCRA9TVsSAnZWagAATGgP/1ACprfQE2Y4aDULOrAp\nz8M3F3hNHAa3t4olmIRKqWawZpOK8eo7f7Pd4Mo+AjsPS1G6WKNu3rNG3Qiu\n3CLP/GtlhHiXh138+p4fAn3vxTD4SbDi5EhZGVFZLBsEmOdZPcbZ2OEDXX1V\nZ2J/cb2IpDP/ixXahxoeAK6+zxMlepBbvO7B1TThcLJXgAEqLETeyxO15HHQ\nInAMKIOUjsMwCK7qFyEoobhkTwc/CtKF++V77woYfGx5DmD9eVLw8OoCxzqs\n8ipgE3O9DAGUIT3M4I6Rt25Yl1Bk9xM6FvicrIPNJyJ70+G6PnwvCi245Ql0\nI4c1FVcugVGaSOLsVDddmX4YNDrO/+V/G1DE7mzRKfP7imzb769NZ0l01Ufb\nkHZNi8A1NZN5Wvits//Vl/WeruP/KVc7movbklhBLzfF/1VyhtBouSRJCiBH\nO3AyQWf4buYe1GtqEL2jitoexhOJlDsxm3NAH17F2Z2ZMm7xWfiDeYJ5eSWl\nqJlFbIeXYSEzhpMBDgrP34plB6oXYt2gUYoqSejVurPpJ0E2BrSzFF9Sj8k3\n/perLJCVMx1VVdT0MawG6UYSqtT7B3+mXiPhnkkrE+2o566rAQl7yZ1gdBXz\nJNzY5EVmz9sqqAvBA97cYGir118iKzi7syiWeBKRJICqmA1/xyGckh1DXJJP\nerDI\r\n=8SIv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmRivGuhYkRXut9G3EAJa/i7kvFBXWC5XQUo5u2gXOwgIhAI56LOJpSHUhd7sh/kAXOs18FSfgpkeybTJNi6Ej6Z1Z"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914223244_1568500755917_0.20206473742461628"},"_hasShrinkwrap":false},"1.0.0-master.20190914231456":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914231456","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7f4545294c7fad8e72fe9fa02a280afdbdd796bf","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914231456","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-7RCx/G2rvp4LGoApBsfo/GYHY04PXB9NmKNnt+i8886xAwyAh3SIUyhZMCH/hVG3hROFeyi1Em0WPWbLMmP5FQ==","shasum":"6e10a2ce70f69e91b52afb843dc0ec42ef75a4ca","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914231456.tgz","fileCount":396,"unpackedSize":5115618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfXXqCRA9TVsSAnZWagAAWUoQAIkMMp2X+1HFckIgENju\ni4V9qO9/Pj18XrE63vOF2dhxE8IPl+VJcznFGhgsPIuleb5w22wvrXjZoTWT\n7KupxcwOfmAxRqgYlAhOo1BJSVhJI+l4/d3t2EZw6ISK4hMmG0qw/mpsQmcl\n2Qkxpo0jKTa+98BEJD7EEFKKRm8R4TPxYc5EkxzsIJuWNrwY7v5JyHF5e71n\nHt7RU/pDcAHcdsKzPzhz2Wqqo9uF0CBvgzwATplGkHGMvrCIfIpk0Pca+cVg\nX831Qdhr5kIzH64fiZPr5vv03oFUoW5/Hsc78+vqcT4M3XoLJN6AEobV2wRV\nm+DotbwEk3k3ZnWrUoOB+SDP5fy5lDcqdymMjeaDSgHLxqdGHpAKdilfaX4X\nnCLcjKCv4ypV5xZgqHHvnfKlwFZlAOiIJSrST90xrjhplXP9iQ1YIQUYzqp7\nL+b0BGPcGc8GZI3LJ6Dx8XpH/cZxG0H7rtGgHIygt9ppFGH/xxUQZYLJBwRq\nxcmKBWs2zB+NwB9hKaaBCFD+Y3tt4S/1UCn03iwq72xC3EdltGs8H0pqQ18b\n8WzpbgtLjSrB/EO4vJ28Ti3OXntfB85GAaqCCe1H12COhjwRloyX+vimz6Y3\nZMghWx+mtEfpoOMU/q/rUUSaIBIqGa+FA4pUZbl1vU/jR3XioawBaODaHRvZ\nab01\r\n=1QKL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuM4IVHV0hR5SdltBgc5VWuQnjKrKxXk1Ft7/uXk5oowIgDBcdH6ru3ALflf8jM59ZhRZqqV7L8LQoJZI2ep2WvlU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914231456_1568503274140_0.11951999363948884"},"_hasShrinkwrap":false},"1.0.0-master.20190914235530":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190914235530","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"9e4c218329b12266f6279559445ad4a49fbd0d8b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190914235530","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-t90j5x2IGvUxZgMeGbALO7f5fGB837JE0J5hOzvr6JmZncyQJ+7qcKkjlwJfNuhMJvN/ZRjlSfxOm5nSd/Pn1g==","shasum":"06c1f57fb0c7d9f70753d1f04709ecd6f4e2df89","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190914235530.tgz","fileCount":396,"unpackedSize":5115785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfX8XCRA9TVsSAnZWagAApGYP/2YA8rhGcN/Z+1w8DreG\nysju4XS13tuHbGfFOezPo3PiMF0nl3mJcYh0xFznw2gMSdWlvcXJGLKUcKut\nmUfnhuO1Nb5UbFFu4ob49LwHZLfSCo82QriHQBTbUoaeT4gWp3YBYHxQPUyK\nlatojHzuMnTnsgG97uT99BlmXF6bgHTGRFVw6rFmlqlTiT9T72rzUUm5H1ow\nHh+zWKU6jvium1dkCfCd8KJRUGIpzmUb4jxE7daEd6PiSLYNOkyLZmfcUJvi\nFIXljHdKMx9IMxZFqnu42r0YwkV+f4fUnBSN2736khEU6A3SIGnckJNu50iB\ndL/7Md0A8oyIJUZKA7WpLc2qbdYCEVGTnKS/3VTzNmrFLsnCw1ip4c1IZeGL\nj2DSPYHhev7b/E0zyO7F1m98Ei3rpLZi0dNdUJyc8ioEHskapeL/lolh+QC5\n40BiENGzKuGaHcF0ggJfEANvHlK36X+H8wSdYyS/Sbgac7FW3aF31Y6YWivh\ntUlYdZTbfZAblKLXMumaEhdDXu3yUxM5bBBhvUoihL+Qtv5n3lc2bXBPU6TO\n+CD9rthYOsedxelYYzCXTw6fxltsPmCjs7Wxm0SPyRQixjHQijyvg6NKoXK8\n4ahm/L7VcPkj6MtChiTH/jNCJtBVf6Sj2IrnQ/3OfrCg04zg82Gn57yelBvo\nSyrv\r\n=53ws\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuf2tUNaTVU2AXD9HXEveaqQMIByMnSHfYtpIrTntNMAiEA2QI3wEnEa+1pp7J1F22T/b2F19fzb6oTGH6JX5HqFk8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190914235530_1568505622240_0.23299266306579858"},"_hasShrinkwrap":false},"1.0.0-master.20190915175546":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190915175546","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"30a8f1f58387b3e8423d7f06948fc6e862f29bfa","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190915175546","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-OFinMcf5Ops3qcnfFfV0Qu/l79vhxwIJkygNhvDZ5SsgvTZii4DEmVhHarMqiL/Jt0pSL9kAmurieZ46YqJ+0A==","shasum":"6455683a19fb84ba7ccd506a1eacbd38a57e43d0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190915175546.tgz","fileCount":400,"unpackedSize":5121204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfnybCRA9TVsSAnZWagAAkFkQAIIbukL7sp3TrZQntHFx\nA3cMQKWmN9EHF+BxZUkzP/NBguhtGS75Cj+66z1KlWih12ZpTsNoSiFifyJZ\n+4RSn2udoYtiAGMe3sRFNyZ9PruIoPZ8jFZCnhvRGubcZ4f+7wiTMrHjQHUM\n3DGCd01Vk7U0N1cRSbQDeBxX8VnassxcPw5pW28+I5pQwfzv0S+I5mBYYRq1\npt5hzDIoXHBASVNkj3iPK4L9FR2XSDJo301WPnIkZf3kAmPIF+yLEI8TLZvX\nT+yS5vbHxbrBJH+FdjbLY5f9sYCjMrMczYcpsK+Qt3kYshjvUqnKa2u28CKl\nsonJxXeG8Kx33pbwOXOssOg5Ol0qmLVghGcpVVZOM9QF264awcUkmIoprIdM\nLR60x4QnELcJseSc4XK6gDVXz+A1ytSsnAqLUb9wbOLSLi9Dtd/TcVO5UpOg\nc+4fIzpsr0sKW2TQEFIqEDXnG5sW5kxsGVejM0vzPgE0FDvqaXiq880IgvfB\nbiHHetuzxN03MH13WTjiECdPELE+34PRTo6VFc5QhcGG0G1coOTHw33ICZ1n\nGwK8bya17emGJJVVrrn1iABSIqqvyDaZYwASnPoUnWkCUuleoJw4W8HHZs84\ntRiAibEwn98q8D5kTrupD6CSXAfDXtccyj5iopQAvdoGa7UsUlsYAdgtgBJI\n1tju\r\n=BNzP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDmVZfD0RUROauz4DhmSrsppJ6lZEbPtfgBGjgdooybQAiEA5OZungmWaF9PQnxvwMMUHT7kADLThzHr4+RwqkB2qgM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190915175546_1568570522025_0.3712316076529032"},"_hasShrinkwrap":false},"1.0.0-master.20190915181302":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190915181302","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"661fc4084bb1d08fafb74e053be55578f9388a8f","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190915181302","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-s5T5Wecf00K/bYODZ5N50Q3hIxm/T6N8ff/8NxVjcCffEvhX9hLlGSLeHRTZgu4y594XHKOc6QKG21nmwmqb0w==","shasum":"215d699dcd4729b70d48612f57d3656856f569ac","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190915181302.tgz","fileCount":400,"unpackedSize":5121854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfoCVCRA9TVsSAnZWagAA5eMQAIFsLcwdC/OUxk9NNbGZ\nSgDuuqqrcl/5lDrp1ck6XFW7uSMqFIWYtdO2GknS6Kqb/CZGeydUmPURU7R4\npRmYseT2dsalzhe/2uGv03dckcHQ1dC5Bd+MwlXD1VlNX0jHEhcxWySLgEtX\nTyNkjXA2CDHXNnLb3/tEgBuoWZEld77EygNtF+vBRyqtg5eBWPlQJ+szRt/Z\nd6gpObDumtndikgKgQz2OIa9OY32X+65BKbQCq+umFiCggdXJN1CiNP3mASC\n1yBChT1OuRckGg9XOwxBbxetsCvOF3ZEgb5KNYnXkFsc43Z8HaX2k3d6W3oa\nF0uf51m9TiJ6R481EvRhTCYLg0H593nRf89IiAsx4+KAPqHUv5gxJ9d0Zify\nqQPtE1bdF8HY1DF8VOaY3b44wju1a4pK18CXb7QTzsIggPeUyg/HhwVfZfD6\nqzM+W+XdJtVZxSw7N+FfDllS15DXzfcjmgP2WynwMtyqCcbd9nc3UCvmrSqt\nNyAURvpCBBI0OR6jpcQ3mXc92wPiTwfciwx+rSxcumQAJsWyIsncEmWstqx3\nEPX7fKJOSVDE+TJmg/a5yKughgXhtR4Hmt2pq7ssMOddcbOcVwz7IjD+YN5p\nVVyNvsPqz3xiFuTn0KSVk3KScxGQnlNGnyT3zBzIX4A5fBLiAhdBS06Ewa00\ngc+0\r\n=TFZa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY4Wd6IUa3+z9GVJ144WCy16g46e3VojIalIKoANgGIwIgaBDCVAK/UNS1D1JQzmAgXrnXCwlev63152H5kk0rBF4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190915181302_1568571540751_0.733454645709716"},"_hasShrinkwrap":false},"1.0.0-atomist.t29e48p34.npm-project-deps.master.20190915182055":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-atomist.t29e48p34.npm-project-deps.master.20190915182055","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c767ba971812beaac09bed5d4a88da00f03ce66f","_id":"@atomist/sdm-pack-aspect@1.0.0-atomist.t29e48p34.npm-project-deps.master.20190915182055","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-XEGSN/zAOTz4NPZAoYeB1DJjEWMJ1Y0ld8orThCplrgQNQ0aewuk1oJE0BCsPpOsfuJ0NL4apt3OYBTFgR5FZg==","shasum":"e293a278d1d1749c58ae429b6dbfeef6680f9bb6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-atomist.t29e48p34.npm-project-deps.master.20190915182055.tgz","fileCount":400,"unpackedSize":5121924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfoH0CRA9TVsSAnZWagAAqTEQAJt+y1yG09f/Eyb+kLDt\nS2YKDC5zKcdzOYjkLmgwb8WplxR75iklJWoKkxoKLZpWC3Bsfeyp85H/uXeN\nMhn7zaVUxrsMZEjOnIoLohTpnkuH48jQA8ZXDXsAaFYsLvYuDQoFE3Tbk/jE\nr2E6uOSnjXJa70DYDFp3g90Mu1rH5y4alAKcLWAtYviQubsqKCrBcIuemA7z\ni3afZkmBUIHk3YFnKVZn4NhesF3oSPAhu6prTDcl7aKNtqAxzEqEqbafn5UL\npu0SERCGw6GMoC7u7JueOPH3u23sY7Rj3wuaYSCSx93dWqWUKr7zt+cGhtNO\ncq6sVKA+H8yCIzLQgqQn9SbU6K2lyBEWZ3+5yCUMRNTpb/rumxwgq4Q0gGXh\ngxTTsQRJiDgwldI7RuiRD4ntfgzRA3YzbzRltTf4Fnlo3FL7wqeB3lcj2ZMl\nxe8yWoOz+9JzK14x69dzW8pVHXTfMnufwh1dSARAFvpTGERWhfW5HJsiXwQC\nWI29ZjyvpYdvXwZRy1Fe76h/yv0L5a4XzmXtH3b+pGkq32fZ17KchAG6ubLg\niT7+W/OftMgo4ftN56nIf7JIA7sHlvnzIiplVuHzZXDw/G1BJ2ouOj6yikRm\nTo5yj7D42AVGmzU29uOWoSprMuIvFxMFuOmpXYPPS9vHLl+6zXOwTCk9cHUT\nou6Z\r\n=0X+m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYl+GCQTQr6M2Rf4GSL/KZev8OiuiCoxVEVPr5DemRJAIgBe/FDZWI0tHGyqMsbWZD8ailJodb8z8g5kY01rMzTco="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-atomist.t29e48p34.npm-project-deps.master.20190915182055_1568571892195_0.20679252904940615"},"_hasShrinkwrap":false},"1.0.0-master.20190915182939":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190915182939","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4a71af50ed3e3825f727b6ddb279957468fccb5f","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190915182939","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-n3AIvNw8boc5Gih3PX0KEYuAUFlX41P5+lntV9bwoq8gQzGngcim8nsscCRheM6Z54GvjbtLb1Xw3maydIn6+w==","shasum":"b2012633afa4b6c11030ec9228afc3bad63dad6e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190915182939.tgz","fileCount":400,"unpackedSize":5121854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfoRICRA9TVsSAnZWagAANJgP+QFhE5WXpsofRrpHqdRs\nkicvBjVr02E4zEy4An9OfuOAB1AOpXq1CELJ1QwzOWbxMqOwNmfk3T7ILqUL\nt3cysSUX9b09V273wPdAT5h91zUNsr4KpXYjCPcZ+EWJRFHcq0FDWG/UjccA\nGjyfjL+t49WHsn5QkZAdFCsRojoAO5YcMVuaGl3JHQMGWNASF2DYrrX5vFW/\n4wW2HVJK+KhFeiD6cBSWgqrIxVAgVMCrS9x30dSs30wUIEDOVNwTcspTZLzB\ndJW/L7Lb6LSmY2q/8XkXsEuTjlQIG9Vv4Mil3nXGqzIDkdgXJbaUNP2tT7st\nywTyVOxUBGKjffIlDeJQJ1XvECv/tVoRQCu7camw/oV+JSF9EIgyEjdP8/fa\nogwU7NOgYcRwXLZy915/j25JHP7xSRX3b7oR04vfhxHA6Zlq4Jcu3PPRC/aK\n4/PNR9sV+iZknDfPXNQmremvoheqlqjRdj4ruGaZ34py3o/jKe4sTqK66C7+\ngVhz+aSfDWwTt67trw7SWNJmV5+0I9NCOHEZFqeF+689LEbxe5Zdnmy9C44P\nPxDXWglAc1x4lGt3jZaj1xu5OIVRHAlsHXaJBcPRnYa4UJcQB3NY5kMJL128\nWS/NLNMifZDPoPP1YUE1shqFKpSRWb5x+SA/tbyrzRPOXMPmI8QU6TsMuBQe\nAaQx\r\n=jwM9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ74ZQ1tHbl7w1mqqMqSZc3pctUpw/CDTdkEorsZf3OQIhAOPZX/lLjB2MfQyQhyFcfohg/gnXNYyzCBnO68v/JiOk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190915182939_1568572487743_0.5478018618074465"},"_hasShrinkwrap":false},"1.0.0-master.20190916180041":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190916180041","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6dc9d3fe6eb45ada818decbe3982be804d0a39ef","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190916180041","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-32hG/m89MBjTjtLYcEW/piUyQK3GVjsF0TYxg30nKlntXsI4e3p9hS3FTiThPXVaM/wnoXIsLscQoqao3VHGAg==","shasum":"b074ff6ffd35b1482835857087a2cb5497f061f1","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190916180041.tgz","fileCount":400,"unpackedSize":5122050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdf88QCRA9TVsSAnZWagAAL7EP/R8W5mjIC24LOdoMFBhM\nmyV2gV4FwX2d7oNstWTIZXU83NgYXFnSjirusXny7G6dm5X8Rxrwi/IxZH1c\n112r6wNEfGeU82JXsVsFc4lAp/OoV3QopwtZeJ0yfsDYzGZ3y2EEs5V37FK2\nT41gxkL37Y871Nx2Iz63YZr6Fv5thZgDPVVqZlQFTmNc6orV/0FqZv2CDEEp\nbPVTitYvRWeqwzF+5Olh12klpiO/q0mQTzF62OZDD/FC377ugFBsvuZ+7KKl\nU/P807v2aZO7iSNSwYDH98ebmsuL3ecl7e7el9r5JdyqSbfeOxtPuxDbM/A4\n34nJ2UUr1Pp+wtGHFAQ5EX3wQwEXJt6pBvzkmzJVI2vMxkWM1qE4LWVD6fAi\nTf9KJXaksOTK2LbUiqFmlMPSvgciO9Bl7PFzARSutV/1aF5VmFxV9B+52q8d\nTrJJm5uC5RVEMmTYeDgWo/Et1MI5to9+GBM4tToTTm6OmTr4sisRH9vEqW+w\nYG/3W0fr+aiP+rcZY7Vi/RD+7zMsPTs1WExiVcnz6raJva8lojFStWOIUArh\nPuyR7DJupI/dwfaZXFfmtWm5M9jJ2HkZvxomTcGXqSuNctBKpMEJhcTkhdd2\nEH6ArHt479UFbQ14LpewWGacZzYfTj0/ZE6MYIFbosSfjrmb5QoDV71j2s+i\n/5NS\r\n=DVLP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwCV+78Dl/UGQ7xyUNvaFu2MNlguwJJw/MbMBonCWEiwIhAInZqVMcVJ8C/IApLIuSEkdn2bN/I3UZ0YSgMKc25ojT"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190916180041_1568657167257_0.7819147428328577"},"_hasShrinkwrap":false},"1.0.0-nortissej.fp-persist-error.20190916213653":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.fp-persist-error.20190916213653","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5a2a2801d0375e3bd86ebec78896bfa4225ec824","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.fp-persist-error.20190916213653","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-tvcBQOpdRHIoK+RBDK7UOzPMwFpRY11AcN6Id9t95ETAUNOI7EtTnG3l/tEeV/0uSYLGyjfFG4Sqltka3Dc6LA==","shasum":"6684f3372af849b14b0d19c15c78e221e2346dd3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.fp-persist-error.20190916213653.tgz","fileCount":400,"unpackedSize":5126158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgAGQCRA9TVsSAnZWagAA5TsQAIydwlDf5TpzPs05aVMS\nkUIZZ5ZN3KIjJC5G0aLj4JsXmoI57zPHVKKLXSpVGZ4LAi23MZ6Ig1XXtX4D\nDJA6ay5lH4iYflR/+Vfsv+VmE5nCyquVe0Z65MpHGNCoYxfe5bwytE1rOUVO\n+iYsxeLcNLRur6jxT4HVFxDhhWiK8BZihGDrKRlKmfwt1T4bbtVjt80ahbBX\n1cid/Gh4FAPGRfa56HsWH7OtiWRzIlzlpIM6cLaVl66wUNdiDKVO4eTFBILv\n2y8UniuWgV0Ym5XrY7uBg3pn2/7IfQrylIJHnUjVjJjl0IJMZuROyjZ9/e/e\nnbwRilMccxKu7FVxzO7sYfr8i1flGw9q5MKo34+jLWD7jtlhwc6mu1RwzA4X\nMINFHcjzFX4mqN6PfTC3moO1fHW2sZQNjefveZ+KRK3LG2xxK1fqGjMXOTqE\nyGGS4iCzNjpqWVdjx/FnZGjzsiGLdp/OoONZr7XmBCis8SKwzY0bMBF2FJP6\ns0wjfpIJzeFMkxKZw1xkHElXfhwL+NrDv2X9momYZdMDtKjKiQ9kqwg2FSQn\nczySqlV48PBpi6+MVEXH/dj67RF8SMG/HG4FTTUa669HDVS57kliZrLqdiBY\nASihaVg4VWuIWlmoTP2Qk9kPnDzXjm4TJkADV21JRUAhl/4DlaeQUMnTU0PL\nYOWA\r\n=qrD/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+DMR7nuzlUTqYnjKs7cCA3uX6WujwuQr4okCl5BBpcwIhAPCzazhCXUY8mLK1bvkXkLLhIyco5SOSH5BqZ/IKfrY6"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.fp-persist-error.20190916213653_1568670095279_0.022374384671098868"},"_hasShrinkwrap":false},"1.0.0-score-org.20190916214428":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-org.20190916214428","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"fcddef728287c78124f9f0152271561aa55a2f83","_id":"@atomist/sdm-pack-aspect@1.0.0-score-org.20190916214428","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-U+MM28LLL3r1xrVKj6Qbw+C6Uk033FBjnzIZmABn8wT6PtvywDbHW312gDbxx/GwGN1TvVZDSnRVBsoNNU9Pfw==","shasum":"7c4885bc75735056f8b74bebacb89f1dccfe3155","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-org.20190916214428.tgz","fileCount":404,"unpackedSize":5134975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgANOCRA9TVsSAnZWagAAQYgP+QC9lhEQevFaCWn7kVhs\nelNi2qN/DjMoA0iprDnN8ed6hM0+vF8txkBvwDpTwiM6syzwgkmHtvlClS1v\nyCXEYMWOdLau3H7pPD0xI728ErvYfmEd5V19Nigv1uU/GIEW/bBi1Zkfqq0s\nbpHEtpea1jUpIxTiZ1qwHOBlIDmqu/gNo08NKNEy9LH7C5tzGeLj1GCvfDje\naZZ75b0N+8bbbBPheiS1uqwRxZ7wnJI1+ZbKOgv8xS18IKvxxxSv39mUQ7Ud\n+xJX2HNWmMg676Bosh+3ngZ4EC0gkbtDWqmSPOXLDBE4mQE/fSONDAoZh8QK\n2YAgUnHCifYV5NpHxwtOwi4jc8rySGqa4gH/7/n2T6L6qRTEAJAG9bV8Jh0t\nG/yY4LDDWpKNMEM8OrxP4giHWoPC39ZIr0CdGxRGaHRP4RLT1cd0JI4ZHF0U\nAIqf9Zdxh4WyiZBgt/JPg+5OrlaFJq1vP0CjU9NXT1lcsptvOCNKdqoz8Fm5\ncoqMShsQ4d0fm52H0XtIlY0CD99gnz8eCaL48lzLRmzzMIIYdWgw2E14FZ+N\nxmnqYH45hHolnG9VYkQK+AB5ILtGPjge8mRDaGLoXQn4oAi8XQJdaCPxZtml\n83qlb38Wc9R+Ma4V13yo3E3zReGCXaKOtMrMVmu+FL+7Z0BZdXmTKfAswYw2\n+Yam\r\n=7DUA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfUe7qFl1CqgumNwv/uyqE4cGmq50+Q09jSEkDAvqw+AIgJFoUThnklMle/+uk61BrFiKvXQQTPhNCBJTLRWhHS/0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-org.20190916214428_1568670541369_0.5016804972293709"},"_hasShrinkwrap":false},"1.0.0-master.20190916232559":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190916232559","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4549a582aa11d71b0844a6e0cba3e7676dcb2ce2","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190916232559","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-tsAROzlOd5B/izhTJFcCAwSc7l4QZlX+cBHibysHNGuBLelyyrh7KqJzta0eUcMf2bq3ugezhvY4mpkT6U75rQ==","shasum":"08ff2761822a06b768aea9a6cda508e25c6ad036","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190916232559.tgz","fileCount":400,"unpackedSize":5122236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgBsJCRA9TVsSAnZWagAAFwMQAITxrQY/03kYgKtTlc44\nd73O1HkKxd1mDP7aARCHS00xlrLaUEr8ztJrfqSP4Kkq7BSXTUBKtfxWHq4B\nP2FNp5xRs7DcZeHWD2dkJnScJNwstJvM99Kk0K33PfXOYNyb2TW2tUbcdSJP\nZpN4PqiiJ7U1XNrlgi1hax3m98FTxn/nJMTiVQTkhsjkohquR0JGbTJym80P\nHwEgkTIRtuKgi6R0cKfGWHZe23TnuVJ0UpNn7bK54QaI/YpV6ZYV+fLg9Y5C\n1Nku2WxTSMpl6AlxB/aR7iwMXm3yY5BK082fy/puLNBG73dGl0lC3QM5LEI8\nhhgHmJLHNM+69jf1c7AenuLXz0KYoiSBgxL0NN/UjRsRlO2rfyIWxcu+J5wv\nx7vNypVe7CC4H7I1ZPDEZZcZ56DQA+CAnJugeYAtquXx03QjCmCRwkJliEQR\n8c3BpRegfnO4VRslLm70wBYo3f09TPLN3qal56b5hsoKfOTSy19HisZoWv2V\nn1saOhO9ykmkOE4NzUJFRjFUwkwxOPMt8qeZt6jFYtwM9JKNT4s7K0U1qZPX\nXYUebrmDUmMY3Ch1iC+eYm6CcgBh8xr+tI1VFET69G/iz+jQqFvqmkBPH8W0\n0Ocfdge+7hyHub+oMkbqq1ydDGBuaWnD0ryJAWfymQRoapBHycgECm3AxRuE\nwqwA\r\n=j5tU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5hRZwkLkIq0VjDg31HZ5WKuuti6bT4pAWeJGS74zpBAiBDJ36uj0g1jongkFLRxTYiaXzjAbP2TlizyDnGQTtsAQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190916232559_1568676617196_0.21904134308160672"},"_hasShrinkwrap":false},"1.0.0-master.20190917000018":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917000018","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"539ebb4aada58822c6bc8690bacf3f6e0402f8a2","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917000018","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ZIMqcWGwUTLSzSWi7uFMmqxNCP96zsShmncUh+5DsdYAD6wHC7iQS6RIgxLm2o8ihWoei+dOqpiigg1tqJjPmQ==","shasum":"156e0a9ee131906be18e490824972524c54cdf20","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917000018.tgz","fileCount":400,"unpackedSize":5128762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgCNZCRA9TVsSAnZWagAAS3UP/R3rFZjw3jf6QiXKNaXr\n6PVpd3qAMef+27jgXDADYkvKmQkRwHHt2oj/iCJxF2yLKyBVu0sHC0VnfuWR\nQIa9CDXbKkBcLTUwi2ujafhKPn+aWUiU5qevv6afokOI2ZylfBn3v80kzNcN\n1SBQAav6W0P6czDE84Fp633WmZ41bMy82fyCw3iuNEZfKbFPynRe7AwdnQb5\nCi7UgbqBPElrYPflR5qshXdhqLlg839JxkwX52LqOqAz5/uNIioJAH+LrGWE\nsxkb9dnqv1UhP6gpBe0e46jtSA2b4gBsavH91zjYkdWaHkXR2Xn6W4C9eF4/\nyalsu21mtB1d1+TDDUZ1Iesy6zzWXxXsqaYYeacr+PNecWJBTq1TLrOIcbn0\n02nUQmJjTHSIi32eddgGvXBWWV7gXjoX3vx3JLrX15zeJk/pEGZW5zPXRI3s\nV5n3VyBXUeubtKFj0gcefNLx9OUcx7jYZeBPy5u6fxlc4hyQLmbUDT3u7yyu\nIgZzw5wsoWS7eukiD0cSjzv27Vrb+Zj8uQT1mMVLCLQ/cuhO1XTDaAs3D5rJ\nb5BFBeU3jGCwVl+13x1SwKMVpQ440TPnqJFvkwC5kicIroV/nsueQa7PyHeo\nzuz0IKJJendhm8Ns/d537M4mI6/Fu5UMAs73LZ+KckZMwlQPa35XMrSoEsQ3\nTCC1\r\n=UwFA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZ693M7bRBxmzrT5+CJvqG7nBu8BO8gnoODOK9E9N1SAiEA8OnYQNZ2YVVf12pZWthjajnrmQX3h7LE07H1Mdmkmog="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917000018_1568678744987_0.6958295581351694"},"_hasShrinkwrap":false},"1.0.0-master.20190917000953":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917000953","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"539ebb4aada58822c6bc8690bacf3f6e0402f8a2","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917000953","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-zuHOVggnN9rJ2QvQtlS+zXGi895fmzVmXk9NAQ19Hx53cZFZi1CElMccIfaSzJPlFkJX+GP9C3H/NLz+JMGSVg==","shasum":"d07e6e061660be451b3712214fd837f686dd3f3e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917000953.tgz","fileCount":400,"unpackedSize":5128762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgCXECRA9TVsSAnZWagAAnxoQAJMMC1GfP6TF/ef7HfRh\nBYvqipoVqrFuDSZ9cBPTYNzprKx8wnVNkDRSTTR+HeNpsNmU0ajc535mxgPN\nuYuw9jAwDCsN9zgh5BqRmgX+H8ZK82t4X+5DeUHoQdiYzr5n3M6Y9eySt53D\nnId502tx2LWn4BY96yOBhDTHScEu8xNuzv9TmLrbVxuAsErd1YjfjbU8lRIJ\nLEZ4HktBpXXpAamFQS9n0ZC9HaMM1Jju0gPUh9FBWsyEvJfbAvDvSoNakAA9\nT2Zox1f78NWuvX6uzieRrdbxU0j/Abr+3hgXwcWBBvFbkS4yuzqTqdeLZ/K/\nBsey4Zmj2BluOA8lEpboLIbh8Yi6qXlM/plNZOYEwsxdeHUbhg0X5Vv1m40p\nySjvqrXZkEofTAQjLn8kH4qBUMaupgASlCvrpZeO//EMJ453FrPyarJf54I5\n48I+EfzpkrJ3GrmONUTFS85tiNTPjcKWpNSSUhQmYqatskxcikIxG66NQqtf\nc5wIhpdzAW7QUTkVQcXKk7w3QTcLa7KDS312FPlrxID7mv1kzEULx26ow3Kr\nJ1msVLJceoKlFLgWIHTt47K60pwRp3zsvCOg47QOULHQ5cTZcHx75OIQmuH9\nXiQQL1S3Xu3QGUPpho+W8SaJ23NMGzpjRxKe7qgOSOV8z79iSPzA/9gRg4ph\naUzj\r\n=x0hY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvv2gGyxR4DpFTUJiHztzXnPeGrNTAMbQaqvHul/yBDwIgGDI8PANsYD2aPfEVN35ukUjDQKVET5PaVrH5fpFRxcE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917000953_1568679363398_0.7556327384817336"},"_hasShrinkwrap":false},"1.0.0-nortissej.tag-reasons.20190917043849":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.tag-reasons.20190917043849","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"52428096fb2570cfe8ba464776e6c4787ee4c972","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.tag-reasons.20190917043849","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-mtpORVQ1wWGhwWA8WX17KwJOLrrdDnLkd3xvQW6kFXZyJFFjcgKyRImO2tyob6SskYpU4ofodi8ZZQfg9/AIzA==","shasum":"cdcdb32c85bf87f88067ac9e8284fb3c837a9e40","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.tag-reasons.20190917043849.tgz","fileCount":400,"unpackedSize":5129823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgGSgCRA9TVsSAnZWagAAxksP/3yYa6/83LzSrrSFkt2k\nsD4cZrgaMKQ2YOmgnaWd2V3tRMP2mynBZQxTyzUJULaVbtgZO2PzPvuXET1G\nlxXjC3eFB2W+uqKXWyYNDZY1CV3KxnP5CAWQ1pqy1KW+Y7zYu4oMo0xRLYTo\nOpdVXPVZzTEGRkEZpNdTFRAEuhUmdmukMj08qpcy3jzd1CLqFzFVozUZcayG\nIzWpcOVvnordN8e0oiYrprqpBUQcY1bkXPKGwouS2bbQuGqVE0quJqRrI8b2\nxFg0oJHYhgctuXSl+1wHXnmyYZvdg7PIhMM2K+BSBLgeRltuXJxsbXX68gO9\nWdarKdcCkHMl7V1Oxj+HfBk0oAcvh8yJ7cAenfoS44ZnmirFTnJLShdhM/6c\nJNTaKu9OlqiqrZjX6V0Ke3NpmzDzUhibpHYDeBLtBQh5M55bXOFJR7oFtSII\n7Jie2Un77hd42bQ45bQlXkWkr/feNAUmPwnuWqf7r2SbkyKs6jLCWjS7SxTP\n/WSZ0cSt3NoxGWhFwR20MMQeLAH58giElJOuVRVG3K0kSj/jiuTuX9oLAoA2\n97H5PSBf5JBkF6hxCCkDiahszMHu2SOoJBiQEsKm3iOo85klB66zOfBTpdsA\nzipK1T7ZpbHRo3IWpsj6YWjEtvuhS9aQinyFxUjPJFOotC8pBlNTJJy+Ykbg\nZZIq\r\n=nr2o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDD7yND0N4gcdcZvXR0Szy7Sucsrx4j/SdHebOqydyVTAIgagshN0AIxDQF1cBnr9AxeKXLxWUoy4QWscIZNe72LJY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.tag-reasons.20190917043849_1568695455777_0.49997365391235293"},"_hasShrinkwrap":false},"1.0.0-master.20190917044559":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917044559","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"441492b072cde75b7995a7a21ba9d336b3da39d8","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917044559","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-duiL0bCTNzSkJg77Y5UVP5yZl/o2pYwl5KdIKDQ3JPQQumA7gi3OGlZZ61IOz7VKZTaGck8ZgZkQaUdGPlDF6Q==","shasum":"787ee2466aa4fe627f1ba3e402deba01a2e6bf2f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917044559.tgz","fileCount":400,"unpackedSize":5129793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgGXgCRA9TVsSAnZWagAApTkP/2PwZ28xIEiTHKH0mEor\nXXMTH0HGJ1QnLHVQRMijiqsYnUrNivBzuxr+CfUw8SCRsYaeD5rxMaObe1N5\nAWOm9qMHDJ0gtNtAiw3o+Qn36IC0MNcdbfZe0yY/sZ65X4FmjlGjFRuIPXWO\nGJYfaFAIUEJYd32N0BVT1JTNMpWfJFJXgChlYqJvVUUVvb50x7q4e6SNvoZs\nzBtRSvrbUbsK9XG/kPaXDyPsglYAmRWoY7yyhk/4Q5hNDyt8N8Rj5k4pFOGE\nkMGsArerD+9j6uIn20Ny21oC3EfXAJ2mmRMIYKfZ0bOpPWwl9RjHE1OfBzPY\nxj6XLaF/qkNsUjn2IxXNNo2JnRGAKQatNNACmi7Awt4HXYPinTJpSjl5Co+x\nQWrUt9+i7TA7XoqZ9USDP59DzAU2PjzLdFMGESzApvl/NakkwkvrROcXP2NP\nERYyU5lvo59f0QfhVxBl6hp1gAPWu3b8ib/NCgAqNUvSo5P8obb5LuI3320d\nPBxgB3h6PgOfb4WnzECRRATE8M28p0iOdveGf6fER04x/36PM94ctGe6kZiz\nSmZU9BBHYN2y1ZjL7NcqII4UJ55X0eLhXp3sn71t1B7ri7DB1ANL75AObOFB\nyh9I3jG+iTtzSw8SL1xKMufjjD+g0WIKDaOih9/QJiKqffCrWIJhcR6UpOXF\nbCZg\r\n=PDWZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnNYMXF7S9pDLvURqubnphZSLdxLizwV4l1u6eWgNmsAiASKyRy3H38pMPQH5ZhuSy/WsXLNlXqU57aGDcsXj/Iew=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917044559_1568695775914_0.34092755444249856"},"_hasShrinkwrap":false},"1.0.0-nortissej.tag-reasons.20190917044950":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.tag-reasons.20190917044950","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"273eb3af72fa677d040297bec8187484e376943a","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.tag-reasons.20190917044950","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-0kNhs1Af7mYFxsSsebYDaCl/nuuesOYRfVzPJn/oxtjuXxUTrBFHE1wv7jUX/yCs5/ZFt1a4KwhTg9V/kDOPcQ==","shasum":"3143d65dbe0392205371e406bc3b195702f69339","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.tag-reasons.20190917044950.tgz","fileCount":400,"unpackedSize":5129823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgGbaCRA9TVsSAnZWagAAo/YQAIPFvi1hpBfKbfcG6wjf\nTmf9cRZB8VCHP8Bt7+lwrcyZCQNB/bLA1pHh/0+Zi7PT0k8jsKo71kQ599Xo\nkzHzl3TRm9hPdhdC8HnFK/CSdUzY7LmPi//T9nP1SNS5GhSSrxoJsXBwovmU\n2jQs3WyQevjKNoQXD9tp5YxexflNL22c1DynQMP2REsTHDIJDg9OJakV8eiz\neHVRC60TSAO09flpXemiXwrydu1EyHOtSnWudv4J/+Ah+uKzNhlRwOTcleUw\n36SX5z9qowQYqobfi6JzZGjQ6NBhlOMpClFztVt9SI7SVa2ubKAOUhOUWk8z\nuFr/ZMDOmOrCyPOjVGIC461Shc+5FPPtKblvEkvRG0g9RjZQ+TqPWOQs9hPQ\nYXnuhHZOKgEAHx43vXSc+44Y68VwLBYd6lYhv9U6sqnqNgaMv+clo1DO9FW+\nP7ML7GrLk69A2o1byqBE71hmn2cwLDKt9Dt57gPY1uvYX0OsznZ+LwrKVVX/\nQGKFD/6lnUZ9qJ1nhr4F3Uq3I1wBYXZmOrcLhDYqQKvC7k4joomKyShegukl\nEIWMEjC8be0PgepwTPm0bk4RbQrhSZjIxW7AiOB0v5hwGXp6GtjeL/BPn3Xc\nrJzUgI7ZGm19tEPtuOCkYIBEO3lelglu9MnZrY5h81U9flp5EOaIssSaWnHn\nY82Q\r\n=QDqY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG9/+wDl7tjTvN6a4UBuPYnTJ89yssuWZBkoLNjGdj6EAiAtmNP3aClN3VaXk3pn5ja+BRQUjXNsiau4iVWJx7KTLA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.tag-reasons.20190917044950_1568696025701_0.4351425287182358"},"_hasShrinkwrap":false},"1.0.0-nortissej.fix-pili.20190917050820":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.fix-pili.20190917050820","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"9eeb85471c0026ab61eaaa262e938699d3806210","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.fix-pili.20190917050820","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-siNH0GCPJr4i6j993QnFTrAlxyxefrqr+nZ0OuQZXIGJjqBdjAZRo4p1OL8ZieJ4OVZJINDqizrIKAxZ2hkpYw==","shasum":"32610beaebf5a42d643413281b4b44e225096ed3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.fix-pili.20190917050820.tgz","fileCount":400,"unpackedSize":5128851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgGuTCRA9TVsSAnZWagAAyjkP/jjMZdcgR1HHTMKcBk9V\n39cfQp199Zq/CBHKRiBk5VmHAku3Eafj/Co0BGzGFd9BTQNsGo9D5nYn6PD0\nZEeIQ+2olrsUX7aPlmY8nC2H7APT2V44G1Ke2BfAoxfu/9lEQ5bWOfFitEUm\nZpoPKvtDM4W/Oyc2gL62PZlq8CJWCGT5iyYJSoofXstU1YnBe0yDS31WDx5a\nVh0RGdFOi36YGLxS5GHR7NlRly+NZ+YJcdggEXRXiz2o4Zf9AO3l3yoyx+iC\nQMsEy33//Dzr4tw832Arf0OlQvOYg4ERqMBq9a1XqdDDQft3i9+gKHShk9LN\nfnMT0wj1OEal4Rt6aJgpwLNnBPG9HBxqzMP0ncPjtHQ30LKOC6Tu8NsdrRBM\nQOpm68rPn+4bxflEvEeEO/w7QVMcOtoMmZT3f2rFpteSiEhFdQdziwYckx4W\nIJD5gbAeBSTxKeJWu6dI6wLaI0o9B4K3y3uYj/tS9J7CImkptOZzQ+PyMIhC\nlf2R9vnpmxRz8BRUewbAKquViHN0ujrt52pv35dcbew/x1/YTzj77zPnQmH0\nMYt9Ck0Xe057SRaYsUwM26cZmhW9yAD0RckcAk6AIBmbLurhxtDtAQsX7yDH\nbxLOKeuwGOIYv2Kj83yK/SFfhOYsGfyoDUoLVbyJ/2HIYg00CsPDBqnlvamc\nMbrx\r\n=AX8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5auCqj3t72G+KWNsagaOMQJphFTPkfOB8vajZJ8ONSAiEA8nfYY5JKl6aLVocA/45wG7idw4JYnE9E+BZSBdRGODU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.fix-pili.20190917050820_1568697234483_0.5584091892375556"},"_hasShrinkwrap":false},"1.0.0-master.20190917055208":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917055208","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f2110f28679bdfa362cdc10750ffa695c410153b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917055208","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-rzIRgJBhWdS/Dtf2DKrQknnMGlC81aCWiki7oTmORLiS0ekAsrpqn4+Zv4DoF5B05I6BBj3zuZmCiD9ixOdfvA==","shasum":"7227e2844b2ae7eaea425ae115225796bc35a4b4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917055208.tgz","fileCount":400,"unpackedSize":5129860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgHW1CRA9TVsSAnZWagAAShoP/2E6294YtTgCgRj7FEUf\nGd0ABrvPK7X081MXz+v+v7Q+7EpsbTcpEZNWS7VkSJX0prcZjtyPQ7B2Rml1\n8WlMVhAAG81qb6jxxcjP121nYsgmkJYBvuHyJnKE26Moc91QZ1IFFa553Wg0\nIRF+ico+i9rvkUCR9qYVjJM7xhcZWcoT9W6uTmh8QXmnk/+33SBkjZN30yTH\nK4S+vZIdpxxNd5NfsF+m0oz85cs4sz2MhisYS2pvdBeA07Mx+ioQNFAhDIbf\ncCVuFcO31wiECpQBTMSAKKaTL2KE8K3e58TRkdCdhKPGWIX4OdD8cDWdS1Lh\n+vN0G3undqf0yvisBOnfXhehrvRXzlr8UwYHgSGKz/8vkMsS9xAVN3ShELBv\nnSa44g817hdnVA4LkM8eS6sOnB7QYpCt+fRtTTCXvV4J7O0XUSc8TRiBpJ15\ns/XttulqsKg2OCvQ35GHmpwIbfMuIfMSroi3TGoWljMJr6lfCSVD9ROskPwW\nZNiWGWejOtGd2VgX2bpl8t6cvSHsKTD7eAko9o6zU6rADqzP8TH1sNAKZeex\nj5mvQUoYSgk4lwI3LY/u0IM32f4gUkDjEsHXJKJrybEsf3k5/8Scb5Bx0hYc\ntdYZTY2Fu8DH3I4vjm1DYJwUlQc7Moz2qaOGLA43ADFHr1GFNlf7zg0W46vo\nHgkR\r\n=TiHR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkYytCPqtwT4w8A35QyZCVIAfa1xHng1PuT51XvoYtgAiEAgUILHhx/+k+1vT98h3IVMcDFyTMBwpiPRfeGHfP+B+w="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917055208_1568699828733_0.9657018961657771"},"_hasShrinkwrap":false},"1.0.0-master.20190917171204":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917171204","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4030f7f36dff9f9921a88da709e4cb57d5feea40","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917171204","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QXBEzyDUK5mGr2Tng9FZuDjftQ8BYIGeOSdOKiEoNPyU6ztiq3eZtTa1NG6I/nQ8/fT0vjECFmsHJuFyKRAzhw==","shasum":"3b8e6fcf5b6394d98bde48039b66043ac30844cd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917171204.tgz","fileCount":400,"unpackedSize":5129619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgRU1CRA9TVsSAnZWagAAf3sQAKQBL8v1F/D1LlmsK0YH\nW5hdJlLyjWoPEzR3afL9ZUgnj3DfGRO2+2qUgc3L6by2UwStIuGDuoauSV7d\nSbNxQ1e3ufOoyV61nT3sinCppPfF5twE073/V7w1d2uqjiA+hmGN89lki62A\nDANQkwIyOhTVb2zN2z0DgqXdJYo3Ro5rUT52gpIYr9tmHwvkvTHC7RrRKtu3\nMHacgrzMtZC5rdS+8oFTPVYgcrtoxXe30XqEIKJOZmwko8V5XDTAqdBOPQwM\nm4RMTz9KsmQKO335qcq3eRdeuSbUOuqXdT8y37yxYAk0qQB+ekdCP8tkfy1K\na96hR/UYCYJemdpi+Tdi/Y4tKU4l77+Xquv5usd11be7yPWuy76WbPvpSdA/\n8nxMxAX+Ejkw1PSHlS0pY0OCuvdEy1LrGK32xX7jNOo+NfnqEzhxWeZsuzKS\nq3MeQMTtk/1oiXrEHxm0kwnyjaR76tRvn0cbRy8G+cEW0jdRmxb2dafvJQsr\nOa7+QdBn1f1Oaoh6QaPVuQYRH9hGMXffkVulJlP4GG3J2wHERhC+CHQdVNLh\ngtqoIOmLi2wPiYCPqXm6Z2OSTfc8z6iISJd0WjvlapFARnmWk8D4Knsna9Rd\nxXfNqB1UzlXEuV1lltUwovcsULpIDj/sSaQLhRYUzsGl1c9URplrkE55IApy\nLyu4\r\n=gZXl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAfwOx2RAkML47y/0nOY1jnZ6KEOPKspndM8xgO3G4WmAiEAkn6xNl7Ghne1cs1Wm5sF1yK/fi9/y6g9DjHVnG6Kku4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917171204_1568740661033_0.7141700336437664"},"_hasShrinkwrap":false},"1.0.0-score-org.20190917171948":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-org.20190917171948","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"55cd2e666187118cf20adc147b7c260c8c4699c7","_id":"@atomist/sdm-pack-aspect@1.0.0-score-org.20190917171948","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-SsfvpdRblf9EkG7U7BthqdT7MgrB7nCtIDZZpYHo2D83Tyg8bVvC2nGRAAs3Oy3PRUElqQkpEnv08AozpXLqpQ==","shasum":"935f8b1765bfb7dcfe07169abaea4417fb137aa4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-org.20190917171948.tgz","fileCount":404,"unpackedSize":5135026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgRb7CRA9TVsSAnZWagAAlYgP/2Pstz7Uk1nH0HQF5gN5\n4EiVElETtYOrxoSfEApyvXszBxJRpK78kbhw+dp2huZjXkdjO9zE2z170E8S\ngsoa1zYwBID6B0i2GKfjntpKVEUky0SUafRMF4/c+yBEKjB8x/PhdpEpMfR2\nTB2xvdu5XL6K3zRZGD3WTJOJnMpqtxzdkMQQreWvNWo/W4Gs2mAkjBUzQ+06\noMCdSJUf8kbcw33n5t8RFJImBacgNFyh1Gsrs1VajjLup+c3N+K8VW8aE3yU\nzWoGcj3R2X9OjOeuJ8KiCLm672bR6Ka/RRKR5BLZF5+damqE8JZkEaTbSkMX\nVV07e/yn18q3fLxIJQmnHTBozEc38ogTbmsEnzQ8iL3qwMzVyfzgBcdERM4X\nraOgssubo9FgEtOQe4Tqxg+2Z1dcC3ZyXcTcA11PqmYcOE7oufmvzcY0zxJg\nXPPoxK73brvHQ36m2vdM4rdXFZIxmvC88kSwOfq/JjEuGQjpLbytQaKPXmuD\n+ql4jbWOdZJ0N8rNwQc6wtoeqQq/29ube7eLyawfej3CYtINxF+PwKK7lUxy\nozCH47vrnSJT4wd4UE4BsDeiFOE+u4ta7FA7NUE3nOsoxmh8+AApUJFubByZ\ncaaIybI35s1cnwr+udO89psStoErhcFbwtKbrFky3fq1ksmWVFgyDOmJbbXL\n5bTn\r\n=prZX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCavAG2dJeN9dcyIWPazNNPhbp4hnuF/3OIpsKcFCzrJQIgdom2F4cVIynSEU8yAt1HFjcvDMGN2qQ5uatBTxgpmwQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-org.20190917171948_1568741114484_0.9824645003114769"},"_hasShrinkwrap":false},"1.0.0-score-org.20190917172953":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-org.20190917172953","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2f3aa3b74d899161b9f919f7773cf1fc06d2b0a5","_id":"@atomist/sdm-pack-aspect@1.0.0-score-org.20190917172953","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-s5baZp2XCcpK63htIdkoqCGfeAFDq4zXFFmWqECpDWAzHvjrQX0bEdHz0Pvd3Bm57a6Z5gPfl7THB4FYNmLinA==","shasum":"37eb4a9326e9e162af19c5fbab9ae298813bbbcc","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-org.20190917172953.tgz","fileCount":404,"unpackedSize":5134926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgRlNCRA9TVsSAnZWagAAV5wQAJZb5h6ylCi6AhlXFr2K\nJSy/KP5WedVIUd8vs0zjSt8cBs7g4KhmMRpJRSngXqx4qK3Qzhxn9AFsNhUA\n6Y93u4AbzkE06yCvhwGmnHo65VyJa4vJc29lHriwvAL29QzbZ+auIlFAjIeq\ncWljR6N0nQ94V6Ruv0BKQBTgBUxdwijhfM5CCxU3aFq33fMWJ8rrNUC3Sj42\nkqBajlWRohUFep1rgeJCMVMS2gwRpS2P1sn4pfDv2i22V6pItB2odOSeFwCe\n1lhxNoy91+rkJqgp0NVrzhuk5/lbr7LuQB1LQA+I59d0rwp7+COHkxC873HE\nQf/hUQuSSxG36P4fKloawWEWd5/n8Q3qRqThwgMywoGyv5xicQjUJ9xGO/Iu\nihcgVHg4OwurjMdEmq9fflz8F5BGrh48RZDuz6CnJG6E2j1ls+btJuicLpI3\nCwmIcMc7vZkmfhAhU9yLDm95i6EIW4UT89y9GyCdK9ulR0b3lred0rGXGlo4\n1PJUd6GT//vQl/Ox/i32k6omTKcZsfxGMmf6eiGHLVzRznctVtWJA1JawHD/\nYErMmAjaX26267Pey6RD66bJcFTZsIFLgYAXomXwJ6sCoX4YqJS7yNQCGrbF\ncTi8HsP7QQWQjCF6GdzOaGJpMSJ1dwoOPHl6XfX0uHiofEOxlQ73Zk+VPInO\nMvj3\r\n=k2qN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHenXQ9vLE7efEr9xyLP6x6hfxiKQ0ejRmbXp5F6TFerAiEAmrT3yF0c/gyEZbKywNcnr+JibccDtwYqEvwDS7ClMmY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-org.20190917172953_1568741708563_0.4097282739497268"},"_hasShrinkwrap":false},"1.0.0-score-org.20190917185539":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-org.20190917185539","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f7f972587805dc87aef649a113be1a4845f9bda5","_id":"@atomist/sdm-pack-aspect@1.0.0-score-org.20190917185539","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PWve2dk+LZVwMb5OaBDc0BrkItKsG16Go1EclY1Ce2iUjRPl/kKaJl0i2tRQ16pBwB5QCTh/V1Fh2FOH50uJEQ==","shasum":"cd002da2234f2b5ed16454c6879755a751732478","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-org.20190917185539.tgz","fileCount":404,"unpackedSize":5135485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgS2FCRA9TVsSAnZWagAAXjoP/ivR99eZhPBhiDdaqlPT\nvyMvOh58vdCaV9ZPPhxXz2qclPKAQl9f540zIxGHmVaR/pL5lXVCUyI25Gjo\nXmEhFyN01bVCa9HVH1TxVLhg7J0uMqunkF8Nb5m5JaniEgdTy1DnKJfAQOQk\nj5gdMJgdoj9P9pX983IdEhruH9EWbtry4Wi1t+oQ7mS17XqHTwz/8rl39jVf\nz+jv3PHqPbRIBWtQeiFT1l8sofWgPtSJMXy73c1AZhkybxU6SnwJUZ9CbClb\nS6MuIzECDSzPlx+X1/SUr24OAOno6sRvsWzEUtp/q2AFZ88Lf786pKoqpNzR\ncS9B5F9EDBBoHlLLKOZiSAuXQ+uNfvdimP86EKIbaWsLfizmxzDMxWZNyKpK\nqhflOoGSzIfFITQCJmz/nV54g6FMd3vG/VCvOz2HkiVJqEDoJ1uzxlh4tN7g\nCcQwyZDnihNQ7HcWg+b2AxUh5x+6yUL0xxjBJTRE2qPAT3g6qTOQijFZzAx5\nMrWboVb9MNIPDiy7WI+iWMU/KYn60X36eMAPTJJ0VG18SboypqfCg53tjh7l\napeBHoJSjBkpqrb9ii7FelBq3++4+EaFDrf5FwfjYQxLovaYuxIPBdUQ+SMZ\nrohLDfAVlff4OZOflSIoKtjlH9czJF8VvITTv310sJaY8nGJpTCG7LLu3jdp\nbr07\r\n=tG9R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcvEn3kWfWeRuVIdPKTANvxXBdD34FsGYn/l+2OAMCtAiEA2TOXEkGqi1A0eJqOs9ZIpdYiclfXFvmzVODnz2Xw2Hk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-org.20190917185539_1568746884457_0.7821710617496398"},"_hasShrinkwrap":false},"1.0.0-master.20190917202412":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917202412","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f0ce002aed0252a89dd484f8def3cf27a2946ea8","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917202412","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-IFJ3StM94gsSjN5wh86EDUbT+HATJ8TF8gV0fPCg+Pj1WeBOaFy5qgXAIsosduxTHE7gHBHAEjXvrCddByDPuQ==","shasum":"6b980f24bb1478e6fe6253be8efb2df8e90241d5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917202412.tgz","fileCount":404,"unpackedSize":5134005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgUIWCRA9TVsSAnZWagAALX8P/1/HC8KWEoJGtNBRsAaq\n1DepC26Uz5jmfyyi8V+xV82g7YnZYs9iF5zq9atYrS/i9z8cowrApIg4iDls\nmC1NBwPEodbO7Wow8IOECe25GDBVUF2EVv0LrgewUqj1vazvUypvTF9V/Qh6\nLkHo5jAMmRw2HYel27tP13ygHX1D4tXiahxM80jnlFQnaUPDSgTwTqOszHHh\nIzCcLPOUzCZ8euyfr4iXIwp8PVXZ1uYxNn7+VXI7Ml2e1N0/E5PnUKpDawV3\ntfbTPgL2msXtOKpKSFtD7ZzA6VXR9RO2TtXXAGyZZqfmUZMTl1pY7lY9V0tA\n/tdCjD2ZaohWEgN+rbbiv6wW6m5e7PaD9SEwoA+RXwDN89EaQLx4UfNHqFWK\n7CIkzXQC6Dx4l6MyZ+AWrw9b9ByQ6nsDWQPB6OY/Nuzw3em1EcDoHho/jYQZ\n9R+fwPzGB7Ci/4poh0P2CDGT19/kF35fphX/ZqidhDvAavLDr/DXk+/uZ6mv\nsmVPg4giZ365x5ZqNL2/lj69wavSd/ZEWW3s0ykTekBWVrs19QEYjgbJcKeD\netvZkWyqFyG5DbP0vxs5E3dKV+huCJqoR4G6VPj1XViR4lX2ul32ZlUWaszP\nIdCZCGKqJizPJ5zg6H/cs/aKeWEBCgIsA0WQu4DgeooFY4VTpPXBAa6coBuK\nhIzA\r\n=kWG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoWOhuDNCQ3NmHKq34in6kJnVRcy74OkZrAs4D/4KdcgIgIWx9MQEEZabZN+LBgDU6vHAO4PCBDClja4pVgc1yCA8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917202412_1568752150040_0.37393875327787285"},"_hasShrinkwrap":false},"1.0.0-master.20190917214713":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917214713","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"28a047408332dc6e9eaaa8f2d55561bb5b711fc3","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917214713","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-XhxPiinnwDKwX1REpMBuWhrwzJFJO4BOmkr/4wGpVisVIvBoxTte5ZWxNICsRcoVp2wA5J+6QYNIv3dChIGKeQ==","shasum":"329417b1467bbfe549464bd07732ea9a6cb26796","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917214713.tgz","fileCount":404,"unpackedSize":5135164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgVVpCRA9TVsSAnZWagAA+6oQAKEYIyIIq3PruJ5ShZ3t\nfJNdvXPO1B23RlJFPrsDEsCYWka5snEv+HgUhGp3TUpU/SGgf8GVBRNHIl65\nWo1NKFsZvciPDaAGzBHXGdNr0R/ymQ5ihKxLwyIIEjks4AqbT3nqqrnH+kur\n7wecjyytduCUay/v9LFAjQtfUa88YBzn7CL2xCx2Vufd0JO0C9hq9igyP4BH\nzsdMkYqDuEjhD5Z40G6bvs2YM4cFE5yJ61jPOKjwGV6G6hJ66SbKRCK6ROte\na2qbQmRRwT64K5w3TutYSS2tPGrTUdYwcXotuuvpI8df3zAP+g10jp307PPg\n1lwspFh2PO1QtVTRPNDQqHfCEERbdb1CVNF2V8uBToaN/kbJnI43lkPqqk9P\n/IEyT8DyVRUMxNvHWkksKlDrE4YJfRQ2WhtY69C+q1sPOikq9iUcmFsI5YJS\nMwRZM8iKWCM+FFOC0f98lXWe3IGUQFepbmlgPRijxANiKtAJ0WJ3YpDLy59H\njp3c+3onqatDGm0mhA1UjAB6mbKmuwcWgjIY4IgCyFI3nU0aXAe3LT09eM+Z\noDH46i7z0Zq2e/khifmPAN2pGDwyRhiofSG7jynfGKBhX4MkZxRojgMq8I34\ne+s919ucVdAFOOq6W3epzwtHkqBoMZO73hvKw/snRtJmeeql4rcVX+nQ7b5g\n5Dqv\r\n=98BC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkqoq2dY6MrPoFFin79PWcfqwPgKtpz+wKnUBoI+ospQIgKcE/vVB57RoX0x3ksCa8IuZrL7LuFlPBzsgI3Lia0Xw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917214713_1568757097277_0.43744083077694884"},"_hasShrinkwrap":false},"1.0.0-master.20190917215509":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917215509","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e8b33d00b65ad2d6614a00773357f1585ac47056","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917215509","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-fwN+peDsogo5Im7yacOztBzFa1cbLWjod1N/WIald0Fox5iYWFKQub0p13gZtUz+jYz87i6oVcayrKSCwqH3+Q==","shasum":"e465915f2146d0a9e47040869082e26af6437f5e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917215509.tgz","fileCount":404,"unpackedSize":5135650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgVd2CRA9TVsSAnZWagAA7bcP/iYYw8O9zMFgRfz+jx+F\nmiRCPBKwK/a5wXElwpB+94LDWRS6CvSunqq0mhF2a36Og/jQ+z6YeNhhwkqz\nbF95DC5n+sx+NsaLsrNQPjmnCY+xlSbRLqmkhMfHS1N2ZzZSQHXvIiktkeja\nTp4I9VpwDsMLhLPvWox6CbEwtVgUyavKjJTmuUAS2aqs2mDSmRDLa/QenhZq\nE4QPJZ1bM4Hwo4S5VFC8aPTrRf4K6F4TufHNweo+I9PVzYYfuGwgDcJ3iMPZ\nm7cGB/rvMB/c9ATW34iwvSk6LcJyAScOZVsLb7SHxJizPrqDOt+3REidP4/l\nDl9QQSO82HdVYbkMRlrgjSt75DLs140HpYFAmEkcw3p7KbCofwkQoKeV/8JM\nLT6t1NNUY2BNJBVFQ1ADIVVoQFhEWX19k5i0ytQmpkXS3PSfDX1ytN/BEOCm\nDOH7ghcdyXbCxIWUI15B2XCfu/hTh8uJa6y/w8UoSo4XE7tyFMjRLu0K8Bln\n5trbZzj2pNXfCjyYhC3KSBE6t5awF8k1Z+zJdfzip8mnneN8pWtmntDtVraf\nZPkoZdcwzMxsNZbOMmMRWZk3KIoyMSe8k52HpbYKI3D45xlL/PB/IH6npmqh\nDz9tVBsebmYE4r/NQdQIRlI78XLmi103itBeHbacZ03751iz418L2U+524Tq\nnsBK\r\n=QuYn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBMwsnnlsATLdFUDF3z+iMs4giUJtZ4ebXDcPz8Y9S8AiEA0qZvaQ24lkSZyZNOnHwYpOqZKzCGdfrOYQwW1lgMssE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917215509_1568757622043_0.7439257028964099"},"_hasShrinkwrap":false},"1.0.0-master.20190917224254":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190917224254","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"892a38fc369761f441772a90e5583b66325a0ac9","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190917224254","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-sbOttPcNiY/0g545MW8W/i2jmlj9hKOwMy8VKIoln+7C5HVyDMDWd5dpQ7v4ThDQ7GgoUCpUxKeVTvcp+fSHaw==","shasum":"2f698f092b8dbda7d6a954c4ebe5a29388b78e8e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190917224254.tgz","fileCount":404,"unpackedSize":5136066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgWJQCRA9TVsSAnZWagAAI94P/1NCz8mPKHZ0UMxmr+v1\n12Ye6Yuv658rfffhgPVojszVduBGvfmi3CAmIh5Gdrca7N9tue/RBwcc6weE\nmxpE+feTuP4wtzPSfHF2tGkEFqhg+UnYGdI52MCJNKp9Du4ccjLdacyI0WDH\n4Q4lqBZytvOEhr/mZqh+VFp9GKvRX6+l9TG72Jy/6aJP3OOnndIL5Z/AbMRC\npzknB+v/3yTCbPvTSPFnoPpyXY4mhDDFi3PlY4GGKAY84gELFpGBmgp9GHqh\nMWruznrCQKP+uDmZgQTUtSAoaqoTTJGZkbHWuwFoqfWa+InLrnCTN7uUXYwM\n3gGUZn15O5fR9x4xCnm0DKKO9etAXsUgshdzyWUgnIGfRusNv0qnxCe7UE0F\n7B3s0knUTWIdwPqV4fnhJIHkOuQ676eF4t06fMJjFk7nGz058HBFS8oLb0AI\naN1l7/ng5CFlQVpGqQ/IihMrSyMavU6yHGG238jUNT3MJCM4V+pIaRxhyjG2\nvhA8SsMhYC+ZB8NwfdxxtuBv4TPmpALqBix1P9I58mQb7LXGLQrE5rl0d1CK\ndLgOEQrPMLyDdLMA02UAC7kZZVYjxoofSjXKMjDnyFSxKsN8p81lpfE0Ctak\nk+YvDiLaEe94MEyPBZBgV2Cd23knVYoVE1dkzpS1tO4lY4LxgovTr3mGbp4e\nqmVP\r\n=ndk/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDj9lsqalhV1t0vdO7l1GlAZ2x465sqsUA5rw3f7XZq1AIgJ6um64MZZjwfObIqv3LnnKL/wCvByhSqf5m7akSRdpM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190917224254_1568760399663_0.7665480905594879"},"_hasShrinkwrap":false},"1.0.0-master.20190918181357":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190918181357","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d70efe507c5e42c5a2940a0edd7cd94dd554631d","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190918181357","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QjqaXFRMPrHJcCBltVsub8fF5vLMvqVUvhi5QHf2sy/Do7eH8j0edwPuwVJMS0C+DpTT1sa7340VTrVDhNJUIQ==","shasum":"bc1d717ebfa672ea4e9917c223c4f218b25738dc","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190918181357.tgz","fileCount":404,"unpackedSize":5139364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgnTrCRA9TVsSAnZWagAA57UP/jHVRd7cINQIJfBEAXXt\nyzvh7Zb3Rbz6VYZPE+Z7eoKa2x5yd/6fbkx0TyYIQe5GN7+myD/AH0x5BIcr\nmccakzw2mCr6W+ohOewK1wpcaAdSPATRLCLOn/Jq9iyvsaZpM22I9ucwLymj\nVeWScLUFI2vR6oyqS5JxPeMKZUqsw72RUOO/zvN09XLAFeas76/UnVaurvx2\nHLNf7gR7CK089n96+lkgwDlY28qpI4iZLGEVEJIR55EKXKiv9qyUHE9E7A+A\nrSgeMYfPgpaLuttOY7NLwLzl9QOLt+7LYcF7p2P4RI0SitBrNurJgrdTo59B\nRd7swLM1cN3B+f//OiH6dTTwt8jxCcZD8Mrpxr8SowmCfzFj9KtUyMq8HLYv\nQGMHg/awJ24whSth5N9Ra6Tee7eZgAeuI8DX/xVyrMVNPLOhRwU+RIxqThd+\nBQpUpr/WOIpzvQGpjis4aaC/cfiTeYEsob2cJs/9wuC7J0UAGf84fJgFkFZN\nI9MVS4WpSgHBaZlsONqhAKoXiqS3AP6zwQhevSz4M3a591fRzYgoZWq8VJUR\nZP9+jVHJJYh+/dTjZ1UEUXgbB1qoGZHL74AAGxwrjweXsq+pnQVM3bL5N40l\nHdPPjbDkGrDpJ3uf1hkV5ZTVMgBnEJP2i68ox/FjUvGSpoEhbkFBVDU/0Awt\nfhv6\r\n=DQeN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWJnvguoAFgamhBIM7ZHJc80Az6p6kHqxnewXfeBbPSwIhAP35lqEgdfMR20iBQ3r5TqzgFQNVZOwdn8c7wXGfvtb6"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190918181357_1568830698628_0.8995159556334891"},"_hasShrinkwrap":false},"1.0.0-master.20190918195509":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190918195509","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"75f328fde119d753be22c48d23af1a0d82a85fa4","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190918195509","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-MduTpgBY1sSeCliFyglrpQOpzll61MQpnEWoAQc3UE5EXnf8CQhBGSZPo0PLzU5hkRc6wSnWVH2lAy1e1HQchw==","shasum":"811959ca8250e27a2e910d2ae23cd39b1b1b423d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190918195509.tgz","fileCount":404,"unpackedSize":5139424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgoybCRA9TVsSAnZWagAAl6cQAIlsrrDiGLq5RPNN6oG6\nr2F3+zAO9HsZpxh7Tcb6ME6w2RsEblOsyCpH5hs3tG5Vkx5YYdAOwPy95VPe\nd9C0fLavU1ew6tmgq3R1KQ9sw4tSsreEeE4TlbYwb0w2Y4nNWwOOlWUnx54O\n+C/yBm5/imHriIE5mp5A1SvXvK/8niqxHNL7ccGNTe779Wks4HEr05s8rw3J\ngeV+02CjNYCIB1WMdQrcfyIn/RGyiL70ubKWtb+hsHrlGy1Z/c/7ehqEOgGO\nT8R2x0Mlzufv10wWF9IsnIPjLTg54VNQiAv7gp3WWWwPReRP3K5lW69Gh4J8\nPV1cX1sMsZlBtvKyYv51C9f6nJaBj1tlg34XYhVXwrbUCJB2WuaJKCrYtnTy\nyJ66eeQ0lE3DgB1xNi+8YmLXryVMR7XFY66+JsYddDyc8y+pr1KzdBQ7A7bc\nrS1MbKiAo1wjX2OME+hqGa2Au/ssUX2BvaY0UXVknVga78Tr5hJcmg3egP0q\nSXYY36lT8eY2uWT/adka8H/TiNTK6oWpJJp9xhZDiqxlR5Ug4aDKr+asGUQu\n4f/yMLrQhd4ta35fEj2IW4fz7qpElpCbSGO9qYnfIsQTZWTLEiDVbw1BnhYr\n3RWvV/2JdzCVljv7ccx2Pj2MhSLvVtHndOvzuWvqsb7vRvaQyfkbhUi0C6LQ\nc7sy\r\n=uB/n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChRZW90vhvFmpfZuXaGmA8rzR3c2dcqshhASwrtclTZgIgVZwWF/YPI8jFdPhOeDU4CwC5fdMois64Bx4ch2rl/Xg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190918195509_1568836762250_0.6926804311085615"},"_hasShrinkwrap":false},"1.0.0-master.20190918205034":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190918205034","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"75bd393577b06a6754d6ae7ea760db3c3e1ccba9","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190918205034","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-9+OlNr8Lg/UnIAl3XJ7PVOtvQq4NLwGAiNpN575a2f1W0Q0jvRNnOu7fPbAFXap6bdTOubl2d5HHJ4Z5ahuehw==","shasum":"1201636ac14c5b45eebdae02542da67cfa9e8f40","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190918205034.tgz","fileCount":404,"unpackedSize":5142433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgpneCRA9TVsSAnZWagAAQvUP/3W23RhYmgJLn/DC0VR9\nODRxzmrC5CLPufvfMgkRiEcjhqYjw+Ne0u9PDofKViI8SmWTrqHTE4oqnMBc\n12OS7WJ5s9Ec/2CB3KkkwoIR5cNRE9BSI7CA1QcZfspGU3PyTcZ9xWEda2Vq\n6u9dGDo40DGIi8V6C+AFycqwoNDRulZZKsrHWtjwroif5djC6/dNG0CdRKlV\nYR310kYQ5BJriznqBxse9WcHTVMp19L9hDhW/CbBh7SVhauLOJzwyayqsUE1\nWlOizkPwlXVlMFfUa0ZjDQiOXEmGqLetOYgBcEgKdTOiJwsRkA4B+SqxZ2YD\nXA716/bqxyymhlN74BUoc8Bs1UQQTurfb0gcdB267swLcWFg5cTXsPtVdGGk\nRCgM5l9Ds/D1jV8ij8M6Ou1KAXLwYvNdkUS1s6xJG+tWT7TM+5BJOQCLjNio\nXHjjT5agcAO+lGFb1pos3DsTF/KepGH6w5AkqNvfJY+hJzaHGeGDu9d/S4Xf\nhCUHDNZW8RmKA7Gixr1Mgvvrj96rm9iO13fdQDc6L5HXgCrvjcjQ7yqhbI7I\n6B4iMLSuKDtbGgMeNKjTdjm2sC2KnhS9xKNKbtkk1my3YjgftJhZu+wOtbdj\naqTYTO1Uh9opH9+m60rc2eGpa3FnwSz92O/Dj3xtoCyMA95A6yV7gtEaefwT\nqqSQ\r\n=aiHM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWuJ5dW9iZ9JBN+lyLORD3JBwQYojdnetQeNDLtaGXxAIgNnrpozH3MgTuUsR37T5LC0L3QhScVVZL1eNbwZjbZf8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190918205034_1568840157723_0.9562091058756665"},"_hasShrinkwrap":false},"1.0.0-nortissej.keep-ts-src.20190918211743":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.keep-ts-src.20190918211743","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./src/index.js","types":"./dist/index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"directories":{"test":"src/test"},"scripts":{"autotest":"supervisor --watch src --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 dist src/**/*.js src/**/*.js.map src/**/*.ts.map src/**/*.d.ts src/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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc src/index.ts src/lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen && mv lib/typings/types.ts src/lib/typings/types.ts","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","start":"atm-start","test":"mocha --require espower-typescript/guess \"src/test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"src/test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"909c62b0eb97322912754e51ca600179fa84f8e2","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.keep-ts-src.20190918211743","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-As5ic9fDwaKVB5z8yI7p4/dtXu6ZNLHVjOx6Kjul1q7SjA02ejZDJbd8Y068SORroo4S6EhQ86FztI/rTBOwcw==","shasum":"c34d3b9b6efe620136b00f3a7331a1714385681a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.keep-ts-src.20190918211743.tgz","fileCount":541,"unpackedSize":5639285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgp/mCRA9TVsSAnZWagAAfeAP+QGlznTOxkkZtm1jSR3Y\n8d205VyqGwfjEJDanwNN5Aj8dVVwQBM3KHdmT0GifLRWikbAq67M+wIHHGWJ\nYnTsME93qyTOAL+1igWesai9HN/ANVLIA/vLaXE9hH8K/oY61rYCE99qN35s\njpE6LTUvxSjyoUlbu0F/a9OKXnNehsIac56BwKylW/gg6yhyNQHdAKDR2N4D\ntESpk2nKfiZRw7pdpn9n29tipoYP0Ke8Kei2iVfk5xCOOoQZyetm6hyelyci\nou8A9KSB1iX7BZdkA+bo+4VASBeGw5oUam21PYil0QN10MfQrFkgTL7ApHPp\nQeuoNZNLv2OepatWIU//aQFUldN0xn5X02lkBzh0n7K9vCD9zUdMmM7EgonN\n6RbKcSGlRW0TmvExx2uNjEveS72fqNTupNmzkECj9PSzpmvGlcD4ZhrA+6CL\nnHl3DnyJCvE1/GuRwYEpa8sXecwUppK/7Y7s1EUuMF0TjQOhF9ChqGYUrGF4\nJdsgfQ3KPWzs9IsCS4nOVTXNm+pP0o5JfhVW5RhXrrdRsovlafgqsUH4/HRI\nsZNakLonQlIG4yoypwtP4ansX1MKnAat5r4Q+KX3nHQUtbTtYY/G/vCnm4B7\nSF7VF73JLiuRNu4kTLhvRONDRIRbHrIR7Lov25VDGYhlavaDj3Bl4pSFiaqu\nAzvm\r\n=8EXv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2cCeZ18SwOEJ2RBQ1NZ88DySn0mjG5RiypaGrtNlsbAIhAMh5fdAgW2VT6VT2jdNM7kENDefBFxm9TCkk9mT0cI4t"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.keep-ts-src.20190918211743_1568841701972_0.23731982356594705"},"_hasShrinkwrap":false},"1.0.0-master.20190918223239":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190918223239","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a354869da3cc20db767be8b235daa769e421c5e0","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190918223239","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-kcu/sdNvdZNm6ht6JRSIIDK5p0hqRz0ZOZDtDoMUXFAlXfetZVwYFOfyEyqHRfuEmIqNZbMAhGoCcvodxeLcdQ==","shasum":"c6835dd855d89641fac70b637710ab26fceaf8dd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190918223239.tgz","fileCount":408,"unpackedSize":5140103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgrG8CRA9TVsSAnZWagAAtUEQAJKxFlxu5AsZXfDGzy6K\npRC2gP4osEe3nbglOmSWpS9HvAClpsjdu+ok4viaJiotnvbek3aSO5eKazeT\nqNBycPpTYPLNlPn4CT8JK/RVS9EmHi2gS2uNk53n+F0Q6Ti+fK+nx3xHruKz\nUN0N2wrmxDt5SlESP/lLPvOLqBNcLghuMQOARP48Rrwx7nr7+H9HDC1RqSie\ngVrw+L+uULHlU4mXo6TI2huvNFSx+W3CJ5H6rn5ANmJhCLt1TRVv5bsGrLh7\nkLqkzq45HaX6fLAeTd96tThqNiwiIHIqMqiX8VLxc+Niv6YRLBpEkac6cm5k\nCXXQ0ktAnCmeZpJ5kSQZK143Xq/5l0Fri9vIw9UiKSFMgICSp669TwTOderN\nh+s1nZ65dj73h+zdIaxvdoHl1Sx3MhS1g+se/07WnjzJlFo1c13zXQNXBOJk\nxy4LIK79VQp1vkXCGCdJyXniiIhK5Bv5KaIGsjErXWYq0hOHMfLJQVS2/IV/\nL6b76q1jf5L0UmDinSO0oEx6x8yBC56lEpq9OQXSbCdZHvZGXlAFNET4kdgI\nH0cGfhyPoSTdf9X8iZMMg23VkCnQmpduPF1GKsEZVGLWD0QLCPukg9khTMC4\nC/WMqd9E4zX+OQUhzaSNZW3mzJda/9XEJLiA5bZ2eVO62qZXuohT/in/IhoJ\nP050\r\n=kxSK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIANLbl7wfbOs+28I+AWwYLoKiwIa7oumOWDQsEnaAI1ZAiEA0nbhGHZNmBOkhBe9ckZaJPTJrFCPOOQfig3c8tF5Le8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190918223239_1568846268042_0.7768562843221141"},"_hasShrinkwrap":false},"1.0.0-score-org.20190918224408":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-org.20190918224408","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"8d598dbc04064b8be3b7588521c654ded6636b20","_id":"@atomist/sdm-pack-aspect@1.0.0-score-org.20190918224408","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-6mok3xESplc6cfVDNuN1cMneKe1xgySn3mRu+KYdnOqDtluPigPBPnpyt9MwKZauWWSTJ4PAqK5WFttPJAj+AA==","shasum":"3e616be80cb73541e3340184334395e47d5a8523","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-org.20190918224408.tgz","fileCount":412,"unpackedSize":5153551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgrRBCRA9TVsSAnZWagAA0okP/2VvGnx4XdI6A4nnOqkW\nZZVm2WPFkcIeNij+sA92EbtZCm5c+0Oh0GqZTK5yl9mrWR5fFC7+l6afCVjV\n0F+5PeqLH4qswlhnTO7U1SvM47zum1FLEDKQEE6mboat/RJQNbSpN1KMIpLz\nYoglPIblQNA/OopeYP9C/5WjALLJMDX4aIQ5oCxXO7arzHn6l3aBYVaEMFtO\nyiVz8xEQEyP8jGuWOcd9eN0xUKmSxf5Tnd0rvSuywXCUbP3ihmMlEXbEF+9i\nWyDx/zO0DTOCWXbaW8ADF5UhMY22emwbSvrhyHmO26sOFldS6GX1tgTj6FWX\nlawU8VILXpWxBh0hULjB3yKMalSCiY8GcKsQs3fIOD5LxAZK51C3NpMozNwr\nQfFP+8a1Ul4Q2nooSm2XXwnakIqcYUboAfM+yTGzQO4kUsj2AprgCAZAcw7J\nU4vBs4NwK3gauHVDz6kDp0YM3buWylkH6rfGC4iDKcfN1z4gV9kkEEF1EIVa\nrMglnOmOHexSbJFThXfNrvvt2uTet0j22GBAqjESLsm1aTwi7lcyw90bNc+m\nMT+4X1sc1MSe30vyfHKqbwpKDL7MXpfPNuT0v2gbuNphqBO1khQl/vqUNRod\nhEzSovpXUm4NKUZ1kYp72fsisaDxT4royM15kqpT/wbIoSU0J5h1TUSaNfF6\n1o/3\r\n=RUBa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGtLnOjqxK+9UZv8sQ2UkTruPvYKr1r8XgmWSPTB8WP9AiEA7ZeYT/7/I9aX0N0FlWTrXDpLiClQxK2MzKEQRb8i0jA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-org.20190918224408_1568846912828_0.7731123983559078"},"_hasShrinkwrap":false},"1.0.0-master.20190918225115":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190918225115","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5f621ca459d60a53af8789904653e402ca942950","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190918225115","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-7rBnBOy3kHcihrADK8nOUSdLepRTx1x+1nONDNGVt0j4HS3CGd9GsGLHdfdCHGf8bQhnSSN4UymNhHmKBOZixw==","shasum":"058fa532a3188e15e085f27bef71ca72d93c0ff1","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190918225115.tgz","fileCount":412,"unpackedSize":5153545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgrYdCRA9TVsSAnZWagAAgD4P/3pTkH1uGT6WlP7x06+5\nymnp94Dil3tZD1lmg6e/SCQkYIw9o2L2qeQi+zRSAqIXfB9jp9qsRAPL/qFX\nVriZsCgbgWx2A6hijp/lpPMrkq87+mnNbSty8z1tnV0oWgHhHM/fcxgHShdj\nU/Xj27BBdg9JkCoYITbCaOA7JoRzcZWGXFsBD/3IJmYDIzZHWWreaBRg+7hi\nASavls4jyc5NfXUBwUTwg2FUTgaqiZW94zeTxBTq68QQg35CTA0ifB60lemY\nA0O7tu5MMPqvhXxoqwyvj3FhnxZyiV3uddryc+ITGjhkJbdMnieIgNIoSbGL\n3Hz0SlIuUVRZZAK0XYKw0vs6kxsk2sDcLo0r8FxZiJZwsXuUnvE/oTrhwJt6\nkPb1mbNW7C8nJ6pyaC8jq/bwp8gWDGBLSkPfC5uAkLRNVzhuX6KiY4PxGbXB\n13mvU3/53MhuFxVlmF+9DUchJIU8u6HygFLrqY+FAkiJiUz7t/KVWRrNIr4d\nudYZwyAynkA4x+TNXKxa6KWo44Fy0C5j2C8o/ixYWA9TjKzqbGacXo87Qoye\njSiD5Vk2u89lWLBmXcBUbUTAUZUMvDaK0SHkJrnbPbAyUOVwEQH3SUQORoXm\nHH/O0XgectTZR6Fqm+R/N1i/wpfhBTwegzRh5ZWJaBluH2aaHFzLQC8ZamSN\nP1If\r\n=49os\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlgB1Qwr8wnvpjZtOgy7mm8r/sj73Exo2HxE1iUaP2IAIhAK7b+FQDLM/R0el7LGVJAmB38HJdvbT6RxqchQm8I/Ta"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190918225115_1568847387723_0.8908949545668474"},"_hasShrinkwrap":false},"1.0.0-master.20190918230538":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190918230538","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2069451fdab3706f89b4403add11d2bfcc3dc146","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190918230538","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-lDS20nby9Z1fwxC297/xcbNJhPOSnzWUx3OjalD9OPTwle2YrHaFypBsdJ6bwGNNsygIzyFd3SAv9SYKZPGewA==","shasum":"f11a744131a393a7878decd953c28167ec1fc261","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190918230538.tgz","fileCount":412,"unpackedSize":5153929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgrmqCRA9TVsSAnZWagAA89cP/2racRzegekEprfU3nh8\nDeGLlWh2hFyZP4BsJuBi06iJ+q0cIJKyOY5Xt6zdTCZFnyex4yql8CBWf5qq\nPxeoDDenGJ5h/bWNAJz3qbdkZ8vCjBH/A2GN4X9gr82ywV5nD+/Gcof+rVSs\nEPA7xH7GqJr7CN2UjjO7XauAEhJEQFE2IKc6ecgbcDJGv5D5xPDOICAvzLxe\n+ihWfW4D0OL1ZZZABnncddXwqdVSyS0HFsmFCNGaSnTdBz0wLMyiyz1KN4Dv\nMnbs5qdAwni6DK3nwaBtxteO8KsMdm+O3lqMh13GFKisqeIptxWt3OYA29bf\n4ORHqpD3y4B/XfJkG4YXOZtRFhuM4lPdSsrYAzgSUhOdllCXTAfFw2TfiGuC\nUZfhE9wW+h+e/LwL+XIrFSlSSKxhhtEV+qfy6ahQ9YzX/mdu0pz/96V+5EUY\nGwHi55p7RFuhGTdPLioqydtOtfim3jCDc/KTBrbdCx0pNwB4u/iXZdtiL45C\nz+QRz8cWjKWlTAxCjLJs/I69khvIWGpDnOYqk9qb3WuYMP9H7UDYDU+Yg+D9\nJbCf6ZirQ49lWlgI0+5QRjMqesgAa6BCqzdNOuNyTBij2RI+ZvfSf5Zca0rJ\n5QlCvMLS2g2mxLTsca+Xg3u8659zD4sNvIu0poxCE2/ZqCosNrKUKNbWlwQz\nKM/t\r\n=ZQeb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDV9HOI8XKTD1ZEtCMp5BXU9903TTqbuoN4mcSN6ykvAiEAr+kORpoXUPFuPUnet2UD1mGLIKJYOoR3dnNC3yDoWrg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190918230538_1568848297993_0.07533436097217328"},"_hasShrinkwrap":false},"1.0.0-nortissej.keep-ts-src.20190918230916":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.keep-ts-src.20190918230916","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-nortissej.flexible-gql-gen.20190918220049","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"directories":{"test":"src/test"},"scripts":{"autotest":"supervisor --watch src --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 lib \"index.{d.ts,js}{,.map}\" \"{src,test}/**/*.{d.ts,js}{,.map}\" src/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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc src/index.ts src/lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen --input graphql/ --output src/lib/typings/types.ts","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","start":"atm-start","test":"mocha --require espower-typescript/guess \"src/test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"src/test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"1fb79369c608e5c61789746aa6fddef0b3eeb9d0","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.keep-ts-src.20190918230916","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-WVvTUPL3/ec3bhzFnjZshbZ1NFD9BGCSgRUlJBCnMT+r+pni0FveXbkzAhBokHCAo7tgpZ06hbpU/MZPdzkb4Q==","shasum":"afb6c448741e38ed421d19d6c9bba934840a4131","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.keep-ts-src.20190918230916.tgz","fileCount":541,"unpackedSize":5638739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgrpECRA9TVsSAnZWagAAqUsP/34aV0lP8SZSMco+ekXg\nZZDE6AEchSZOzXVyC7OHJxsE0vz9f5St2Uk93uwm70L6TrTigqTUr2I5C3gO\nA845H8PKSpIt7d8PaqbLA0E++Wycl4FumSdUBCRahrSNxhg/w4eO3o1QpEJD\n6OBPGR3jUajLTwlgIwH2JO3yWER8Q69HNzj24Jq3ewLw4a/HY+vm07e+DfOj\nfK6oY80hl4OkE4vEAbig9i0I/u193wQP3HF1mdZ80TiPlzyL66z3zrhMsC26\nshJk6LWUR7UlBiHDT8HU216+aoo4VK9PcoA/bZA3VzwakNISr8YcohdIB+Y1\nbVdPJXg3U094XpweR6SM6KEMhidjOaF93VxrgglhZUDBH0t/jLJcnulNwO++\nc9QF7G6e9KYEsde5ZgGs7SkeTvblWg/lwwjdp/mU5Vypj8+6+N+7vMu6KB/2\n8mhKdMv5NV3f1WgFeztGaBEa9Z53V6Hnm4g0xH8hIShWpUaAZDPxd3WvXK4S\nMSUOjIvMfzMQCav9EeJihtVSsnMXzA3LB+4NQDInmVQC4tEQkUUPYlbCijCD\nFeTt1oxgKLDEPX8zfjy99suOvr6rLO6GwHYIF5weTtsiHxIagvrTFD0qMt0i\nDbClOaVRZtFUZ7qZGtKBdCSQhCuhozngqoAbAIrI6ds+Uecs4QlDRRqTndAG\n5Y1Z\r\n=O+yn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGOysEHIuC1uohCSQQ4d4LV9j9wqaf7VGIJT21ao4LNzAiBq5mfaXRkQUyi0iM1PcoVXTKKUqXo1PeiJZMpPSZ8Epw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.keep-ts-src.20190918230916_1568848451470_0.35381228895056127"},"_hasShrinkwrap":false},"1.0.0-nortissej.keep-ts-src.20190918235446":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.keep-ts-src.20190918235446","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-nortissej.flexible-gql-gen.20190918220049","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"directories":{"test":"src/test"},"scripts":{"autotest":"supervisor --watch src --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:pack clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json lib \"index.{d.ts,js}{,.map}\" \"{src,test}/**/*.{d.ts,js}{,.map}\" src/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","clean:pack":"rimraf dist","compile":"run-s git:info gql:gen compile:ts compile:pack","compile:ts":"tsc --project .","compile:pack":"webpack","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc src/index.ts src/lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen --input graphql/ --output src/lib/typings/types.ts","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","start":"atm-start","test":"mocha --require espower-typescript/guess \"src/test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"src/test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"075820834d9c6cd4e686e9db04cd40f2846c57d8","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.keep-ts-src.20190918235446","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-30b1Ij0bfvcoJumrgVnhcDB7tIzmooVA5zos4dVX7J5TcCaga88RGPmL+ChW10SmXNsu3Yo4V0WtHSqJs75Vaw==","shasum":"6067fec9fbafe72d09d4a0daa5dac1d59a254e2d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.keep-ts-src.20190918235446.tgz","fileCount":546,"unpackedSize":5643188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgsV2CRA9TVsSAnZWagAAYUEP/jL5APCQvPZpLpl/ptSx\nmK6VnH4+6v6Sq4CqwrQhEuibkA/sJAH31cp5LK7UOe3CHfRdB+YtdZD8BB/y\nBjHTshUfnOT90ueFJDA4TufwOZwW/n/TaW3j2rxRW/8eLa7Q9wXSqn9D4GD4\nCw6CceqtM9nmEep1/IBJQA+TIS9/IQ0d/vmzYMJ2Xmo4DWYNkBWgczd1LMUF\n7bCyxLpTnTxvyzTj0yK55BVxRMBtSSnWyy5eQEYP2/16dKoXgiD3ZYsU8HaK\nkJnbDDTcO5KaGAdJTSeCJxxfb3IcjefjIwKZR/pJ4e2K+JREh2S+DXSvUt7b\n5U8xj/yb4SytHO/tE22eKIgmO0rKzuYMF61LQUVcVUR1NOjEOZCecaVi+he7\nA4KyC/5G0IeouTIwTqHGfi1L8lhjrpISkgwm/+GilUDNA91/wHwdVCP4MhEg\ny6/5oL1bbOldcEcpvIMTP7bgYeZUXi+NBHeWejIBIL7Uexam7KVHIPBTRiEf\nq9rOlGhC6dguWEEUvRqW/+6jHc5SKGRGwkG6ES9NJjbTsMalXyyNMM/FZ+G2\n0i5hG7KN7dyUrMs/iDOHHkDFb63kaXB2S+AYFYYcAIcCIzQ9+1Y/qYUFuHqa\nMUpa7VeerritmWrA3sO56IQmhT0bMzmC2d2XEI+136Ee1pAL1Nezxt+XQ2Gq\n492r\r\n=C5q3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICsDSZbr4Eacr2lTwkux+ksZ5UpxPlMXgRo3yqL1LYoFAiEA8T1GzopbUu0B2EBd1YVgZGz1CyMp4tV03OnoGyhNeGM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.keep-ts-src.20190918235446_1568851317376_0.9836403065719577"},"_hasShrinkwrap":false},"1.0.0-nortissej.keep-ts-src.20190919004501":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.keep-ts-src.20190919004501","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-nortissej.flexible-gql-gen.20190918220049","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"directories":{"test":"src/test"},"scripts":{"autotest":"supervisor --watch src --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:pack clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json lib \"index.{d.ts,js}{,.map}\" \"{src,test}/**/*.{d.ts,js}{,.map}\" src/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","clean:pack":"rimraf dist","compile":"run-s git:info gql:gen compile:ts compile:pack","compile:ts":"tsc --project .","compile:pack":"webpack","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc src/index.ts src/lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen --input graphql/ --output src/lib/typings/types.ts","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a696f92a90745a3c59c42220b8d4d4e3d514f553","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.keep-ts-src.20190919004501","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-UogPfQ/lyxeyDQ0ybVsmNIMOzTzahdnACSfb1xJ32+bZkwOqX+dxM/HVS/fei9/BBfw9hXjiJs1ICmV+rgWz0w==","shasum":"d9a6461d8d9ff16be0e7ce153b5b116e5e51b726","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.keep-ts-src.20190919004501.tgz","fileCount":499,"unpackedSize":5533249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgtC+CRA9TVsSAnZWagAAZ78P/1yBexfH2JyJhwdXvCQk\nhBFzRSYidL0L4AqimiKlDUSiO0zD++VzKL3AmLNt3Lsp6IRNiICZ/Yn51Qjq\nUQT9so6MIru6CJEQRAAR4bVyd/6Cj4DUYr4yiNXeIwRuG++G+o2TVuEW6xMr\nGe3wY+WvGt3NyrfJCImuc7t8iTXQrEZQcw5FhcfhdpKsHDjFf7cgLFoshLki\nY/hmUSGq+ijBbHreaIa9jqnB5f6kq94ZDxcsHZiTugcYr4H4DIYwZZAeOmsG\naznHTZ0PRajkvnBpYXsY4641fE1XCzM0ZdfvYtsMZf//tEek4OuW+Yic/zuk\ndHQaLCa0baF9TYn5XouhRZDjjkIlD2kLez0xmJScyeQ0ujz2mG0e5+Sulcy3\nHIukZUUMK767CBGolt4gLtNuu9+1wD1TUdD/uT44CtHGEnhdfErgTmXgcGoF\n4ZYyjYtCkCCrLPp/LS3Ta9GKRKQEiiztR1cJnxc+nC0ZkWI6OJau7PPrWEDA\nmNlTzIbHLcM9VJBFGUK4tVnJbuHxw7ofmh1GIz+wVYYtHHms0oplm8oQTdLo\nw6o6vvgth2h5D2GAPxQTb1p6V9qa+5HDr39Lw+c21XT4yGRZxZFpPUCeJC8I\njd+qyIoq6aYhB/YCMqMQKi5RWzX1tQAHG8YLaEqku/wl5PuP5ZkyspTRFs/O\ns82a\r\n=uZ+V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaQqQcumNqB3hIg5PgMISfrZUB4jwrcgKHiDX/urYEFAIgTKjMpIy/UIepqmYqGKwoRwQZVzhIR/cU3pVi0MuVbA0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.keep-ts-src.20190919004501_1568854206134_0.3464918225700422"},"_hasShrinkwrap":false},"1.0.0-nortissej.keep-ts-src.20190919023509":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.keep-ts-src.20190919023509","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-nortissej.flexible-gql-gen.20190918220049","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch src --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:pack clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json lib \"index.{d.ts,js}{,.map}\" \"{src,test}/**/*.{d.ts,js}{,.map}\" src/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","clean:pack":"rimraf dist","compile":"run-s git:info gql:gen compile:ts compile:pack","compile:ts":"tsc --project .","compile:pack":"webpack","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc src/index.ts src/lib","git:info":"atm-git-info","gql:gen":"atm-gql-gen --input graphql/ --output src/lib/typings/types.ts","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ad3a85c8a4203083e75baf0393c91d6fbba7a338","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.keep-ts-src.20190919023509","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-dxBEAeKvKQBQsAn1XxY84ujPuqhyF41hjARTQHdGGwOubM3XO4U0ctVp5405m0qPERFBrioQBuZ2KG9WS65Xlg==","shasum":"a84f6bcc3034b14de8b26043655b24fe80a2c3f3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.keep-ts-src.20190919023509.tgz","fileCount":499,"unpackedSize":5533245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgurWCRA9TVsSAnZWagAAA3wP/RBQDCLaqQfxZLvGTpKw\nJL3Q8MjRrEfNAxs1hT+EhBtmbPzKFiT/jZpGpgojwoD0Kkv02/8jVQD72veK\nFW4MmU4E/dYse+Mk55KMh23ps1oUDya8UGsEYKIXPhdn/CqnR26OnT7r89AX\nP8VsR4tmDtCPPTzESa+ltsPUEHnvq7M9s6B20z4CVHsFxTWhhBCyPBmY7Qqk\n/0lBISewuHoJCySXOPieNVtjhEjLOFD88Em+uaW4WX2AeYhozPDNfci5VW6i\nDFozS++u5Gjoh6ZCNblZtxIIbTC0R+Xmr2EzOvBotCBhaJOVm485ewZxcA3P\nZgIvA9qlTKU6ZHlff2AqSKsWWntdY9aar9ZhfK6CVo+gt3BnBTPzHvcmZr7w\nyltczq1sk3YW6Nu6BaopLG7Uj63EbY9XjSwxOeqJQFuqWSnbAqP/FKOro2Y5\nvA9i1TGtjkCSvsrCmFVXlMruM7T9PJHwE1nuCC2pZ+SY8ZbSu0kSV4KF4G4+\ngsjyk+3BXCHeIpNQoU1E/O4rvUadW9TGDuSmwDsT2jQj81J+baZ3XDQRD0LI\n55eo34NJwZHOGF4Uaqt1L1al5ltBBdZZ4bHwnhDWxv4KEskcMF9lw7/IIvMp\nVYrRIGYOZ0W+M8NmeeGG+x/Acu0Qd7qSoR7TST8+JVjO+hiBYNUQP3CQ/odu\nniVD\r\n=LfDC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaLaeDqkK+likUdwFVkARJ2rDyDQedWexE97LbqiecoAIgBBUK49wrOCI0OLhqkIsG1i0uWjsrhz0DsluOfE8WYWw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.keep-ts-src.20190919023509_1568860885567_0.24755496627885076"},"_hasShrinkwrap":false},"1.0.0-master.20190919164640":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190919164640","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ec33ff2eb0ef0729eba4cc7288f5302b7ca18065","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190919164640","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PT3/1td6AKBie++vJeTyIv1Osut4bMQCe3kcBMzVe9uIWmxoaBU4dZDm+KEhQB0B79vtBxeuXPzDYmndmPUeLw==","shasum":"925a12210732e0982dcac7d7697a9be1fbe7eb92","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190919164640.tgz","fileCount":412,"unpackedSize":5154119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg7INCRA9TVsSAnZWagAAjLsP/i88Tma3I9jU9dedTIb9\n4iKnxEwlIPnBs7y4QMnDPri4IhhcFV+r3BRdRkLwTwvvNALcai3XilkZNzHF\nO8o/SdlueoeVJKaxTaXvawJ0LwbspeM6Muaid72SfYecf9/k59Qnsurwvy1J\nOvFAHtQg5DAGaLqkLTSOBwGy9qYI8i6VqC3FBQUKwAGhDBTLq4plorCro8u8\nmXbAG2IXG7FlHRoRyUptPqpqV6Pu23LpbVTQTo6wJJdC0nRMdDBYtXDXDcDr\n0rdIT+FmHq7HRq892B5otL0G4yuWfwuuPL4SJxv6lqrv2LJuSGIDZ4cXW9q/\neMIn8Qsg84dTCcr7e6V1Uzi5Dy/2QE6odKCpwjgxeRyw5fguybCIJCw5GkMI\n1RLhSv6wQibOBeaDVabk4vS1gbpcs09xwaW/NWr8/2dFSAjAGIKWzkNz2BN2\ncEa5OMaz3/9Nj4tPInyx3njF7fKTN0tir9BX2Hr8a1tzlMLa+AGnDKOjrO7Z\nPgA+7gvDTHk1WtFbPyQjjjqVWY2P+1Vd0ekd0bHrVdHtkMAxVOb0GpWYdarY\nsVswW3CPGWiyhkuqB3Pfu7UznY52C7n9vTe+3zEyDW0vh//WTRBtf+5qLN+Z\nnPC112PU8k/IWzyOQwQ25XvR/4QlGMGfieOlcYmyDcaUhGosw2AzieirAQUU\n6aM6\r\n=yiyN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMGfp55QHQmYMtWyXO/7fUb9il+K7DYn6+ZrX2DEZS5wIgTod5L6AAIbZt6fgF8x9cfvfCkdWqK5Fe08z/R954i8A="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190919164640_1568911884064_0.44690191641345334"},"_hasShrinkwrap":false},"1.0.0-master.20190919181644":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190919181644","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6b26a29fc7454bdfe93704c47a5876251b99ef33","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190919181644","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-cx77e2MPEny7TrppVN/tYyfU1Gd+8QyhF9m7N7b3NLfo9PAdxKAmzHcQgaeU6Sgo+v61dpW0IP3RU4uK2mxSYQ==","shasum":"3c39ece552825eef2114cc9addf254d9fdc34cac","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190919181644.tgz","fileCount":412,"unpackedSize":5155763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg8bcCRA9TVsSAnZWagAAJ0gQAJ5qGefB0CPQvkHBjx4j\nd/2IQIdbBGxLo2SB3l4WG8IoWJhVBs88dtGT20fdISS6yjM2cO6BwdESs718\nm1w3/F5MqumfB4cErHYaGSgxN/RatpKqvLEPfjWeRKIXx3pHdHNswHqXRHjN\nUaW4T+Nmvx+iC817rseXT5I3lCxpWJ/qxyYlsEKgjTwLJG3Ttf5qetjdv2zI\nB4y/xNe2+WmhDg6n3I8b5Y35HbYMviIOsFO2CE3WEciW1fJ2A1TwCRyd8NXa\ny4egk2v2A2qjABWC6fPUFkXIYkhj3OFt20VSVHSb54U7B7dFnDG1CgXLC4JE\n0v7I8imfSegDWeALHmb/pWO26LNBjT4Ovjsd1uW17rlFAlxjM+sXpbVjJhpA\nRLsDxKGCEzqCc+I+bAK7CZqSpR6qayocaRaNCa1AGO3Z0/qM2kCGA2IPHdUt\ntY3nLYUiyXH9eNM6JfDGPX3zR8zuxVop5aliSZQUbC1TqxVs4zZYHqHZs/MR\nrkxqGTveiN5eyv9OUK61dZwfhrOLadEX+sI+MUNmBk4cUrjYhDLB7bckrpa5\nMTib+ColrgpiVtRYbOyQmr5AVyjEXHSoWNU8/RFVgq7C8xwqbyLurMyEh+IU\nE0U3MKkMHAToCXD0Hz/R6+A0JFXhJpQjVxOeH8QkxERgzyCvBGJJZaiyVC1I\nGyiD\r\n=tIcP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/u+bMpBzSC66jj69Uf9kyjV/jIKh6UaifNHZ0IkH0RAiEAgyJzF5fNyW7ROuVujS+R1tz4DO77jvHGGFQ+7AiSNHI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190919181644_1568917211485_0.8910822300333645"},"_hasShrinkwrap":false},"1.0.0-nortissej.count-visible-aspects.20190919182204":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-nortissej.count-visible-aspects.20190919182204","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d57e4fcb25ea2fc62a07746d8adb433153ceed7c","_id":"@atomist/sdm-pack-aspect@1.0.0-nortissej.count-visible-aspects.20190919182204","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-e6V02uZ8xds1lSF9uYFwUgXcna7sjyTunQC303tTy2RzE1TW1/+9y4tDTVYBjSLSycIiFTfcFP7JMvZR8zEzSw==","shasum":"9d50053717699beb622b51a370f6f7e8b3362a2a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-nortissej.count-visible-aspects.20190919182204.tgz","fileCount":412,"unpackedSize":5155321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg8hdCRA9TVsSAnZWagAAA08P/jjysy472I0AQGox2onR\naR30GaUsxozFal/KRAVP3/xU3OXScvareRMdnvgAIJlOsXg6ZIp5WgaBgbS6\nkbM9ELO0mXruXiNdqwiPGYUpf96vOlzfuGM1h10CUEwExN5mGij/QADAerLz\n8HfQGRIZkvTtxDZ0b+MlKkJ4MiK/0vrzdgEQdwpaaarKIiSRJJRyEt0EghPp\nx9kZD/u7Y9q23NgfZ44HnCCv41QM2+ONmEqRXAyeEiDvw1NCctWtJeg3Y399\n0/LE59DV9cnZu62LTgrrM/o+o4m5EfxN9QVF/rlMCFl+KTvkPD8bAl9rJ5ry\nQBbSbqzWo+EgBH5K3vY8wQdEofIbcjCik0VN2K3hVd9v+3LdMcpi+oYsySB1\nzHLTgk03i6nTPAT1AKxr1lo+7X8sUj8Ki1wmT5cn6VwKxzaT+ahH+xo/qNZJ\nYRKLW3EjwTn7w3VYUqEdJIkupURQyfBJdTOHB0MqYOtLSTmQBOpDOp+Af9gh\nGSuVqDZ7EyJxZXXJC5ffdA+CQ57tWJvSvwiInAk7/QMiAm76QLUXRItYjs3k\n3ZR7h04F6BJX+kGXpzaR0rT0tQwAijrlJ/UrxiODvKFH96H7DxFgIswXUNum\nG79tP18dehXfd3mKWudKQP9mHVZ6kxQ6XvJ08W7tVOki+cxOalClA4zFzzNl\ntMg5\r\n=SQLt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLJ3vHni0AH4qGd3jTmlSbfCOqysf4CDGYMxX0UKQkUwIgTK5VomShLu6ygSzAytI1I6vTsFLHhandRagjMSlJItw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-nortissej.count-visible-aspects.20190919182204_1568917596427_0.13353034812580322"},"_hasShrinkwrap":false},"1.0.0-master.20190919183940":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190919183940","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"aa7bfbe7329e4438783674f5e32ecd5431441738","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190919183940","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-h98LdiwQ0CixzytaG1i8Bg0gZlmjOVvM9czspKe+NDPsDtle6hyOLu2ziotUPTPQd9CPKRmTzABkwNB/ftkS1g==","shasum":"32814d2400748024864f2fdf65b2907be86f1a86","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190919183940.tgz","fileCount":412,"unpackedSize":5156893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg8yfCRA9TVsSAnZWagAAxboP/A0Sn09FVgUO2xOBdTp7\nbBN+2LC5M+LmTFpy032dHldAdetA0FlSmMyTqLa5NaD07TmijmSsDCMQ4N+8\n7JHxbJ18X9e0Do0HvtuT2i6R1NzxcJgyvVaYNYjZs2iShcC4x8L9hacgeqzM\nPuPYzK6LZSI3S3KWaqYapFJx2BfPqPVu0lOX+RxYWJAll1D0xfxRF0B8A52j\n3A2Ky0CCgh9WdwfNZ4qEo4WCD78yP+ws93ZThakK8mkB0SNKIfq23wxOX95+\n1gHmmnYGnCT4WIOo7qPCm4jAFw9v8v6k9mivyG6OZ6uLsRxbs3rlO7CumCmk\nYdLwhOpW8ZsmUAIM+RjKILOtsdRx3Qkh9rapbGP0EeVv5eaA/lO1+nwvh7KY\nZQZQVMR2AAap6CtB+CrYbCMay/jq3TfXd7o81m4WYcbjsas+TE/UD53M3dUA\ngchFaDP5beFKBSoo7UEABkvI2vBwh9pIpUEuKSlc3OLfdLsJ5wu6/Bqs++Mb\nE8+S/qtXfZ7U4lHtfxrgOcCnzEG15UmLCS9qOWWAIIbH9Le7qH3MmJBiPXiz\nnyq9E8+SvDTZv48mawgN6eeNS5Qe+vrWuy88K6JIWpbmGBlFqgVCeJ/H3UtI\n1FseWhbFUVA05geTG/G2RFSQCeiUUy7DjiT3r05VBUyaD56vKRJJ61fMmZ2h\nhANr\r\n=0DJQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICU9mZk0DFeUoz+OX+j/8pxxhtUyRQE5eZphP4R55V9OAiAmCMGNchN531BqY6pvrgJqCGjoOVfzG2AhCdk6VDm0+A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190919183940_1568918686928_0.22402374669106018"},"_hasShrinkwrap":false},"1.0.0-master.20190919223213":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190919223213","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"518aba71d9720f48b57b95193cd16c9259b2b5d4","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190919223213","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-vGq29XHFLLNPkZDmnhf7a06HqyUEErvzAFBXOzWCDGK6kdCRIZtbdmdRxfenYgTd5HxVY6fAWlJfdRcsiCofQw==","shasum":"aa182709ae17093822da79ddd14dc4e8d628dbf5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190919223213.tgz","fileCount":412,"unpackedSize":5157184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhANUCRA9TVsSAnZWagAA068QAJ5iRQ7pmSDYQkkeSHrR\nqkaBVeF+SHkbHwDXi5J5X12sKElwoMInMgVvfELrQBpsT/o6Tiu+iZ3ny25T\n7bBs6siK4M33Ps/6vRfcqjdWWv/PnzUvDpUwpuppbUzz2CSIMsHEu3yjf1Yt\n1HOPwUYyJdT/CN7uxyVF4xlnxzc+TTftwzHEzdZ/CW3PNohoVp+1kODdcdYF\nLxG6iOcyCvrTmn3iod+CjH9kWRIOWAGLzA3rou2+lT3tUABV1eDq1qpwFewa\njBCFs4Zf+AeIiPDCVIMBFMAIOrDnz8rWtSITlGXY7fbfg0ZDM1W+wHDuTvAF\negqullwJXL/cFXZYvs1ZKJnbfsnKqE7JKaSNMc/gps+HpzKCtXDdVy630zuu\nHgr9vJZYzSQqzTQbQ3KSd9Kt8bkfjmqe4xPdee0b4QSJPe95RYiGRhpaff53\n+6q+0XGEqRTkCSju87nyrYz2crznkPODQIyTMtTgrCCx5OJfumOQZavM72Hi\nv/eTXZI62QJeZ7aDNHhOhPry8fn5zrbFB8m2bugfJYbF6XwCMXHbwelUCuHG\n+z9jwObeSfem/TJ7F02tgZ75ZhDUClLU7v+9CAH3fvqv0Bhw1tlQcWmQhmlv\nTsPdej5D9y1Z4IkctfAImUvd+WVsgsOb1qBp+vZEcxMGq/KJwjiIRFa0VoaP\nn84j\r\n=7Ucs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4MDs/y0/Vh0xdNWhp5uDBg+5HgC3V6gz1+qKTkAbfHAIhAKeYBkcPKOijftqwlfUap3Ufhr9a0xkqmzEHcQoRRYxL"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190919223213_1568932691370_0.6806435439309704"},"_hasShrinkwrap":false},"1.0.0-master.20190920193050":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190920193050","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"93d2b559c198737f72730951bd0da80f3e0837af","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190920193050","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-SdhH1sK6rj+gXYYS7HW2BJW3TaecL10sb1wOoOMNiGjibqG3cPoHXV3XjUI22Ud88RzYSZzmv6V7SK3ikvFARQ==","shasum":"fc29da0a9018d44bbce6de75813899225f483ccd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190920193050.tgz","fileCount":411,"unpackedSize":5156832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhSnNCRA9TVsSAnZWagAAOgIP/1wtZBrukllFrzqMOutj\nEBfV65ykMEpPVtIFyw6vFyvGXs7vHxGHT91dDgxmEzNL82jT3p4w6HLvvala\nozQSVaKkp7BiS0MLui5+pUUWlXyqV8Em8iXePJVRAbtCtg5SbZQRBNmmYO2S\nVgIQqSn0HdKl6MU/q90Oa5/A1JEm5cI728sa3tOTgRkJ4ghihF+i4QJDlmZG\nXiDPrsZtUqAize1thLzCUa6/KislAX9QUdVvIakpFL/aasckLsDAiinBLxN+\n/eZvTuxTwGfXEoqRPC6Bm68Vm4u11ex2+b2mWy1ezuWfOCQrKrrdk2Rxy2NY\n2gk44l0jONJAgIi9tk8ZPmYuWeaNi6TfZDkdV/nzv4AXCW9qJmjqOYf2kVZc\nXuYDeAQdErxkqXtlaaH+Q9uftOzEUml5WQYWOURv+lroVowZJgKCpSWlD3ej\nmEShXxdbzxwlPyZUfwpCVDpDBhY8Y8YKRlGjd4E3M9HCuBt/dHtleLma8+Ub\nIk/OJEsvkX58y0VhCzKE1M/L9fD9XuBWnubEGWBsJ+cMygmhV5IhcUpEevPZ\npM37YkN8dvpXwoZ1uBjOIGZ5D8yfOqxbxo951KtJJ8DFbPaS1HNom5hGNypU\ntYVJimveEcev1Gfdh+OJcZJVXVgXrqDFhAZQ8kxPx4Q56OBMBTXQMmx45p+4\nhENL\r\n=Xe00\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWkyhZSb64aHMtk/lZLZbSccgSdd3ECDd5ngXGQApevwIgNmc3hcob1dVGM8SF1iarG7Rh5lyYIcnhuI5e/5j8Im0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190920193050_1569008077085_0.10754355010826822"},"_hasShrinkwrap":false},"1.0.0-master.20190920213051":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190920213051","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4fdc35775ee12a99ccdef44ce78be95fa0a2d1f4","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190920213051","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-J+uhHEVOYebdSUNP3yXa8udSl8MlzWGXBmTsjZ1eR8LBCZ+FzYLrvSTkgBibtQzeshLCbOUgFToiFN9/SIlRuQ==","shasum":"d983ad1892c3b55d50e23272a3f7a3dc87707c08","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190920213051.tgz","fileCount":495,"unpackedSize":5794231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhUXYCRA9TVsSAnZWagAAM8MQAIZ+GfYEgLLrsk38ZD/P\nA8WJ3KF9Rb8Yeb+4PFLMn8HfPruqYZNsC1BISDDPSSIV7ugt69jIsXi/m5v/\n9qw9+vdOsmMyBp15X+oH7PDoHmnJkaJD/FI+yAQ4RV2Gbuwh3FekigjbHywK\nitP+VwPCmBjKbrf6A9T15qyM4OPa90M27rUmZ3ADK0Vz1u+kbfZz2xkLRikH\nKvcPFRaoZHPra89Cm5lijp2pVa5i3+rA6bT3sKGw44DY4utUMa0DEN7jAIlu\nak3E2QIOIU8pCjQgwTesVZ5KDOH4dUKk4v481fBbg5bKfc0ShtuyGNaDDOBA\nK+m/qeARSoAq9++mjOzP38JAwZbNPFtb536qUTiL0hQihaWPluN8Gtx9MkrP\ncTZb4Zi8dh0+JbNiI6N0PcU75MjrG3g/JqNfzwH1HQ37AabgTvptN0LuAMyp\n0V80XADYoXLvK6QDFPUeyB5vF1CT2p+H86uBkgBf5Ven/Zfx9kB/6w+9CMh1\njXzCyTKQOzUpyKfxUG/M6gP8Y+U/8ZbUK9LKaMwcOwGCel9t1Bvw9MlCt9/y\nXKsF5cmsEs7NOcvHgpLMRHdPg1hKzKeiYeiVf7DpkbgtWiloZOWjMQJ/IT52\nThT0cB2H99s30+cxqc6aIcLP7V8YInmuOJUuOsHwuYKd6y04SoWGF7fYvj4X\n6r9O\r\n=wEtS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDybOsXGRSQB7S/ueHEpH6JTifS4+lzIPH2dbYzud3+EgIgUzniY4M3Qw3hy4KlqQW7hCh+5iDd1XkT6WKalwS6hzg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190920213051_1569015255518_0.3053929423187052"},"_hasShrinkwrap":false},"1.0.0-master.20190920223737":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190920223737","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"9064d703475f835f2849ba2419fe2dce29008b18","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190920223737","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-JUxQoUB+A25HDKDoQGXxgR6R/9byWwyaP6N0JVagdPF/IPaezzv97qZsiY6qaQ4hd6qOqw+lwKIndzt06rMTEA==","shasum":"3dd73cc777926b8cba95edf8122a04511380a1b9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190920223737.tgz","fileCount":495,"unpackedSize":5797110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhVVrCRA9TVsSAnZWagAAYRUP/2sgi1bOb2ZGJeRF1SIp\n4jc9nBZMMjweVbHH4jnHLhqTwcgalBQtEznFNINDENIV01mRKtGovsmHfOSR\ndshPxb7mDqVggCiy6BEsKBTOSCd19dbS8Qj47M+TJrYi7NAhHwA0Be8MDHUu\nR63eXac4Yfn/JDiWrWy17QVOrVMCkD1BO/c+jmzuJd+GHOcpH4EwFwmfPdsD\nxt98smM4Ci2Z6noI6rZ0NcPQ79RWztUaX+zea8Y9jLXSTYJQX0jbOElinOSf\nvd8BvJDr/qFFlRSr8+7rBK3P00oHnmbyUePYqpx6mUFliKOWEEPpf5GfzLMY\nVqBTtnqsgn9K8kZrhg4TjL6MbwCz6lPASFdjzWqX5IK6VmTQUNjq4967HkXX\nH90iL3BGNU1Tb9RVz/AgOSWvUsTFAk9HVIRX2geEa/S7vUAT03lHvITiuyIB\nfsD6kj+pqjzJgITADaOiyhGxAA1HBjgS4ILWFVZuuRnA/0Yyhq97ct3MAgsS\nBHeRzWyqh4ElciM82NsWAqt90BGUpsmY0Rha0+UUbN1CiT9GctGaujmaZYKC\niRev8gkn3WByr54NWzcUwZ3ABF9+ETJ9BGk0LEsQ4VaOOtItySsOgUJ1tZa3\nx1q76I0CDfgVOhyG+YzxaA4cOaPXhr6mM8PgfY/DbKKRSnJJyWu6FJatHOGX\ngnnG\r\n=2L4O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDOA8NBJq0y94+81ImroCBn2qx6aBWke73NaL4sriQ0gIhANusKjr6+0kECiOt2YvvDh1xXvrKMW6/bsm0zp+xIpeS"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190920223737_1569019242788_0.6931881482201918"},"_hasShrinkwrap":false},"1.0.0-master.20190925060605":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190925060605","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"9112fd6213ec54b88199bb5920f67243775a0c97","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190925060605","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ImHl4XxcRg1TdJwRrlb2peEh74ONfZOE94ZMWMbCJZIrTGLf5zXviEXaoMfdM8O148RPO3MZCkenb+rrh6dhAg==","shasum":"1f4d267ccfaaa35746235b7693f8b204c1e0b3d4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190925060605.tgz","fileCount":495,"unpackedSize":5803958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiwRGCRA9TVsSAnZWagAAQZcQAIW6S+jTzvyi3cB+bjV/\nZnh2Ui9O+twGQnHkC9GrDg/Fw8bOkqU9LJoYSk1Q9+FQKK6zU3RYPeodsdKL\nIlgUs48CuGgDj3G21aS2Gg/6teoTst0x64MiywuKDoiv3vcu4oIjO2ePn8sO\nO2a+4SNmG3hl2x4qsPqZyIgnJ4yU5jSeTxQ83yiihFcJg4uoP474l0fWPOHw\nQQi+q+kIsuCkb41iNpOsqBcV7vGFUZ2V7L/e8GQtu+AGWyntBhcLGwPq/lkz\nzisLFbOAaCaGu3mcEKnZc7cMDhyQnci0nBQa1Kr74LAKgfDfLul8KwFZpLR/\nQZi7rePoaEd1+cd8SjIuCkKezSIcvSklptsPPblFVqEWbctL0kIZ2qL05uWY\npmf+QKKaDrhsFCXhf3MKL0GNhp095fKvWp0oAr06v81b6LJtgv5FSc8/BThv\nn34DpV4yw3KBAJsfckd5zi1SqG2GHfr+kHb+KgLkPwm2AIwPusyzJ9hxpWzQ\njK6Kov/ciyqPlbuL02JoxVJNbntd8tUOQNkgVAlC1kXmTFOpuTJKni6oqsUB\nKjKgF7KCMe5uuDKk7xAXh5lVC3XhdV75pgE69IRc5SGiqPOM35DxD72MYjJY\n8jWMGqkYIxO3TYBtNy5srf7T04oQ6H1CZxK1N6t+8KMDksMAIAybrBqZeMEc\n6FJL\r\n=PWpw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICByO4jS2WPwul1IRoZidrp03jsGbNnEGJQE2L9s/571AiAZfQFEzEQ/IXaAlGdrDVpBARFi9UO96i3fKEY7Yqi/YQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190925060605_1569391685631_0.16574192474465055"},"_hasShrinkwrap":false},"1.0.0-repos-on-dirft.20190926030011":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-repos-on-dirft.20190926030011","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7d71490033ed0578b866133d6ca0cf630a4c353e","_id":"@atomist/sdm-pack-aspect@1.0.0-repos-on-dirft.20190926030011","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-F3tJG3qnQWM2ZyLqQeJ6pP7/8UABnBNBh6wLi7wWN0OqobewMyimHYq/3F8/irmQL3FaRnC6t2TCQO3iBkQ4jw==","shasum":"bf84c9fbc12132dfa8703c551a6fd57da6e906e5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-repos-on-dirft.20190926030011.tgz","fileCount":495,"unpackedSize":5809536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjCq5CRA9TVsSAnZWagAAGI8QAJXupG6Zy+DmHNDggAHk\nTDpaUmoeGp/r5YsyNNPXLNR1hIBIVxZ8Tv1FLCiK9LLVeVpP9GOAxQSsId1N\nx9KfBC0MmOiU3i6EejlC9qVc1x8fbmgPlO5dVsSSr1VF53dNVpF2aTi/IjhN\n4/Hak2olpOWP6rhgFuax1ByAR5gGLyDqxjUrmi9bMHH/nPpSg1mjOve5uMEP\nvklDy3E2MrrN74q7OnmBNYn1AwG/KJwt7+KSpNkYGaZ4x19G6brQi2a/+5S0\n5yiGdnl+Z0+rJ3NXtrmi1z1UaMCH/Yet7NCHvEE6oaWuzuyJszNzDoXPtw3q\n9VwZAIUAv+WYUglVip8mqjxUHRsg4x0emqhkD7lJvGh5yLUl4vP2UxIWS+zn\nq05kUASzS4PsCLEX/dJPqza3ZV/vSC0jDdt++fz6U0BGmhb26P+BO9zj3oH5\n0twptM5VsL14UBgyO+BOvHrn6sWrnCtTDZOnHjcZ5sSjO2ApNBZpMrDNIxKF\n8db3wX3na4t3r7zM1CDdQ4lt7OzP7RgW5Tqy0GRagSWJHZHB8pigyGLQSCFp\nKbMjKhL6I7KORBnpv4mkVXAWBspKpQFyOx6MYHF29HCm8m72fBQ6OO246MC6\nEKbIfsmMR0IpdcSDybtvZLUCfe2MIP8CmRXE9aoTEwHiP7E+/fhLIy/qMwbI\nNnFx\r\n=KtFJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBp09F9EYERvKsYy36LcAD6SFK5o+hdCLDNpgnm5cuWQAiEAvuw0//a4oAlxCgX8xqL0mLCXF4GF3oRI55y8NCrOA6U="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-repos-on-dirft.20190926030011_1569467064950_0.9400667192466561"},"_hasShrinkwrap":false},"1.0.0-master.20190926031150":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190926031150","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a806ddfb33edd0b345d3bedb395f9b01fe683b8c","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190926031150","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-xm41qFr/wp3/SSrrassPGTIoueQ39jWXYFat6S4b2aVP31FdNoOSI2/AIH9frxiSaa4Y1JUTHjlCuMhssNI2xA==","shasum":"68a0d51d5a78dbfbdbc5c31ca843ef04bacc01e2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190926031150.tgz","fileCount":495,"unpackedSize":5809657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjC0qCRA9TVsSAnZWagAAgMYP/3iJVv+9jRtShf0/P/mJ\naV6b+4PRKhKZv+WSLaideVqSXlN38X0ixWECx4niP/1Mik0/uaKSvPftfcxs\n1DR6sCW4ki/UfLnZC2UGba0hair4qld48Gelev4X6+Nb/uhShyGPxPo6u7nG\ne7Q4E8+HMJvo4g0LZS1i34FVEjwE327Bju4sInlb3AMro6j2T9zlIOrHvFtm\noKGgriSK/WYC2m9SJ9J8sMd1CkaMoBXDZQ+1DHSRKMvrHngGYPvgFntSRpmY\nMCOjYRWlBkZuGZmymQYHVSRnuP7iMC9dxuYbjCV+3ZdIZKGohMecuFSbwIfx\nwZU7zxtoVz2ZKZQcx3a6IMMxWkdD9/0OiyJ9/a6mv2vMRoW80KeWHRzW4f1D\nhx6q2ic8F/dHcemoAmLSSZ5Dr8d1kynmRDV1sYc6JOSpr3bd7Ix9+jsbq/bb\nFNW6zPAa11u6nQ+VPkvl4pLlIn+BlbqmLEzU8Wd5BaDK96BqfXCIfIpJbgjw\nq6Cv/L1/xJai9+VbuYzzVCV2Pfzt03cboSinMTkR/5ttMiELuZ/7JS5+OPAi\nhJFkjzWjxQgDNfu7CiEulD3eiwiInfelLTVMk0x0/nEwdPLUFVIte9gi1QGJ\ncy1zuNoRua1vHC6bSqHgoi01qL/PPaiiNJUlyLhZiBP45ySVYYDKKG3d90yB\nCR6A\r\n=OyhG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3sbLz2o6n1B5hBFiY/YkDVoQJaIxzB2y4ZQt/i5XB8AiA8JbLvQy2AW6Sjt54oidCCAuy92SiMwouYSc6WiQlURw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190926031150_1569467689821_0.721398870150443"},"_hasShrinkwrap":false},"1.0.0-master.20190926221623":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190926221623","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ac4a7439463c008b514589508f585f930b081c6c","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190926221623","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-t+Hw8StOaSOayf2kSlY6xPBrqhO1cUUO8DbknYlWN2c01yEQijiFBFCJ4dnR8/Bn64mDVM9A1KnGTboYpwA6Kw==","shasum":"b7863cfe71124cffae310d6dd8571ffc4a140c7d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190926221623.tgz","fileCount":495,"unpackedSize":5809555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjTlJCRA9TVsSAnZWagAA8hEP/1WVXIKJ3n12V4B9f0SK\n4uWY4m8ko4wpTFou6gypVxYEGMZb7BdqaESHCG/aAOpPekuW85aOsRV8x3ms\nXf5lFpMl67A5yC23BUCPq4suHNREocgJqwM56bjV4NoOstKCgGsNFNiMPOox\nWMNmxharl6MZLVFFNTwKI97+3wS+hK26Jv/p/EoUwriRgVQwJyw2sNdRxizs\nzfHj4enjFZos76kOfjA0uTnYrDmwo1m0cVPRM+SF+Jz6Q/YiQrSmYkAW350I\nrhC2LDmPwOVGAKl1UgzD6h6SNSVTCUaChrv4s/xyi4uHQwZumciTtvlSlR0w\nvi8oZtJb5IVa1VThNK/zXJ7LCLXrSABGRdvnhZ1OHaCTgOk5HPpelLXbhSqb\nUJQxX1GztZRLl2WtoNHEJacmdNpsgPWsfDwcdC7Kg4x44kmI8Y5Ef9GD0zYu\n6TtJyHZOlAQ4nC26K0xlX3RgQCpjjnni7C50CYiaPxLtHyfS3LsPbdumpuZT\nE+mkQ53687+T4fYIvoqgLwei3lDBNoD4d+lkjlteoygGV1SuH4CMLbwytYsI\nPnwE2nzGwoWlOEU6gaGeKzM0w+ANL+fJ2GmGAIjXsoktunD5svourx4678lS\nC+nkUV2q2DGFnQIvF+OAFVtTBnbSHxjXN7kktA5Dso+ytJS7YU4ttLFF0sqr\n8X8N\r\n=+pe0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwdW4kUJ8Lc/oJW1tgZ9ZiK+DQSa0m38Bj/NLXhC+bMAiEA/zmBcrCgG6PezXToBLMuPlv8vEMbXoP8VXtsjtZcFeM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190926221623_1569536328771_0.4188291624383609"},"_hasShrinkwrap":false},"1.0.0-score-path.20190927230823":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190927230823","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"07a4d0cc2614daa27a0221ba5ab3d2bcfee58d0c","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190927230823","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QX90N4uncoPplOAirtD0rgJjfbNAsz5WYlnrtRbUws/Vn0rsdr0nT2lwwkElBPR5rEjAy/liBkpFvVClxUUBmQ==","shasum":"17688c2d482369e2f1c4d914ac55dbf61f49b55d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190927230823.tgz","fileCount":495,"unpackedSize":5819611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjpcFCRA9TVsSAnZWagAAXtYP/08fn+gRdjjh+9SSWHCQ\nRDkZANtzq2iTbsbvRHlA8HOjDseXvWsWzYhasUhtsDV1J0HpFTJriSaTLFBX\nXQRegThp6mPzjsiVaI5LKltmPc57y8cwcbJ5aBEgiNELdmS1UhFG2GwmQzeD\nVa/8+XUGUHUFS16sPC15mr4LW23z28PoaqKzoaLJ5l1W15TQVxa8kh5VGxWt\n4uOOF+xNLpDQvELCf9tBHseWr0m/aR4qxh+/WbeCLwUCaG0OZaQA1je6ZB9i\nhmlq6qmwUehKBV9UK0TlC+4HCsBJJTdD0AfLMZfoaDiPvUHAknGq72Op13Sx\nf4FsTrXf+T+f3hHxkpvpI1v5CJJL7Tz1RNd/9THMrfW0KMo2n84mj68ybPiD\nq+CepV14ZnUOSg9IGeGeZWVOL91PCXnH4O9sVrJiD0yMv0ONtPO9DeKouVoz\nPclrB610PcCZn8HSl+lv1aSB9RPS49EdP+MERF8/YqJbfdvPaK47XyAFJWr/\nosV6LbckuyPcNvShlDgLIhBgHl1q6GsG1M3VQlNwpU1EuE1PpFnL9eBPZlDZ\nmPEgChU92b+y60Ne7c+VheTW7LZOj8/Yfhnifgr8YGwgAlTCbBFHwpReA7a7\njzeA26OMtAC4D4yBCebaY97j9h9lN7mxP2L2d98k3G1w3U2NYkStDxjIoblW\nlZ3v\r\n=M0pq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhXQLusxOl37RWzqwCWYiJTtawanTWGphDpKYl2wE64AiEAgkbHXREXWaEdj9A/RP1Rj5tWLj9vbXZnRZ/qOIP5Yv0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190927230823_1569625860420_0.4315282438050516"},"_hasShrinkwrap":false},"1.0.0-score-path.20190927233201":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190927233201","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"9ee3d50549e7b3b408d62ed3dd6b177dc613f656","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190927233201","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-nY51fNOvjssW7+5ImUwLLHfk3lWGIfMSjM93ClYV72FkdYSQ3QuBxNo+bbhwn7VKTQ+2My8LQT0kPFwhBfcy+g==","shasum":"7a9c922e7e938b7bdbf579961628944a0bd60813","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190927233201.tgz","fileCount":495,"unpackedSize":5824419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjpyGCRA9TVsSAnZWagAAZdcQAJat8QVvR15uZYyeugDO\nSJWdokc5ukIP7iYAHFdrk5pe9x10BNYU/pqplqGsS9TS5YIwHtmgGcdH7KD1\nDdsuT9sZa9UDhQxPifEFoG6VpFdZWSs7AXJydUe4hpJLGl5Di2Lb6F6R/wkP\nDcJw9+2thTUbkSp+vvNXZIdFaRB5jct1Es9+37g7ZBx6vjdYhnR5TGOk1TbM\nGLBaeUu8NwGth/bvQ9Uh2L9ZXRK9DkvFEGt7QK1PW/qGc2Y5q7wmmN4loEZV\ncRizBLxNMYgBlMDDAP3zs5PLiEW8/avhEzOhuRqUdhb7VRwpAjH2qbYs7Vv2\nUHKyZpdSOWErFOKtAM3BEKtCouu3NfCvp2WB9hB0Eav5MUmTZ3P8zxH1Mv6c\nUddQw2UCjJ9CxELbDjPh0yWSyGrOTYQPnOmiqzUCWqgZ6G5Z9I3ph9WXWYw6\noUqR22I9nox++73Xr/OjazlpFMoPvrVKkft5lqAM2bAt3g9kX+7ovbqzPv4w\np/WRf/tSl2MLgR4aiLjWaLQCwXSUtj6nXHkN8y182n8M0OLVYxLoZCCV4hv3\ncHsdXvLESXAXNaRsz1/IhvaUdCP0vgrwYXL7X4f+mhp8WiE5Q6qX8EIri8hy\noSFLTLyK7DwjDoYQGr/HmavOdVBaN7QRKME6yUCSHFlV9VQ3iLbt0TKqwB4A\nUn8F\r\n=90fG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPcsIin4GgCYkmdK+7D1Z08xApHQ484hEZ/KAPFtirlAiEA4YG4WkQsBULx+nf6ATAwVYnF7CQV3pWcNknDyd8xdUI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190927233201_1569627269309_0.460712449889048"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928012338":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928012338","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b7b8831e269c7a647e460934fdd9682c2d8cc639","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928012338","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wb5Amg5L3kZ5pUqa8xS6tjHSsAS4c0JypAovxBrjhxaFYTz47GSYbavDwtjvRZN8DFjEwxgH6T+cuZD4hRBwJw==","shasum":"9b4a3abef88b5b524d81ba638973d003b8fa46d2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928012338.tgz","fileCount":495,"unpackedSize":5824604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjralCRA9TVsSAnZWagAAZhcQAIjMQmxSnlymtKr6ScbU\naKWUpwSXKPURutAdnIsvXsVf0tUp5+RkQsEor9Y9xqrBRckZo7g3M/N6NxjD\nqybjy75+ibWlqAWCb2wW5cgvCCgKXaOdPJQqfrf5pKxmPiZV7ezAp4ePwbDS\n18WsWFYCWEbqDSDv2pUQtkeQY+cGJNTUZkhduokDhOX6WAldwgY7tn1y4yY7\npPRlhq/sp4oi6My8mrVtK/EWL50bCUMXUZ5QVTYXjV2KcqPkMgk2p2Os085k\nfKXHd7M4P2wR+5xuVoz4wzflzVyRuEmRt0QTQNsULgzwRfwd6LuM7evv2Itr\nfWw0QJPo3bAQo2FQIZlO7cF/PXRBlQRpXy/rv/VNj4d+P2RyqC6LyxjbzIsz\nrmNxUJqIAlv1o5LBNTDiqwAaZ74+8avsR0NH9/ERYNuhIndFAj6x77yI2W+h\n2OT9r44ptBrackYrgN63L397A+imSZiyAZkfluFNGQ9HbumRVbtlcR/wcjZq\nttCCGMaAsrzn/tM/y93KhOCsEjjzNjn7lTGP0wCN05JH3PagjHpgFdA+FYbH\nDH2fnoEJxz6oM1FsP6MOVABmqjzH9jdHb51kUkCOR0xzoL1p+Eq4YnroDb1u\nKo8StBfPnlCRyt6RZa6/RfUXsmPdFM5Llha4BOHuhaKwleqb7Y0glMj4UPz/\nqwiX\r\n=KK6m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBbjZXBCGsmmcPBmUdQvJnBRWiwzLcCNAWN6D7CjrdiAiAjtD4E9yHVk+UBUaEKdFjZtlgQA4cWEa77aHi7VIVeeA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928012338_1569633956917_0.1846583496646068"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928013347":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928013347","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e92251b001f83c890581c18baaa20b24d59c32d0","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928013347","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+JJXkrKLlF38Zvo3UgHtu2GdBfQqfL408Vm1g5Qok44Y1Q+ttsbW0LAMLcTDPMCdGuNkhojVBFg4lKgxWFiR6Q==","shasum":"f04791df1173c41524557bc1a4eeebbb608d1c30","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928013347.tgz","fileCount":495,"unpackedSize":5824640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjrkECRA9TVsSAnZWagAAj6QQAIt2HzwCo6IjzGm0Pf88\nkB2KgjraNVDkq0FyEt5GYLHe3N9lpr17LER5oBnduhlJ+JeBcbYolArAmnNx\n9WpEcgkaAgDdRxSMs8lnwCAA7E46BOQ4VC65jAsnPeZ4p2s76R+xQGZXvuA9\nplAd0bb5VrQgB/p0clNOW6/QwNF787kwfKoxytDJHYtCtS6WSGXLLNtMBzDy\nwFgY09FWZ4/lfjxmA5/CZ6Y44VobkcHviPLCD6NIZjnsnwCASWT7JOaA/JYm\nLvNWVDpWPnRhNFYwGRBUBAiCLrnSEL9JTPdaQl2wdHB56PNMUdD0liaUMgbC\nEqAfSXz+1ftHT/kHTs4KhmXnXqWSm4KvQClQi9dYGh2GNjm03GCSyVH1fdTI\nvvfJ899ANXRVsy2T9OQObEm1gUbyX48gW0i8JMcYZN6kbhjAK8DTUk5vJxcK\n8FtHwdwfIeJyMqclE/I6XI/w785fbUqb7Z4EG8eam2eXS2ttw1DvzxkVVhED\nzBhj8Lkkg4nw3iYB5KaYte7DkyFE9awvurbd+ERGWSU6PKROF0R6Rwn6gZ2l\n/F+fPULx6sD68o4X9ZD+Rw+HPDj7lvm9fg/+KRgXUZC2Ot5hbfsKYDNfsd9S\nkGIc4iMAn89KWqYmQFy62HHuwHsXJ2WdPL7NZ6sgqSi9EYOa9YJBCDMxjTtP\nUfRT\r\n=wQO8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClJ/eq54SxCbiiM5F38/1nTiyPZYMUXdNSxXWzgJFMQgIhAPEjj1unW4aod+PsMW4NtNR9yraz27jhCm+q3b+YkzNN"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928013347_1569634564103_0.5999131629915295"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928041004":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928041004","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"26f6438b098de2db42da0819813bf1a4c6d79b11","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928041004","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-aF1v+GQNHPBr/52k+4vPjCdOAvL/nh8PiroSIKmoSWoxn8nL9WOtqoPyJDynJMea0kfOABVQ+ca7KBCT3XpLAA==","shasum":"90a26da99062aca759089e37d8a12980891f4082","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928041004.tgz","fileCount":500,"unpackedSize":5830415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjt2qCRA9TVsSAnZWagAAV9AP/AxjgpuGK5jLcsQx+2ld\nc0hd6R7RE1MQDGsnjIZw1H0IbZa5cKLmcvHJ11cnYqZmDy/SAjwxsBFxC41w\naqe1bgJFEEpWIsIQtS4sHw9tBS4951xK9bqsXgkNyWmh8Ux9nsZ43h/ZULAz\nKodA1rxjUc/7JhGiJn6Wwr35e4ht9LWPCfldZ+rCnpYH16vP+jAEb/z4o2ER\n0wrPnnAeB2p4j6tzpNKOGdBgObiFi5ocVZVtYbqsbaMj+UFoaT+G+2eQXVMa\nCjJ+e5LiMKTneKXcl6owB6QruYEb0yWu9pe/mC4UkKtGIHYXNyyxZExEZtR9\n9Uk1L5rimNDi6MQX8DXO1e4cj9rhejmOtohgymDR5JuiKumskF4591Mp7Xl0\netRo+uBRg+400WL32OtOhwJGpqsWNz8bNamyBqXGvee1yf3z/o7mmBGbztgb\nPzC/5FXqpVCnW+jbygkCjR0sdex9Vgj19OMcVrO0PAtkUjLwpKSLvFD1Jzls\nwVCpKcQBacOnnsjtyeEdjso2//9FLTCuIDiE+3zHxdGLly88UcTT1TJ7vC3r\nQqvS42A4jlmMfL2Lq9Qwzt57KEDB0M/zfcetNOyCRdfObgDRJqxhOPnawLbs\n20sE6PPpB/rU1Y7GK9G9C5721zUzgiTvQEzT2TxqNP1ZRfGwTPNLGsq8gaII\nCdrq\r\n=ulOS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6ok1tMMWW6OXgPhI0OVGk2rcqc4nP6d+SVoKROYYYFQIgGwRYp6R063FBTj9et+MK7o6YYFBrzjWatioQjts4A0A="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928041004_1569643945270_0.6910507631205307"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928042009":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928042009","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b8a1e4bc144ad6eafd046be91963999bf1fa079f","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928042009","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-93et8DsHxkQPGJ5283oZmlRY7j6ygCi33IdQ/06HKsakBEZODWLFl89bmuZLmN2hxwK06JAU8Uz30wMkjF42Wg==","shasum":"0ad5aff2dc8d712d3100feefde5fc28c251080bd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928042009.tgz","fileCount":500,"unpackedSize":5830469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjuAMCRA9TVsSAnZWagAAb1UQAJNIFl7Lv5nC7UcWpFVs\nf8HyGJSsrHRETRfBP7De6SZ3L5tEuE4iZG4gfafZHhFIKGdh9PNUSpzVqpt+\nbybJwiaE3v1DsC8RYCECx0CYOnWQC/9LoGZw87Pg4KUbJWc/X9AiwcbLSpX+\n++SHPRc5MQ8316bH8L4XKNoALBSbmCxD2RBOLfAVPktqmciT/QhICGN2eu+s\nuGIlqhbG+wn8UJTrobwJHUMAhSf/IlNCKioVi0m7nQY8/8BdUOjqMsImCdP4\njTbUti3+msuyHGJLqqU/msydLwJfRqbwRskiOTBsYn9EBwXLmWqElsKtB6mU\nUnXTxxKIq9NkMIfaJcVBSvZfr1/lEjIUqqWg656boK6VwzunmTXGvAWrWTZw\n89KMsXraffV4LfrBy4hHK+O1xWzCgIF2yYvpGhEJ4hIagnoPXcwvxG2s+YLD\neGQ3P50tA/G4gdzqlrwBSZSdOA2MyK4CrB4aSHrEuIM5x8XsDbvuKyqfa/k+\n+kwSdy8EtX2xYVfivcpepkpiB8SLgJOTpFQO+lra4RBW58FeHkHqg3GN3k7S\n9ZJAQ+v8ocNatURlt46HP//6IW6dMg+fNW9i9H8H+oSdJio6q5uN1dIFtVut\n2j6nPp300fErBX/hrfSTXUajXg4Z3Nf3jK8dIFG7IYj3kBjud+d5cIzuMCGb\nZdh1\r\n=2MHt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEdriB81zbMqjUaSd4nz5TlpZXSFKwtpl9mohBdAKCgKAiEAseeSNyaYyFrcuCgN4esMVJuJKcFBaLzQZ/3NxSyxuwY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928042009_1569644555505_0.8605256121082092"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928044303":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928044303","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4292ba3a482361238e3177b9bec921531e160932","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928044303","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hJZQzbmg6e9x73oeaoHBg/eo/xcFYlbtXuYetWPMLVdJkzfNzLhOLlZUedDUPRHCvCxW7fV5/pGqZK0VTElPBw==","shasum":"bf1d9cdfa996d51b8505f6836cd4d441e1ced074","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928044303.tgz","fileCount":500,"unpackedSize":5830526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjuVuCRA9TVsSAnZWagAAzw0P/iZLAPHSnYn3/QMMEQ+q\nD833bkH9FhQ+LsN08kZah71fdGfkhYDNT/bDXpTktvB0IcRWOt0yTT2IPzBy\nBAUtHi2FzuPfLxv5vN/yF6Q1UMdv48elI9QOzL2dfxIZVNvbRnWHarg0fqpv\naYTjpL0gF31brvIDrbidLXsREcBAFxnsUJB1AeomYIzxE/6nsJfLWrFP+LfQ\n1CGBM3/7kmCukVj7SqyVILbm0OYObneLDaiEqQ17a4ymtp0tcI49PIMwNY1j\nBmmxZDotr8+5ywJKqgpD32GOAwP0QEtoYyS4cAisV01yYAFZOVrO4dIFYHHr\nHCVAM4vw97GGODfm7NrgV8NDD6cSYEu4rrPGNyDkn+Kdj0sCXiF6eLI1IUwS\n8jiyhCbKil/U8hwG4xYYHiBlvGx+xnYH2/L5pDwBO7fBeYx88dRswJi/5JDF\nrZs7xEP6GkdhcgARIoEnHKE8l9Y/Gwoa2ThajdoqFKCpe9H25prjlypKuWfr\nFGLPWM5OR542zmuFN9LCBSNz7n5+Ao1UDoFaeRqNSQkL36SKR2q52Omcfdyl\nDu8Vm6ibV/DyME8RyoT+HYj6dFSDAGMdCy6HQAsTg4vfTC5Mxd68danz2SLr\nQJYwei2sBmy3/EYKidL2DjwISr3DMllkUKpApCoZwEgPhYf9FIbQIXgAuVFA\nPqCr\r\n=Hfng\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSAr6JJ6TGobnY64CCH95kmrUCFD7NEHkXeEZs0XdBiAiB5gVQMXe5nv/JgErqFBsxF/qu/P4aKAGMmYEK/0cBg1g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928044303_1569645933602_0.5011456047881611"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928045628":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928045628","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e8284622b2901b24bde9e5a1e5ceb533a991191c","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928045628","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oTfI/MhkuvnwCh6CBSj1h8C7Q1XwdWoy21qeHpz7mVNtDhWq59RdpDXCNg7uoJGZEwzqNwmmXvzm8n3988GejQ==","shasum":"df8ceebe5e3cf7fd35ed01e187f8dd7f0c2d3581","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928045628.tgz","fileCount":500,"unpackedSize":5831530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjuiSCRA9TVsSAnZWagAAE6sP/3wGjViDMie0q2eCa+ki\n8m0QLTQ6fWmVo3K8zNGEsYgApHkuLm3IcGrrsq98GYX5WRjuEcFt9o8euvQb\nj79X/o7eBqTOOC+kdfDpR3x+qS3kD9wi9bFRKc0kteVZiIvwAr0zML7OUXzC\nUwaCwkudAtNrVC/Xd0m4d+ut1AskpZW8O2SQe2znS3SH0Ld61ULF8zFayWrK\n93LeMTL1eHxlyJKS808CwkGzCDJnrz1XnN5ZfbbT9ebrNoRIoRHYekLn3reX\nzjmMOX7mvf19TtR7aONiBLva/CRs9W6LzWLmypgfeNptFB1txmnwfdqapiZ3\nSMBHGSSJ361wlogtjbHNpiFrm1eSUEmCo+FHT5ISSVzc0vdiPBckdkmDv5+z\nqFq3CC8vLyc8GOM9Fbip23N9csrJyHsCvRGrtgnBVihR9is15DLT1cxSBba1\nPHM9NpE1b3IdukvmRvivI6STUvJL1ZgPEdrC4q2tzeUMsut9EhKI2ufrRSNm\nZ4Y1fxtjg+X0uN6lTwfYEipJIOYKdtfPpFR6fT1pzGFdwYUZUuO1LSfTP+Bd\nhgS9rVB5JKZWLibav6BqHSQc0yzQ/0bPQv9nt/sEtR8folCHAfvFpbacWP2L\nWYayZWR2GUfFl8H5v4kPJBtIocrUdJfn4TXCD5JSpOzyL0gukLbtkgpcPTxc\npAxf\r\n=40Te\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/5RocenvNHrf8YpFno6XWB6UDLRD6vGyU2QdoAlLncAiBNigPzTfi9xoW/ctHzseMQhcAAIuV2tl40CZgudjtVLQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928045628_1569646738053_0.9621721628764937"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928050054":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928050054","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"fd006e474caaa41f1f7593e69588b74f844fa908","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928050054","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hbo3sgFF4+dH4yG0kFEOv1jNoISO+aMmR1mYs98+qSHOnt8jkH4R0I6V5x9R5G7uk4ITMCu/WifebAlKHmf3Jg==","shasum":"4320a3dc8ada2fc2948e7b6f80bda69622ed271a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928050054.tgz","fileCount":500,"unpackedSize":5831530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjumUCRA9TVsSAnZWagAAddsP/2AlQ6FWQaCKuLJtMHfD\nNjCkFyBGlPmWDYkRUwuhsOsvYWmRkSo5MaE7ObUV78JGOnXKpgWqdX5eHuok\n44L2Uuu92CLxnyAr+p/VFZaF8mXUm7oBUaTNz1eoyNqgNs55I2bkYdPpQ097\nC9PdOwRy35Iv5GrH8fOzmcNrObSpQzS5YKRi02XrWJuFlHymqbIXs0lMoCFb\nt4k16pl4Jj3Q/G+4pSmo1rJAPAzsSdirN2mdcC0i9GRdaywawS/3dHKkpVv+\nCJv/HB6LUmMoJFxEYDiRC/aB4yT6XlhKe8+cDwBO5BxFZLs7eH9+w0N3qEBO\nbe00mL0z11lWT1N5oQo/P5I/wZ5PagPxtUq3jGSdzlY4Krqhpg4/IvOP/8Z4\nAbKuns9/IpSdIoAUYAxkd++410hya+bzlyG+Djjek6+ByROZeMwoqaZC9Hqo\nIEZV6LWKYueQh4XTBgzfnFivxyzBvNGDwaJttUz+9ouldbjuu8/wvVeuBVCK\n/9BRGPAYExRR4rW7zacLo7tFOhsHAkEwSjpE7KD0u2S5GRggRO8pZKmLuxav\njlW1vAcYXY4okiGl9yQrL1cMH+SAUSe8moT+KGZ/P5Qnd+UEEvuWjYudIkjp\nSMXKxLuIhEVUyX/dkUd7QOi/TF5oxxOIRjM6xoSzoDNFmB/XAQbW0AbBZd62\nQ8o7\r\n=q4Vo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFlOSaOCAWOPc0sODudkPeJdaRLj4Db+rjhByhHNToK2AiAqh42Nba09/+cdsyxNsbjcONBV+UgiF5JN7OHW2xmx8g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928050054_1569646995825_0.4680114010740939"},"_hasShrinkwrap":false},"1.0.0-score-path.20190928055347":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-score-path.20190928055347","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"39fc4e2687213d9e7356fb37cbb8dc91c45326f3","_id":"@atomist/sdm-pack-aspect@1.0.0-score-path.20190928055347","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Thlcr13yBFlIw+N3WdGCHOXpwqdSntFww9VWkHy2GqVE/CFpSIOlhKBdgrTEQHZlhdBt94nP2mjqe58RxNlvhw==","shasum":"80ebfc10976dfa447b1b79681eb410e1e73e5f28","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-score-path.20190928055347.tgz","fileCount":500,"unpackedSize":5831910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjvX4CRA9TVsSAnZWagAA308QAJtO2/vq76OWiJ/5dl/o\nrJrRYQOQWDF963eQR66R2mgtuVCguaVbLeyWXk3Qhmk1OLvr9twDZRT/pIA0\nD30NzWqJ78/zYM7JFTZVuIddZb1rQH3wh/JMKPTiUnYRp9tCCPOVLEFUsfv3\nLqLWm3C/5E7z/y9usEDUda9C0PpxygPxvdExtNAWfnfh8EhoQo5cHc4MYc6F\nnQ/crv9suDBANBo9r8eiNmEEOJnHfyxNxVq402NclraJXWiKxuKbHwDSLciw\n4ydkBcsveULhbpWXe+dwpsPrpLW4vG0zHeOR3CjgDz8IBGN2BQLZ0+d43LfB\nYSCVGcKlHeiLHPqlWSmJ3g0eUWNMoa5Ux+VYoKc+gimiWSRwycq/Br51JB4W\ndOFYd4tIfuXfg6VvZavB2kcpvXKtgcP+wsj87woRSzLQUSRqHo7OT2p2kIpq\njyDk3tVwiuAtjfPIhnfizh/2zp4kyKu55umeQ7CqF6Ucl+xB1LVkFUHHDNBV\niJuVmathLIUd66MVrPgpPmJWqy/gRXpmVkO3g7SwmwC+24jNbS/ZSFvS/NiD\no0TGaP7b+2X78Jb0wOoGFplD/KAgKEKJq2q4dII25b0hgvHUcCJvLTVGZtzQ\n54nATHaCqi/428PQeNC8R/vW61n42YSfJ0efSqnCz8YDPlcTPm4XfUdAMeUE\n9eAt\r\n=tvvy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDe7mjvmaT8nyp/0Dsoq31+MW2EIFXTZ0vbGxIp/l3qUQIhAIm/CUEl7jDw7qUzEgQL8hnA9axh5x9/1CHnX22Qg8Uz"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-score-path.20190928055347_1569650167649_0.2124359432026064"},"_hasShrinkwrap":false},"1.0.0-sp2.20190928060140":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190928060140","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"06eda1458adf93cf677dac78652336ff814724e9","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190928060140","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-l3ocuTwBJiRLA0opoIzQ24RifG/gz2JzfsxZ4AdGJ8GRJ1nR29so9BGDVphJrEr/OfS3aY7+JZ7rj3N9x+qyNg==","shasum":"896908e9b728b6604eb604b05efaae9adb90935a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190928060140.tgz","fileCount":500,"unpackedSize":5831602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjvfECRA9TVsSAnZWagAATEEQAICvTR65X9tdaifPEpLl\nPgicUDU1rYeolavamS4iY7zU+aPwHVSk/wAFrhMSNKGDAcrVKSwIvL8iKOp5\nGF9uWFiQjolsyQScjZ9eHJvzcOGxxMSAlChtaQliq5z3So993XbDX7eFn4DU\nZH6fg0YZSKo1QGX1xdw/N8tdx00gJ089s54gn36xsvStyMwnmhIW5fJWEAm4\n3XQndz/CgRAw+C5lJVN7DTMpk42wPYR0+rLME4rSGqo7NaK1H90txslVOVYO\nvVScHlOlhKMu/IVI0LmoOSTQTT1C659194RlRsTHzP+y4RBWMvyf1Rzq3ikn\nd3dd7xT2mcPeLkevLe1Rc7tZfYwmQTMbJIGD4NKDhjtfcDmBURL/G/HwhErx\n1wnsp2TAOgN5jrftkJHj0+S57vuA/CQt9wBOLdZHOrcXsynt/MdqhSG85Q4N\ntWF9t5X9h9D7dA2zZzJMizjq6ClEdP1n//Y58jjoHDD2HMR47Jnsq+vA+2u9\nD0e8wug1njs4nSOKqhdiecuAE0WMzyn5guHEtVGsfBmCBzLj/jcF2Ay/rULY\n8Gwr3UBoEmspDhkuD/+wZKyOtEEnAx1vjqBC6MAeLaUQor8sPD15pkTDPqP8\nlWC8SvGKw8J1OuRY64C4gzputggoAHc76TBqKKfC2SamESR6OfDXPI92MXqj\nxP7r\r\n=6XcN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKhNFiaKcZaKJQmk3ewRjU72qa3T57vvWer6bTko1w3QIhALTWp2cxkrgXQ2Zb0GIAd5ScNYmkHbAjPKWs6IxfZaBw"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190928060140_1569650627869_0.12484775774658208"},"_hasShrinkwrap":false},"1.0.0-sp2.20190928061036":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190928061036","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190926021653","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0831ac4a7c52f6a8a27e271d012c6591230ca7a0","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190928061036","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-rUguSEAA6zFcGqAepTSEw+OS2zHNvEmf9ZoVnQO88s/4EyyEfan84ibgW662LetGymHXQP8PrnIxdOLbQa4IQg==","shasum":"d778f5192f495dacc30a687f0e8ae3c8fb6db3b7","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190928061036.tgz","fileCount":500,"unpackedSize":5831551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjvnoCRA9TVsSAnZWagAAkzgP/RE+Ar8+2hmh69IDGtEY\nfCWnoAU0Ma3A82fTI9f1dbSbaK7tISC+/1ci7Hu5b/ntrVWPzO+tGZpSJFwG\nWe5wTzX3i2kpFMrqOg/E10p52aDl+06ab9pJwqxPi0dnCUq+uHydQptdBSKa\nVZNg5VFQtuE+uhaEKeQ6NgSpv+WccdtMhArcqpUR34NEXmXA4TUuWHEByyDm\nFrYSPgvEeiNBFFs6ld1HIXz6YXk7UyhxbmGus9UyNuMV8ypIbhNTou8WMGKQ\nq84ao3n+CidWuK58BvgHEGx4o3lhYeipocEQCeDb0zSFSBbmVtMq2ZbqYarI\nZJzg73Dcg6UdE8CtP3D8Qkr3N0L5ex1XbBSfWU+lLtTSJVcWZELQjvrmv4vp\nQptHCHMOs8G4rCj3mQTOittEWWexn5ExrpNUEyCWeOcER/liTVGkWR1rZXyX\nmFweFH+QvdE2AFMy7nLGGaIADJq29lxiJeQ4UInkMUVhQjDlJ27jNX1+kFHk\neWMD+5chQLrF5nvsQCMkzKsRNlIdCvwmm0OTGIhFa1lJYDnlq916B4tvPiIU\nBEYbHsJeedezRgY6+3jEWCP2Gao6YFwaL7Yd6wQp5XVD0LRB7qGDsfnePL2Q\nRetpqadkXorrxniexopKOJCs5NqAdQLKxRTl2mNjymX0M9cPrj9184y0rZlD\nhqxO\r\n=MTEa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAuXwqsJLY78lJe/3HVAbcZGFxFldBO3huSyfOearL2KAiAY4nIkJF010pMU6KxUGv/dmTt6+6stgLr+X9PY1IrE5g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190928061036_1569651175742_0.9130641818293956"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929020229":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929020229","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7401fa1a97d2e92bd2ab34b91a4411c8d3613884","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929020229","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-i8nAL16rP9LyQrNFxlNEtBULqZv1hOJ7fh9e9QSmEonZCWkR11QsNilK8mwEB6Z+DglqIsTDUov6u4g5cuZn4g==","shasum":"b07ee4649755c82dc13e5abcbfe48146981f2db6","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929020229.tgz","fileCount":505,"unpackedSize":5839068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkBE9CRA9TVsSAnZWagAAY94P/0E6yr1D7BvjCAH/INQs\niWVVkTLHigF+dHAbxBTm7njCxSjm2JavmbMZWrkUI1MewEOrsqiwtvAMSmhg\n2kOPAupMaydPtIZ0OuVqA0OU/khLGk1kRETXQIxGt/ctjBcQ7ZmfoYhXrNBa\n/m5locZDOAD3A7YEMkZiZWXrM79boKDaaC1c/bDqySbw27K1uz8tvI0Ro4Wj\n4fdhIwlzyLJxSUxmDzFIcNRTkbag+Lr7BW1TSCNBAFxdreppHrfm8gRaXO+A\nhMGwnRjVplWAUn9hSULFcRIdDUo8M+Cc2wWaSKWz0CKjvnfy51EnKvSOOMoI\nlDKbR6sRAmkPc7MIDVjcqgaBJjStRsXlmRucHpuy68mZ2luDKZGKKgvZ/fWi\ntgDAeVon48YCfrpGso3UUSqXnavfIehG2Hn0w2yQpIdlr+fkcQlMKgbG/uvO\nZVT8AhmQYMlGXtea3ZEjtIy8NmyaAJ+LeARj9b6Ka5kOzXUshHBPqe3QJtpr\nX1Ya1cMvA78TR4sZ6nN7nn//PoF2j3JFSJBD5cQ1eXyY1jn4USybeeeMB03Y\nuF3KJ/EEX/ixoRQcC+/EhN0ijZ5BZtpT5RvCQjL/LsACs04RzC3iIG6Yy0lI\nMon001V7EGzXAeXkGEs5K1xACduHtFzo9QkX360ljSTfmncsfjIU8Z1kfjPK\nUez5\r\n=yUGL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHbpOBoT0yar9nbSxdFfAcNKa9jDH2q5cjhAnKkFvdtwIhAOxYQuNSvEObeNsq9SIxP4UGWRxB4S+zcEHXpPbgERXh"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929020229_1569722684942_0.5093503669088453"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929022112":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929022112","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"16d1868d08b8a4d78fdf97e7c0b2419d057cf849","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929022112","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+BNZenkx6TNx/pAlJPRaDuhNvEhId1PddHHR/tQUCTfOxi5SQX+8qHdTjYSBVu4ibHZJNadS9CylwXgDwzo5ZA==","shasum":"b25c70c5e029487686aa314bdce79019210a0b57","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929022112.tgz","fileCount":505,"unpackedSize":5837629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkBWiCRA9TVsSAnZWagAAOLgQAJFxMkj9D+4ON4mveoP1\nKfzFRPLNae6Z51xmpnqWJKTXjgbLMn9VEfkICLcEUiCIociF+kTccW6a+0cS\nBRffdcD9Z7QdVUk8+q/3Lp3yCHaqzV5AI7YA1OM4Y5rKLMaYb2qS3E+r4WrK\nHTZJUkWMAY8LEZIw1pLRAN1JiSRxn6ZZhtZsnJ8x7fgFU4a7k/l8V/f4Unkd\nX4A+JNq+ua7iIYICoNdcLrDC+/bEX4s4PQqhjNp+KP9cc4ZE43825qdDgg4S\nFFwdupvd7ftjc4AsVQYt/x3FPygeDXU+jp49AutDMu1SAnArisck5KDRxuvY\nuJAXRhlpkXMHSf80qANVqDZiDrdv/c0ZH2YB8dQDW06/qDLVHibKkatB7NAN\nSNRlT60BLxmjjD6c243XdcGkHW6HoYbKjy7emNYdtP6lTHrSFZsGw19ik0Vx\naez+wzcTQucb1xp+6BjpNJGq6KVSs6vrEWvTV7695Dyu1VWKcAxmT5QUXQwA\nBak/FVAUeSHff0ajltxB4z1+XtJY/ywmreZWTOzOMYWVuZczw/QiS3ucFhdJ\noYO7n+B0ioCgOCJMa1+zPWPQyhTE5KS8/6l6t5opcIJtP+HZ7YfUSOB+9P9R\nz6Fl+vlpMf/d5hwVRxV0gMJ6T5LsJEgP1E/CcZ0NXKfFWYvCJJF7gNFnaxEL\nJrTr\r\n=tzgM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDDb2DMO4/7MBYrxVGNK0ymSN+9hp7Bq2s6PgWLKCh0AIgEtm7iNIhGBu+SpUqAXNH6+PRMGYBf7h2ik97wNpiGxg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929022112_1569723810256_0.4706327796371199"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929062452":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929062452","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"545c3c278ceeefec7071539295f404b1e4da2796","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929062452","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-xb4Vjakxa/739v/XMuo8dLRVN2y15lrLinrJ+ldHcQmLL5jnwvbCzfnoG0QPJDMnqH3KXLtLFWHnCffvc0Ahig==","shasum":"ea43fa94131245f094a9f305eff0cee31c53faf8","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929062452.tgz","fileCount":510,"unpackedSize":5845062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkE7HCRA9TVsSAnZWagAA9RIP+gNyrKs7m9R+tz93zaG1\netoX8LjPEXQClFktTJXZToI8jervACme7NlJLBM5C/+eVjVxYTDsXjcKCvM7\n+O2GXhU3ghgwbNCGAtk2X/p2bB5k5ntldW7YBQFivTKQvS/nJoh/LquCwC4z\nX2fae22DBixJlp6e624PS490b7K/8iZ7KCoW8Qavf3WRtAsstv/+NN7sVVyt\nz8/QELPqQTe8fWnqWvHGtlexuFKWuMAyz9N9LttRDFmEUQoEh++kzS7ojcd2\nsf648oz/g9MvV4dltFntTxZRd2S4y+LHyPQurEupxwO1JeYHbBAIsLeGZnXQ\nac6wFAax+/z7gNIpqxvdlkRR3C5RNy+u1Md+uDls35spESrrX+BY5jgUuqKT\nYDEQ78MLzB+tvbpkxEZV3v6vlngs2kxbY8UPrUCt7zgVpyHcfCv2zPtar4gX\n62tMwIKoojLqmNU1pm8KkOO7yhXq1Xd0xBMQTxTKb0tpH3f58BXvJb3fgfPY\n205/tR7sMvJxgV/2sfNJGjduCRk3RejbYWOHqleFlp7KJomZQaVlyqJu6DZI\nE7Hma3D8SOPYhEiF+zm17De6LvFskN4T7J766MaiyeSF62x49CHMa53CISag\n8I3vt/vXiaKzxG3QSLImxOyyhvgPY/upbIXCzANBkdvI3WCM9OV25tJBPg7j\nxhBi\r\n=iPLo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKKz7Js86l+wI/7ZOUI6ePiOD/vrsc6RVylTUfqCRXmgIhAKiarmo+SDK3ZIcCed56wlWqMaT1Gro0vvVCKVuE8Nar"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929062452_1569738438805_0.1675169908726979"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929064117":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929064117","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"47e349b8509672a49c2cc72e2f441302a9d335ae","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929064117","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-3MPSFsPGHq6aMF2sXs41yBman2P7iOsl27lr/m9BdBUI9fLYJRWeLFkt8WIEjC1QnZxnWSHx+pWuHcPO7s8cAA==","shasum":"8143f53f034db0fba67dd302756904bfbee29cd7","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929064117.tgz","fileCount":510,"unpackedSize":5845188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkFKVCRA9TVsSAnZWagAA5poP/AqYMkfq+y2rfH9mByZ/\nMHSVS3DipiCz9HhJBhd81z36QpegJBVRljxx7KMuAgctbiEKq7o1QpTaT4od\nnRZs+xM4QHglVP/Y7yT7C5xio6PEaCJWb25gYC+8VgI2KT0Up08whN/fWOn/\nX0YSa/4de/lo3hr3+WXDqTvs7860ae/ywJs+06mD/Or2ilQ9tPa5xza2wfZq\nB4CGJx1nFLmexjJEvDificr3LKWtCWvk/qVHtwOmCHPlwvta7TfHUAnHJy2q\n7Pe04INVI6jpKaZRLSQW4+7ukLyA2ryJcoCvc2IzVk3H++AJKsPqqAwf1eSu\nVCPnCejG0fCc7T4LGkJ+SKNn+zEMAhpmqXnbo7SjAnVJ/wqkIHBhyqYpFq92\ngP1RXXsGlJ3dW/CdRIG+MQbqA6ApFRfNzXI93DVoS3HCq2h/AFXD3FXkMo3T\n56PlVyP8CRJA7XDFC7DBiIJh60ZrmYDdeeHgH3RqikdOyO0XBKmjX+nrrq8q\n00jiXHqBZXvVYHDnlnApq/DSzzmJKJHl0yHYjq/xDs7lk7ZstD5X/pOglYOl\nhnmWZZ+sxjxxzf6W8kNnQ7tPhxmylHnoQNxjYbEnqvhBi6ir0rkj5XLNPf+v\nfA/BSYH3N8V/LGO6and6OzYjdaH4diWoOa8SHYIGqp4o0go3vGprboBcLUr7\n6dLN\r\n=HLGH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJdPwjgGJIVdPVuiizFz3D+5T2SD/Hjo/rd6P3kjX9PAiEAsqS7KqfWAEMe5KUQiPiQZH0UXvcGTNbIS350MVpXSS8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929064117_1569739412944_0.834513559014763"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929070348":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929070348","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"616326b77e3af1accc9fe48e7d57649ca3c1fe77","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929070348","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-e7LANRaWTBquLQ71lQsSp+mu0d+Fj7mrcKFwr1F43j37KIuzCa5g8bfyVFaplFATSXXrWyhQI/gBWRJ4pYrVDA==","shasum":"145f9bcd17dacb2457b744b1e54492b40eeb9543","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929070348.tgz","fileCount":510,"unpackedSize":5845117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkFfsCRA9TVsSAnZWagAAPuIP/3KyE9rV/eu8GiaZibIb\ntpCSvm0aAbp77VfGncTUOUzJuSNjs7gi4HcRtg0V+PnbY6E1kcBDS2bu2Hny\noPQEudsb0i2MhHmNoJPmrK/+3Mf0Zs4sMYV3bTqFPj3CGKiyRG1qSFaNaKPC\niTryiN51mGI4fNoWV3ouyhtZD/Dqm91amw8XD0MQNeWv5cKNNfPdknM5KuIc\ne3OtD22MbhNRyMv88o1Z7rOuomwA6nw1jhzTCft1XlxsVFf2cM4zLhnPhV+2\nhQxfucFfHG++LU3BY0Z7DPhFm5OP7A+eNdtOH1p9xNOnCm5rFjKsjwkOMSQt\nFkiM+nsokUkSQGxrDi9hdC5/QE4sbfVWZC66lRuFx+Wm+VFaw2zKWFe6+uGo\ntdgyNl90q5FBI+NlLN2mOOiOFYguJ6x+0c6a3umLkZDY9leIPmk5OwGdsCfu\n1vR2BIju1zGEJOLM6I2oObnxriP7TEh9C58ZvUVsGbOBCVeIM9UrWPP6boXm\nLU9lGtZkGoeG4tXHIkm1l95uAE6svI/qA7BP23Z1t36viZTzJMQT/ivKgJD9\nNa3oz5Q/o5O6H/2SkvVfsp+5SLSaV6Z9K7gmODGuPO7v9SNlIqqBEs2bUyb7\nZWRod4ZXnniT0ojfEImgTCUafL2YAqhpmax8GfI5YvoHwsADxptNwK68DWlb\nm3u7\r\n=lRDj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICrABlQnxPGrzIzKrBXvNAWl3UsRLz5w3u3j5GwBi2KuAiEAn0JK9TaJ/wjSCKVf0PkJowuiJ9j2GAUeA3TxDb6sRgk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929070348_1569740779496_0.5392816921897483"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929085250":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929085250","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"db8a22f8d757e7b1052c6df22d4c8fec1c43c744","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929085250","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-9kJnR7QiQSYM7YkOc62UZf+m4S9B+oWP2Oc+VystzyBd0O6hDzkr3ezOtZ6qPNnuXUA08kKj78npBtyRi0sKGQ==","shasum":"1be6b1930f8d665039efe64336f2cd957eee9497","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929085250.tgz","fileCount":510,"unpackedSize":5845178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkHFqCRA9TVsSAnZWagAAo7oP/2jKnAyGBilJEdkq1nHl\nTukISO8kLgQDQ+NHxGbIml7CM6FklNbkRZ09rxTDN5h2oDTBDsRRiAHVxcmi\n7MjR0Ax6nhhHSLCU9RLd6lFSs95ZkW3SW11F7m24I/rhogvAGdcfYQijetBP\nm0qL7o/4i68ZZaxey/9IVu1uwqYNmnxxYwS6Blx4Yw1TJC3vPlIZH0EvGwFX\nVzmQmwWoTjpcs9gj0w3R/VpPmx9f5mLDAv0grkNAi5qcQMzE1BB84HSlZW+i\nCtAp5T1BCaVJLL1KYq6GAnqDhWPtIrokM8+QUXoN68rpxG5fA7Nb3XZLRkkP\nfzx/FFZ8l6j5QEy5rNQBDOQ2me7Kr+ijUYdDL2niWbGXmCHSddBY45LzipnF\no8AqatvcDgDOxeza4DK1KUjq1kpP4uljD2AwQqWHw3xehfIxLSSaTVPFUJlb\neynOsVzWgUkVku7Bu4Ztmt9WhpZ3bGVEACgBcJ2m2kFCZ0XbmldkR/TtKyxB\nSiufqJozVwT6EM0mhjNZzwkN5SxAKC7JmtLzLOK7X3+kd+7eOsyjihNStOxH\n8srQsuZFS7XMmp8vRw8ozvNV2JeVkx61t4lJ83lPFlfIuOYbxMoib+KqMq4V\nUnQHHA968jmXdZfro0R8GjUMii5/oL/6j/WNe7k8s3Gxp3PBZw+3XQ5GLeFX\nLFju\r\n=NdlO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbrIQvqlkLqTVJjEMcnwP8HspC32t3iq1E1tZxvKuGSgIhAMB9slycfu0XRhtEMObyABYDQp6zgc/DtCNFeFTPYRt4"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929085250_1569747305349_0.03944440865846599"},"_hasShrinkwrap":false},"1.0.0-sp2.20190929234048":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190929234048","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929015035","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"71d486f197da1dc6b50ff931e390202246247cea","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190929234048","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-K3mIpRB5faKVvtm2q0mLihVu/tmkgQ0wQEPX0IEnLadDRb7NFYDMgRDUSqEKwisLmpBjCBKovclIIn2BvHF1Ng==","shasum":"ba44a3beaf0213a919a7c537bde1cf7a8472a627","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190929234048.tgz","fileCount":510,"unpackedSize":5845109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkUGGCRA9TVsSAnZWagAAPoMP/ic25cMhQzI7XzgcD9Zm\nmZLtk4lIyZMfNQfuiHjHdp1CUrccg4bcjeEhnJPvFHm4Nktb/pPma2gjk28l\nmM2yHbSziFHrwuV0wLMBSvndENBgt9GBuEjr8d0+rbAjoarBG/l/fnX6J7q9\naXfAxyzDLDjAJ7prnNeeRiVl7x+Yir/2MDjdrQOUNVm1BStv/Y9yi8yOgV2M\nkGpLOwAbI+Gg9KBqCEP0qfmtCk6f/oeH150vNsk93U7BVWsExd/NlJ5g5sef\nSgIQKWvlUMNV8phRlLzdvrnjFtQkK27M2sUfou6ViGKT5oF5HxjnR+PJ7eNU\nhz40ZSxy7eE1fngNwR0qstxLsmfW7zkZKbtkcl4hrj9BnYY1ljbhmk+tNizT\nBJ+R2c96/W15X7kq/hZy6R/2OvBrtBVCwT+KRZewbX6i75UzU5DwpxD1klNv\nqIsiBCY12GJJnlMx9eKZViKL3VqXVoXRXsKsnnowmjDh8mqk02NsTRJikhtR\nNGqt+qQfs7AVj6bJuAS38zRMoyn4vzUeo236hkSfhFy7jp2wZ6cyIY1bZ4oJ\nPMkKtk0Pyvkq/+vV7yduOm0VjFFss15uDO3CzlFIyzRz4tpcLr4alY3+euiO\nIEqcvyb9V8VwajfOg1kf9k56Fqm/tlpbP9kZ2wsV9KxWdM5429UIvy5JA6RP\n74Yr\r\n=IbJb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHKY/zvgOBwdxfUyo3Ge6ZPCdIlycXnveEN4mXQHzthLAiEA2DV+rD1fM9ZbB2ZbzuZT6LcEbB6bwcjNL+aRnOYeIPg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190929234048_1569800581765_0.5981595776207906"},"_hasShrinkwrap":false},"1.0.0-sp2.20190930072647":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190930072647","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7e40f808e0899bfe5f2d3bc4a77cabe532d4dc36","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190930072647","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-xh0jScODjVhbgIzWLNb6Xxe/BW+D25kqAhFZhz1g015K/XsFd8GqaEdrosclboTaUKz3SyXF6GKV+AApRAcCnA==","shasum":"acc3ab0c0713ff20f309f3a9ce72f9a852191a5a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190930072647.tgz","fileCount":525,"unpackedSize":5867408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdka63CRA9TVsSAnZWagAAy2MP/11lIwvN+2nfWylSI0EG\nU5HfNwezo0g9LSyWNKNXvL+HQrs2+QKpjr8bQvsQewxd5SHaegOOOv7apehV\nEA0HvvV49vkAB1vA4K2F9l8KLtP3hc37rF46V3qJ4phE0ZMDOP8NE71V00BT\n4C3mOkmek+cumL0d72X/ogEZVyueW4MM1mZI2bX0FY66p21YNzfIHFwk8C1i\njcfuBtFm6Zj00OR30ILDD6+wAx5h6lBrgFsn1+Y7s71z5wIsHxhH2r6Yc4j5\nkjX8AQEjVThsEXLp+ayO0JHyb6+0mgrKJyv2FhNhkGef2W8fky3pzg0z+swq\npp7eNQhB2CWjDflvEv98XyeVibjoji5fxhXkzUK1X46yOwF4WXL4aGgPuQAf\n2/ST76Xo5pnie3iJDQAwscLWUOwlw1y9Jb6cOW6xtb6tz/8fvgCvpbNBqO4j\nWLkbTxF4+cclssvZYITVrL52dm3u5mrPguN639HvKoP4rvGNA6/C7n1yGOg2\nZdeoV+NRV7+y5l1mT3MRMiNQGS5Ia6oe1Y04sElEtODshgndSVdGaFNjwd1p\nI0gQnLikybBENxCnjoSOR736/DOsZ5aKuI+OWxy4E5RZVkKgdmHu/PGrTigl\n1yHJZULf4n5qk5SjJ0KD6lN+BbO2WyoCNFmbp++UL17tB0PHIX4XepI/PKg3\nw5DO\r\n=qaOh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDbGoboKs6oGroHQvkFY1JdkaSPGZBcgq7P36Q+8YSYAiAAv3mZEroaMKscF634C/Ofqn6S8Uu17b+GlmovP+ysig=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190930072647_1569828534858_0.19832239148663433"},"_hasShrinkwrap":false},"1.0.0-master.20190930080947":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190930080947","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"03f410e8f98294c2e6144aa6eb3b4d9088ccf6e1","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190930080947","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-AKLY63nbzf/2q4s5EmDaGE+n7xn4ozJIr0A9qTJF5ou+ZD0+9B5kK0pZ/NqXPt2G1om0bXwiN4+3reLyl0x4Mg==","shasum":"2bc74df8180470ce9f7139653f506086dc6f6330","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190930080947.tgz","fileCount":525,"unpackedSize":5867758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkbjXCRA9TVsSAnZWagAAxQcP/1LpHyY0BfiBLJ4rShbs\ngcptNNcx/aG7icLPdAWY7AjfQCwctA0kN34YsKgGQ9WtgtioSzFsh8iSSyj/\nlBnSFb9fZLJbSGX005KRVuvAfVrmf7hyc/7NNPgGy4XIrbEqPD0CekTj/4ch\nPxOYsM4suEezLoFu8D7K3TTsmYD9CCOu84BS0mcQ1qsKP/cHYsGNPcDFxvni\nI5+OwrArW+v0PPyWIeA5HEqqZvn/5q0puLO+IufVz7ZpTv2uIX/joJLu3Ddc\n0xHglJxlf+Y0e2fkj3wk79YwuOUuIRtxuWv9tDa9Fcs6GZegICFm4bAJ5sw9\njYJNrvdat6RtE3xzapUBy8TjtN94//xxc8gdeY/KxZCmjbuJteooi46BumV+\n/r2R9vnaVsjDWmDSo1nq9XV7elQ/duru5xE1nSc9UV4WijYeduEVIYVhWmQ1\nYXsgKGsUFKTky2Z7s51FYCQrbnFKmFizgxU/fREDH8z7xRpLp5LzhJYAS76+\niF/nkMWSk6sTO2bqFjZNDalPXlY01cvL0s86Kpg5FO7VMiw9NptV6lYQRKfH\n/oP12xg/WBmNnDQpTubHx7R0g6mnDGcuzmKZjrreGZIYCtZVwM7Eau7JNHPl\n8nhbF7EA/wK9KKxDVelKb43yazHDWqim+PjRX3q6YXKBOkrF71tWgU8AxLG8\n5Lky\r\n=7SXS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDR+rovp4V9k3I93xGAaIuP1A8jZri7swskz0kcx7CNjAiBmA76PdOxr6kN+E5F4dVCcqCFqILyn9Mw0OcCyiWW7jQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190930080947_1569831126653_0.3440270509024179"},"_hasShrinkwrap":false},"1.0.0-sp2.20190930121406":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-sp2.20190930121406","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b30e5a94e61a2b2f2ec0517d825e4c66b86644ba","_id":"@atomist/sdm-pack-aspect@1.0.0-sp2.20190930121406","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Mh5DyKnRF9V0nHQJM+lOY7KHYV3bHCcjXJqUoA2fOqw1kkUiL4moV1qq2QGS6/1Jho8LTkvsKm/hoAV4Wkuq8A==","shasum":"b133649cbccb8775fc5474dddebf398fb9073c55","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-sp2.20190930121406.tgz","fileCount":525,"unpackedSize":5868178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkfIVCRA9TVsSAnZWagAATdUP/RMnzAFIWG0YdOUKP2FD\n3xbDzG0oVpZiE45rI6HZQyNR1OXJ8jzZmIa4THRClzdK06X0IFr9MDtCinkd\ny4+C2eJMLyRCQhTmpoLZ7wcX1iWyMANVocf5NPCnF8z+4+WreFtL81LUJCxg\nWkT3D3W5KQaxBqv2yq4bspxRbtfkXQ55gpFp4Hj/6K7UwTDP+HyhEcv4EZzA\n1sVtQ4/4gLwbHIwSW4pi62gVsaTit4BB5QMW07TnPYkatJX3NqejNLNOGslc\n3blu76mKEBqle0kvKnWZF9Jby3ivicsIRGevF5MZ0GKe5kj1yEGLGQWn42Oh\npTg5xam5TQ5GJmN3uLkVVguiAtezHIsryDaU34Nw2t5o0tP20vQQj2fPBwFT\nPEKrTpa3Zzme6mNuH3guSV8atJ6juiRhEry4xfd0htsutwCWLm1Dbyua3mRM\nt5Nz7YngPXgl5j677vafoN0ED4k5Q44WW6dSV5yvsf20gLXlnImAfplI4cS9\nG4otFTNzM/ptdiuQR5uzsc7ImkTBgm73KxkmolmMCREa5dC/2hHDSk/ACAjl\nA8vcEIWjzoWW0oHxfuY/G0fAt8OBdjbZXP8TF32gDMAcTb1NBHxPb8tVvkN+\nFa2StcW30ZvW+zsbYH4CBRoMLWT+AJ5NxmVTkmpuCYSq/Oa9UWyDPcg3rINC\nQmbs\r\n=mLjF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJV+2PpOhdrzNXDPC+P4QX0hFAYcjMtiT8BN9wpHJNyAiA6YQtIAcKeWHALC7NKTsYODG8TjL8NFTvCTWUI7SsyMA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-sp2.20190930121406_1569845780859_0.6547232520612802"},"_hasShrinkwrap":false},"1.0.0-master.20190930134724":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20190930134724","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a240b8122482c7574d6f92ffc49330162cf26f19","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20190930134724","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-h2IYQm7LbibzMaIbbTBT2vJr0TF1UuN37rhscjsfO61Ri0BG0zumOqhBROa5JWua0xhr4EAmeu6PNzjRJkGwSg==","shasum":"5823811d83e538213f6f77f8a0c2d63b998ba4ca","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20190930134724.tgz","fileCount":525,"unpackedSize":5867775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkgf9CRA9TVsSAnZWagAA6ykQAIR4fogqhoYF0CVej82n\nsVs6RN0L51WZ67PAUlKjsZZfDH+MFGGm6jUmsTg0rcqztPyG9pi5DxW/I7lT\n0QCqnlEju4J1bAKjk5BfBcpaItpbm5eDscerEidzsz/ZbY6EFsrgWArGCM0N\njo/32aRF+j+JJPoXJLu+yIlxPMUrqzF5keFH9FLgh/AVbaYgu83XgOLGqxix\nFh9tY6X+43AYict4Bagh0Ox3/8Y2Uj61Ly9C9SRlexYOUQIue708xZk0myV5\n+qh/aqAq4z1qEyxVrweS43i2wtyGpmY8kSlGCYkA1cjjIOAN2DmRcOStAWgw\nZjCbclqxKp8gcVB4YizjUA2pHnlZRw4nkUqGXmOzo9pLo5WxZ0H6IZzeCigb\nXfsDBaSpJDud/uqUnClG66On732EHZz1jowM2EZKpwD/7VqiBn3NNZRl9PfS\nw6Vlzyem8x9Y673RA32kIUSNYDw4PCpg0r/o/do2Mkw/Q19FhSa3y6iFlq8a\nlIoBKt+v04DFtz7Fn8snq0My35vZuwvxf59ICdIPx/HyRE6/k4zGnFJcRGMk\nSVtPz/MKbywudBHD/prnztOH7N5DKqJyOoFz9TYVrE7io2ynaOCmKwLNxghF\nZr7W2q+vZkSW9UyMyu7djCLC5hKxEc8LfyoqxtM6ErcgzuFdUcvkKvUUxuqJ\nJcll\r\n=Ow6U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD28rjP00EqOjikLPlRDfVNPLQVJfTs9maetoQhWFCGagIhAIcvVGY3jEdZolJy5OA24X07FCNs18BeGRD6KE4KmU+Y"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20190930134724_1569851388897_0.08459678869202025"},"_hasShrinkwrap":false},"1.0.0-master.20191001032651":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191001032651","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6e4a4267c2ea6ad0c2cf282d27fea431b91f7427","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191001032651","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-65FJB59nFMApz3OPfwwiWWagG7nl6aIU8gEg/cyncwihfk1nC8DL6eJ5ZAMEYP/pn+p3tQzmUv6aCmYQChw8Zw==","shasum":"dc7545c66ac0cebf5293ccd12f49cb08f4b5960e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191001032651.tgz","fileCount":525,"unpackedSize":5867810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdksf9CRA9TVsSAnZWagAAMf0QAI+JWnLqrGvnC00tcvKb\nIvjnL+CW4JjNO8JH3Ja96MV7NLONGJY3wnU6X4h0ajfFp+jZcwyVXbxPN5Pe\nFjzJwayGwpUXUkny3ZNZwl6HFsv0pMpgTnevzY6kOJ0sTtHqeVVbbpzKxgrv\nwNhjHWR9vtr9BE6pX9lkKTsWn8gkuDL98XEDKCJqrLinxx/bR/zu2iZWze2h\nwFAkwatmLRO7BvMLXOLEoLcti9Nb9oBe2kMV+YXBwjpUnuqwH38gzCOCLO+R\nDo54EyKw6PZKgj6++SrNaxJjQVIhnYWhSgM/UVIYvy4VU8kK9ckUvb2DPHwj\niTIsm4uzTE9iseTm/b6tAcwDtVWz+Kzy1hwT7bLRY8HqKHgweCObkfPKrQ8o\nAAs2InZhXxapCVex7LdBJKq5IvchOHBJdhqWWiqbNJJRKuMzVRz6uXv9ZF/C\nkk/Jykb1wE6zryjPGaAC6aqW65Wk6hHa8OnLbXC40giccTU4lmJgDwW4cvQ9\nDm/g3PPSXS4DyH7ZK8Fu4lSlEMfn8T2qUMzqaJR3ITt4OCIRoUdCz1ZopV+h\ny2AaJaUEflVq41PeWG7P9SmgyOQuw5Ym7cdB4F/bsdljNlfqNWhsdzqkcTFK\nbIQhmfasHzPxCBBu+9PJRDAeZnK3nczkdc6mOUHbhnQ3BLN9ugHn3LHnGcSW\nij3i\r\n=+t8c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDI/QhYv4bsuyH5mruxtTvTlREMbkJvTRkhdK/vf6e80AiEAgTJgNa1qEjPwdn+a8EDfw6KnIACwOAQh5Wq7IPMmLIU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191001032651_1569900540946_0.3967262439043717"},"_hasShrinkwrap":false},"1.0.0-master.20191001035431":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191001035431","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2ce52adf3b981595bf07ccb4f558b26bc995d91f","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191001035431","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-A4CLP4PMM5XCf1xtr3mfsOhqR7lFYmCx4k4rsFvyrepQG7MpPQqmQuMWZ9ASzEZVjt4Qxr2x4qvfRUKIDWLnMw==","shasum":"eec3cd027c3e2fc9e2e4cb0303e31fa2eca74e30","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191001035431.tgz","fileCount":525,"unpackedSize":5868352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdks6MCRA9TVsSAnZWagAA+AEP/3mu4TqAc8TAilnKvXfk\nVnh0o33I6UdgRjQwEamsYAhYQDl7fkLlzcw+hGeTZEpTOrXs2EZbbgWjiYdJ\n1J63N3N5GOMo9q9Ep6cvrqVLgmU2THL5gMe2jXuXIBJhgjvK6rKuAcj6vgz0\nscVE55eZmxyTbUQbe1gpcCKX4Q1w90mO9yZJHm8/2MZbODG/8TKUPf0V0hAt\nKnQj76XxyrLLtr/eKZDLXJei+WgQhu84LQBIXx4GjCC6JcX/Q2Mi7ceXCvmV\nbbULifKzTgrtGLnj3/o3d0OS8hROdWZOEFYRiW+6rSv7KghYjRNkMqILR2iR\nCLfPjc43n7vk+UthU8unecprWEcTIaX6YN/EVPoBEVdbXlIzGHKepK4aPoil\nF8VmygKGuX5EA5Us8KZO2K+qtMO1RV8WzEsSzV9SU17c9xE++cgum4qQx95S\nVe2txkADZuXFFd4axd4+MSrqrlZM7E1epWr+YibpsDt8dMr2ITkhG3wtjgIP\nl25Rsk5JltJ9A6XE26PhPG0bXwJ5N4j4EBwlYi+tf73lt7FPu/CtFR4gyDvI\nUbFDDdRAAo0eq2N4SG+EkRPSyQRijRXdrEAlUGvvW2YpBGVtzV8Fn4jHmYMd\nwcvfY11LgdYwuyYcg/aJKYq554FsO5El42FXJUo4buOJqrtgPFJbxMKcK7pg\nT+lL\r\n=2cx8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGwqa0oJaKKsELL9ELCvo3ywD9mWBmOxSKqePRMC4b03AiEA8Laa2zwOTGM0bnJUGQV8i2WBW6+grGcCdv5ZvVFmYLo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191001035431_1569902219558_0.3615968302401127"},"_hasShrinkwrap":false},"1.0.0-master.20191001061600":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191001061600","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"74aeed89ec2bcf77aad1fc20c8209205a5e4fe38","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191001061600","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-jGz5mkszliJDi6Dx5QuCAVTEBulVwPiH8QbPT+xFyJY1/NLtG3zDvZKE11reZnJrX9IcrfQ95UFPNBIy9T8gFQ==","shasum":"2aed90f2ff2fe1a8bd6492f8ea0a03967ab221b9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191001061600.tgz","fileCount":525,"unpackedSize":5868388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdku+tCRA9TVsSAnZWagAACZoP/3O5tWhDp/yUTVYAAyuD\nHghVyj3/JJhMdmtltTi+65QAgxQoFoUYb2L370EqOlEcbXpCIQi8oSrvFFmu\n+IffTRrkHA9B2/giBg6KNh/wnjVq6KqreFBiSMXAIuleztU7FGWMJfGOcY7i\nUvI7Q4eEQr+c5bWDY1AGzc6HW4hPIG4/f5ZCzILwHxH8Gm7gLC7g3yQkjyoG\n/MWcC5nWe0uHhi/jW5MOeM2Tp0LRbOR/mM9v1sl7QwqKGdzrNimoIhrahuSi\nAnuUpeGbo2Qe2c6eymK/kmTmchjT/M+M+FMkX9A6oB8VkMzZTh5Z9m5NfzLZ\n0et3Gd2F/Ve+a9Ybx34YscJ1p/9BcO9ZfhMYZpfCHBrKfIaHgxmF4E8PIiIY\nBlyctCtao2HhDFYdTWHNmFN4vDgrzNSPk9grisU1C6suZdwGnYaohYF+Rjie\n8+7foyac4JusQmIMYORyHDQ5zDRQ88FK/6XF/rPa6pVvfMw7tjmlIHKybYLt\ndesMFbnNunTOzBH49myBIQHIwBb85jJnPWd6oMjRdqhV6v2/Mc4cj1cf/59Y\nHgHorVFkagaKM8zIvKGoHJ3wLMn4WgAJn5r+CRQgE1tQ/KBoJbZusx6Z400/\nJ3T7D0r7zoM7Pp8LjS6B0q6O0M5WZF66u3Xw1ea002bn4aPVU4se82KLJyeY\nnwT6\r\n=2Ncd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHNVsuFfuE5vufKjIHZaimD/Dp+nxVRRp3vCMdKG+LzuAiATPb/1ODTCsgy0vr9+t3WwNGZS/0d47g24JxVu2GkDgw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191001061600_1569910700442_0.603944943428462"},"_hasShrinkwrap":false},"1.0.0-master.20191002045649":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191002045649","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.1-cache2.20190926081543","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20190929225757","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"2b116e7a64e79624889c3cc1fabf7644d4bf17db","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191002045649","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Yekfy8x+2ilwosEMPTOuvASpm6eDl/9KkRP7MyzX115AttC1/3wbPvp5x27c1gRTZwpMA77Xw65/hBjeFyQMmg==","shasum":"8564290dab19c24cfe1c805b08370c4970085989","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191002045649.tgz","fileCount":530,"unpackedSize":5885509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlC6kCRA9TVsSAnZWagAAujkP/iM9JvqGHbVbpU5nvLJu\nWccJc6Knpt3O7C9ekpTNnLzKxu754v4P3T5kgmTAx/Uoc1pxtylkOa+q3Rsh\ngMlD2G/0bySTUFpExn8R7OdXzRl4HIbFuHm82dM9cdB9mf7+8KWyLImgcxP3\nb/Cxhok05zI7z64IQdKFNf6tGCqf8hGwL+r+dq9DqnFMlxwMH1g3JKVakuvn\n0qPlaP2YdgCjdO8r1DWxYi1ckNsl3IJqmcRB/Qx7IvmBiK24ZFDHwDKGrjvQ\nVXTAlTA6ICLjfke/WZWmzsJi7YKEwDCppZyPo51msKt0SbYSSjhouygkB3ao\nuk/O5OHllm6qY/Ccy/qYSHfF6o5KPbuQIEW3SIBCJaO3ZopdArYei8qf6iCf\n2W00EBOTjGI5g3HToZiZzNxphs+fNM7nfoQ2g0O3o488ZI0ZtA3Z55+E8MEr\ntBsbZFki+VOA4dMk2KtUH4BfpU8aRJCbHJ6kbWzkzjunk7C+bBIVTkmftVUd\n4mxOsiNtEjQV7uGJRzVpTUWJvwbVgaht725JG0UmvruZzyFbfT2cwTnADP+b\nTI68BGTmA1bQPB1J19TmcLQFoLD6z8C/5mZXxGZx5HDMzhX7h45/KyFCGNeI\npsy0YGnEOWT7vWyv5/wpOKLKoWaUfNx2/9pITkJxibJvER2YicsPQeKODUak\nmDrE\r\n=iLgo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtOh78cE/pGKSPLUX24fUUNSnSKGK5n9T4/8Zz1NZoHgIhAPhnsgwQpjIodRpkDrGNO7jD+GTYUw3lOjrUpd2deANN"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191002045649_1569992355644_0.6816214657439472"},"_hasShrinkwrap":false},"1.0.0-master.20191002065854":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191002065854","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c74f5eed9d91144f909758f074230764c75c9e66","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191002065854","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-kprZXoCJUKL8PahqSUvGRWsAy8ZKoqjxK54OjkApgpqNFWdF4h/EFIDyizLkMkTeqG9EkOek+Sbx07QsMKquMA==","shasum":"7a437ed2b0105d91eed9f79e205c5d873d844734","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191002065854.tgz","fileCount":530,"unpackedSize":5898958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlEtACRA9TVsSAnZWagAA7iAP/RF+t3X03qeL9N5hNxIg\nAKLXMkBUGORgP2ZWiD8bd76DMSLrBaGEa78+2bJbetCudFBBAUEgPFArmm6V\nlqmW4nOJVyG+77LUK9Qes3vUvBepmnUNE09bUj99KVEufW4qVLExJCOcardt\nqCVADqa5kSdgAhcZs18E5Ym3z6MoXJlcuYvzXFv3tHpFHq44HA2+s8yJzqY9\njlXMcJcAt/P78tEQs99F0g3zCdtap6+rr5Fso1rBeF5ics0zPTpUAHH7kuvo\n/jtZlr0DaI2UMd3jQSUrMM/1SWZ+h4bjeinWZxV9yqcpcu9BGlqsAbxpnXsl\njflTFzbAFIAtbm624CmTrszH6RYAE5ypp4oRylTKINnSTPj5e/G1/BKRhSez\nULfqpHyHSkege5yTacJkEtMw3GXfGe4QV2txQIxWr6lRAlI+M4OGvPvGHIf7\n9x+KX0UrlSzv5eTJVxnaeqI5JWCSEt2JHVO24B4WMKazjZMF7ouOfrt1Fp75\nfaEY4Cj3Z91bcbJzb0W30sZFso/JutK9XOEWPFubPHhGF03hBIap5/OSDD+Z\nphtcz7ox4IPoZrRegS7Ho3zpHICbqx/ttEwCnX0JC6nnMuhvPyAghky/r6Aw\nYZ4CyNqDyYy3PHwRgcRA3ZJhdfARoENn4uAHhxgRKVhB9dqUkp/8JewfPxnF\nXPGq\r\n=Rw3s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICqc/K5yTEnXOSgMi+cDAforZubG70hKUUTAW6y8Sa2yAiB7BGyQkmnTlIb9M6BncBROG/9IjvMEhQhdDnSe74qfKQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191002065854_1569999679180_0.43248037985965704"},"_hasShrinkwrap":false},"1.0.0-master.20191002071515":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191002071515","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"873c22a6e0d76fc5dbef26a5b887a12eb6b8fd0b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191002071515","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ivWb6nN63XQlWnRu4rc2L/cScVlZnqUwM2cyJbVQjPbLh3m9MmwuDUc3kqAm/0CbnCmzvq4N3gVgMSuO+It/GQ==","shasum":"1ff82f6a3078dd5da57990b654ad9cf4fbe23e29","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191002071515.tgz","fileCount":530,"unpackedSize":5899704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlE8fCRA9TVsSAnZWagAAtD4P/1PGsLbhqItREIaB7wRi\npx89by8m+Wsb3fnDYB82tW9ulii7NeGSAuvuTLSNfRQocNmXkiF4SKeBvMDU\nosunvbJ0SfEaChXBal0JlgUVVYlqJcg99ALah5qShqH6a1EGOiDvmPwzHt3O\n9MrfKnrkqI/XFqpyZYwne7D3S2bkCRwF3W5kPQXgr14wf07Fi1Pzrc01c5YB\nRf8Iq2SB5/Z2k68Uw5H6oUwj7/ByPJRks92aNO6Im9aQ7us+kDAgFP2/155w\nGZ2bRDFwXyXv39E8GYx3Hexrk3Ws/n6A9K2ST4VgKRXka8o/z4uJufRA9w+q\nhl0qh51l21AED89SjUIFTlvExre2Z8d+z6AhB+ah0m2j44c+m7IOhpNVn4pj\nqoHWfAmhBXoFCXFNnUfPKxDCSyG8YimePkpWVxp+4fkiGsd54I9qClplaj7r\npHgMCIeIvDJM5MnDtF3ej3nBKQLdjPoU6UaejG3sohogbvAfHqBbL44QRNOK\nMUf0M2cPHSVvUFNtH7Fj/HTkCerNSzHEYgH/XUmSCO/pc9lzRpReeEQ/fsvT\nAzJiAO3iSyKCwj6HXN2d4XsEGMPttEu8RHNRynKRi0sQO2gCcQmCHTHDtbZC\npTOkqVaoLAbmEBwHDPzQoRECcDXpRG0Rhf/4pTtVEdWJyCeXVtW+tdaSarOB\naaWl\r\n=lYeN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9bYQOghz4+XLJfneQVV0g5XjvJWhHmzHjZjduEiUoBAiBsP95RtsFLbvi/uMmAy3QFJ/31s91Wlq2lbqakHwxXow=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191002071515_1570000670362_0.7342288021983405"},"_hasShrinkwrap":false},"1.0.0-master.20191002080933":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191002080933","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5b4bb8e480e701a11ec48906fbc332e4dbe242c7","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191002080933","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-uulx/BYxZfeWMmNM0vYh4RkFjlcSo5fGecrxwwJJyDR/bGY/4QpSZmSpLajKCP31GfLGwGMjhq31XoBDls6Qbw==","shasum":"861f04400f76d1a754a6e0c91726c022be600f2e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191002080933.tgz","fileCount":530,"unpackedSize":5899651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlFu7CRA9TVsSAnZWagAA0EEQAJ8CjHRp4xdoq59PaRse\n2Io15Lvdzq2w3I7k/hMIiwywbiqTa45Khk0fo4zxC6MEHjXg7q3DpRpV0W3D\nJScILZ96FsyKiHWX0FSDhQNdXeV2KqVFOn9XVbZWMY/TB/hn2ET/qabUa2jI\nqhjvqJ6nWz3SejHs9HGnRG4IfOAgVUwtqgoGRFkEr/qntfXIIzzL23xCn01Z\nBJD7MpUYC4C8vPbFMbPv2yedQyhQlbz01fQLEiHaXWEhMlP/O5w/vx4R5QwO\nTrYUb4G/XWPic5+z9rZnh373vhV5cZFH7gWm1OEwe5MT7lP1PDsWwIsuUNEg\nIECBbbm8rklv+gCaa6tGAyMXxNenQjYg9Ea7OYgegIOv++BlvwtJL7Xf3tGr\nZ8/iCRzt8NxhggggOhGMuatWI0zo69xy1eOaPz9Ngwj6tsx+8AC6uo3qer/h\nMRT1Pf1iXLSChlEfcTF2bZvu8avJK8Iu9oLMoFNVOVU0dEu6cCen4Bw97U5U\nVaJRNXK6tLYTHm4SKf/s+yJIh7MEjW9fOuQd22BlkRFPq6d9kP7DGWlOjDtC\n0aBsthj8MxwxIGnHaXzm0vTF8l+k0hpumLuIMnHdt8pMDM/Ba0VpkwHu/SOq\nMZ59aEA5ytuZi9dBY0esUMi3FwriEKSoW2wID1uzBumEbdwZ+ac1l3UuolLn\nHVHF\r\n=+N3A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxvY2iCANv/oaVNnj8Qn6p/MG9s1eeG0QkaFcetvhBlAiAhhyl5/fnodT++O69qCwyWbEyTl3pROSB+wm3p/NMXzQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191002080933_1570003898483_0.675487962969056"},"_hasShrinkwrap":false},"1.0.0-master.20191002105536":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191002105536","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"117cf2eaa715fc4880ad88590f9e59fd89bbca31","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191002105536","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-2EMyap7kHqQtlf4X8O1wfIPYDJ+qcvHbMtsayGpiXoNXd8sT+QvpHRQKuZMXU14xb0ZEwnnSD22p+AGFCWSkog==","shasum":"842c8b141f4e45685db0a72e84283c649271a787","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191002105536.tgz","fileCount":530,"unpackedSize":5899669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlIKqCRA9TVsSAnZWagAAn2sQAJbC11ojKni9qKt/PpyN\n2JyLnTiLkollxr2gtkDNkBjyDRtr6hmuq+920aLQtrlAaMjE43iY515+dC3m\nhw9unInt6enIrmGhxvPXBoKB0p0X8wLygnlAXr4BqZCcjXbgUCLBzWFKXbI1\nTWGQ3vC6asUhBSqmDpl8RF+hGl+kUdcG0zHIsZxaQo2HaTGf7f2XkmaJB8i2\nQBqXBgAsnyuqNL5duMOOBFAdR9sd5sGDdo9JeCxBSm+cUoZOdDaUKTY7pf8e\nd672OZ4lrjRdc5KCW6IQ9Ua0vCP9yXki51f5N2FP0214CNNYzdNb4vScV1xL\ndVgb8r5FAtvSLAdpa4aM774gyLeyV4JgA7CtmIDxGSmywLa+8Mu2u0sQbxXc\nstMlFJ0lqhXytmRz9tu5eRHNRmKcaw1TU69qg2JIf+9dPMb4GfMr9/B21HV3\nwSJFZdtUpdvQHJc3B27WEpVIcRpu6p7jbsSnqQwUQ/wSwCbbS8riUCGPZLsD\nhrXDjdky9CZrvYx66a/d9pMebxR3v6A1zfidiQikSjVF6VEQPDKeQYeq8Uhf\nCUlu8lFG2MYC88f/a4yCzGxqaTGzy4t+nynLYd5zuCUfu27fE5bAgxDpmfQb\nHfEzHUc4zYWFq1Nf1AboqAnfNryqtuevYujSkFB8BQuZY8sfZRcqUrSr1kKh\nCQyF\r\n=syn/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBcJC8n/vwP6b3G11VTveHWZWsoJN2lDVzGbhm7bQ2CAiEAqsYn9DCr5Mif3/LB5CF3WuSa0F5b/R5TvfvoNCnCd+A="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191002105536_1570013866067_0.3685629909699655"},"_hasShrinkwrap":false},"1.0.0-master.20191002112632":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191002112632","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"9d2999ca8300543ad3811c28a24c21f8ebc645f6","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191002112632","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-NzWL5ykhA4m65xBshvnA3/l2+YSgtOk6GyXA/6Venb25AEQswPd5wb68XtqU3zzJ6G4y/9J0FDa5qErkw2C78A==","shasum":"9548d2e270960d673e044a6b9af38aa06a2e73e9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191002112632.tgz","fileCount":530,"unpackedSize":5899834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlInvCRA9TVsSAnZWagAAdBIP/j8yXlgJTdCHmA/01YWD\nOc1sefi395NQQEM+qeVBXUTRIjCHDtGwMHFcPbSDOHkOqRPK/on8tYv3nmRM\nB/Ir1+jedJzDBBa2YuuLkdqpnE620b9az073evGtVEOBzbmXjjG/V+qQj/UP\nfR7JWmdfKuM7cSquZtINAlXpyspd6DaUdXRmrUIrxQHD+Xmt7iO8k8RtOoCP\nnUvv5l4GB4fI0surLqkhkbftgyH6uAvswwR1iEndXdgBviSkEygCify+3bd4\nVRfluCCvKd++T5rEe0DzK9XaHkQjEGoslIlxz2XBbvLTu0xdRthN+aWZ8Zub\nm/JqSUGXpT0JssrpW02rAHulP100nOGsusr1qCsfv3yT8JIuNmD0edjm5NO6\nmA7XXCk7iHJxmh49yKJmc71Q1ea7eldVHNJkQxyZJxNo0nFxKI+jJdLbukBn\ncw2LvxpscNDk3aYGjf1pYHRItIGwmkcSACeltDDErrJlxz51wSflNTRk2MLw\nhJINK0CuxUAqqbZ/NBeqen/TwzYAd2aI4Ob0hDQU3YtGpGKZow3mlNsW31mC\nnjm1aswrju4VaX/8Bpkw0Uucsldm0pUNeM4Y7HkHwiOLQwCm5XGUF3QsKTuY\nskPL8BPEJ2ucqeH5kirto78LucfGk/nuOBU7t/xIOh2A7vRo7xFjG+eL5oRm\npWOy\r\n=2t1K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqnIO+goDKlDd8PUPPyaEqE1kF83OVzInBS1g90Cj42AiAnmk4+9mg2k6WV1hja6gkho93O5ppPAhqmzbaLHqhZhw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191002112632_1570015726759_0.2943029101666521"},"_hasShrinkwrap":false},"1.0.0-vp-no-entropy.20191002194948":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-vp-no-entropy.20191002194948","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ef04cc2c7b5cfc415f750c8c4d1c549f063f5127","_id":"@atomist/sdm-pack-aspect@1.0.0-vp-no-entropy.20191002194948","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-NQl5OcreeXOfGAqi+z72fEGgSnrbVbSkYEnbXEGWj63ykd4htHDcwx0BlYV1VA1lJ91RsDzNf7x8HKdp4tckjg==","shasum":"409df6995ddb92d300689cd091b0b0ebe1f9aeaf","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-vp-no-entropy.20191002194948.tgz","fileCount":530,"unpackedSize":5900917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlQAcCRA9TVsSAnZWagAA9IkQAJsw+pk1L7ntwoxzBG0V\nYD/W5mL/u/Z3LZMtRT7aL0NuXEFnt3bmoK9ojnG8ggQoDqYAHgBh6xK+1Onz\nYwXzAXV46m6CS3n6EYjn88GpuvaD2Gg2mL3HvAHrLW8cFyKVkqKNz3aPB4pe\nkfN3oqxNvp23eNwezT5UFoeHeIQciy6DKpvh2OUcGeggOGBeOV3zoCbATbqq\nAKBlyZ3VR4R11qxx3h2GrorEkGTrjByo6l6Eu9IkkiDf/d9PJP0Ix4ZNg1bj\n3s/ahnQMK8TiD3aI7RhO9EBnQh7viyjNWuIpfJLUHNWAvHJUkx6omQ7+L9E1\nSfG9YGz8P0DcaPi5YpVjckOHXgDYBJKQREXWEJX/M1spj1ggGz158wHqvWbD\nwPLHbPqB7XuU5GG5aLXf4Wcmb7OAAkFi+wuRJSu6Tr6K3iAja7UKmxz5k8FO\nosRsme8WKN09u+s9arsA5mfjlyoTI7Jl+B1Dgl+9yPEIrzv23wtqistGRRwp\n9T4GLarvq0qvJ7J1jDNBFCCJIWSCZMZmGwcHqeaBX4qaY39YDI8Tdn8JQMAM\npqZkMaN44+marIfJURc1+kgfbsTkT87JsJJxILUdRV9JRvc/+SFprddmmk/F\n939en2tIaJgJFiq7v6rwetBIwiwDFnBzXAbC+Ghns5gdcvvaKI3G3xZMNS5s\nFunM\r\n=2sgX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYuj4RXtWwLUifK8dnnqNpvS+QWi6AR00zTcMzfzgnuAIgGCyztzO7BietpRKfWNSbgwTeU5oBBYWfQnFCjwIHtD8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-vp-no-entropy.20191002194948_1570045979836_0.5703474418813126"},"_hasShrinkwrap":false},"1.0.0-vp-no-entropy.20191002231318":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-vp-no-entropy.20191002231318","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"3ec6ea5feaee99cd7e9f72081afc379edaba412b","_id":"@atomist/sdm-pack-aspect@1.0.0-vp-no-entropy.20191002231318","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-6ErlZCs0OvF1VVZ2qPk69+kqlZ+4L1Biz/q9TkyjojNypyFXYJicy9e2XNRwWRYHvurseaRcyeEBmZgLwsL0OQ==","shasum":"7918672c96a082cf89f68f2927c0b6b7e4f156f3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-vp-no-entropy.20191002231318.tgz","fileCount":530,"unpackedSize":5902653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlS+rCRA9TVsSAnZWagAAqWEP/i1OcKbTfxFzpICkEM+Y\nqWoKM20ue87CpYBrtr0OJBaYAMin2Skvu+89m23R7XjF6df2mcJK7YC7AFep\nGTAEJls3lagFnApOwj4NqI0hRDDjNz4dSfp2bQUlVqvyglz1Gfzbvbajf319\nRJI/0r4m3PyAXQ90tGtZFQ11gmzeHJMQxg37i6KUWnIjwYa3ou8u3mspL7KV\n1MTT5Ogwoq/G2E/TNLXYQhJGkSI6R11GXGeFvcLFkaBMpnkH49ppjrqHU0ro\nX4J35H+cLzUuioF/IiP+RJZmD08RzBAkNkXFGek1KVaALvRytfbFcQrfYlVT\nA42cC1eo/AUZptMIKGykmd+O/LvYqIV4K99+3fpDypGnTLMpR2j4BQCEIfKd\ndK/lConz48y7MfUloCrCJNGAiFt6jNZsLn6Mh3avWmUkC0gwtKsBdP6fFWba\nNQzlzFSBRso171c4/nS/dZ1aGdHGQ/qU8YctgJ7fSFTicsPy+c1I4xloi46l\nJsX//+ZAfVgZ0gl9whn7lL/GkLAshBt/jTNm46qgHoE1BXUCKR2rP/oR9NLB\nNStoZtUbVvojKcARjEBOWif+3PtIDOl+D3FtVmnu+BqynEeEkYB6ml0YbA4I\nkIOGHTgkp7WO8ms37I82XS8PldTBrNw/+c55e4/b1qsORzlb8U/ZU3Dg4I23\n+RyD\r\n=7/gG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICFvXuSLoJGDbiXhv1ZEpj5nYARmXLl5Vdm3Xf5qJMSRAiEA9LzrMCiyaAKPvmUlZiUe6V21LVn4HgZNUx53MgomEgA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-vp-no-entropy.20191002231318_1570058153949_0.6707210348564319"},"_hasShrinkwrap":false},"1.0.0-vp-no-entropy.20191003010801":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-vp-no-entropy.20191003010801","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"dd21e3dcfbcdd1dbad4be2aaf5fbf6dcf0478f1a","_id":"@atomist/sdm-pack-aspect@1.0.0-vp-no-entropy.20191003010801","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-tKTw28GOLR9gl8vVarMsP8/E9cIstnH+wWDsQYoZq4nXbkGvtKx6dqP8l1xQMS2Riuk40UYNixBeXYDTO1/Wdw==","shasum":"f8a2fd81ff4e7bd0fe27d8ec6d942ac8e6591e71","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-vp-no-entropy.20191003010801.tgz","fileCount":530,"unpackedSize":5902271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlUqBCRA9TVsSAnZWagAAe8IP/AnYZUaeB/LoBC6oeFca\nlH/aLOpVAXmHS7PAYFRiQkjOjfNVZZji6OIPvZHPmS5/CDtZ7fL/u63P8jcG\nendCVkiVdTFp84+P25XjJFtdAlIRocKqlFh2btsbWBb029Cw6v9jvaPdeSSY\nPWL2QLZGJ2Oi/g0DU8McOAJie0W69TxHw4dswo+a3Wfo1xLRFPHcrEzkrTlf\nLesDZQDw/7ohM6KSS2TvHlBzk3OXn9Auxb+0H/tx53nwgcYjS+u+og5Tbd9p\nZuChRojRLsqCzUnexfC1Yya3dtCByMFOvMRfyrlgjM36tFREdjpbvqcc15Sp\nJ9vFK1ynuYImXKgUEKeGyDKE8Q7AMJvEU1PgGO5ZVcKYJDRsvlo/ooAraI/U\nn02rHXyD+2CjjhFAMOF7Lj1RK0jH9AmtyApXDhDl3Rdp1ltkB3CZGooP9NhO\nHNzEE/HNb1bM9ZZ8sXq3MFuThyfI8MwulyLYIDleJ2QTyeRqY6i/Nf1TNbqV\nHuJFiebCRGdtkMriWikk24620T7pN5Kg4fDYGd8Kq8StrqH7WVxPRXMYohi0\n02KfHaGKgxXbk9egiE5i6AiN+Wh7aCJVi2ZSyU2n8uhd65E9jHGxKQBlQYvc\nHhAWxfGWHIPlGeUdyyGHTrI60UvZnFl8qoguH2L1/5KLzB8IVJsFiYxeVXPh\nuZwc\r\n=Rp8n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKp56gXh7ikz5DZsBphjJNXv8bSb3ghPox7nVMW7100AIhAMqwCswlUn+o2uSTk0bNSuqBegCk3XeMHzcIJtj0spKp"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-vp-no-entropy.20191003010801_1570065024838_0.19494937389350153"},"_hasShrinkwrap":false},"1.0.0-master.20191003013515":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003013515","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191002000453","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b189c28232e87eefe53f3744bb2794e124a7c00e","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003013515","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-DfSZr4HHxvDg/VPfKGrawyQI3dnX4Jd4+83n//CX+SE5tVe782hk5fFVgMj5Ko93Os1HYtb4CWgPiNxB2oMgbA==","shasum":"19cc48437d18afc310f75ba5138fb339ccded400","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003013515.tgz","fileCount":530,"unpackedSize":5902264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlVDmCRA9TVsSAnZWagAAn5IQAJhmRoXfad6kGfNtU9dB\n2yZ64p/1MwVfRjUsAlQFu8WCqblnv22D0F7PLl8S8fcNkjvIgGf0tsOuhPTF\nFEk6RzC2nesG5bT1ZsDiS7GctXqMkjgMiqt7wejOPuYO46nNYGUheG7iS+hC\nk1z6JSnrrCp4Dmr9CxBcVR7Vm6GO4tjt5Y8R8vj/YqwVj+AX6rpcXf9mT3eU\n5Z0lNi/esIRtZKV3lG58LNf7Y2UfVP6xhBjPL/e7y4Bw9v1XLCcqrFATcHrl\nueWl37+a5I4ercLkJgVgTelOUDOfsnJlHOknquGpTeePR7fEkywvh4bv14c+\nmvkI17zDpdQnKgBFjRWkatMEL1q+kJbNTzUbROQcMggwwAn0NtVECron6dmY\n3T1tV7h1NbU2vVkeAe7iaJA4qNfwjq8sjDNUJE5xeUM0DV0HWtsvjxJV5Y9f\nlx/BOsDKqtoNN/Tq7TmxrHbu9PX69VJhYeQiGE5YRwogY+cRI62nt+8thK7I\nX5vox8sgprbeY89HP5cfpu8ivRoM7ft7m02YC3LftiWNLYCywptrB7XeFqQU\nVcZWwtBvDDf7Xtto/hF7fcWyIb4NkhDC8S4LGiUy3Agsun8ZZx2ht4/bOfXL\nwGjATtSJhclgc4zbJkaxU1DY4puDSGzfmVHFzU7Rdi81BHbzpJnUeGM3iZPW\npqtD\r\n=VGGn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDdguZ/UUgG93cBvb2tCUQys1aZuMb9RffTMFINjTdxQAiEAgIUhms7N6EQAuDCSvef7Ku66p/z6yxMDTPrps8cKnDQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003013515_1570066661321_0.8861027995196522"},"_hasShrinkwrap":false},"1.0.0-master.20191003033838":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003033838","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"^5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ae611aafd8ea513a5e0ae2a5e1401564bf93b354","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003033838","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-BKWy/hvfSN6ctYuzzMBfrWXcHU14TKDx1XVvD1VCr1xKY0Q93NECjgx9V4GFJeWEbgV29BCoeLaw6tbmTW6GXA==","shasum":"9b5f8e0dcca340a26ffd5fa10d051d5e72192075","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003033838.tgz","fileCount":530,"unpackedSize":5907397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlW3GCRA9TVsSAnZWagAAphUP/2ERgxJqCYWq67NFcH5M\nY2YD8aj19aEczDeMBen84zuyHZi8m+GyLZmHosX6TZ1XbPKGcN3Y7I7jrFp3\nTnukazm0grBE7/a78PvCj1ikgrCoO8OjsObFQIqBqESPJgkWYnDJkM5toYML\nbWpxeToG9C8iGDUFp7e5llDNwfG0Jjwt/a+AKHSdYNus1BazmwIblMp5h3Ky\nvEc4mK7N8d1t76lLH9jFlWRcZR7mp5WSAUii5lBk13UUlaOnTWCKbYAO2RYL\n+wTvCh7SJBf3KDaTQV30710EKHd+ayoFSmw6lSpmZZDWQEcPF+PWdxLbe5pL\ni51J5WGznOkLmu5S8y3UIBpBzJ0k/TtE54BtranoFIbc4xJdGCOypsmpQwX3\nFApTaeCCsKakT77bRAdZn0kq58bCXWd5P/jZbAWXEZksR/g0KWvf5tFAVok5\nXwBEyafCLvecHgdl+taCw8XorwiWRHtN8UT5u9fRgC+OwVioq0D9VNi3/JyG\nHpUgnIc5NHE6IczuM+I2j10w3fU8GvIoscO4VKUhN5Tr/nmv5I87BpcZzy9j\nx40pk/BHGcPqOoR1PdMEXh4HVdEVZJQVDXym6/OSfs/uky8JQMU9IQXsabRQ\n68SKmYxwno/4Kzn92T8MQUAzCGXfIv2PxJ+CK4AYGwev2kwX1UQ6b0Jj1xhS\nqZek\r\n=0A2K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHmqyNtwRIhIRynK1fHPvu3pN2MgxhyVHfkPBD24EeiAiEA3RUzRX6KQsLyPiBx5BIdFnSxrMe1vXYKbhT8dpC/Xc0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003033838_1570074053960_0.005461191649790198"},"_hasShrinkwrap":false},"1.0.0-master.20191003092733":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003092733","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7d3f5fb9ed372801c8a7b7cfa2d8c07cd8d23fae","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003092733","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ocjw0bQzwlmXUwTuVE/btTwuLYMhsy2UnO0y2NgL3KCMq1qq06eroxj74V32RAkc75HXJ5KZr4Cz4j/uunHh9g==","shasum":"3e02a3c4350d1340e0165345d14d23338eaef10c","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003092733.tgz","fileCount":530,"unpackedSize":5907894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlb+HCRA9TVsSAnZWagAA5voP/3TwSnWwEXingN6kZB54\nYYa0dtlBv01kJIx/XUYynIfrQyNZ5xvYvydGjathFa2rEg9yUFpMk/NdAo+N\nDAQcpf0dubRYA6d/dEBfVXnw7OFyw5lRfXytMvFbZ2wib+bRS50ViVt1220e\n/8WfnkkykbxfSp9ro1ceazZ5HcJe6MbkZ1+bVNzgaihX+TfZhaeVU9pFvFD+\nluwzh8SIZrkhWFUPVDuxPb9zNm7Utkb+JTWTsS+Ux0uM6gzeeeb6+6hkqGNq\n3aE0XZ8lWkImSxaOQUZpQoBgveZpJwgFmvcevayPWHRfpTTqTmeMUPB1I8sE\naW7bMG5fndHNaWAymRviDAlglwF/Xa1xhCp3lB8p98CMewe+n6Q18wAbwjmx\nYPD2G7wVKlf5CRdiwojZLfRmqbZ/VX+0QhVW6sPyEonYBeGXyLSZi71RSbin\nleWNERbs1xXbwAe9Ldr0vq413ZUn1wk3j4yAbTeUcVuVtBjaaD5ACjPjIZxU\ni5fphsx9rITdTMQNxcAd5sdYGbnXXn1LhfweNfE5d4FdtDuk4qs63vpjzcbM\nvF08NWVXSs5u41WGb6aGn5g4CZcBamyE7x/eUoYBXwBbS6lj3gEigVq8fuWR\nEpSsR4KomU14Q1v/MKu3VuXXrSVtUHekjs0AktUR1aaQkcf6cHbdeJuh3Tve\nVhr/\r\n=q9s4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmpA2eqboZ6uK5DMnKyzXI1kz+x2l7+9Gobb6YwXOd3AIhAOR25XfURXTxPiKEciLzwbj1k2kO84mkEZuoB4AVHHfo"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003092733_1570094982614_0.5235889354749923"},"_hasShrinkwrap":false},"1.0.0-master.20191003094539":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003094539","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"3a4f33aa64d19c6fbb072bc61f11bd3a0b1b1520","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003094539","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ljhCNgwesb1blGqW4aGr3gLcEY0APqHcOTZ48DOP1MJUk7XRhIG5hE0L8VVLg1HpWlFAB2i5IRur734iUmmFmQ==","shasum":"eec1946ab896514e2e5a3e706ad35a6ddc542be5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003094539.tgz","fileCount":530,"unpackedSize":5908257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlcPCCRA9TVsSAnZWagAAdrEQAJVPkfuKb9dJYXIpZM05\nTjBQ1vfAL/jaVgGSo5H40o4alL4bvvfCnoExu/9mG3eIpvUG61IFMWkeMLBH\nr7hsQKdkjh1DzfoJDTx6kXyO1YUA6ZJCzf7Piz7LscO320/QiFF5kdkFzlTU\nODOxk2UpsACtUtWhQpYRj6KWCDap5XvrT6TIRsgrx1Z47gmxn2Z9X3TQ80zq\n5OsGKhBMUT+dG3CKFxgwuhzuFyXMPwQBcfjIUvyx+ortWqrMgIafCwCi1Vff\nJXEoFqpzl207Ij4ODnj9vSWR7W6NN+1Zq9iLpTZC7F5qFBAnpZODxVutpaI+\nRonf/Pz5A1gjOqjC8/ZHTTuqerktpTt4R2aZCkPH7BCxV1A8pO3u5NCxe3Sl\nCY42T2itrflydtZJJDLkqFEcoCdodNaTXPYPEDYsfnS4ciIYjhyv9gmhViEZ\nNqgOwU0Yv/W4bJ1qahQk67yO7wOZbTo3QzNhgxeAHD0nht/SPCR+poHIPQQa\nkuYT/EwC+7enFvegjB4RY6N5pZ68X2JfIGXLjBjBVgfkTXjV0ihnM4+hru6P\n/HLnZgBrVX0wC62zvpRC2mLUDqFSLyl/6uEEjzYlM/XWOHLIuRkmoC5naChM\nbqomErLxxNvplOoECdUFCmWSz46S9pkSTBuXWJRYiEw5MZXu59eQd4BLIHjl\nH4YL\r\n=We9s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0A1JiwNN9BpsKOiFHQzyJYKXwtRwtijBafYknvuzViwIhAMmmfSFVuuNw0j112+zZnk23G/b7wP+XUrOgoKspBrWG"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003094539_1570096066183_0.7408604137130239"},"_hasShrinkwrap":false},"1.0.0-master.20191003105649":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003105649","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6557bca504186541c770c9784a0b1bbcd8c207cd","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003105649","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oaC3o3SoVDlMnIWI4051CK/qRVu4X2YXfNHXe6+5QwBfDyrjUK/k/LGKbGUcNYGHNpARHulIcf5KihUIkY7glw==","shasum":"78333194a8b0265837004bfaa87939971a29ded1","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003105649.tgz","fileCount":530,"unpackedSize":5908618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdldR7CRA9TVsSAnZWagAAuRIP/AuevWFySK6EyJBqSihV\nXLGQDRFaYeK3P9vP8vDxdYCeaXWNe6uX9qNAVitV09fs7O4KLWQnoTwHyA+y\ns4n4BfQhYjisyX7zURwCSu5FP37F7RIl139ixwLVWX/tIy+FRBbqKPrRWiNl\nfTD23vSRJ4f8hQY99cfiRE5iiJoLIDFBikIe7VHIW4EfM/ubRKg1CR9y0BTf\nOHgXQWxnCSlnXJHu5vOMuV+0QKB+jM7sgqCurNWO10pmowljW5fMTJM4XaC4\npzEqiC5y191dYIssR+GKIv4IY172Q8ghMP6CvVojvMQAmb3t4rh3gdTIjCqi\nGSLuHiJvajEEiKp6PnOTewhYINhz1jGofLMIFjVYhFN6XnepF9yD29kCvkjL\npL8QFYEhB4YUhSaWoraGXpehOwd5UNz+NDV68ZC+F+VyPO2pFRGN/9aoSpPZ\ntcqX+TisL4B8sAKNlPj0aeuEFxo64LACDw72pZcw/MhrYJ8TBT6UPP0ikEQ6\nHMZEgVrt3BIs2GwYbsIob8HChv+FnpToDHOMhwl5RCTe1aNZFYNJ6fhYEExK\ntltUiq5ovPqlspBIdg4rO37sdRIHqzOR/ALnHMo97g6to09JJJJUpxJEk+ls\npMvjbtJ51E8tMagGnaNKtY73GooG9dyAcAfEEkr/Rs1URO8Li/8sKeEIvFxD\nqXy9\r\n=FTa+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeg4zoM6ENBF1aG1x+/c0yF1zzX806jMAdaSnGaly+AwIhAL4GIOl5e+UpNanFmZSkcdFDpptZ8E/cG1X6iju4L+S9"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003105649_1570100346786_0.056173044798464966"},"_hasShrinkwrap":false},"1.0.0-report-virtual-projects.20191003171432":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-report-virtual-projects.20191003171432","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7a4206269ace01f997ee7671c9dc12a9d8efed47","_id":"@atomist/sdm-pack-aspect@1.0.0-report-virtual-projects.20191003171432","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QGg4iARWFMvet2AJXppIYJQn/Myindd9f+k3qJ8LCD7v+rcgeFcUdesnkqFi+vfSmiRHF6Oj2aozsRUy7yjJjg==","shasum":"fcafd7fb50fa874c32d317e71825eabdc9422204","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-report-virtual-projects.20191003171432.tgz","fileCount":530,"unpackedSize":5912308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdli0QCRA9TVsSAnZWagAARNMQAIoIJce0smukGBLcn7MN\nyyAF4vayhVM9l+sBRQeCsn3b+TqZlxZTyBMztKzYGX0O4JCEH7OqpqF/tZJ8\n2NjDbTVsNAjDmWzOWBjWMRHTgPWcwMDgsujrLQrIMUahWGA/KmhC1FhXN4tr\nHRkLk2bDIzhctJE+9325tZti7XUSueYkKqb3FW7b6CEwyUyHeOdpuh6hw7T7\njGpaebZTxBeIhexAnFYxp+cWJE1lXYvyPK+QUSs9JZNf+8DWn1384rSEXxRg\nCDCNlXlQuDb5qpz3LKU7dggVylpfuieduDXOJAsouKhs1wRkm0p9KAfueGe5\nG6P9yCqYm3Mja7BF/tzUDe5Jt6Tp1wsoXqpNJ/R2LdHkjZVIU6bS7dBDVVu0\nsDpOPw2M2bqMzfUG+gktbunDqOBL5+Efb6XoEyLWnOV8sWo5f+fxj2Jx10oF\namEeLmxuF9N3ULLkoXVFjVbyrCJESZPi2ya2DGYT2gU4EBKVfpMVMoDG+gdA\nKpxf4ZLSQtJrTDPckFLX7jfY97+cBopS+e3VYKvHL/+sw4M/hpVyu5RTQCHD\nWYC5FNkeyI/wS7igx088uwgeZGdQC1urdXGUw1hXw8YnANq6ZHYxMov1tfXo\n+i7LIiMdp1epwCpU1Sk7Hm4aWFbS8Wf5b6WE6Ss6K45NKDzTxwEMxfnYj2U9\nPXjN\r\n=IzCV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLHe0coZqBu1NKtWPH6ergtG+0VAVU16OcChKssGnSiQIgF0ieuK1dzxhIcAu1ToYHYKyvA0syqEROMtE/CkLDVL0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-report-virtual-projects.20191003171432_1570123023559_0.30642481426497703"},"_hasShrinkwrap":false},"1.0.0-report-virtual-projects.20191003174311":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-report-virtual-projects.20191003174311","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0deff9e6fa4492a4850ed1ed0d5c18706492cdae","_id":"@atomist/sdm-pack-aspect@1.0.0-report-virtual-projects.20191003174311","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-147xI6Im0zGM9LlPVXHjnVjumDwTAaUFPCavT/xNQ0msFj6zoLNpbUamszJyPE6tcCLtom7QM4iLAQsJhSe+zA==","shasum":"38d4316b6f67bd270aebf12c4976cd0ec99588b5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-report-virtual-projects.20191003174311.tgz","fileCount":530,"unpackedSize":5912210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdljPHCRA9TVsSAnZWagAAOLoP/0bTGWiSlLtLAXciv2eW\nqKULA+eWjiXLEzuEa6hMt8+jRbgTdXsCLr7BnffKToOHhUTHPp53usmOZ+P/\nOIqFZLFB2Yd1ajEXo0iPujNsQ4jaLLp7C++dlJ3Yo//Bv2a93+DoW+sGpw6V\nioD+OHQRWNfzi+KFrBOLF1BLYtX13K0LHpkk/vQJASY8uDR49SfqXZ6Cew65\nMYIhQim8YDGeS47hCHeOrCGFlVwOKyQQh7HAev+5Nqwy6GpM0DD6wpZul1Nm\nCoeAXZLVh32hHck7rTlWTH4kz5u9HYK6wlMCn7EmhNwBGQTz1XQKuC08WJ7j\nhNmXf+wgdEUbMK+R5uONpcyjDGsRx/4dp7yVIwdjz2XeiKZex+QbMNK65fSD\nO4hw3uIwGFZbae87D79gdrDWNiY4KbxzeioABH7tnvEAlgResBwj2EF2lVl6\nZmnh1OHUEmCwkU4EEACPhAFkJRPuHx+4UTdgnUwDf38pNmq37QDrHxeJi6NI\nmr8+FRuBvQbjrBLTbw4UC8gn6BwfnuPRee4+ajaymmFXGPaYix+QHbK29dru\nAnh90o+G+Nro7dnqHn2JIvO4lDbkiddbKtTX6kDRXowZIIvV372w1a2hlawV\n93aNYhLNmwU/sM4FRFSJO56RmuraqUXv5w2wL3TjzsQm4noO/TpU8XnED+Tg\n0+Kc\r\n=UMDi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1G86XG/8JN3krj/yxCcs1Zu7w7IideYcg5qPRGgnk+gIhAPFjqMLGrfMOwAPOgfDILo58a43QBQwHrIdnq23YBXIJ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-report-virtual-projects.20191003174311_1570124742809_0.4304712552441621"},"_hasShrinkwrap":false},"1.0.0-report-virtual-projects.20191003175934":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-report-virtual-projects.20191003175934","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"77ca9c84547d396a68473fc72c57d551a3584b1f","_id":"@atomist/sdm-pack-aspect@1.0.0-report-virtual-projects.20191003175934","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ocIRRjZXP31oK98uvM/+a50FjYYL5hkZAXwM/w/QDGzy3LomU2f6mgUpDJ59amAj/2757bZjm0pFrAya6bkUSQ==","shasum":"a8da9a159a53878f79aee3b90b936a3c3ad1521c","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-report-virtual-projects.20191003175934.tgz","fileCount":530,"unpackedSize":5912261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdljeOCRA9TVsSAnZWagAA9ocP+QDlFmgTTlFw2Xesb2DJ\nI4iu2zy9bVFug8dVtD/0DArcl3jFk1EiFExpyf5BawpeB03eSzwoDBkcMFoQ\nhWDSyYd49tJxLChyzl1TI9HY577EPTBiqNUCiCleJt0HSFSSZfyqNN4XCdbl\ndSpV5hVfpr0cq6OAnuJ5rk901ybaUy4H1rb6QuyyIdISZg95oTw9nF69YJRk\nWcuob5bJgxvkmwRgBt1R2iE70JLmB0NNaDAMVmJxrWeVEexcECqlpGYPhaJi\nzLjiU3UM1OPl3miPinNTwp152Z+J5pGj0XxSrsw2y8nIXDV61h5f+Ww5p/pI\n4agg6BE/PC637JqelMKahiKHacPBKgHAW2heo3ejU5YX4Va6S5khQauSyd9s\nTW2/nDrF6XaWfsP0xRjcQGELqrgWuTkxIRpkcWxvO928Kb47UsKcckqcSCTn\nEem7opTugEFE1CApKeYR+YXiIxptimY/+EVbYS4Vg3y7K2kZ1Bv3rTL5pOuW\nebxral0laSTMx0l7/1lon35a16awhRV4Y2PSQ9f+26zdumJmKlE82Fue23k1\n3gyDIQGVgzm5M2HUz+j/vgsvkRR6RqoLOvS41pQH00n1p8dYS6fHWzxCf2hL\n60aKdmxn/j7Z0mgM6qU0vEyBj/dtD3OL0d5W/ozQOmLOLqVEOmcEawTqbKLi\nZvjw\r\n=8Xni\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBnuVO8GxhzHkvRR+4ApIobJjOIP1xjG80ilzv4prD/AiBoJwsFYs5D6+XnMuHjTvYj6PrMS7Df7tnxFkz5peNFeA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-report-virtual-projects.20191003175934_1570125709844_0.08313277313965228"},"_hasShrinkwrap":false},"1.0.0-master.20191003220032":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003220032","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b9ed15df6e63dc5dc9a65cce4521045ae0766364","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003220032","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-pTZco/qny4iMy9rhPOB7goQwt+Kd1PlcAmT4DrJD6faMLAr6D/2Cq+sUsXhe0mLxUwQtz+NDL6yUTMKKvUx7aA==","shasum":"86885ec41f7f45f5456a64eebffbbe04ee4cfce1","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003220032.tgz","fileCount":530,"unpackedSize":5909481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlnA8CRA9TVsSAnZWagAA//8P/16aWP+GREm8ZcueC4Gv\n0iOMSH+W5saJLu+7OFPBmv+YT1of6K76yq72/PQ+QLyLfiau4fnilVV6Zxaz\nQH45G0yzoqLV+lGiJle1TBSK6ZJuH6O+mXGthT1Jp+7ck45dq5y+NXUSi4u7\n+1eGpwoTEReAys71rWp27EXqLFobTBsCuADGdEqxuTk3oppj3/vdgek+1m/h\nHNuz9nY5kSmEBET1vk3Q5kILa4LqMonzCLpaU9I80r/nE7KKE3FL3gtB7bJ/\nrfOu+sWZoBjyUidY7u68p04Sv+zikYIf0ncfx0ygMyA2RJoJRfA70HXdfDTi\nJk+iubZ+C8B5BmlCrwLjvwa+AukJC5r3W0kxfqqTivrjXBl/ScSHOL6FL4uA\nh8Izuq7xSWipcsH5xqIfT0Ew5PXfrEkXJhCdd9jY7l150/IGUMp2NtSIig7K\nro6bpWDRtCIHt7MQ/PkUX8+4OZdjWb+H0TJsvGvYXU/itYVkv+l9B5FYJ1nZ\nTSc91NyQs4SqGkcy5Mm0ENWFY+tJiz34xbPB1R8ib/A9onuKvn6wO8cpCtZh\n26IyejKk26bygxNaHECLcZejzHYpeF0kbbetuc13xuJSOc9AicLy+SuhVtso\nnnEludPUptloOB23uYpbygTJBELI5EthCm0oHsNsp9yZ5NC9PzjpcOwhyEqG\nmjHq\r\n=Xjs0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsm28Oh5q4CCqV614Cfw4D7Q4HlPBBMKwW+SLcjwQkkwIhAN2poVjDOu6PqlQxRXo6ZOzBteemv/SCQizy/nd1v359"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003220032_1570140219841_0.7416358736279167"},"_hasShrinkwrap":false},"1.0.0-master.20191003223859":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191003223859","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"eec4f1dc5328de51ed0b3e45fc02b436fa575e9a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191003223859","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-lC+NhwZCrbM9YDUqvzsJn4T3olPLhDiTj9+Kf1BH5/EFmJNI8WD+/QBFEeaMZ1CSb1kCGyER2vlu1ffB4SKQHw==","shasum":"0676e743dc2d92460ba6b7a002c8050661dafc1e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191003223859.tgz","fileCount":530,"unpackedSize":5911928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlnkXCRA9TVsSAnZWagAAThwP/jU6hCVnpY57XvJu/w6o\nJJo0oFoG0mEW0pmrSdZ6gLTSktU1X3kEeHUvTHU9MGjyW53F3nEvfpuHphv2\nvltmw6ki/xG9dVDOAKyCDORsdLbJ4Ibsd2bzEdFGaQwidWBnZQ1KRmID1A33\n5yB5tZ7lXodYjdSZzKW6SuSGJJaO3hcs86A9lEeZunqAnS4kIb/ny7Wws3Wv\nE9RYRVCbVoW/6R2sYkM3PXStenzvajub15aCa+AyXxa3njfHxmliC0jCP0zs\nPLdkA3XAiM4HtLbQ5DqT+T4kS9lSOjjgoh/I2UUP0ryhNK/1Z7JyyY5e5uK4\noUvJV3oVI/gLtvJRWWPdEA1G/ImM60DtA2wtK1dvO9dT3WEZ++pvFzQTlo13\nVsKdlSWIRxieJBqUu9gjx+r1mcYKPTT93p1hu3iDKQglYg3qgTCfbXNW4En8\nD36tLhu3N92P1TqKUxwJyyhiZeScB2sIBAe+/BarfcmdfWjVdOrf/pGvmDl8\n9aPaF548naJJusMbErrn9cBDLhYdssmzHZgT0U4JwIsPPltua4AYoOivtJyi\nHqtPY9mVxCkelJ5xfwhXOQSf9lgaFtEXyick9XyDbY60wA56H7NIAzfFL6zX\nCh8ctO/rDImfkTMJrouQuLVQ8ZDKOg072jKb4Nu7ViZtM+5W/EMdbu3KIB11\nU7Yp\r\n=RDB6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBOgI66rD9rsdFI/PLEmLXT1Ka22vCpuxp+6YxSGfmOvAiEAlGSWFIstxtynSZcraFtITKc12GwTUA2+rjqLGaJlYdU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191003223859_1570142486489_0.8149078413477653"},"_hasShrinkwrap":false},"1.0.0-report-virtual-projects.20191004032030":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-report-virtual-projects.20191004032030","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d031f4b265dea6ee7dda22669aa3cad6e5262934","_id":"@atomist/sdm-pack-aspect@1.0.0-report-virtual-projects.20191004032030","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-G3tVctoNS0dA5VDm8b/1/OXpAPrVPGzeKE7s4zwTuqSGne/XV5C8ywKq5IAS6NQLnoXzrzGF7v2ktXPOUGRPdg==","shasum":"547d8390232a31002e80e18bbb71469ccc2ef99a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-report-virtual-projects.20191004032030.tgz","fileCount":530,"unpackedSize":5912369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlrr+CRA9TVsSAnZWagAAbpoP/iqxDNRn6hhnO6IjmeK3\nW+A/Y+FbYqjktX85s7HxeyZj6hP173fqcE6u4CN6cKTdItDKALYWP3qrQMTH\n/tjzGeDTQumvPugLbULDFu1XuOpXbxVk1XD9MzFFWHv+zkfLOxeIlsHhRaNZ\nmcIwSVpjRVkFacrEm65rEIKiEKHdUZjbZmkUr0ARuLFyM1TNUjoyBGv6Jki5\nnebtv/nh67lT9obEEXkj/aEd7x+38eoYHunww8r/sF+B3uDAlujhSrr/vrh3\nZPmnOe/6QWm8TTjGEArgaHN56fQS1cTU7S1bpeaua6T1ERJmSO0u09EA1rjc\nmhLjYXn5cwQdjBcIFLpwKYygZi6DW+kbXBAUA3J47z6tOgMInXJDz4MtlR6e\neOaruZWgi7U/+KjbGqj86YhDM9oDJvqnKYKYIjJQ8v2wdPUJ1gcjDKjUrFRt\nroKSiSUIrSUFgdqvdCnh3K2+1N6oC9DCL8t+sE4Mr1B/fR8/c/sVhUyufxIk\nvdPDZzNV3QMudd8hPzVSGYZDXqlwy3917ioPg3XqBvpRGVNj/y1Hzvbed4Uk\n4veSQKqBuRGhU7zBzDxBAJwz5CJIs01uAB9pgKFlK8dFTX6yW2SV2gsAbE/m\nqrR+BaPa5Q6wkLWdWhw4sLMhqkblF7FbVRwfLmorBqwPtxX+1x1PnvElP9Rr\nDbVY\r\n=T2cJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB15v4i1Mucn574LNPD9yUqzKrV0wsJvCYtOSW4emPWWAiBBpujZin2gUEGDof3JLjWyKG99rl4dn5380m6vWEGBwA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-report-virtual-projects.20191004032030_1570159358338_0.7036814314601827"},"_hasShrinkwrap":false},"1.0.0-code-metrics-move.20191004142934":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-code-metrics-move.20191004142934","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","build":"^0.1.4","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a24e6ad6e7db804c18c63027a3fca9f4a5a0e430","_id":"@atomist/sdm-pack-aspect@1.0.0-code-metrics-move.20191004142934","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-cexUrcxB6BJWkGUSiug9gKXwDhf2loEhQVbOITl+X1RcBOeK7a5r4GYTz/XGDjwReYKInugjxA25XwZyCOmJ+A==","shasum":"10a84b1efcb841f2d05a263214c384f36f42b0e9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-code-metrics-move.20191004142934.tgz","fileCount":525,"unpackedSize":5892286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl1feCRA9TVsSAnZWagAALfgP/2EwBr1LgOjQL98NsEk1\n0q36I1PqMtcSU6XuCYwLMuf227Xl68ZJ5CeauUcJ60X5ibWN8SXtLYHL2Win\nK19baTVhKSqTW+s8bhW4Kq8Bvzh5543u6Da0Ime+ow5wDOyAoigp/KdSloeJ\nW/gOUY2EPm1H4cvy0XTx4684SbDZ9G4rHz1m8CWZ3QixRPuOLCaLzeNz8RJV\n7y3WmvywENXm24Jg8So+lMwTAxNkBVnXuEIh1GxP1ss9hHqfBExeOP4+qDjC\naRykXXEGmuaZsGm6D+ZqL4Oza5NZOBCZk4aI26LaAhzF3EqL/DH/uTCBTubd\npAo2F+WG4vM4efs9SJRZStd7v5f3thjO3rxKMRm281JFTx0oyjG4A+no0pYL\nxrshOHyj5HSetTsIQPsQ4wQzFtx1IcQrNYgOlMXsAX7xBqAkOLjJa7diOxwE\nlFhrxdtM5ULiRKgat+aHQAy1XO1OsvDqS4g6t2wYNJXLKerVqmEmXdc+eT4z\n8iIBnwumEdW3NYGZQaDdJU8pjyFgDDimR3gwjTuNtfNwfwRgY1kJo0xypOA+\nbuFUFEZ50fcGuD24ffKcYOC9hR6KSljaHwx3BgymrQJo6Ld1F9/+SmXVz1Mt\nO+yfNyMCrgou7/J9xiv43/3IHJRY/fYS7w3fP4qyN+D69wjITC2uegHGwZxC\nOitR\r\n=EMUq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfKO4GmcjP9zMF7u5Txcfq/dEaicdiYUHFPuhFo/MG7AiAa1dGoAANOwDwShqy1YLJp4xDVJ/ljlf2LrDPDbFfBUQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-code-metrics-move.20191004142934_1570199517883_0.37866826059464875"},"_hasShrinkwrap":false},"1.0.0-master.20191005000328":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191005000328","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","build":"^0.1.4","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"b9ee33092fd5b5fda04fa6449622e4271495155b","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191005000328","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-nQsgkOCTekVajg8JZhOJcRkcI3RaiNaSmr6yWI1XkdsA0LKt1iKGEMffnRhFjWo2kfD2XlRZjax0xzkX79W3vQ==","shasum":"2c9d9acdd1d9e3ee8c53c5b37797a12f42bc023f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191005000328.tgz","fileCount":529,"unpackedSize":5913718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl95QCRA9TVsSAnZWagAAZQgP/i1+EUUsehY20KZ/Uk4P\n+88ajjz3tMuE2mwfJb3lvyAEcdeGuLUCu0RUSe+k77nUkmTzhVHmFaAVChD1\nCP2ZRlqKUsOBmRX+siZkOJnWdGN2smus+jrOzVhV9cfgL487P7n6ClvpjVe2\n+MVvdS8BpXtFVj2fE6xmD8jTnO3aCRWUmygqxGuEg6raZZ/hLK9nnhe0wN1q\nlB2ERQ+/SV4IaboDWRgU2a/Kl6Erd29tXT1PQp6qI1ZBaV64NdgxtRCBk0ev\neVYdnDgZ6JBXQfC0b44WAqIh+o4AQze4VPxmYYraNDZevnOS7mg3BwDCuhG3\nStYxUEwI8bSSJR6WRVQBU6fPkaerzZgoAOpayPaBhqiGh8oBR6oBOEFN0CTi\n2ksQSvfE2xUC9fFLqY9qXyuc28xv2YVFWzt1+OVi72blkI4ftvxrkoMTubrb\n4oZSXQ54CNkQa7HnKj+BQyYt7Otf+/DUUmJPFfxq9i58PWBSgYw+GYR4MyLZ\nafTYCcQn+Hq2WLD3p3mc3VcX1HP7ZeR0hn1xXlp1cG9YURjjm/yr0N9lemrB\n3rtLMc6X5cc9jdp3ZWG2h6+mIXesenKZh2iFuWbiV1VHpWNawpReyrIVV/Nv\nytIf8pZ7B4azfY7jCHDFcX1d2rPgA+d9jFcIBcPUVz39VduH8DtW1wJ3IhGL\ncHtU\r\n=PYmf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDKe43RJr4po3tlcRZW5SoQ1b/2ud/88IJMDJXSe3LoFAiEA+2Z3Ii3RKshhIUfakxLHYLfOcFxjQZEuTqHiQ7CpPvw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191005000328_1570233936115_0.07077864531077482"},"_hasShrinkwrap":false},"1.0.0-master.20191005000918":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191005000918","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","build":"^0.1.4","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"cf6ca7412e736afc5449435756f66d05875a15c3","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191005000918","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-2iwJEQ8TobOFZeqUIzHpxxDK8R2/XkrP0M7zXkLp5ZIAYQs28rlHyPoT4bhepGn2YulDbbcrnUiNI4c+VX6tYg==","shasum":"048c520d4f6e8f830b1d1c015b828082ddb6bb05","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191005000918.tgz","fileCount":525,"unpackedSize":5913573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl9/HCRA9TVsSAnZWagAATMwP/3X8kjaNdtSOGVYn4ivy\nGa+UgV4yY8U7uaB5QgZS1YUocLopoIx7CZaAlfXDUkC6lHF3H2vLZdz/VcuD\nU6OLZhvfTCJGJcywA3TUw0jVg5Fu1ICHjuUL/m9ijIN/dwohxtLWEqtheUKu\nhbmXQfcf1xmqMZOvrGeO13yk2fM2/1/bZ6jQcl+YUoQFxcy05q5d0axg1Mgb\nMTiCKxhMCs0UoyXjIdidHSrsNInqyDmYmaptRL8NCEdDZD9a/MyCm7MA3kvx\nXaPbINOiHr/v9AFwQzeKpYDb7K5l4xIz4YkUPQYBIjlAhOaA+9CyFoaq22Xi\nhZ69TDP0AgR9M8xElEMskRBAtZkbuJ9zJZqVhF93VvGg7QRCGnjNYW/w7Lsr\nU/sL+tJM5qsXwcOQ6NMPwmYm+59DIbL6WbbeiK2GDFuaGFEuVQAdmTqLO824\nbwTKaHu42/dcozb/FshjdoMtzQ4K9ZYEmObjTRxWZqiWK4z8sOem6ukh1IN2\nbKZQgqS+DQsh/gbvpX3k639VdMllsdhFZVGthaU9vDjPTa0KgVBIJ8o37JgE\nVNQknFawOJ/Q9h1TjXaqUto5KSki/D+1Cn67slvWfYkU7Su/jb0MceHTjTzj\n6DNTlhhE8aQRTff9g8p+s+FKg+/AmGXvDFmTOTY+9xkvQzsFm7u2UYdSqAp2\nxm4i\r\n=qt0v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDapRGOPKIWW1aYgRcW9N/8zK0yz6jbZxMnwsnaAe0wVAIhAMFcjrY+sneCRFVYHaY+TvBC+R84QSQXEwmu6kuUYKya"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191005000918_1570234311246_0.28733458713755033"},"_hasShrinkwrap":false},"1.0.0-master.20191005030948":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191005030948","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","build":"^0.1.4","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"dcfd230dd8ba39d721cdd688f9a6cef60132e407","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191005030948","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-mCrFjZ4XKCb/ZdRQE4l1WG5v25AinSpYvXe92Ee5gXUMYsG+Dv2KtYVPIcx6RpT1o1BKNT5gR+dRzMNLnTaDNA==","shasum":"d51c5b0fc926dce121a03eccc85c889ee1be2e84","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191005030948.tgz","fileCount":535,"unpackedSize":5931588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmAn3CRA9TVsSAnZWagAA79YP/A8Sd74qlr5PGIogVzfk\nHmCld82auFPOtUT6lATDkeoSWF3ZM1Zu5Pv2VclWAN3jUygpQ6o+xQnm+bzY\nJPaVfzE8nVZiuiWStI/V30XeQxTxI0wjmEAZOfG37ZZt7zOkQGfC0rQx6ytn\nHWH2ocueEZXb+uNaQq+d+Kx8MIwOC+zVK3Ge0baMAVUkcQXoWHiKXKGVdNvv\nSrd6H2MctPy/WQyEB12myMkpMEbUMoZhylVZ/0Xno6GwQNTcIUUAOPqAPVA1\nx0EFuaDUWl6EDFMZ0nEmrnrjkf4z4qS/MqrlWgIMD7glNKWCQ1fYLvKF2FYW\n12z+n5HtUL28mfxazaO4gJAWcqLE6KH5IFmOxamrYCP0ZI781xUSJlhY8C0A\nasJBTltMhidTkFdi6wEU/XQtRnG6WFvvhe/lpLtpE9w34ODHlz+CETRvNJ/R\n1jXGHgqe9TGDukjfjnQ3/rcCoVYY1uzlAqHuiqpQ81P7wMURWtOVcRArxy7K\nKlmPHvklXfQK5fyfI8KA7YCXxXzbCdu+LNJ2BR4OAPrxbvF9KKHHUWrjJjGA\nVKQ9/Lufz9OCWxHHNBmXsD4n+HpnvTrkwZF3sFmF3RDo1aG1oVflr3exj4zy\nZ8aqawEjPGquGVh8NQtTLy1QwZEzpxE6+JiKDm6smju0C4Ae+ShrWWDnHvxC\nOLZf\r\n=NJ/p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa6wZnmAgYdlDrEEGwJXV3M2F1bww7YOm63HVsbZOboAIgZpV1BT1W+v7X4dvs3unnco+/jux9oazvctyTd+S9FpQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191005030948_1570245111069_0.7460328682707282"},"_hasShrinkwrap":false},"1.0.0-master.20191006100726":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191006100726","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","build":"^0.1.4","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7692986eebed1171b3d6bc020727571847fbc580","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191006100726","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-KUAdqVMe8+7g9oE8ubcxvLmY0o4N/QkmuKJT6o6U3/atxsSy/GEtpTXWsvtDJIE0Qk7gBAqCzIe+ymwzIVPGAQ==","shasum":"3ddfe0a3e6303c53ce868e47a1e916718152f1de","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191006100726.tgz","fileCount":535,"unpackedSize":5931940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmb18CRA9TVsSAnZWagAAoygP/iNaUbwHkPHcxedn8sFE\nOWW/yiLDeHYDAHuf/jGjzvXxzQ6NuKfp6/TzRAVSt2jSkak4cb7NFC/yBdEZ\nNt2zA2aNMQUrzSEwZsKKicc1VA/RqmaZVKFnUqYdBr8HNUXR+FcXkQmV+C25\nupHUF5umElEqpD1TQWyUD7mrJqVU5tXzVFj6DMKm5rNM/qs7QUcJ8KkSk6qB\nSyFHGp7BVtBLR09nMZ2FQ3NbnvJZzcgvYtc29Ai60txFNyaRB7rPMf73wjSs\nO20pqflk2B1wK415GG+S2wN66o3SA/lcv1PcOXA6YNm0S3L/AyUaF9y2+0tS\n/ooyclz5jMLlXjTlO9QKCQbGCqYcLpl6hYchDi1a0zWZ6AVyy5OmBs68/S99\nXE6BKJaAd7CJGExe/839qWR8SL3IU2zEzG+oaTjk6o+tNYkm/EHonTDhVL0X\n57fpNLakNaalK5syLjzn1gR1GszaHOHOYYMFH3XO1rSpmVYlAJVL9Omdjypa\nHHgwMA9oYS/BXkgVjs+jEzQ6PA8hFafbaG/eJUZ1eLPcCu/Pcj8j53fAEzTC\n7XXknxVPUw0832Mm3FkWCOKV0S+MjHgDA9vPI9pvmETAEjuIR18GfsEnKmH8\n+MA7D+K8JJZp+X0VA5s8VcAnDBByBVhrih6oDU6cnNpeTyFGRlSy2ghN87yY\neqk5\r\n=ZUth\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnd3J6OLewMbeRg0bJeByvSuLnHOAb8JDJ56FA4y30fgIhALpMFSHzJA5Hjhi+HSmtUmLb/q9Uy85VU+O1Y7MG+KIY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191006100726_1570356603825_0.6804163684890097"},"_hasShrinkwrap":false},"1.0.0-master.20191006102303":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191006102303","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a2216fc5a86077ab37377465d6c7d0b12bc2edcb","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191006102303","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-XuUhpKvMQ5r0leWbuTjiFqhx+L4M6uwViDLfTRgmW932ZYOkXMNsw+gC679qCsJ8UxUutAdMmWnV06G6txaTPg==","shasum":"effef2852837b6f95ff3b8f10cb9de248a915f55","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191006102303.tgz","fileCount":535,"unpackedSize":5942820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmcETCRA9TVsSAnZWagAAoYIP/A1YMU7FciS2wj9qxOwz\nrQt0l/3zcxX/VUuSmCbYTc4g7NvhVyDOVVQkQRy+7KtZgqr9zVFmHBQK6Vcu\nxguNElpXCTXnEF2yoDX7bKJ7LZ8OHAu/aKSf80Zx7YV6ola2pzBvr8rJTBCO\n+maU1YL8WiNMmHP8vg7jE/RFfkvUFrn9MTUqeSvxaSLd72XeNE/Ck/wkf8Ul\nvveyzXxpVFLC4urgx/nWQa0W3YbQI95Ufc1D/NyhYZFODWVaiKmLpUywJJzv\nC5pFGL3wY3dUKIPaS5grwQQGkkrGPTOnPt6qZ1eXJefXYCkKsJbIi5daxTbT\no588RoNONyv+T1l7E1MW/bn3kOnwf4cHHf77fVzfKAJtjKQ24fJN091tkG4k\n+Kb9xQ38OP1n8J53ro/6HM0R+u3S3OnTzVkTtPf6S50DMMVsjasvXHS8giTv\nUwhVoWWZhKO8ZkuvpkaaV5rL7Pll/t8iz5m2Jww9fVJwpyXI7A4hHAkncNG4\nvD9aCgacGpqFDI5IBis7GNtwFWeEAYpfs4aldvqSx3zYpQDkTavyXQ2WhvZ1\nybDj1d+9XkHwm1drbAUDt4PiawJBzteFOKLZoZ02MgP8oPkX2D6ikQqWzmCS\n5Fx+zpoA7xrn3WNvQwVVKQEz+OU7X4KwEnRK7kfJXcevwJdxZj3vikAksva5\ntvZK\r\n=wGId\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgS2kcfH/bWxd5bMsme+dgcVNDeOK5SjLh6HhlR6xNSgIgTHiLctyozYCaz7eIB/rcuHRak6yJVTR8hXfoUupMaAc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191006102303_1570357523107_0.43115084312908336"},"_hasShrinkwrap":false},"1.0.0-master.20191006103833":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191006103833","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"156c9bd30a2134db8224d76de4ac0d822ddf9789","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191006103833","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-8Ok0AcfH28zO3cAxRCBhaYMDLMLwNWuwRDc0JVx+rOtAM05I0m6QoopYjPmDlAeRWXHblvm9HMeOl4i0ikVIQw==","shasum":"ca5cd09e77aab066f048fd50165afcd68a9133d3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191006103833.tgz","fileCount":535,"unpackedSize":5942826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmcS1CRA9TVsSAnZWagAAjdQQAJBW8BWGr+Xorv02WUV3\nTeU8wtlqPZwLaYkuqR5/TQvpEZKTOt2lll0Ipcct6bGI6Yahlo1Vq9y3YDNC\nc5xP5Ay2wITyecbXn62lNlh0wB1O2RzTF1AvA9GdvGpsURzPJ72pzOFnEjhS\nQhCYQQvhnS5s/cxuUUyIHR5qAbPLpvlLDWtgEIw2CPKFG/aMELZc/hmYKm2w\ntMs1EveGRrJ5bNh81u5+VrHLjG3zKIib1jYfAvWNW6iFDoeJDLo2K0nFlfI/\nOdmNIguFH+MNgEwPyaKrdUTM9h5LnuQ81gOxvXu5zIEGnh0RrhDjWrsnzhXA\n49ttnX0wKedsGCTYiBvBf2Io/NT+3WkyveiTaf5XM7EavLK28gVG/fi9mjJ8\nqiwJk85CSsw95g+C5uq2n0OIprPGViwtVf/vn2bxolDIWvMNGHKJZru6MC4e\nUtL6/1B+9VgYxK5FT70pZCnwE1I3JK2cIipzmxkJdeYv05qw1dvxVRPyVyqY\nUtEgI+YkZi6qASO9GjFtiOBUa/I2VqB3Lk2IlDEWVIvH3hZo1Mlpyi5eS3OR\nTPSovrX60LWyeM7uNxJM926Mog590h2LdkjeVimNqeG2IT7dEPGDxpWIHyTK\nYOy72nzy8J1lWtG7Bycu5SjnyzgeOSClOqrX5tDaqYbTV1fXlndnMThAUMTR\n/MrC\r\n=y10P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnKX4PIrP73gGHqtZIN3HuqCo1srC+ARvqSUZuR2B6VAiAuGF10eJ1FslUQP0k5gp4ecTzX4rspomH1weZPTqW3fQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191006103833_1570358453059_0.876761286353821"},"_hasShrinkwrap":false},"1.0.0-master.20191008155114":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191008155114","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6f7d53c968d2906cee4c3cfb3556f39d5610ec42","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191008155114","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-aPp08o+8v4Xvg8R8ld0GabGE+M+T5NM6J/yyUo+U079KGQB8w3TnUEPsF9Hef7NksBRwk04s8F5jArVjhpJjYg==","shasum":"4c86b20845580a2ab80b289954441941d866e714","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191008155114.tgz","fileCount":535,"unpackedSize":5942828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnLE4CRA9TVsSAnZWagAAwPcP/2p5jBdR3FGfXgxQ3UE+\nYxcc23LnSSCpmOLxiekpN57RHy0johR4AsU2a9nQKs7vdltm5h9l/bUqEfCF\nm2fuZq5oSD1srTjaRNXYojuaaGnzFPlayj6LRe/YGklnapiqYoiTAQqVDflH\ntjD3j1Yhom3hS0swslkRndWR4YS22eYIch4tVf9SKZ9ZD1kKeOJYFIf+Diqy\n1QCihw/H//3Thhw5uD+BaqcXIaicd8WGqvTCApNftKkdG6IPXIIiCCXnxX8I\nHPEDMCyHnFCiULaJJhcPWGECe2/cxV+nlBhertQvAj0bePWqEyjN/micun18\nB2knJj2hszmmYO2ofHXwxCkCZ/kVIyvL3XMGt0dvqh1092PgpM6eEtsABDUt\n3h38tQH2RF4Z0Fs/pRA3pZ/83DFFKekv5AdaEDkgg5mj6pRK6PzLzFwna/2I\n+R9Pw+bheRbmB+YeMb/X6MW7XR/MprTV1LI7ttoVwO2PYUgi78QYWXxHI/J6\nFLXjFMGNVE4h8/JIN+SMH9qog4mmL2DTMtHMN53a37HCcj7exNFfG61Gcnqn\nArod+sM5JPUEAFD4KEan2JPBQKgFMNPwD9IiKaKkRqirgjEDfIF1YS/ub4mX\nj3kIfDvmLGuoQ9Yj3W0nOIdUihUSzuB/ejDJ/1/9j3wZSMe8K6nlmU1uYNNs\nVRj+\r\n=+drm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClHgO1vo61YtyrO8/Y+i2PnFzD6C5iTSr5ZyXo4zIedAiEAgTehhPtGwXIrmPbPlJLU7FGKxAY5lSsBNqezG1BKlZ8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191008155114_1570550071759_0.16118838773593325"},"_hasShrinkwrap":false},"1.0.0-master.20191008192343":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191008192343","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e496d29da0c5a246a65ef30e20876a708974d5c9","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191008192343","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-qkYO7mlqO0epfiH6dOpJgaiOFC9a9lK9VLPX/9TqgxLPOs0929VLLVrMfjsf6EG+ukXSxLfNGNoNXwp6FjANIg==","shasum":"27ea114f9bc6232ecb8d62ed7b49d7f5457f3178","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191008192343.tgz","fileCount":535,"unpackedSize":5942955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnOK/CRA9TVsSAnZWagAAr7YP/i0dT7UsQC4ckYd1D/My\nv1XVi5Q8Vj83VSuMay5nSze+gzcW8PtqhNc/1fd+J13j0nnfCwWlauFO+Cqq\no1rYQPcuXsO0LzCXLupkhewcPc6K3R6pnIqquc2ppDpJyC3p1JmuGCcf4gw9\nYrZ31aZziSK0bLVXVOe53E0uJ23rwpR6kw3slbWeE/T8ZoxN1eFtYcAIVjYI\nUJuRIU9YYFQmtkd4VH89E1jlyEPo0OujJZHv9oz+NQO0Q1YWmwaQdpHAtu8x\nwVg+lrhPsJHRGOUknlffm6M7YhXFUv7MJima2Q6oAtH1XewkozmFonm7dbUb\nXfwidE459Up+SHY+uuLw6S61fyjw/0q4CfDN5Bn2tCzow6qbft/zDi7rwJfA\nucJNlhtst1nA7XoUWSpBu7dIHzB17Lz4IeVucs0fQ62zmvDuCGKj9HX4IvPu\n4jBdAZzCAYFr57+HtNpTbn90XnNrOBElgKlEuo1dfUswlE8oqSJGhK3iVurW\nCWDUHmLtnMetvGvETj738cbEGpINLhLSfpw/xsVYcFsXyufo3xsQrFhAwq/o\nZF6EcyaKsyWjHxjS9BhAJj5dVLF7yje67FODc7O6WHDSm3nJi/PjkOlpLdmh\nip4QgITa6LL3I74xwqNMhRusHwBJRl1NU4S8otlzqsmi9VMoqK8q/Rbd/wgb\nD8lC\r\n=TEs9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC2hzmY//Fh8IFENHTETbGvErDgePOC7vfC3+TcebEshAiEAnYeD8wt6cSPxR4cYdNU4QoDUQS6KErJ6plrtsCx8g20="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191008192343_1570562750953_0.7258605716830402"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191017033327":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191017033327","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"755701eefe7892e7c04cd102f997dcd4142e4bea","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191017033327","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-eVNkjfdBAHif5V8DB8Hk6CAzNG1lzAPX5IJZ717bkaSkwoA43YWj6ZbwXgMp+bGmxU2hOI4GRabMIbNVW+908Q==","shasum":"d0620f4b1e5daf7f6b335128499a93a8743fe501","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191017033327.tgz","fileCount":538,"unpackedSize":5950447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp+FvCRA9TVsSAnZWagAAM9kP/3UM3wWzMoOhZewP7xlC\nzIokeMmqZ1aAYLA5ieUuVXldBrccNfbIgDARmQIsAzS4s5HSena9ijwvCGAj\nFgVKwwMcp+WhF1ZWMOqz2wFGEaYigGUMPFF3eVllei5mSN02LXAZ6F6wnHvd\ns73jMLjteZjZaVy8OjcwKKSVcxe1mKzKl44WJinXJdeirolMom1uLWVM2O7y\nMJW6+ym7uU8zyl7rsQBNq2q3/CiKwWQ5c8sJ4Yq1Xyo5PqM9SYjhaWMOF4AB\n0hD2OJphQHLZzkeeK9m7DsFGi7T5+8WFfmwRxJIFDUEQnk3aRoExbEHveIRQ\ny5KSRhqn4nU5bcVOBjNDwpMTF6T8W3Uh/76gfCtIj9O06aKXs6I6hDIFWTRU\n9Mw46ro9taFf74BgOMD9hVLNfwpPMivj4dwZoqFfPR9UO4MPaD4QbVUCrbzS\n+kdDV2jCPPELOb4N0VkzwCTkT8yTgrg6p1keSzoO5r+u3u9iJ097rFxV92h+\nCL9Kw871n3HD559tiNdDaNCzrzlukn5CvVJfkraKIwfePMZ6obC6nxxlFRwQ\nPWUAG4biGWxwkXHGOnBusD1ud9apgEoKLx4C8zZ2FEmiNycdfUPyaNiACl0U\nZz4oxz1BdDYknzznax+gJMFFmTA+6hrMTGjCtUx+A4kPvjw1K9YyYAaB4vCd\nrW6h\r\n=8KOO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFt3YdjXCBu6r/LXWe3pTTrwdtFyWkp2eECgIScxzJCQIhAKeSQqzDquHQdS0jwRgFimU24GzvP/gQUnB8yBVAettt"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191017033327_1571283310649_0.1549930341248258"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191017035849":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191017035849","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"6da0d74881e11ccae13f3dcd88c1422909c1ac8a","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191017035849","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-brKUxqo2rL35pf7/YwAl3VjfGCnItd+U7Wryo3B0Bc2LEcVmm66W049qM9RPWT4gfEQVMosFHj3cOjJVkuYhxA==","shasum":"2065b891ce40ef71b52981da5252e9934fe2c0ec","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191017035849.tgz","fileCount":532,"unpackedSize":5909181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp+ddCRA9TVsSAnZWagAAaJUP/19a4t6D9mXhE6Hn2d3X\nFkivg76Xn+4EoX25lEXgtvmR8Xe+I3hnTE5sdvExBJLST2VhLJCI+e6pBIag\nfRh2RpFDfhP0GzUGOg4zZTTWRK5tLRVhyj02J7iF5lC9hsD2MpfqAxTryMbZ\neJ6xDKDyAQ0PSDy/YghlLkp8ajKbTqSpz/2MTC9icMR3U/9/cEObZcfY6D/3\nfuO1V8D6uJXvBYX+YxCpB58Quub2b1x7oqIWXKk7W4o+EoUhWFvP0zJ51qgf\nJyvzroX6bFHDYUxAj18uqxXQwfj2wM57lOQrj5UpCZkmKBlnu0P7ccmNjuEz\nJlh0qPFPRTg3R588HEy0O92gc6AKZp08ZO1HvSLrfUi0c9sUXXNIHygpgAsU\n39MS+j0xKEJJiqbGxI6c+FqAtg+reXzOHWgcW/Oe5/OXQGHIjXqipCUvQGKR\nDLxSJMS/wlxfwIq+E5zA/uPUZYgf/uKdUk6wU3BkWtrr+2gtY269ZpDoCwul\nvYooUqaTKv4fFi7nDUIEGE5pvld/AtRBEv2ybGN+1DHtshWsG36xR/18lAFX\np773/+vmZ/bv3hwy9B77HoSVKZiTo0eB4d5pG3ZjLNgeARN37hiM1xNrEIWM\nAr4V7aP00DzC11Gb2eanj422IBJc1dx9vQev/q/Gwj+n13NqvNJnSd9wFDwh\nKBUx\r\n=VOf6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDImN8UkZBRFay1Ey0ZVAlLMn2S+2Nkm7yRhGaZNMFEegIgexfOM2vc2NsEySFOBh5B4GvISegsc8H5xwJebb4fsTM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191017035849_1571284828355_0.8581020878560945"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191017193522":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191017193522","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"707b01c511a2c732da4f8404e753b8f66dc32fde","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191017193522","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-y/ZV750OLc7fGE6RvLl951yuR1VoKzdOTEnRpxgzb+vcEMb80+KAevupmguOuKO8WWnF7YCOsmA5tJUCgL3FOQ==","shasum":"890d0a1881bdba444fc14ca63343466b05bfc87a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191017193522.tgz","fileCount":527,"unpackedSize":5874745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqMMJCRA9TVsSAnZWagAAbFUP/A/hUyeFuKCMclYpkd7E\nO5hug+UYzKf6b1OnZic46Mnap+ix9uhB52I5LTmZkw0DKscyTjzI73zEocZo\n9egAUjkeDUTb1rsHXMn8/plvWn3NM/ESBB+wEkj5rEA4jCT1VR6SB68ImZ5N\nFVlPi/3HlLLozUlc1u3rnmX/V50jBys3Laeq00U7ZeWhoS4LLzsENFqADAgP\noDSUNrRTJFx5DBGoEqFUCYR9Ba8qskmvd0VGmNZRPKXsB7vuuQK6mYYt5G7G\n3aSgJO2DMtcbJeBqJb5LnSspDMUIlCO8rX4CUA1owt9kj4dVGpcGcpA4SpCU\n8H3yTfWdPTaCi4yJ3Lz8v1tq7I249f9kqN54G4cehZTtm1Sv3/A08T8jsEbX\n9KRa1YKvjhOLaG8PKoQtkxDrOIZyoFEuDul2AGRmaepFipi/nZVyIU/TlpzZ\nQP+kYktNJK1I9ROeBCY+XEe/fc4x8YWexfTYLoIS9oBnYZnMvs51GBqqkd6J\nCZQTp8ZX7t4NH2LxtiRVonKpm9l+HJuLc8RsqKH0JIMHBHsaU1l4ZNUjJCd1\njpvJ7S2so6CI3Fvhxc73UpMxiZ9kbaawO19BU3iUgRb1BND39+85sAVrlOre\n6J0nCMRrVeLK920v8EjkhVEByYpVM3kJEzMn+e25KLrQYVJ9SsPy1JAuZSaW\nWNgC\r\n=HBm5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHnpAcz7RM9la/cs1hio/R5vtU4kEOg6B8Do8d1r4CsQIgcGrnjLAp6Lynj+w96J09toBMJeKj7llHxjFQ52CMgD4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191017193522_1571341064040_0.1367058035453792"},"_hasShrinkwrap":false},"1.0.0-master.20191017204338":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191017204338","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d2a32c9917b91f0ab86238f94b06dffe956b866a","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191017204338","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-JvkNfGacpCup8qpLa5YrWtcqTKGNRT0CvDxOPMuUKAgxfFsw+1o3xymd45BC8adnqBF+yB0dwouJh2npXuWm3A==","shasum":"db61ae8893f6ea4540a2507348c74d482d2e4823","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191017204338.tgz","fileCount":535,"unpackedSize":5942962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqNMWCRA9TVsSAnZWagAAPfcQAI9o0bbl2+BSsWA41+Bd\nIdW3mLPo1jM+AEd2utg3SswRX4rc/fhTeap478r6siKr0me5w4qB1l84j7JT\n8BeM4HdGrajTKJQF6I6tA04ldM0V86XfcviMri3fYthBBV5gbg7TrIfz7EbQ\ny87r/D0otzRB1s67Yzj1qClRiwRDbgj9vj5cPEpZ9IMcPh2FWPF/ddElCUzr\nkcozR/80ZK0wML/bmQoi0g5QIOJZOyaZyyZaILhskX0ORU/ufkyz5Xm9xlbM\nba1xEJoAJRXP+lp+AQxEvRtlF3ine17lj3YKBWc2aa2NH7Yl9ii3rK6iiyKB\navbhkM7pg6MikeUFq40B1m9XLJTcNIBRPQWyqRcuoFVLwNJGBVzlZSwzqLQA\no6R66L6gdZZJNmtqTSHn0d4N9zOw5Sik9dqgZigKMxgFCH75LQo38Nm78ph7\n04gWCeskbzoA+3yzH4oXuedPZVQptYx9oNhrTGM7DpF9URyCJkjP6tJIM6ly\nqqJoxwCdQiXDOy5JlLlZVOEaO2h/c0AuUUHl+RsmJulBGVQHkAj+yZcjvlm+\n7ewB/2zSXn1eoOzEqgr40Rp2694ZfbZC75McyPTolJygtq2fmzPqNSt8hxVD\nGxx1gg3JsjiyqRVYMXwdl5OlCxhQELQs7gChU+hGKlu8VjM4DSSGvAFAzigJ\nWTfr\r\n=djGP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpnNb/POIZw38/o/rjkH/Ehg/9kk8CZ/GNmLoG15rkZAiBt3l5lyTwkf3sVoqr5J3KnzfB7GnsvzM+Wx9sCcRbafw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191017204338_1571345173808_0.043849709595497055"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191018183627":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191018183627","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"077c471f071809f2944f8f7203b24bf749c95942","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191018183627","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PKrlTnc7rnr8pFWiUtHkSXON0O4FPvNil51NXp9Sqd79ojOnisOfuCZ7Bdk0Kvufc70VWzwpqDZVKtVNMgY6PQ==","shasum":"f85788dbada33123ff58595ddc1b269964c87f10","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191018183627.tgz","fileCount":528,"unpackedSize":5877038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqgb7CRA9TVsSAnZWagAA6QMP/juRQUwyRYks8fDDX2rx\nZgz+5c0qX5SsVis2slDiyIljsb9okKtNIJE6RfSC1ifM9JlCjCoGYsMF4nuj\nZmMw+CQhHifm7HgZlNmSOOwqGgrl58CIZflADjQFPKB8e+4/OP1CtBfzaAyA\nMIC6DxP+7IAUvc9fJpdfxY1YmTqecIX6UPwMdDidp6NLC01l+JnMWNU6e5NF\nHMpCLQTPCRWVMXRtMHOO7TA2t5EuMKNGNU8cxW1QOGURSoe8eaIcjmsakDFP\nl0jFcPVAMjMV3e6sKxeuHkfIHX2TJSt07vPEmbEBhNn1sB0qDCSbXsHcbR8N\nr5tVyc+7Un8IO9jfI0bERf65KkTTWqJl9UbC8iVrPRKYASuHvQMRHt/w3VD3\nwK116yrOfl+G051S/fYT/hMUVehN8XhMhxt4CCGybhPLWQO2tqoLQ8AWzHGb\n2ZiooVvhqQpChpUOosVhKPnX+pzX91QIF0dUeGP1oRD8hj1JUpEw/tZtJDgs\nb3XxsCksOJv/te8XMrrpqmbVw+cdPe10CtXcgMQZP8xla3ZlqWB5HaICZlIq\nQF+sHxXT9Wn9yUxRoW221ew4wVieFgF7dcWWOhlFNlWmG3QlKH/AvQgu9oyT\nkwPH8T6WUumK3LisSFYndzNYURvr3HuQAk1dYtVk273S+HqdkbssIsiCIKa8\n5jNG\r\n=nuCq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjCo0XXz5Yw7kmz16ahjKfOJnNc2NvW/xvqWrJZYgvlgIhAIiD0MSJZSzRfhQASO5PkBQonsbN+JV4QIi9ggZ72Trl"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191018183627_1571423994649_0.45422438988015856"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191018192229":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191018192229","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"c247e4ac78caa99c0fd45096b68182619648de05","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191018192229","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-B4gVjR02ubrAFwRjoc9T9obERfm7QGBJ8eCI+UxWGdvjCfClF6FJJTkCINo0nHTFp0ixj3vHTr12ELhUfc1LWw==","shasum":"5beebd318b71086340642c26158bb45ca334babb","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191018192229.tgz","fileCount":528,"unpackedSize":5879050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqhG7CRA9TVsSAnZWagAAaGQP/RvdezHTIh1S0iI7ffTH\nNBWtvKLCBfvzBGmo5Rf8FezEZF0PEm16UXNvpR1rB+5GlqEVmrokQXKv+UaV\nvbu6bVKe15gEOWn1MS6rFLn8NwSEILaIWO/Iy7Az76urxV/qC+BRynblZGW8\nplILrGusWmrCHFRC6wa+FjNXR7uhwAvJB8BobScJGwJwvDewEi86tqBkPyY6\nP5uipKUfC61s3NaNwsaxCzmsiwxd76kAdH2VUOSb33cnwoEsAyS2oWJntGAN\nIbo2dczKUFQhymo8a7Jxfl8PNPui2CUvSS2ATosOHMqrNnnqYJDR2By3yae6\nCLWAAF1LesfO6eA5J/9zt0kua1FiXhH6dPkqUeu0p26XDQhid3dk9zDFyHiy\ncmaTaNDVwx1CDJjYTOdZRJQkvsL7HJlw2rbSqS+7LybM0Lg41t9XpLoqsFhr\n7ewHiEaVFNLFr/J5l9ePXIxJu8mbBlYmsnXcBlD/chKUZ4hCocyZ4ABWtOy1\n+mJuVMjTe+gre2FuZZBhdfWjjb2ijMdLUaDSckOo9JaT16hQlsbjrw2QN6td\nM71abzcVaL5hJcoeRkUk1lSkvetQB9d6K8qzYBmFIrnX2ZOF7xYtLJfWd6CW\nxAmODxBjUvWn42y6C9S3jQnNJISorJye8RvC4+qkuG61P1/o9+L/PWPY2eYX\nJ1sG\r\n=keDS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwV2EFVhuUokngVSwuOupcaQQoteF3Y0rKpZemB5q1nAiBduhNzcQRHtia6NjbgYKy1qObfMHTnLNvBZRN4F2YMUw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191018192229_1571426746340_0.6163366860179085"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191021163212":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191021163212","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0a290ab78651b3033f762389ccaeb828bd926a45","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191021163212","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HVonuSm0hkMQX921qZFobvmA7bUowgg5cyf+2sEOqVJWW0QAWG3AN+NjFOOONhVgMuguIxFgmP5gT5xCfsaLmg==","shasum":"b9271ae1d58984339df72b8419c3cf40c72affb9","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191021163212.tgz","fileCount":528,"unpackedSize":5880750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrd49CRA9TVsSAnZWagAA2tMP/1GUxTYU9Etjfwe05oCd\n2lEkagixzVZw1AZSX8nWLG2QIHglC27B4cyk/aM71V0fDTws9DW114r/elzs\nDdmYD8CHu1TSM2UFdfTiNeW2oG0ppRKshQwkx2mIp6bpXgmJozSZZTTyJO6p\n7dJ4TRSp4nTdzCSc1cPopU79ohYPUWzCt7DhcxjUcaPbud4hPd+94A+s2IDN\nZ81HI+2cO0wKuSgO0p3AHGS/oEoNLipgI9ZxJ0CG0dXHAwEA5U2rxDYCCsvu\nZNxom87hMCkfXSQoJCPiIsBfnaJ+k6wOprXQc9pHZInNJ0OlY5yEvB8XOecx\n7aG0OpDqcixQV3ro3YQVej1PcHJMq+xrNKdZc6Bym55ISrWOTOKld6Jrve7+\nnTd+CO2uu90kSJL3gMz6YkZA1ClZdF/OZPcujKKr/NKewQzKO4luAtpev/dB\nzaNCyYXNDOop4v9NW7B5Ai8LcYpdzOglM+YhLrQ3KIJlUuSf9/Qb+qZysmix\nXToVvyjS8EnlExCjLzWrWOKLrxbJpQ993mSoIk2P5J+BnjvnXeuJU33PsZ/Q\n0EMZ+kZx7j/Yq3vIxcYkVsL0juG+e/PVpXiux1RGt4XDHD138Jf3LQYhbcf6\nmBGgEaNQE4zo52lliywQbDYTQHvNN63HdHzhNFWvynltwGAx47CEFpY2sH71\n4h8W\r\n=JgrW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXL7QoR4KMNHAtFrN0fFTPrYao6/UcJAckCK3uTLLUeAIhAKgQShJfj8GWC+HHLJ88aGpe3u1L0uX7syp8OtQXA1IY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191021163212_1571675708855_0.273035814062194"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191021203418":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191021203418","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"58eec19fa15ccfd27a7f7e68de667e355cae9006","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191021203418","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-XPk7yhGSYEIHbGoDAkoxCo/cNAYRv1NOts7F6n2q0tztqaXQM2V902N6EYGUO/Cwjr66Ycc4fUwX6UrMk2RR9g==","shasum":"51eeaa26eea6429916e9f0cc151718cd25c20965","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191021203418.tgz","fileCount":528,"unpackedSize":5884846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrhbxCRA9TVsSAnZWagAAzCwP/1dr4xL+g9fL2K6vjm2A\nbkPY7w6yrBv5hlB2nI1uqlr+V0sGpssTS2BRmkgDR4gvmiIn1Yg8TYxdti7r\n159S7Ckl2HWP0iLzJtfDFS5W1tDfjM/mB4S+PBY4gunMYoILg26QyrzxHLlH\nOwOboa5WZe3lX6ezA3kwElAPJM5Q3Hb+HnplLxwjX4kBH5K/Ij7fmnF0F+7B\nFVuWAPhYDPfdPgw5ySneXVax3pNqdBLdCELkIMIvzrSYY0n9UYZdMmnouZAO\nCzmq6aRjklvHdf6rDGSecTfA/uqNnZ2nqMSPZffguj3lwWYhbLaHRcUfF8ta\n3ZHnSVD/aMGtVJFS60CuYjKgOPxC7YuNo14VHKH+aiRlk0rn5rgqa6Z7PUrw\n548XKc8xNwMdeB72yAGcvfmXGnCbiLK+HzzzY8okHmzhODGeCIkblglcKAes\nRlnfKjEIBmc741WQWOyJhb05J7nWcCPC05oJcJy991KPYF0bvFX9U9EXylVN\nb02VkjSAGx+m7zwGbd00pxFa65zj7NQE71QYmeQBIwyuO/2Swm1PhXdLId8n\nfMOv+AhrwEFJ1UCdCIZmZ1OTQsLopXIBUsFTq8f2TKjwle4iB6gLyazSqX8B\n+5pu8XGH9E7yHqS1EqG6o4BzEnGm48gXsLIWILm54SAI9SVqaYnjeB5s/RYR\nRpwy\r\n=QdfG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiQAYZumncL5OoXPTTq4gYkpvhcDw8mSWavdECDylghAIgMVy1miYwr3OHZ4ZzswuUQc+QIqhzT1Z5B7cBCjuzhUI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191021203418_1571690225271_0.08444027243834373"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191021220954":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191021220954","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"96522daee0c5f2d39e7b453cd6fa7833e825a0f6","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191021220954","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-GXAiwrX7W+VnDboE4alAMqWSBJslIs4nF6SSmPOiIWBbCiK/keS7jfCuzK7K4byBA/o43rezmtJtGyG6ZckDNQ==","shasum":"10e7f6e0f1c877a014c7b0c585172d40b5e9c6a3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191021220954.tgz","fileCount":528,"unpackedSize":5878806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdri2hCRA9TVsSAnZWagAAPZYP/Ay5srSNFR3RKictKG2O\nbJjHga1zzyH/AGuC0UUzv4dVMWR5NqOd4vPoIfDvMtWvzWoun7BIh/3zkehm\nQFQAqbzpsysPAYO/Aykig20ufNX38zGxIVjzVa3+1t2TWHHqKYUkXJyKvMTA\nQbZZR/CdDxWUieg/EyN/46kedQxBp7WdkiOLmfI3CMxv7EG5kp76pUHNHlZ/\nd2F9JSXCeUs+CrGdf0r6dXpew5ckE+tAo7V7kUYNYM0hdTCe5USGq/+xdQQo\nJJKAWMRWqXy2lk2VnUgdutivB88bNitG9YimWEJZJTWc/yTwH/NlsQal+lEN\n48i/PFGhUeR3khZOEAwo4WLmF7d9WE02CHq7Ao50KCW/+fUSRP0kww0o8Pyt\nFwccQ/3tpE6t9VsVW8Pj6ywkqW7GpirQv3AHkGhXSlJPZJAM7jUy5I3BoA6N\nRLPI068L5b9bJXCToXMVUujdltrd4l1x8UIZf67JWADqRb3z7Aoux5guIWN1\nusjkLTAMLEQMpc3PwcM6Q04uHNXYNWZC86bp1s0LROla7yruU3d889H/fabN\nffs4vgH5vXL8QCDdjgZ3ddwtytqb5La5uWItZKdXErHIHycUl903misrWVIj\n8KBMrHdKtOTxic35OrdxVlRtU0a34MzEQuD/RZjmiVU3g/vkK9nZNC1Zqicd\nOTog\r\n=29yY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQrYNI/JcqG4UisFL0blHCSgHLZhYOOoH/zOVAkX+hOAiEA4h+4DxCs+p6wjSfq1aQmqOnC9Z8ZQHcJuvZRvhSdLo8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191021220954_1571696032460_0.41090012999833125"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191021222457":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191021222457","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"e0a3c1ae652ec8a5e94955c5527dbcbba15e435f","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191021222457","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ELWnx1H+y5luVYf9fS27guyrbAOT9dEWhqNY9R52mI7/pDsK3mY+dgQqMJGzhv46DlHuNrvFzgERSbtmxDdW8g==","shasum":"9e7ecc0bcd1a0322e75aeeaf3be22ccb3e5a98d1","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191021222457.tgz","fileCount":528,"unpackedSize":5879595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrjDRCRA9TVsSAnZWagAAu4gP/0mEc6LkgXWmzk1W6roY\nXd91agrs7CCV2EmWqIquuJOUcKymE7oRWjiwAJueCcbpSzC5FQvgH9xMKCoI\nSF5/buNJ1fK+bZr3MPKblnFB+2rA/uyJA+l62foO8yjjhH/XxK/zyEsy9tUN\n2Qt96+tvZQ60/0X7RKJkTMH5A5Fcq0wdPHvQxWDmNXA5wGVujbrfCh7YHSL6\nkIneNC6WaTipSV+aJKbqLhFn1hOrBAYB/vu4DmqgWxZYJgjpEGGOmD8o3OAD\ns5A6E/a58Kn/A3F0l+0uuao6/z9dWQEMjATUqwsmTjfk4kyqYg2gCSYEMfjy\nAzps6DmycPeoTEw2Ggf+l3L6MZzi11PeWicO+ObA/HDRahc9vUiKZnJsRJGY\neT6BM81BAh2Ku6k5ffrEzkuGJI+Ksdaw7v7JP5ZfrkCBHiL3XaqceEaU0hmw\nglfNC3CGzCNxUZqt0IeVmUF/2QutrcOB5OjmCXLfL6AL55WvbgleEyS3nMmV\nY22wB0YVSmnjoH6X1lOG2fVYfwBqkkYlyqFCsH4sX/ojOC3XBLOcB2tPZvu3\nxbCBVSs7oZc5d9oYmURXez7UzPVZMaPQC0cNhPy89n7xjE50BZqa7fh6Lr+8\nBB5mWDwLgCLzDzeBCPl0uPD9jD6Kamb90Yt3kjdO6r4FJMEGzqcBcNpp76UM\nWuYy\r\n=phkQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICN/Sy1LIx8un4vsrttzlDuj7JvlWZSPE0vCzR9GBGHgAiEAilIbipVH00dZKfTeusPnLVOmQNTI1kYb6Pcaj4VqHQs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191021222457_1571696848529_0.12022276646947372"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191021224326":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191021224326","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"62d537b3d13ac96d4c5ab0bf29a1fcac405db752","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191021224326","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-I0LH96Ug354Z3LVuFXdZr1FDAefRV/RKkT2mF7ywnwYGWWlEKisdgwIT/Tek7C++3SjtYYkKlsLVFNq2FzAVfA==","shasum":"f3f1d2eb1d7f483601215452c022f6aaec38459b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191021224326.tgz","fileCount":528,"unpackedSize":5881126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrjU0CRA9TVsSAnZWagAAg0kP/ib2Z5S6FpaVmaUeYZc9\n54rXouvYN0bApZT50sx1ICUkQCz/IodN6zDPEylJ5kQ+UYgwL6FY2xThi6Vd\nTEWvazVb3xaSP+b07FhbdldxmPs3qF84uUttwK1wMqjnZEAYu9yyzDPJLaih\ntGmJx0KVHI2OxXDRMfQUJDRu1Iv7UMzFxp62rnjK5knoRzY8y9rhESnU+MIa\nw3SrYzROF+4HC1qswB4gBpADF9pL74l1tGNyND2kDOQFzZ8lyJyudNvZoLkW\nDXqUVD+PPAB0Y2b1GpjlQ6674RLuKU1JSeHlhVYxX0W/huSJNHLBqFXpwVtx\nLlobgNv6YsoHvPdYO+mdwHQhBEq3uDSkQpv+RproNeDtb9RMurNRLQ6nIJov\nb54KiSlJPAkrZe3bWlHkhkdwspnWVdcktrw/1LXasTC8FacVSIPBaqU26kRI\n3PvXEz72sXU1502kFrMpQzmsSvzsRL+Qd5084znE9GQWxI4WZdyI3ZMbfZ3x\nECIDvwwSrLx5i8y7N4F1EYYb+Ue6uTGMWtQ0leOtDrMA+6W0nFXDlqKkzM4O\n99Tx72Zkg+tOkO2OH1ZoYDTECxb1Cn8y4Ai0biZCTa5bLJNmWlyxT/WeiroR\n5Upwmk9LX8fnx3hFuvxx9zpUeXE3udpwny0PZPJjqXYMunLBsK+DBQx14EUr\nVS2y\r\n=Oxxa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAaE/Gt8ClXXTjurSUF0hASTDiFTKJn/4cSqLYaqj3sbAiBHCLyrgon2ot5wtphfNWJ7E4PB5H4Bp90IRcpj1rNb3w=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191021224326_1571697971825_0.16178142753672486"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191021230342":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191021230342","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"bcf30854f4431595fdf85b20398297274ecc32e7","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191021230342","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-xu3/A/5y1+tN3I97Bl995HGs8PYo2KU3SdOGtJ2QTa7xSH42H1VpH1FnMCx4KbiPp7pCL5fDtUAr/WkeeaU/yg==","shasum":"4ce8e6dfd02c2a09781b2b6c55aee9207288c16e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191021230342.tgz","fileCount":528,"unpackedSize":5883496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrjnxCRA9TVsSAnZWagAAH5MP/047ukX1A4F4OWCu+tfv\ntIQMUjkRri1LrTWfbBFozN6gPA4VPrupqUur1DyjjYMgn8ucA1EFbK4DIWFv\nTOFIvZicV+OGjOOqlUv8ePSJLjb92IVeMoJgrk5CWEBloRZyAhpdkCqjjnEw\nfZlcCucuTSZhhjPop/40gxV1YlqYpd4eWmp0LgBYO9unADBsA/UIWYky4+TW\nfCyqc+lX+QAfrkwGfIRbd1RS7d31kESUYakFny49LZzEOncBHkm/a2OaRfwj\ntQG/e/MzZs5NlZeYlWnsB7UYAFkMmagBRcvGzx8C/rfHTWolyZoAadK3U/PU\nh073pclYLltWuNZRKjQZneDyYyjy++tI4I7deHxMq/D4JiLgukKAZ/mO4OAQ\ndUbkpTwSIhu56683CDFOpMJWwVwu0cGFwBw0QbbDQEINdCjNxG/jIZfY2wiM\nFOMddsra6F4cZvbm1S5RSRLy5mTTWP9piqhsbwkAEyUUy1v1AXO/EeuymQPG\nhjQxA4Uu+gRsbtHUmz400Sac6SJSISxnLqC5krznZSqjTDwbE62qsViIqpU2\nbBRbXw7xpNhNHTb8aVV3drka7Bfwo6hcNxJvzrpS3J6pXK8aEWFwNmeML8tH\nFkj1jeHFw9g18oh1rT9lg1TaveQXG9mPgEu85VGxcIJr4rNTgMcm5kMR/eax\nkEBN\r\n=dlNK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcNcspSlkB8jBOTxWTBkztZUI6aVOc/Zcg2Nx+EibMtwIgQXo6vqQVolcOWefTt7kkEcJEaz/AgrYhqa1bBJ7kWCM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191021230342_1571699185045_0.34507925529646544"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191022150755":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191022150755","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"cb23a581e8f5045fc366f4171d18fab568c6609f","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191022150755","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oZxIzzylCIeHHrQySUhVvxT3lKyH61K230VlFpKTm3Nu8Qznywsq5OmCHD337yr8I4VpdrcYprdUvuo4FJHgEw==","shasum":"51b49705490d4ee9e16d5a646ca71b93d2bca1a2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191022150755.tgz","fileCount":528,"unpackedSize":5880005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxu/CRA9TVsSAnZWagAAMQUP/1uhL3v1TgKYDPCM6WJm\nVd1DL6nIDMYgGU8ZQdxIkkP7jeoRdOOGisLxiDctpGqaDx/Q8qCrMgX91nDp\nn3hWXZ6g/ZRpbP8N0N9tNynnCnGdTuaTW8GamsZA9E0QZANYsQJ9L7MwdMMP\n5YC/EylZjCqd4OHkQNWVaqfGnQBqbRpbd5SQw9GFs0RGmo+XN7UeoXKBNxS/\nV6QZS19fnZhvK0h0KrtR0ihiXrT2CYGilCXfC55C5LKooq57oe3mqp6loOjS\nvu1uhGbJhamAGExitqX+cTgzuQeUQwuVSZOoM/KUo/0GBfJN9jNkRsvNdz8y\nVzzp3ol3i2s17CS3EJU+RdMxCrTbE6JITbdmRABqBCdpjP14esDQRjXKmHqo\nVoDS34wbgfBosOUR/yZ2ohk7L+IIgy/qe8F8GGoIDsaI4Vz4s/rQ+sFqUNfc\nvFAIrHM3dQYu6gYByVSRlgJF3F/NJDeE8EYazMa6kgeUvJrXA/og+XZlW5Yq\nDqmEvd8eYpEwKgtGYy/Vm8SuGhk0Jm8bkA0GyNdBtUxHK/l/oBwEyvrUGWYE\nQkopWLaYIfQbvVwyTBiJuW/CnyH8W9Ql1HkZijESq0r6VWa7GeP1HW9wytmA\nfc3+N/3jPEPCT4C/KhScXz3nMHt959Er/h3jezIelqDvpc+sgl9POSwVf1Ss\nebpF\r\n=qA0w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx+03bTMbMm/iOCXDrZggIoYFeciha9CkoAUCddB24lAIhAPU/dLO+lqzEPwakjC55QOzOzAeVnfBGnXZmw0YZDDeO"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191022150755_1571756990922_0.1797090207539176"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191022175051":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191022175051","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"384d67b652e09254021a76c448c34c3769f4613f","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191022175051","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-9P969Vwv7WAv0P67V36k9Af0DC59c2+LLZhCR6c1i1NJcrIEtMyUUNgGEIKaT4swGvzbYMTXxBJbFdFs3AAPtA==","shasum":"0edf8226725dcdf3c285171a23a0cccb98480ea4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191022175051.tgz","fileCount":528,"unpackedSize":5876202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0JlCRA9TVsSAnZWagAAwTUP/0tgrpmvrIO1edEYenOO\npN+JwxjkSqTZpEutgOhzFhG1UFRf0aW+v712/sSg1guwIj8pmAy1qnmXYqMQ\n3mRyBogwrLsR1ewPeOQYRtck7u9STHhBvk9hxpZrIGyVMvHrkiyNr3wb/qh4\nQg8Z3zbNKXvyf19DE4omcK26vFuIrIBNHX6vlbGO9fkQT3i6/KHIm4A4YXCF\nHl8Zanfmr/maR9yfUBV2UAWRID36/kvaFX2GR5+iX9bLvjoByLq9QrlD1DcE\nsyz0qQj10K7jYvk/jlTnLI+7z2G6RgTj/o3BBrThstdwqNbn2X1CXG1Dlt+l\npPPwSQwzEEAAucTGeV+YhfCRxPiGGu4t3eCr0Vb0EgjASL6zKE7RBdd5mpvn\ndehaSVEkWabxtVuakhfYMiEhK09ZOMV+FaG3NV3GM7yuyeDqsSvSSIZYU8mR\nXZgoSI393Ufq4BXlw/zb6wl8qyE9043PJa3ia6+Y6jupygb9yKr1Z2m5YtVK\nJoa1g/qmRB6YvmrFb8qKrMYGOV4MN/IvsafewWLvWghkQceEypQS8iCi4wPz\n01OOtGctjWSoeORsB93rb4AD1QHx2K2zhWlzh9NXiCsJaHrbAoLr0uY/YJPG\nvp0FO5pjNiVKygZZQEXj6/nX8vgYQxmI12be9HMXgl4w8DlezScwnYIJQ23b\nUhQC\r\n=EHU0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChA4P1i/7Cl6jdMCDRnCSh224r+o1K4W/yebfQ1aAw7gIhAOXMQhu4wob0yKnlmWgiWwu2qw+3prrsdV0jWJ7A5KRh"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191022175051_1571766884759_0.5761031723039711"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191022203643":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191022203643","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0ff5ceab83325ccb9c61810e6d182a6943a9557c","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191022203643","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ugfYkqXPLQddWe0/X9CIYApzxxfauMPmXCFEN43KsDHithQl6jO2qpCpiSOJhzCEHHJ7db+EBGoN1Jliuu3skg==","shasum":"05ff304eec2a13bede7827f30d59dcb8cb24d547","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191022203643.tgz","fileCount":528,"unpackedSize":5876947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr2kXCRA9TVsSAnZWagAAsLQP/jeJskDUau+AEqJpXm6R\nlMqQ+ioVY1dvC93OEnwGNIhd6ac0e+xKYuMnxxAolb5N3Xu+qpyercm/G0JW\nZWLMmAxa1Pk4RMBb1X9vrY3r2Vn7KXa+qb6YFfpSeyzCcxXFALtXXdVCgELI\nS2tB4xqeiNV9dzHE0UEnQ+xxgeWzxpIMjxCX6WpCY66ntxGP7T8HYL+kmkkO\nlFVo4c088KHGPOC0K47DG4TLMQNPUcY3yzN5jMIxScLK67PkotTJzoZatxFl\nVx378IwrVBTww0pl+TYB+Dsrh30OlQlCfdto39RSr9b+/ZM9BTj3gRkavJVX\nvKviNd2i0tyWQg+YgJhdgMPPMMpkHex3wx5Fi5zO0pU793THSiRDzsEU6lOQ\nhiibu6bAwDGdNNUeluwfB4E65cmO+vHC+7idfmo5A+PzNQUXV5DsNE1ME7AM\nISX0JcjI8FAVEA/aqCq0irSyzH4AK3Jg1597vAz6yuV294gRryEJk9dSWWKN\ncqyJxkqne0UyYOzLzLBgll66q4rjBcYPWJZXecZKlmEE49vmscCHUeu6ELDl\nI4xeXPX75zlDy06g+FMzUKcwFQJn6XLLgegs8bditi+hAF43Zurr9mQVfvpv\n1dJftlAfXgOT45pCzmSVmWtQ+KDPwFj6vmL9r73ExsmkVl3TS9+kgskEXR5J\nMDLA\r\n=tDSQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFk4HEVVzrDtf3a/fBN7g3AHZZc8RHYtvcCHkibaYQpeAiEAqpr7WUHb81ag0xwiZEOUKZJ9l34gCp/jUCz8kAPec64="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191022203643_1571776791119_0.046975304447659516"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191022233614":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191022233614","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"50b739de2c1888ba4857740bfa6c0691d64327fd","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191022233614","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-7cikZKNcOxOWMJHzrVfml6zM3mZ20b+SoeNiBXWKvxc/ADFbqCnM2GE/FTTGg/Ymm2fNj5k97PgQFymEljkp0A==","shasum":"a6671653e5a49025645dd0df13efd84a77f53fca","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191022233614.tgz","fileCount":528,"unpackedSize":5877114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr5NRCRA9TVsSAnZWagAALwIP/1UzBISchC0aBIUpWyIW\nfXr89O/6Q7Dn/iCyJawUGsYQ/awk2f0Clfp4OuusdudMhug0wM41a7qp1kPx\nRIcKVJRKDR/DPNMPoHH9SZ9MMOG/Y9a0U/+5SlyPUWADrDSK//G9rnosWZ0n\nGiHLUHa0q3geTdWiUmWjhEDtn+qNl7+X89c+rDFZ+krhtDbmYlOlra/+Rcld\nxMHmh/E7uVuawx2M8R2cCh1OFxpVLzMvx598KoiybadpAXVcO6+PNLOiPuF8\nmohec9xBj/HgZx3lR5rIULZQ4cZT8BNwFx+4TXlMS+pYemVbWYLWbub82JXO\nmL8eE17MpEPL0VMvOjuOJOMUzFE9D7AdC6IsHzzGS0i6RnbTDSrgXjHR+zxb\nHsZLfK7NXm31HBXVKnEsX8ySvCOUKRPJmzVmYtcROcHuRc1JJC7UmzPguxZZ\nVvm5Z0PxyhSG2cDf1358RFkyULbzYQZuef7FK8d0meko2KyoRR7FfKvxwaD2\n+CVbGCexFk51yF2Y6lgYzUaCtTOG9h8huVMicX3DkqjkMr0xGCDGKqiWatOP\nAdfBzndCnSYOZM3q7EBrVfslNOxjkaqhmdERyIX/v2BYRdj0CWLMwmYC/UPa\nmvWx9eR5aMv0wGQkGTItKCqh/pdzBpnJ503zrR6O/yMo/dSvh2AXQ5YehgjF\nlLNu\r\n=9ivN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzA2kgt8OXTdYmtTXHV2Dnl+Df+P7mksl/dXHLD38+1AiB26Ql6dP5WUwz1oNlO3h9+2SDM319mkY9lS37W+4ctuQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191022233614_1571787601476_0.06538821958109864"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191023014743":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191023014743","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a167956d0bad407d4d1623c548b9f566d4374729","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191023014743","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-NKm4/QjeHA/+gTBHtqgE3YUzHj2B97SlW7K6aobhaXGyxA2lKOjD2ecJo2K1DA6ixt4YvMZW3rZ/d+PJVr58mQ==","shasum":"9e3142c3fedb20a7478f95d5b36fb6732b237d47","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191023014743.tgz","fileCount":528,"unpackedSize":5876895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7ISCRA9TVsSAnZWagAA/IkP/3cym2dxzrNA3ouvVRn7\nWoQgH0KLO5xYDa1JvrbfNnBL7n1Qzayhdj3lxuUljUv2+vfANVxu2n+YVAG5\nHZdnhIZ23tg8djTaojp9tK+b0V1tGYLZmfX9HO2MW3N0lzW6Zu4RqV3kLljk\nK1pVSCkDMWDJ0CQSNgK5AvrrySao37SdhbQkdEpkN2torVK4FdNHBEqxlMwo\nStzZG5bblRRZKHAa/4tNoQ4kNWfkuEJL3zSA3Ov3ofVFwV+z+NlSPisBKCHj\n9PB7Dd2dQ8BQCj52RqZ0gUbmf7HnxmONoOKnLBuZBe4yqtUdB4V19e4yhmN2\nduYRRMVOce91Dvl4pN/Hum40/F52Tzh6GXxw0Auwm+XAgW3MV7gXq7kaS/HN\nQRv4g7MwucE26quTATbibpCeDv0plHp2rC3T9QrA+gRGTMBHs1Lm5D/DF1SO\nwvJXxTusFb8L+MLR57+tG9xXo2Hcbotx8EURbOOMJzXePaDHmb73tGS7ldEA\nR8kk4Og3j2yljVyZJwARXEz2iRwdzbqq+IC19sLoywKMusaEcQr5vTG1ABjM\n6sgVy4vHainvSs0J8us644GKJXV+tW+uNpMtJ264aWrffIm29YLQ02pPQTiB\nQmHq7DtmeM2A/fPE8A34YoFX1GPmbIHbgZQJ0ob272IBMtjxOB5AZEAT9OQR\nFiMl\r\n=DttG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2rbbTusUV0lh1vJ4H1mTjli88YtGiSX2WWHaFgsrr9AiEA7vrR/U6jcWYUW1Ioe9hb7TwdalLw8UKNjzgKzq7M1kM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191023014743_1571795474042_0.8278077502521066"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191023015132":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191023015132","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a167956d0bad407d4d1623c548b9f566d4374729","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191023015132","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-juHOiQwoXVBHi7gKeH+ElVX/fErt9xiZRxx7Hz7szLO3QqA52p+4h4Xd3nHGbmrPszKE8IZ7dOsoeqn/qObmFg==","shasum":"bec2c9ee1bcc2a0a87b4375f9152d4a95517a4d2","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191023015132.tgz","fileCount":528,"unpackedSize":5875863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7KzCRA9TVsSAnZWagAAbLAP/jhH3g//xjf+HBD0u4ir\n4rK4D4mEbnk/Zl15Qei7KOoYqKf/ZI+JRZ312DbrYCwKx7mJcYIOR8YJ7jjv\n4Ca0PXrO7uK7c1WRbqSjJVCZcWydmulYmD9EefgNGf7t6w0ez9yVatf+7y2O\nQq5jH7dQ7Gv1glqLMjIdXXYdH6BGlpxe94pQpZ7+Nue+N8Y8mYk/ok6L1GZd\nBlaQ0Ff0fpWtCTXvDHIAXWo3jBvVByuqspaDZ8YjJP1jKdYy0qaUB5bLaJRw\nS6aIYex6xcGIb7a4PBAy9OA8ZUJRyNMfPCiHA1kCYzognzrfX16W0Ou1w0dQ\nD+oP11K111ztSmNqn/qW40RjgTeZDFyZFmjWetCbrmkHYzyVlxTVq5nbSSiV\nHUHNxGKOLRFPo+krlYeTfj9udmEVd2LHQRjVZzpBA3h+Pn3PxAfjRCbxZ+Bv\nm6JJa1YDG6ao4qZ4o0BA1vjs2tAJHQ4imKrKuHxpXEfSaZz8NFzA4SGdSVBA\nPKh7hIzVdWc6i6zQ22ZUbyOQhFRQStFlBxiCpNnQ5mP07PIVMH9IfD1p6jGQ\n2dMF/74tqWtYPwohX/4mtSL3NSPtAIeBIVlRiJDf+tPFQCPTtLFxxrgCoNZa\nfIbvjRNWU9LqoovQiBLLP5XwVuWe7009VWC3urmPuG3vjnYAlR4mGRqHL6un\nXmsV\r\n=ARQ+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyLkpSvYtG6xe7bxHq6Ms5D6jgjmUC4O0FzTWnodS2NAIhAONJ94jEqlI0vH1P2AwkEE7LIuOaChwA5mBILClMkJmB"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191023015132_1571795634556_0.28527627454863125"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191023020411":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191023020411","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"643b93ea36e73d0ed08cefadf0de164e42836d9c","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191023020411","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-GuI3YR67E2qUFXzbIqP3rKYCQELHhOhKHs5AJxsjjPmAy+rzBGyUVOetWJ+UFVXHm07rA5L4uFbvJTeeWT9Qhw==","shasum":"f8c146e4b2d35f26b5b30dd4837e17babd1111a4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191023020411.tgz","fileCount":528,"unpackedSize":5880769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7WmCRA9TVsSAnZWagAADS8P+wbUEHB9PZXrzg67BnaV\nSCSX4i1QLPcK2JZBa+4Z7yomVeRpi177ZShZZmpTR6ywGpn+xNS1l4qmxMdQ\nTz8MzCss6I/IdtGggXgD1VoP0q+1q9rXYNrCa46CCpmQKDDwVJnuJpz3luQ/\nEFAn72FAiGXjtn6YdvQ9ceB/buJtAA+g5HUGvP+GXxyr53BHwQRLr0GUZ8Z9\nAuVfDG6lU+CoS0JRnQ3B9HDys6zfyU7T7yvth2vuS3qzZJ4sfT+WkSCtBEgH\nej0E94K5rP2iNxBZbj2nT0osI05q0uCAE+eiWbJN+hBPSsroqbvGHX/4ZXV6\nyCfUE46b1V2EevLe5vtG2ybCiwiat/C8NNT6rl1GwATlVHXW92s2CGEKNPWA\n6KSxGncjXk/18Q3TSjbqZ8R/zwengyxnzsAm5CorX+3yHqciMUbnuKuY4AHZ\nAr/T56+ZoxsLaxszwOtY3f8TbjXuhuhIMY8bPPGyYCQ4bI16XjIA9I5wK9x4\nDGNM5wvSpPNMcOFXWu5xw0il3iLQil/YwtB9ome//CtS2qo4iEInbdcetqoP\nsxw08QjvmuNZJ7UbfcMEQJEwioCO9b2Ahty+yi11Tv5cVNk2GKZJd83iC1rk\n1ES45oAzkU256XD5b62GNXhtoWJi/GrdosmCtYo77FdpiVDoTJXdgRLMPZqp\n1vfG\r\n=MG1e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARkQDq2qXmF1ahE54FeBfJJQo7Evkeph4I77LmfObS8AiBdtkjvtUzTRx23hNO9AK/JrBvSl+2HUor7MBuwnJPqEQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191023020411_1571796389789_0.9587128090517183"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191023031527":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191023031527","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5502eba6870f8a8aefbc5a2ae4142e90501abf55","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191023031527","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oLArTpVFbYq55C9vT7w5OHVKi3oJsjOW749QIo7EWnnTrhRVNzLQ2H9qHfOKFtkr/R/Pg6LaUtIrEwsUVp/aLA==","shasum":"e0394cac15c9391035ce4ded49b83cf6fb79a402","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191023031527.tgz","fileCount":528,"unpackedSize":5880178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8bLCRA9TVsSAnZWagAAv6UP/iMfsuc9QupTxzJB6Jaw\nv4pHsFLCWbY+uAX4jToQhC+FPtdiP/qqm7wqbIAGdrxvNtamNo2YG2wb2orj\nAv1W9wvIMCPvvSnJOwLbBQ1T/nCyjrdAXTTAtPu/m3NyMcVrmXngs1sX/f9V\nbBzfAOQpQETPFN6UproAMDtZeUPt+4KTyDnchjajdoiDpGidJi0ygRU4Op6j\nrVZ4aHG5Vcz4Ywk4lQE9Dl1MISgQeRBbpuQKcg/qXC9Pqgpop0vpjVRe5CLv\nx1PMimHWwVUpjQmRxtl9VOZ9Sy5QAqCsxFen2DWE/0qEVS1c2FUGuiNGhFq6\nGF1w3EyRrVKUdkKpjniQakE5rPhcsI9Co70zIG+3bBXyr3d/1s2gjn2YErxq\n/4q/TWsjs/pniUCTq1qy3o4l3AmdOi9Xg6SNqyONScCTEENt4oZPdE3TjgSI\nZyPKK04Z6RyBcv0ShAc/E3NL27Osr6ydsBlZwjLMsXEFo9n/YiUlI81C1j5F\n4yrQL0BgIH35rSQ2UFpH44R1f7HDtzjgI9lHTD+bT1vTfQbc9fNEiDD7uhCV\nMfXbNR3s4STQBXGMcc4e688n7EmyjIVUz2X6SIeUzb4GzGK3EeVNpG2eZnmm\ncUGv6tIaW2sJoFIPxjODQy1aGtEdvqPFn7cB5jQgbRDubWExx+eqNYQojKO/\njGHM\r\n=D7C7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH7H1cALUFhbBcrKsY9PXq0mE074Vx6roHnq0IBzE+qqAiEA5fLAVyPDtcA1Zqk1uZkwMOL168YgEyvS+N4d23E5zgg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191023031527_1571800778811_0.08458428812758423"},"_hasShrinkwrap":false},"1.0.0-atomist.t29e48p34.typescript-version.fp-workspace-migration.20191023043130":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-atomist.t29e48p34.typescript-version.fp-workspace-migration.20191023043130","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"340359355fa55e12607096e7eb0f42e4e0302e24","_id":"@atomist/sdm-pack-aspect@1.0.0-atomist.t29e48p34.typescript-version.fp-workspace-migration.20191023043130","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-6D1gVVTWtUdNek9WJ+8XljS09MCnS4btf3KDZx0IJtjJNTND39XAqwRzTq17HoNN4ONCsXD65lkJe+64veetEA==","shasum":"3c3245af404ffbb319e6ffce0c25b400e1221137","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-atomist.t29e48p34.typescript-version.fp-workspace-migration.20191023043130.tgz","fileCount":528,"unpackedSize":5880806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9gUCRA9TVsSAnZWagAAjVEP/06iCeG4rOEMrj3Z+19Z\ncVsKBBe/T0jfVyz1E2do9Y8TQCcH+KhkxHZy/FooPKf6jRaJyBVENNGAati3\nDMM0fNeZVTK+2FH5y/qaAL+oCm1/+EXlzbxpXJEFtDRbH9PIHgLhC2QgNuos\nrwyrBONXU4jDMXbjQRY8XT6dNSN1WanHsyCF7J9logMJBC/LO24Ap75KX2CR\nVlkjLTZZl6rYZglSdqTPxLDjgv2hUqHFHBQVAbc7SsVdlb7Jjrl3kNhNcvGd\n+zCI+YoqpFhQwXq0LzKHugCH+Ts6zszVPeoESJIaohGAG4Qllqkoe2/XdLCz\nOYYO3uFh+PVsgeOYk0/+lczxM5uDGmfh4kDZeD3HlMIAq4GIVMHsydqrCLe8\nx9ARuQ2ojR0xrpv2wCFLnm6t74jx/x+tUEGzKgsP0j63Nc0OPkpBLtbknbwr\nIuFdMRuNpZO3ic+lGaWE4VG2yFE4KhjPZPNdKIy9sDIE3wZPnVBDEDcnLj7m\nzA56QBm9zEvgZTJe+sCkYiZRIQZxSfq7StayQts8ItBDCP11TH9VzvOQ4AGG\nsmpSJFhrOPGSeePhKTx3oaJktZs3+KZmGTtfyljfMkX3gO8YhK5zx/6nnKbu\nZiSMkLDkgZbex6eueazloCcR45q2uI3KmA8PWai6s9RTQ+71Lt2fxMdLeObG\n5QxG\r\n=ZL9C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJu66PbuNJdhZEruJto66O3o7nAUP8iUPfXzOKP59nNAiEA421yGj+OCv4zH5y3Bna+/l30qvrWb8u4TIErrfqrOn0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-atomist.t29e48p34.typescript-version.fp-workspace-migration.20191023043130_1571805204155_0.06175553188062555"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191023043557":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191023043557","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"3af33513c499d16d927a9a68e09728d2188d679b","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191023043557","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-N44tDlf5KN9JBjo3UGF9UXv5XF7rHBRPJC+8BR+Li7RJ+U/tHaseQeoQCw8lgmb4m5E3yHJMzRxUt8K2mmuBEA==","shasum":"8daa3f9cbf04a12082d9b53d3dba3e27cdc8c0ca","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191023043557.tgz","fileCount":528,"unpackedSize":5880769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9klCRA9TVsSAnZWagAA6U0P/0Nr7CVhqGxTNlCjrDts\n7wi9FfS+UeaHpRpFSo2EOy5IyJOarGfCuFLCMEX6hQ+W4uuOiY096pLoQTGF\nZKyLRKnywV4UNC++twvVe8pdmnGHCG+VhR6UipbLTFStAIZElCrOUgkAoyMF\nnqSyjzPhkJym3vCAL2nahFdYWyPFrbTZGX14bjMtdAeWmcKKRGhhf0lNI2m+\nKwPHWX9wnDQ/nA8azzwBYcwnKBV6IgyDcfTkkwqa4wiCuKd2YMC+mEhJ9HeY\nfrjy9qStt4ux1/gTYWhQ+P8t/JAuFgTH3kk1T7nxgK//QbfXfIwWXW/uzpfX\nSM9nUxEM0j/wgIA3aXYqlgmkVJH7vm6byJrnWfTMm3OMPTWPNCWJZhPMIvVN\n4HVOGHWYr6J500+avHf+M6knERrL3whAqKT8IolEyQ2isYyiDaTM5J1WrtDT\nxA6/va8oeNn9cyTPGCjrUlyEerV7GmSJDrSufB5C8UnY7e/3pE9Qyji8ZUS9\nN0lsGvZ+9Fnss+9TMj2c6/ThUmeoabUCZjCtF/rA3PpxY3FwP9KLI5qmBdlX\nozqZz6WC1K9NhHpu/niLHKtFYf83KzZUc1EbyTClzovUmMREqngT0b8sy0u9\nlirIXuRm2ROr0G8GxG+OM2Gp8RnbwOjpsKJl2r0FxW/k+qBqFpO7OUqgw6UT\n1cnp\r\n=peDj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClGJHpQbAG8JXQ2kc24xvJiIqbHqUIL4PavRTZUBQTUAIhAOIKl4yas787onBEFLH8WlgYNm1UYtVEwnLQlQPs213I"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191023043557_1571805476562_0.2123096338571715"},"_hasShrinkwrap":false},"1.0.0-master.20191030192334":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191030192334","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"a67e6ccb9f53168d1deb7d168fd976b6eacec6ba","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191030192334","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bVDhVf5RmKUSM09IcWxEzZie1Zzwieb8XWSYd58EaLdVO2EhdyZdTyKR0E4f9o9M8T46BuxnB9jX8fmgJj9J+A==","shasum":"f0a2e343eb1831fc87102b3ac93ecdae0134906f","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191030192334.tgz","fileCount":535,"unpackedSize":5944222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduePPCRA9TVsSAnZWagAAdZsP/R7cSS6yscnHREofdZG2\nu5k/CGDdjOyUuRReWhPybeamYOykOPty9iukhKKk4Ma9agWYC+TRtnLlxd9r\n2dqbSJoNuczCEQK5o+7mgIeAo/yBTmbknSvtmt9YSMMmqpkv6r6BwtipHlk1\nkVq2VhQpOU7b35wcuZd18UgrN8hF+dZDj4Y9g9J3OMmQr0r4/pBgBgr1yUzD\nbdIPx6iTNH+J74gstaNBJRwkm5d2SWwN6oRtt/zyipZP+izghMnazX4JII5f\nBT9YyyeVubIKwcdPrDxPGfE9wsnpvYrQMQn0Df9g1FU/Lx552k/vqVtcR9i2\nmgLswXHNYxJ9aX3CMNElfBZTeHiXi627f8l9il5Tp/+NKAAvT3c70alvOPPT\n7hqMMDn/zkCvSzopuuC2nc6dblThVazqVAqweASh+87twq/Qj1C2NQwkAv0U\nhgsZ4cgi8uUKIJPPfmyo+lIZSBToR+b+Fkg3JReUjJOq5XCq27vXwVvqAS+J\nAKe6B2GrFkg53avBMysAr/J99u/sO7nYoLb1qOXS7Z/97/nwB4hDMUT904Yu\n3Qcfvn9NCmJYn5+rYztMKDtFaj9FCeeq3LC1wOoLRT46ywVhrCZcDz41EslV\nmxgAPryf2MFzwXEJjTVHN7sspXy4PF01711vlRpXLxzDRXoQFbSuIqc8Lggc\nVQzj\r\n=PabA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1bW7T6zPeZmew3L6mmPtnNiunqb9F46e6yqQ7afMX3wIhANCQ3tMfUwIvKa+jdwp7zW6iFSDru3bKdzKi5OYCjGYy"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191030192334_1572463567038_0.05783415562635197"},"_hasShrinkwrap":false},"1.0.0-master.20191031213835":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191031213835","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"f937c96e60c8b6ff8c817aa8b7c1df1f6c530598","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191031213835","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-N75y6sWu7PzZRaH1fiSsIcn8yglVdp+LSbOPPhWXleyBW17uPWXNSXLskhlMS0yaCJroxz0wBQLE2DN/xnY4Dg==","shasum":"973c962cd0bf6bf1fc80c8bfb649811e561aa535","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191031213835.tgz","fileCount":535,"unpackedSize":5944964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu1TpCRA9TVsSAnZWagAA8UIP/32cXywV+UCAL/UPD3DV\nlSMjTpE/DowR7xl/QXnH3715lyYNBv4MV29usfK1GGJdyksYjpIMg87M5vf0\nymbV9E1GlB92TT4UiaEADqzM9egOkZehZDG8VjzZW0YrIlVZd3mZdomNa6kG\n3fItlPX17ykUY2KV8EARKKck1a1DPLIiRj9pfMJKNCls7/Ul2PEDLiZzqOxm\ntQsNt5QfKaeCsDUqEPIKY7ammCZCCueKBg8KrAWoWUCIPsKGkRWRSTeqXE9n\nO96xMa9t4iMxtD+it7zbEdZBH3wFWqsfBxHuOvkCXvukvnwPOrzLKl8C0uIq\nVarnLdSz2hKcyRwudH7wzf7dra4i8Op5v8CyhH7J8e7rwHRTqoYeueU13OmF\noQIhK5BtVxAke0nCd/lzsKo1irD03Ao8/aNjg38p05MUE297samAaYzJCLDZ\nv6WUSawvPDwH3/CKHFvlCORptRZfg+5ap/MWm2l8ukqWPWMikTKe9OdD3DFu\n24r5V2inxC1g/g13vOG3tXsT/GATe0BzBtnA6I8rTKv46YBBMIBljMUDZQdt\nkbLzc4ni19DfFmJbTeZM7+jQ5o2NSO22Li9aTWws3kjm5hOJQ8Qoe6rdTnK+\nKlWVtkofpLH0F62kfOmQsdNj5AtuRSTkAZkNE5nM6ibFizxK9BwqaH+aZ2fB\nctja\r\n=XWcu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKvupzbkM8KIDR6d8N7ueM7OSALUZ9NQANODVEfbMO6AIgQRGc77YYQNp/vwwHxFTz7mxwe5OMdGLVLF3U5CXtlkk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191031213835_1572558057320_0.4760812766670939"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191102182214":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191102182214","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"d5767f0405ffd2e613c0c692e7b3c2bafe38e9cf","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191102182214","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Nyqn+Ur7gFL/4ccFVOl2nAqbdRKo2ZS0SJVattTb0bxn+fl/cURydl1zirXodv0sZz5Hpp1M/RP5bdJ9QsFMyA==","shasum":"e15a247c4cc383735a610ca246b4f0b437b288dd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191102182214.tgz","fileCount":528,"unpackedSize":5882680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvcm6CRA9TVsSAnZWagAAHJEP/1IxUQrDsViDrElff4+R\n+XTFdUli3D5HPsOI6cvz4a6mHDsfMgzNDePBnW+VV4DttOcMXbTSN8iXrRY6\nhi2/QLDDpT/d1EKKDp7pMpT3DyawzvADy4whkaTKA3Aem6WYHrKsKnQHGRE0\nh1SP0B3SCs7Kx5d3GAYVolQf2oqtBOUEsYTKy3KSi3xTuPEQ+F4z0pS3E2iu\nRLyL43cwe3THu304eDjDAdG9t5NWoPo/+edWqof5UCoWF9uqrwfpra/+N5oL\nXjM/s+HY2lYbNQf/vNP1BOx6Yl/WG04M/VhvbbCTbRfnorQasRNyK5roEIkk\n/Qhr/oRVXtkaRhxrxBSr+tGtTiF/MRMYDOtXevB/bK4AFaR/RDoYmHNbtRNS\nV2GG0dIL20oESzVOo7E+6pTbWkoP35jFDccswUZIbE+OTKEif15ozILp70R8\nC/t7b6Pmx+tSz02ZxKq2X54S6egNHdLZ/Vv8jlGn8UfUnfFS4x8zP1DTmyZT\nE2tagbD6kOnTYEnZm3ceeIls4AbBYw0vW6Neq9NviyVYGjDj4gfhtAfybaCa\nkkJC9BARNZz7S4h0JfmfHDgM8B8d2fhBv3p+y6/X1UhHqU85HZx5Bl9dPM2m\nN0WF17Em3r0vNE6fRmr92JibzAQULymswLgO7gwl/99le46y37Y77vyMxWSs\nSXHo\r\n=ZEVu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyG2Wubu5/NHanwO8WjcNjOw1HzbLkO4aiVQNdLSL1TAIhAP+xn0IFW0loQ9aLComxWet1h/yBvPTPHo5RwQy6KgC4"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191102182214_1572719033987_0.5863391868583099"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191105005256":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191105005256","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"0dd366fc7d7c59d1f268ec85b09a56b9e3bc098e","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191105005256","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-HK6LIIm1sv077axqYzpyJEzzxr3ooTo0oD7XClWgfF5/dTj/26LPyvoRm30+DoDxWoVu6/T+Z+sldvHimpP6vw==","shasum":"5ba9f56ca96f4ca4b1b197ea682e0148c0b93990","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191105005256.tgz","fileCount":528,"unpackedSize":5882628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwMhpCRA9TVsSAnZWagAAh6sQAKOi7CgGjnt6yghqawG9\nsQs/6YhGxUGxelxXtH/H4uhsViA8g1CxxAL5T48rVn0v8QR1BT2upF1dxQzH\nBFyqgHWOdsCjwcTNj4CNKHm/pM1CErBOH2ko8pWMCzsmeMErZfgQ0rz8L1im\n+3zKr4aqR9ImsjfIOlTwBd2PgXHPsWOUzxJecGzx0RXMFRP8X0pIkttTVUIF\neZwSYvZ03oTmj9OSMdNHIs0uN2OLbCliOkv6SyA1A2S7KB4ci/SNpmZOhVWi\nuON7ec3PTtVqo3PfngDI4HBlFsFqVPIHDkmrk5aCU8iDVvitMD3h8VDUiq7g\nVHniH6ifqFxC1WYTBF/uI3pPfZoG7cY/rw6jTtfTzvqWbADM2tUu7EfMzekw\nK73LIMH9/GJD8VBTBEX7gQhEMvR4oQLPZ2j/+tewcBodPr0lKTtCtlgaP0SO\nLYFuWKoCeSWEiWbCYcQKGKaqMgE8mbm0MyEoWL8KWV5KQq9FdVXnilNzRFV5\nP/KkQGehHEN6sqtT11OEwahd/J70X40ZjbeBsLVF2X5MKtXqu+LS8Guodlgw\nYUTAwTui67aGW1cVcF0j/bo56lovxeZbPTXmUm49ctCFgnuWdFzoFUU3NqNZ\nsNBYhXz604InRwr6ZXUwzHSznZdvs7QMMVeIMqJiiwX2+3Z46YeWXb697Q8M\njDMb\r\n=fV/j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4TckN8aeBOqiYjpSu8VsSwJjQhr2L95qR6RbMpyNZ5AiBXdoH/I880WjxYyhimIo8cWdOKY1F65eO3241TQB0AfA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191105005256_1572915305144_0.32100027587542623"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191105011406":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191105011406","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"821a465419fc6c624ed8ed20f6c067ca5501353d","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191105011406","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-49qQOdXCIVm+As1XlsRLSKeyoThTNamMeWzBFYTrVA9xVK6i7MhCXZ6wAWWY3BNqQFkkrcifOO1ABcuip8Eo6Q==","shasum":"bd1bf3c27b4f2798d7e63018eccda1b44e4bf560","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191105011406.tgz","fileCount":528,"unpackedSize":5882628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwM1YCRA9TVsSAnZWagAAW1gP/3XOFXRE+ha0ss7Vcqzm\nv16sOce2YexV0vHr4rtuuE7c0b7/M7rE5V3wFcUxZvjOpCLI2uQ742r8iT0F\nQ9r2b1G7F+stVswDFXcvZ2id19OcxqNmEJQ6/TX3KetKZ4Yg9w97K+9jw/oe\nYCV61A6mjHaK+PEDjRpBPKfpcCoE8XWuHwuFgjawr7Z7pfuAFWRix72K+YId\nFIEpf6duKeEQB6rSk82i8/r91J70fJL8NdDxBN3kNVH7lYkgnzTtaq+wRQ/Q\nCfKydfWUGZzyGKI4KE0V6fSzp4o5UwoP9bgf6GGr4LNNbNuHa+6wGX6QDReG\nHnyPOD0N/Ltds9sj7ZzS04Ztb3mG5QYxAguE0/GBx8pzKRo1akDcRHrGWXxQ\nlNPVkwWrZ+ti6h2l0cC7DOifAgLhpz3bjHQRqSYPzaSoxp7qRbpR3mcZZqSX\nq64uxtkjiwICdQhvyFJ8O4m3ZU5v9D0uaG5YvoviUwmjktmdQH+qzNqr8MMq\nZ/NnzRTajjXnj0Yf7Fk4oVPFOsvLn1MH4HKnJmDP0LKlPdy1ATIps6Aa8oV7\nE7VrQSpEoV4ZTLniurxGJfcnWwrXtem7OJj7MCqpmLA1p5lo9dfUqpJEDZgi\n5DD7sDbEtkgt2IDIBaABTYhhP668TCTevB0y+mkQh44hkqc6HWrqQu8L/ovw\nXyrW\r\n=sjKl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcNaNLLnQaG3g85AEJweD461uad6dhflFuiendbyjp2QIhAKwyQQBeEdAOPieTWZh47mZ2WOFySbCG7UDdg+Q8qX39"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191105011406_1572916567568_0.3428114063932326"},"_hasShrinkwrap":false},"1.0.0-dont-look-for-empty-sha.20191106023838":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-dont-look-for-empty-sha.20191106023838","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"4fba57c4d5a6abdf1c64426e30c82ae89f361c25","_id":"@atomist/sdm-pack-aspect@1.0.0-dont-look-for-empty-sha.20191106023838","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QLpBTQQkNmAruSNTVvCjTbCoxkPPBJTbI7SdAH5PLbCRQ5fkWkBCSJQodc5sjroTvc9gNXC7oHOhFo2js+UETg==","shasum":"8a76c898821dbee39adb0695be02f07168975346","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-dont-look-for-empty-sha.20191106023838.tgz","fileCount":528,"unpackedSize":5884015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwjL9CRA9TVsSAnZWagAA5j4P/1B2oh1k+8rYXkyFPNEA\ny8CMwhxld2wJ0rJp80gDypVn+k2subxFAZqCX+pARxFnRdIN8Oqj/lHQO+QG\nRMNYZv8U2oKAzQppomHvwrBJM7ONSdVIbFUzPS6MvxNGj/M+6VwaGfhy3wXE\nTLRKB17YyPwy6+RD+8fg1NKMmrWZ+m7JRHD1paPJjpjxeR4Cbplm+n5vcWZk\nMJcpekYKvT83iuARUz1vpm+uXqaXKRS57WtJlKZO+xG4Tejn2LnVDeOWRMpS\nCVFQgL1nh7mCAvrL9x7BzGV7fDpWbeFHu7+oBua1L43RCXSpHZ/hTQmzi6dE\nQOzFTQyq7Du7aC/vym6G0ce9ceT4mlS5g8N2pv12UVaWTkaq3p4nQpQ94Xau\nrsDbJ7bnl5I+iZ8twlyISaudx5P0vW4YXNlFD5FeJvmIdTR8/hXqXHW+LAhP\nAOFM/0NfgwwlsSixzspN4cNqGUXCqGPP6wEgtrcRHWpDBsQxc/PhBq18fouj\nX8OeU2StyWwdfKNNGqn1fpkEZXDzDT60tGkgmTSoIAKuvQhbJBbsIDdasiZJ\nWlHs2Q91Fbb2g+wKTPFcpoWvAGHlX+IZUkGUlrX2ffkAkpBYBADdPXgxSKzK\nHUlYzXhdWuO5zKUIjlIso6x9/dsh/TMs7ccQBpqLivPqKK95zmUeSG02dkU+\nTY4C\r\n=0dqA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmDiR7k+Ns+CFMFlkV5la/yV8T3sFzb2IzbRHeWtfDcAIhANGpoDC/0n3q6fvMW4pFBQNIrM4i10nirdYb7fdJ38Fe"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-dont-look-for-empty-sha.20191106023838_1573008124931_0.2745369856805884"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191107172131":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191107172131","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"602884078af3d6a325fe6088b8a1d7c453d17345","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191107172131","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-gpusYzJgRvwsg0tO4B/GG4/PYgAZryuy1SEJuuzFpcLzfWyPW5nyC3yqJoEFTxXs9f6IH0bgHLEWkgiyDXrXZA==","shasum":"ea73bb8b498139f5395cf9b599bf54b2767dfa68","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191107172131.tgz","fileCount":528,"unpackedSize":5882932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxFMrCRA9TVsSAnZWagAAA6IP/ibjVkfME3J2Bivq29fM\nc1FFVrCDQhWy2JSLpScG6lE6ghK7L6/gjHLMvZ0NkULx2KVVIfXbuFCU2+LY\ngBFWhIfneZut5hqJBrxGFSDqGKF0+4s34L4hx15zr0JF6W/PZ3xtIIU3bhbl\nBe9tA9dFNnlq/gJu9YVWmMgjHNut74+N8+mQKl+v+HIWTQa7mbV4cL75xkN3\nQvG6ccp52OXp3VaA3f0m6KcYoPdZcDdiiGBpMYBV0UAeUlxhuLUt0nvtpAQa\n9AsvmkHvd6A39ma/E2AMlL6/BbRjChpAFPhUFFuJqhnVhwVOZYNe/bEqqjhd\nyuwKMxf6d1PpyJI+x3Tt+ejcHMnquL7rZP+yHHZaL1ZdxREyCo722AqfxOpT\ntYjv+oA719UHykBDIXlaLoO2tydGxDOqgVqTZn0xCEZsnHY2wZAkhWlUwubg\n0lmcVqKRCVP1Vv2N6pYHeyy1mUwDERbMa05ngguVYylkqpaNbamb30+tJbLo\nbUKwe+k3H4IFbAeiJlTSSoynKk/6okFBz++hMU6klui6M2s8enMuYhBBpz9b\nRp4VTkg5TJWPH1lL3UZMf2/HkaTYmiDoo+lvJ1lSoH0C53662t/0OKeoPxef\nykzX0QvTqyT1G+4UlDrv2nKeLmFF0d8uRNvneZtq0dDpbbCA33tQJC6uHvl3\nSN9b\r\n=4q9v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHct8AWYUy5bBfEvX4UNmQ7kIaabTtIR4bUGLP73u8dAIgU29vkZJh2CjqEtManNx6eHngn36OZYdemmXHkCzLIt0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191107172131_1573147434415_0.8700123038543957"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191107192749":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191107192749","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"af1d4ecbc255526dd7d79b88ab63ecde11872553","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191107192749","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-x62CYsw6zbhoqRb4db8eWchA+LdXxccUqQft0Byh53+dl4wWHXY0pkFubABVtSQdcan7uRSAtoP9Y36TLnP9rg==","shasum":"6be915f75f7ee9d4baac23e30dc5e9c3a4131424","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191107192749.tgz","fileCount":533,"unpackedSize":5889712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxHD7CRA9TVsSAnZWagAAz1cP/A8oyA9yr4mHFT6xhycO\n8mDbk16tRKolyJAcMiyGxRidxxnkbOoVdz7+LOK1S37AAhVBGdVk4oDuUaZU\nC+kCPl3nVRWboFB3/vZJ+RpHIUMWoOGvQHvLkJqJf16LqpCmsjkmExQiYNNn\nsmtmKWkWn9CZFONSiPkl86DMoB0q8bsgf5F7+wbSUH6EHnU438WRktxaKavu\npSe1f8Mj/MaRvB3/fsibH13jBE0fa8iOhj5aV0pH9DCEibfHiR1CqM/WogHf\n0TNO5eq9SqQiMilvqGE6+1eSIBbY6pfyan0tR7FicxafDxzp1MDnW5dOgbY+\nvUVUupq9zBjMzCzRRXiCpcxlT4h9NMMef8/ifEs0P9pCN6sPAY47WJiw/WnH\nR/ZvdBmIErZLt6vG6G37Q+mZJsZfW0B0Age+dfk/gdqz4qtT2+0CbWR8J73/\nmAXpdi9fGCLhzFhChCAn80WOW1vT492oPmdKRNqxi5U84kj7gg90IPFHJhIh\nNeYTB8Ux+jHE/YJ7+ZFWdCx5OJnMgMyNX6f7sXCEk+aG9W8+58YiJUw9oLeK\nxlk5OIs2sVqztwSuowp7omm+EA9FI3ZI8dVQvZR32rPIIappdaZ7JCFw1+CN\nLOhmL7TrO+9E4pGlefVv9ql3GaTsAGpGotqRmhlr9MU5HfexyLEVGO4ZVkMh\nf7Ik\r\n=Rjfy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBD8GniV7Er/IXytxjO9LYi5e7ugwZHWtdJcUZxJ6QjfAiAqoRStthybG/Qyo5J1l1b8n6+DhBy5MGUYoo1OjeKRtA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191107192749_1573155066076_0.6649643636349478"},"_hasShrinkwrap":false},"1.0.0-fp-workspace-migration.20191107195757":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-fp-workspace-migration.20191107195757","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"7a75c6b0de164aff7851552e5802d1c4e2145b84","_id":"@atomist/sdm-pack-aspect@1.0.0-fp-workspace-migration.20191107195757","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-pFjnBoch5R2m9mt7PVnVDHN8q/G22ZJ7+fPmbfzbWU0lFJXvFup2bxEBtM03ikzulXuP8XOpDBSG4ZsUMuNHBQ==","shasum":"d52a774fa31b8e1683f78bc72b48cdbb34730c32","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-fp-workspace-migration.20191107195757.tgz","fileCount":533,"unpackedSize":5891317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxHgBCRA9TVsSAnZWagAAJL4P/RUh+4Lz5zrD4sRhXcy0\nAy7us7Y9K9WksL8ojy77WH/l7uhYEm3n8h0BaMhwiVbIIphzd59y+q5sozGO\nC+WCBFv6U21y5mW8m9BXgOeGfcBFuVmM1BGbOStV7E7eTUC/gFNbKtC67TLV\nAl2Ru5qXmF82eF+/klVrhQ5WKSq1+kobH3ovqYTviUpqeEes/sB1fB79HoAL\nvdOHKG9oRl45v4z/c+7wkejH9Tn9oKuGTLt5942eBzv6Hvs2j+WrdaFAIxup\nCJrav+86kJ22EekY8IzHMt35MODMZSiXGj3e4bWp60S0kdoqTPol5XF82V0x\nmjMp9/b0sGHWUnovwFaaSFb1oFmryZ7Rz26nmlR0bX2DnEHrAAS1U8bQzmWq\no/Has2UjxLw7dB1+cL5fxMsfFl4omr/Tv5eZc/x4nDnv6dOyMoxu5A1TYDIt\nQQhok799H+ZUTyAH8HVbKWYPqKi8E0a8m6/IdNJNGT+FDNBnk1oRkGvdo9kQ\nGYjoA3tNA7Vl5pzYZcL7xvjxe49rA6AHNFEKqv8nTYH8wHSyxIt3t7hoD6sp\nt6bcdQ70qebH2RC2eUOZVpfX3GnsK8+7DB2SJKCdepCKHKSEu833KoqedlZx\nVNSU6FszOmFYnYWNFrkdDXIDN3vwwujb55yogiCS92ygOEYu8Uctt1KwSiZN\nF/Km\r\n=cYlW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa/PcXbEmMcqO/6m+WYRDmI/lh/sd8VOd5/178ppvnLwIhANH5EeyrN7pClh99U9NQTKnZYtD2CEUInNUqU825RHcx"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-fp-workspace-migration.20191107195757_1573156864658_0.7358760020281465"},"_hasShrinkwrap":false},"1.0.0-master.20191114212211":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-master.20191114212211","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"^2.0.0-master.20191004134721","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","run":"^1.4.0","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"1.8.0-master.20191002062637","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20191003024407","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.4","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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}\"","test:integration":"mocha --require espower-typescript/guess \"integration-test/**/*.test.ts\"","integration-test":"run-s --continue-on-error db:delete db:create test:integration","typedoc":"npm run doc","db:create":"run-s db:create-user db:create-db db:create-tables","db:create-user":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\"","db:create-db":"createdb -O org_viz org_viz","db:create-tables":"psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"141480a9b3e3c08cc9c67914c441371dccb7fab3","_id":"@atomist/sdm-pack-aspect@1.0.0-master.20191114212211","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-gvp6jky+h2ND0TCHZFqoGFlQoWPT12IOz1wctnVFfMGP7EEVgdl0p22QcDLTMAHNS8C1lGKrv8nk7fgqkfKxmg==","shasum":"037911480aa2298417f21b3088fa800c8fa1911a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-master.20191114212211.tgz","fileCount":533,"unpackedSize":5891301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzcaECRA9TVsSAnZWagAA2r8QAJb2JUzzojCww5qk57uM\nw7cr0EkCXhr520qeKXpo8VTF1zcTnwTiC/cDPtoilFU78m9iQxs3o4F0KEp4\nHTcyX8VyCgCm4GhvOmG24BUdsQfTWs6Ijov4rBR06Vyuxh6LranhIMwvrS1N\n1b2N6rr3GH5SGmMq5IViWZT5LrheFlhIanqHvhvPULJNijtarpJDLXGuY32Q\nkxtLHZsMoWcWBrCXoOSGRtlY5yNnS2S2G2bQC4Hnr5C+ceHeuAQwoLMneY+c\n1dQ6o/sMc4Y7BSNx/GUb2+g7bwGGNnRTZEAgRP3NXU7cZDZckwJwxwOKnC1G\nSWQMTTvF0OGtwxQ8JrFhLcLXdh5bGbxaD2rd2BlcZm+PL+/ubEoCHL9XyGH0\nHgEYJ5O5dZjmr0pyB3ka6GTk9lizAO/HEQ7VGodS183Zz9xRTICxfEt8xAFt\ns+uJHUifLtpubFH8s9C3ApW7wAUgixg/aJo5gKcq1bZpRE4E/nZ3nghXCRxm\nXA6lCRyJVsPxnI1wJIUHRRAyPq/vZ5XnFYlZiIDOKl8eMtEsai5m92b1O8Mz\n8m2bRqtW+W9M+PSVVGO4TkDiYq/4L8tZeT5+jAE1gc19Efq3ZbK9oEp6j02z\nUNo3DDmdrstRrTBIvjq7maCjreCoOP9h6IY5c2Xhdi0NBiekQyNI30Mp4+0z\nmcfw\r\n=4bvr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCasXoO0QkZa5fDahUUCCUePEjCsqDowqGAeQVjzKjppAIgP3L2HQLfcfnK7qW0t09K6YZb70sSTxjjVOxJItA3vXA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-master.20191114212211_1573766788279_0.6940473640893823"},"_hasShrinkwrap":false},"1.0.0-export-query.20200120013716":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-export-query.20200120013716","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"5766f78780682384123041660478626b3d723d17","_id":"@atomist/sdm-pack-aspect@1.0.0-export-query.20200120013716","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-3VxePmuziTDg+53OUagoqQggV718ZnlViJea96tJ9ktdKpLLVoHXbjoCnIX5Ie7BD3/MSxjQPFVpnCksM6WCxQ==","shasum":"fa0c6a4ae431982795b7902d68aeaf0a7e6db36e","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-export-query.20200120013716.tgz","fileCount":391,"unpackedSize":5095952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJQS+CRA9TVsSAnZWagAAVgEQAImrolKhagLChqq2xQGT\n50lwW5PAeSVer9mU/xvXggYmlFlmKbxzGJH93BKNDtYcmGKMXkQlAq5qf3VO\nHVtIgNJcvVRHquPKzdO2ArKk3eMei8zeqerVX11ivmMYOvJG1EWckXfVo/Sy\nNahdooWXQmASROs36N2OvNNWtZs+K724Vx5Pm8orL6By2PYUDVJTqm+16Ryv\noVtI4+QuLUDfZRA+NQr2gDgeoBrqgbYUtiw3CS9mU+NwrdDHhfzCiMsLJUxl\n244v1z9F1w2QtwGlVf3vpWWhI8oYQP1D8bzUAgcWQ4BrBR1bKoSLVRwDFPMZ\nNHg5oJfp0mwso4DhrhLZsw3cBDfVAN/8AObLz0RLWGP8oFHWAj7Z0GWx2eDB\n8ZtlFkYWv/2DHvGjEi0Olsu+RYD01rm36af1abW/aErAGhUH3RNWzWRkV6g6\n+10n3T8UiCdzAIOICKJnfhc6ws41JflZWoV+X2XJlzy8Y7X4QrsZiMUH6OQ3\nQk/tJOKbAa0c7eKPxr/1HWYL7/NzMsjbBdXyhiX00BHFCNROEMWy+gcXf8qo\nOd/nKlsv5r+zUj2W2PQ7RKw2Iht5zknfdcsMvJLJ6X+EDJzZnl3YWFmFJ3xh\ngSCbUmUb6Od/umS1Shn7j3HvjaykfaLna+1oTGdJh313sMF+4yP8AlhnLkZj\nK+qP\r\n=CKpB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRdR9wb496nVd1bDFjUNkiFKLdM2Jl2zZgyxSzgU4SFQIgUZqVViV1itKHUlOIIUUMnIQYuSJnzgtTo1NF1oNgZmQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-export-query.20200120013716_1579484349895_0.31186751338288765"},"_hasShrinkwrap":false},"1.0.0-export-query.20200120014853":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-export-query.20200120014853","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"ce6a9492a3adcb1e7df0586b70599e0e8916f7e0","_id":"@atomist/sdm-pack-aspect@1.0.0-export-query.20200120014853","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-M1LlzZFbR7sQpMFun3eHiBNUXqSTogNtZumiYRHiTN/c5F2ftWwip85DR/v0b2H7AtXrWUnvus3xQ1O70Yjn2w==","shasum":"0606f97201275f8052cdfeddf1e02ee1f57a2076","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-export-query.20200120014853.tgz","fileCount":391,"unpackedSize":5096130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJQeKCRA9TVsSAnZWagAATrcP/06zYs9a5LUQ/f+paGNl\nLW2gWzrXAH7vAJSqzbMuvM5jIsISyXR9YuiLOeWDTwHujENlNKRg/rGXsMyi\neYFir1TFCCQtrR0hTkUKIhxWV53Pc6VvTB61cMKa9sjk5baewWGLbgDS0qK/\n2zfmRRb8Sf6qPahmTw0IbefyJvV5RVmSNEcQy78WOTRhmXrZ08TozfvW7HtQ\nat/wwIYNc2NbRqZN3Q4lI0yNVoTAGxF4xCkcqSU0HHnhPvkjzsToxlsPZnfo\n9tR3Smn0hTPQ5V9TqX4d1lXnk95DwUYyMwNlOucbvU2UqX6Q0UOsLf9lNbf8\nQLcUlD/iKLodxEBwl9494SgtvI4vv3Hzlx9GtIk/4VIGc60DiWlt+FiaOrNY\nstmV8XegXHEQ9C5Sntc4DNWABbXYnrGAMpW0buQA/HDmJcD4RZpUQ54KOddw\nk5XmufvMGgpwSTHfM5sNAZX9YaxxYccLHBqFw3PmnoE7lj4+YN6QFU65KX56\nqJ+dXqMER30VaKeRwfxvXWIRJ41o0oJ4EbVCPENeRU5ogrrerMIS380LsD01\nY2dupMj2GH0MirRle+LGfG+Be5xVBtLJygqX5ueHFhL7oVqeDiDbgpPpb+Oz\nqAhuXKsaybnEaX11BrhGg2GFKGQM1EJvF/H7pWwB08wJ540qkY0Stqp0N/1b\ncbJg\r\n=9GiL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDA4D3XayfOWMXQcWkCS3Gj/rLPjSZtW2uh13xlTsvT6AIgAbiMVfKH15eg68452D3s5gRgXJr3UEIRXHi/kd6rGaA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-export-query.20200120014853_1579485065801_0.8084386492228057"},"_hasShrinkwrap":false},"1.0.0-export-query.20200120015655":{"name":"@atomist/sdm-pack-aspect","version":"1.0.0-export-query.20200120015655","description":"an Atomist SDM Extension Pack for visualizing drift across an organization","author":{"name":"Atomist Inc."},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"keywords":["atomist","automation","sdm","aspect"],"main":"./index.js","types":"./index.d.ts","peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-fingerprint":"^5.0.0","@atomist/slack-messages":"^1.1.1"},"dependencies":{"@atomist/sdm-pack-sloc":"1.0.3-master.20190502175705","@octokit/rest":"^16.28.3","@types/js-yaml":"^3.12.1","@types/json-stable-stringify":"^1.0.32","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/yamljs":"^0.2.30","app-root-path":"^2.2.1","body-parser":"^1.19.0","camelcase-keys":"^6.0.1","cookie-parser":"^1.4.4","cors":"^2.8.5","d3":"^5.9.7","es6-promise-pool":"^2.5.0","express":"^4.17.1","express-auth-parser":"^0.1.2","express-handlebars":"^3.1.0","fs-extra":"^8.1.0","helmet":"^3.18.0","js-yaml":"^3.13.1","json-stable-stringify":"^1.0.1","lodash":"^4.17.15","node-fetch":"^2.6.0","pg":"^7.11.0","react":"^16.8.6","react-dom":"^16.8.6","recursive-readdir":"^2.2.2","semver":"^6.3.0","serve-static":"^1.14.1","stringify-tree":"^1.0.2","swagger-ui-express":"^4.0.7","ts-essentials":"^3.0.2","yamljs":"^0.3.0","yargs":"^14.0.0","zip-a-folder":"0.0.9"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/sdm-local":"^1.2.1","@atomist/sdm-pack-build":"^1.0.6","@atomist/sdm-pack-docker":"2.0.3-master.20190903064256","@atomist/sdm-pack-fingerprint":"5.0.1-master.20190914002947","@atomist/sdm-pack-spring":"^2.0.1","@atomist/slack-messages":"^1.1.1","@types/d3":"^5.7.2","@types/mocha":"^5.2.7","@types/pg":"^7.11.1","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"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:pack","compile:ts":"tsc --project .","compile:pack":"webpack","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","db:create":"psql --command \"CREATE USER org_viz WITH SUPERUSER PASSWORD 'atomist'\" && createdb -O org_viz org_viz && psql -f ./ddl/create.ddl org_viz","db:delete":"psql --command \"DROP DATABASE org_viz\" --command \"DROP ROLE org_viz\""},"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/sdm-pack-aspect\n\nThis pack turns your [SDM](https://docs.atomist.com/developer/sdm/) into a tool for visualizing technology usage and [drift](https://blog.atomist.com/whats-lurking/) 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\nWhen you create an SDM with this pack, you can run it two ways:\n- locally, on your laptop. Trigger it to analyze code on your laptop or from GitHub, and then see the results in a simple web app at localhost.\n- connected to the Atomist service, triggering automatically, hooking into the Atomist web hook to make results available to your whole team, plus automation that helps you change the results.\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 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. 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## Try it\n\nTo try this out, we recommend grabbing the [org-visualizer](https://github.com/atomist/org-visualizer) project. It uses this library, and gives\nyou a place to add your own aspects.\n\n## Use this in your SDM\n\nIf you already have an Atomist SDM, add analysis & visualization of projects by bringing in this pack.\n\nFor an example, check [how org-visualizer does it](https://github.com/atomist/org-visualizer/blob/master/index.ts):\n\n```typescript\n sdm.addExtensionPacks(\n            aspectSupport({\n                aspects: aspects(),\n                scorers: scorers(),\n                taggers: taggers({}),\n                combinationTaggers: combinationTaggers({}),\n                undesirableUsageChecker: demoUndesirableUsageChecker,\n            }),\n        );\n```\n\nYou can include any number of aspects, scorers, taggers, etc. Many are defined in this pack.\nFor descriptions of these concepts, try [developer.md](docs/developer.md)\n\n### Database setup\n\nIn local mode, Atomist aspects are stored in a database. You can either configure your SDM with a `preProcessor: startEmbeddedPostgres`\nor run [Postgres](https://www.postgresql.org/) on your laptop.\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### 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### Analyze your repositories\n\nThe `analyze` command is part of this pack.\nIt works as at Atomist command, which runs through the `atomist` CLI.\n\n* install the CLI: `npm i -g @atomist/cli`\n* start your SDM: `atomist start --local`\n\n#### GitHub\n\nTo analyze repositories in a GitHub organization (or a GitHub user), run the following command:\n\n`atomist analyze github organization`\n\nEnter the GitHub owner name (e.g., 'atomist') at the prompt.\n\n_To access private repositories, ensure that your GitHub token is available to \nNode processes via a `GITHUB_TOKEN` environment variable._\n\nTo narrow the repositories, add `--search [substring-of-interesting-repos]`\n\nYou can also analyze repositories across GitHub using `atomist analyze github by query`.\nThe query string is one that would work on GitHub.com.\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\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 repositories --localDirectories /Users/rodjohnson/atomist/projects/spring-team/\n```\n\n#### General\n\n>Run `atomist analyze ...` with `--update true` flag to force updates to existing analyses. Do this if you have updated your analyzer code. (See Extending below.)  usage, as these directories\nare not transient and will not be deleted automatically.\n\n\n## Architecture\n\nThere are four architectural layers:\n\n1. **Analysis**. This is enabled by implementing Aspects. 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/customize/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":"715c5e884e9a5f3443488894c3d128e3a77d6e24","_id":"@atomist/sdm-pack-aspect@1.0.0-export-query.20200120015655","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-xWCgpvu7c6pOe+paV+EjOOkIN0wPSnoHwWfaqdyzjuyjb6i4nrPIBFCT8TCifX7XWIHaONteqGGkBEUbzApgAw==","shasum":"d9383bb1eb4d443aca5e081ee04207988048c00b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-aspect/-/sdm-pack-aspect-1.0.0-export-query.20200120015655.tgz","fileCount":391,"unpackedSize":5096144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJQlTCRA9TVsSAnZWagAAzCQP/0FW1jLVYJ5stLdhhqI0\nDUEMhqDX+3HIcRjFX0F45Jf+EzvDCSPWQcdwNy8vWoBvLnJ3G8cEbcJHi5zo\nrU/GSX9HDolXhrQHu5C0zXQMzCZUgqxY+kR9eO8U5dVJAHemZ/u+q48rpWuI\nEwyHk/8rMdCbI+15Qb0aP4w7oUuh4opMbdSFhxa3faIOi364EbvwQXxdLCFb\nPmaIEBSa+qFbCtJAlm+n44uVs19v9qZ/7BwQoAq1bUYUaMgNp2sJCon3Bcnv\najPgE+jSedOQfFtCTUcembtXsBZPynaIr2zuhB4GfkNH6+igKPoaqG+EIR2U\nutdR5fbP65qFp3iSG+cesQlE/GBMDFlIbxDT6I3wndMJyfhRlgqYp/TeWkmU\nVybTrg4ulkROukYwFJj9jWNFOae0bxE2KvnAusiERga3QlMG6rBbsWFq93X0\nX2j9nQxNOh/7uKLPfzQm7o9w2LW5OkPGMgsQbeQ5kcten04DoQBtL6kVz4zx\nWta2Yn+ZiVAoB6MXo5tIe/RjyPsctF3mwZQkkwgVIpdwQ3RwdJ5a7FxoYy8R\nplSTTo/ZCGJaXUQhuLHWY/V+s6cNerVD3+drvuHMcW5gqzmCFroh6EFvRzwH\nLmH9cnrn2iDtggkOAASBstCfZ892C2CONJgrtP0t+hiWXDN1bXlBYQ9TczfO\n4exF\r\n=LuJx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW+/T+lWNfG5mdQ1IZpz8kP/pzSDxt3OTnSmuSf0m0BQIgfO4G9E/KUlixOQ33f7kepzVA1Gx7Z0XOmiGsuYNp9sg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-aspect_1.0.0-export-query.20200120015655_1579485523476_0.5069615210286449"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-22T17:08:10.445Z","1.0.0-sdm-pack-aspect.20190822170455":"2019-08-22T17:08:10.926Z","modified":"2023-02-23T17:59:31.390Z","1.0.0-master.20190822204434":"2019-08-22T20:48:17.524Z","1.0.0-master.20190822205229":"2019-08-22T20:55:52.684Z","1.0.0-master.20190822205919":"2019-08-22T21:02:45.965Z","1.0.0-master.20190822211855":"2019-08-22T21:23:38.468Z","1.0.0-master.20190822212524":"2019-08-22T21:29:33.193Z","1.0.0-master.20190822233651":"2019-08-22T23:40:19.093Z","1.0.0-master.20190823011012":"2019-08-23T01:14:02.229Z","1.0.0-master.20190823015601":"2019-08-23T02:00:04.837Z","1.0.0-master.20190823021947":"2019-08-23T02:22:59.889Z","1.0.0-build.20190823041544":"2019-08-23T04:19:48.469Z","1.0.0-master.20190823084332":"2019-08-23T08:46:40.054Z","1.0.0-master.20190823101150":"2019-08-23T10:16:20.507Z","1.0.0-master.20190823103332":"2019-08-23T10:38:01.281Z","1.0.0-master.20190823110159":"2019-08-23T11:05:28.045Z","0.1.29-master.20190822002550":"2019-08-23T17:16:01.307Z","1.0.0-master.20190823180736":"2019-08-23T18:11:12.504Z","1.0.0-build.20190823193749":"2019-08-23T19:42:19.816Z","1.0.0-build.20190823211654":"2019-08-23T21:20:28.075Z","1.0.0-build.20190823220415":"2019-08-23T22:08:19.914Z","1.0.0-build.20190823224946":"2019-08-23T22:54:01.323Z","1.0.0-separateGitHubCommands.20190823225702":"2019-08-23T23:01:08.214Z","1.0.0-build.20190824020702":"2019-08-24T02:11:15.652Z","1.0.0-build.20190824025734":"2019-08-24T03:01:30.044Z","1.0.0-master.20190824173651":"2019-08-24T17:40:55.912Z","1.0.0-build.20190824225507":"2019-08-24T22:59:33.136Z","1.0.0-nortissej.analyzeForkedRepositories.20190824230043":"2019-08-24T23:04:57.694Z","1.0.0-build.20190825022308":"2019-08-25T02:27:23.653Z","1.0.0-build.20190825175944":"2019-08-25T18:04:04.797Z","1.0.0-build.20190825210928":"2019-08-25T21:12:55.909Z","1.0.0-master.20190825212924":"2019-08-25T21:32:38.044Z","1.0.0-master.20190825221206":"2019-08-25T22:15:51.887Z","1.0.0-master.20190826084818":"2019-08-26T08:51:38.328Z","1.0.0-master.20190826124534":"2019-08-26T12:49:08.547Z","1.0.0-master.20190826154649":"2019-08-26T15:51:31.452Z","1.0.0-master.20190826160021":"2019-08-26T16:05:08.627Z","1.0.0-master.20190826174847":"2019-08-26T17:52:57.365Z","1.0.0-master.20190826175144":"2019-08-26T17:56:37.095Z","1.0.0-master.20190826181119":"2019-08-26T18:14:43.399Z","1.0.0-master.20190826205249":"2019-08-26T20:57:10.287Z","1.0.0-trackAnalysis.20190827042830":"2019-08-27T04:32:26.622Z","1.0.0-master.20190827044125":"2019-08-27T04:44:45.030Z","1.0.0-master.20190827123312":"2019-08-27T12:37:56.482Z","1.0.0-master.20190827134420":"2019-08-27T13:48:14.221Z","1.0.0-master.20190827181726":"2019-08-27T18:22:02.821Z","1.0.0-master.20190827183836":"2019-08-27T18:42:11.200Z","1.0.0-master.20190827200805":"2019-08-27T20:12:12.679Z","1.0.0-master.20190827220109":"2019-08-27T22:04:58.395Z","1.0.0-master.20190827222920":"2019-08-27T22:33:51.297Z","1.0.0-master.20190828011722":"2019-08-28T01:22:59.681Z","1.0.0-nortissej.pageLoadError.20190828012824":"2019-08-28T01:33:27.581Z","1.0.0-master.20190828014024":"2019-08-28T01:46:12.983Z","1.0.0-nortissej.pageLoadError.20190828020117":"2019-08-28T02:06:59.539Z","1.0.0-master.20190828163003":"2019-08-28T16:35:57.754Z","1.0.0-master.20190828164842":"2019-08-28T16:54:22.692Z","1.0.0-master.20190828175951":"2019-08-28T18:04:50.219Z","1.0.0-master.20190828194556":"2019-08-28T19:49:59.427Z","1.0.0-master.20190828204032":"2019-08-28T20:45:31.765Z","1.0.0-master.20190828214118":"2019-08-28T21:49:21.843Z","1.0.0-master.20190828220622":"2019-08-28T22:11:54.074Z","1.0.0-master.20190828223407":"2019-08-28T22:39:47.953Z","1.0.0-master.20190829001823":"2019-08-29T00:23:30.865Z","1.0.0-master.20190829002434":"2019-08-29T00:29:15.373Z","1.0.0-master.20190829071035":"2019-08-29T07:15:05.747Z","1.0.0-repos-on-dirft.20190829082931":"2019-08-29T08:33:52.392Z","1.0.0-presence2.20190829184457":"2019-08-29T18:48:12.771Z","1.0.0-master.20190829185621":"2019-08-29T19:01:08.889Z","1.0.0-score-fp.20190829214435":"2019-08-29T21:49:26.023Z","1.0.0-score-fp.20190829225050":"2019-08-29T22:55:04.265Z","1.0.0-tag-fp.20190830002356":"2019-08-30T00:28:25.467Z","1.0.0-nortissej.analysis-page-tweaks.20190830002740":"2019-08-30T00:31:42.661Z","1.0.0-nortissej.analysis-page-tweaks.20190830003630":"2019-08-30T00:41:37.117Z","1.0.0-master.20190830022924":"2019-08-30T02:33:22.372Z","1.0.0-nortissej.analysis-page-tweaks.20190830023849":"2019-08-30T02:43:03.249Z","1.0.0-master.20190830024410":"2019-08-30T02:48:32.365Z","1.0.0-dynamic-aspects.20190830084921":"2019-08-30T08:54:30.900Z","1.0.0-dynamic-aspects.20190830103331":"2019-08-30T10:37:12.467Z","1.0.0-dynamic-aspects.20190830104250":"2019-08-30T10:47:00.883Z","1.0.0-master.20190830193631":"2019-08-30T19:40:36.741Z","1.0.0-master.20190830202238":"2019-08-30T20:27:19.804Z","1.0.0-dynamic-aspects.20190830202243":"2019-08-30T20:27:39.969Z","1.0.0-nortissej.fewerScoredAspects.20190830202329":"2019-08-30T20:29:44.212Z","1.0.0-master.20190830203711":"2019-08-30T20:42:27.865Z","1.0.0-master.20190830205836":"2019-08-30T21:03:17.564Z","1.0.0-master.20190830213102":"2019-08-30T21:35:56.486Z","1.0.0-atomist.t29e48p34.typescript-version.master.20190830213310":"2019-08-30T21:37:26.072Z","1.0.0-dynamic-aspects.20190830213420":"2019-08-30T21:38:34.394Z","1.0.0-master.20190830215314":"2019-08-30T21:57:07.060Z","1.0.0-dynamic-aspects.20190830221406":"2019-08-30T22:18:21.250Z","1.0.0-dynamic-aspects.20190830232758":"2019-08-30T23:32:03.199Z","1.0.0-dynamic-aspects.20190830234648":"2019-08-30T23:51:03.027Z","1.0.0-aspectErrors.20190830235323":"2019-08-30T23:57:41.792Z","1.0.0-aspectErrors.20190830235920":"2019-08-31T00:03:39.401Z","1.0.0-master.20190831000647":"2019-08-31T00:10:42.819Z","1.0.0-aspectErrors.20190831011035":"2019-08-31T01:14:52.272Z","1.0.0-dynamic-aspects.20190831060327":"2019-08-31T06:07:24.765Z","1.0.0-master.20190831204626":"2019-08-31T20:50:21.153Z","1.0.0-master.20190901191108":"2019-09-01T19:15:57.843Z","1.0.0-aspectErrors.20190901211149":"2019-09-01T21:16:36.647Z","1.0.0-dynamic-aspects.20190902184809":"2019-09-02T18:52:46.530Z","1.0.0-dynamic-aspects.20190902191235":"2019-09-02T19:16:57.901Z","1.0.0-dynamic-aspects.20190903063454":"2019-09-03T06:39:14.121Z","1.0.0-dynamic-aspects.20190903064840":"2019-09-03T06:53:35.601Z","1.0.0-dynamic-aspects.20190903065331":"2019-09-03T06:58:07.273Z","1.0.0-dynamic-aspects.20190903070215":"2019-09-03T07:07:37.315Z","1.0.0-master.20190903071152":"2019-09-03T07:17:05.860Z","1.0.0-master.20190903071348":"2019-09-03T07:18:25.573Z","1.0.0-master.20190903125234":"2019-09-03T12:56:35.470Z","1.0.0-master.20190903202714":"2019-09-03T20:32:56.484Z","1.0.0-aspectErrors.20190904181849":"2019-09-04T18:23:49.252Z","1.0.0-master.20190904204232":"2019-09-04T20:47:16.624Z","1.0.0-nortissej.returnAfter401.20190904233404":"2019-09-04T23:39:19.571Z","1.0.0-master.20190904235655":"2019-09-05T00:02:27.682Z","1.0.0-master.20190905090918":"2019-09-05T09:15:17.587Z","1.0.0-master.20190905094333":"2019-09-05T09:49:26.188Z","1.0.0-master.20190905095751":"2019-09-05T10:04:57.040Z","1.0.0-master.20190905203158":"2019-09-05T20:39:28.377Z","1.0.0-master.20190905215324":"2019-09-05T22:00:36.288Z","1.0.0-nortissej.defense.20190905230037":"2019-09-05T23:06:19.341Z","1.0.0-master.20190905231019":"2019-09-05T23:15:16.870Z","1.0.0-nortissej.tag-reasons.20190905233656":"2019-09-05T23:43:19.256Z","1.0.0-nortissej.tag-reasons.20190906004853":"2019-09-06T00:54:13.593Z","1.0.0-nortissej.tag-reasons.20190906181549":"2019-09-06T18:20:03.217Z","1.0.0-fingerprinting-job.20190907070844":"2019-09-07T07:14:01.769Z","1.0.0-master.20190907140422":"2019-09-07T14:09:18.053Z","1.0.0-master.20190909080143":"2019-09-09T08:06:10.996Z","1.0.0-master.20190909105225":"2019-09-09T10:56:32.283Z","1.0.0-master.20190909133002":"2019-09-09T13:35:24.321Z","1.0.0-provideFilesChanged.20190909144606":"2019-09-09T14:51:26.377Z","1.0.0-provideFilesChanged.20190909202954":"2019-09-09T20:36:10.293Z","1.0.0-atomist.a260p86nh.sdm-deps.master.20190909203215":"2019-09-09T20:37:06.189Z","1.0.0-provideFilesChanged.20190909204809":"2019-09-09T20:52:54.927Z","1.0.0-provideFilesChanged.20190909210529":"2019-09-09T21:09:46.068Z","1.0.0-provideFilesChanged.20190909224312":"2019-09-09T22:47:24.893Z","1.0.0-master.20190910082901":"2019-09-10T08:36:06.588Z","1.0.0-master.20190910200637":"2019-09-10T20:11:36.662Z","1.0.0-master.20190914014048":"2019-09-14T01:44:15.883Z","1.0.0-atomist.t29e48p34.npm-project-deps.master.20190914014318":"2019-09-14T01:48:10.643Z","1.0.0-master.20190914021104":"2019-09-14T02:15:45.546Z","1.0.0-master.20190914164934":"2019-09-14T16:52:46.482Z","1.0.0-master.20190914173344":"2019-09-14T17:38:33.528Z","1.0.0-master.20190914213135":"2019-09-14T21:36:34.732Z","1.0.0-master.20190914223012":"2019-09-14T22:34:26.805Z","1.0.0-master.20190914223244":"2019-09-14T22:39:16.069Z","1.0.0-master.20190914231456":"2019-09-14T23:21:14.350Z","1.0.0-master.20190914235530":"2019-09-15T00:00:22.523Z","1.0.0-master.20190915175546":"2019-09-15T18:02:02.286Z","1.0.0-master.20190915181302":"2019-09-15T18:19:00.987Z","1.0.0-atomist.t29e48p34.npm-project-deps.master.20190915182055":"2019-09-15T18:24:52.404Z","1.0.0-master.20190915182939":"2019-09-15T18:34:47.900Z","1.0.0-master.20190916180041":"2019-09-16T18:06:07.428Z","1.0.0-nortissej.fp-persist-error.20190916213653":"2019-09-16T21:41:35.506Z","1.0.0-score-org.20190916214428":"2019-09-16T21:49:01.561Z","1.0.0-master.20190916232559":"2019-09-16T23:30:17.469Z","1.0.0-master.20190917000018":"2019-09-17T00:05:45.210Z","1.0.0-master.20190917000953":"2019-09-17T00:16:03.933Z","1.0.0-nortissej.tag-reasons.20190917043849":"2019-09-17T04:44:16.099Z","1.0.0-master.20190917044559":"2019-09-17T04:49:36.144Z","1.0.0-nortissej.tag-reasons.20190917044950":"2019-09-17T04:53:45.914Z","1.0.0-nortissej.fix-pili.20190917050820":"2019-09-17T05:13:54.732Z","1.0.0-master.20190917055208":"2019-09-17T05:57:09.005Z","1.0.0-master.20190917171204":"2019-09-17T17:17:41.311Z","1.0.0-score-org.20190917171948":"2019-09-17T17:25:14.653Z","1.0.0-score-org.20190917172953":"2019-09-17T17:35:08.736Z","1.0.0-score-org.20190917185539":"2019-09-17T19:01:24.696Z","1.0.0-master.20190917202412":"2019-09-17T20:29:10.239Z","1.0.0-master.20190917214713":"2019-09-17T21:51:37.438Z","1.0.0-master.20190917215509":"2019-09-17T22:00:22.241Z","1.0.0-master.20190917224254":"2019-09-17T22:46:39.863Z","1.0.0-master.20190918181357":"2019-09-18T18:18:18.923Z","1.0.0-master.20190918195509":"2019-09-18T19:59:22.652Z","1.0.0-master.20190918205034":"2019-09-18T20:55:58.294Z","1.0.0-nortissej.keep-ts-src.20190918211743":"2019-09-18T21:21:42.210Z","1.0.0-master.20190918223239":"2019-09-18T22:37:48.241Z","1.0.0-score-org.20190918224408":"2019-09-18T22:48:33.026Z","1.0.0-master.20190918225115":"2019-09-18T22:56:28.857Z","1.0.0-master.20190918230538":"2019-09-18T23:11:38.277Z","1.0.0-nortissej.keep-ts-src.20190918230916":"2019-09-18T23:14:11.768Z","1.0.0-nortissej.keep-ts-src.20190918235446":"2019-09-19T00:01:57.618Z","1.0.0-nortissej.keep-ts-src.20190919004501":"2019-09-19T00:50:06.371Z","1.0.0-nortissej.keep-ts-src.20190919023509":"2019-09-19T02:41:25.809Z","1.0.0-master.20190919164640":"2019-09-19T16:51:24.498Z","1.0.0-master.20190919181644":"2019-09-19T18:20:11.702Z","1.0.0-nortissej.count-visible-aspects.20190919182204":"2019-09-19T18:26:36.649Z","1.0.0-master.20190919183940":"2019-09-19T18:44:47.077Z","1.0.0-master.20190919223213":"2019-09-19T22:38:11.617Z","1.0.0-master.20190920193050":"2019-09-20T19:34:37.310Z","1.0.0-master.20190920213051":"2019-09-20T21:34:15.860Z","1.0.0-master.20190920223737":"2019-09-20T22:40:42.941Z","1.0.0-master.20190925060605":"2019-09-25T06:08:05.924Z","1.0.0-repos-on-dirft.20190926030011":"2019-09-26T03:04:25.155Z","1.0.0-master.20190926031150":"2019-09-26T03:14:50.032Z","1.0.0-master.20190926221623":"2019-09-26T22:18:49.039Z","1.0.0-score-path.20190927230823":"2019-09-27T23:11:00.673Z","1.0.0-score-path.20190927233201":"2019-09-27T23:34:29.536Z","1.0.0-score-path.20190928012338":"2019-09-28T01:25:57.125Z","1.0.0-score-path.20190928013347":"2019-09-28T01:36:04.285Z","1.0.0-score-path.20190928041004":"2019-09-28T04:12:25.473Z","1.0.0-score-path.20190928042009":"2019-09-28T04:22:35.764Z","1.0.0-score-path.20190928044303":"2019-09-28T04:45:33.849Z","1.0.0-score-path.20190928045628":"2019-09-28T04:58:58.337Z","1.0.0-score-path.20190928050054":"2019-09-28T05:03:16.094Z","1.0.0-score-path.20190928055347":"2019-09-28T05:56:07.921Z","1.0.0-sp2.20190928060140":"2019-09-28T06:03:48.115Z","1.0.0-sp2.20190928061036":"2019-09-28T06:12:56.067Z","1.0.0-sp2.20190929020229":"2019-09-29T02:04:45.197Z","1.0.0-sp2.20190929022112":"2019-09-29T02:23:30.473Z","1.0.0-sp2.20190929062452":"2019-09-29T06:27:19.000Z","1.0.0-sp2.20190929064117":"2019-09-29T06:43:33.131Z","1.0.0-sp2.20190929070348":"2019-09-29T07:06:19.746Z","1.0.0-sp2.20190929085250":"2019-09-29T08:55:05.634Z","1.0.0-sp2.20190929234048":"2019-09-29T23:43:01.976Z","1.0.0-sp2.20190930072647":"2019-09-30T07:28:55.279Z","1.0.0-master.20190930080947":"2019-09-30T08:12:06.886Z","1.0.0-sp2.20190930121406":"2019-09-30T12:16:21.101Z","1.0.0-master.20190930134724":"2019-09-30T13:49:49.401Z","1.0.0-master.20191001032651":"2019-10-01T03:29:01.150Z","1.0.0-master.20191001035431":"2019-10-01T03:56:59.776Z","1.0.0-master.20191001061600":"2019-10-01T06:18:20.684Z","1.0.0-master.20191002045649":"2019-10-02T04:59:15.828Z","1.0.0-master.20191002065854":"2019-10-02T07:01:19.497Z","1.0.0-master.20191002071515":"2019-10-02T07:17:50.575Z","1.0.0-master.20191002080933":"2019-10-02T08:11:38.776Z","1.0.0-master.20191002105536":"2019-10-02T10:57:46.194Z","1.0.0-master.20191002112632":"2019-10-02T11:28:46.993Z","1.0.0-vp-no-entropy.20191002194948":"2019-10-02T19:52:59.963Z","1.0.0-vp-no-entropy.20191002231318":"2019-10-02T23:15:54.543Z","1.0.0-vp-no-entropy.20191003010801":"2019-10-03T01:10:25.040Z","1.0.0-master.20191003013515":"2019-10-03T01:37:41.743Z","1.0.0-master.20191003033838":"2019-10-03T03:40:54.197Z","1.0.0-master.20191003092733":"2019-10-03T09:29:42.893Z","1.0.0-master.20191003094539":"2019-10-03T09:47:46.421Z","1.0.0-master.20191003105649":"2019-10-03T10:59:06.988Z","1.0.0-report-virtual-projects.20191003171432":"2019-10-03T17:17:03.786Z","1.0.0-report-virtual-projects.20191003174311":"2019-10-03T17:45:43.103Z","1.0.0-report-virtual-projects.20191003175934":"2019-10-03T18:01:50.160Z","1.0.0-master.20191003220032":"2019-10-03T22:03:40.044Z","1.0.0-master.20191003223859":"2019-10-03T22:41:26.690Z","1.0.0-report-virtual-projects.20191004032030":"2019-10-04T03:22:38.519Z","1.0.0-code-metrics-move.20191004142934":"2019-10-04T14:31:58.095Z","1.0.0-master.20191005000328":"2019-10-05T00:05:36.327Z","1.0.0-master.20191005000918":"2019-10-05T00:11:51.460Z","1.0.0-master.20191005030948":"2019-10-05T03:11:51.331Z","1.0.0-master.20191006100726":"2019-10-06T10:10:04.273Z","1.0.0-master.20191006102303":"2019-10-06T10:25:23.367Z","1.0.0-master.20191006103833":"2019-10-06T10:40:53.242Z","1.0.0-master.20191008155114":"2019-10-08T15:54:31.932Z","1.0.0-master.20191008192343":"2019-10-08T19:25:51.217Z","1.0.0-fp-workspace-migration.20191017033327":"2019-10-17T03:35:10.856Z","1.0.0-fp-workspace-migration.20191017035849":"2019-10-17T04:00:28.635Z","1.0.0-fp-workspace-migration.20191017193522":"2019-10-17T19:37:44.288Z","1.0.0-master.20191017204338":"2019-10-17T20:46:14.029Z","1.0.0-fp-workspace-migration.20191018183627":"2019-10-18T18:39:54.869Z","1.0.0-fp-workspace-migration.20191018192229":"2019-10-18T19:25:46.558Z","1.0.0-fp-workspace-migration.20191021163212":"2019-10-21T16:35:09.033Z","1.0.0-fp-workspace-migration.20191021203418":"2019-10-21T20:37:05.483Z","1.0.0-fp-workspace-migration.20191021220954":"2019-10-21T22:13:52.658Z","1.0.0-fp-workspace-migration.20191021222457":"2019-10-21T22:27:28.747Z","1.0.0-fp-workspace-migration.20191021224326":"2019-10-21T22:46:12.262Z","1.0.0-fp-workspace-migration.20191021230342":"2019-10-21T23:06:25.319Z","1.0.0-fp-workspace-migration.20191022150755":"2019-10-22T15:09:51.083Z","1.0.0-fp-workspace-migration.20191022175051":"2019-10-22T17:54:44.980Z","1.0.0-fp-workspace-migration.20191022203643":"2019-10-22T20:39:51.376Z","1.0.0-fp-workspace-migration.20191022233614":"2019-10-22T23:40:01.666Z","1.0.0-fp-workspace-migration.20191023014743":"2019-10-23T01:51:14.250Z","1.0.0-fp-workspace-migration.20191023015132":"2019-10-23T01:53:54.783Z","1.0.0-fp-workspace-migration.20191023020411":"2019-10-23T02:06:29.965Z","1.0.0-fp-workspace-migration.20191023031527":"2019-10-23T03:19:38.987Z","1.0.0-atomist.t29e48p34.typescript-version.fp-workspace-migration.20191023043130":"2019-10-23T04:33:24.315Z","1.0.0-fp-workspace-migration.20191023043557":"2019-10-23T04:37:57.170Z","1.0.0-master.20191030192334":"2019-10-30T19:26:07.286Z","1.0.0-master.20191031213835":"2019-10-31T21:40:57.537Z","1.0.0-fp-workspace-migration.20191102182214":"2019-11-02T18:23:54.220Z","1.0.0-fp-workspace-migration.20191105005256":"2019-11-05T00:55:05.402Z","1.0.0-fp-workspace-migration.20191105011406":"2019-11-05T01:16:07.832Z","1.0.0-dont-look-for-empty-sha.20191106023838":"2019-11-06T02:42:05.264Z","1.0.0-fp-workspace-migration.20191107172131":"2019-11-07T17:23:54.691Z","1.0.0-fp-workspace-migration.20191107192749":"2019-11-07T19:31:06.355Z","1.0.0-fp-workspace-migration.20191107195757":"2019-11-07T20:01:04.873Z","1.0.0-master.20191114212211":"2019-11-14T21:26:28.570Z","1.0.0-export-query.20200120013716":"2020-01-20T01:39:10.145Z","1.0.0-export-query.20200120014853":"2020-01-20T01:51:06.034Z","1.0.0-export-query.20200120015655":"2020-01-20T01:58:43.691Z"},"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":"an Atomist SDM Extension Pack for visualizing drift across an organization","homepage":"https://github.com/atomist/sdm-pack-aspect#readme","keywords":["atomist","automation","sdm","aspect"],"repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-aspect.git"},"author":{"name":"Atomist Inc."},"bugs":{"url":"https://github.com/atomist/sdm-pack-aspect/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}