{"name":"dockerfile-ast","version":"0.5.0","keywords":["ast","abstract","docker","dockerfile","moby","parse","parser","syntax","tree"],"author":{"name":"Remy Suen"},"license":"MIT","_id":"dockerfile-ast@0.5.0","maintainers":[{"name":"rcjsuen","email":"remy.suen@gmail.com"}],"homepage":"https://github.com/rcjsuen/dockerfile-ast#readme","bugs":{"url":"https://github.com/rcjsuen/dockerfile-ast/"},"dist":{"shasum":"fa55ed0dc9ac4d8465c2647ec4dcb168d37aa22d","tarball":"http://registry-npm.ywwl.com/dockerfile-ast/download/dockerfile-ast-0.5.0.tgz","fileCount":76,"integrity":"sha512-YsRrWww6mKRS1HK32gbherPlgfvwS593ZeDegb5glNCBJgByICAYZCP5F+njY6TSB0eiPdFgCU9RkuO516mLFQ==","signatures":[{"sig":"MEYCIQDH3e8xLz0Q+lj5bSuxAW99NJiP4xeFS1p2NpdHyICd/gIhAKb/kD6luVu+iF9x8Mj4k8+ZQs3913v+z42WZi5/H6Cz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi65yvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjLxAAg5jNH5gVtwVbt8PHNodbL0rRdEA8/NC9T7gqS/XrP01PvTCX\r\nKIc8ZBUl4vyKQQmm4J6h+aQzAelJbIjze7NSvW1CwMYjrf8zvGDd7QiCuraX\r\nvEgN7EzEjwBsegqKeXaGITlmcZbhgZLH8MdyILRWygcKWySgl/AM8TnkGcLi\r\n1Dz93ec3A70UO0qrO9k97Ar07Hm3M4UWpB7AeCVduwZij3SwtEDSmMSyp020\r\nqupz53gyZJK/uY7nqyDzWxeoVqam0oO96l3xmvQpckSwXeX9BkSNGmEdvn1c\r\nhSGgr2qu6HtwCu9HX2Fx24PayGI3lHlCKScSdUnhcBr7liWfiEfJuW3HFJtW\r\n+5F/hpgjPa2j4uCl0O5TeD64spff/Z4wuYWwuseSXxCzDcN01UuuimWyAA2w\r\nRJK8q+HxuJmn38wrO30Cka9WTvBhXwbs7goqgzH3M13ta54SZ1+6tQZKSyPb\r\nC77hJBj/stvTzVnsYsEqEStrJKDZsVxsnz7RtRZICtWH6qXYIm8F0AWGEBjk\r\nzSeCy7wLfC59BfO0fADaL7shS4U0MI9qsBLWdw9ffcL99IGNVp7OtO8wIux8\r\nRcBKOyQw0T0jlrVuk+PEuOebAy0i84BWTeF4VgjtbMLmkcyiy0No5O2qUT//\r\n09JMkgQzYyoFIgIp1aFHH0IKaGqzAejM8ds=\r\n=6896\r\n-----END PGP SIGNATURE-----\r\n","size":38281,"noattachment":false,"key":"/dockerfile-ast/-/dockerfile-ast-0.5.0.tgz"},"main":"lib/main.js","engines":{"node":"*"},"gitHead":"a93815f37ca05aa3ec62b47647f8f0451432519e","scripts":{"nyc":"nyc mocha out/test out/test/instructions","test":"mocha out/test out/test/instructions","build":"tsc -p .","watch":"tsc --watch -p .","nyc-ci":"nyc --reporter=lcov mocha out/test out/test/instructions","prepublish":"tsc -p ./src"},"typings":"./lib/main","_npmUser":{"name":"rcjsuen","email":"remy.suen@gmail.com"},"repository":{"url":"git+https://github.com/rcjsuen/dockerfile-ast.git","type":"git"},"_npmVersion":"8.1.0","description":"Parse a Dockerfile into an array of instructions and comments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"vscode-languageserver-types":"^3.17.0-next.3","vscode-languageserver-textdocument":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","mocha":"^9.1.3","typescript":"~4.5.3","@types/node":"^6.0.52","@types/mocha":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/dockerfile-ast_0.5.0_1659608239039_0.18658153841526004","host":"s3://npm-registry-packages"},"readme":"# Dockerfile AST\n\n![Node.js Builds](https://github.com/rcjsuen/dockerfile-ast/workflows/Node.js%20Builds/badge.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/rcjsuen/dockerfile-ast/badge.svg?branch=master)](https://coveralls.io/github/rcjsuen/dockerfile-ast?branch=master) [![Build Dependencies](https://david-dm.org/rcjsuen/dockerfile-ast.svg)](https://david-dm.org/rcjsuen/dockerfile-ast) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm downloads per week](https://img.shields.io/npm/dw/dockerfile-ast.svg)](https://www.npmjs.com/package/dockerfile-ast)\n\nThe `dockerfile-ast` NPM module is a Dockerfile parser written in TypeScript.\nThe module provides full programmatic access to a parsed Dockerfile.\n\nSupported features:\n- escaped newline detection\n  - `escape` parser directive considered when parsing\n- comments preserved\n  - inlined comments in multiline instructions preserved\n- continuous empty newlines honoured (albeit discouraged as of Docker CE 17.09)\n- `ARG` and `ENV` variable lookup and resolution\n\nUnsupported:\n- `\\r` as a a line delimiter\n  - only `\\r\\n` and `\\n` are supported as being line delimiters\n  - if a `\\r` is detected the parser assumes that it is followed by a `\\n`\n\n## Development Instructions\n\nIf you wish to build and compile this project, you must first install [Node.js](https://nodejs.org/en/download/) if you have not already done so.\nAfter you have installed Node.js and cloned the repository with Git, you may now proceed to build and compile the project with the following commands:\n\n```\nnpm install\nnpm run build\nnpm test\n```\n\nIf you are planning to change the code, use `npm run watch` to get the\nTypeScript files transpiled on-the-fly as they are modified.\n\n## Installation Instructions\n\nTo add this library as a dependency to your project, please add `dockerfile-ast` as a dependency in your package.json file.\n\n## Using this Module\n\n```TypeScript\nimport { DockerfileParser } from 'dockerfile-ast';\n\nconst content =\n`FROM alpine\nExposE 8080`\n\nlet dockerfile = DockerfileParser.parse(content);\nlet instructions = dockerfile.getInstructions();\nfor (let instruction of instructions) {\n  // FROM\n  // EXPOSE\n  console.log(instruction.getKeyword());\n  // FROM\n  // ExposE\n  console.log(instruction.getInstruction());\n}\n```\n","publish_time":1659608239214,"_cnpm_publish_time":1659608239214,"dist-tags":{"latest":"0.7.1"}}