muhammara 1.8.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -1
- package/README.md +9 -0
- package/muhammara.js +1 -1
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/CHANGELOG.md +40 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/LICENSE +0 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/README.md +128 -76
- package/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp +4 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/bin/node-pre-gyp.cmd +0 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/contributing.md +0 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/build.js +51 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/clean.js +31 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/configure.js +52 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/info.js +38 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/install.js +235 -0
- package/node_modules/{node-pre-gyp/bin/node-pre-gyp → @mapbox/node-pre-gyp/lib/main.js} +29 -38
- package/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js +309 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/package.js +73 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js +34 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/publish.js +81 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js +20 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js +19 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/reveal.js +32 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js +79 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js +53 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js +41 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/lib/util/abi_crosswalk.json +264 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js +93 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js +102 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js +205 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/lib/util/nw-pre-gyp/index.html +0 -0
- package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/lib/util/nw-pre-gyp/package.json +0 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js +163 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +335 -0
- package/node_modules/@mapbox/node-pre-gyp/package.json +98 -0
- package/node_modules/agent-base/README.md +145 -0
- package/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/agent-base/package.json +94 -0
- package/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/ansi-regex/index.d.ts +37 -0
- package/node_modules/ansi-regex/index.js +8 -2
- package/node_modules/ansi-regex/license +4 -16
- package/node_modules/ansi-regex/package.json +19 -39
- package/node_modules/ansi-regex/readme.md +48 -9
- package/node_modules/aproba/CHANGELOG.md +4 -0
- package/node_modules/aproba/index.js +33 -33
- package/node_modules/aproba/package.json +14 -13
- package/node_modules/are-we-there-yet/LICENSE.md +18 -0
- package/node_modules/are-we-there-yet/README.md +16 -3
- package/node_modules/are-we-there-yet/{index.js → lib/index.js} +0 -0
- package/node_modules/are-we-there-yet/{tracker-base.js → lib/tracker-base.js} +0 -0
- package/node_modules/are-we-there-yet/{tracker-group.js → lib/tracker-group.js} +14 -5
- package/node_modules/are-we-there-yet/{tracker-stream.js → lib/tracker-stream.js} +0 -0
- package/node_modules/are-we-there-yet/{tracker.js → lib/tracker.js} +3 -1
- package/node_modules/are-we-there-yet/package.json +43 -26
- package/node_modules/chownr/package.json +13 -10
- package/node_modules/{ignore-walk → color-support}/LICENSE +0 -0
- package/node_modules/color-support/README.md +129 -0
- package/node_modules/color-support/bin.js +3 -0
- package/node_modules/color-support/browser.js +14 -0
- package/node_modules/color-support/index.js +134 -0
- package/node_modules/color-support/package.json +71 -0
- package/node_modules/console-control-strings/package.json +5 -5
- package/node_modules/debug/LICENSE +10 -9
- package/node_modules/debug/README.md +42 -1
- package/node_modules/debug/package.json +44 -32
- package/node_modules/debug/src/browser.js +195 -106
- package/node_modules/debug/src/common.js +265 -240
- package/node_modules/debug/src/index.js +3 -5
- package/node_modules/debug/src/node.js +171 -85
- package/node_modules/detect-libc/package.json +2 -2
- package/node_modules/{iconv-lite/LICENSE → emoji-regex/LICENSE-MIT.txt} +1 -2
- package/node_modules/emoji-regex/README.md +73 -0
- package/node_modules/emoji-regex/es2015/index.js +6 -0
- package/node_modules/emoji-regex/es2015/text.js +6 -0
- package/node_modules/emoji-regex/index.d.ts +23 -0
- package/node_modules/emoji-regex/index.js +6 -0
- package/node_modules/emoji-regex/package.json +77 -0
- package/node_modules/emoji-regex/text.js +6 -0
- package/node_modules/fs-minipass/index.js +69 -34
- package/node_modules/fs-minipass/package.json +14 -11
- package/node_modules/gauge/LICENSE.md +20 -0
- package/node_modules/gauge/README.md +19 -16
- package/node_modules/gauge/{base-theme.js → lib/base-theme.js} +7 -3
- package/node_modules/gauge/lib/demo.js +45 -0
- package/node_modules/gauge/{error.js → lib/error.js} +0 -0
- package/node_modules/gauge/lib/has-color.js +4 -0
- package/node_modules/gauge/{index.js → lib/index.js} +90 -33
- package/node_modules/gauge/{plumbing.js → lib/plumbing.js} +3 -1
- package/node_modules/gauge/{process.js → lib/process.js} +0 -0
- package/node_modules/gauge/{progress-bar.js → lib/progress-bar.js} +12 -6
- package/node_modules/gauge/{render-template.js → lib/render-template.js} +69 -28
- package/node_modules/gauge/{set-immediate.js → lib/set-immediate.js} +0 -0
- package/node_modules/gauge/{set-interval.js → lib/set-interval.js} +0 -0
- package/node_modules/gauge/{spin.js → lib/spin.js} +0 -0
- package/node_modules/gauge/{template-item.js → lib/template-item.js} +21 -7
- package/node_modules/gauge/{theme-set.js → lib/theme-set.js} +31 -24
- package/node_modules/gauge/lib/themes.js +56 -0
- package/node_modules/gauge/{wide-truncate.js → lib/wide-truncate.js} +9 -3
- package/node_modules/gauge/package.json +47 -49
- package/node_modules/glob/README.md +3 -0
- package/node_modules/glob/common.js +2 -0
- package/node_modules/glob/glob.js +4 -5
- package/node_modules/glob/package.json +6 -5
- package/node_modules/glob/sync.js +4 -5
- package/node_modules/has-unicode/package.json +5 -5
- package/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/https-proxy-agent/dist/agent.js +180 -0
- package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +86 -0
- package/node_modules/inherits/package.json +5 -5
- package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/node_modules/is-fullwidth-code-point/index.js +40 -36
- package/node_modules/is-fullwidth-code-point/license +4 -16
- package/node_modules/is-fullwidth-code-point/package.json +17 -20
- package/node_modules/is-fullwidth-code-point/readme.md +8 -8
- package/node_modules/{ini → lru-cache}/LICENSE +0 -0
- package/node_modules/lru-cache/README.md +166 -0
- package/node_modules/lru-cache/index.js +334 -0
- package/node_modules/lru-cache/package.json +69 -0
- package/node_modules/make-dir/index.d.ts +66 -0
- package/node_modules/make-dir/index.js +156 -0
- package/node_modules/make-dir/license +9 -0
- package/node_modules/make-dir/node_modules/semver/CHANGELOG.md +70 -0
- package/node_modules/{npm-packlist → make-dir/node_modules/semver}/LICENSE +0 -0
- package/node_modules/make-dir/node_modules/semver/README.md +443 -0
- package/node_modules/{semver/bin/semver → make-dir/node_modules/semver/bin/semver.js} +16 -2
- package/node_modules/make-dir/node_modules/semver/package.json +60 -0
- package/node_modules/make-dir/node_modules/semver/range.bnf +16 -0
- package/node_modules/{semver → make-dir/node_modules/semver}/semver.js +249 -136
- package/node_modules/make-dir/package.json +91 -0
- package/node_modules/make-dir/readme.md +125 -0
- package/node_modules/minimatch/package.json +1 -2
- package/node_modules/minipass/README.md +52 -45
- package/node_modules/minipass/index.js +56 -38
- package/node_modules/minipass/package.json +16 -14
- package/node_modules/minizlib/README.md +7 -0
- package/node_modules/minizlib/index.js +31 -3
- package/node_modules/minizlib/package.json +16 -12
- package/node_modules/mkdirp/CHANGELOG.md +15 -0
- package/node_modules/mkdirp/LICENSE +2 -2
- package/node_modules/mkdirp/bin/cmd.js +64 -29
- package/node_modules/mkdirp/index.js +24 -92
- package/node_modules/mkdirp/lib/find-made.js +29 -0
- package/node_modules/mkdirp/lib/mkdirp-manual.js +64 -0
- package/node_modules/mkdirp/lib/mkdirp-native.js +39 -0
- package/node_modules/mkdirp/lib/opts-arg.js +23 -0
- package/node_modules/mkdirp/lib/path-arg.js +29 -0
- package/node_modules/mkdirp/lib/use-native.js +10 -0
- package/node_modules/mkdirp/package.json +35 -30
- package/node_modules/mkdirp/readme.markdown +201 -35
- package/node_modules/ms/index.js +1 -1
- package/node_modules/ms/license.md +1 -1
- package/node_modules/ms/package.json +16 -17
- package/node_modules/ms/readme.md +2 -1
- package/node_modules/{safer-buffer/LICENSE → node-fetch/LICENSE.md} +3 -2
- package/node_modules/node-fetch/README.md +590 -0
- package/node_modules/node-fetch/browser.js +25 -0
- package/node_modules/node-fetch/lib/index.es.js +1662 -0
- package/node_modules/node-fetch/lib/index.js +1671 -0
- package/node_modules/node-fetch/lib/index.mjs +1660 -0
- package/node_modules/node-fetch/package.json +95 -0
- package/node_modules/nopt/lib/nopt.js +2 -2
- package/node_modules/nopt/package.json +16 -14
- package/node_modules/npmlog/LICENSE.md +20 -0
- package/node_modules/npmlog/{log.js → lib/log.js} +148 -54
- package/node_modules/npmlog/package.json +40 -24
- package/node_modules/readable-stream/README.md +61 -13
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +52 -44
- package/node_modules/readable-stream/lib/_stream_passthrough.js +1 -9
- package/node_modules/readable-stream/lib/_stream_readable.js +446 -341
- package/node_modules/readable-stream/lib/_stream_transform.js +29 -42
- package/node_modules/readable-stream/lib/_stream_writable.js +200 -190
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +48 -17
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
- package/node_modules/readable-stream/package.json +43 -27
- package/node_modules/readable-stream/readable-browser.js +2 -0
- package/node_modules/readable-stream/readable.js +5 -8
- package/node_modules/rimraf/CHANGELOG.md +65 -0
- package/node_modules/rimraf/bin.js +41 -23
- package/node_modules/rimraf/package.json +16 -13
- package/node_modules/rimraf/rimraf.js +67 -79
- package/node_modules/safe-buffer/index.js +3 -0
- package/node_modules/safe-buffer/package.json +28 -17
- package/node_modules/semver/CHANGELOG.md +72 -0
- package/node_modules/semver/README.md +180 -26
- package/node_modules/semver/bin/semver.js +173 -0
- package/node_modules/semver/classes/comparator.js +135 -0
- package/node_modules/semver/classes/index.js +5 -0
- package/node_modules/semver/classes/range.js +510 -0
- package/node_modules/semver/classes/semver.js +287 -0
- package/node_modules/semver/functions/clean.js +6 -0
- package/node_modules/semver/functions/cmp.js +48 -0
- package/node_modules/semver/functions/coerce.js +51 -0
- package/node_modules/semver/functions/compare-build.js +7 -0
- package/node_modules/semver/functions/compare-loose.js +3 -0
- package/node_modules/semver/functions/compare.js +5 -0
- package/node_modules/semver/functions/diff.js +23 -0
- package/node_modules/semver/functions/eq.js +3 -0
- package/node_modules/semver/functions/gt.js +3 -0
- package/node_modules/semver/functions/gte.js +3 -0
- package/node_modules/semver/functions/inc.js +15 -0
- package/node_modules/semver/functions/lt.js +3 -0
- package/node_modules/semver/functions/lte.js +3 -0
- package/node_modules/semver/functions/major.js +3 -0
- package/node_modules/semver/functions/minor.js +3 -0
- package/node_modules/semver/functions/neq.js +3 -0
- package/node_modules/semver/functions/parse.js +33 -0
- package/node_modules/semver/functions/patch.js +3 -0
- package/node_modules/semver/functions/prerelease.js +6 -0
- package/node_modules/semver/functions/rcompare.js +3 -0
- package/node_modules/semver/functions/rsort.js +3 -0
- package/node_modules/semver/functions/satisfies.js +10 -0
- package/node_modules/semver/functions/sort.js +3 -0
- package/node_modules/semver/functions/valid.js +6 -0
- package/node_modules/semver/index.js +48 -0
- package/node_modules/semver/internal/constants.js +17 -0
- package/node_modules/semver/internal/debug.js +9 -0
- package/node_modules/semver/internal/identifiers.js +23 -0
- package/node_modules/semver/internal/parse-options.js +11 -0
- package/node_modules/semver/internal/re.js +182 -0
- package/node_modules/semver/package.json +32 -20
- package/node_modules/semver/preload.js +2 -0
- package/node_modules/semver/ranges/gtr.js +4 -0
- package/node_modules/semver/ranges/intersects.js +7 -0
- package/node_modules/semver/ranges/ltr.js +4 -0
- package/node_modules/semver/ranges/max-satisfying.js +25 -0
- package/node_modules/semver/ranges/min-satisfying.js +24 -0
- package/node_modules/semver/ranges/min-version.js +60 -0
- package/node_modules/semver/ranges/outside.js +80 -0
- package/node_modules/semver/ranges/simplify.js +44 -0
- package/node_modules/semver/ranges/subset.js +222 -0
- package/node_modules/semver/ranges/to-comparators.js +8 -0
- package/node_modules/semver/ranges/valid.js +11 -0
- package/node_modules/set-blocking/package.json +5 -5
- package/node_modules/signal-exit/README.md +1 -1
- package/node_modules/signal-exit/index.js +167 -130
- package/node_modules/signal-exit/package.json +14 -14
- package/node_modules/string-width/index.d.ts +29 -0
- package/node_modules/string-width/index.js +29 -19
- package/node_modules/string-width/license +4 -16
- package/node_modules/string-width/package.json +20 -20
- package/node_modules/string-width/readme.md +17 -9
- package/node_modules/string_decoder/package.json +14 -11
- package/node_modules/strip-ansi/index.d.ts +17 -0
- package/node_modules/strip-ansi/index.js +2 -4
- package/node_modules/strip-ansi/license +4 -16
- package/node_modules/strip-ansi/package.json +19 -34
- package/node_modules/strip-ansi/readme.md +20 -7
- package/node_modules/tar/README.md +145 -57
- package/node_modules/tar/lib/create.js +9 -10
- package/node_modules/tar/lib/extract.js +11 -16
- package/node_modules/tar/lib/get-write-flag.js +20 -0
- package/node_modules/tar/lib/header.js +13 -14
- package/node_modules/tar/lib/high-level-opt.js +3 -3
- package/node_modules/tar/lib/large-numbers.js +19 -17
- package/node_modules/tar/lib/list.js +16 -14
- package/node_modules/tar/lib/mkdir.js +60 -53
- package/node_modules/tar/lib/mode-fix.js +10 -1
- package/node_modules/tar/lib/normalize-unicode.js +11 -0
- package/node_modules/tar/lib/normalize-windows-path.js +8 -0
- package/node_modules/tar/lib/pack.js +26 -33
- package/node_modules/tar/lib/parse.js +115 -62
- package/node_modules/tar/lib/path-reservations.js +148 -0
- package/node_modules/tar/lib/pax.js +5 -8
- package/node_modules/tar/lib/read-entry.js +9 -7
- package/node_modules/tar/lib/replace.js +20 -17
- package/node_modules/tar/lib/strip-absolute-path.js +24 -0
- package/node_modules/tar/lib/strip-trailing-slashes.js +13 -0
- package/node_modules/tar/lib/types.js +1 -1
- package/node_modules/tar/lib/unpack.js +375 -119
- package/node_modules/tar/lib/update.js +1 -1
- package/node_modules/tar/lib/warn-mixin.js +17 -10
- package/node_modules/tar/lib/winchars.js +2 -2
- package/node_modules/tar/lib/write-entry.js +199 -96
- package/node_modules/tar/package.json +36 -26
- package/node_modules/tr46/.npmignore +4 -0
- package/node_modules/tr46/index.js +193 -0
- package/node_modules/tr46/lib/.gitkeep +0 -0
- package/node_modules/tr46/lib/mappingTable.json +1 -0
- package/node_modules/tr46/package.json +59 -0
- package/node_modules/util-deprecate/package.json +5 -5
- package/node_modules/webidl-conversions/LICENSE.md +12 -0
- package/node_modules/webidl-conversions/README.md +53 -0
- package/node_modules/webidl-conversions/lib/index.js +189 -0
- package/node_modules/webidl-conversions/package.json +59 -0
- package/node_modules/{code-point-at/license → whatwg-url/LICENSE.txt} +1 -1
- package/node_modules/whatwg-url/README.md +67 -0
- package/node_modules/whatwg-url/lib/URL-impl.js +200 -0
- package/node_modules/whatwg-url/lib/URL.js +196 -0
- package/node_modules/whatwg-url/lib/public-api.js +11 -0
- package/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
- package/node_modules/whatwg-url/lib/utils.js +20 -0
- package/node_modules/whatwg-url/package.json +67 -0
- package/node_modules/wide-align/LICENSE +0 -0
- package/node_modules/wide-align/README.md +0 -0
- package/node_modules/wide-align/align.js +0 -0
- package/node_modules/wide-align/package.json +15 -16
- package/node_modules/yallist/package.json +13 -11
- package/node_modules/yallist/yallist.js +3 -3
- package/package.json +7 -4
- package/src/deps/LibPng/pnglibconf.h +6 -2
- package/src/deps/LibTiff/tif_unix.c +4 -0
- package/src/deps/ZLib/gzguts.h +4 -0
- package/node_modules/are-we-there-yet/CHANGES.md +0 -37
- package/node_modules/are-we-there-yet/LICENSE +0 -5
- package/node_modules/code-point-at/index.js +0 -32
- package/node_modules/code-point-at/package.json +0 -70
- package/node_modules/code-point-at/readme.md +0 -32
- package/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/core-util-is/README.md +0 -3
- package/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/core-util-is/package.json +0 -62
- package/node_modules/core-util-is/test.js +0 -68
- package/node_modules/debug/CHANGELOG.md +0 -395
- package/node_modules/debug/node.js +0 -1
- package/node_modules/deep-extend/CHANGELOG.md +0 -46
- package/node_modules/deep-extend/LICENSE +0 -20
- package/node_modules/deep-extend/README.md +0 -91
- package/node_modules/deep-extend/index.js +0 -1
- package/node_modules/deep-extend/lib/deep-extend.js +0 -150
- package/node_modules/deep-extend/package.json +0 -92
- package/node_modules/gauge/CHANGELOG.md +0 -160
- package/node_modules/gauge/LICENSE +0 -13
- package/node_modules/gauge/has-color.js +0 -12
- package/node_modules/gauge/themes.js +0 -54
- package/node_modules/glob/changelog.md +0 -67
- package/node_modules/iconv-lite/Changelog.md +0 -162
- package/node_modules/iconv-lite/README.md +0 -156
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -555
- package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -176
- package/node_modules/iconv-lite/encodings/index.js +0 -22
- package/node_modules/iconv-lite/encodings/internal.js +0 -188
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
- package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -174
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
- package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
- package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
- package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -55
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
- package/node_modules/iconv-lite/encodings/utf16.js +0 -177
- package/node_modules/iconv-lite/encodings/utf7.js +0 -290
- package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
- package/node_modules/iconv-lite/lib/extend-node.js +0 -217
- package/node_modules/iconv-lite/lib/index.d.ts +0 -24
- package/node_modules/iconv-lite/lib/index.js +0 -153
- package/node_modules/iconv-lite/lib/streams.js +0 -121
- package/node_modules/iconv-lite/package.json +0 -76
- package/node_modules/ignore-walk/README.md +0 -60
- package/node_modules/ignore-walk/index.js +0 -269
- package/node_modules/ignore-walk/package.json +0 -77
- package/node_modules/ini/README.md +0 -102
- package/node_modules/ini/ini.js +0 -206
- package/node_modules/ini/package.json +0 -66
- package/node_modules/isarray/.npmignore +0 -1
- package/node_modules/isarray/.travis.yml +0 -4
- package/node_modules/isarray/Makefile +0 -6
- package/node_modules/isarray/README.md +0 -60
- package/node_modules/isarray/component.json +0 -19
- package/node_modules/isarray/index.js +0 -5
- package/node_modules/isarray/package.json +0 -73
- package/node_modules/isarray/test.js +0 -20
- package/node_modules/minimist/.travis.yml +0 -8
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/example/parse.js +0 -2
- package/node_modules/minimist/index.js +0 -245
- package/node_modules/minimist/package.json +0 -75
- package/node_modules/minimist/readme.markdown +0 -95
- package/node_modules/minimist/test/all_bool.js +0 -32
- package/node_modules/minimist/test/bool.js +0 -178
- package/node_modules/minimist/test/dash.js +0 -31
- package/node_modules/minimist/test/default_bool.js +0 -35
- package/node_modules/minimist/test/dotted.js +0 -22
- package/node_modules/minimist/test/kv_short.js +0 -16
- package/node_modules/minimist/test/long.js +0 -31
- package/node_modules/minimist/test/num.js +0 -36
- package/node_modules/minimist/test/parse.js +0 -197
- package/node_modules/minimist/test/parse_modified.js +0 -9
- package/node_modules/minimist/test/proto.js +0 -44
- package/node_modules/minimist/test/short.js +0 -67
- package/node_modules/minimist/test/stop_early.js +0 -15
- package/node_modules/minimist/test/unknown.js +0 -102
- package/node_modules/minimist/test/whitespace.js +0 -8
- package/node_modules/mkdirp/bin/usage.txt +0 -12
- package/node_modules/needle/.github/workflows/nodejs.yml +0 -27
- package/node_modules/needle/README.md +0 -612
- package/node_modules/needle/bin/needle +0 -40
- package/node_modules/needle/examples/deflated-stream.js +0 -22
- package/node_modules/needle/examples/digest-auth.js +0 -16
- package/node_modules/needle/examples/download-to-file.js +0 -18
- package/node_modules/needle/examples/multipart-stream.js +0 -25
- package/node_modules/needle/examples/parsed-stream.js +0 -23
- package/node_modules/needle/examples/parsed-stream2.js +0 -21
- package/node_modules/needle/examples/stream-events.js +0 -23
- package/node_modules/needle/examples/stream-to-file.js +0 -14
- package/node_modules/needle/examples/upload-image.js +0 -51
- package/node_modules/needle/lib/auth.js +0 -112
- package/node_modules/needle/lib/cookies.js +0 -79
- package/node_modules/needle/lib/decoder.js +0 -53
- package/node_modules/needle/lib/multipart.js +0 -98
- package/node_modules/needle/lib/needle.js +0 -829
- package/node_modules/needle/lib/parsers.js +0 -120
- package/node_modules/needle/lib/querystring.js +0 -49
- package/node_modules/needle/license.txt +0 -19
- package/node_modules/needle/package.json +0 -102
- package/node_modules/needle/test/auth_digest_spec.js +0 -192
- package/node_modules/needle/test/basic_auth_spec.js +0 -196
- package/node_modules/needle/test/compression_spec.js +0 -112
- package/node_modules/needle/test/cookies_spec.js +0 -396
- package/node_modules/needle/test/decoder_spec.js +0 -121
- package/node_modules/needle/test/errors_spec.js +0 -286
- package/node_modules/needle/test/headers_spec.js +0 -203
- package/node_modules/needle/test/helpers.js +0 -72
- package/node_modules/needle/test/long_string_spec.js +0 -34
- package/node_modules/needle/test/output_spec.js +0 -254
- package/node_modules/needle/test/parsing_spec.js +0 -494
- package/node_modules/needle/test/post_data_spec.js +0 -1021
- package/node_modules/needle/test/proxy_spec.js +0 -202
- package/node_modules/needle/test/querystring_spec.js +0 -128
- package/node_modules/needle/test/redirect_spec.js +0 -394
- package/node_modules/needle/test/redirect_with_timeout.js +0 -45
- package/node_modules/needle/test/request_stream_spec.js +0 -236
- package/node_modules/needle/test/response_stream_spec.js +0 -138
- package/node_modules/needle/test/socket_pool_spec.js +0 -67
- package/node_modules/needle/test/uri_modifier_spec.js +0 -46
- package/node_modules/needle/test/url_spec.js +0 -155
- package/node_modules/needle/test/utils/formidable.js +0 -17
- package/node_modules/needle/test/utils/proxy.js +0 -62
- package/node_modules/needle/test/utils/test.js +0 -104
- package/node_modules/node-pre-gyp/lib/build.js +0 -51
- package/node_modules/node-pre-gyp/lib/clean.js +0 -32
- package/node_modules/node-pre-gyp/lib/configure.js +0 -52
- package/node_modules/node-pre-gyp/lib/info.js +0 -40
- package/node_modules/node-pre-gyp/lib/install.js +0 -285
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +0 -203
- package/node_modules/node-pre-gyp/lib/package.js +0 -56
- package/node_modules/node-pre-gyp/lib/pre-binding.js +0 -30
- package/node_modules/node-pre-gyp/lib/publish.js +0 -79
- package/node_modules/node-pre-gyp/lib/rebuild.js +0 -21
- package/node_modules/node-pre-gyp/lib/reinstall.js +0 -20
- package/node_modules/node-pre-gyp/lib/reveal.js +0 -33
- package/node_modules/node-pre-gyp/lib/testbinary.js +0 -81
- package/node_modules/node-pre-gyp/lib/testpackage.js +0 -55
- package/node_modules/node-pre-gyp/lib/unpublish.js +0 -43
- package/node_modules/node-pre-gyp/lib/util/compile.js +0 -87
- package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +0 -103
- package/node_modules/node-pre-gyp/lib/util/napi.js +0 -205
- package/node_modules/node-pre-gyp/lib/util/s3_setup.js +0 -27
- package/node_modules/node-pre-gyp/lib/util/versioning.js +0 -331
- package/node_modules/node-pre-gyp/package.json +0 -86
- package/node_modules/npm-bundled/LICENSE +0 -15
- package/node_modules/npm-bundled/README.md +0 -48
- package/node_modules/npm-bundled/index.js +0 -251
- package/node_modules/npm-bundled/package.json +0 -63
- package/node_modules/npm-normalize-package-bin/.github/settings.yml +0 -2
- package/node_modules/npm-normalize-package-bin/.npmignore +0 -24
- package/node_modules/npm-normalize-package-bin/LICENSE +0 -15
- package/node_modules/npm-normalize-package-bin/README.md +0 -14
- package/node_modules/npm-normalize-package-bin/index.js +0 -60
- package/node_modules/npm-normalize-package-bin/package-lock.json +0 -3529
- package/node_modules/npm-normalize-package-bin/package.json +0 -58
- package/node_modules/npm-normalize-package-bin/test/array.js +0 -37
- package/node_modules/npm-normalize-package-bin/test/nobin.js +0 -35
- package/node_modules/npm-normalize-package-bin/test/object.js +0 -141
- package/node_modules/npm-normalize-package-bin/test/string.js +0 -37
- package/node_modules/npm-packlist/README.md +0 -68
- package/node_modules/npm-packlist/index.js +0 -289
- package/node_modules/npm-packlist/package.json +0 -74
- package/node_modules/npmlog/CHANGELOG.md +0 -49
- package/node_modules/npmlog/LICENSE +0 -15
- package/node_modules/number-is-nan/index.js +0 -4
- package/node_modules/number-is-nan/license +0 -21
- package/node_modules/number-is-nan/package.json +0 -67
- package/node_modules/number-is-nan/readme.md +0 -28
- package/node_modules/object-assign/index.js +0 -90
- package/node_modules/object-assign/license +0 -21
- package/node_modules/object-assign/package.json +0 -74
- package/node_modules/object-assign/readme.md +0 -61
- package/node_modules/os-homedir/index.js +0 -24
- package/node_modules/os-homedir/license +0 -21
- package/node_modules/os-homedir/package.json +0 -73
- package/node_modules/os-homedir/readme.md +0 -31
- package/node_modules/os-tmpdir/index.js +0 -25
- package/node_modules/os-tmpdir/license +0 -21
- package/node_modules/os-tmpdir/package.json +0 -73
- package/node_modules/os-tmpdir/readme.md +0 -32
- package/node_modules/osenv/LICENSE +0 -15
- package/node_modules/osenv/README.md +0 -63
- package/node_modules/osenv/osenv.js +0 -72
- package/node_modules/osenv/package.json +0 -73
- package/node_modules/process-nextick-args/index.js +0 -45
- package/node_modules/process-nextick-args/license.md +0 -19
- package/node_modules/process-nextick-args/package.json +0 -50
- package/node_modules/process-nextick-args/readme.md +0 -18
- package/node_modules/rc/LICENSE.APACHE2 +0 -15
- package/node_modules/rc/LICENSE.BSD +0 -26
- package/node_modules/rc/LICENSE.MIT +0 -24
- package/node_modules/rc/README.md +0 -227
- package/node_modules/rc/browser.js +0 -7
- package/node_modules/rc/cli.js +0 -4
- package/node_modules/rc/index.js +0 -53
- package/node_modules/rc/lib/utils.js +0 -104
- package/node_modules/rc/package.json +0 -64
- package/node_modules/rc/test/ini.js +0 -16
- package/node_modules/rc/test/nested-env-vars.js +0 -50
- package/node_modules/rc/test/test.js +0 -59
- package/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
- package/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
- package/node_modules/safer-buffer/Readme.md +0 -156
- package/node_modules/safer-buffer/dangerous.js +0 -58
- package/node_modules/safer-buffer/package.json +0 -60
- package/node_modules/safer-buffer/safer.js +0 -77
- package/node_modules/safer-buffer/tests.js +0 -406
- package/node_modules/sax/LICENSE +0 -41
- package/node_modules/sax/README.md +0 -225
- package/node_modules/sax/lib/sax.js +0 -1565
- package/node_modules/sax/package.json +0 -61
- package/node_modules/signal-exit/CHANGELOG.md +0 -35
- package/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/strip-json-comments/index.js +0 -70
- package/node_modules/strip-json-comments/license +0 -21
- package/node_modules/strip-json-comments/package.json +0 -75
- package/node_modules/strip-json-comments/readme.md +0 -64
- package/node_modules/tar/lib/buffer.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.0] - 2021-12-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Electron versions: 16.0, 15.3, 15.2, 14.2, 13.6, 13.3
|
|
15
|
+
|
|
16
|
+
## [2.0.0] - 2021-10-22
|
|
17
|
+
|
|
18
|
+
### Removed
|
|
19
|
+
|
|
20
|
+
- Electron 2.0.7
|
|
21
|
+
- Node 6.14.1 and 7.10.1
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Add Electron 13.3.0
|
|
26
|
+
- Documentation (copy of the wiki)
|
|
27
|
+
- Add Electron 13.2.3
|
|
28
|
+
- Add Electron 13.5.0
|
|
29
|
+
- Add Electron 14.0.1
|
|
30
|
+
- Add Electron 14.1.0
|
|
31
|
+
- Add Electron 15.0.0
|
|
32
|
+
- Add Electron 15.1.2
|
|
33
|
+
- Add Node 16.11.1
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Dependency to node-pre-gyp moved from deprecated to scoped package
|
|
38
|
+
|
|
39
|
+
## [1.10.0] - 2021-07-12
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- Add Electron 13.1
|
|
44
|
+
- Disable NEON on arm builds
|
|
45
|
+
|
|
46
|
+
## [1.9.0] - 2021-06-30
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
* Yarn v2 incompatibiliy
|
|
51
|
+
* Build issues on mac OS big sur
|
|
52
|
+
|
|
10
53
|
## [1.8.0] - 2021-05-28
|
|
11
54
|
|
|
12
55
|
### Added
|
|
@@ -152,7 +195,11 @@ with the following changes.
|
|
|
152
195
|
|
|
153
196
|
* Initial release
|
|
154
197
|
|
|
155
|
-
[Unreleased]: https://github.com/julianhille/MuhammaraJS/compare/1.
|
|
198
|
+
[Unreleased]: https://github.com/julianhille/MuhammaraJS/compare/2.1.0...HEAD
|
|
199
|
+
[2.1.0]: https://github.com/julianhille/MuhammaraJS/compare/2.0.0...2.1.0
|
|
200
|
+
[2.0.0]: https://github.com/julianhille/MuhammaraJS/compare/1.10.0...2.0.0
|
|
201
|
+
[1.10.0]: https://github.com/julianhille/MuhammaraJS/compare/1.9.0...1.10.0
|
|
202
|
+
[1.9.0]: https://github.com/julianhille/MuhammaraJS/compare/1.8.0...1.9.0
|
|
156
203
|
[1.8.0]: https://github.com/julianhille/MuhammaraJS/compare/1.7.0...1.8.0
|
|
157
204
|
[1.7.0]: https://github.com/julianhille/MuhammaraJS/compare/1.6.0...1.7.0
|
|
158
205
|
[1.6.0]: https://github.com/julianhille/MuhammaraJS/compare/1.5.1...1.6.0
|
package/README.md
CHANGED
|
@@ -17,6 +17,11 @@ Project site is [here](http://www.pdfhummus.com).
|
|
|
17
17
|
|
|
18
18
|
If you are looking for a C++ Library go [here](https://github.com/galkahana/PDF-Writer).
|
|
19
19
|
|
|
20
|
+
# Caution
|
|
21
|
+
|
|
22
|
+
Version 2.0 will be incompatible with some older node and
|
|
23
|
+
electron versions because we needed to upgrade node-pre-gyp.
|
|
24
|
+
|
|
20
25
|
# Installation
|
|
21
26
|
|
|
22
27
|
```
|
|
@@ -37,3 +42,7 @@ With:
|
|
|
37
42
|
```
|
|
38
43
|
let muhammara = require('muhammara')
|
|
39
44
|
```
|
|
45
|
+
|
|
46
|
+
# Documentation
|
|
47
|
+
|
|
48
|
+
You can find samples and documentation [here](./docs/Home.md)
|
package/muhammara.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var fs = require('fs');
|
|
2
2
|
var path = require('path');
|
|
3
|
-
var pregyp = require('node-pre-gyp');
|
|
3
|
+
var pregyp = require('@mapbox/node-pre-gyp');
|
|
4
4
|
var binding_path = pregyp.find(path.resolve(path.join(__dirname,'./package.json')));
|
|
5
5
|
var muhammara = module.exports = require(binding_path);
|
|
6
6
|
var EventEmitter = require('events').EventEmitter;
|
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# node-pre-gyp changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.7
|
|
4
|
+
- Upgraded nyc and npmlog to address https://github.com/advisories/GHSA-93q8-gq69-wqmw
|
|
5
|
+
|
|
6
|
+
## 1.0.6
|
|
7
|
+
- Added node v17 to the internal node releases listing
|
|
8
|
+
- Upgraded various dependencies declared in package.json to latest major versions (node-fetch from 2.6.1 to 2.6.5, npmlog from 4.1.2 to 5.01, semver from 7.3.4 to 7.3.5, and tar from 6.1.0 to 6.1.11)
|
|
9
|
+
- Fixed bug in `staging_host` parameter (https://github.com/mapbox/node-pre-gyp/pull/590)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## 1.0.5
|
|
13
|
+
- Fix circular reference warning with node >= v14
|
|
14
|
+
|
|
15
|
+
## 1.0.4
|
|
16
|
+
- Added node v16 to the internal node releases listing
|
|
17
|
+
|
|
18
|
+
## 1.0.3
|
|
19
|
+
- Improved support configuring s3 uploads (solves https://github.com/mapbox/node-pre-gyp/issues/571)
|
|
20
|
+
- New options added in https://github.com/mapbox/node-pre-gyp/pull/576: 'bucket', 'region', and `s3ForcePathStyle`
|
|
21
|
+
|
|
22
|
+
## 1.0.2
|
|
23
|
+
- Fixed regression in proxy support (https://github.com/mapbox/node-pre-gyp/issues/572)
|
|
24
|
+
|
|
25
|
+
## 1.0.1
|
|
26
|
+
- Switched from mkdirp@1.0.4 to make-dir@3.1.0 to avoid this bug: https://github.com/isaacs/node-mkdirp/issues/31
|
|
27
|
+
|
|
28
|
+
## 1.0.0
|
|
29
|
+
- Module is now name-spaced at `@mapbox/node-pre-gyp` and the original `node-pre-gyp` is deprecated.
|
|
30
|
+
- New: support for staging and production s3 targets (see README.md)
|
|
31
|
+
- BREAKING: no longer supporting `node_pre_gyp_accessKeyId` & `node_pre_gyp_secretAccessKey`, use `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` instead to authenticate against s3 for `info`, `publish`, and `unpublish` commands.
|
|
32
|
+
- Dropped node v6 support, added node v14 support
|
|
33
|
+
- Switched tests to use mapbox-owned bucket for testing
|
|
34
|
+
- Added coverage tracking and linting with eslint
|
|
35
|
+
- Added back support for symlinks inside the tarball
|
|
36
|
+
- Upgraded all test apps to N-API/node-addon-api
|
|
37
|
+
- New: support for staging and production s3 targets (see README.md)
|
|
38
|
+
- Added `node_pre_gyp_s3_host` env var which has priority over the `--s3_host` option or default.
|
|
39
|
+
- Replaced needle with node-fetch
|
|
40
|
+
- Added proxy support for node-fetch
|
|
41
|
+
- Upgraded to mkdirp@1.x
|
|
42
|
+
|
|
3
43
|
## 0.17.0
|
|
4
44
|
- Got travis + appveyor green again
|
|
5
45
|
- Added support for more node versions
|
|
File without changes
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
# node-pre-gyp
|
|
1
|
+
# @mapbox/node-pre-gyp
|
|
2
2
|
|
|
3
|
-
#### node-pre-gyp makes it easy to publish and install Node.js C++ addons from binaries
|
|
3
|
+
#### @mapbox/node-pre-gyp makes it easy to publish and install Node.js C++ addons from binaries
|
|
4
4
|
|
|
5
5
|
[](https://travis-ci.com/mapbox/node-pre-gyp)
|
|
6
6
|
[](https://ci.appveyor.com/project/Mapbox/node-pre-gyp)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`@mapbox/node-pre-gyp` stands between [npm](https://github.com/npm/npm) and [node-gyp](https://github.com/Tootallnate/node-gyp) and offers a cross-platform method of binary deployment.
|
|
9
|
+
|
|
10
|
+
### Special note on previous package
|
|
11
|
+
|
|
12
|
+
On Feb 9th, 2021 `@mapbox/node-pre-gyp@1.0.0` was [released](./CHANGELOG.md). Older, unscoped versions that are not part of the `@mapbox` org are deprecated and only `@mapbox/node-pre-gyp` will see updates going forward. To upgrade to the new package do:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
npm uninstall node-pre-gyp --save
|
|
16
|
+
npm install @mapbox/node-pre-gyp --save
|
|
17
|
+
```
|
|
9
18
|
|
|
10
19
|
### Features
|
|
11
20
|
|
|
12
21
|
- A command line tool called `node-pre-gyp` that can install your package's C++ module from a binary.
|
|
13
22
|
- A variety of developer targeted commands for packaging, testing, and publishing binaries.
|
|
14
|
-
- A JavaScript module that can dynamically require your installed binary: `require('node-pre-gyp').find`
|
|
23
|
+
- A JavaScript module that can dynamically require your installed binary: `require('@mapbox/node-pre-gyp').find`
|
|
15
24
|
|
|
16
25
|
For a hello world example of a module packaged with `node-pre-gyp` see <https://github.com/springmeyer/node-addon-example> and [the wiki ](https://github.com/mapbox/node-pre-gyp/wiki/Modules-using-node-pre-gyp) for real world examples.
|
|
17
26
|
|
|
@@ -27,7 +36,7 @@ See the [Frequently Ask Questions](https://github.com/mapbox/node-pre-gyp/wiki/F
|
|
|
27
36
|
|
|
28
37
|
## Depends
|
|
29
38
|
|
|
30
|
-
- Node.js >= node
|
|
39
|
+
- Node.js >= node v8.x
|
|
31
40
|
|
|
32
41
|
## Install
|
|
33
42
|
|
|
@@ -37,7 +46,7 @@ See the [Frequently Ask Questions](https://github.com/mapbox/node-pre-gyp/wiki/F
|
|
|
37
46
|
|
|
38
47
|
But you can also install it globally:
|
|
39
48
|
|
|
40
|
-
npm install node-pre-gyp -g
|
|
49
|
+
npm install @mapbox/node-pre-gyp -g
|
|
41
50
|
|
|
42
51
|
## Usage
|
|
43
52
|
|
|
@@ -89,7 +98,7 @@ This is a guide to configuring your module to use node-pre-gyp.
|
|
|
89
98
|
|
|
90
99
|
#### 1) Add new entries to your `package.json`
|
|
91
100
|
|
|
92
|
-
- Add
|
|
101
|
+
- Add `@mapbox/node-pre-gyp` to `dependencies`
|
|
93
102
|
- Add `aws-sdk` as a `devDependency`
|
|
94
103
|
- Add a custom `install` script
|
|
95
104
|
- Declare a `binary` object
|
|
@@ -98,7 +107,7 @@ This looks like:
|
|
|
98
107
|
|
|
99
108
|
```js
|
|
100
109
|
"dependencies" : {
|
|
101
|
-
"node-pre-gyp": "
|
|
110
|
+
"@mapbox/node-pre-gyp": "1.x"
|
|
102
111
|
},
|
|
103
112
|
"devDependencies": {
|
|
104
113
|
"aws-sdk": "2.x"
|
|
@@ -122,7 +131,7 @@ Let's break this down:
|
|
|
122
131
|
- Your `scripts` section should override the `install` target with `"install": "node-pre-gyp install --fallback-to-build"`. This allows node-pre-gyp to be used instead of the default npm behavior of always source compiling with `node-gyp` directly.
|
|
123
132
|
- Your package.json should contain a `binary` section describing key properties you provide to allow node-pre-gyp to package optimally. They are detailed below.
|
|
124
133
|
|
|
125
|
-
Note: in the past we recommended putting
|
|
134
|
+
Note: in the past we recommended putting `@mapbox/node-pre-gyp` in the `bundledDependencies`, but we no longer recommend this. In the past there were npm bugs (with node versions 0.10.x) that could lead to node-pre-gyp not being available at the right time during install (unless we bundled). This should no longer be the case. Also, for a time we recommended using `"preinstall": "npm install @mapbox/node-pre-gyp"` as an alternative method to avoid needing to bundle. But this did not behave predictably across all npm versions - see https://github.com/mapbox/node-pre-gyp/issues/260 for the details. So we do not recommend using `preinstall` to install `@mapbox/node-pre-gyp`. More history on this at https://github.com/strongloop/fsevents/issues/157#issuecomment-265545908.
|
|
126
135
|
|
|
127
136
|
##### The `binary` object has three required properties
|
|
128
137
|
|
|
@@ -154,7 +163,27 @@ Why then not require S3? Because while some applications using node-pre-gyp need
|
|
|
154
163
|
|
|
155
164
|
It should also be mentioned that there is an optional and entirely separate npm module called [node-pre-gyp-github](https://github.com/bchr02/node-pre-gyp-github) which is intended to complement node-pre-gyp and be installed along with it. It provides the ability to store and publish your binaries within your repositories GitHub Releases if you would rather not use S3 directly. Installation and usage instructions can be found [here](https://github.com/bchr02/node-pre-gyp-github), but the basic premise is that instead of using the ```node-pre-gyp publish``` command you would use ```node-pre-gyp-github publish```.
|
|
156
165
|
|
|
157
|
-
##### The `binary` object
|
|
166
|
+
##### The `binary` object other optional S3 properties
|
|
167
|
+
|
|
168
|
+
If you are not using a standard s3 path like `bucket_name.s3(.-)region.amazonaws.com`, you might get an error on `publish` because node-pre-gyp extracts the region and bucket from the `host` url. For example, you may have an on-premises s3-compatible storage server, or may have configured a specific dns redirecting to an s3 endpoint. In these cases, you can explicitly set the `region` and `bucket` properties to tell node-pre-gyp to use these values instead of guessing from the `host` property. The following values can be used in the `binary` section:
|
|
169
|
+
|
|
170
|
+
###### host
|
|
171
|
+
|
|
172
|
+
The url to the remote server root location (must be `https` not `http`).
|
|
173
|
+
|
|
174
|
+
###### bucket
|
|
175
|
+
|
|
176
|
+
The bucket name where your tarball binaries should be located.
|
|
177
|
+
|
|
178
|
+
###### region
|
|
179
|
+
|
|
180
|
+
Your S3 server region.
|
|
181
|
+
|
|
182
|
+
###### s3ForcePathStyle
|
|
183
|
+
|
|
184
|
+
Set `s3ForcePathStyle` to true if the endpoint url should not be prefixed with the bucket name. If false (default), the server endpoint would be constructed as `bucket_name.your_server.com`.
|
|
185
|
+
|
|
186
|
+
##### The `binary` object has optional properties
|
|
158
187
|
|
|
159
188
|
###### remote_path
|
|
160
189
|
|
|
@@ -215,7 +244,7 @@ var bindings = require('./bindings')
|
|
|
215
244
|
Change those lines to:
|
|
216
245
|
|
|
217
246
|
```js
|
|
218
|
-
var binary = require('node-pre-gyp');
|
|
247
|
+
var binary = require('@mapbox/node-pre-gyp');
|
|
219
248
|
var path = require('path');
|
|
220
249
|
var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json')));
|
|
221
250
|
var binding = require(binding_path);
|
|
@@ -279,17 +308,42 @@ What will happen is this:
|
|
|
279
308
|
|
|
280
309
|
If a a binary was not available for a given platform and `--fallback-to-build` was used then `node-gyp rebuild` will be called to try to source compile the module.
|
|
281
310
|
|
|
282
|
-
|
|
311
|
+
#### 9) One more option
|
|
312
|
+
|
|
313
|
+
It may be that you want to work with two s3 buckets, one for staging and one for production; this
|
|
314
|
+
arrangement makes it less likely to accidentally overwrite a production binary. It also allows the production
|
|
315
|
+
environment to have more restrictive permissions than staging while still enabling publishing when
|
|
316
|
+
developing and testing.
|
|
317
|
+
|
|
318
|
+
The binary.host property can be set at execution time. In order to do so all of the following conditions
|
|
319
|
+
must be true.
|
|
320
|
+
|
|
321
|
+
- binary.host is falsey or not present
|
|
322
|
+
- binary.staging_host is not empty
|
|
323
|
+
- binary.production_host is not empty
|
|
324
|
+
|
|
325
|
+
If any of these checks fail then the operation will not perform execution time determination of the s3 target.
|
|
326
|
+
|
|
327
|
+
If the command being executed is either "publish" or "unpublish" then the default is set to `binary.staging_host`. In all other cases
|
|
328
|
+
the default is `binary.production_host`.
|
|
329
|
+
|
|
330
|
+
The command-line options `--s3_host=staging` or `--s3_host=production` override the default. If `s3_host`
|
|
331
|
+
is present and not `staging` or `production` an exception is thrown.
|
|
332
|
+
|
|
333
|
+
This allows installing from staging by specifying `--s3_host=staging`. And it requires specifying
|
|
334
|
+
`--s3_option=production` in order to publish to, or unpublish from, production, making accidental errors less likely.
|
|
283
335
|
|
|
284
|
-
|
|
336
|
+
## Node-API Considerations
|
|
285
337
|
|
|
286
|
-
|
|
338
|
+
[Node-API](https://nodejs.org/api/n-api.html#n_api_node_api), which was previously known as N-API, is an ABI-stable alternative to previous technologies such as [nan](https://github.com/nodejs/nan) which are tied to a specific Node runtime engine. Node-API is Node runtime engine agnostic and guarantees modules created today will continue to run, without changes, into the future.
|
|
287
339
|
|
|
288
|
-
|
|
340
|
+
Using `node-pre-gyp` with Node-API projects requires a handful of additional configuration values and imposes some additional requirements.
|
|
341
|
+
|
|
342
|
+
The most significant difference is that an Node-API module can be coded to target multiple Node-API versions. Therefore, an Node-API module must declare in its `package.json` file which Node-API versions the module is designed to run against. In addition, since multiple builds may be required for a single module, path and file names must be specified in way that avoids naming conflicts.
|
|
289
343
|
|
|
290
344
|
### The `napi_versions` array property
|
|
291
345
|
|
|
292
|
-
|
|
346
|
+
A Node-API module must declare in its `package.json` file, the Node-API versions the module is intended to support. This is accomplished by including an `napi-versions` array property in the `binary` object. For example:
|
|
293
347
|
|
|
294
348
|
```js
|
|
295
349
|
"binary": {
|
|
@@ -300,17 +354,17 @@ An N-API modules must declare in its `package.json` file, the N-API versions the
|
|
|
300
354
|
}
|
|
301
355
|
```
|
|
302
356
|
|
|
303
|
-
If the `napi_versions` array property is *not* present, `node-pre-gyp` operates as it always has. Including the `napi_versions` array property instructs `node-pre-gyp` that this is a
|
|
357
|
+
If the `napi_versions` array property is *not* present, `node-pre-gyp` operates as it always has. Including the `napi_versions` array property instructs `node-pre-gyp` that this is a Node-API module build.
|
|
304
358
|
|
|
305
|
-
When the `napi_versions` array property is present, `node-pre-gyp` fires off multiple operations, one for each of the
|
|
359
|
+
When the `napi_versions` array property is present, `node-pre-gyp` fires off multiple operations, one for each of the Node-API versions in the array. In the example above, two operations are initiated, one for Node-API version 1 and second for Node-API version 3. How this version number is communicated is described next.
|
|
306
360
|
|
|
307
361
|
### The `napi_build_version` value
|
|
308
362
|
|
|
309
|
-
For each of the
|
|
363
|
+
For each of the Node-API module operations `node-pre-gyp` initiates, it ensures that the `napi_build_version` is set appropriately.
|
|
310
364
|
|
|
311
365
|
This value is of importance in two areas:
|
|
312
366
|
|
|
313
|
-
1. The C/C++ code which needs to know against which
|
|
367
|
+
1. The C/C++ code which needs to know against which Node-API version it should compile.
|
|
314
368
|
2. `node-pre-gyp` itself which must assign appropriate path and file names to avoid collisions.
|
|
315
369
|
|
|
316
370
|
### Defining `NAPI_VERSION` for the C/C++ code
|
|
@@ -325,13 +379,13 @@ The `napi_build_version` value is communicated to the C/C++ code by adding this
|
|
|
325
379
|
|
|
326
380
|
This ensures that `NAPI_VERSION`, an integer value, is declared appropriately to the C/C++ code for each build.
|
|
327
381
|
|
|
328
|
-
> Note that earlier versions of this document recommended defining the symbol `NAPI_BUILD_VERSION`. `NAPI_VERSION` is
|
|
382
|
+
> Note that earlier versions of this document recommended defining the symbol `NAPI_BUILD_VERSION`. `NAPI_VERSION` is preferred because it used by the Node-API C/C++ headers to configure the specific Node-API versions being requested.
|
|
329
383
|
|
|
330
384
|
### Path and file naming requirements in `package.json`
|
|
331
385
|
|
|
332
386
|
Since `node-pre-gyp` fires off multiple operations for each request, it is essential that path and file names be created in such a way as to avoid collisions. This is accomplished by imposing additional path and file naming requirements.
|
|
333
387
|
|
|
334
|
-
Specifically, when performing
|
|
388
|
+
Specifically, when performing Node-API builds, the `{napi_build_version}` text configuration value *must* be present in the `module_path` property. In addition, the `{napi_build_version}` text configuration value *must* be present in either the `remote_path` or `package_name` property. (No problem if it's in both.)
|
|
335
389
|
|
|
336
390
|
Here's an example:
|
|
337
391
|
|
|
@@ -346,15 +400,15 @@ Here's an example:
|
|
|
346
400
|
}
|
|
347
401
|
```
|
|
348
402
|
|
|
349
|
-
## Supporting both
|
|
403
|
+
## Supporting both Node-API and NAN builds
|
|
350
404
|
|
|
351
|
-
You may have a legacy native add-on that you wish to continue supporting for those versions of Node that do not support
|
|
405
|
+
You may have a legacy native add-on that you wish to continue supporting for those versions of Node that do not support Node-API, as you add Node-API support for later Node versions. This can be accomplished by specifying the `node_napi_label` configuration value in the package.json `binary.package_name` property.
|
|
352
406
|
|
|
353
|
-
Placing the configuration value `node_napi_label` in the package.json `binary.package_name` property instructs `node-pre-gyp` to build all viable
|
|
407
|
+
Placing the configuration value `node_napi_label` in the package.json `binary.package_name` property instructs `node-pre-gyp` to build all viable Node-API binaries supported by the current Node instance. If the current Node instance does not support Node-API, `node-pre-gyp` will request a traditional, non-Node-API build.
|
|
354
408
|
|
|
355
|
-
The configuration value `node_napi_label` is set by `node-pre-gyp` to the type of build created, `napi` or `node`, and the version number. For
|
|
409
|
+
The configuration value `node_napi_label` is set by `node-pre-gyp` to the type of build created, `napi` or `node`, and the version number. For Node-API builds, the string contains the Node-API version nad has values like `napi-v3`. For traditional, non-Node-API builds, the string contains the ABI version with values like `node-v46`.
|
|
356
410
|
|
|
357
|
-
Here's how the `binary` configuration above might be changed to support both
|
|
411
|
+
Here's how the `binary` configuration above might be changed to support both Node-API and NAN builds:
|
|
358
412
|
|
|
359
413
|
```js
|
|
360
414
|
"binary": {
|
|
@@ -367,13 +421,13 @@ Here's how the `binary` configuration above might be changed to support both N-A
|
|
|
367
421
|
}
|
|
368
422
|
```
|
|
369
423
|
|
|
370
|
-
The C/C++ symbol `NAPI_VERSION` can be used to distinguish
|
|
424
|
+
The C/C++ symbol `NAPI_VERSION` can be used to distinguish Node-API and non-Node-API builds. The value of `NAPI_VERSION` is set to the integer Node-API version for Node-API builds and is set to `0` for non-Node-API builds.
|
|
371
425
|
|
|
372
426
|
For example:
|
|
373
|
-
|
|
427
|
+
|
|
374
428
|
```C
|
|
375
429
|
#if NAPI_VERSION
|
|
376
|
-
//
|
|
430
|
+
// Node-API code goes here
|
|
377
431
|
#else
|
|
378
432
|
// NAN code goes here
|
|
379
433
|
#endif
|
|
@@ -383,7 +437,7 @@ For example:
|
|
|
383
437
|
|
|
384
438
|
The following two configuration values, which were implemented in previous versions of `node-pre-gyp`, continue to exist, but have been replaced by the `node_napi_label` configuration value described above.
|
|
385
439
|
|
|
386
|
-
1. `napi_version` If
|
|
440
|
+
1. `napi_version` If Node-API is supported by the currently executing Node instance, this value is the Node-API version number supported by Node. If Node-API is not supported, this value is an empty string.
|
|
387
441
|
|
|
388
442
|
2. `node_abi_napi` If the value returned for `napi_version` is non empty, this value is `'napi'`. If the value returned for `napi_version` is empty, this value is the value returned for `node_abi`.
|
|
389
443
|
|
|
@@ -399,28 +453,37 @@ First, get setup locally and test the workflow:
|
|
|
399
453
|
|
|
400
454
|
And have your **key** and **secret key** ready for writing to the bucket.
|
|
401
455
|
|
|
402
|
-
It is recommended to create a IAM user with a policy that only gives permissions to the specific bucket you plan to publish to. This can be done in the [IAM console](https://console.aws.amazon.com/iam/) by: 1) adding a new user, 2) choosing `Attach User Policy`, 3) Using the `Policy Generator`, 4) selecting `Amazon S3` for the service, 5) adding the actions: `DeleteObject`, `GetObject`, `GetObjectAcl`, `ListBucket`, `PutObject`, `PutObjectAcl`, 6) adding an ARN of `arn:aws:s3:::bucket/*` (replacing `bucket` with your bucket name), and finally 7) clicking `Add Statement` and saving the policy. It should generate a policy like:
|
|
456
|
+
It is recommended to create a IAM user with a policy that only gives permissions to the specific bucket you plan to publish to. This can be done in the [IAM console](https://console.aws.amazon.com/iam/) by: 1) adding a new user, 2) choosing `Attach User Policy`, 3) Using the `Policy Generator`, 4) selecting `Amazon S3` for the service, 5) adding the actions: `DeleteObject`, `GetObject`, `GetObjectAcl`, `ListBucket`, `HeadBucket`, `PutObject`, `PutObjectAcl`, 6) adding an ARN of `arn:aws:s3:::bucket/*` (replacing `bucket` with your bucket name), and finally 7) clicking `Add Statement` and saving the policy. It should generate a policy like:
|
|
403
457
|
|
|
404
458
|
```js
|
|
405
459
|
{
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
460
|
+
"Version": "2012-10-17",
|
|
461
|
+
"Statement": [
|
|
462
|
+
{
|
|
463
|
+
"Sid": "objects",
|
|
464
|
+
"Effect": "Allow",
|
|
465
|
+
"Action": [
|
|
466
|
+
"s3:PutObject",
|
|
467
|
+
"s3:GetObjectAcl",
|
|
468
|
+
"s3:GetObject",
|
|
469
|
+
"s3:DeleteObject",
|
|
470
|
+
"s3:PutObjectAcl"
|
|
471
|
+
],
|
|
472
|
+
"Resource": "arn:aws:s3:::your-bucket-name/*"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"Sid": "bucket",
|
|
476
|
+
"Effect": "Allow",
|
|
477
|
+
"Action": "s3:ListBucket",
|
|
478
|
+
"Resource": "arn:aws:s3:::your-bucket-name"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"Sid": "buckets",
|
|
482
|
+
"Effect": "Allow",
|
|
483
|
+
"Action": "s3:HeadBucket",
|
|
484
|
+
"Resource": "*"
|
|
485
|
+
}
|
|
486
|
+
]
|
|
424
487
|
}
|
|
425
488
|
```
|
|
426
489
|
|
|
@@ -436,29 +499,12 @@ Or put the local version on your PATH
|
|
|
436
499
|
|
|
437
500
|
#### 3) Configure AWS credentials
|
|
438
501
|
|
|
439
|
-
|
|
502
|
+
It is recommended to configure the AWS JS SDK v2 used internally by `node-pre-gyp` by setting these environment variables:
|
|
440
503
|
|
|
441
|
-
|
|
504
|
+
- AWS_ACCESS_KEY_ID
|
|
505
|
+
- AWS_SECRET_ACCESS_KEY
|
|
442
506
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
Or pass options in any way supported by [RC](https://github.com/dominictarr/rc#standards)
|
|
446
|
-
|
|
447
|
-
A `~/.node_pre_gyprc` looks like:
|
|
448
|
-
|
|
449
|
-
```js
|
|
450
|
-
{
|
|
451
|
-
"accessKeyId": "xxx",
|
|
452
|
-
"secretAccessKey": "xxx"
|
|
453
|
-
}
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
Another way is to use your environment:
|
|
457
|
-
|
|
458
|
-
export node_pre_gyp_accessKeyId=xxx
|
|
459
|
-
export node_pre_gyp_secretAccessKey=xxx
|
|
460
|
-
|
|
461
|
-
You may also need to specify the `region` if it is not explicit in the `host` value you use. The `bucket` can also be specified but it is optional because `node-pre-gyp` will detect it from the `host` value.
|
|
507
|
+
But also you can also use the `Shared Config File` mentioned [in the AWS JS SDK v2 docs](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html)
|
|
462
508
|
|
|
463
509
|
#### 4) Package and publish your build
|
|
464
510
|
|
|
@@ -504,9 +550,9 @@ Then paste the result into your `appveyor.yml`
|
|
|
504
550
|
|
|
505
551
|
```yml
|
|
506
552
|
environment:
|
|
507
|
-
|
|
553
|
+
AWS_ACCESS_KEY_ID:
|
|
508
554
|
secure: Dn9HKdLNYvDgPdQOzRq/DqZ/MPhjknRHB1o+/lVU8MA=
|
|
509
|
-
|
|
555
|
+
AWS_SECRET_ACCESS_KEY:
|
|
510
556
|
secure: W1rwNoSnOku1r+28gnoufO8UA8iWADmL1LiiwH9IOkIVhDTNGdGPJqAlLjNqwLnL
|
|
511
557
|
```
|
|
512
558
|
|
|
@@ -552,8 +598,8 @@ Make sure you run this command from within the directory of your module.
|
|
|
552
598
|
|
|
553
599
|
Use `travis-encrypt` like:
|
|
554
600
|
|
|
555
|
-
travis encrypt
|
|
556
|
-
travis encrypt
|
|
601
|
+
travis encrypt AWS_ACCESS_KEY_ID=${node_pre_gyp_accessKeyId}
|
|
602
|
+
travis encrypt AWS_SECRET_ACCESS_KEY=${node_pre_gyp_secretAccessKey}
|
|
557
603
|
|
|
558
604
|
Then put those values in your `.travis.yml` like:
|
|
559
605
|
|
|
@@ -681,10 +727,16 @@ The options are visible in the code at <https://github.com/mapbox/node-pre-gyp/b
|
|
|
681
727
|
|
|
682
728
|
S3 is broken in China for the well known reason.
|
|
683
729
|
|
|
684
|
-
Using the `npm` config argument: `--{module_name}_binary_host_mirror` can download binary files through a mirror
|
|
730
|
+
Using the `npm` config argument: `--{module_name}_binary_host_mirror` can download binary files through a mirror, `-` in `module_name` will be replaced with `_`.
|
|
685
731
|
|
|
686
732
|
e.g.: Install [v8-profiler](https://www.npmjs.com/package/v8-profiler) from `npm`.
|
|
687
733
|
|
|
688
734
|
```bash
|
|
689
735
|
$ npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
|
|
690
736
|
```
|
|
737
|
+
|
|
738
|
+
e.g.: Install [canvas-prebuilt](https://www.npmjs.com/package/canvas-prebuilt) from `npm`.
|
|
739
|
+
|
|
740
|
+
```bash
|
|
741
|
+
$ npm install canvas-prebuilt --canvas_prebuilt_binary_host_mirror=https://npm.taobao.org/mirrors/canvas-prebuilt/
|
|
742
|
+
```
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = exports = build;
|
|
4
|
+
|
|
5
|
+
exports.usage = 'Attempts to compile the module by dispatching to node-gyp or nw-gyp';
|
|
6
|
+
|
|
7
|
+
const napi = require('./util/napi.js');
|
|
8
|
+
const compile = require('./util/compile.js');
|
|
9
|
+
const handle_gyp_opts = require('./util/handle_gyp_opts.js');
|
|
10
|
+
const configure = require('./configure.js');
|
|
11
|
+
|
|
12
|
+
function do_build(gyp, argv, callback) {
|
|
13
|
+
handle_gyp_opts(gyp, argv, (err, result) => {
|
|
14
|
+
let final_args = ['build'].concat(result.gyp).concat(result.pre);
|
|
15
|
+
if (result.unparsed.length > 0) {
|
|
16
|
+
final_args = final_args.
|
|
17
|
+
concat(['--']).
|
|
18
|
+
concat(result.unparsed);
|
|
19
|
+
}
|
|
20
|
+
if (!err && result.opts.napi_build_version) {
|
|
21
|
+
napi.swap_build_dir_in(result.opts.napi_build_version);
|
|
22
|
+
}
|
|
23
|
+
compile.run_gyp(final_args, result.opts, (err2) => {
|
|
24
|
+
if (result.opts.napi_build_version) {
|
|
25
|
+
napi.swap_build_dir_out(result.opts.napi_build_version);
|
|
26
|
+
}
|
|
27
|
+
return callback(err2);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function build(gyp, argv, callback) {
|
|
33
|
+
|
|
34
|
+
// Form up commands to pass to node-gyp:
|
|
35
|
+
// We map `node-pre-gyp build` to `node-gyp configure build` so that we do not
|
|
36
|
+
// trigger a clean and therefore do not pay the penalty of a full recompile
|
|
37
|
+
if (argv.length && (argv.indexOf('rebuild') > -1)) {
|
|
38
|
+
argv.shift(); // remove `rebuild`
|
|
39
|
+
// here we map `node-pre-gyp rebuild` to `node-gyp rebuild` which internally means
|
|
40
|
+
// "clean + configure + build" and triggers a full recompile
|
|
41
|
+
compile.run_gyp(['clean'], {}, (err3) => {
|
|
42
|
+
if (err3) return callback(err3);
|
|
43
|
+
configure(gyp, argv, (err4) => {
|
|
44
|
+
if (err4) return callback(err4);
|
|
45
|
+
return do_build(gyp, argv, callback);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
return do_build(gyp, argv, callback);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = exports = clean;
|
|
4
|
+
|
|
5
|
+
exports.usage = 'Removes the entire folder containing the compiled .node module';
|
|
6
|
+
|
|
7
|
+
const rm = require('rimraf');
|
|
8
|
+
const exists = require('fs').exists || require('path').exists;
|
|
9
|
+
const versioning = require('./util/versioning.js');
|
|
10
|
+
const napi = require('./util/napi.js');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
|
|
13
|
+
function clean(gyp, argv, callback) {
|
|
14
|
+
const package_json = gyp.package_json;
|
|
15
|
+
const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
|
|
16
|
+
const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
|
|
17
|
+
const to_delete = opts.module_path;
|
|
18
|
+
if (!to_delete) {
|
|
19
|
+
return callback(new Error('module_path is empty, refusing to delete'));
|
|
20
|
+
} else if (path.normalize(to_delete) === path.normalize(process.cwd())) {
|
|
21
|
+
return callback(new Error('module_path is not set, refusing to delete'));
|
|
22
|
+
} else {
|
|
23
|
+
exists(to_delete, (found) => {
|
|
24
|
+
if (found) {
|
|
25
|
+
if (!gyp.opts.silent_clean) console.log('[' + package_json.name + '] Removing "%s"', to_delete);
|
|
26
|
+
return rm(to_delete, callback);
|
|
27
|
+
}
|
|
28
|
+
return callback();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|