{"_id":"resin-docker-build","_rev":"88-4797aa3932e2803c03cdbab95234205b","name":"resin-docker-build","dist-tags":{"27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642":"0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642","27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98":"0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98","27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0":"0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0","27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309":"0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309","27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f":"0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f","27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6":"0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6","roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16":"1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16","roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd":"1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd","roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864":"1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864","roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375":"1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375","roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add":"1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add","roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5":"1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5","roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633":"1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633","roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550":"1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550","test-ci-3594bad8b99732ae0e041dce7726dea763080216":"1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216","test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d":"1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d","test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb":"1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb","bump-versions-686366a844ac0552ab3d86051c6200a053c64505":"1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505","latest":"1.1.7"},"versions":{"0.0.2":{"name":"resin-docker-build","version":"0.0.2","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.0.2","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"d3cfb6ed186b12bb40763de511559f7e75a91442","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.0.2.tgz","integrity":"sha512-TSHE5DHU5S6A4U3vNF9W+g9YuaTG1NJy1jSpsh37j2C4EI+z035wrkdEaf/Sl3V2l7feFyrMzqeMp5y+cZasnA==","signatures":[{"sig":"MEUCIQD5YAwPqMZepP3E4Iu06XaSwywsP+o3BTUOCJFBf6MZNAIgR2ruYUoNw1483zmzxQJMbg3kn19XLBr57012R8pGACI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","types":"src/index.ts","_shasum":"d3cfb6ed186b12bb40763de511559f7e75a91442","gitHead":"3368adff6ebaf688423deb3f273148284fd72e72","scripts":{"test":"mocha tests/tests.js","build":"gulp","start":"","pretest":"tsc tests/tests.ts"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-shell":"^0.6.1","typescript":"^2.1.6","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.0.2.tgz_1489144731726_0.9335476728156209","host":"packages-18-east.internal.npmjs.com"}},"0.0.3":{"name":"resin-docker-build","version":"0.0.3","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.0.3","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"289c93c04cc11c7e537ecf235fab8d69283cc048","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.0.3.tgz","integrity":"sha512-WLCR02hCGie8zQkZsDqiqV9XL7hbiOpBbLnbOQ6xDcjEVoij/4yI3z24eRhA71UwxpFGfcuedXgMT+NF35ydaQ==","signatures":[{"sig":"MEUCIFrw0VAcHcVdkQXAPGj9xO19SGFw/fXi5RB4QzEjipbMAiEA2XjuWUc9FkGFtNguZHliDcO9DS+h3wFbsOJZ59Rs+Mg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","types":"src/index.ts","_shasum":"289c93c04cc11c7e537ecf235fab8d69283cc048","gitHead":"cf0502079de4a5352ecc7f2af06c8f49473ab017","scripts":{"test":"mocha tests/tests.js","build":"gulp","start":"","pretest":"tsc tests/tests.ts"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-shell":"^0.6.1","typescript":"^2.1.6","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.0.3.tgz_1489152112075_0.13275530375540257","host":"packages-12-west.internal.npmjs.com"}},"0.1.1":{"name":"resin-docker-build","version":"0.1.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.1.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"4daa3de2437cb24f87fe9d3b0773904b144192af","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.1.1.tgz","integrity":"sha512-u8HEP07AJPQV+bEz4t6C8+h+fFyaapYgIJO83Nm+MeefQ2tSip3l1i04G15xyAw26EYdVD9WuCvXU8BubU/T2w==","signatures":[{"sig":"MEUCIQCgn2mrUWtfNFgh0O4RSmgn22enxXHqA5c727Dj4o0RDAIgFu7lq/x+wOhgFbUFiN03f2VciAtSbX6RI+kMHz84rWc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"4daa3de2437cb24f87fe9d3b0773904b144192af","gitHead":"74bf766fea539ae03a4b0a1f69f34c9c012f15b2","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.1.1.tgz_1490183819072_0.37163486843928695","host":"packages-12-west.internal.npmjs.com"}},"0.1.2":{"name":"resin-docker-build","version":"0.1.2","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.1.2","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"eccf71ed922ae93ae1dac80cd7b381bcfecef81e","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.1.2.tgz","integrity":"sha512-FDqu6aH6xQxVDniqE5GvbHz5A69RF7xgX+MoyMagfzkMD/NHtsgWCdq3M/A1cpc5fqISUTJXY4v73px59D8fpA==","signatures":[{"sig":"MEQCIGtMii4gnx1OjVK2/YujmAUXRIj4MkfcHDB1zo3wKu5eAiA5PrH1FIAqInTklEaJkibqAQJa03Zb6wbqG3gakrlpBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"eccf71ed922ae93ae1dac80cd7b381bcfecef81e","gitHead":"bf9e7dda9ae586604a220b4a2b4d28ffc9f7f0de","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.1.2.tgz_1490184528407_0.9313428099267185","host":"packages-12-west.internal.npmjs.com"}},"0.2.0":{"name":"resin-docker-build","version":"0.2.0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.2.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"d2c4032be86815ae2c0f73f9275bbd771923f5b4","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.2.0.tgz","integrity":"sha512-qJn7WRooUa/8HJ6aS+FAo1/EN39efRyq4eO043LpyKuFItUZaADVmZbG9u+vrjQPFZdWhBoQLX/pF/EbWDApoA==","signatures":[{"sig":"MEUCIQCx+wmOjTkbSCLXHc46J9QPktyMfzCMILbJo7Q/YGwhVAIgI1pyBss6fq5rLPJmnv0kqUqy4HU5jz1UYDPvRgNtPSs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"d2c4032be86815ae2c0f73f9275bbd771923f5b4","gitHead":"6b1f90113497cc9d9b7195896bc628cc42f80045","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.2.0.tgz_1490631144640_0.3880569376051426","host":"packages-18-east.internal.npmjs.com"}},"0.2.1":{"name":"resin-docker-build","version":"0.2.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.2.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"e9a14f42526525c3bfb92194ec6ee13e804f891d","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.2.1.tgz","integrity":"sha512-HF9wRcjTKfDJjaxPs7nQEjhsxqSmNNbXFCbpgQNezf1+/AazBFWfOP9vJluSRn9E1PT5E8XyaXNGOPxxdT9eeA==","signatures":[{"sig":"MEUCIFGFOXh6QnP5z2Fj5WF9xHfKQ5XSGVw36aisHfsWQufsAiEAzIu4MGD8ioUPIv4FPIU7TXvh2a3wWJU1HCCWlvuwMCM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"e9a14f42526525c3bfb92194ec6ee13e804f891d","gitHead":"ad13b29a604da0471efc36ff1a8c21c3b0b2c5ca","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.2.1.tgz_1490631751356_0.36356548382900655","host":"packages-12-west.internal.npmjs.com"}},"0.4.0":{"name":"resin-docker-build","version":"0.4.0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.4.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"9f56a192b36e894e8bf41803a638c227da75ad2d","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.4.0.tgz","integrity":"sha512-pc0xcGIQTIkLayzUbfeZa6YNpk3q3PlEqFbpX87wiJIvsjZ0KyO0+GuU1KtjDntM085JE72jt0FiJ9pCM4m1JQ==","signatures":[{"sig":"MEQCIBEGuHwTy7xSDlroMflUgtp0BKMJERApXFap3enCx4+PAiB9fkllu/f2C83fTZLdo5U9HBXctfK+rbHHmOC+JjAf8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"9f56a192b36e894e8bf41803a638c227da75ad2d","gitHead":"50da70e9c08f3c64acf80a36e96e25e9d559d25c","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.4.0.tgz_1490784979539_0.24857735051773489","host":"packages-18-east.internal.npmjs.com"}},"0.5.1":{"name":"resin-docker-build","version":"0.5.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.5.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"db9a0b024f97315b6281891939b6e0a445ac0406","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.5.1.tgz","integrity":"sha512-6FJ6OM6OShE6J8MeNHFZng+GeAyAWwp0hQjhAQWZqoAROrZSl+GDlsPHKrMCj2nKKAsRlfwU6an7E10yt26meg==","signatures":[{"sig":"MEQCIAaskUziowUA8ypqN9Xo1vGTkM/xWDviBhnax0DU6JKkAiADa2Qnu2Fl5O2bQc/S5vWHXT3w66UgSzOR18Z28xDH5w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"db9a0b024f97315b6281891939b6e0a445ac0406","gitHead":"59a9aff9891c061f764d9f7dd9f8df02c8f280ad","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"3.10.8","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.5.1.tgz_1494447728299_0.8676540800370276","host":"packages-12-west.internal.npmjs.com"}},"0.6.0":{"name":"resin-docker-build","version":"0.6.0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.6.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"3e4ed136eb3aefa991649a38ac3b5af282d00abd","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.6.0.tgz","integrity":"sha512-/n1uUeNxVrQUIuaXyNHpqVmdscEIlq6ztYhaoAJ+pMo2z5AFlTZXkA2QFKpnK5GQglOtLZ8cozL4g8RXy1aw+g==","signatures":[{"sig":"MEQCIC16l9HcURs6toyjjo4boGtBu6vKhGK6aeUeOCiGppQnAiB5aHNJKxkL3B5UGhMu8moxKFj5jJKzS2lNoxbu0LkRgg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"3e4ed136eb3aefa991649a38ac3b5af282d00abd","gitHead":"019cb6a26dc50a8600647636115b83610d01dd00","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"4.5.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.10.3","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"2.3.1","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.6.0.tgz_1494886063991_0.4829140929505229","host":"packages-18-east.internal.npmjs.com"}},"0.6.1":{"name":"resin-docker-build","version":"0.6.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.6.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"559761088483cff0a1a474b46b2224cf836bf523","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.6.1.tgz","integrity":"sha512-S53yfHqu3E/6IG/Xps43rbl+6cvTYBvZ2okVr+dP+pTByfrm6G9GeBye11CUU1bUbl/9/TMcY2VUIWqT0DT/ng==","signatures":[{"sig":"MEUCIAze6qkpreqi3m7qt4gpp9/83GeecGVS3ZeiLKLZFrgVAiEAzfKEKNRrrLNS/2hGf4jz3bjrp0da6WLS0vYdGu+IFN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"559761088483cff0a1a474b46b2224cf836bf523","gitHead":"d3b34dcd3eb17c0fd84c50a20aa895253a6eabbc","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"4.5.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"6.10.3","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.6","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.6.1.tgz_1494895556860_0.5994958276860416","host":"packages-12-west.internal.npmjs.com"}},"0.6.2":{"name":"resin-docker-build","version":"0.6.2","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.6.2","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"92b85af7fa75f82f2e3d8531a186dcfafb259a4e","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.6.2.tgz","integrity":"sha512-sSAygBtENAtdN5bl5ldwcHw/QNDJzZoD08ZAzHMi0HygNHeBJ8a25jI+bX5JIcrvCxVSkP7nWlRU4+sdTXrUQw==","signatures":[{"sig":"MEYCIQC1IPKPl+Zlf+tdv4Og6yG36m1Bk8dtRezS/XWojC1gjwIhAIe53feC1OCrv1D4lcUs9IBzYK4nC2aSjfJKrGGxGV29","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"92b85af7fa75f82f2e3d8531a186dcfafb259a4e","gitHead":"78eb889086edd97ec3cc0712e3b725d8d828655d","scripts":{"test":"gulp test","build":"gulp"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"4.2.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"7.10.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.6","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/es6-promise":"0.0.32","@types/event-stream":"^3.3.30"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build-0.6.2.tgz_1498148725831_0.030873741721734405","host":"s3://npm-registry-packages"}},"0.7.0-fix-repo-429a020e06f6dc80da00d316626f1e97b2a9f5ca":{"name":"resin-docker-build","version":"0.7.0-fix-repo-429a020e06f6dc80da00d316626f1e97b2a9f5ca","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.0-fix-repo-429a020e06f6dc80da00d316626f1e97b2a9f5ca","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"b6b68faac3009be4f2cbe2ab39c36c5169e24b16","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.0-fix-repo-429a020e06f6dc80da00d316626f1e97b2a9f5ca.tgz","fileCount":27,"integrity":"sha512-rJvSXl4AfLA8VwHB5fWFSBgh6jCmtFXld9kloRJNel5/f7PBiLJTcPmzy5cjj90etPT6F1dwP7pTMGStqp+vsQ==","signatures":[{"sig":"MEQCIAQsbeF29/xigGnfi3Cy7wLxRGa6MUbMFJadhwM+uXHbAiApe3fCXrpmj2XRmipfeDPr9qXMovdkYqxPazRCgoIo8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiaULCRA9TVsSAnZWagAAY/UP/j74ZY5jwRd7+VBrXFv0\n3EFdF5EbY7SgBYmEtcsMM8ZJVmezc9jF2lMxQju/pbMfkEp1TPtumEPzrDT7\nnIvn7p00t+0vFoe4BgKaF3IHRXP0YeLYPFYB8cC/NN/tgXhShj5nvNHMVxd6\nm6sO1e3XmGHHiO8eGeSZJgEA0MrX8u9PpHMV/HHpLDEEd2NxH5/uxTyTULac\nmLr4tPSLQ9IMPSvrhVHu+eGETNaAL2rYL0MnZPXmH2HD77s5cU3SrJ2hHVwG\nQYPeKbtg3NiOFhLBxp2FUwmXm4ur/0eC2d8+TOrBhTuemfpL31KjxznFTMti\noxnikI26PbRLpiajBNm/ZEsNu8Zx4IuSdFNt/5uodfBRmruB950zzph9+nMk\nyI94fRbifWMIZA6U8psFIinoypNPaWvcyzTvZVOjqtwGU+RyKDUbRiAkyNgU\nAjCKttOLGM8VcFO3kyhjuDhrfMFQDrMgaewN8jXQGPSvb9L3wjBGIKmTrZnv\ng6mmtTX/Q4rBIsiuWcOVS3pjDaA2XMnNtJudJC6kgdnZgoyCFpnGaQFmtT8q\nYTaD74cKX9Ud4H9qh5WKVGs/ABCeOE5cHW0kys6oA7/+b1hTvJ886SJpQPJA\nhGiLwH8bnk2M9YIm0p8HRrpJT3Pn4jg7BXe7dGPkOnD9lPfrffpFHKb9Nua+\nHVHX\r\n=EW1k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"429a020e06f6dc80da00d316626f1e97b2a9f5ca","scripts":{"test":"gulp test","build":"npm run clean && gulp","clean":"rm -rf build","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.6","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.0-fix-repo-429a020e06f6dc80da00d316626f1e97b2a9f5ca_1535747338738_0.20590409125229203","host":"s3://npm-registry-packages"}},"0.7.0-fix-repo-b29409d1c832ff063d3402937135f98ec2dba7b8":{"name":"resin-docker-build","version":"0.7.0-fix-repo-b29409d1c832ff063d3402937135f98ec2dba7b8","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.0-fix-repo-b29409d1c832ff063d3402937135f98ec2dba7b8","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"c29b9b9a552995fbdf1c76e864e55c617062fcc7","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.0-fix-repo-b29409d1c832ff063d3402937135f98ec2dba7b8.tgz","fileCount":30,"integrity":"sha512-f76GV/AqiVcRCWpOyKFThirf5TtD/5m7pY6N6CZQD9MM9wGv3lYiiiVG36cDj2JaDINsMa3DrskH46HMnS9xfQ==","signatures":[{"sig":"MEYCIQDbE96ylT8bA/HwjlzaqZyHXzwTh50hVHf/9eaq6VVP2wIhAKpgKE9tsmom20h+8EKXr3s6MBIoSnpoQ2BFCm9D170H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo3Q6CRA9TVsSAnZWagAArioQAIz/WxliG5HJAVY1QPqU\nuYcLK03FF5d5k2HlMfApVqjDt3Bl5uc2jVwj6zc57wNeHb0MI4Uydj/2CJLU\nLreJk0J2Segyb45ToFcJtguwKZw2MHW1anZu/PJZrxdVcCJb48hyjkVI9qCg\nKB7g993M0N9M+qtKaeuDLZPXYHHRUI/2TKIn54/rXBiqM7E5ls4gxcXTRMU4\nkj3UH315g8iU2qBgGQBbkf3giJRudVfzTMTdLWILHzXLYZRP27lOCWxyvKLh\nXzzwiOVC43Dc1DAYppW6osTEYhNZwDJGVTczk+qltyobVfChXARVt1m6w3Ob\nhJUjFyiC6yW3FNaKcsQb3+VCyeHu8RIsmMOXIuYhjVhTitPXRKiw9ZMi+8pp\n81+osGn4tJ5pE0ka0Z+l2XwO9XQ1VW7FoR0HZ8N+VpntdHWOpKhHNVnJYyLV\nFDjsNDDtRLEIwtW6AMMOuNDe8ryXrAsGXvs2clBfKw4xD7kB/IiFYMFwAdNR\nt731XjFurv3kjD2n0J+lngCndKZF86DoNZ9XkhSHW+VZmuCfwWe0bxOJi1J4\nHvGr0OqQ92Q8vXNnv+cIvjqJi7dwkvlG0KefmErVzrrwOg4FFdOj115ur+P7\nbTR8C97srqr/+xlc+aPZ0c8yRzqWkiglKi+9UkkbQru5Jxh4Gv0fRXIloEDE\nZb2Z\r\n=Kqn2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"b29409d1c832ff063d3402937135f98ec2dba7b8","scripts":{"test":"npm run build:test && mocha build/test/test.js","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.6","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.0-fix-repo-b29409d1c832ff063d3402937135f98ec2dba7b8_1537438777291_0.36803458181911264","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"resin-docker-build","version":"0.7.0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"e53e0e99c0ea5b64a08fa136b9b49b8cfe98cdae","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.0.tgz","fileCount":30,"integrity":"sha512-xOxrImjCVybq5lNU36XkzZbhzMe8Nr8CXBWhn2rpD1tuC+tDccPfzsP9OGxHIQeqmzOuielw8Ix13bL7PZ7TZQ==","signatures":[{"sig":"MEQCIAwOk9it8yz5WW40YZN7vDf0aQ14VS/MRmbASeuoUqBSAiBpPLB9lr4OR1DPQzb3PpU9RkpEGp3JtA1Z2iBWBidAsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo3biCRA9TVsSAnZWagAAlb0P/jIwwaB6OFSQbDsq0U2b\n5mL7w+Wzye6H0CIYILpSofO6a+CdTVkrH60/g3D9zpr3u4C8IIabnrw4f0OM\nJJZ1OP7c2GhDcMqKtLqVoVykt71TC45WWYBRdN6SwzG4JnG9JTJgbRvrHy7+\nLXgN9leU2sCez8MALRzYUB1AlZC4x3LRuBEn10e/9pngH8lTZu6M/4BEtMMV\n0uWxDALLw64z5Q6iEZrvz/QbMMTQ0NaM1hbIN1PlAcLRrRKQRq/o/kuAeK1R\n7HKqlulKpmA3VJ/GaWOWxn8yTsZgemJMubln8rvEWGHkKMNMSiIEzq4fx4k+\nQoa4NfMGeXTWyvAZSPDIk+ZsqxqoZivmdeKrV+ju7COfx5BwNgBEIrQqxWtN\np1y/8kAwjbCDfb2VOq2TLvk5GSQEwpbSOxQOdD8LnM3ZZmkR3ESVgNI6lb5v\nUln3/KCEwvmA46fQH/G0fx0vChPwxmaf6zFOWEuAZdKxk877/T8eXJes2X6Z\ntjNJNHncdtA/t/cPrg2KH5Z55itiXXF9jOvT2Nzwl/XE9PaUWNqhQoYl7l1i\nh22EtzpDsLO0Kz+wI/PoOLBNtRJubP/GUYmhb6sffQ6nnqlZ5I6HPxTBWTvd\n3ncT5e8WnTVD9BKi/j3YmhkrhPRDhAoItjulwoEVJVpkwu6GPXOY2qxlkwys\nDaw8\r\n=yI4H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","gitHead":"e314c57adfd8110b6995eec1d6636701cd0a600b","scripts":{"test":"npm run build:test && mocha build/test/test.js","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.6","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.0_1537439458082_0.8709371047706003","host":"s3://npm-registry-packages"}},"0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642":{"name":"resin-docker-build","version":"0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"0f8fa07ca0bcfb3a51e922b72d7a75ac49534a75","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642.tgz","fileCount":30,"integrity":"sha512-nPQRTY+YYRHebL9yR6CKeHe89X612OE1hRuNT2dljDUIRfAqVeJPN7F4L7Z0nBdJFvFeh/Q31md0JEwxjj0ZuA==","signatures":[{"sig":"MEYCIQC8xppwQGTYvHs+L8aehoeUkrdd2naC+2z+Af6fBjPWiQIhAMmwWEbfYy2qZqwme7+P1iZWbElJOq/p08lGQrdMtTQZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCVHjCRA9TVsSAnZWagAAClMP/i+3ou5/9aJJSvW5EiHN\nfmXMhGmnwsqQfh10R9qHjTF3BC+C8lYCYo3ZXc4SQ3OpRLwBUVl3udvEmM8l\naZH8+ap77G3Qtjw1f51PsuJoanfzlGMKXdwQVTUokVXo2CmeW59a0G2dxukK\nnHeXH5jgkUN8eMyeG8VObY2uQHNbwoYkXQYatqr5FWzIfJssDXzJ5cczpJcq\nWGOxx76tXkQJtHjbybuXl7I1LKGZLipftQZXJmqdF1S7oE3u7dxPpagfAIIR\ntOKXAxeO4TI6BppcYXCw92aFMhuEVP/a8AA+/itPVIsZXD7/TN/GdUYRUVJk\nxmZrpQ3n4VDpO36pPG4xEQiZf9phluHG4p2Gb+GXILO6nrbPXJo5V1Hp3cAR\nH3QUhaKXaIjm6AiRjv0tOxOYkveVbtxgp6AsY2aLXUd0YaEd4xxE1wyXyLlD\nDqfsLayvYu4FWFtii7FCdATEtwa1kYXI++9UPI5o98o6beCP2s3rrng2KmXF\ndh67izbzyYNRb6ccelF/E3RSqgTqPTr28eb3Ers+/Q5IgfQmyB/BUschUEjb\nGuAVEk0UB/FgbekJFXr+xOkP0TZs4AZdxcj9b1jJZMFuNX32ipfl7HvsHYzd\n8CrbI+T+Pl9/N0h27gUHkXKDl0NYKu01mNQwVw3UmKF9LFzDpRSSm3Qx5wP/\nGN64\r\n=cfzH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"e30d84acf9f91e96295a1bbbeec727c8888d3642","scripts":{"test":"npm run build:test && mocha build/test/test.js","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642_1544114659253_0.18017160838042523","host":"s3://npm-registry-packages"}},"0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98":{"name":"resin-docker-build","version":"0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"203f4022bec2cd645fc24cda9263231e8dd29ebc","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98.tgz","fileCount":32,"integrity":"sha512-h6S1zskVFn1BHfRq5xeQJ/bdfAneC1nG1TM8JGe/YdJKVeERYVdiuZnAlU5kADssAUew5br2UD+mM01v/VoaBA==","signatures":[{"sig":"MEQCIBTJu4xycODyMPBhIcmKpQGuvH6w2r3chcb2HVPTTlwVAiA8gGQmCQzwBFkIW2gvibwxZ0mxZE1QxWGfiv+9+o/54g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDV7cCRA9TVsSAnZWagAAud8P/3IALkAg3sf5EjaC81jn\nMRBjAw9AXfzhkp9+7GwKxOY4iHK9Hy/kF3KGossMrrq5EveymPgTSs591fGU\nnGYYxqeWqPL6NBlJPkJg8nJ9qJAdZRP6RmbTJcPcP/IgrqXt/ipi0UGZM8x4\nlE1bccfGu1l/UW+u1Yvq3fZ63JElYCwZZrhRrk3eWqzqlvRiGFQx/8QeIejO\nU4pqqXRkjbkI7gPt3VajPNovR6J7k1yhbOfAAIgj/N+W3VZRvxJoA8SD3sWL\nFLMF4tD9Te0Rwr4poZLchAToqTuXHoc1la8vZ8RpIcLi2ufzOboTae6rUZVw\nBaa3W2cgJB3L9HC+IIZfJSDx9xosJ06tKOPilgQ0RFKopzqGL0o7CZrec5OL\nSxdqaHVqpoO/e+H/ab3EdZVuE9eup+h2IVGHIG+iPRxD+pU4g09MG/uR4T75\nlzt7Rw6eA/ASw4UQKf+bhmje0nho59ypfBuC8muznqBrzthRvOAi7uzkyu10\naVz7TaHfkJcnS5jY8GS3W6Rp6yGpsdt2/8zh2cMqcky+I/nvczdfqwH8KcVP\nLTnD+UJsj6J80zqvMxJ/bA4R4qElGP2b85fB+8ZzTBjac5e7h6QDGr+Jx1Cd\nKGrYLxlUFaLIrjanf5MWpupQuD6WiNSMvqTlEaR80+oXRGYABzyEKAEesvB+\n3VPK\r\n=/S8a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"eb20a53bb69710bd640d19f7584be6e70fe2ef98","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98_1544380123317_0.931987616695426","host":"s3://npm-registry-packages"}},"0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0":{"name":"resin-docker-build","version":"0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"f85ca740718b9c28756b5b156e724893fcc74245","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0.tgz","fileCount":32,"integrity":"sha512-Y1qyBExWAbWM4B8OzTCiFup8s0UTXO6yYkdZ3xtbkcWOEuqNEyprLOEHp+JdoC7mTJBFyGpr/V6jPaa57ckn2A==","signatures":[{"sig":"MEUCIQC7wJANf15SCDnvex+Zuex5/dRJrjh3hbE4hrn2k4MiYQIgWFQuUR5A+59c8NPDvt8xodi7aDAhVtw76S6Cd0OPS9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":118903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDkqVCRA9TVsSAnZWagAARyoP/R2eJBNqVSACO2jBqQ1o\n9VSekYcIcfLnghayrSNA5BuKNv1uYANn0t1naeTqvn1+1waD3i44ODnOP+4B\ngpKCW6l2LNA6HNRjgFQp5QUCd57nMhQuUpXAUdf5WrBHWRbWVVcF2LWke0aQ\n/LbeVbolikpupm47K/7W3TyRbzuztyFNJptUIiuxL6ZjXbzLGePfbUpkCB3b\nqwR9uKj1vOMboQ94Z+R45t9iclpq2SDpYFICmNZ87XgYIhS7oNpjEfS1EgQ0\nkennyIzOXmWFI7sr2aoNAhATN7vLpGRPemQWjFbYtUu9pB4+Maz6Y+KvMQ/V\ncpzOVNla0lTRjl/pSVzyxRVHD7VccdW3e+7ErMBc7ZjcUnDxbXxETQe1pRib\nNw9go3qjVRvny0Wxj9XLfoKvnyt3SvdZvICpjVRQmgSMeUBRwAQTBUvRiyfC\n3PKIUIVcPeaZCNmim4KuEo54gnNnx7MN81OBy0tRNvr9kcUAvpzMXsyxCc5R\nzd5xMpDIl1XPgTIlWwcLzr8Xu1rf6V/xRtxiSZGo/4sm9hof+0lTEhcpYFxg\nc9ZN2+LeAz9pb+GEod9mQD9z/OnUnQHBUEqiYmK/YrURwdku8CGMpwlkJFLX\nWNqYydGoCHVaBlOYonStirbAup/+h9RZhIEWk6bktAZHy7OMKaoBiCPpQRoj\nFnRO\r\n=Be9i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"68280b15e13757452ef88aaa8dffd78a066c64c0","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0_1544440469109_0.4940281887409048","host":"s3://npm-registry-packages"}},"0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309":{"name":"resin-docker-build","version":"0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"7d9a87ead0fb8551986ea4b18bbd3d7f73221404","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309.tgz","fileCount":32,"integrity":"sha512-MIxv9Oo/d8lpMefkxShBG1WdwhAbZEt3c9Z52cySGpBWbn99Jgnyv0VcvTwDjREaboNloku5dodd24Roxam8iA==","signatures":[{"sig":"MEQCIHorrSEYbZGDxebYiQHqnkLZGMVu3pCWz3lHrk7g0DaFAiBR24uL/yjco6qg8zsumFIGfN2qDEYBbMEjWCAgPk5T1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEHzxCRA9TVsSAnZWagAATmkP/0GGUGdrR4LL7/G70ulr\nRodOxLisMl0RzBnsa4oRZ39rshj09j5H1vKqsETbu6BEV+2k+g79TVeCViN5\nRJ4SYYMMkDEZUvUYkPL9q8OqUwhDt8v+0tkuD8W9gQAPmUJkmi/Xkw5J1D6T\nOAdZU7Wjse/wk6CKNC6iZky1K7/1Yye2vZZzgySq/+6jO/hWVwbLtRyGflX4\nC2Sms/mvhZy0TSfz/3i4HN7+VKe8FYAN5X/RywOMe3T7NS6jn8/TgmPoemHR\nt6Fl5cbSEQEIS1JTeaPo/xXZcmtPF23yvlbp/Dqfng1O8Elntxq417jskcD7\nLmg8yTG7//vqooR5BCZtXCMQ4IdKxj+fvSo786h2qdFMcvhd1/lA+hD2RBcg\nb0Nm/jA2rKFKhYAOR+HADA/edcNR63Pgs2t9unKwmv1QMWFRDa+rdU5r5opp\nzeiEZf/YqazztL5xvL2wa53Fr3unrLaV9fYJF0qipJSxLM/EAjDtnQ+BnfbA\n9Z2YoxnFws7xwKEw861nd9Foqc2IbIv8sRpbjuH1DeBTmuPWxNZa00uL57Zd\nfkhEYrvOUVLyU80LWjDVp/KqpZTrfwUtk1/J3iBRSeSwO4iobqzMQKF9XDv3\nDOkUJvdmq3OLH/E3R1QQQapaK5V1LHvthFma4QNP9JIQFOuQlfRb38cunH6j\nx19t\r\n=WIng\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"f609904607b8ccce754cd4faf8bc798707839309","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309_1544584432256_0.6617034942513145","host":"s3://npm-registry-packages"}},"0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f":{"name":"resin-docker-build","version":"0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"6ca02c33ed1640efc32ff5888b65460355e23741","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f.tgz","fileCount":32,"integrity":"sha512-YaCZm2694/bPFMkROevcM+k6TN051hHf/O3H1h+j/z55woQdPZgXsGIKAzPXzCUXJNLRaKzXd6SAjSIKcQ5EsA==","signatures":[{"sig":"MEYCIQCv0ncuw/ZevdRF8utvpd6yeHXPSHIJ/s6cn5N5O1nM9AIhAKpu7siCUmCFk2d7tcyYIMD+MjAYRTAA06NaXX3D/OBB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEIGXCRA9TVsSAnZWagAAS9gP/Ronjdo1FhtIBwMcmf85\nGoBgIF59Djos1nwFPyAyCuV61wA9JvAEind2OpXHkhzns7z1SIfYZ5FVqAWn\nMWq7DbKpCKcn2rzfMP/gs34ezCVSRNwYcNXT3Jui9Qzk6Wc6zPa5I6rvB+F9\nXd02JEQ/SjovlSCti+xyQN+GGjAgjFJeqN6mRb7yGVCG3s1j5DhrPua1hb1K\n7bb9SccZ/Bi/BwYhICYs9M3U91Dg0fnnfbBiovW83yX6uaLYxMnvWOIECDk5\nCnZzuWErVeaNxWYpRdBxRynm5FTX4ZdQtaQXbMXBy0vTv95GlmM9SZKZ7bNM\nozeUKslWZNX4rDoTCl5MLxw2l6LvUlAjGC//dO4CRlp5YQv3z6EYnBRh8Yk+\nDaQ4+ofelFbznNUIiBsMutBaChA2R7ESjQCgtv+YzIg5oFMiYVVtgWCLJvtb\nTkiFmKm27s+CCnHIYkJ4OOw0qP1CVdPjzdh9zwLRYneG9lju3CK0ou8EOHsh\nA0o39ezq0idEolO+KjeAHQAgkjAJWxZR1DCT3qlt0lT4BxiU7tjbuFu+Zutg\nm7Wy6VwxsBjktHn5CtdgaqzwEx8HTHEt5HVHjo77KqTivWRl8n5juRviHd+s\nK66jwn4fg6i415aNA8K+ya8F/oJzPZM67dT1yzNfxVbQCAvFbikZzHAHhfSw\njSGO\r\n=5hB6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"1d4209d79f5fa87fafccb0e61366deec0984036f","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f_1544585622311_0.3876794313213421","host":"s3://npm-registry-packages"}},"0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6":{"name":"resin-docker-build","version":"0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"85ebf312b0eda66a5f784c965d4532123ae3ebdb","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6.tgz","fileCount":32,"integrity":"sha512-fpjFR7JoK7Q15Q2rpEVnJJyMiLx2W15TLeGQ/DGe8XMQCouV7v6E29IEIadNskzVfYaCRj8Hg7QI+q7IjCrlDg==","signatures":[{"sig":"MEUCIQDohPo/vjK0l31RUOzh4JNfhLkfVvwr5NhLlGCM8dBBywIgMGQOMhkUU8WnrXu2Kyy/zxPnHV6PibE6mW/zHrGMt9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcE5s5CRA9TVsSAnZWagAAkUcQAIspxBT9uVtJMSzmbsd+\nKtxDceAZuf6OaJf0yZZREeN3ztJQYKVq25ZjQ0i2532By4dfN4GzSyTExFx0\n6x2DpAYN2DlkGgnEWSVV0z7GXXTok9Q8HVrHnW+xUQq+loGdD7jhCQGA5kWV\nMAE1uLfHrCF/mAeHPrIfp80ZkS2jNceNKrciiDPAL2NszXzg7InzvvNIuacr\nGLTxSEm/wibog3acveDYGHZwoyjdOJJSzfAWrg6MkNNDLWAblSmhy/k8VgFg\npQdNoKIgR3HIvoltqFSZLYd878E72VtBH/lchkFjOFmhc0WIJxp6VOPXOt5/\nEPBliVXcf44mQPENsvVf0TrTw831lmzw112mGQ5VFnYFHeTMrmTUEkv6Q5nG\noT/gMoMMznWRnncfXVp7c7M9a+kwE/d+3ubNbmajnnqEsK8MO6K3YzggN2cm\nhsMIVH1n8x2UGw6hdpcMAPUeitDrZuDloXWP88Sm9CRHiQwwJPUSYeTJBFQS\n5eIcFf+tK9ueHN/YvKLLxE5V4MtIjEJljdRKqsC72fQFqVKZb4dY/9v2HG6Q\nQPFGtbdzIe0+kCdXOL1XzIIFICGWtx6hDmTAdt2W+CWgWUDQK+/nU0ECMb3v\npLWf3R47wExHzidl/p+YHSopObz/SZ+gqJT2YPVSS2WOKgXnAk9+OM/3KKZa\namey\r\n=uQhY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"007e9806e317f8ff85bd14f0e503d00384e863c6","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6_1544788792762_0.7902384988429407","host":"s3://npm-registry-packages"}},"0.7.1":{"name":"resin-docker-build","version":"0.7.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@0.7.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"640c9a9d8fdfa166a5a0f9562f5f8f3a4e26d490","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-0.7.1.tgz","fileCount":32,"integrity":"sha512-8W/oM5FvXzHu0ylOXfnAyR/TkjnmTz6X4AvYnBgFL6VHd+72tE9DzEv2nlBX7Au7v6jfk2fWpfC6GMr5hUhiDw==","signatures":[{"sig":"MEUCIE6a46Pz/A3+h8nbXhGwNnO4ktFBiYnj8u5dJPtHYjqLAiEA9BJV7sO1D0VHWDnv9e4TJIQWLBVk8SFOgbr+7t5IhcI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcE6RYCRA9TVsSAnZWagAA+wMP+QFFX/5QSYEhgpnK44fB\nVeLrhWpQpn9YqODiR8dHlH1fsvZUmdBaK6vDFab3NKMeogqQJUKEp6tD35NC\nZDRomGntG1pgF80u9eCgMNDVJ9ULbG6QJjLW8RsAHWVpNP9Unx35dLmFcyKe\nRqaFYAXDJuo0XMg196r9J4kw6zjDad9FyatiN9OFZvDYbMi1WgHSjDA0Q6qu\nRJzN/aj8vIVTgqDlhueONRhRFGUSmXe2Ejue+5nsfhbVFUTjWGcZ9+hYgrCu\nsYkaqB+mlOhIowkHXcuho3KnPYZY2vpm3RUqTVJNSojhwYCNrcpBcZ0oDsrj\nl46b6OIJGvyX3qCu22RZGuElTFEYVDRv6UkAgE1Klc6m+1z0PlrSQIbb0cis\nq7VpU88Z6JWRYf7zY3Rlp7DuT06FeODEQgtRhv/2LhYrsO2VyPbAXZEDlnhA\nL9BgH7E74E32CQaaMVa5Q+7uTKmu1cxizwKZTsnBbmT8Er1ziGdEZ0PkJtN2\nQzyRoKkFJZjYsjMSq5uVckcSd+EWrgS/gQ7MveuwfpyK5qbeuG4dN8Qo1+5s\naU5sYDG3ufe5EnNSTJgsJ5J4dssgG/9DkQuuk09wFj+f8Qd5W1e47/zDYGXL\n1lpv21QEYUKjz1xeJtUCJXNXkVtVzOlX43FKZnV44KGyEXNVEDXPbAa2DuCk\n0uVe\r\n=Fp7n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","gitHead":"a33badde6a4780eb3a591ae77a0aac35e75a9fa9","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.1.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_0.7.1_1544791128328_0.5747487647908343","host":"s3://npm-registry-packages"}},"1.0.0-explicit-builder-creation-4485ee1c08d5724a73d64f0f99ea7925789ff75d":{"name":"resin-docker-build","version":"1.0.0-explicit-builder-creation-4485ee1c08d5724a73d64f0f99ea7925789ff75d","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.0-explicit-builder-creation-4485ee1c08d5724a73d64f0f99ea7925789ff75d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"9d6f062bda8924e6598a35c17b50b4526d256333","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.0-explicit-builder-creation-4485ee1c08d5724a73d64f0f99ea7925789ff75d.tgz","fileCount":30,"integrity":"sha512-UHv5annCdl8EaNmbyVpLNzVbDD6S/JM7Dm0UgqznK5pr3Do27ghRNandrMvPftjdyND54I19eVg4FmktOkcj9Q==","signatures":[{"sig":"MEUCIGXocaQTGkVKLl161m+pQCr154Uswec4C09Q/HZZcWEmAiEA2hOoNqdOICo85ZMwkzOSVzcd9ZLa4F5PfpPlR9LzmNA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":86330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfTwUCRA9TVsSAnZWagAALYkP/1qD845R4YCMYgBFA9ar\nRDyC8Xb2ap//EciYSmW9j8AeTHVHpdxYgR/hP3FYRtslPK6Ray3nEmfp+qOn\nBakJ6eJ0HSm1fGOM7qlW6UFxZK1nmbQeC3Qoi4hjruFRw0CscsyG4n207vrm\nFtXpzNzGo7NSRyAfUhR1sSQWpV/H4FjjBQ3IW2v+W5Zh/K5KqFjYervFWf4K\nnVCsTD18CA2x6RLdJqKX3MIQ+HiD1XQjcPS6jn1f76V4CaIMsaPZPHPa7xOn\nYtiSrWahiUZiUVENChtba9HkY9CHaMrZlKmJzQupB1STr0mkhktKryHqhMrk\n9aEt07OWpnFcSUQLr9aS+PDt4MLAs5N82+Bfa8a3nLxn3Jz/nP4kxCibTfU6\nWw1vuT4r70IA81RrpoUTUcgbmkqku95NBXe+HNG5BKR29aolIikWLL8dRms3\nd9jDk7WJzkqM5zXHzRKW2YRoYMaQMHePKFMtLh+DQ+MaVas3CnEOhTbv8/1U\nICD6ngW1cG8Wp5xGq+S15z8UeADmzfS2tVyyRqrtKwOsaaXTJu+CFQrWXQZe\n9z4uC43mr9Y4uBD3Y7CEI5NAzvKgYDDrqrnXjoeKdana7YkL8llXG3vjtUgb\nk7EuejHaT2da6VrISO6t+eOTz5GyST5cHpnp54oYkWnh8TqAJEejM50s1yyN\nT74J\r\n=Z4TL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"4485ee1c08d5724a73d64f0f99ea7925789ff75d","scripts":{"test":"npm run build:test && mocha build/test/test.js","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.3.6","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"^2.3.1","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.0-explicit-builder-creation-4485ee1c08d5724a73d64f0f99ea7925789ff75d_1551711251527_0.11833578799575117","host":"s3://npm-registry-packages"}},"1.0.0-explicit-builder-creation-c0308890e5d661f1158aa29997c23243d77fb4fe":{"name":"resin-docker-build","version":"1.0.0-explicit-builder-creation-c0308890e5d661f1158aa29997c23243d77fb4fe","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.0-explicit-builder-creation-c0308890e5d661f1158aa29997c23243d77fb4fe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"e70229d415c0994bfc02afdb969d95d18ce97d5c","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.0-explicit-builder-creation-c0308890e5d661f1158aa29997c23243d77fb4fe.tgz","fileCount":32,"integrity":"sha512-MhttKJN7q1rMQdn2LQJar1Tlfi+EmgpNuUp1thT6M5mbhFhbjPYNNpVQsHRuNiTmd6lRnOi4VkMNHdzklqInQw==","signatures":[{"sig":"MEUCIQD9yM2NB+szBqemSf/vf32AGo40JKAAO6/shaFzzm7fCAIgZ28n3yglnVgvxHiOQm8J1IIurIQrMGDdQgMAXT51AwM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfUANCRA9TVsSAnZWagAAHewP/iOO+40sYr5CS9Fu/gkB\nQynojwMwVjFzMkMvJtkJ72AEtxt8ugMV19zPG4hk3q4E+gMG1OIjA7QO8H74\n/wlGVW5l0S8mHWsBJbrQHJhGj+WDbrIOeedfR5hlkp3wPMpiuMyHZN4QPhgS\nq62c4s7Q3uC2ccZENJQvw7M+BX97jUU1TwEohaNYkIzrEqpMurA9zhCLQ8Op\nTMxzXSsI8oSm5rv0selAMooBlO/cRPiBPWsEMjkjLhSxg/stf1qEIobprBBm\nHezQLWdSIPalhKv3Tm+Ux+wadLW3SliF1PH5MzO//X0ib+Z7H/glNyKgwJC2\nYfv0FC2kxyVfrK4v685wWrciwg93k2tNz8NQKr8jILfOr7fH11P334AHgnQG\nVO09L/LlDdusNo4WJQOyzsDSZynB9iqWaOpo4Mf0uMf4jrOk6PLB4UqR3kp0\nBpxcW8qLfersWwQdAIDj1vwy/6XngSCgWLcjnxx41P0c7sFnFZtr9dk+ifRN\nxLwXK8g93MgTE3Z9lbu18In3w7lkfE3iz8qjOsskuE69GYFtjThdhvcYQhe9\ncf+j/AGOWcm8rxcnSXXOaEge9UJAZBjYqTKD4Keef0zlJCF5t5BAIGgJNWH5\n1rpVwxrE+uC8SsdEzbO1e6tSyp9idqx3jfriArd7THnuaqpqDJ0+46US2zlV\nalIa\r\n=lvFg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"c0308890e5d661f1158aa29997c23243d77fb4fe","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.0-explicit-builder-creation-c0308890e5d661f1158aa29997c23243d77fb4fe_1551712268877_0.8278233079934529","host":"s3://npm-registry-packages"}},"1.0.0-explicit-builder-creation-5f0c7b8861b6635e8008aaec81cc596774fa0b7f":{"name":"resin-docker-build","version":"1.0.0-explicit-builder-creation-5f0c7b8861b6635e8008aaec81cc596774fa0b7f","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.0-explicit-builder-creation-5f0c7b8861b6635e8008aaec81cc596774fa0b7f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"d2c563e276ffc55cf04635afeb3b0ddfb0a2019a","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.0-explicit-builder-creation-5f0c7b8861b6635e8008aaec81cc596774fa0b7f.tgz","fileCount":32,"integrity":"sha512-B2y1uiYm9jmEO8UL2SAxuHv7XwusQS+7tIRH7QelyRO2qHuH5JIIMgleUaSGbsIeHj1/y79m1DVsoJNVf9gR0g==","signatures":[{"sig":"MEQCIE0sSmmWb70Sc9PRX0BXrstb74I0F6SvUz9XoNQ8GeY7AiBoi2FqNJ2Pclg5eB9G056eK9cEZWHn1IIkAV/VDIKYvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfUyICRA9TVsSAnZWagAAQA0P/i8LtzWKV2fIzzGOWG6p\nmlUZwl7ap6oy6LD4qV+2cTQ11ISIe2Y/2mNCJCybnJmefHWN2pdiTpGXZ74t\neKMN8fsZuDUZJt1uBvA9KbULwYu890TFtjmj72aUFCFgT/fkFW54LC+4rk6Z\nB0RrV8OUhskEzQBcVcKZuRaKTjlWQiC8AOkZtyCDFQhwxpXZfTDT1hJS5Tp5\nuW/OCd0KiFBfCNBcaMNmxiTaZXRWcbRwAXCqNFAZqXGPJHOtKwS6anCo/b4v\nUSpmBq6GL9Fx7o9KT0npyWA6k82Wf5LVo+mWLS7pUd8kpmqSn4E5S+WBnXf3\njjDDgNRb+g3kgSlM9X7kJyZYh9oPZT1hIZ5lKKPPTeai7Dsh3X7t8tvGWV5w\nLJ3P1SvutrWY31CI/aBZdjwhqHSX40h31JQkryFDAFcZPF2z3disa4NY5xZw\nyYBtVy+Jt1a22zLblbv7cFN353fgrr9hixwe6OePivYlGTPptqMoFOIEAble\nC2IVyiw+Vwv9xXcQWbPhUrd6H/WS2wRv0VdgrhskVdxjAIP9oqjD6Au341Q1\nnHVl4skNLpPP2hgM8DOkDBMXQ1zbjUQhorBBlbLALQw49EaasB5JWQb2NHjk\nWdYW2rhjm41Y6Bx7gordL4tHZ+u7Ye8krQBtahj4XZ897lzwJ15bhnvoRH90\n08hk\r\n=teJT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"5f0c7b8861b6635e8008aaec81cc596774fa0b7f","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.0-explicit-builder-creation-5f0c7b8861b6635e8008aaec81cc596774fa0b7f_1551715463544_0.38088849070702513","host":"s3://npm-registry-packages"}},"1.0.0-explicit-builder-creation-bd4782a4ecaf63b0c4fa0df4794898872a49e626":{"name":"resin-docker-build","version":"1.0.0-explicit-builder-creation-bd4782a4ecaf63b0c4fa0df4794898872a49e626","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.0-explicit-builder-creation-bd4782a4ecaf63b0c4fa0df4794898872a49e626","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"a6b63e29c992b05063fbdfbc5bf72a03eaf2f291","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.0-explicit-builder-creation-bd4782a4ecaf63b0c4fa0df4794898872a49e626.tgz","fileCount":32,"integrity":"sha512-g9Rk6N4sV9LIV5TUNEfXam9NbHz2T3H+PatBmR4ooY9YBHV8991LmIZwBTh/y4kTPw6ZwZ4Tmt52WlEUiPoXGA==","signatures":[{"sig":"MEUCIBltkj1X1onK/QZNIXHMxdvI7f/JL8eYVlWzkPwuH01MAiEAwra+vvxGiFYg6/fGYJT9P4lRbutoHVu8QQvgPJhqhfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfU2eCRA9TVsSAnZWagAAp8AP/iRTbNaXrBIOJU+LEujz\nZcbMr9NdFRRHKXCzFW/qeU047CthJSAxLT9MRAkMDIZJpsJcJuXRPec5EJhq\ncE7eDKwSBEMoKdVA8NCsVWs7d0wJ/pmCuZjW+XUtDadSkXkO0t2JHTg+bS4y\nMAcTY2gxC2iiCkJXrbbSKKhN/FslXxfOalaBuxxXel5EwpvIopjHI78XyxXD\nal4I/ZZhZMFmEFQt+unnkHJuqCmWeBO73QXStzR5sCSsCuoT8QlswgPyhbXr\n/TsqHPx06Us5GNy1gLGJUjsVBjtOOJW79QIcfvUQ5zATaBJPwgprvAUiKtZg\n9nNdFJm4ANu1YKMmQa698mJ160cNuCKvSpzlgmPBu+8IfSHcNC4kbYSUAN49\nVUhEoySkLHDn0i9vmjDAAnM4zqo1JXWXHhTHry0QROSz/NnD8hxjnaNDtJE+\nccDu+e1+BqCosovy3dxM1zfmp2N5IIp9ymdDvH1qHBhlENHZod9HYddIhd2C\ny5OlKEjIbuhEI5uUD/+2ygcaaryrbk/uhdeC+w0KeASoqB93D+pA5C+0YLAv\n+DcuJGWDwJ/cf86jTArmX3i7DxjYKJVoeDQqpvgvYDgM+SfMnzuVR7rK/ip1\nVtPOorsJZJq4c6RIdM+57S0UY6w667xMDjUgQBSTFpTLC8jJyv9/92l9TPqy\n+l6m\r\n=yxd/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"bd4782a4ecaf63b0c4fa0df4794898872a49e626","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.0-explicit-builder-creation-bd4782a4ecaf63b0c4fa0df4794898872a49e626_1551715741450_0.3274611300144483","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"resin-docker-build","version":"1.0.0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"f814d10e31e24acda649cd4a9e0275a05a703bdd","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.0.tgz","fileCount":32,"integrity":"sha512-reDrQnWyKf+8x/2x9H87TqCCc8IbsD3mWC/EfieoCVkwLSB81jBqHLYWsvPmLZRTkXytsxuEpeIuJ40s2ic3Xw==","signatures":[{"sig":"MEYCIQDVuMwXt2YXFnWNe8wXN+Vd0CGGMBiemEeKVgn59ZpObgIhAJV8vtD0o0hE0TFM5q1Sf7sofO+vA5on2ciP7ElcbDrV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfU5kCRA9TVsSAnZWagAAIdIP/Aj6Q9TdpPHAIcqO+AIS\nQpvr/o5+WQRPbBLG51nleES38IXSfSYsrdiPOsCP/hY4q8v2BT5clkxR5QYo\ny0NsQ3y2RX40ZprkthbnNNMCDrn6ynAyh/AkyjgGQJ29U2WYbwZRhnN4P4P7\nI8H3PTvaKmyOY2BeVRQ0Ym6jAnTPPtc86HAGsN4tHHSwl1VEJNigShSk5DeC\nDnh7xr58uyV/vIG0TS0oCIsEHBtNXSRBNeT/mSXNURrYEhZ4F6fpOCXAqBqX\nXmlwwHAE3elxFdpoNvUlBGP4AY5Qu0X3dOIWhmzCG7K7rvLUTY3MDTzwmjgR\nnBrSrGW8ceo2taOtMKHvIfbSh+RmQvOVGUwiTnLxoQVhJbObmBnhYenm9g+M\nISGBxZDPhpZv11HjBHC7rekBlrZHzc82Y90AdD78RHixxlvx3uzUz7rGJf83\no94zeX9KvaIr4FwWpP5ZwIzgLp02Gva+ytWsWFqdyyJHbfhlj2mRk6swqlXh\nA7x8PR6Lu1oSN8Oplx+uwirPkCJDiSI2PORcWFQhhR1ZNNRJ5Pj+aWZ4tGC/\n/tsjYbVNqXI50CdOjFZvS7RyrXB8TJwrt7FjnzF+u5cdsw8HcNjjjqCW8pFA\n9pDUXzt/ku71Z36BpXz3FfK1ILFI/p4uDdqxB1XhdRzPPfl3lO99EXLw5b9U\nbV4N\r\n=U3x3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","gitHead":"b6c8d30112c1c32f2427a4acb88c112388bbfabd","scripts":{"test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.5.2","@types/klaw":"^1.3.1","@types/node":"^7.0.2","event-stream":"^3.3.4","@types/lodash":"^4.14.51","@types/bluebird":"^3.0.37","@types/dockerode":"2.5.5","@types/jsonstream":"^0.8.28","@types/event-stream":"^3.3.30"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","typescript":"^2.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.0_1551715939862_0.3651390968750259","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-45a2ff74e3755247ce18113c7c7d0f16daaee33e":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-45a2ff74e3755247ce18113c7c7d0f16daaee33e","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-45a2ff74e3755247ce18113c7c7d0f16daaee33e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"62af44bb6762c08114f5388f47f5cd54ac40d5a0","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-45a2ff74e3755247ce18113c7c7d0f16daaee33e.tgz","fileCount":34,"integrity":"sha512-urnMgdEfrl4w5ozJUuus3rpvT5HTKYd2eUzWk2Bu5vZY5kI5ZdgS+Y/Wnw7iHznUYdJcH0rkuujGhwI313O7RA==","signatures":[{"sig":"MEYCIQCScvpeO+pcArBAeX9hjlXVRgYirTWg8wE49OVHQQq9AwIhAMz6tBlCvpywzIw9ejHCKZnxdApUML7CCYgoGjy5nYNo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchaFQCRA9TVsSAnZWagAAq2QQAITltwnwWFwxC+Lc34JP\nCl91HLalA5jhhpZdzI+hUe+kGlALwTlrOsVnyFPNDZChMC1NXKZjKvRhMihg\n5aDJF68Xu7i5kuN/yZzXwiEPFK9vPntQr3jdPydvh/CDLkF9t/nrPY/DHRJS\nrq5nwsceLl/ZkalXRNuWqoQtjQdqnXuaKAvT59WxJYH3kVCgSrN5JzGctyt6\n/VPNh+qDngM6xVWtsQoIUxpLCFKqIPa4rlinRBDWcxsbU53DX7+UO/MYcV+y\nM+3cC8JJEDcPuw4+mnHcxUfQPETgQQhe/144r5I8wGI9puooTeU+XgGN15qQ\nPZJuBfEu693kWoSmEDlt3zJHJnt6moMTxSusLqJzO7UH6izFuB+mQ9P7IQP1\ndtt6OgMEEXCCDjg5fA9m7DI0HaT/ke6tzLQ9nK0Y6xhMWiDcrd2qVq1T5gm6\n6LxHAUaZDmQFSkEmxjLje09FwY97kHMb4o36H4euPFczh9ktbQu1v3XjTM1G\nnuAiFx9IddSQYwA4x1eh8hd5UL5Biix6c10ah5Ah/EP+3dsUYliA58o1toO0\n1NKYSnuvIqGhHLBlOuZbQILyWI8iVl82ig1YzOq9WoevZwx2wezorj1SFY1n\nqXFZl8J+wRP5wc80u+JNoscuCZxrgjlMW0o/sjfbGaWmfFil9K7chMDi3sXY\net+1\r\n=DX31\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"45a2ff74e3755247ce18113c7c7d0f16daaee33e","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","tar-utils":"^1.1.0","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-45a2ff74e3755247ce18113c7c7d0f16daaee33e_1552261455646_0.8900477124990018","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-b975b5de4485f69803fbc8c75566aeab3a039958":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-b975b5de4485f69803fbc8c75566aeab3a039958","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-b975b5de4485f69803fbc8c75566aeab3a039958","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"d9b10083b580af169fd8a313a19f20cffd594964","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-b975b5de4485f69803fbc8c75566aeab3a039958.tgz","fileCount":35,"integrity":"sha512-13ECl8KY6Vq/AVUZCL2ZTVbeKOsk1ILHup2ANXdQN8iqgJjJiXahudGaU5YJxB07pDkV6Jcst4VF/VEEKsSsvA==","signatures":[{"sig":"MEUCIQC8TsgrCHReYJDXVxkwbx0MBDqIm4ZrYpqPDsQUTNCOWAIgBatBXRBu4l1g2fBqs6Mq/uAGKZhMdNQqkwR7gvZ9U8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchanPCRA9TVsSAnZWagAAUMsP/jT6swg3QHHfZSeMVzkb\nHA2GxL/0684DuJS2JjaboJz/QQVjZjNaLF7bCh9LBapRNrU+3W7PP6FVLkks\n0luus9yRhTot2S/79OnqxMC/44z/qtoLGrTBHga4gt2edUiJq9slXzmAdCnG\nmZk4qr9cuBPrRLeTx5sKW0EsHQazXUABUXjDuK69K8cW/ZQD4YJPzHg9nLbM\n0vJP+oX8ZU4TAlWOdzfMOfwYNm16/UBAu6FxOpXjUHdqDh7LVS7GhLPe+tPx\nDvfqRTqViWe1qIU8GqmPwLbBKMZSAULDkBIjDfX3zvD/9a+fcb1q+fQJZSVh\nA6VS3RFRxGLU5xcMTBEwIhGj/iM/A6LRDzMz3bTB4/RkKEBchWdpNSkQXjMv\nOd5G3jCUYKQka/JY5TNqI9eSlAdNIe9uNPWW0KoHloue6gEjaemfwq4fYKUa\nMZh1QoWbSMLngEtKy1XdMdLTMa1GhE4Um/ENneGp+kSvEYNHXFdSD3HMKv5v\nh/NJi8cHpWewEvFlO5VKGra5X+7PrIw0B7JvS1ySF5H0RLxC7kKqybpY5i4h\nTNJJ41H3ewCJLJecPPTfEJLQY7GJ2KuRR3MSP+r9yeS4t7+5vGMT8JP1PyPD\nHzBYL+NxLcIM7WXm7WRGZIDVJ/XLeo7r6IbZU85gtAmJIbkbg66MQZbwLM3Q\nuWTv\r\n=9Dhn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"b975b5de4485f69803fbc8c75566aeab3a039958","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","tar-utils":"^1.1.0","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-b975b5de4485f69803fbc8c75566aeab3a039958_1552263631025_0.7296915074387411","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-9c1c57346328d96f50986d92f5cc6e00b7a1c2bb":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-9c1c57346328d96f50986d92f5cc6e00b7a1c2bb","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-9c1c57346328d96f50986d92f5cc6e00b7a1c2bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"09322af478c8c34d98ae0c96bad8e3c3e2a7aa36","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-9c1c57346328d96f50986d92f5cc6e00b7a1c2bb.tgz","fileCount":35,"integrity":"sha512-4GZE1FwZvwAPKkSTllNMHZEIBCaFJPnqX8b3pMYfk75pnK9aIe9L+Xs1ahZJEy55uksS06tE8Xk/UpFuYR4dQg==","signatures":[{"sig":"MEUCIEU5KOIagrT3opXiPavgsC/ogdduh/nKMxQqrXrF9myYAiEAhricK8F6/2lXHixMjLuAyUgtimfc15dZ14JJhGHxz2s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcha6CCRA9TVsSAnZWagAA8AUP/2+66JFivOfdcOnoocJw\nPP3VxSHoS8/uPlml1rlvachTNuY+n8iAkFY9egjyqz6BUohn764X6eBedPlp\n/COBUXhq0A2YHVKIGj5S9Xbb2GhEcgp4VmXY6qw+9pX9Z0KclPxbXx23rUdd\n+I/TpPLwn+NlmFXmHrfgQyGT2NNmxZ5amrEPyJuA6cEv+Z7oHLqV+UiP1VfW\n8mHMtp8bL2Jv4/1K/wWYYFkjxanbIPWoA2rqTirRAj4qKUESFJOg8TKTUdax\nSjg0/eb/tUUGr0GHbgLy/cWiIru6s8z6nQt+N2NiQC7hYwBam0xbO9yNqSj3\nxQeAnA0o4YuUVQrezUYZCL6gf4WmH5ZWSvwLCLNvt1Bj9iSGoHIVokqsRKta\nIcyrW7RYFtji642Kwburu1aP0pG8augUaXUzcdV7TRyB7WyIIQ55qiGPsKeR\n7QGn6slq7aivVdy0R4e5fJd5JrfWTZDI7O4rki4EaFl3zIsMRnqYgXyeusuU\nmq0MrBH2OMa60+hkkP0Y1FOLoy5l6pLnNbszulk5kyWmtRLTuOw8D1H1Ey2l\n5rpFUtnzjGygADuetQNYyB8B3lA087eQIFKCtbzOLzBgy5LMNSIcV1RA/sWS\nideN2vCSSCatguENtmfwOQvJc8avL8nRnmeKu2LRbFajmf9GLlVJ5AAhIYY4\nr1DE\r\n=gRUT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"9c1c57346328d96f50986d92f5cc6e00b7a1c2bb","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-9c1c57346328d96f50986d92f5cc6e00b7a1c2bb_1552264834298_0.7337398191536884","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-02b19dfa05f6cb590ad8e0164d1bf054c3a04819":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-02b19dfa05f6cb590ad8e0164d1bf054c3a04819","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-02b19dfa05f6cb590ad8e0164d1bf054c3a04819","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"c84e37813bc29d1c72825a7b459fa7c36461d5ed","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-02b19dfa05f6cb590ad8e0164d1bf054c3a04819.tgz","fileCount":35,"integrity":"sha512-0g89+s35GKbyJ5tBso2JU1oZtkqmAMEk2RMLB66FrHYJ3Hi4NnPMo5A3cOAsYfFiufdakVWxtiGoVuZy9jMrQw==","signatures":[{"sig":"MEUCIQDSpMzIOv0Odu3YNauE7wUVqcdUAPDE2f7KxoeRtYK1kQIgQ/ovQ8BqeAu7tbTQpfQ+xguaxUOh90sjoHbNdUpRKJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchbWwCRA9TVsSAnZWagAAtosQAIJB9Eyl3EOrphfXzsVR\nwjcND7apOUpjwkyqcCpKIxgxKUxw4K2ZA2i4BE8H6uSwOvCk+QGPdcwHkkTS\nzBs9M2qYpwurgM+zVLqbwST0rsn3V/cXC5L0rUj/BJW2sF19hGE0i5SeaW2n\nPLDR7WDNOlaEc3Wmj2Cov8PJiNW9Rcg6gCV7HSswOq+eXUdomm0HnhAC6NTm\neOBjf3BMgne3DO911Rm7DAAbqQemTI5r7/lM4Jd/Lz6telN59kssabh11Zcj\nqS70skmqKQZ/AxUB/PfSvQktwX00JCBR7reokjTMr2bCKrMzeETJ1PuuE+0u\nnu5REe5glrbKc6EkDIB/cVcFKmju0US/xmG3mqPmWba60jOB9bEUn4F7JiJK\nf2YJnwpW9rEno1xoaA6Olt9RV80bfSBEnewcOjA7J8RWlcn8+f4eJGTOibac\nbGYP13u8iekvb8MxtL/LVFPxZfz8AyQpX4ZHcD4jhZ68qO9XwXwK1WAJypEb\nSk3uqnyxoAZTEHnUYOIBPVmm/R/WB6gr4yubpN1b0lIPTf+8OjN1LuG0d8H8\nex6xOjTLpY6WV/60JE6kBlOgby0/j6CifcGnkCwC2x9hMHkx2GRNQNCP33AO\n9eBz39nKL++BfTER+TP32LcU+HaE2JMntiJFmLWrGF9lnw3mKM4BcGwCXqLO\n+MtW\r\n=ZpbX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"02b19dfa05f6cb590ad8e0164d1bf054c3a04819","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-02b19dfa05f6cb590ad8e0164d1bf054c3a04819_1552266672154_0.9953012962457259","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-a0bca27fdd8de9803197dd67b1fa00b53092ad27":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-a0bca27fdd8de9803197dd67b1fa00b53092ad27","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-a0bca27fdd8de9803197dd67b1fa00b53092ad27","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"79b52cdcdf0a07f24433f8e0efa846544e15d273","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-a0bca27fdd8de9803197dd67b1fa00b53092ad27.tgz","fileCount":35,"integrity":"sha512-SYwyrlLwPx3/qogod1draqfmVErv25OiPLfY+tL7kQvwF6lm0emcYWWJPYAuDmD3FSTy49QMXlF6UhnE+kVZ5w==","signatures":[{"sig":"MEUCIBPga8KAGJqW+NKfGOYF3tF/fVKN4ujTI+2XeLnSNWtgAiEAypMWAvmBDQJZTEQmF5VE/94zWHZaj6JaJVrtdX5YZuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchpOkCRA9TVsSAnZWagAAlfwQAKFNbQZuJO8R8EowWeZJ\nuWljvUL44DYrdZQbKy1J2kcRFlZdvaK3DPXmCldER0TZdsvRlhKAmfVXleBo\nht/bhzycdk9cs/c86rGzfUd6zYpSOXkDrai80UwfHKlyqEVM9B5kGX/zYT64\n+3YNww3PfCIMTYb9cLF2evWOQKe/5IvqAoeNLalo/ZmaRITx7GIcs/Q++yS1\nIJzTX2yGAl3oxtKlFN40xUfXS10zTvW0uPWFG7Ugsq1EjET6pXvBvcSdtaAF\nKhY3NtDGs+7GfHcJiW9uFaxqsM0K8TWI7hViH+/RMLb1XdauVPQIuyswkffZ\nLkiJ9BMzL+I3mD/SDpol+QIbx5bdG0CXiUdOV+dHaJt8CrcuhCDbo5kfCbb4\n7GByEHVifR0w8ptoKeoip3feQoTkXyxKy57owfHxzabLxa5juZmTom7yPEcf\nbKq7gBukatd03cvPlIuRtHP+0w3JhaNTxXTeLkLL2I1JubAL+xKDj2Rw0r6T\nl5REg0vRtY19ug3qMlrqp+9+qXqwymIgVlCuEbYD9kpzQIaMkBXfX5+Hoak2\nK5UWB8S5o01s52ek/CQfUde5zOOtyRyaUK3uFxxrMw0Wi5APuB+sL0hdR7dO\n/vvZ3qemSNJ7U5EGAnFZeTFbxFlbKdR5EdOn0rYq3jFD9C5Lakcc/a69GBEg\nuA/5\r\n=/d1g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"a0bca27fdd8de9803197dd67b1fa00b53092ad27","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-a0bca27fdd8de9803197dd67b1fa00b53092ad27_1552323491801_0.2898415815682085","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-c8bb8dd99c71b12fe696fbb4db2868fee161e337":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-c8bb8dd99c71b12fe696fbb4db2868fee161e337","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-c8bb8dd99c71b12fe696fbb4db2868fee161e337","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"db7ad8f3d377be5fa983247a32c6676d0708060c","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-c8bb8dd99c71b12fe696fbb4db2868fee161e337.tgz","fileCount":35,"integrity":"sha512-cgajJquz4RsdcO0+1bLOuyCT2i8qYlxXRBBAVaTc/ZyCmib/iJoPI45i8JLR3d69gy5lhk4k75awZss4ct48sQ==","signatures":[{"sig":"MEUCIQC0v7HkOXHufUGJFRHUtSV8SmE80qJL5P/K2FgLjJU5HgIgBxhUuXEbGvT4FehBLQZM/SJrT/8jBlQSnHvdCLc+JZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch6qSCRA9TVsSAnZWagAANe8P/0/wUD2lqxT6OmaUyn0s\n0AQ6ZnDrXYLrCM8QE8ZwOE7QfOqCdOr6caA+IazRFgx2+VMfjsfirOfcsyv0\naTvSKTcb9//8kDBYKrZeJoyi+7eTZWPnEi/hLyb3PD2lOMQUOmTLXR49q9ed\nAK1omM8Vp39jvqGmV1pyqggZU39CU0yfsrEkPmIBdqFj1I717ptqrx2hWYpc\nJPwDZVNOneHMohyHBZJSrSp0bsC2rECgIjJ9ZjrazmYnmIiIOK7kdrOdiuSJ\n2CqsC4Bih9wdi5SOqvRItyxIO3L4CSUP9MatmjXLFk7XFlMIJpuCM+Y6rrcB\naVDWlsCIYcMv0tEaStEEcgvj6ov1gFm9oM+s2tVpS3AW1k2SBpWb4gnHuAE/\nm6SBx80PiEFmBIRpkCwgW05t0aeggu2ImvHG2lvl0C6oBb3Z3ddfR4/mElaR\nHq5aTGceMolIcjRjAF06NhyMmeT/WqYKF40UxFK45cinqrabhaITIT+zG5BC\nEdp5cyUmOCxGnuIeyFnKsFMxwjTzVQ99TkAWIcoUdT1BgXNqOmRnAiufnVFC\nrCXF4hSxHHxnnJeLrQ5uWU89C5Mj9jCCk53eIifI8hlH8hYDVT6nCL0Ht35U\n8dT9++ZWvGMH8u9Bn5K053kf8aMftVUANd206YUkjYQRLOpKEdXYxsQ8mC27\nh8sI\r\n=7t1/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"c8bb8dd99c71b12fe696fbb4db2868fee161e337","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-c8bb8dd99c71b12fe696fbb4db2868fee161e337_1552394898073_0.18763341228234243","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-364420797303bf9205f3691a7d86cc315db27110":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-364420797303bf9205f3691a7d86cc315db27110","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-364420797303bf9205f3691a7d86cc315db27110","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"b9e3a317cc7e9669d637ed9201357053609eb222","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-364420797303bf9205f3691a7d86cc315db27110.tgz","fileCount":35,"integrity":"sha512-vrpP6GPivdLtQOOfdjSzYCMetVmDB+OFfhmQXT4xD1hWwyXe7O9o0pMgcjCRZCkTKgG7fPNQPONGOwq951WsTw==","signatures":[{"sig":"MEQCICHGNCVeExhMhFEkUm3uD4VdCgzamn7DKr+iNEt/EipjAiB3gP6skCUEBu6rheymaBr3Ii+ASMc6NQuZizstgV8lGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch63bCRA9TVsSAnZWagAAlfsQAJnCXhxlBsnDhkbLJ+x8\nHWz13VHJqPas7gNHyUVVqpvbSlyxnWaKkaHw6wPxRdvai22ygNlXXDIZlYv4\nDM25bu7+TSdi5Z0NHIiLWqpz0ebRd29p4OqYcEe1u6tz6TvDW/q5qWWzrigZ\na8nW0RruLUQX3oHLayX318k9pslpBe3K2Z2NEdQ2/nHplua16qdQ0dZ9M9wH\nGt9dc+DA2rX00HLTZ8DmZe+9GBEzBEXrLU3nnPUEkiSMIBnzVfbVbTmJ2T7i\neLQa9/sF+Hfc1ezcl4t1sQg9Oah561OdKv2HHr5qrjVepPkPh+Jr5ibUGBUk\nZCsi/Mn3dYUv28KuhE7/gw3eL86VC11TK4R0UQGY+ZQR3/Z69s8H0UZdyAhE\nXjc/NzeoDaeXZmyD2u0RkE/+rYd4Y5fj5kb/+Xb9RUv4F8u4ZY3pKpiO62sM\nk1BBnYKMPFQjKx5fy8ekY9u+c57G2rG5N23G6KCCYJ6of1w/Sd+yWxeGm+uI\n4aEVbZadS8t4Oy59Oj+032ho1wqO9Z2Bds4mMgFItiS0tAIP3DHiO1Uc6x/I\na+mITP+OA0+0adzAUVU/CQwVLlGR/CJPnJSHZ4RnioJchKkPWPWIQbYIt+C8\nJ+IXhrtZ+1Yu5KVsMHTaqSehJPzLe2JLmc3cnYLVI488hPgGFnwZtOCdor8a\neCcW\r\n=Ekbz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"364420797303bf9205f3691a7d86cc315db27110","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-364420797303bf9205f3691a7d86cc315db27110_1552395738604_0.0380365146676962","host":"s3://npm-registry-packages"}},"1.0.1-30-catch-more-errors-in-createBuildStream-d3ea9b0c87a0cbb75349a4550a960ab0ce049780":{"name":"resin-docker-build","version":"1.0.1-30-catch-more-errors-in-createBuildStream-d3ea9b0c87a0cbb75349a4550a960ab0ce049780","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1-30-catch-more-errors-in-createBuildStream-d3ea9b0c87a0cbb75349a4550a960ab0ce049780","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"0ade9445a20184959168e44c2ffae5716d5e7912","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1-30-catch-more-errors-in-createBuildStream-d3ea9b0c87a0cbb75349a4550a960ab0ce049780.tgz","fileCount":35,"integrity":"sha512-p9SqkpRPtjTBxmIhRVWabfcY3l38CN8uKl1NoS7Qcg/95VY2p9CqT00QJrAm7WuMSlg/NIi2aUIH6GTR3QW4Yw==","signatures":[{"sig":"MEYCIQDc/omAtqwvApNoThlGcEdWse8MkjMTN6EXy5CsP5BvAwIhAPWmROM+FlanWur3Lsdo0zuvJLo+0pfXh/QTuk1UdX/R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch66jCRA9TVsSAnZWagAAcbgP/jqWVrCk5/lHQAnABc7K\ncnQiW16FUVxXJ0hru4aQDk6vKzSVjiTPbtV19vc6lt88FksGXgTzikbrfffY\nhCz50P3SgyZmeqaRM6kxoCTkLVntvNZsuBuCYnUXj1FBV8UrA9LFS7GGnusU\n8JM/iZjMhSw3v2VGKS3UXUVMbgJJRf/pJ8iOedi546gL1kY0fV84IhQgT5ew\nb+a7lx4KFAqHU/J6nWXx71rM5usnP7EODB6E6o7o4XMGd2fPYEhyDnY6NQN9\n9Q8KjlBx52kbsyRFzAFCpm/rNzlJVEEi9vSM0wRifYekcB/X2ROWluWQpKkc\nBElitdSsL/K/lMMgghEd6QZ0tuwNMMAx/npDmR/Jda8v4mBu4hVKxkU2dqWz\nmLxMR9d/mlQmNqsGt1Wjou2x5pD1SRUvFEOCWJGGVlo5ZP/LmJFK1rQOw2kS\n8ILIEjGDoGpSOvLOHcTvTOeb1ye/ilIE8IZmaUUJE7D0VwGNb5tZKIKeRwfn\n1WkJh8Tro9UA1qaD3mZaNrYR+k0ZVsj26Ht2Sd+R5xhv9VAXMGDU856KnFBK\nCWTfRm8MdZD/O+jOQjap5jGVoyGY2HW7XuOyitapXGx+2NNkiJGclD9o42Pn\nkQKfF6lfRNjXIYEijlKi9AURs7lI2FQtc+uMSlinUqbyCAzuW043nLUzHWuk\n6p8O\r\n=pjDi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"d3ea9b0c87a0cbb75349a4550a960ab0ce049780","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1-30-catch-more-errors-in-createBuildStream-d3ea9b0c87a0cbb75349a4550a960ab0ce049780_1552395938923_0.5845076851143762","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"resin-docker-build","version":"1.0.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.0.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"562d1ac45115f4f51c27b39febc36934e7f537f9","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.0.1.tgz","fileCount":35,"integrity":"sha512-qlfGxDWgQ8JF69fpdv0cIxoO/11bo11s0yttXPWO1EiHexnJkRF1QL6UOhvOlc9veHFVImEpTggr5TcfDi8G5A==","signatures":[{"sig":"MEUCIQDyImmnd+wTUEZWdj48eQvsshLDjtX7gDeNmRmIwgG8NgIgKxawGClEbyKwITykqC9u88/f2RgDjnYNEmbgZ96mKco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch69sCRA9TVsSAnZWagAAJjsP/jtOPZVy9pmenCRzdT9g\na1TuX1SADJUtUlx6BnkWN+Nl5SghUigfzZPEl6iRKJ/clHLMzLmtQQjgCdOH\nmhh5v4/h3XyMifEP/y02Cm+4tqGB459fYzeUcTmM7nb+l0XICGtS36s84PgP\naFSkKSwRrKsWGko5lvixBALlD6CbbaXwi5eXUW97Os080f5eJ2RK29e3lwlx\n7g+P9cbWaZlAveLKdJmXbiTgrCbbLfXPuQUmMfNT4c4fJyyAw7Kb8m+w23Q0\nQ/vbr6yHWM19hh9TjuKVl7X73LzhJhCsn1GnpN9MLwgOJTEoFL9aX30D4gfc\nc6TuOk1qGkkLb2ZAAZ8Sc8qqzfJPbJbSLz6xQxeWtj9e++AIXxqlGGUbdo7g\nAE2W5v6PBoDD8dmWjF0epjs3NDyYq3/jlQ4tEcAF71HK1E1EW+nHxJaa7rp2\nJCFUar6dOlLIeLUBF/04+2juQ5yYcKpJIzRWwaAb6f1djbXIcKLr5aWf+ruW\neLoVV9CRAxLyy8NbmW4CvjhL3JTkcZ96Q/CQcZctPQ8DuE3MVH3pYUBuwCCJ\nEfoWZkM1J6emeGNQ4LW+VKW5diprL28LB9ieUZkWRguK9a1/UQXkWuGYOZT/\nytkVrg0+neZq6RBot93uaJjZvY5m10mXr5s4t8/vbASSOfET0VxyvNzo/XgJ\nvc0z\r\n=6ZTh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","gitHead":"8e90643a80b4568f52f2b1bba457f54299299c93","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.7.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.0.1_1552396139392_0.8648902714505158","host":"s3://npm-registry-packages"}},"1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16":{"name":"resin-docker-build","version":"1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"823a378b12e10fde7600f27bf80ac9f1999866f8","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16.tgz","fileCount":36,"integrity":"sha512-5CN+QQCzks138zDGLDGs/Jh1ZsfWZjZ/x/RIq4S1BqmcBAPjvja5Y457OdGn4Pawqvil4629WwUwpskVAeei5Q==","signatures":[{"sig":"MEUCIQD5jnu3oZlqsWuug5eSX1orxUJ88H7r3NHobWReEU+R5gIgJLAttdnYAx0Dd6UYb7ID9+/FSA5/gocqtXAFY0qItgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wwzCRA9TVsSAnZWagAAuhAQAJlNlWVyv7O86FtGbugp\nlPIb8Co382grXMI7W3P8QSQLr6xKiLD1dybbx9pyjWSVHbYwQDWRhDJb4HrN\nFQhqgVYkosmnnvmsfWI8VsMdbMRslQn39f9r1pgQ+giDaVAsnK/toiQ6/3Go\nIq/Y5W1bWqqlTj9LPW2P5QG4+jpvhHITTw5CBWTGww305T8QBceRMLgqNrBS\nUIudDQBjC+1qRACmYSFn6Lxl8Q750AGSCw/Yq2+D5+g3T0EmsGgxjhedAdsm\n+9YJDUYETGaq58kfak2jHS2makp9kZTd6lQyLhYV4kXmIlZErRw5WGgMM5Mi\nuuROuK0E/Vqmti5/iT5Lq42BlVT82QFtp1MjCFzeCYk5GFYatFriQf6ZZVPK\nxBMsDu1833YUUgVOL4EIBiWTpgWO6xOM158nEVIZUmtc6vVVvg4dE7Na4saV\ntN9DqkodJxHqGNGeRAewUcU0ysZTqf+qrX48yMMlkMCftWYCuLgmf4TyL7R8\nmC0aIZY0RayGHhX8wPzkbpj74V2hVXXN+5Aemf/e7Dno3L5ou+bVCQH4i9nf\n7OwQY4qTjUtGwKDSyrungnQmdchbEvb6YuTtJljTcQWfz/L/+cEpBZk2Gruy\n9T9eBJuBev6guXGNRLuoDy1Qw+JJ5ldUIegdRJTQu6WyhZPGhvdPfxPgm0hc\nFhBz\r\n=zflI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16_1574112306969_0.8145309651482513","host":"s3://npm-registry-packages"}},"1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd":{"name":"resin-docker-build","version":"1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"3ae51c4449fdbe8469decbc489ee68d771f2aba8","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd.tgz","fileCount":36,"integrity":"sha512-idpeshWEdRYsTHarsllbmLiQMi5YHkcJ9s5Wc4goJmtWFeKxJhP2sLi3ngHjyQbEy7NaOmJKUYhhkhyUpctLPA==","signatures":[{"sig":"MEYCIQDcicY6Au+Zkb2vahPANLnMFQKF40+zHU5h+0pUMp8LegIhAMRzhPCOev1xUwnFXI/40LM8w49m1hWpGo7Js40t6JP+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0w4FCRA9TVsSAnZWagAAMCAP/2PtjYx15AeMHLuYdGQX\nV9hXvQKuHPfLbGrzqv93GerP8PrQfGArpcg0SKbsVXIyW2C8oQJ1XXbhWidz\nnaLahp/FuIqwY6IX5KYEdB8S8d7vtWoSGunqNvn0fOXyXt4s87XAj8graCKT\n3dd2f4cERsvM2MUO2DyojIEzHUSswDLZ01ppkqg91tkqieaTUJExSBg11yac\nVoj+ZNx1rT5XpzXWuSIhpse1IEu81MaFywafA2mWm8S4vU/6KFMtHtm1Q2hl\ntaJHo/+3IIKdrPdWKe5U29OUbcvQpDS3T4cuX59oLch73M7aqQAjGGilOSjp\nCciFMUSvapjjY2iEX9REOzQJMTlksFerxAA1JwBeDAx7YT31yryPnVuGfKlF\ncyoisaLT+CSmCTSlh1dFyPDbpkqRs659F6WetbDcnOI1NUSfU+Pn1fwpaLkZ\nwTl7pIunsLIfTfwR/gxjsRDpxeJ6j+yzRWpwIv06KrFhfHrb9r67cSGF3RwY\n4DvpN9YEwC0AewPmpCGlSS2lgZK0dwEQ9/CFNXQZc3GTR3/EiWUMnfN9bX7T\n0HELdp5Pg2iV4tGn5ZPHdaFf68Yp5w3jaigeET/coiCLHhw934RzX3nnrRg2\nwllbP8zYVkWO/Af6mmxqzbeyZKuGGIkvLEeWwRnltLXdw8i63W937XE2H9da\nMFoz\r\n=HBk/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"8a2203b534a01e7e5089b81d1b18366edc3379bd","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd_1574112773256_0.4654225539256338","host":"s3://npm-registry-packages"}},"1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864":{"name":"resin-docker-build","version":"1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"9963093597eafb66ba5577e07be6134054d4f97a","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864.tgz","fileCount":36,"integrity":"sha512-D3XG9hi9usbladkrESrYyvzWuk7z9BrjJ6hmOdKZyFZFA+zrGUWNk7bd/WtAcklWxy7NMjA2Zb6BRmZuX7SOnw==","signatures":[{"sig":"MEYCIQDS/Wsq1jfu/jUWdVqPclDzRg93h7gn7kpJvGxEOpipcQIhAKMrZZ362Dhu51KBEZk53L+TaE6JNjNcIGDaz/yj45If","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd06J3CRA9TVsSAnZWagAAhzEQAIPoJQh9KA+eKbkh4vVc\n+nrk34VKqgjQJ5Rg2+kaXaNkiR/PWibafHQeluwLoAl5S7VFTJLbXPxX+ie7\nv1hkFJKA0j41tTHwCD8nsdXgk8M1goXF1zzzcGd3E3FuSYB3upoNo6KqOFSn\nItCyIpuWXZKNhotJk0YmsYliyrDPw56eXGffDbImI8v7rLCBvgzrr76uhS6j\nIEtDXkdz62GtynDnn8Fw21wdCIqgWgUzRlR/vcg6yi5bLUjioNKhc2j4caqi\nkltKo3a2YEhcnswdt72qC+NKb4CKQcc4GPVzckzF/MqnfHb0vSXU03Dz5VC/\n74+Im6dKsTmH5NkcOL5cLITOvRrraa1lw79qBGWdoMmDPlw2+ad9Ai2tXMLe\n7BpGPzhCU0uz44V2hPaGjdmePM9QBAflJIvsmIKgYqxRTze+tWsRaqW/p2z2\n+K4ChEaA1sWEv5Pe5dt62KL+Ub81g8ZwdJHHtKelqH3bjJIkspl9rNarQMra\nRHr/OHZg/QssDIRFd95XOBRQqnBWmRnYrtvJ7S+BM01gxmwXt4Zcis7OP7A3\n+rzRWiCf0TMUZgnqwXexpNE+4coc3NdV27y/J+yGM2J+obfzd3TfxSOTu2jx\nAiHLN1sUMjQ1XiBsNJA7PtD9D1J1KIw8qNLRoN7CTsR6GZFtEvvV6FsLXgc1\ng9d1\r\n=nsch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"79be885c1914a8ade7114520692027a8aa4c5864","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864_1574150774515_0.20271741192051818","host":"s3://npm-registry-packages"}},"1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375":{"name":"resin-docker-build","version":"1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"8db4ba19e5abad393e9024a4760fa141374a6579","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375.tgz","fileCount":36,"integrity":"sha512-xPqce7zEIXYfHtJoNNrW/RxeVHvqrOGJzwR2Ql/7A+vTw32khuaGwD4Pq9PQFLdaOQR2f+ZKovGvezGc6pdYdg==","signatures":[{"sig":"MEQCIG/vPsoiWL+eh3WbXhbbs0rZB3hlvmHA8/o8QTTAGGj2AiAs8iAXNd/MjD1rZWXzyWpQ3DWMNSviiQN8kKg11GdcEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1ES6CRA9TVsSAnZWagAAk60P/jfc8smTE5URbvO8cX2J\nhvMHBnPiBamzgOkvP2i9pRweTh5wuU8jcr7oaEgpEZhgpw/Mi/NBgvSMrGGX\nWzRrn2hhwkhWt9A2FSxDRjpWGvRkXsA+yBUeIqh15ton2edKCS7jvBegBtcO\nDAE5R1HvRBOCYxt8aXDx00aCqkaPeajKX5oZwFdBSof+C7vOxZXmQCFwKR+s\nMHXxe2B9OHO02l33D6rARJSRbs1ZRJTNvnA8kYDwnZ594iEvi9obEwvnkQZu\nvtOxg5biqbJg1cAD6Ti6fsKxvILGwA275NbwHTJVZ8rQANsYSCylP63Quwo6\nK+MTS1tGFRM0zWrNeRddUXO+MLN3dBZxakC0DLFCoiQGzPBVasMgovsXQs59\nHopeI0TK5kWEBqE2/PsKLZRxbowLDFVokprHAu3LlcwLmeFnU6UNEeWjsuCG\nCECbm+j2r6ZvzxehJsy4txinjQ52cswQtueLq3dRLGDWNkVPSt33V0iV3+JT\nYZvCo7ELgtg9tDseix9nuj/CHTFAHji13hNfmCIPAd5SuOcT2B1fWcRc6GXm\nwZLeUyJ2ARzmz+okgroP0VUVyfocPnrsHNjxvd+l0rNFEoKnSPeMBEDKT7Qn\n2Hk244oOPAAXL1g8yJSUM8/eUR69/kxoVlqOpZ+KguCc5kOwolpk3GRJjHGc\n3FMl\r\n=Y76k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"3a6c2064e48d113230cfb319dbf87b5c77df3375","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375_1574192314385_0.35329729760361883","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"resin-docker-build","version":"1.1.0","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"aed13a6b3fb1d5857aac39d757fd81afcedc6449","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.0.tgz","fileCount":36,"integrity":"sha512-77f65CEKWcFVrAOVc40GqqFno8ho/6zmYKRLLmgMNZsJz3p6lzm26CJ1S21fIfkT6fEjzDJ3z99YXUyZgHaBOQ==","signatures":[{"sig":"MEQCIFzLBeK0RtivOv9ENNWE74Ibq26/hWjPKvCigCNkCsrsAiBbD6woKCGLW18GOEHCqfMqo0qxV4AV9xcAOVY7CqXdEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1EXMCRA9TVsSAnZWagAAxyYP/3fSCOf0qQo/kD/4d0qS\norXPg+dR2pwEJ7Nxpv/i9aqZYNpVtSBeVOKWkIRWLtMOuiVaUiqp3Zx22rkQ\n3PBsaOQlGxvEqpbSUDR7xU5/xb+bBr2IXxtHn3mMyLJDioTDwh19gHg+XBL2\nCYitWBgaqtfmMbX421eGmx3/cUxM4zsF6BsJkEQlI4+VE1iEXJqpOcOs+oXO\nU8eHgomHyzCg5WTIYokgCBjn1hOvZntatPJRvskB9w9mpVAL52GQjCIYOUOQ\nfyLPfOAPA2pDwhfvzgI9A0qlT1+DfP7q7DHklFas7Wskuf/ELyDfThK1oH5b\n8IQlBvUeMQx4PvD4CMjlBGqcxmK36X2wJwMtEesbDvQkJIZfu4Ars9a/IeO+\nWPvd1ck2qJn1XUhY2BgLEWQaKnntA41JKSDX+xWALwFhauEXXUhFdmYEt40I\nihoP+XybrqKL9qxAQQFuORWE2cjP7cy8HfKA1CF9X0hikbe9bF9GpY6fMedd\nLcN15HGVym2kbabma7JmeBhonDaeGDFekrTLp/NRuB/TA0HGMA3VNMhgQxrG\n2HqVgbaVZAKJuZPzxHLPzfgURMxerf/SdviV4tNbRnU74GGkAer+k6JcWoJ7\nMiAy6BZmzHKXlxmo6UCSOW7QBvNKvZZV6bP59PZXCpRBTSWhdwb9MYsNqsmS\n517D\r\n=iN5y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","gitHead":"28bedea7322f91cfa015ca600551b366a5bbef48","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.0_1574192587970_0.3412386747587193","host":"s3://npm-registry-packages"}},"1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add":{"name":"resin-docker-build","version":"1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"2bc810f3a6d2a07c68381dd00ed511fbff39e03e","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add.tgz","fileCount":36,"integrity":"sha512-aRoXhrL9+cYZ+nkxiZYBaxu6AdZB7zhTJeb0zG3sbAt8Z/gV77yw6R5USfcGcZk2DI53V6eag5Wy9spb9MTl0Q==","signatures":[{"sig":"MEYCIQDP7MaDxhHzm2ntsy3mra3SJQf+j4l8rg3pjE6bo/Je3gIhAMNXwuJWWhwpbPJiGRopCiZaMAO5PhJJNgCbGrzn6wNs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FBxCRA9TVsSAnZWagAAMTIP/3ioNT7l9wh6xPZHA+vO\nJYfOrGBS8NMU5UuxDovN+bX4gZtXHLs5FQXykNo93kuUH1zCCRkqjr4T1CFC\nmLJIAObLTqq6qNW+6cryCi0qN6EOk94sin3FY6kAzi4Zof0jtx8fLJnx9qU0\nhczx1ccFT5N3UatMsEyrLiY6lUdx3nsdoqPrGQE6TK1ZF3GvETRH67zC7urQ\n5JPKmagRLwgYzJTnC9SwQy7p0E0bLsDb36wQEPOW//jGUBnDkZSizUfY4Y3g\n9FTXwUSQ2O1yzWad2Rq8dgUEy9tFKqy/aMlU7XSjETC3UYLZ4XU1wkgBMcoN\nnFNk01ZM7QlnkJRi51l8zC3+Wz2eWoPIa1owD0c6fxSPra1h5tSzuac0zyKP\n+UeAoM7mnwrkATBwNNUv+ud4oN+pS1uSZlRj8JfYAsEiDrO5cVOakfcLupNW\n+Ke5xNJFUaJO5CQyb8vfEXy+BMmA/cksfnRTrQC60wiXjSccONR2IWoF80+O\nQDmroBnhy+tBPMgiqqQg663Hnk7HSnVRGhKYhs+kPqEgManzcrKWufEKGmtR\n8o4U/V9E8JRzPRa/KJ79AXbmo6M1fyjnl42ERYJNL6mlU5Qg3h+IbvQrBnzM\nGQhxE4K5FaGKS6M3V8QzHXO+u8RbGWgcPI7q9kV52YcgvxNUZ4nWEASY8nmu\njpM3\r\n=wqN1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"4859eaf9d18468cc4daf272d8586c7127c606add","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add_1574195313514_0.44920570596351705","host":"s3://npm-registry-packages"}},"1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5":{"name":"resin-docker-build","version":"1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"2686ad0bf0c53b1090d05d62fdfed62a292a862b","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5.tgz","fileCount":36,"integrity":"sha512-caP89NjnRUavOOyfNmuFStYrxzBZcCsOl9D9gMK0uJhbTpXQU4Q3wCKzyBHdofGLzMoJ3G5TYmK0vK3CxT5fvA==","signatures":[{"sig":"MEQCIAZb8SlyWWV6WRU36ib1VhxQQDqvAStB/leQOnyq/Hz5AiA0wBaUzZO0k//TRXVwVITLAcAuC+ebxHRZQ6BQ8QXSvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FX6CRA9TVsSAnZWagAAcmMP/09PZM8aTOyxwBlNx0Rm\n2azX8eFQOliTa2id44Hs7/EU+9vrywPwyr+0xjBFWf8rjeBss6sGLZ36shhM\ndj4727nb2HYaQNQFyUHFCG1LDRkDv1Ip2Ket1pWha1xeit+pRmIFE2sOHh5d\nM1KnlVxzZ9dB80Xf+UEAD5DcAXdD+1AhOyztyYQ7M6yPVuN3k//X+6IiLlc9\nxQCTkiePutpvQ1oZn7jzRUBByh97ytOIGF0us/tHqpV02aA+ZrmBuUdNzf2B\nkRLvqXb3gLddWNyppOkkmm3OtdbINgNPhtX+6vQe1tXnRpwj5rOO05N2+DrW\nXyJA5hMHIm/qOVe0uHyRSkZYEizX2JeZwwJvgdOnU3mfED43w9WQRqjTBVey\n3kzJIyBLozgrFwf647Yt8CsgoYWAxYXh2bkFzf8CTLDYctlIXu1VZNPipYhg\nh1rlOdcq7WBTfhCbQvDcPg2RbkS4bBfrFB/LGg6LsHpDTSIki31+C3Q1RaI8\n/SiscZ1zQszWVfLcutqr/T24eZQl8wB+pqhn2mj58G20Z1QzhvNjoCwkyGn1\nYvhdj3GdmB+NWinI3VPZFmwcix2SLuOxnmBp71fQijmgAGslBOqM8/PmjU1u\nckA3vA6v0MpR+/5ijz0iqd5MrgVauE3IphErz7u0LHmHBCzIPrCncimxTV+T\n9wi6\r\n=XkyH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.0.1","typescript":"^3.2.1","@types/chai":"^3.4.35","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5_1574196729676_0.45990551593533224","host":"s3://npm-registry-packages"}},"1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633":{"name":"resin-docker-build","version":"1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"d1d6b571f92793ad2e657542b35c24e96dde986b","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633.tgz","fileCount":37,"integrity":"sha512-A5rxMPCidcZhjU94HXEJlACSgWU4fhLw4US2e298i3V6GKytco/xDx7kwpEelD6dH7AK8S7GtzvHnEE8I/FIdQ==","signatures":[{"sig":"MEQCIFMjKD0KYazMGW0URGlkZ0+0EfoNZDXcdouo/DVP1vz4AiBPEdk0CbJQ1t5QHCeiYUIjNO0g+aRYzWtE1UXeI1nZCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1QZ/CRA9TVsSAnZWagAAKBgP/0PDr/lyDrqsrNhwEZ0w\nRDpdwPD/a/NzpsxY661/UT1D+gJS1DNTla6UfugKIT1QHF0UUbnfvDb/5bgH\nzEWnGT6h47siQzIai94fBiQi+S+fKOGiSiYanPgunPMRwJ59TWYlF4gGiIu0\npPTzYO5iqUpwbkEQvyZgH4Gb0NwDQLu1I+0XhA7ScVbirfsbdtLdqgvOPglQ\n1pp272d15XEiEm3sAPD5TQ8nMfHuDf0aMuRBL2a1W16DHAngexRDrPGyh8SH\nDi8VYeFQmjfpstMX3ZcKc6mFx24aXxs3zlpvYD1sfE7SlICOaPKvORQL/5/t\nWg2hCSAjAfWPfW2VoYd2uY/2jO/vcKG5PkxOdHRBojuxBphUwpiHfd0kOEeU\nZ10muQM7gtE9aN0qhkp/Vg3RU0VVZcNb97ahBh0RsfZ/6HILxBeTbPuKlGot\ne4ziq1vjvxMF5HSaqAuEyZLJOa0LiVQ/PtrycyiKX9XDkeKtOalcmpVPTcBn\nT0MnDlmtWkRn3h0BGBwaKpVVNi26/r/tGMoA3tEH13HnuDn3PfsE499dl4rM\nhXCiZB2jWQ2YL1HwmWesE3XCqpGMBgMInpKwgyjMlJJKuvaDmOQFlmnZD6Fj\ndjnOP9yL+qSuZhLKYbf6lGlhxiIKxe2t+yXh376h1GEFbp2JoMBVtDcCLFgC\nma4T\r\n=1w2F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"f748185e0fd2aa186e604458f4b23ee96975b633","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^3.1.0","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.1.1","typescript":"^3.2.1","@types/chai":"^3.4.35","lint-staged":"^9.4.3","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633_1574241918584_0.678938046382557","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"resin-docker-build","version":"1.1.1","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"2b604697e5759e4556e5ac3040be2a184e1a6f1a","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.1.tgz","fileCount":37,"integrity":"sha512-6T2gX5zILhctaDQfOwTp/c6CLmYFauQiUGFHmGvhCJ2B3AYa2o23nZpbZMtwMDHkO8iq01J+DoJss2FVBDP9NQ==","signatures":[{"sig":"MEUCIQC/PdrB4O/2xrT3DR+j3p1QNhIcgnjXjW3edKAdCm6gFAIgWDTpNbRlzL/hvRQYl4D+tW+ouWHFsQIod8f6UkFobZM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1QfCCRA9TVsSAnZWagAA+fgP/RcPH/hhP8OOPFV3eH5p\ny92XX/SjuuAyLysiHldPb2HGGTOxNkSeu3E4ArXGDOi0jWtk9uS7ZVqcd+SH\nxIm0+juXGuvuzuA8ukppFBXU2iWuxtjkIvk8eYarOb/jS9E+2W8Yv+JmFYRO\nBrTCfmMwraD5yeU4ztM2u4ucUEyl6JBvIFU2vzU+MhZhardwxlokYb7oM5PE\nfVA5ic9FgnGfKaT83N+Dh+z6OFzCPDlw2gMoVXQw5oOntx1DjWYDHS0Rnkhq\nfhfraNWZHcyEe2SJ7HCDV/hQRlM4Kq35ir+BYPnTAVIyOK2LDgS3GvaRFEbA\n2mKkElcJ/D4zEf2t7irx/+xh0/LF+X2Tr8vZTu2iZBppWcJIz3I92DJ4ShQB\nH8vdA74MjHIWO7SBhcc361PyvVw3v9oPqoXoRRzZwxkQajPmcyCF1VORewj2\nA/e9h0zEHRDRL+IlaTRZ3iiPV0VJAqlxuQM8Bfg0cKD00Mob3uaQrXDsOjjq\nxKDTQPMFffdTd9nFg8PTkbwSw/tifIVGHlqhqTyp2RCbkUE6qpS2LRZ9drqZ\nFDQ51rJ/HC6pWcIhKIAlhEj2GAL1USGU1aiy63IdY9b1FZIeBOUsdPwhsFnq\nQoPdwifR3v9E8/ujLLeZAfovzx1ji8utuLaCcer9yH3m9gFAMWNvzHFpA98u\nkkgn\r\n=WEF6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"9f55cbb40223abfe7b2175e978686cb50d8d3008","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^3.1.0","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.1.1","typescript":"^3.2.1","@types/chai":"^3.4.35","lint-staged":"^9.4.3","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.1_1574242241702_0.10114778610960085","host":"s3://npm-registry-packages"}},"1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550":{"name":"resin-docker-build","version":"1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"4361f3b310e306339e01dceeb9f2b240fea534c1","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550.tgz","fileCount":37,"integrity":"sha512-o7hKFNYjKuVQ5wp/kzHM/j7FTqCGw9tMNkaYY+/vIPWVwJoKUl7QicqeT5E9RCKObstpPk32UcuYrjCpFU4tYQ==","signatures":[{"sig":"MEUCIEcqLbjfntaNhH7dCbGZs/c5lpwu5IPAFwfFhUiZI9y6AiEAjJ3YI+JFyDLCWiBcBEcThCdfz+OWcS7bbujlki5o9C0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1QkvCRA9TVsSAnZWagAAa3UQAJXGBalaoBIqWok7yPb6\nYC/CDSGXREzBJxrGxxdaMH6DxXHqRKHJUS0cMHkzRXHeLH9Ff4WlEU3EzA37\ndDEc7mDYWoBIC335HGOFT8Ktn6rOmWpWce3N+/9V+kF0+OFttBNkIBVbBDai\nV5AhQ1k54bug0M+yaBwLYxsbB0LGyFgfb5egKdCzmWkKaH7OcigEcuFH24oV\n79czz50KvG9GzrkZvryJxBL5UDaNwcEG8SLQKwtnaY392tYvNbXQCRiyReiA\nYM6EPdXRM6RdfJIlVlF3dmG58xvkF2Ih8VEx6g0u1EVkVF3OmzlLXx6cpKTa\nQGtWGDNp2WXZHeVfOj5TQnD+tTmFOr51/hZ8wawkfm/vXSldxSKmRNDY8qdH\nQAi6z3ru8hbfYZ91HGOMUUCOGiVdqgkTZ+fBtbuxyJPB80pwt8+lQeb7zEON\niljKhPP5B5Yd21MNdsBDnk8nHwJADIN3fikxHK925+XcoB+lnUtsCr1/1fLU\nclqj3dtYHXtx8yfz/iFVT2Ntmn7hA0E7JydRGCjf1a3jIqtlOi5c6xNLAkXz\nWftXNcHl/BSo4NSg8iIBdGjeCpci2KW4y9xDSLsINTrBcept7Gpf8CLi1Dkg\nA+wZ8jKfg6wbEMULrJi4hF0Dq08vhvoqYfsXaJfywKOy30CTiokKAWRETQ5C\niCtx\r\n=3tLK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"7d00b6264cf8dc21bb28e01102988745c5f3b550","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^3.1.0","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.1.1","typescript":"^3.2.1","@types/chai":"^3.4.35","lint-staged":"^9.4.3","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550_1574242607465_0.8593763533378087","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"resin-docker-build","version":"1.1.2","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"5cfcb6a151ca13a5317e7691d5bd06776c3aafea","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.2.tgz","fileCount":37,"integrity":"sha512-n2lUpWkcpQROpjwcr8GatTbnAvSIj0d2KxjJlnOGIkUlOLJTLMYrsDDCim6As/xC0GVtTWjz564U1L/VzXxG2A==","signatures":[{"sig":"MEUCIGZOFQFT6Pw6aqYcu+P00Dx+q0j6cF4OSfl+aEYEFdfIAiEAjh4Wnym2+UujSqE/2QJx9BX37rWyqb+pIRTJbKh2rls=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1R74CRA9TVsSAnZWagAAr2sP/0WIoNj9J7ddIJBMWQ/L\nOAhHy1iXzAY2vGOkilCUftssuCENAJFJiA4mqU5GuoT4/kZQDxd79+uOFYnY\nK0+NOJ10PvJo5GzHRXaiYPa5klddv1lvMpMm0/dVP/v0VQJUl2jmlAkbplxm\nQDOfPe9hCfrZ0tfKMiogPMjGKX4J56LbP+rVjxh5kFRZsyObWevpf0oCcisD\nuyL4UtMp/KKl288tw77OhQUrSg712GdbLHyqZxRVMPUNNsIulCrPTRY4lKVZ\nmn94bu7TY3OdLWwQFH4JVAVD5gu9kE5+X0IiQp77/tI7QIW0dzirRFxbOgyf\ns+MVoWw2oDrZxXwX0vvgKRc+JMkq7anteop/rj0QpzqN2MVZ6sgkc9S206Rb\nRzyZHOe5ocLNfYg5QSSIy4GVMQTwhVYSnDJG6gC6Q5N8LJH2bD1ILUq+ui4e\nxG1wUVd+xYGsshz4RMlS/R8V6DbvYFr6w+hkcDxXrm7Pnu2AWCYCxmwtgNN3\nZd9afRhWZw4y41h/AZU231AwR8ndkU/tqNvDu23Xycd4JDyN4gnjwAscYrtC\nVoxE8kpa8SaXs+Ff/66ej0RdHe4xkzLRPLnNRepyf1E9V6i/EEtXM4Br/Bkm\n/cbiS85AGJDdxJfdK/NG1fNTkdjmNokaQN8w9QMNnqyDgZg7aF1IEucdHdeC\no6he\r\n=PX6b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"925f8ac73fb034148ad35f27e073e82a7377e1e0","scripts":{"lint":"resin-lint --typescript src/ test/ && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.6.0","klaw":"^1.3.1","lodash":"^4.17.4","bluebird":"^3.4.7","@types/mz":"0.0.30","dockerode":"^2.5.5","duplexify":"^3.5.0","JSONStream":"^1.3.0","tar-stream":"^1.6.2","@types/klaw":"^1.3.1","@types/node":"^10.12.11","event-stream":"^3.3.5","@types/lodash":"^4.14.51","@types/bluebird":"3.5.20","@types/dockerode":"2.5.5","@types/duplexify":"3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"1.6.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^3.1.0","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.1.1","typescript":"^3.2.1","@types/chai":"^3.4.35","lint-staged":"^9.4.3","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.2_1574248184110_0.23623926341510892","host":"s3://npm-registry-packages"}},"1.1.3-update-deps-272d8802d61625a4a51ca79feda4a5148d892e34":{"name":"resin-docker-build","version":"1.1.3-update-deps-272d8802d61625a4a51ca79feda4a5148d892e34","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.3-update-deps-272d8802d61625a4a51ca79feda4a5148d892e34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"272aed63decffab77d9c9e42eea74cc4cdc6907b","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.3-update-deps-272d8802d61625a4a51ca79feda4a5148d892e34.tgz","fileCount":37,"integrity":"sha512-R15HLylfdsdAoqaWkUcqovHntaGEmqToagH+2KNiRacLaiFfkOPBXbFbqrHvBeiWe/Q9/a4+dfnJkR7DVm6tJw==","signatures":[{"sig":"MEUCIQDEdddOvYJKS9iYr7uafTa+72TAYyMmE3cKISH62q2gaAIgfrFv7GS+mhMdj5AHzLvrh8/gPNGZTmPRkNlfljgYzB8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTyFJCRA9TVsSAnZWagAAujcP/AvUd/QSFi3gXQQlLn08\nbIcjjYz4HjyDm2EbsFbjjZCHWjirmow6TJ9RpDQaqbhdBXmJRoiqakLPNocm\nI4ttXcY8yRaNB5yIymHfLDFFyv2ZvBM8RI0ArGQqtMaVYigMP8NtCw14/6RJ\nj8RRxQ3t2yoztN/86JWyZqUYWX/8B1DHtdhowaG5wSblzSG9g4ynr6nUEgcC\nBmvUsZmpjMunkJWUBDzEZHipE6O7b6xRsDl4EH8t07XiXcNRQjp2UJAP07Yf\nhj+mN9k3bYCCQV+KGrGgBPnWBu9lsHtN6G9nrtH3KtFQ6ultFvZxrcwRUXkl\n6MbCT+lbHUQtQEAa9KwHPiufcUKuylzyHOs8G9ONqixCI9czpazv/YCYhdKJ\nXt/qAeDMcfPIW+3HyYLmq/vC2g1RYS1CXodzgFd4BfZEeebei4J0SVXNiMPt\nfofA+GU/stBXG0sjno5XhcZkHKt+6xujeaKqyO7rKEltDnqS1fcStGljqrOJ\n8myE04AD9V39+waiJmT2j30NuWnLMXaF/VX2SwvJY0kZeTMj9MBIyR4zcxOu\npRkIO2JvTHELDTDH5JfxQixA7F+BbiyoF0JVRVaCwHW376mcRn4uvDB/eNL0\nu4C5/cbu807WFSXtx2xUlBh7l7UcUN+5KlMTkyeKANFxe5yxvqX7q5FpPgVt\njf9W\r\n=+Gem\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"272d8802d61625a4a51ca79feda4a5148d892e34","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^1.6.2","@types/klaw":"^1.3.5","@types/node":"^10.17.16","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.29","@types/dockerode":"^2.5.23","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^1.6.1","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.0","typescript":"^3.8.2","@types/chai":"^3.4.35","lint-staged":"^10.0.7","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.3-update-deps-272d8802d61625a4a51ca79feda4a5148d892e34_1582244168840_0.20786811492241575","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"resin-docker-build","version":"1.1.3","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"72d6c8abe80c7611b956a66566ea8df6081e7662","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.3.tgz","fileCount":37,"integrity":"sha512-E/oJ/vRYJjIvDM7Cvgz6iU907nMRfeCiTSu9iMib0tNQD3MIBnQnGZPMzOuvLv2Iw9QJU/dDLzx/NdpjB/mnRA==","signatures":[{"sig":"MEMCIFu5QOLtdEzPRqBwUGjd0accsrh+6vDZOqN5fq228kAHAh9YcGvZUY0BohJUTcigEYEDxJX0rDoF87HjFhn934QL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeU86xCRA9TVsSAnZWagAAyewQAI49cOCvhv5fCvKbamLk\n+yyNbwcCjcMgAaYuOqPehEyo8kNdFSFwCjJUF4+1svjeCsS04LsCeu68kyhp\n6eTJvdrmQBmrBgQexhxL8M+813hPPkveiJLk5qQtesy/Ym7TSzOLEUGQr16o\nTVfaIznwCxdKoaxJ/TjILD0q8JwccvK/p5QeljRZAQ8txe9os3UaiyZnroXL\nITdLPtShu7F7fyrH1DOlr+Z7IC+w75r0GLY5Y4c3mLHyF9qfMJ81a38UMajk\nE9KPmPJby4upbstJ1FNP44Ta9zA/jqseav4krOhG2p/1hwVCkPyaDNJ7FwVQ\n0mK4tK0OvihP8A6zeBAL1eaicnrfIIni31cC9s1YV9nt5+PfTdwpwO+9twIT\nWIcnuiJGgicdbbuVxGEtizZ4KWUUZmcs4SiSjWSKyMf5k31GjQ+pb5wYTEd6\n6wbC/R8KVtRFuB6jwM5dlM+iUPXgZ1vmWwUsus0uNPXiQn2aWcre1rstkTl0\nySlLsPuEW2DSzrMS4CpLzbBe7f0SNb6v4zs+u8zDTzLMl0nbTm7HJDbEffFd\njTU6czylYjZzn5bMO3TSynmS9oi15P7a1UHpf9Hybl1NweRUsIDDEQEn0iHn\nCUAM5k/MOHXXlJlZUP5LFUgfCOQcaYnqJv+81T19mPyfJkXi6iCZYTaj/4PS\n8wfg\r\n=G3Rs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"6193ac5feef285fb6a95fae7ee469111e0071670","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.16.0","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^1.6.2","@types/klaw":"^1.3.5","@types/node":"^10.17.16","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.29","@types/dockerode":"^2.5.23","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^1.6.1","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.0","typescript":"^3.8.2","@types/chai":"^3.4.35","lint-staged":"^10.0.7","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.3_1582550704877_0.3100185516829439","host":"s3://npm-registry-packages"}},"1.1.4-update-deps-5de9feba9f06589f85ff7628e1f24d1ce173e89c":{"name":"resin-docker-build","version":"1.1.4-update-deps-5de9feba9f06589f85ff7628e1f24d1ce173e89c","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.4-update-deps-5de9feba9f06589f85ff7628e1f24d1ce173e89c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"5875c27da5d0cf26f2cad3c93d5abfd4908ab8e6","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.4-update-deps-5de9feba9f06589f85ff7628e1f24d1ce173e89c.tgz","fileCount":37,"integrity":"sha512-57cGZrJvC6cwtEIFBp2lI+ev6FoDtEW7WlhyrVwW6xzxtILIK2Z7OH+QLiWTkMCqaDZEIm7ddwc0NVlDcDIJ1w==","signatures":[{"sig":"MEUCIQCaeCigOOMWsh/I+vT3acxB3VoNlOd1r4TBNcAF8qLbXgIgCSgw7hBW4ym6optQyF9scIeOR8XFpsGdQic8Bi2WnGw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXofoCRA9TVsSAnZWagAAW5IP/1BjNOOA0SS1ahM5xu15\nd9LfRCR04gf3XTx94ELXJmtrqwUpzlYs0tY4XZ+gwdPukOgyN6YTKo7T9t/4\nqMdj5AIwygmqFrqCG1Aub9vcaoON6NucS04NCUMC1VhQZi7s+MyK+XAEZuRj\nWsGVGwpkJL6xbZ3Ixs8lx+80NAB6ALzDJQweGAscD9WXugu7Fhb2/QGSqnJA\nNU8dxGcokvH/jzHpq5mWcvx7OgrV6qnzWbq8BewKwaupRpn4ij8w3+gCaELY\n5ReqJaFglHFLaT/O1K7GI7aJAe8PaV1H1I2TGma4jYxjbSuAFhcgiUzINR2G\n2ngvUw47VuDnM3eT21SvydS1K2paGKk6OZ0K7kRChy9Gr25or5+KsRt3Dwuc\n/S3yDFZ3Sa5bIw6qMPTsGfYinUJ2Hla7+MMddhSYrO4JVeA7U8z0MkvOkPWP\n5OmbpC/rhjStlYrgL0GWwV39tf7TrXIWN/RQAeIYIvpaLJB04BIdy4E8gr9i\nm0OlDefcwx0iwI/cmBUexLec+HfavYKeaJFLT0N2NOJ7+LgAADIA3snqYXmn\nP0+D86b7MmjaNO/5bmG/TRD4thbVdKPbDMvVIeQTYMwKQDvKj3fZnPtrvAxC\nsqxB2jzso1mPf6H1g3knu5d4A32wNeDUkwBEJF5QFuFHn2v91g2E81ruHB7O\nDLRb\r\n=wbMp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = new Builder({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"5de9feba9f06589f85ff7628e1f24d1ce173e89c","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.4-update-deps-5de9feba9f06589f85ff7628e1f24d1ce173e89c_1583253479607_0.25056970619104746","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"resin-docker-build","version":"1.1.4","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"898d4da2879101b44851d3095908bfbd60631d8b","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.4.tgz","fileCount":37,"integrity":"sha512-M3GlwlBMbknPKal7CIbZlrOAWDwFLJeUKgwdO/JAuxZ3R7wdXjQJuGutYoS4oei5jqtbG9G6yQ+RWgyHZu1ouA==","signatures":[{"sig":"MEQCIGPM6Yw6IH1OUae2dxmLQnElDw//RK6+jgmuIwVjduvGAiBfxfwZblCOHijE6bJZI5UenWG13kJAwLrN6kmvRgCpsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXon8CRA9TVsSAnZWagAAgOMP/i7Jv2yknonTKEYAIq8Y\nIWX0km8+eO81EbOWBd6V/e4R/RLHyig0npzrGNZMlh/I8XyYePtVAgozb8IL\nxsSmKWKAcsItQUeVBpZZxMdNWRSAJTHEzAFZC4qdamFlW8LtKzTeC3Md2yDy\ngm+9twqzV1SSKpSyQOXRcdRydr54UG+/7Dd0tNkyNOEPz0ADSdAnCwYdj4/w\nq4BV8tITHjgHOmRODy7Rg0WbUVLe113Eozi4FHPBt8s/AWnMtdfTfrTV2NBv\nCX36SbH2d95ldr52W7uRdRjZuajPriU9EQ4sDEZv5Dv4y7aLIftL+SEj9C5d\nWA3B+XK/W997ddLz7LjlQLMyrbq8rG09fuZC8R5YZU8DnMIeuvhV4S2Fi0Wt\nCXvvuYCyi2XdK4ltUBFTG1ONsI386aq1e7LzPBeOLBfR75viUz3oXFw3NEH+\n/2/e24rIpzPZxoYVLXT7BNcH1eBZmc5lg8+3gu4o3DO7fdml9MEIvCMpnW7z\nYQFsPkuLD4m60WKpL+jZPJKWUgpKXyjacg6GRCbW2s0Ugkc9RRVVODx1fFrV\n6ZKqlNq70p3VP82ltDQHYRNWxXZxTA6N5GmaBYvD3mTgJ06rPz5ZEeo+gLAh\n9nrdqLV0k7Uo9Wkn3eZTI94iIu1WSee3RsDAetsRBaySQRHMGz2yoYZaied9\nVwYH\r\n=2Y4s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"3504cfdafe42f150e21d9f62b8b436ab9baf9b80","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.4_1583254011646_0.6205477695381285","host":"s3://npm-registry-packages"}},"1.1.5-CameronDiver-patch-1-0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec":{"name":"resin-docker-build","version":"1.1.5-CameronDiver-patch-1-0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.5-CameronDiver-patch-1-0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"1d622a5181de5ce076e6feea4802129643100c66","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.5-CameronDiver-patch-1-0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec.tgz","fileCount":37,"integrity":"sha512-eGYEr4jtYSFhEX1N0pBD3JndD98Wv628AQJS861e/kVbwcuKX+qukz7bXnf4tfXwChCOEHlgLcqqAoYjL7IQUg==","signatures":[{"sig":"MEUCIEb9OVqrBpXBenKou8dSCw/G0UT9eZqA8HeZEicq+fOiAiEAvk0BtxFkeyyotlJS438F88oNFHUUcLo6jAkNLHk2JR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehesXCRA9TVsSAnZWagAAYWMP/i87D2FIms7lVGwM41Hy\njvbOSIE55HEr1Dmv9qSsS3xx02vv45zLL8/d1J/NuuN965HCREzv0bA5ZWGa\nSjmBdarMDFyw5O5a5ZGQEvtH86lR8DcIzw3KAiAgn3FFB4eOR7LtV7kX9wyv\nV9cTwGH+DukaGnMdVS8anC42+shMLj/XUpI7iajirbrtiJ6q0V6A2n5F8bKM\nSyJSkgRBX26pMPsR89hKpshEsu2gNDqaa+gY3VhDh+iC+DaDoRPmDCp6aNmd\nPSMMDw95wrh5s237xVXedItBaTzOiNkuM3Ea6/zFe5KuHLjX9vIfe0hU1tBp\nLQBa6baBhHILL7o2+AMqjCCx4CHY39R4nCONZ7ZQlb7OtsShNZYwpD2ijiQq\ndsKQdcEQtRBLGnbJq4rty97IS+qGbMX+Xq9RDWeFRVuLUakR80CB3Xzffllh\nVPnUAaMS63ot/jAIckoT4LX8yXgQUrAH6dw862wvPzF/sFax0mqnfHJ0pPqT\nh3GmDX+TpTQ9C5lk2P9J/aVHUDdP2qKdu65/DBQNhfFMC29n2oUoewxE4oJU\n9mFbMiMPrZqjjCX1/cduYb5TBS5np9NrjklfIHS9vTRxSFFb5SB24gX5oE4S\nduj8vmRjsNjbZ5cKjdsFD6G/6scc9sazFUNfnd0QIVpZv1FL3J2NU92wUaEa\n7AWa\r\n=qYig\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.5-CameronDiver-patch-1-0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec_1585834774753_0.25146995943213923","host":"s3://npm-registry-packages"}},"1.1.5":{"name":"resin-docker-build","version":"1.1.5","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"73aec6d202d18bb7be57cfbe073ebbc7dabde7f9","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.5.tgz","fileCount":37,"integrity":"sha512-Ri9bzY9mGO6Ctw5MO6EUsQNl1jMSQ6dKg4z6acE7hvxiWjNxUUqbA0Qwu8rfVU+vSswFUy8LCjcQOD9XkrNcDA==","signatures":[{"sig":"MEQCIBGf5eoTdG9d6Biw+Hb3vf2lM5cBlPAdsyMwpAb1+zF8AiAEPtvskTqehQfjNGNCz9liBGP1bhYGb/5M5cxY94M/rA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehhlQCRA9TVsSAnZWagAAzFMP/R+dLR9ilVXA8L2jUIc4\n5sln8SEB2rmXmOo2IVKWlPItW5P+oOkMInmuBaaSDr3rg4LyXFIDkvbnvXLf\nJINpHjOVbOhGz4W4U8Zeo3zjfk8ybHhleTrNn8dyb7yKGhGL99gxh6vOJTLH\n9Wiy5XugL4YXMtMTkKAs4wOzs9xlUMSWYdk4PbqncmzaCz+itvBXXJxzoyoS\nA2piIj6u+LryMTexlmt+bPYjitEF0WyED0wMpm2Ix2ugL9Sb85+W+EaIKW4s\n6dsuVZ71LdZtlvla9kSlWBs74lDGfBTp29NGFmF76+OWJ/XymgcTkV6SQcpU\ngiQc2Fae5ZCHh/BRY/TyBbZDnfvwTBN+2FpUD4C7IWkuIa9v/eDCHSD+Etc4\n7yjFOTxEp5xHO/Yk8wNajSiKLDV+kSBxLQsc/RKHzki8ZAGIcUgo+R2NcXg3\nn9gUYXYByyz00hy9gp57DHGuwaJg2xYTqqE2wKurc9dPHEpuYyfOJZatIApj\nfk0eH8HgB7KZiX657X+nuqUHnD0PTEcA73XQ8rMmvBHLEqtYnqDmJFErCwgt\nf2Ld5I3tNPVslwjZBZ6Fv5VPuJp/TJtasTFpH/h0m843JoPHIUivPDP6UrGd\nx40rrb8uCEkAcxbHxH0lkbo0s+yxKRGuC5UgxX9m60rIRGMszW4SGziY6rJ+\nH56d\r\n=YuqA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"7787c4cb396ec48b5b1517e472d967e7d8396fec","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.9.0","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.5_1585846607997_0.5877667947879139","host":"s3://npm-registry-packages"}},"1.1.6-nested-changelogs-139561ad61ca4f0e2a6203fe3c5f3345ba32cf83":{"name":"resin-docker-build","version":"1.1.6-nested-changelogs-139561ad61ca4f0e2a6203fe3c5f3345ba32cf83","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.6-nested-changelogs-139561ad61ca4f0e2a6203fe3c5f3345ba32cf83","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"57b93e2999dd504a231d2d663e77d5c83997a2c4","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.6-nested-changelogs-139561ad61ca4f0e2a6203fe3c5f3345ba32cf83.tgz","fileCount":38,"integrity":"sha512-b82So/blHL4Kz66OySRCFQjl2fHcs4sG+9uhVb6W6Zk+wt+GX8Q7q1i+6XEbtEShYzcX9MI+A39u8gR1/wPf2Q==","signatures":[{"sig":"MEUCIAYTrLiD3tdcM1jPtGg52ypQuZNCf0KxFhHXyjCONrnQAiEAt4XG17bK3XLcY/k3iLGRAQfGA62+YuviYzBd0MX/nk4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPRhMCRA9TVsSAnZWagAAheIP/3C2JlgHxJ5za3EyoN+u\n5tJXC567T/DmIF/ZNZpay8Db+ucwZzTjNHg+exUvp38HZsPBAkqM/wYnSKth\niWDodT1xhLD6kZmfLpuNYIsv2DIiqantD3zgdxuTIw0ipPuz66EEqXj2urpH\nkF8MR0uwUQsVH4MIHtntESnbLKuB5mGkiPhvo8aFE1uC+/T2fxI0l48NJBxt\njn+HxTDcl9Tvx6p2C4/792Wsqr6h0ydiq5kmmGNrDcx+oSV+ISFcnQ+4yQ59\nVSxtkax4Qcv9Evu3n0YlO/6iKR6g55KE4U8yrQLQixDxAlkpDA3skS7Ht9Eg\ngdiQIHK2MwoDl+Krlmws6AqHOdXy8+IiCqTMSO0S5/BcCS0izJErzNYgzYqv\nCK/o+4eWA4Nfhg6tQvQ+1M97Aczt7ykC9JchxJqvEdgjAWgqIivboU1xQ6HD\n1Hiwp/xhPoUAoUW78SprdVQWpKC9ZZ0HPZxPnTiTIpJoMuR4V+S2NK5/zylH\n41hqCpQ6UgkOKuu6e0XTYZK4V2E0vM/Z/EypGbKtsXw4bC8xWfIhG2PX4Dw6\nKob6hXsxmvkkMQ8Ega9YANpdN4yYfrO1FsY+IybxaJeMxDvWvPlkHrif0cgw\nP/pZll2x7v2f/pNJgjpMrqxRbTz+2Ua92PJcky0m3YW3pmAeS069/auAWrfy\n88qe\r\n=jXs1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"139561ad61ca4f0e2a6203fe3c5f3345ba32cf83","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.14.5","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.20.1","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.6-nested-changelogs-139561ad61ca4f0e2a6203fe3c5f3345ba32cf83_1597839436163_0.07035472465113868","host":"s3://npm-registry-packages"}},"1.1.6":{"name":"resin-docker-build","version":"1.1.6","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"348b6e939eb6fca957a54fae940d67b769c9e3de","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.6.tgz","fileCount":38,"integrity":"sha512-657lmKN1SEbaALSb5n1Mr11fze/msSOKH2aFOPBb+L7BxueC7nat5FZ0Jv07ZD0GDTiJo5Z885l6tegMC5+eaQ==","signatures":[{"sig":"MEUCIQDkUywny1HyiLexsk048YQp9TnzxONyoOIanw6zJH9YHQIgLw8/Kq3vK4Q8z4GEEh2NcnOne0yLmQl8yNTlsIB4I6E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPRkKCRA9TVsSAnZWagAAiFMP/Rdjh/KGWlUl32E6djFk\nMbID6HSjlycKPb3XBShZsJ1S4DXpMNaOWJe0UOIDvHu2bhCQwCELtqdAi5Pk\n/Wg5R+7z1Zt/bKj/l7PH7uvZYPGjwQDB5Vru2anrHk2GO9Fka7Pmqs0g68er\n2cNN+x78vBbCsjJc+JVlraC75IoCL2L+o3SvHgWOE6ews6OcSnmjeSmPduPg\nfQb7Czz33tLn/XcuuCLYDZGx2jaUjXqTQmgs4XQ83WTHAEDUh+l8CX5sAkNK\nY6M0c/HjQzK79rP/fg/saCnkKNdzzTnDl5962GQb2bP+Ki0S7Yfn4sSWX5PF\nTdhU1PnfrPNckHI58NCAAXbUEgURWDmNdwaVTidOOKDReGwWM5nhI7OPV33u\nIkXoVbPC52maiU4ImR+liF06GV8BucX5Ieqq44Pr4qdxzvtzi31hLlLuzsw/\n/ih2cpAs2tJXBPxL825InEYLYCbgxsYyq2aIF23DAZ/YNq92qI01e6P5p9JK\nZYFWEf1BUwjv8BFvrwpVosBITYjh22k5FHb1O9pHYExL7ITvCf/ICGd88zO8\nZU9VOVpDA8bnNEBGHD+41VXY67z0GmbZAVsRHs2I0Wsr9LL03HzHK59K338f\nZG/TRlaNnamDMC0jRQluz8PFFmnwS1G0WTYnQOofCME75il5QkGVmnAMZJCd\n3pRT\r\n=9OZf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"75dfad5c7f0bb89eddbd337ac8915297d90e93c6","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"_npmVersion":"6.14.5","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"10.20.1","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.6_1597839625782_0.16304639426812262","host":"s3://npm-registry-packages"}},"1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216":{"name":"resin-docker-build","version":"1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"923db824223f7c37bce34793fa8a1c4757dfd372","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216.tgz","fileCount":38,"integrity":"sha512-ikDxjKvAOJAGEkteaKtprGCrYUo5qeaF+clGtALFikNFPKRwrnwE01MGwGIiq0WZ0fJ7P+7Bdb+wgoCbDELXgA==","signatures":[{"sig":"MEUCIQDAuV7eDMU2micRJYZQHkpJYVD4xfpg4AH6C7zmu0E1XQIgd1hSdw68drtAYOH9d9DL4fT0um3dI3Cef9HIS8CUHVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWZ+yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvIA//RxetbHdUCLn/pxyl3cjLMO2fMtk1rnMgSqF/SZwgEDRaw8X3\r\nTHvU6aqkHo0zI9W3UfCEqS5Ps/3ATL/r1oVlaFBIP6gS2WNXXja9U6uPIsqK\r\nCBQ1ltokQF0Bd1VbbNu25DpguKPAn7ksDSXuLPddSjF4iKFaiiMe/ZEXO5EL\r\n0KCTJKPLkAW7M+2OKN1r9mV85W4GMBWotxOMnq5/WbLtuTyqHxfelQyuSLCw\r\nQKXjDJBhNF3igqCLBkwnDpJ6yva1p91KKfnc8cucO8l+sNsF3idV0jr3A180\r\ndXtkgfjPadgtRxBmlcby08QIazTH5L2S+YFoFjGCPeJdUjWWSYAbsNPVJwGU\r\noWySVrfdAb9CRa78i3XX4MzfCqYNMYGaZOc/ZoxQLFcLyOssWqPFFb3ayfZk\r\nRpELgj3WegqJsQchW2tJzgv7tIIXbZHYZBbWZbslVEvssDeKQBVEEj+KWe8P\r\n7aROA8eAMgJV/EK7Nto9by71nMpLMkIzjfjXRf0LPRiObv5kzzC+wXFjpF+s\r\nBj37/gle/j5nNuO2xqnfYT9PzqVDtx3lnXc227+74LG60Ja1Rkf5X1VA+b2X\r\nhodjmOT4nPBYCLHC3RiCoQarJ83j48BjFCRZBiFyDCG+qy3P7EupG4xF+B0D\r\negURscue87K/S3iZLR/GKktdyBWVzkzQseU=\r\n=lNul\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"3594bad8b99732ae0e041dce7726dea763080216","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"versionist":{"publishedAt":"2022-04-15T16:36:06.449Z"},"_npmVersion":"6.14.16","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"14.17.1","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216_1650040754228_0.6071870443101388","host":"s3://npm-registry-packages"}},"1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d":{"name":"resin-docker-build","version":"1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"f3f625d702e3bc330a12b8e250d53377901343b8","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d.tgz","fileCount":38,"integrity":"sha512-WteddPKS/I3na4dyLOIBGwXHtCG//vqskw7XfMbm85/fbb50i4n7KsouH915PLi/c4UiSeTwSE2+sM9Er6PmLg==","signatures":[{"sig":"MEUCICzD8QRsjrd/HAj2BAi4LucnLJOeFAv+u7Lsx75cNSEiAiEAtRb7gcclPI9S1MSF4cwtFVQacv6NBLAGps6BtEw2y00=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWakcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2oA//RSJZALA4qNL0QUR1UyXZT3Yl4EDq4g3nuO6OG+KeaOE2Skp3\r\n3jEUjqqw09MqhWwIjB54LjQzWB/gbraQ5FlKIzR/3nuFG0YMS9LVyzfRtpiG\r\neLvGP7SV3Bp3ApMyocc3N71CMoI+ARlrE1iBcLGHRgIlY9Xf7gQ5gryP9lsS\r\n8Vq9G0MT1LklgLQAkvMaezpBO3APjiwZi6VMAEkcu9JyVTn68Wz0kCbrjiOL\r\n2yOZSV/slykKt96XjPFF6CjESz+pcfBwxN7CvG5w02Dw0XJMr6HbH09Agd+9\r\nhA42byAwt1/IBCBbQV9M5TgzuQsXCKFW4gXCwqr3ShMjw/ZWlZtDv0MYGnOs\r\nT6Xh/EwM6XXLggs/iWz6XYQZ2yBWdronLne++pTP737lUx1DzNW+1KQZCYRc\r\nJI7hSDZxV84hSszJ4qbqAn+x/OHGuN3aDRj6yT8h2u9jGdffjgEkHetf1d/w\r\nUFSDhAnIRKbdf3MjaS9PhLuGJEFMNNMEfVmQp1VNaTSZ4fvUFAoeFmqYBCWZ\r\nocPmltnj8VBwf+34bXr4UqlXphPhoVj68V4oZMc8kz0x1oaezYMLCTYoRpzT\r\nUxb93QN4P1HkkwJn+shwWXzdBnuYjLbTZXMQSluWvwYwN+MchZYriqnTzBXP\r\nqNW2hzJxasbtbjR8wXm+mJ2f33x/KAtWnoY=\r\n=NjbD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"9d0e12dfe6b3f0320bb5144020ab9ebba819028d","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"versionist":{"publishedAt":"2022-04-15T17:14:59.707Z"},"_npmVersion":"6.14.16","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"14.17.1","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d_1650043164347_0.5342577910525106","host":"s3://npm-registry-packages"}},"1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb":{"name":"resin-docker-build","version":"1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"36ebdbba6ef3015a84d8ad24b64e87d81b786109","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb.tgz","fileCount":38,"integrity":"sha512-L4UdkhhhdJxza9sOgjDt7HwxNuiYRbJvIeyJlkXTszW0iB5Gd7FJTsdIuBqJ0TnVoMor/hJ8FomLWj0AHIf1zQ==","signatures":[{"sig":"MEYCIQDjyCkon4BzGA4aovYwpNBPCPCL2IMmA1lAPQU6EO6ZuAIhAL/v1PQrxsTP4QlG+JSOsziwX4MLaiDaKFPwqMcdjXO6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWapeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobNxAAoWKBZ3gyGTzHFtAvriPjfyZvo4Kd96LvGFWz9Xu7hBxzQiAt\r\nTWAUEpMChYoVnDVehB/SNryUDcaO0PjEs7DIqUZp2XAXobCdlShWnb2RiZkF\r\nDKupFJRgjUdJT1XDknXoGC5b7djuyBCIfN0q4MyW698jQxPsT9NRfhBCtj6q\r\nIFiZz3ZBe92jh5ZnsjIJuO76SR7c2dQq6eZtcbNXPBqpsDM65b90EbxQlMyf\r\n5XgKq1P4gr5AnRi8wkzll9hsZCGUZQHpk6WdC/yGF24sxpQvJjKfHwx9Yytk\r\nh7Lz2Zwyp2fcMxVrhNvsZMF5Grday0e+0wfH09Ja3v4bqqglWPlTgaRG8GIY\r\nHtcFRUwm7YX45C9705YBXAdNqBpsuToAoVDsXMXi20iALG7O5KDGCYb1FN59\r\n75LUsvNXx//BhaDGYxG1tIO9B5JxarqqLFC1fdB3VfsZRUYpwotid1KwAs0B\r\nLi4RoVg7s5Hj3G1UGJF8qsZue5mqRmRzNSFvJOY1LG3s8tJiWAu1m9a87NtR\r\nl48VyQSNKkGd6xBm36KT9Z91/RSdTTF3RYSrmA1G+BrtIDinwrrkLk3LOy53\r\nqHqni4tNnWhOPmyQMBoSDCsPPh1t2O29bKIh3I+DGCPou11rWnP4x0GTrWFG\r\nnWTn2BkSDUhDSTsT8IiLryINUqtXmJ4obkg=\r\n=tJIF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"8a621e41b740bf81e86c25321c9b27232b246bbb","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"versionist":{"publishedAt":"2022-04-15T17:21:09.987Z"},"_npmVersion":"6.14.16","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"14.17.1","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb_1650043486299_0.6693413960383743","host":"s3://npm-registry-packages"}},"1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505":{"name":"resin-docker-build","version":"1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"626c83f9826127a8ca43faf403187542f75228ec","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505.tgz","fileCount":38,"integrity":"sha512-QDzBQoWLSZzcoVk7n8zqzsc2V+bI0+GYAa0OFdNjWN5dyuEqb1MJDBIRTfbOq7bssTjNpGdInn7KiEkWCvBnXA==","signatures":[{"sig":"MEUCICAeFAti8/vsZW9pDXVsp7CubMlciCu4Ox6NJoiFOzHPAiEAm7PKDwSgJN/TcaWl7w6AX5cQyt/N832j4ZbaP6GMjss=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilN/kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+vw//VZvKX7QdKtrsKaEghR4zARRccGn1GYtHTV+XA5MuNQ3oS2OQ\r\nYE2bcmMYSGQns10FGesgAIloYNP4r6nrFe/o5OK1y6X/MWOUdcOU2bB1jjWi\r\nSKNF/DCDTISBJYndIo7EroPPho1fKvQGrBVl9UTZEbhjCQwjlXqGb+DIydqx\r\noNos2PLrALO8qZhUtDi7tkm6RrVBFsV99Mm+8Xwco3BBlLlfrnZ6GZWLOO3o\r\nQV2FXWc6EEMjk9pqJj8T8fo02X9yTk90OE+iHc6gWsBzLZWFtVuVtTqbQE3Y\r\nKBTDmjP9AiBpm+ndnhmeRyk14wAqytDHRozim4sw1wzzTAsZ7IR9MT21r4h6\r\nuc9DnPg0F7UuP4khPtbN8/VYaymoHZbXv6gLRAbKaK+USiyKdb19ryla8i/t\r\n4V8/B7ElClqQMuKrvWzDrkykjYywd/MRx6crd7da9KCq6UHEM0eOEYj4knmC\r\noEHUV2sDM9pUkLB97daDNck9HxNEAh8HUE+0t1kltWjdNPXk8NW/Gn6Nf2HC\r\nbzu8cZlnx5wCB8q4W0DGgfY7mdur2bhuEdGFmmlQmWSoDl/5PWHQuI+n+zsv\r\nAZz2oTeFs6IOUzqlc2a3qp3yjTQ+d5kCIogeEENU+pmv33g5Oyn43tWUGgUZ\r\nXGn6bVgN0F/ARAODf7dWNYihaksC9Ax2pmI=\r\n=m82w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"686366a844ac0552ab3d86051c6200a053c64505","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"versionist":{"publishedAt":"2022-05-30T15:12:49.419Z"},"_npmVersion":"6.14.17","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"14.19.3","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^3.3.1","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^3.3.9","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505_1653923812212_0.16556945912769194","host":"s3://npm-registry-packages"}},"1.1.7-deprecate-961abca21d494b303f470e4457916b0de8fd6507":{"name":"resin-docker-build","version":"1.1.7-deprecate-961abca21d494b303f470e4457916b0de8fd6507","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.7-deprecate-961abca21d494b303f470e4457916b0de8fd6507","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"344b87ffda9bd61895491ad09e5279e9adf16db0","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.7-deprecate-961abca21d494b303f470e4457916b0de8fd6507.tgz","fileCount":38,"integrity":"sha512-KJT7/jRl992iW5nHBS7rmyn9A2ictp5B+H0BKQ+8+VSE6fGLIQkDa0IJ7fpqKOxfFXDWNM8Fj4wZB3NZy9lQyQ==","signatures":[{"sig":"MEYCIQCyjZadH4vEIqJclzLQU5JLBIVn2Vs4WwzTjLtId7TKZwIhAIWhALl5lBQTokYZ8wPNFCa3d3kJKfQ8Eb4SUHHQWe0+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivwPiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrekA/+OCh/WFjHTwfyp7TGaCj2pC0CnKZPQ3CYKS+2KTYui8Zft+n9\r\nN6flnuFCllLt+2DMW+EyRI1muDJ+t+OLkHQEpvXdvP+fZSJs1eTjj3FhPQ2H\r\nERLmS3sr3AghH0+ruTz7k+ZQbqGEicbvId9qlh+JH0tQxbvD+Mdih8F8WRFt\r\nY3AfD04xdS3qNK9vCEzBPWirhzguNeabCn42YN/icG2d1SuF9FPRiA8ipaSC\r\nfAcjlnlImlvWYKuWbDrBcTqz3N8J6hKaI8U3tzLoOqdb00uSh13UIv5kuDza\r\nS3SaPj1hr1uiAOp47aCVh24fzHRVAFBEhM7q8Wqa4Aw11d8gaDJhzw/9wUFr\r\nMvt+toK5Cr2n6L6vrWTxn9gBx2EksD2xUFQ0X++JcL6/E5zWICV0XiFbAx7P\r\nza5q7euhOlSUVr01KLasuoSGoAmEPLSTV9Zkclj7YIZk/Jfyf9/QdFB/NiWp\r\ne2MbQR37DHAaS7KCisPg40KJkiz6y0fppGzfNr8t7trxUoJlpHWmurzV/3V/\r\n2T8MnawIIWTN3n3NEK5JYcQ3+IoxXaO4XIjD9Y+SWHoFbZ0ibpKAeKnb2MOm\r\nqpd8h9vJ8qh4AMReSodCnf+gCnMinP3cYICTo1ATBWiC4sjBxGBBVR4856P+\r\nV87DOHZzquzi+r/lloVPcjsKauWu0lrXF6U=\r\n=6xed\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\n**DEPRECATED -- This module has been deprecated; please use [balena-compose](https://github.com/balena-io-modules/balena-compose) instead.**\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","gitHead":"961abca21d494b303f470e4457916b0de8fd6507","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"versionist":{"publishedAt":"2022-07-01T14:22:06.444Z"},"_npmVersion":"6.14.17","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"14.19.3","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.7-deprecate-961abca21d494b303f470e4457916b0de8fd6507_1656685538056_0.5974019335627929","host":"s3://npm-registry-packages"}},"1.1.7":{"name":"resin-docker-build","version":"1.1.7","author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","_id":"resin-docker-build@1.1.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io/resin-docker-build#readme","bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"dist":{"shasum":"2089479f972c7b9e76d0bafa391d150e8b17d525","tarball":"https://registry.npmjs.org/resin-docker-build/-/resin-docker-build-1.1.7.tgz","fileCount":38,"integrity":"sha512-k38loTRMlXZ5h4iGGGYKby1+/tbngSKGa51CNX/1Yp5KgWQ77aIuY9u83kpxn3Siv5HAoN7lhY2KM082dwDMaA==","signatures":[{"sig":"MEQCIAdVttBanSVVbtdHYJjRUiqeOfD89hVVu8hs+2UM2Rz/AiBYmRQLp9W2sC4eL4Mdq/nH9ZUfcwS7jCOvjKrBR31x1w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivwTbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsUQ//dI999/5r5C0jx/6TE9sb7VKfB1XwOx5rZB1Uqmi+HrvywX9Y\r\ncG9XWYiyEDQv678CFqfl4ikaWOkSGxWfIkCiUtLt5m/tA6WPcvmEV7w1xr8p\r\nGnq+LQB0+xSQ/sWHRbui4UABIqmwqshtmRSciY/3DLG2jlT/tWQs9NRQDoqK\r\njwez2I3waWlvANnzSHxrwSSCXNZs5Qm8MQiYmrblE34SDoV1dI2+TXPsjYes\r\nEse7QkXrVfYEH3OaRBKLqFIQGmCtoqD8ZSuVf3wJHpZvbWMepz5vRG7VJtwm\r\nlJqiNTXQN/ipVcGo2LrWW6isJyNmlv4nYjNxQVuot+BBjxUbOFczQobgS9Bv\r\nNqzYkVAtf3mRewu7IWaUi7Rxa73Agug7cRCvHpBWOI4tWCBkKmqAfhSH+RQG\r\nbEitJ5s6xKPbySQYOSXB7X02AeTqGzBE1lHkfTcO4/KwzeIywQOrVeOjUtKs\r\nRcCM+qmqa9fDRmxbJtY4ptW0SanaYaitRkQ1AbBS3Z4uERinCcrhSkF/hShC\r\nRw5nKnjD/5r4YjrY7AvN/aB1mHQ6ijF1CLNb1YsvLLz4EVVnJyEoY0UJqmpH\r\neQkyYHtHcZJ5nbcPA3G1UA4uzvXxH3UX/Otv+GlkJ/qMOgWoLRLmh136d6g3\r\n7N0EDBHMdHnRXfS20p+akqfjvZrE29acpsM=\r\n=BT5y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","gitHead":"31c563cb60a5a5b68f36e4de42d93fe825cbc5b5","scripts":{"lint":"resin-lint --typescript src test typings && tsc --noEmit","test":"npm run build:test && mocha build/test","build":"npm run clean && tsc --project tsconfig.publish.json","clean":"rm -rf build","pretest":"npm run lint","prettify":"resin-lint --typescript --fix src test typings","build:test":"npm run clean && tsc --project .","prepublish":"require-npm4-to-publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published.","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"versionist":{"publishedAt":"2022-07-01T14:27:20.447Z"},"_npmVersion":"6.14.17","description":"A containerised builder which interacts with the docker remote API to perform builds.","directories":{},"_nodeVersion":"14.19.3","dependencies":{"mz":"^2.7.0","klaw":"^1.3.1","lodash":"^4.17.15","bluebird":"^3.7.2","@types/mz":"0.0.32","dockerode":"^2.5.8","duplexify":"^3.7.1","JSONStream":"^1.3.5","tar-stream":"^2.1.0","@types/klaw":"^1.3.5","@types/node":"^10.17.17","event-stream":"^3.3.5","@types/lodash":"^4.14.149","@types/bluebird":"^3.5.30","@types/dockerode":"^2.5.24","@types/duplexify":"^3.6.0","@types/jsonstream":"^0.8.30","@types/tar-stream":"^2.1.0","@types/event-stream":"^3.3.34"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","husky":"^4.2.3","mocha":"^3.2.0","rewire":"^4.0.1","ts-node":"^2.1.0","gulp-util":"^3.0.8","gulp-clean":"^0.3.2","gulp-mocha":"^4.1.0","gulp-shell":"^0.6.1","resin-lint":"^3.3.1","typescript":"^3.8.3","@types/chai":"^3.4.35","lint-staged":"^10.0.8","@types/mocha":"^2.2.39","@types/rewire":"^2.5.28","dts-generator":"^2.1.0","gulp-sourcemaps":"^2.4.1","gulp-typescript":"^3.1.5","require-npm4-to-publish":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resin-docker-build_1.1.7_1656685787027_0.0629565216101109","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-03-10T11:18:52.370Z","modified":"2026-01-29T13:45:58.739Z","0.0.2":"2017-03-10T11:18:52.370Z","0.0.3":"2017-03-10T13:21:54.053Z","0.1.1":"2017-03-22T11:57:00.948Z","0.1.2":"2017-03-22T12:08:50.450Z","0.2.0":"2017-03-27T16:12:25.345Z","0.2.1":"2017-03-27T16:22:33.367Z","0.4.0":"2017-03-29T10:56:20.153Z","0.5.1":"2017-05-10T20:22:08.540Z","0.6.0":"2017-05-15T22:07:46.656Z","0.6.1":"2017-05-16T00:45:57.112Z","0.6.2":"2017-06-22T16:25:27.100Z","0.7.0-fix-repo-429a020e06f6dc80da00d316626f1e97b2a9f5ca":"2018-08-31T20:28:58.884Z","0.7.0-fix-repo-b29409d1c832ff063d3402937135f98ec2dba7b8":"2018-09-20T10:19:37.469Z","0.7.0":"2018-09-20T10:30:58.198Z","0.7.1-27-build-false-positive-e30d84acf9f91e96295a1bbbeec727c8888d3642":"2018-12-06T16:44:19.398Z","0.7.1-27-build-false-positive-eb20a53bb69710bd640d19f7584be6e70fe2ef98":"2018-12-09T18:28:43.479Z","0.7.1-27-build-false-positive-68280b15e13757452ef88aaa8dffd78a066c64c0":"2018-12-10T11:14:29.211Z","0.7.1-27-build-false-positive-f609904607b8ccce754cd4faf8bc798707839309":"2018-12-12T03:13:52.436Z","0.7.1-27-build-false-positive-1d4209d79f5fa87fafccb0e61366deec0984036f":"2018-12-12T03:33:42.428Z","0.7.1-27-build-false-positive-007e9806e317f8ff85bd14f0e503d00384e863c6":"2018-12-14T11:59:52.865Z","0.7.1":"2018-12-14T12:38:48.492Z","1.0.0-explicit-builder-creation-4485ee1c08d5724a73d64f0f99ea7925789ff75d":"2019-03-04T14:54:11.690Z","1.0.0-explicit-builder-creation-c0308890e5d661f1158aa29997c23243d77fb4fe":"2019-03-04T15:11:09.124Z","1.0.0-explicit-builder-creation-5f0c7b8861b6635e8008aaec81cc596774fa0b7f":"2019-03-04T16:04:23.716Z","1.0.0-explicit-builder-creation-bd4782a4ecaf63b0c4fa0df4794898872a49e626":"2019-03-04T16:09:01.606Z","1.0.0":"2019-03-04T16:12:20.034Z","1.0.1-30-catch-more-errors-in-createBuildStream-45a2ff74e3755247ce18113c7c7d0f16daaee33e":"2019-03-10T23:44:15.793Z","1.0.1-30-catch-more-errors-in-createBuildStream-b975b5de4485f69803fbc8c75566aeab3a039958":"2019-03-11T00:20:31.186Z","1.0.1-30-catch-more-errors-in-createBuildStream-9c1c57346328d96f50986d92f5cc6e00b7a1c2bb":"2019-03-11T00:40:34.402Z","1.0.1-30-catch-more-errors-in-createBuildStream-02b19dfa05f6cb590ad8e0164d1bf054c3a04819":"2019-03-11T01:11:12.403Z","1.0.1-30-catch-more-errors-in-createBuildStream-a0bca27fdd8de9803197dd67b1fa00b53092ad27":"2019-03-11T16:58:11.967Z","1.0.1-30-catch-more-errors-in-createBuildStream-c8bb8dd99c71b12fe696fbb4db2868fee161e337":"2019-03-12T12:48:18.229Z","1.0.1-30-catch-more-errors-in-createBuildStream-364420797303bf9205f3691a7d86cc315db27110":"2019-03-12T13:02:18.729Z","1.0.1-30-catch-more-errors-in-createBuildStream-d3ea9b0c87a0cbb75349a4550a960ab0ce049780":"2019-03-12T13:05:39.045Z","1.0.1":"2019-03-12T13:08:59.538Z","1.1.0-roman-from-tags-f02a81ed719eb5b0f82b90dadbb9b0a5bceabf16":"2019-11-18T21:25:07.156Z","1.1.0-roman-from-tags-8a2203b534a01e7e5089b81d1b18366edc3379bd":"2019-11-18T21:32:53.381Z","1.1.0-roman-from-tags-79be885c1914a8ade7114520692027a8aa4c5864":"2019-11-19T08:06:14.714Z","1.1.0-roman-from-tags-3a6c2064e48d113230cfb319dbf87b5c77df3375":"2019-11-19T19:38:34.537Z","1.1.0":"2019-11-19T19:43:08.136Z","1.1.1-roman-from-tags-4859eaf9d18468cc4daf272d8586c7127c606add":"2019-11-19T20:28:33.697Z","1.1.1-roman-export-from-tags-fe3b4d353d4912e8641b6b6d15d2752d6f42ecc5":"2019-11-19T20:52:09.806Z","1.1.1-roman-from-tags-f748185e0fd2aa186e604458f4b23ee96975b633":"2019-11-20T09:25:18.753Z","1.1.1":"2019-11-20T09:30:41.811Z","1.1.2-roman-export-from-tags-7d00b6264cf8dc21bb28e01102988745c5f3b550":"2019-11-20T09:36:47.613Z","1.1.2":"2019-11-20T11:09:44.263Z","1.1.3-update-deps-272d8802d61625a4a51ca79feda4a5148d892e34":"2020-02-21T00:16:08.960Z","1.1.3":"2020-02-24T13:25:05.012Z","1.1.4-update-deps-5de9feba9f06589f85ff7628e1f24d1ce173e89c":"2020-03-03T16:37:59.712Z","1.1.4":"2020-03-03T16:46:51.810Z","1.1.5-CameronDiver-patch-1-0e84ec3d48268c0ae1a2390a2dad2cf8ec9e0eec":"2020-04-02T13:39:34.899Z","1.1.5":"2020-04-02T16:56:48.102Z","1.1.6-nested-changelogs-139561ad61ca4f0e2a6203fe3c5f3345ba32cf83":"2020-08-19T12:17:16.271Z","1.1.6":"2020-08-19T12:20:25.938Z","1.1.7-test-ci-3594bad8b99732ae0e041dce7726dea763080216":"2022-04-15T16:39:14.385Z","1.1.7-test-ci-9d0e12dfe6b3f0320bb5144020ab9ebba819028d":"2022-04-15T17:19:24.487Z","1.1.7-test-ci-8a621e41b740bf81e86c25321c9b27232b246bbb":"2022-04-15T17:24:46.500Z","1.1.7-bump-versions-686366a844ac0552ab3d86051c6200a053c64505":"2022-05-30T15:16:52.387Z","1.1.7-deprecate-961abca21d494b303f470e4457916b0de8fd6507":"2022-07-01T14:25:38.285Z","1.1.7":"2022-07-01T14:29:47.234Z"},"bugs":{"url":"https://github.com/resin-io/resin-docker-build/issues"},"author":{"name":"Cameron Diver","email":"cameron@resin.io"},"license":"Apache-2.0","homepage":"https://github.com/resin-io/resin-docker-build#readme","repository":{"url":"git+https://github.com/resin-io/resin-docker-build.git","type":"git"},"description":"A containerised builder which interacts with the docker remote API to perform builds.","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"readme":"# Resin-docker-build\n\n[![npm version](https://badge.fury.io/js/resin-docker-build.svg)](https://badge.fury.io/js/resin-docker-build)\n[![CircleCI](https://circleci.com/gh/resin-io/resin-docker-build.svg?style=svg)](https://circleci.com/gh/resin-io/resin-docker-build)\n\n**DEPRECATED -- This module has been deprecated; please use [balena-compose](https://github.com/balena-io-modules/balena-compose) instead.**\n\nA modular, plugin-based approach to building docker containers. Resin-docker-build uses streams and\nhooks to provide a system which can be added to a build pipeline easily. With a simple but flexible\ninterface, this module is meant to take the pain out of automating docker builds. Resin-docker-build is\nwritten in typescript, and all defined types are exported.\n\n## API\n\nAll building is done via the `Builder` object.\n\nThe `Builder` API has two top-level methods, which are used to trigger builds;\n\n* `createBuildStream(buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInitialise a docker daemon and set it up to wait for some streaming data. The stream is returned to the\ncaller for both reading and writing. Success and failure callbacks are provided via the hooks interface\n(see below). `buildOpts` is passed directly to the docker daemon and the expected input by the daemon is\nis a tar stream.\n\n* `buildDir(directory: string, buildOpts: Object, hooks: BuildHooks, handler: ErrorHandler): ReadWriteStream`\n\nInform the docker daemon to build a directory on the host. A stream is returned for reading, and\nthe same success/failure callbacks apply. `buildOpts` is passed directly to the docker daemon.\n\n\n* The `handler` parameter:\n\nIf an exception is thrown from within the hooks, because it is executing in a\ndifferent context to the initial api call they will not be propagated. Using\nthe error handler means that you can handle the error as necessary (for instance\npropagate to your global catch, or integrate it into a promise chain using\n`reject` as a handler). The error handler is optional. Note that the error\nhandler will not be called with a build error, instead with that being dropped\nto the `buildFailure` hook, but if that hook throws, the handler will be called.\n\n## Hooks\n\nCurrently the hooks supported are;\n\n* `buildStream(stream: ReadWriteStream): void`\n\nCalled by the builder when a stream is ready to communicate directly with the daemon. This is useful\nfor parsing/showing the output and transforming any input before providing it to the docker daemon.\n\n* `buildSuccess(imageId: string, layers: string[]): void`\n\nCalled by the builder when the daemon has successfully built the image. `imageId` is the sha digest provided\nby the daemon, which can be used for pushing, running etc. `layers` is a list of sha digests pointing to\nthe intermediate layers used by docker. Can be useful for cleanup.\n\n* `buildFailure(error: Error)`\n\nCalled by the builder when a build has failed for whatever reason. The reason is provided as a standard\nnode error object. This was also close the build stream. No more hooks will be called after this.\n\n## Examples\n\nExamples are provided in typescript.\n\n### Directory Building\n\n```javascript\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst hooks: BuildHooks = {\n\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\tstream.pipe(process.stdout)\n\t},\n\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t},\n\tbuildFailure: (error: Error): void => {\n\t\tconsole.error(`Error building container: ${error}`)\n\t}\n}\n\nbuilder.buildDir('./my-dir', {}, hooks)\n```\n\n### Building a tar archive\n```javascript\nimport * as fs from 'fs'\nimport { Builder, BuildHooks } from 'resin-docker-build'\n\nconst builder = Builder.fromDockerOpts({ socketPath: '/var/run/docker.sock' })\n\nconst getHooks = (archive: string): BuildHooks => {\n\treturn {\n\t\tbuildSuccess: (imageId: string, layers: string[]): void => {\n\t\t\tconsole.log(`Successful build! ImageId: ${imageId}`)\n\t\t},\n\t\tbuildFailure: (error: Error): void => {\n\t\t\tconsole.error(`Error building container: ${error}`)\n\t\t},\n\t\tbuildStream: (stream: NodeJS.ReadWriteStream): void => {\n\t\t\t// Create a stream from the tar archive.\n\t\t\t// Note that this stream could be from a webservice,\n\t\t\t// or any other source. The only requirement is that\n\t\t\t// when consumed, it produces a valid tar archive\n\t\t\tconst tarStream = fs.createReadStream(archive)\n\n\t\t\t// Send the tar stream to the docker daemon\n\t\t\ttarStream.pipe(stream)\n\n\t\t\tstream.pipe(process.stdout)\n\t\t}\n\t}\n}\n\nbuilder.createBuildStream({}, getHooks('my-archive.tar'))\n```\n","readmeFilename":"README.md"}