{"_id":"@alexandravaldez/mdlinks","name":"@alexandravaldez/mdlinks","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alexandravaldez/mdlinks","type":"module","version":"1.0.0","engines":{"node":">=16.x"},"scripts":{"check-links":"index.js","test":"jest --verbose --coverage","start":"nodemon index.js"},"bootcamp":{"createdAt":"2023-03-02T14:34:23.772Z","version":"5.6.0","commit":"ffa75c8b2bede153844195479abeff01f3e34227"},"devDependencies":{"@babel/core":"^7.21.8","@babel/preset-env":"^7.21.5","babel":"^6.23.0","jest":"^29.5.0","linkinator":"^4.1.2","nodemon":"^2.0.22"},"description":"Tool created with Node.js, that reads and analyzes files in Markdown, format to verify the contained links and report some statistics.","main":"index.js","directories":{"test":"test"},"dependencies":{"agent-base":"^6.0.2","ansi-styles":"^3.2.1","arrify":"^1.0.1","balanced-match":"^1.0.2","brace-expansion":"^2.0.1","camelcase":"^7.0.1","camelcase-keys":"^8.0.2","chalk":"^4.1.1","color-convert":"^1.9.3","color-name":"^1.1.3","debug":"^4.3.4","decamelize":"^6.0.0","decamelize-keys":"^1.1.1","dom-serializer":"^2.0.0","domelementtype":"^2.3.0","domhandler":"^5.0.3","domutils":"^3.0.1","entities":"^4.5.0","error-ex":"^1.3.2","escape-html":"^1.0.3","escape-string-regexp":"^1.0.5","extend":"^3.0.2","find-up":"^6.3.0","fs.realpath":"^1.0.0","function-bind":"^1.1.1","gaxios":"^5.1.0","glob":"^8.1.0","hard-rejection":"^2.1.0","has":"^1.0.3","has-flag":"^3.0.0","hosted-git-info":"^5.2.1","htmlparser2":"^8.0.2","https-proxy-agent":"^5.0.1","indent-string":"^5.0.0","inflight":"^1.0.6","inherits":"^2.0.4","is-arrayish":"^0.2.1","is-core-module":"^2.12.0","is-plain-obj":"^1.1.0","is-stream":"^2.0.1","js-tokens":"^4.0.0","json-parse-even-better-errors":"^2.3.1","kind-of":"^6.0.3","lines-and-columns":"^1.2.4","locate-path":"^7.2.0","lru-cache":"^7.18.3","map-obj":"^4.3.0","marked":"^4.3.0","meow":"^11.0.0","mime":"^3.0.0","min-indent":"^1.0.1","minimatch":"^5.1.6","minimist-options":"^4.1.0","ms":"^2.1.2","node-fetch":"^2.6.9","normalize-package-data":"^4.0.1","once":"^1.4.0","p-limit":"^4.0.0","p-locate":"^6.0.0","parse-json":"^5.2.0","path-exists":"^5.0.0","quick-lru":"^6.1.1","read-pkg":"^7.1.0","read-pkg-up":"^9.1.0","redent":"^4.0.0","semver":"^7.5.0","server-destroy":"^1.0.1","spdx-correct":"^3.2.0","spdx-exceptions":"^2.3.0","spdx-expression-parse":"^3.0.1","spdx-license-ids":"^3.0.13","srcset":"^5.0.0","strip-indent":"^4.0.0","supports-color":"^5.5.0","tr46":"^0.0.3","trim-newlines":"^4.1.1","type-fest":"^3.9.0","validate-npm-package-license":"^3.0.4","webidl-conversions":"^3.0.1","whatwg-url":"^5.0.0","wrappy":"^1.0.2","yallist":"^4.0.0","yargs-parser":"^21.1.1","yocto-queue":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/AlexandraValdez/md-links.git"},"author":{"name":"Alexandra Valdez"},"license":"ISC","bin":{"mdlinks":"cli.js"},"bugs":{"url":"https://github.com/AlexandraValdez/md-links/issues"},"publishConfig":{"access":"public"},"homepage":"https://github.com/AlexandraValdez/md-links#readme","gitHead":"3dbb83683859546e32a6a446dc3460804af4af9f","_id":"@alexandravaldez/mdlinks@1.0.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-AyOg/pZMzq05tbykJ3W+QoeabKqnNqgGyBcxDkeqd6URinB7OQNHH/+D1UgemCHja5MyMKPOYA5p+FpdZfAadg==","shasum":"e07a8c8570db0f26fbba2527ab740a8be7e3ea84","tarball":"https://registry.npmjs.org/@alexandravaldez/mdlinks/-/mdlinks-1.0.0.tgz","fileCount":20,"unpackedSize":241526,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCblrgoh1CuYbR/K47YXX5TfFxksnQgDa2UKeZ+HbfTjAIhAOpqP/FbxLKVGl3uTdJ6y4h02yMEv3xlwqRvyT73M5XB"}]},"_npmUser":{"name":"alexandravaldez","email":"alexandravs311@gmail.com"},"maintainers":[{"name":"alexandravaldez","email":"alexandravs311@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdlinks_1.0.0_1685034370138_0.9418984863393696"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-25T17:06:10.079Z","1.0.0":"2023-05-25T17:06:10.398Z","modified":"2023-05-25T17:06:10.602Z"},"maintainers":[{"name":"alexandravaldez","email":"alexandravs311@gmail.com"}],"description":"Tool created with Node.js, that reads and analyzes files in Markdown, format to verify the contained links and report some statistics.","homepage":"https://github.com/AlexandraValdez/md-links#readme","repository":{"type":"git","url":"git+https://github.com/AlexandraValdez/md-links.git"},"author":{"name":"Alexandra Valdez"},"bugs":{"url":"https://github.com/AlexandraValdez/md-links/issues"},"license":"ISC","readme":"# Markdown Links\r\n\r\n## Content\r\n\r\n<table align=\"right\">\r\n <tr><td> <a href=\"README.md\"><img src=\"./images/usa.png\" height=\"13\"> English</a></td></tr>\r\n <tr><td><a href=\"README_es.md\"><img style=\"margin: 0px 0px 2px 0px\" src=\"./images/esp.png\" height=\"8.5\"> Español</a></td></tr>\r\n</td></tr>\r\n</table>\r\n\r\n* [1. Summary](#1-summary)\r\n* [2. General aspects](#2-general-aspects)\r\n* [3. Install](#3-install)\r\n* [4. Usage](#4-usage)\r\n* [5. Flowchart](#5-flowchart)\r\n\r\n***\r\n\r\n\r\n## 1. Summary\r\n\r\nTool created with [Node.js](https://nodejs.org/), that reads and analyzes files in `Markdown`, format to verify the contained links and report\r\nsome statistics.\r\n\r\n## 2. General aspects\r\n\r\n* The estimated time range to complete the project was 4 Sprints.\r\n\r\n* The **library** y el **executable script** (command-line tool -\r\n  CLI) are implemented in JavaScript and executed with Node.js.\r\n  \r\n * [Chalk](https://www.npmjs.com/package/chalk) was used to customize\r\n the style of your application in the terminal.\r\n\r\n* ES Modules `(import/export)`,  were used for this project, instead of CommonJS `(require/module.exports)`.\r\n\r\n## 3. Install \r\n\r\n``` set up\r\nnpm install markdown-links-analyzer\r\n```\r\n\r\n## 4. Usage \r\n### JavaScript API\r\n\r\n#### `mdLinks(path, options)`\r\n\r\n##### Argumentos\r\n\r\n* `path`: **absolute** o **relative** path to the **file** or **folder**.\r\nIf the provided path is relative, it should be resolved relative to the directory\r\nfrom which Node is invoked - _current working directory_.\r\n* `options`: An object with **only** the following property:\r\n  - `validate`: A boolean that determines whether to validate the\r\n    found links.\r\n\r\n### CLI (Command Line Interface)\r\n\r\nThe executable of our application should be able to be executed through the\r\n**terminal** in the following way:\r\n\r\n`md-links <path-to-file> [options]`\r\n\r\nFor example:\r\n\r\n```sh\r\n$ md-links ./some/example.md\r\n./some/example.md http://algo.com/2/3/ Link a algo\r\n./some/example.md https://otra-cosa.net/algun-doc.html algún doc\r\n./some/example.md http://google.com/ Google\r\n```\r\n\r\nThe default behavior should not validate if the URLs respond ok or not,\r\nIt should only identify the Markdown file (based on the provided\r\npath), analyze the Markdown file, and print the encountered links\r\nalong with the file path where they appear and the text inside the link (truncated to 50 characters).\r\n\r\n#### Options\r\n\r\n##### `--help`\r\n\r\nIf we pass the `--help` option, the output will show a help message that explains the usage and available options of the tool. It would provide instructions on how to run the tool. \r\n\r\nFor example:\r\n\r\n```sh\r\n$ md-links ./some/example.md --help\r\nUsage: mdLinks [path] [options]\r\n--validate   Validate the status of each link.\r\n--stats      Display statistics about the links.\r\n--help       Display help information.\r\n```\r\n\r\n##### `--validate`\r\n\r\nIf the `--validate`, option is passed, the module makes an HTTP request to\r\ncheck if the link works or not. If the link results in a redirection to a\r\nURL that responds ok, then we consider the link as ok.\r\n\r\nFor example:\r\n\r\n```sh\r\n$ md-links ./some/example.md --validate\r\n./some/example.md http://algo.com/2/3/ ok 200 Link a algo\r\n./some/example.md https://otra-cosa.net/algun-doc.html fail 404 algún doc\r\n./some/example.md http://google.com/ ok 301 Google\r\n```\r\n\r\nWe can see that the output in this case includes the word `ok` or `fail` after the\r\nURL, as well as the status of the HTTP response to that\r\nURL.\r\n\r\n##### `--stats`\r\n\r\nIf we pass the `--stats` option, the output will be a text with basic statistics\r\nabout the links.\r\n\r\n```sh\r\n$ md-links ./some/example.md --stats\r\nTotal: 3\r\nUnique: 3\r\n```\r\n\r\nWe can also combine `--stats` and `--validate` to obtain statistics that require the validation results.\r\n\r\n```sh\r\n$ md-links ./some/example.md --stats --validate\r\nTotal: 3\r\nUnique: 3\r\nBroken: 1\r\n```\r\n\r\n## 5. Flowchart\r\n\r\n![FlowChart](./images/flowc.png)\r\n","readmeFilename":"README.md"}